Skip to content
Skillpedia
APIs & servers (backend)7.0k · #13688

starknet-wallet

What it does

This skill sets up and operates a Starknet wallet for an AI agent using account abstraction. It is for developers who want an agent to hold tokens and send transfers on Starknet.

When to use it

  • ✓When you want an agent to check balances across several tokens on Starknet.
  • ✓When you need an agent to send a token transfer from its own wallet.
  • ✓When you want session keys to limit what an agent can do with its account.

Skill link

https://github.com/internet-court/internet-court-skill/blob/main/vendored/starknet/starknet-wallet/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/internet-court/internet-court-skill/blob/main/vendored/starknet/starknet-wallet/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Can you set up a Starknet wallet for my agent so it can check balances and send a token transfer?”

5 new skills a week. 1 minute to read.

How it works

The agent sets the RPC address, account address, and keys as environment variables, then uses the wallet tools to check balances, deploy the account, or invoke a contract. Session keys can restrict its permissions.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Starknet Wallet Skill

Manage Starknet wallets for AI agents with native Account Abstraction support.

When to Use

  • Creating, funding, and operating Starknet accounts for agent workflows.
  • Checking balances, sending transfers, managing session keys, or invoking contracts from an agent wallet.

When NOT to Use

  • DeFi-specific routing, staking, or lending flows better covered by starknet-defi.
  • Cairo contract authoring, deployment-only operations, or security auditing.

Quick Start

  1. Install the SDK dependencies and set Starknet RPC/account environment variables.
  2. Use skills catalog to pivot to adjacent modules like DeFi, deployment, or auditing.

Prerequisites

npm install starknet@^8.9.1 @avnu/avnu-sdk@^4.0.1

Environment variables:

STARKNET_RPC_URL=https://starknet-mainnet.g.alchemy.com/v2/YOUR_KEY
STARKNET_ACCOUNT_ADDRESS=0x...
STARKNET_PRIVATE_KEY=0x...
AVNU_BASE_URL=https://starknet.api.avnu.fi (optional)
AVNU_PAYMASTER_URL=https://starknet.paymaster.avnu.fi (optional)
AVNU_PAYMASTER_API_KEY=your_key (optional, for free gas)

Available MCP Tools

The Starknet MCP Server provides these tools for wallet operations:

Tool Purpose Key Features
starknet_get_balance Check single token balance Simple, fast queries
starknet_get_balances Check multiple token balances Batch queries (up to 200 tokens), single RPC call
starknet_transfer Send tokens Supports gasless mode (paymaster)
starknet_call_contract Read contract state Call view functions
starknet_invoke_contract Execute contract functions Write operations, supports gasless
starknet_swap Execute token swaps AVNU integration, best price routing
starknet_get_quote Get swap quotes Price estimation before swap
starknet_register_agent Register agent identity ERC-8004 on-chain identity

Balance Tools Detail

starknet_get_balance (Single Token)

Query balance for one token. Use for simple cases.

Input:

  • token (required): Token symbol (ETH, STRK, USDC, USDT) or contract address
  • address (optional): Wallet address (defaults to agent's address)

Response:

{
  "address": "0x...",
  "token": "ETH",
  "tokenAddress": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
  "balance": "1.5",
  "raw": "1500000000000000000",
  "decimals": 18
}

starknet_get_balances (Multiple Tokens)

Query balances for multiple tokens in a single RPC call. More efficient for portfolio views.

Input:

  • tokens (required): Array of token symbols or addresses (max 200)
  • address (optional): Wallet address

Response:

{
  "address": "0x...",
  "balances": [
    { "token": "ETH", "tokenAddress": "0x...", "balance": "1.5", "raw": "...", "decimals": 18 },
    { "token": "USDC", "tokenAddress": "0x...", "balance": "100", "raw": "...", "decimals": 6 }
  ],
  "tokensQueried": 2,
  "method": "balance_checker"
}

When to use:

  • starknet_get_balance: Quick single-token check
  • starknet_get_balances: Portfolio overview, multi-token operations

Core Operations

Check Balance (Single Token)

Use the starknet_get_balance MCP tool for simple single-token queries:

// Via MCP tool (recommended)
const result = await mcpClient.callTool({
  name: "starknet_get_balance",
  arguments: {
    address: "0x...",  // Account address
    token: "ETH",      // Symbol (ETH, STRK, USDC, USDT) or contract address
  }
});
// Returns: { address, token, tokenAddress, balance, raw, decimals }

Direct starknet.js usage:

import { RpcProvider, Contract } from "starknet";

const provider = new RpcProvider({ nodeUrl: process.env.STARKNET_RPC_URL });

// ETH balance (starknet.js v8 uses options object for Contract)
const ethAddress = "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7";
const ethContract = new Contract({
  abi: erc20Abi,
  address: ethAddress,
  providerOrAccount: provider,
});
const balance = await ethContract.balanceOf(accountAddress);

// starknet.js v8: Convert uint256 to bigint
const balanceBigInt = BigInt(balance.low) + (BigInt(balance.high) << 128n);
// Format: (balanceBigInt / 10n ** 18n).toString() for whole units

Check Multiple Balances (Batch)

Use starknet_get_balances for efficient multi-token queries (single RPC call):

// Via MCP tool (recommended for multi
FAQ

Where do the keys go?

The skill lists the private key as an environment variable, which keeps it out of the code.

Does it cover DeFi actions?

DeFi-specific routing, staking, and lending are covered by the separate Starknet DeFi skill.

What is the optional gas setting?

The skill mentions an AVNU paymaster key for free gas, which is optional.

Details

Original description by the author

Create and manage Starknet wallets for AI agents. Transfer tokens, check balances, manage session keys, deploy accounts, and interact with smart contracts using native Account Abstraction.

repo: internet-court/internet-court-skill

Popularity

GitHub stars
7.0k
Ranking position
#13688
License
—
Updated
10/26/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills