iota_wallet_address
Retrieve the active wallet address for IOTA blockchain interactions, enabling AI agents to manage wallets and execute transactions securely.
Instructions
Get the active wallet address
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:118-123 (handler)Tool registration for iota_wallet_address calling the wallet helper.
server.tool( "iota_wallet_address", "Get the active wallet address", {}, async () => text(await wallet("/address")) ); - src/index.ts:87-99 (helper)The wallet helper function which communicates with the local wallet server.
async function wallet(path: string, method = "GET", body?: unknown): Promise<string> { try { const opts: RequestInit = { method, headers: { "Content-Type": "application/json" }, }; if (body) opts.body = JSON.stringify(body); const res = await fetch(`${WALLET_SERVER}${path}`, opts); if (!res.ok) return `Wallet server error ${res.status}: ${res.statusText}`; return await res.text(); } catch (err: any) { return `Wallet server unreachable (${WALLET_SERVER}): ${err.message}. Start the agent-wallet server first.`; }