A pragmatic Starknet (Sepolia-first) CLI for:
- Swaps via AVNU
- Demo lending pool flows
- x402 paywalled HTTP requests (client-side)
- Deploy/test demo ERC20 + ERC721 (NFT) contracts
- A simple
.clawname registry (StarknetID-like MVP for Sepolia)
This is prototype tooling for Starknet Sepolia.
Install globally from npm:
npm install -g @openclawchain/claw-strk
# or
pnpm add -g @openclawchain/claw-strkThen run:
claw-strk --helpThe CLI loads env in this order:
--env <path>./.env~/.claw-strk/.env
Minimum required:
STARKNET_ACCOUNT_ADDRESS=0x...
STARKNET_PRIVATE_KEY=0x...
STARKNET_RPC_URL=https://starknet-sepolia.g.alchemy.com/v2/<key>Optional:
# x402 Server (defaults to OpenClawChain hosted server)
X402_SERVER_URL=https://stark-facilitator.openclawchain.orgCreate a template:
claw-strk initQuote:
claw-strk quote --sell STRK --buy USDC --amount 1Swap:
claw-strk swap --sell STRK --buy USDC --amount 1 --slippage 5List demo pools:
claw-strk lend poolsRun the demo (deposit/borrow/repay/withdraw):
claw-strk lend demoUSDC borrow example (STRK collateral → borrow USDC):
# show pool + price
claw-strk lend pool --pool-id strk-usdc
# deposit 1 STRK as collateral
claw-strk lend deposit --pool-id strk-usdc --amount 1
# borrow a tiny amount of USDC (6 decimals)
claw-strk lend borrow --pool-id strk-usdc --amount 0.005
# repay
claw-strk lend repay --pool-id strk-usdc --amount 0.005
# withdraw collateral
claw-strk lend withdraw --pool-id strk-usdc --amount 1Discover requirements (no payment):
claw-strk x402 discover \
--url https://stark-facilitator.openclawchain.org/api/protected/chainstatusPaywall endpoint example (discover → pay → retry):
claw-strk x402 request \
--url https://stark-facilitator.openclawchain.org/api/protected/chainstatus \
--network sepolia \
--auto-approveNotes:
x402 requestfirst calls the URL normally; if the server replies 402, it reads the required payment details (accepts[0]) and retries withX-PAYMENT.--auto-approvewill approve exactlymaxAmountRequiredto the spender (one-time per amount).- Override spender/facilitator if needed:
claw-strk x402 request \
--url <resource-url> \
--facilitator <facilitator-base-url> \
--spender <spender-address> \
--auto-approveRegister:
claw-strk claw register --name bobio.claw --metadata '{"owner":"bobio"}' --network sepoliaResolve:
claw-strk claw resolve --name bobio.claw --network sepoliaGet full record:
claw-strk claw get --name bobio.claw --network sepoliaCreate:
claw-strk token create --kind mintable --name "Mint Token" --symbol MNT --decimals 6 --initial 0Mint (owner-only):
claw-strk token mint --token <address> --to <address> --amount 100 --decimals 6Create collection:
claw-strk nft create --name "OpenClawMinion" --symbol "CLAW" --network sepoliaMint:
claw-strk nft mint --contract <address> --id 1 --network sepoliaCheck ownership (ERC721 balance_of):
claw-strk nft balance --contract <address>Starknet Sepolia bridged token addresses:
- STRK:
0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d - ETH:
0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7 - USDC:
0x053b40a647cedfca6ca84f542a0fe36736031905a9639a7f19a3c1e66bfd5080 - USDT:
0x02ab8758891e84b968ff11361789070c6b1af2df618d6d2f4a78b0757573c6eb - WBTC:
0x00452bd5c0512a61df7c7be8cfea5e4f893cb40e126bdc40aee6054db955129e - wstETH:
0x030de54c07e57818ae4a1210f2a3018a0b9521b8f8ae5206605684741650ac25 - EKUBO:
0x01fad7c03b2ea7fbef306764e20977f8d4eae6191b3a54e4514cc5fc9d19e569
- Facilitator base:
https://stark-facilitator.openclawchain.org/api/facilitator - Paywalled base:
https://stark-facilitator.openclawchain.org/api/protected - Example resource:
GET /chainstatus - Default spender (facilitator account):
0x04dA15eb06D6D01C4907eb4876Cc29BdeF21A84bD71fB34d0369c83b8744D104
Pool id: strk-usdc
- Registry:
0x183ca728ea9432536ce728416dcb3126373f18a2e5cd46327a90dc2f1f93e15 - Pool:
0x04bdad5b68e73eaa8784a488f02b6ead417a4e5c0472566027908149f115979b
| Feature | Contract | Address |
|---|---|---|
| NFT collection (OpenClawMinion / CLAWSTRK) | MintableERC721 | 0x49782e9d0ce5eb2b1122fdb6de8498a6717389a8ce73768d69c3995c72d1ecd |
.claw registry |
ClawIdRegistry | 0x18fe5d665fe78d1e9032d85c5e3fd6f99492a608d197f4cb048a2246f7d68eb |