iota_coins
Retrieve coin objects for an address to estimate gas costs and query token balances on the IOTA blockchain.
Instructions
Get coin objects for an address (useful for gas estimation and token queries)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Owner address (0x...) | |
| coin_type | No | Coin type (default: 0x2::iota::IOTA) |
Implementation Reference
- src/index.ts:285-294 (handler)The `iota_coins` tool is registered using `server.tool`. The handler directly executes an RPC call `iota_getCoins` to retrieve coin objects for a given address.
server.tool( "iota_coins", "Get coin objects for an address (useful for gas estimation and token queries)", { address: z.string().describe("Owner address (0x...)"), coin_type: z.string().optional().describe("Coin type (default: 0x2::iota::IOTA)"), }, async ({ address, coin_type }) => text(await rpc("iota_getCoins", [address, coin_type || null, null, 10])) );