@zerodust/ai-sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # @zerodust/ai-sdk
2
+
3
+ Vercel AI SDK tools for [ZeroDust](https://zerodust.xyz) - sweep native gas tokens to exactly zero.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @zerodust/ai-sdk ai zod
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { createZeroDustTools } from '@zerodust/ai-sdk';
15
+ import { generateText } from 'ai';
16
+ import { openai } from '@ai-sdk/openai';
17
+
18
+ // Create ZeroDust tools
19
+ const tools = createZeroDustTools({ environment: 'mainnet' });
20
+
21
+ // Use with generateText
22
+ const result = await generateText({
23
+ model: openai('gpt-4o'),
24
+ tools,
25
+ prompt: 'Check my balances on 0x1234...',
26
+ });
27
+
28
+ // Or with streamText
29
+ import { streamText } from 'ai';
30
+
31
+ const stream = streamText({
32
+ model: openai('gpt-4o'),
33
+ tools,
34
+ prompt: 'What chains does ZeroDust support?',
35
+ });
36
+ ```
37
+
38
+ ## Available Tools
39
+
40
+ | Tool | Description |
41
+ |------|-------------|
42
+ | `zerodust_info` | Get information about ZeroDust service and fees |
43
+ | `zerodust_get_chains` | List all supported blockchain chains |
44
+ | `zerodust_get_balances` | Check native token balances across all chains |
45
+ | `zerodust_get_quote` | Get a quote for sweeping a chain |
46
+ | `zerodust_get_sweep_status` | Check status of a submitted sweep |
47
+ | `zerodust_list_sweeps` | List past sweeps for an address |
48
+
49
+ ## Configuration
50
+
51
+ ```typescript
52
+ const tools = createZeroDustTools({
53
+ environment: 'mainnet', // or 'testnet'
54
+ apiKey: 'your-api-key', // optional, for higher rate limits
55
+ timeout: 30000, // request timeout in ms
56
+ });
57
+ ```
58
+
59
+ ## License
60
+
61
+ MIT
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @fileoverview Vercel AI SDK tools for ZeroDust
3
+ *
4
+ * Provides Vercel AI SDK-compatible tools for AI agents to interact
5
+ * with ZeroDust - sweep native gas tokens to exactly zero.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * import { createZeroDustTools } from '@zerodust/ai-sdk';
10
+ *
11
+ * const tools = createZeroDustTools({ environment: 'mainnet' });
12
+ * // Use tools with generateText, streamText, etc.
13
+ * ```
14
+ *
15
+ * @packageDocumentation
16
+ */
17
+ export { createZeroDustTools, type ZeroDustToolsConfig } from './tools.js';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @fileoverview Vercel AI SDK tools for ZeroDust
3
+ *
4
+ * Provides Vercel AI SDK-compatible tools for AI agents to interact
5
+ * with ZeroDust - sweep native gas tokens to exactly zero.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * import { createZeroDustTools } from '@zerodust/ai-sdk';
10
+ *
11
+ * const tools = createZeroDustTools({ environment: 'mainnet' });
12
+ * // Use tools with generateText, streamText, etc.
13
+ * ```
14
+ *
15
+ * @packageDocumentation
16
+ */
17
+ export { createZeroDustTools } from './tools.js';
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,mBAAmB,EAA4B,MAAM,YAAY,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @fileoverview Vercel AI SDK tool definitions for ZeroDust
3
+ */
4
+ import { type CoreTool } from 'ai';
5
+ import { type ZeroDustConfig } from '@zerodust/sdk';
6
+ export interface ZeroDustToolsConfig extends ZeroDustConfig {
7
+ }
8
+ /**
9
+ * Create all ZeroDust tools for the Vercel AI SDK
10
+ *
11
+ * @param config - ZeroDust SDK configuration
12
+ * @returns Record of tool name to CoreTool, for use with generateText/streamText
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * import { createZeroDustTools } from '@zerodust/ai-sdk';
17
+ * import { generateText } from 'ai';
18
+ * import { openai } from '@ai-sdk/openai';
19
+ *
20
+ * const tools = createZeroDustTools({ environment: 'mainnet' });
21
+ *
22
+ * const result = await generateText({
23
+ * model: openai('gpt-4o'),
24
+ * tools,
25
+ * prompt: 'Check balances for 0x1234...',
26
+ * });
27
+ * ```
28
+ */
29
+ export declare function createZeroDustTools(config?: ZeroDustToolsConfig): Record<string, CoreTool>;
30
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,IAAI,CAAC;AAEzC,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAE9D,MAAM,WAAW,mBAAoB,SAAQ,cAAc;CAAG;AAI9D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,GAAE,mBAAwB,GAC/B,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAwM1B"}
package/dist/tools.js ADDED
@@ -0,0 +1,207 @@
1
+ /**
2
+ * @fileoverview Vercel AI SDK tool definitions for ZeroDust
3
+ */
4
+ import { tool } from 'ai';
5
+ import { z } from 'zod';
6
+ import { ZeroDust } from '@zerodust/sdk';
7
+ const ETH_ADDRESS_REGEX = /^0x[a-fA-F0-9]{40}$/;
8
+ /**
9
+ * Create all ZeroDust tools for the Vercel AI SDK
10
+ *
11
+ * @param config - ZeroDust SDK configuration
12
+ * @returns Record of tool name to CoreTool, for use with generateText/streamText
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * import { createZeroDustTools } from '@zerodust/ai-sdk';
17
+ * import { generateText } from 'ai';
18
+ * import { openai } from '@ai-sdk/openai';
19
+ *
20
+ * const tools = createZeroDustTools({ environment: 'mainnet' });
21
+ *
22
+ * const result = await generateText({
23
+ * model: openai('gpt-4o'),
24
+ * tools,
25
+ * prompt: 'Check balances for 0x1234...',
26
+ * });
27
+ * ```
28
+ */
29
+ export function createZeroDustTools(config = {}) {
30
+ const client = new ZeroDust(config);
31
+ return {
32
+ zerodust_info: tool({
33
+ description: 'Get information about ZeroDust service, including what it does, fee structure, and how to use it. Use this tool when the user asks about ZeroDust or needs to understand the service.',
34
+ parameters: z.object({}),
35
+ execute: async () => {
36
+ return {
37
+ name: 'ZeroDust',
38
+ tagline: 'Sweep native gas tokens to exactly zero',
39
+ description: 'ZeroDust sweeps 100% of native gas tokens (ETH, BNB, POL, etc.) from any supported EVM chain, leaving exactly zero balance. Funds are sent to any address on the same or a different chain.',
40
+ howItWorks: [
41
+ 'User signs an EIP-7702 authorization (delegates their EOA temporarily)',
42
+ 'User signs an EIP-712 sweep intent (specifies destination and limits)',
43
+ "ZeroDust's relayer executes the sweep atomically",
44
+ "User's balance goes to exactly zero, funds arrive at destination",
45
+ 'Delegation is automatically revoked after sweep',
46
+ ],
47
+ fees: {
48
+ freeTier: 'No service fee for sweeps under $1',
49
+ standard: '1% service fee (min $0.05, max $0.50)',
50
+ gas: 'Paid by relayer, reimbursed from swept amount',
51
+ guarantee: 'Users always receive the quoted amount or more',
52
+ },
53
+ supportedChains: '25+ EVM chains including Ethereum, Arbitrum, Base, Optimism, Polygon, BSC, Gnosis, and more',
54
+ integration: {
55
+ sdk: 'npm install @zerodust/sdk viem',
56
+ api: 'POST /quote, POST /sweep, GET /sweep/:id/status',
57
+ mcp: '@zerodust/mcp-server (stdio transport)',
58
+ langchain: '@zerodust/langchain',
59
+ vercelAiSdk: '@zerodust/ai-sdk',
60
+ },
61
+ };
62
+ },
63
+ }),
64
+ zerodust_get_chains: tool({
65
+ description: 'Get a list of all blockchain chains supported by ZeroDust for sweeping native gas tokens. Returns chain IDs, names, native tokens, and whether they are enabled.',
66
+ parameters: z.object({}),
67
+ execute: async () => {
68
+ const chains = await client.getChains();
69
+ const enabled = chains.filter((c) => c.enabled);
70
+ return {
71
+ count: enabled.length,
72
+ chains: enabled.map((c) => ({
73
+ chainId: c.chainId,
74
+ name: c.name,
75
+ nativeToken: c.nativeToken,
76
+ })),
77
+ };
78
+ },
79
+ }),
80
+ zerodust_get_balances: tool({
81
+ description: 'Check native gas token balances across all supported chains for a wallet address. Shows which chains have sweepable balances.',
82
+ parameters: z.object({
83
+ address: z
84
+ .string()
85
+ .regex(ETH_ADDRESS_REGEX)
86
+ .describe('Ethereum wallet address (0x...)'),
87
+ }),
88
+ execute: async ({ address }) => {
89
+ const data = await client.getBalances(address);
90
+ const sweepable = data.chains.filter((b) => b.canSweep);
91
+ const nonZero = data.chains.filter((b) => b.balance !== '0' && !b.canSweep);
92
+ return {
93
+ sweepable: sweepable.map((b) => ({
94
+ chainId: b.chainId,
95
+ name: b.name,
96
+ nativeToken: b.nativeToken,
97
+ balance: b.balanceFormatted,
98
+ })),
99
+ tooSmall: nonZero.map((b) => ({
100
+ chainId: b.chainId,
101
+ name: b.name,
102
+ nativeToken: b.nativeToken,
103
+ balance: b.balanceFormatted,
104
+ })),
105
+ };
106
+ },
107
+ }),
108
+ zerodust_get_quote: tool({
109
+ description: 'Get a quote for sweeping native gas tokens from one chain. Returns the estimated amount the user will receive, fee breakdown, and a quote ID. Quotes expire in 60 seconds.',
110
+ parameters: z.object({
111
+ fromChainId: z
112
+ .number()
113
+ .int()
114
+ .positive()
115
+ .describe('Source chain ID to sweep from'),
116
+ toChainId: z
117
+ .number()
118
+ .int()
119
+ .positive()
120
+ .describe('Destination chain ID to receive funds'),
121
+ userAddress: z
122
+ .string()
123
+ .regex(ETH_ADDRESS_REGEX)
124
+ .describe("User's wallet address to sweep from"),
125
+ destination: z
126
+ .string()
127
+ .regex(ETH_ADDRESS_REGEX)
128
+ .describe('Destination address to receive swept funds'),
129
+ }),
130
+ execute: async ({ fromChainId, toChainId, userAddress, destination, }) => {
131
+ const data = await client.getQuote({
132
+ fromChainId,
133
+ toChainId,
134
+ userAddress: userAddress,
135
+ destination: destination,
136
+ });
137
+ return {
138
+ quoteId: data.quoteId,
139
+ userBalance: data.userBalance,
140
+ estimatedReceive: data.estimatedReceive,
141
+ mode: data.mode === 0 ? 'same-chain' : 'cross-chain',
142
+ maxTotalFee: data.fees.maxTotalFeeWei,
143
+ validForSeconds: data.validForSeconds,
144
+ note: 'To execute this sweep, the user must sign the EIP-712 typed data and EIP-7702 authorization using the SDK.',
145
+ };
146
+ },
147
+ }),
148
+ zerodust_get_sweep_status: tool({
149
+ description: 'Check the status of a previously submitted sweep. Returns the current status (pending, simulating, executing, bridging, completed, failed), transaction hash if available, and error messages if failed.',
150
+ parameters: z.object({
151
+ sweepId: z
152
+ .string()
153
+ .uuid()
154
+ .describe('The sweep ID returned from submitting a sweep'),
155
+ }),
156
+ execute: async ({ sweepId }) => {
157
+ const data = await client.getSweepStatus(sweepId);
158
+ return {
159
+ sweepId: data.sweepId,
160
+ status: data.status,
161
+ sweepType: data.sweepType,
162
+ fromChainId: data.fromChainId,
163
+ toChainId: data.toChainId,
164
+ destination: data.destination,
165
+ txHash: data.txHash ?? null,
166
+ bridgeTrackingUrl: data.bridgeTrackingUrl ?? null,
167
+ errorMessage: data.errorMessage ?? null,
168
+ };
169
+ },
170
+ }),
171
+ zerodust_list_sweeps: tool({
172
+ description: 'List past sweeps for a wallet address. Shows sweep history with status and amounts.',
173
+ parameters: z.object({
174
+ address: z
175
+ .string()
176
+ .regex(ETH_ADDRESS_REGEX)
177
+ .describe('Wallet address to list sweeps for'),
178
+ limit: z
179
+ .number()
180
+ .int()
181
+ .min(1)
182
+ .max(100)
183
+ .optional()
184
+ .describe('Maximum number of results (default: 10)'),
185
+ }),
186
+ execute: async ({ address, limit }) => {
187
+ const data = await client.getSweeps(address, {
188
+ limit: limit ?? 10,
189
+ });
190
+ return {
191
+ total: data.total,
192
+ sweeps: data.sweeps.map((s) => ({
193
+ sweepId: s.sweepId,
194
+ status: s.status,
195
+ sweepType: s.sweepType,
196
+ fromChainId: s.fromChainId,
197
+ toChainId: s.toChainId,
198
+ amountSent: s.amountSent ?? null,
199
+ txHash: s.txHash ?? null,
200
+ createdAt: s.createdAt,
201
+ })),
202
+ };
203
+ },
204
+ }),
205
+ };
206
+ }
207
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAiB,MAAM,IAAI,CAAC;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAuB,MAAM,eAAe,CAAC;AAI9D,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,mBAAmB,CACjC,SAA8B,EAAE;IAEhC,MAAM,MAAM,GAAG,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEpC,OAAO;QACL,aAAa,EAAE,IAAI,CAAC;YAClB,WAAW,EACT,uLAAuL;YACzL,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;YACxB,OAAO,EAAE,KAAK,IAAI,EAAE;gBAClB,OAAO;oBACL,IAAI,EAAE,UAAU;oBAChB,OAAO,EAAE,yCAAyC;oBAClD,WAAW,EACT,6LAA6L;oBAC/L,UAAU,EAAE;wBACV,wEAAwE;wBACxE,uEAAuE;wBACvE,kDAAkD;wBAClD,kEAAkE;wBAClE,iDAAiD;qBAClD;oBACD,IAAI,EAAE;wBACJ,QAAQ,EAAE,oCAAoC;wBAC9C,QAAQ,EAAE,uCAAuC;wBACjD,GA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AAC,CAAC,WAAW;wBAC1B,SAAS,EAAE,CAAC,CAAC,SAAS;wBACtB,UAAU,EAAE,CAAC,CAAC,UAAU,IAAI,IAAI;wBAChC,MAAM,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI;wBACxB,SAAS,EAAE,CAAC,CAAC,SAAS;qBACvB,CAAC,CAAC;iBACJ,CAAC;YACJ,CAAC;SACF,CAAC;KACH,CAAC;AACJ,CAAC"}
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@zerodust/ai-sdk",
3
+ "version": "0.1.0",
4
+ "description": "Vercel AI SDK tools for ZeroDust - sweep native gas tokens to zero via AI agents",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist",
10
+ "README.md"
11
+ ],
12
+ "scripts": {
13
+ "build": "tsc",
14
+ "dev": "tsc --watch",
15
+ "clean": "rm -rf dist",
16
+ "prepublishOnly": "npm run clean && npm run build"
17
+ },
18
+ "keywords": [
19
+ "zerodust",
20
+ "vercel-ai-sdk",
21
+ "ai-agent",
22
+ "ethereum",
23
+ "eip-7702",
24
+ "sweep",
25
+ "blockchain",
26
+ "tools"
27
+ ],
28
+ "author": "",
29
+ "license": "MIT",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/zerodustxyz/zerodust.git",
33
+ "directory": "packages/ai-sdk"
34
+ },
35
+ "homepage": "https://zerodust.xyz",
36
+ "engines": {
37
+ "node": ">=18"
38
+ },
39
+ "dependencies": {
40
+ "@zerodust/sdk": "^0.1.0"
41
+ },
42
+ "peerDependencies": {
43
+ "ai": ">=3.0.0",
44
+ "zod": ">=3.22.0"
45
+ },
46
+ "devDependencies": {
47
+ "ai": "^4.0.0",
48
+ "@types/node": "^20.11.0",
49
+ "typescript": "^5.3.3",
50
+ "zod": "^3.22.0"
51
+ }
52
+ }