Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dzap.io/llms.txt

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

Tools that don’t fit cleanly into wallet/market/data categories.

SwapLinkGeneratorTool

Generates a deep link to the DZap app pre-filling a swap. Useful when the agent suggests a trade but you want the user to execute via the UI.
const url = await sdk.getTool('SwapLinkGeneratorTool').execute({
  fromChain: 42161,
  srcToken: '0xaf88...',
  destToken: '0x82aF...',
  amount: '1000000',
});
// → 'https://app.dzap.io/swap?...'

BridgeLinkGeneratorTool

Same idea, for cross-chain.
const url = await sdk.getTool('BridgeLinkGeneratorTool').execute({
  fromChain: 42161,
  toChain: 8453,
  srcToken: '0xaf88...',
  destToken: '0x8335...',
  amount: '10000000',
});

SheluderTool

Schedules a recurring task (DCA, periodic balance check, news poll). Backed by SQLite at ~/.dzapai/schedules.db.
await sdk.getTool('SheluderTool').execute({
  name: 'Weekly DCA',
  cron: '0 9 * * MON',                           // crontab format
  query: 'Swap $100 USDC to ETH on Arbitrum',
  account: '0xUser',
});
The scheduler runs in-process when the CLI/SDK is alive. For long-running, use a server-side host.

GetAllSchedulesTool

Lists all scheduled tasks for an account.
const schedules = await sdk.getTool('GetAllSchedulesTool').execute({
  account: '0xUser',
});

RequestChainChangeTool

Signals to the wallet client that the active chain should change. The agent uses this before tools that require a specific chain.
await sdk.getTool('RequestChainChangeTool').execute({
  chainId: 42161,
});

ChangeChainTool

Updates the agent’s internal notion of the current chain (without touching the wallet). Used in pure-read contexts.

When to use directly

Most utility tools are agent-driven. Two exceptions where direct calls win:
  • Link generators in customer-support contexts (“here’s a pre-filled link for the user”).
  • Scheduler when you’re building a UI that lets users browse and edit their own schedules.