JavaScript SDK
Coming Soon
The official ClawWallet JavaScript SDK is currently in development. In the meantime, you can interact with all contracts directly using ethers.js v6 or viem — see the ABI Reference for all function signatures.
Planned Features
The ClawWallet SDK will provide a high-level TypeScript API for:
Wallet Management
// Planned API
import { ClawWallet } from '@clawwallet/sdk';
const claw = new ClawWallet({
provider: 'https://api.mainnet.abs.xyz',
signer: wallet,
});
// Deploy an agent wallet
const agentWallet = await claw.deployWallet(agentAddress);
// Execute transactions
await agentWallet.execute(target, value, data);
await agentWallet.executeBatch([...transactions]);
// Session keys
await agentWallet.addSessionKey({ key, validUntil, spendingLimit, targets });
await agentWallet.revokeSessionKey(keyAddress);
// Skills
await agentWallet.installSkill(skillAddress);
await agentWallet.uninstallSkill(skillAddress);
Identity
// Planned API
const identity = claw.identity();
// Mint .claw domain
const agentId = await identity.register('https://myagent.xyz/metadata.json');
// Manage metadata
await identity.setMetadata(agentId, 'category', 'defi');
const metadata = await identity.getMetadata(agentId, 'category');
// Reputation
const reputation = await identity.getReputation(agentId);
await identity.giveFeedback(agentId, { value: 100, tag1: 'quality' });
Paymaster
// Planned API
const paymaster = claw.paymaster();
// Check eligibility
const eligible = await paymaster.canSponsor(walletAddress);
const remaining = await paymaster.remainingDailyGas(walletAddress);
// Fund
await paymaster.fund(ethers.parseEther('1.0'));
Staking
// Planned API
const staking = claw.staking();
await staking.stake(amount, tier);
await staking.unstake(stakeId);
await staking.claimRewards(stakeId);
const pending = await staking.pendingRewards(stakeId);
Current Approach
Until the SDK is released, use ethers.js v6 directly with our contract ABIs:
import { ethers } from 'ethers';
const provider = new ethers.JsonRpcProvider('https://api.mainnet.abs.xyz');
const wallet = new ethers.Wallet(privateKey, provider);
// See ABI Reference for complete function signatures
const factory = new ethers.Contract(
'0xf6B945dBf532D376A475E31be32F51972915B1cc',
['function createWallet(address agent) external payable returns (address)'],
wallet,
);
Check out the Guides for complete code examples.
Contributing
Interested in contributing to the SDK? Check our GitHub or reach out on Twitter.