@clawnch/clawtomaton 0.4.0 → 0.5.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 +9 -4
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +43 -0
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/prompt.js +1 -1
- package/dist/agent/prompt.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/skills/analyze-market.d.ts.map +1 -1
- package/dist/skills/analyze-market.js +24 -1
- package/dist/skills/analyze-market.js.map +1 -1
- package/dist/skills/index.d.ts +4 -1
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +13 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/liquidity.d.ts +16 -0
- package/dist/skills/liquidity.d.ts.map +1 -0
- package/dist/skills/liquidity.js +358 -0
- package/dist/skills/liquidity.js.map +1 -0
- package/dist/skills/permit2.d.ts +14 -0
- package/dist/skills/permit2.d.ts.map +1 -0
- package/dist/skills/permit2.js +181 -0
- package/dist/skills/permit2.js.map +1 -0
- package/dist/skills/uniswap-swap.d.ts +17 -0
- package/dist/skills/uniswap-swap.d.ts.map +1 -0
- package/dist/skills/uniswap-swap.js +268 -0
- package/dist/skills/uniswap-swap.js.map +1 -0
- package/dist/skills/xmtp.d.ts +15 -9
- package/dist/skills/xmtp.d.ts.map +1 -1
- package/dist/skills/xmtp.js +116 -14
- package/dist/skills/xmtp.js.map +1 -1
- package/dist/xmtp/client.d.ts +48 -0
- package/dist/xmtp/client.d.ts.map +1 -1
- package/dist/xmtp/client.js +175 -3
- package/dist/xmtp/client.js.map +1 -1
- package/dist/xmtp/index.d.ts +1 -1
- package/dist/xmtp/index.d.ts.map +1 -1
- package/dist/xmtp/types.d.ts +22 -1
- package/dist/xmtp/types.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill: uniswap_swap — Direct Uniswap V4 swap via Trading API + on-chain quoter fallback.
|
|
3
|
+
*
|
|
4
|
+
* Two swap paths:
|
|
5
|
+
* 1. Uniswap Trading API (if UNISWAP_API_KEY is set) — hosted aggregation, best prices
|
|
6
|
+
* 2. On-chain V4 Quoter simulation — works without API key, direct V4 pool
|
|
7
|
+
*
|
|
8
|
+
* Supports all 15 Uniswap chains, but defaults to Base (8453).
|
|
9
|
+
*
|
|
10
|
+
* Actions:
|
|
11
|
+
* - swap: Execute a swap via Trading API
|
|
12
|
+
* - quote: Get a quote (price + impact) without executing
|
|
13
|
+
* - deeplink: Generate a Uniswap app deep link for the swap
|
|
14
|
+
*/
|
|
15
|
+
import { UniswapTradingApi, UniswapQuoter, ClawnchSwapper, getUniswapChain, NATIVE_TOKEN_ADDRESS, } from '@clawnch/clawncher-sdk';
|
|
16
|
+
import { parseEther, formatEther } from 'viem';
|
|
17
|
+
export const uniswapSwapSkill = {
|
|
18
|
+
name: 'uniswap_swap',
|
|
19
|
+
description: 'Swap tokens via Uniswap V4 (Trading API or direct V4 pool). ' +
|
|
20
|
+
'Supports quote-only, execute, and deep link generation. ' +
|
|
21
|
+
'Works on all Uniswap-supported chains.',
|
|
22
|
+
parameters: [
|
|
23
|
+
{
|
|
24
|
+
name: 'action',
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'Action: "swap" (execute), "quote" (price check), or "deeplink" (generate link).',
|
|
27
|
+
required: true,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'tokenIn',
|
|
31
|
+
type: 'address',
|
|
32
|
+
description: 'Token to sell. Use "ETH" for native ETH.',
|
|
33
|
+
required: true,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'tokenOut',
|
|
37
|
+
type: 'address',
|
|
38
|
+
description: 'Token to buy.',
|
|
39
|
+
required: true,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'amount',
|
|
43
|
+
type: 'string',
|
|
44
|
+
description: 'Amount to sell in human-readable units (e.g. "0.01" for 0.01 ETH).',
|
|
45
|
+
required: true,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'slippageBps',
|
|
49
|
+
type: 'number',
|
|
50
|
+
description: 'Slippage tolerance in basis points. Default: 50 (0.5%).',
|
|
51
|
+
required: false,
|
|
52
|
+
default: 50,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'chainId',
|
|
56
|
+
type: 'number',
|
|
57
|
+
description: 'Chain ID to trade on. Default: 8453 (Base).',
|
|
58
|
+
required: false,
|
|
59
|
+
default: 8453,
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
execute: async (params, ctx) => {
|
|
63
|
+
const action = params.action.toLowerCase();
|
|
64
|
+
try {
|
|
65
|
+
const { buildClients } = await import('../identity/index.js');
|
|
66
|
+
const rpcUrl = process.env.BASE_RPC_URL ?? 'https://mainnet.base.org';
|
|
67
|
+
const { publicClient, walletClient } = buildClients(ctx.identity, rpcUrl);
|
|
68
|
+
const chainId = params.chainId ?? 8453;
|
|
69
|
+
const apiKey = process.env.UNISWAP_API_KEY;
|
|
70
|
+
// Resolve token addresses
|
|
71
|
+
const resolveToken = (input) => {
|
|
72
|
+
if (input.toUpperCase() === 'ETH' || input === '0x0000000000000000000000000000000000000000') {
|
|
73
|
+
return NATIVE_TOKEN_ADDRESS;
|
|
74
|
+
}
|
|
75
|
+
return input;
|
|
76
|
+
};
|
|
77
|
+
const tokenIn = resolveToken(params.tokenIn);
|
|
78
|
+
const tokenOut = resolveToken(params.tokenOut);
|
|
79
|
+
const amountStr = params.amount;
|
|
80
|
+
const slippageBps = params.slippageBps ?? 50;
|
|
81
|
+
// Parse amount (assume 18 decimals for now — ETH/token)
|
|
82
|
+
const sellAmount = parseEther(amountStr);
|
|
83
|
+
if (action === 'deeplink') {
|
|
84
|
+
// Generate Uniswap app deep link — no wallet needed
|
|
85
|
+
const trading = new UniswapTradingApi({
|
|
86
|
+
wallet: walletClient,
|
|
87
|
+
publicClient: publicClient,
|
|
88
|
+
chainId,
|
|
89
|
+
apiKey,
|
|
90
|
+
slippageBps,
|
|
91
|
+
});
|
|
92
|
+
const link = trading.getSwapDeepLink({
|
|
93
|
+
tokenIn,
|
|
94
|
+
tokenOut,
|
|
95
|
+
amount: sellAmount,
|
|
96
|
+
});
|
|
97
|
+
return {
|
|
98
|
+
callId: '',
|
|
99
|
+
success: true,
|
|
100
|
+
result: `Uniswap deep link:\n${link}`,
|
|
101
|
+
metadata: { deeplink: link },
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
if (action === 'quote') {
|
|
105
|
+
// Try Trading API first, fall back to on-chain quoter
|
|
106
|
+
if (apiKey) {
|
|
107
|
+
const trading = new UniswapTradingApi({
|
|
108
|
+
wallet: walletClient,
|
|
109
|
+
publicClient: publicClient,
|
|
110
|
+
chainId,
|
|
111
|
+
apiKey,
|
|
112
|
+
slippageBps,
|
|
113
|
+
});
|
|
114
|
+
const quote = await trading.getQuote({
|
|
115
|
+
tokenIn,
|
|
116
|
+
tokenOut,
|
|
117
|
+
amount: sellAmount,
|
|
118
|
+
});
|
|
119
|
+
const lines = [
|
|
120
|
+
`Uniswap V4 Quote (Trading API):`,
|
|
121
|
+
`Quoted output: ${formatEther(quote.quoteAmount)}`,
|
|
122
|
+
`Price impact: ${(quote.priceImpact * 100).toFixed(3)}%`,
|
|
123
|
+
`Route: ${quote.routeDescription}`,
|
|
124
|
+
`Gas estimate: ${quote.gasEstimate.toString()}`,
|
|
125
|
+
];
|
|
126
|
+
return {
|
|
127
|
+
callId: '',
|
|
128
|
+
success: true,
|
|
129
|
+
result: lines.join('\n'),
|
|
130
|
+
metadata: {
|
|
131
|
+
quoteAmount: quote.quoteAmount.toString(),
|
|
132
|
+
priceImpact: quote.priceImpact,
|
|
133
|
+
route: quote.routeDescription,
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
// Fallback: on-chain V4 Quoter with Clawnch-aware pool discovery
|
|
138
|
+
const quoter = new UniswapQuoter({
|
|
139
|
+
publicClient: publicClient,
|
|
140
|
+
chainId,
|
|
141
|
+
});
|
|
142
|
+
const chain = getUniswapChain(chainId);
|
|
143
|
+
if (!chain) {
|
|
144
|
+
return { callId: '', success: false, result: null, error: `Chain ${chainId} not supported` };
|
|
145
|
+
}
|
|
146
|
+
// Determine the non-ETH token and direction
|
|
147
|
+
const targetToken = (tokenOut === NATIVE_TOKEN_ADDRESS
|
|
148
|
+
? tokenIn : tokenOut);
|
|
149
|
+
const direction = (tokenIn === NATIVE_TOKEN_ADDRESS ||
|
|
150
|
+
params.tokenIn.toUpperCase() === 'ETH')
|
|
151
|
+
? 'buy' : 'sell';
|
|
152
|
+
// Auto-discovers hook address for Clawnch tokens (reads LP locker)
|
|
153
|
+
const quote = await quoter.quoteClawnchToken(targetToken, sellAmount, direction);
|
|
154
|
+
// Also try 0x quote for comparison if available
|
|
155
|
+
let comparison = '';
|
|
156
|
+
try {
|
|
157
|
+
const swapper = new ClawnchSwapper({
|
|
158
|
+
wallet: walletClient,
|
|
159
|
+
publicClient: publicClient,
|
|
160
|
+
network: 'mainnet',
|
|
161
|
+
});
|
|
162
|
+
const zxPrice = await swapper.getPrice({
|
|
163
|
+
sellToken: tokenIn,
|
|
164
|
+
buyToken: tokenOut,
|
|
165
|
+
sellAmount,
|
|
166
|
+
slippageBps: slippageBps,
|
|
167
|
+
});
|
|
168
|
+
const zxOutput = formatEther(zxPrice.buyAmount);
|
|
169
|
+
const v4Output = formatEther(quote.quotedAmount);
|
|
170
|
+
const diff = ((Number(v4Output) - Number(zxOutput)) / Number(zxOutput) * 100);
|
|
171
|
+
comparison = `\n0x quote: ${zxOutput} (${diff > 0 ? '+' : ''}${diff.toFixed(2)}% vs V4)`;
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
// 0x comparison is best-effort
|
|
175
|
+
}
|
|
176
|
+
const lines = [
|
|
177
|
+
`Uniswap V4 Quote (on-chain, Clawnch-aware):`,
|
|
178
|
+
`Quoted output: ${formatEther(quote.quotedAmount)}`,
|
|
179
|
+
`Price impact: ${quote.priceImpact !== null ? `${(quote.priceImpact * 100).toFixed(3)}%` : 'unknown'}`,
|
|
180
|
+
`Gas estimate: ${quote.gasEstimate.toString()}`,
|
|
181
|
+
`Hook: ${quote.poolKey.hooks}`,
|
|
182
|
+
comparison,
|
|
183
|
+
].filter(Boolean);
|
|
184
|
+
return {
|
|
185
|
+
callId: '',
|
|
186
|
+
success: true,
|
|
187
|
+
result: lines.join('\n'),
|
|
188
|
+
metadata: {
|
|
189
|
+
quoteAmount: quote.quotedAmount.toString(),
|
|
190
|
+
priceImpact: quote.priceImpact,
|
|
191
|
+
hookAddress: quote.poolKey.hooks,
|
|
192
|
+
isClawnchToken: quote.poolKey.hooks !== '0x0000000000000000000000000000000000000000',
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
if (action === 'swap') {
|
|
197
|
+
if (!apiKey) {
|
|
198
|
+
return {
|
|
199
|
+
callId: '',
|
|
200
|
+
success: false,
|
|
201
|
+
result: null,
|
|
202
|
+
error: 'UNISWAP_API_KEY required for swap execution via Trading API. ' +
|
|
203
|
+
'Use action="quote" for on-chain price checks, or set the env var.',
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
const trading = new UniswapTradingApi({
|
|
207
|
+
wallet: walletClient,
|
|
208
|
+
publicClient: publicClient,
|
|
209
|
+
chainId,
|
|
210
|
+
apiKey,
|
|
211
|
+
slippageBps,
|
|
212
|
+
});
|
|
213
|
+
const result = await trading.swap({
|
|
214
|
+
tokenIn,
|
|
215
|
+
tokenOut,
|
|
216
|
+
amount: sellAmount,
|
|
217
|
+
});
|
|
218
|
+
const chain = getUniswapChain(chainId);
|
|
219
|
+
const lines = [
|
|
220
|
+
`Uniswap V4 swap complete!`,
|
|
221
|
+
`Sold: ${amountStr}`,
|
|
222
|
+
`Received: ${formatEther(result.quoteAmount)} (quoted)`,
|
|
223
|
+
`TX: ${result.txHash}`,
|
|
224
|
+
`Gas used: ${result.gasUsed.toString()}`,
|
|
225
|
+
`Explorer: ${chain?.explorer}/tx/${result.txHash}`,
|
|
226
|
+
];
|
|
227
|
+
// Structured metadata for trade recording in handleSkillSideEffects
|
|
228
|
+
const isETHSell = tokenIn === NATIVE_TOKEN_ADDRESS || params.tokenIn.toUpperCase() === 'ETH';
|
|
229
|
+
const isETHBuy = tokenOut === NATIVE_TOKEN_ADDRESS || params.tokenOut.toUpperCase() === 'ETH';
|
|
230
|
+
return {
|
|
231
|
+
callId: '',
|
|
232
|
+
success: true,
|
|
233
|
+
result: lines.join('\n'),
|
|
234
|
+
metadata: {
|
|
235
|
+
txHash: result.txHash,
|
|
236
|
+
quoteAmount: result.quoteAmount.toString(),
|
|
237
|
+
gasUsed: result.gasUsed.toString(),
|
|
238
|
+
// Trade recording fields (consumed by agent heartbeat)
|
|
239
|
+
trade: {
|
|
240
|
+
sellToken: params.tokenIn,
|
|
241
|
+
buyToken: params.tokenOut,
|
|
242
|
+
sellAmount: amountStr,
|
|
243
|
+
buyAmount: formatEther(result.quoteAmount),
|
|
244
|
+
isETHSell,
|
|
245
|
+
isETHBuy,
|
|
246
|
+
source: 'uniswap_v4',
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
return {
|
|
252
|
+
callId: '',
|
|
253
|
+
success: false,
|
|
254
|
+
result: null,
|
|
255
|
+
error: `Unknown action "${action}". Use "swap", "quote", or "deeplink".`,
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
catch (err) {
|
|
259
|
+
return {
|
|
260
|
+
callId: '',
|
|
261
|
+
success: false,
|
|
262
|
+
result: null,
|
|
263
|
+
error: err instanceof Error ? err.message : String(err),
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
};
|
|
268
|
+
//# sourceMappingURL=uniswap-swap.js.map
|
|
@@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I,CAAC;oBACxB,QAAQ,EAAE;wBACR,MAAM,EAAE,MAAM,CAAC,MAAM;wBACrB,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE;wBAC1C,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE;wBAClC,uDAAuD;wBACvD,KAAK,EAAE;4BACL,SAAS,EAAE,MAAM,CAAC,OAAiB;4BACnC,QAAQ,EAAE,MAAM,CAAC,QAAkB;4BACnC,UAAU,EAAE,SAAS;4BACrB,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC;4BAC1C,SAAS;4BACT,QAAQ;4BACR,MAAM,EAAE,YAAY;yBACrB;qBACF;iBACF,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,MAAM,EAAE,EAAE;gBACV,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,IAAI;gBACZ,KAAK,EAAE,mBAAmB,MAAM,wCAAwC;aACzE,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,MAAM,EAAE,EAAE;gBACV,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,IAAI;gBACZ,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;aACxD,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
package/dist/skills/xmtp.d.ts
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* XMTP skill — encrypted messaging via the XMTP protocol.
|
|
2
|
+
* XMTP skill — encrypted messaging and payments via the XMTP protocol.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* - send_message:
|
|
6
|
-
* - send_dm:
|
|
7
|
-
* - read_messages:
|
|
8
|
-
* - list_convos:
|
|
9
|
-
* - check_inbox:
|
|
10
|
-
* - reply:
|
|
4
|
+
* Messaging actions:
|
|
5
|
+
* - send_message: Send a text message to a conversation by ID
|
|
6
|
+
* - send_dm: Send a DM to an Ethereum address (creates convo if needed)
|
|
7
|
+
* - read_messages: Read recent messages from a conversation
|
|
8
|
+
* - list_convos: List recent conversations with previews
|
|
9
|
+
* - check_inbox: Check for unread messages in the queue
|
|
10
|
+
* - reply: Reply to the most recent message in a conversation
|
|
11
|
+
*
|
|
12
|
+
* Payment actions:
|
|
13
|
+
* - request_eth: Request an ETH payment from user via wallet_sendCalls
|
|
14
|
+
* - request_token: Request an ERC-20 token payment via wallet_sendCalls
|
|
15
|
+
* - share_tx: Share a confirmed transaction hash in a conversation
|
|
16
|
+
* - check_token_balance: Check an ERC-20 token balance for an address
|
|
11
17
|
*
|
|
12
18
|
* The XMTP client is managed by the agent runtime (started at boot,
|
|
13
19
|
* available via `ctx.xmtpClient`). This skill is the agent's interface
|
|
14
|
-
* to send/read messages.
|
|
20
|
+
* to send/read messages and handle payments.
|
|
15
21
|
*/
|
|
16
22
|
import type { SkillDefinition } from '../types.js';
|
|
17
23
|
export declare const xmtpSkill: SkillDefinition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xmtp.d.ts","sourceRoot":"","sources":["../../src/skills/xmtp.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"xmtp.d.ts","sourceRoot":"","sources":["../../src/skills/xmtp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAA4B,MAAM,aAAa,CAAC;AAO7E,eAAO,MAAM,SAAS,EAAE,eAoRvB,CAAC"}
|
package/dist/skills/xmtp.js
CHANGED
|
@@ -1,41 +1,47 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* XMTP skill — encrypted messaging via the XMTP protocol.
|
|
2
|
+
* XMTP skill — encrypted messaging and payments via the XMTP protocol.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* - send_message:
|
|
6
|
-
* - send_dm:
|
|
7
|
-
* - read_messages:
|
|
8
|
-
* - list_convos:
|
|
9
|
-
* - check_inbox:
|
|
10
|
-
* - reply:
|
|
4
|
+
* Messaging actions:
|
|
5
|
+
* - send_message: Send a text message to a conversation by ID
|
|
6
|
+
* - send_dm: Send a DM to an Ethereum address (creates convo if needed)
|
|
7
|
+
* - read_messages: Read recent messages from a conversation
|
|
8
|
+
* - list_convos: List recent conversations with previews
|
|
9
|
+
* - check_inbox: Check for unread messages in the queue
|
|
10
|
+
* - reply: Reply to the most recent message in a conversation
|
|
11
|
+
*
|
|
12
|
+
* Payment actions:
|
|
13
|
+
* - request_eth: Request an ETH payment from user via wallet_sendCalls
|
|
14
|
+
* - request_token: Request an ERC-20 token payment via wallet_sendCalls
|
|
15
|
+
* - share_tx: Share a confirmed transaction hash in a conversation
|
|
16
|
+
* - check_token_balance: Check an ERC-20 token balance for an address
|
|
11
17
|
*
|
|
12
18
|
* The XMTP client is managed by the agent runtime (started at boot,
|
|
13
19
|
* available via `ctx.xmtpClient`). This skill is the agent's interface
|
|
14
|
-
* to send/read messages.
|
|
20
|
+
* to send/read messages and handle payments.
|
|
15
21
|
*/
|
|
16
22
|
// ============================================================================
|
|
17
23
|
// Skill Definition
|
|
18
24
|
// ============================================================================
|
|
19
25
|
export const xmtpSkill = {
|
|
20
26
|
name: 'xmtp',
|
|
21
|
-
description: '
|
|
27
|
+
description: 'Encrypted messaging and payments via XMTP. Discoverable on Base App, World App, and xmtp.chat. Messaging: send_message, send_dm, read_messages, list_convos, check_inbox, reply. Payments: request_eth, request_token, share_tx, check_token_balance.',
|
|
22
28
|
parameters: [
|
|
23
29
|
{
|
|
24
30
|
name: 'action',
|
|
25
31
|
type: 'string',
|
|
26
|
-
description: 'Action: send_message | send_dm | read_messages | list_convos | check_inbox | reply',
|
|
32
|
+
description: 'Action: send_message | send_dm | read_messages | list_convos | check_inbox | reply | request_eth | request_token | share_tx | check_token_balance',
|
|
27
33
|
required: true,
|
|
28
34
|
},
|
|
29
35
|
{
|
|
30
36
|
name: 'conversationId',
|
|
31
37
|
type: 'string',
|
|
32
|
-
description: 'Conversation ID (for send_message, read_messages, reply)',
|
|
38
|
+
description: 'Conversation ID (for send_message, read_messages, reply, request_eth, request_token, share_tx)',
|
|
33
39
|
required: false,
|
|
34
40
|
},
|
|
35
41
|
{
|
|
36
42
|
name: 'address',
|
|
37
43
|
type: 'address',
|
|
38
|
-
description: 'Ethereum address
|
|
44
|
+
description: 'Ethereum address (for send_dm, check_token_balance)',
|
|
39
45
|
required: false,
|
|
40
46
|
},
|
|
41
47
|
{
|
|
@@ -44,6 +50,30 @@ export const xmtpSkill = {
|
|
|
44
50
|
description: 'Text message to send (for send_message, send_dm, reply)',
|
|
45
51
|
required: false,
|
|
46
52
|
},
|
|
53
|
+
{
|
|
54
|
+
name: 'amount',
|
|
55
|
+
type: 'string',
|
|
56
|
+
description: 'Amount in human-readable form, e.g. "0.01" for ETH or "100" for tokens (for request_eth, request_token)',
|
|
57
|
+
required: false,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'tokenAddress',
|
|
61
|
+
type: 'address',
|
|
62
|
+
description: 'ERC-20 token contract address (for request_token, check_token_balance)',
|
|
63
|
+
required: false,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'txHash',
|
|
67
|
+
type: 'string',
|
|
68
|
+
description: 'Transaction hash to share (for share_tx)',
|
|
69
|
+
required: false,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'description',
|
|
73
|
+
type: 'string',
|
|
74
|
+
description: 'Human-readable description for payment request (for request_eth, request_token)',
|
|
75
|
+
required: false,
|
|
76
|
+
},
|
|
47
77
|
{
|
|
48
78
|
name: 'limit',
|
|
49
79
|
type: 'number',
|
|
@@ -162,12 +192,84 @@ export const xmtpSkill = {
|
|
|
162
192
|
result: `Reply sent to conversation ${conversationId}`,
|
|
163
193
|
};
|
|
164
194
|
}
|
|
195
|
+
// =================================================================
|
|
196
|
+
// Payment actions
|
|
197
|
+
// =================================================================
|
|
198
|
+
case 'request_eth': {
|
|
199
|
+
const conversationId = params.conversationId;
|
|
200
|
+
const amountStr = params.amount;
|
|
201
|
+
const description = params.description ?? 'ETH payment request';
|
|
202
|
+
if (!conversationId || !amountStr) {
|
|
203
|
+
return { callId, success: false, result: null, error: 'request_eth requires conversationId and amount (in ETH, e.g. "0.01")' };
|
|
204
|
+
}
|
|
205
|
+
const amountWei = BigInt(Math.round(parseFloat(amountStr) * 1e18));
|
|
206
|
+
if (amountWei <= 0n) {
|
|
207
|
+
return { callId, success: false, result: null, error: 'amount must be positive' };
|
|
208
|
+
}
|
|
209
|
+
await xmtpClient.requestEthPayment(conversationId, amountWei, description);
|
|
210
|
+
return {
|
|
211
|
+
callId,
|
|
212
|
+
success: true,
|
|
213
|
+
result: `ETH payment request sent: ${amountStr} ETH. The user's wallet will prompt them to approve.`,
|
|
214
|
+
metadata: { conversationId, amount: amountStr, currency: 'ETH' },
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
case 'request_token': {
|
|
218
|
+
const conversationId = params.conversationId;
|
|
219
|
+
const amountStr = params.amount;
|
|
220
|
+
const tokenAddress = params.tokenAddress;
|
|
221
|
+
const description = params.description ?? 'Token payment request';
|
|
222
|
+
if (!conversationId || !amountStr || !tokenAddress) {
|
|
223
|
+
return { callId, success: false, result: null, error: 'request_token requires conversationId, amount, and tokenAddress' };
|
|
224
|
+
}
|
|
225
|
+
// Get token decimals to convert human-readable amount to raw
|
|
226
|
+
const { decimals } = await xmtpClient.getTokenBalance(tokenAddress, xmtpClient.getAddress());
|
|
227
|
+
const rawAmount = BigInt(Math.round(parseFloat(amountStr) * (10 ** decimals)));
|
|
228
|
+
if (rawAmount <= 0n) {
|
|
229
|
+
return { callId, success: false, result: null, error: 'amount must be positive' };
|
|
230
|
+
}
|
|
231
|
+
await xmtpClient.requestTokenPayment(conversationId, tokenAddress, rawAmount, description);
|
|
232
|
+
return {
|
|
233
|
+
callId,
|
|
234
|
+
success: true,
|
|
235
|
+
result: `Token payment request sent: ${amountStr} of ${tokenAddress} (${decimals} decimals). User's wallet will prompt approval.`,
|
|
236
|
+
metadata: { conversationId, amount: amountStr, tokenAddress },
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
case 'share_tx': {
|
|
240
|
+
const conversationId = params.conversationId;
|
|
241
|
+
const txHash = params.txHash;
|
|
242
|
+
if (!conversationId || !txHash) {
|
|
243
|
+
return { callId, success: false, result: null, error: 'share_tx requires conversationId and txHash' };
|
|
244
|
+
}
|
|
245
|
+
await xmtpClient.sendTransactionReference(conversationId, txHash);
|
|
246
|
+
return {
|
|
247
|
+
callId,
|
|
248
|
+
success: true,
|
|
249
|
+
result: `Transaction reference shared: ${txHash}`,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
case 'check_token_balance': {
|
|
253
|
+
const tokenAddress = params.tokenAddress;
|
|
254
|
+
const address = params.address;
|
|
255
|
+
if (!tokenAddress || !address) {
|
|
256
|
+
return { callId, success: false, result: null, error: 'check_token_balance requires tokenAddress and address' };
|
|
257
|
+
}
|
|
258
|
+
const { balance, decimals } = await xmtpClient.getTokenBalance(tokenAddress, address);
|
|
259
|
+
const formatted = Number(balance) / (10 ** decimals);
|
|
260
|
+
return {
|
|
261
|
+
callId,
|
|
262
|
+
success: true,
|
|
263
|
+
result: `Balance: ${formatted} (raw: ${balance.toString()}, decimals: ${decimals})`,
|
|
264
|
+
metadata: { tokenAddress, address, balance: balance.toString(), decimals },
|
|
265
|
+
};
|
|
266
|
+
}
|
|
165
267
|
default:
|
|
166
268
|
return {
|
|
167
269
|
callId,
|
|
168
270
|
success: false,
|
|
169
271
|
result: null,
|
|
170
|
-
error: `Unknown action: ${action}.
|
|
272
|
+
error: `Unknown action: ${action}. Messaging: send_message, send_dm, read_messages, list_convos, check_inbox, reply. Payments: request_eth, request_token, share_tx, check_token_balance`,
|
|
171
273
|
};
|
|
172
274
|
}
|
|
173
275
|
}
|
package/dist/skills/xmtp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xmtp.js","sourceRoot":"","sources":["../../src/skills/xmtp.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"xmtp.js","sourceRoot":"","sources":["../../src/skills/xmtp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAKH,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,SAAS,GAAoB;IACxC,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,uPAAuP;IACpQ,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,mJAAmJ;YAChK,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,gGAAgG;YAC7G,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,qDAAqD;YAClE,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yDAAyD;YACtE,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yGAAyG;YACtH,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,wEAAwE;YACrF,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EAA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AAO,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE;qBAC3E,CAAC;gBACJ,CAAC;gBAED;oBACE,OAAO;wBACL,MAAM;wBACN,OAAO,EAAE,KAAK;wBACd,MAAM,EAAE,IAAI;wBACZ,KAAK,EAAE,mBAAmB,MAAM,yJAAyJ;qBAC1L,CAAC;YACN,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC7D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,GAAG,EAAE,EAAE,CAAC;QAC/E,CAAC;IACH,CAAC;CACF,CAAC"}
|
package/dist/xmtp/client.d.ts
CHANGED
|
@@ -63,6 +63,54 @@ export declare class XmtpClient {
|
|
|
63
63
|
* Get recent messages from a specific conversation.
|
|
64
64
|
*/
|
|
65
65
|
getConversationHistory(conversationId: string, limit?: number): Promise<XmtpMessage[]>;
|
|
66
|
+
/**
|
|
67
|
+
* Request an ETH payment from a user via wallet_sendCalls.
|
|
68
|
+
* The user's wallet app prompts them to approve the transfer.
|
|
69
|
+
*
|
|
70
|
+
* @param conversationId - The conversation to send the request in
|
|
71
|
+
* @param amount - Amount in wei (bigint)
|
|
72
|
+
* @param description - Human-readable description shown in the wallet prompt
|
|
73
|
+
* @param chainId - Chain ID (default: 8453 for Base)
|
|
74
|
+
*/
|
|
75
|
+
requestEthPayment(conversationId: string, amount: bigint, description: string, chainId?: number): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Request an ERC-20 token payment from a user via wallet_sendCalls.
|
|
78
|
+
*
|
|
79
|
+
* @param conversationId - The conversation to send the request in
|
|
80
|
+
* @param tokenAddress - ERC-20 contract address
|
|
81
|
+
* @param amount - Raw token amount (bigint, accounting for decimals)
|
|
82
|
+
* @param description - Human-readable description
|
|
83
|
+
* @param chainId - Chain ID (default: 8453 for Base)
|
|
84
|
+
*/
|
|
85
|
+
requestTokenPayment(conversationId: string, tokenAddress: string, amount: bigint, description: string, chainId?: number): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* Send a transaction reference (share a confirmed tx hash in a conversation).
|
|
88
|
+
*
|
|
89
|
+
* @param conversationId - The conversation to share in
|
|
90
|
+
* @param txHash - The transaction hash
|
|
91
|
+
* @param chainId - Chain ID (default: 8453 for Base)
|
|
92
|
+
* @param metadata - Optional metadata (currency, amount, addresses)
|
|
93
|
+
*/
|
|
94
|
+
sendTransactionReference(conversationId: string, txHash: string, chainId?: number, metadata?: {
|
|
95
|
+
transactionType?: string;
|
|
96
|
+
currency?: string;
|
|
97
|
+
amount?: number;
|
|
98
|
+
decimals?: number;
|
|
99
|
+
fromAddress?: string;
|
|
100
|
+
toAddress?: string;
|
|
101
|
+
}): Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* Check an ERC-20 token balance for an address.
|
|
104
|
+
*
|
|
105
|
+
* @param tokenAddress - ERC-20 contract address
|
|
106
|
+
* @param walletAddress - The address to check
|
|
107
|
+
* @param chainId - Chain ID (default: 8453 for Base)
|
|
108
|
+
* @returns Raw balance (bigint) and decimals
|
|
109
|
+
*/
|
|
110
|
+
getTokenBalance(tokenAddress: string, walletAddress: string, chainId?: number): Promise<{
|
|
111
|
+
balance: bigint;
|
|
112
|
+
decimals: number;
|
|
113
|
+
}>;
|
|
66
114
|
/**
|
|
67
115
|
* Get the XMTP address (same as wallet address).
|
|
68
116
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/xmtp/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAChF,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