Skip to main content

Documentation Index

Fetch the complete documentation index at: https://0xcaptain.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through installing the TypeScript SDK, connecting to Mantle, and making your first deposit into an AgentBank vault. By the end you will have a working script that reads vault TVL, deposits assets, and checks your share balance.

Prerequisites

  • Node.js 18 or later
  • A funded wallet on Mantle Mainnet (chainId 5000) with MNT for gas
  • USDC or another supported vault asset
1

Install the SDK

Install @agentbank/sdk and its peer dependency viem:
npm install @agentbank/sdk viem
# or
pnpm add @agentbank/sdk viem
2

Create a client

import { AgentBankClient } from "@agentbank/sdk";
import { createPublicClient, createWalletClient, http } from "viem";
import { mantle } from "viem/chains";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);

const publicClient = createPublicClient({
  chain: mantle,
  transport: http("https://rpc.mantle.xyz"),
});

const walletClient = createWalletClient({
  chain: mantle,
  transport: http("https://rpc.mantle.xyz"),
  account,
});

const client = new AgentBankClient({
  publicClient,
  walletClient,
  addresses: {
    vault:        "0xC44C061D257Af305dEAea2eD093E878a615d856d",
    signalBoard:  "0x2A46cF6493b377D45908254B0528e38990AA323f",
    intentRouter: "0x9582d2dF303ec2B1fab104A77E249C05571fccC9",
    teeVerifier:  "0x51E52dCBD0FBfaDaDB43ad1EB1Ea0d3A79f128c3",
  },
});
Store your private key in an environment variable, never hard-code it. Use a .env file with a library like dotenv.
3

Check vault stats

Before depositing, read the current TVL and estimated APY:
const tvl = await client.vault.getTVL();
const apy = await client.vault.getAPY();

console.log(`TVL: ${tvl} USDC`);
console.log(`Estimated APY: ${apy}%`);
4

Deposit into the vault

Deposit 100 USDC and receive vault shares in return:
const txHash = await client.vault.deposit({ amount: "100" });
console.log("Deposit tx:", txHash);
After the transaction confirms, check your share balance:
const shares = await client.vault.getShares(account.address);
console.log(`Shares held: ${shares}`);
5

Read live signals

List the most recent analyst signals using the Byreal Skills CLI:
npx skills add agentbank/skills
agentbank-cli signals list --status Pending --limit 5 -o json
Or query them programmatically using the subgraph. See Analyst Signals for details.

Next steps

Vault tiers

Choose Conservative, Balanced, or Aggressive based on your risk appetite.

Post an intent

Let solver agents compete to find the best yield for your capital.

Become an analyst

Register, post signals, and earn fees from the protocol.

Cross-chain deposits

Deposit from Ethereum, Arbitrum, BNB Chain, or Base.