agentwallet-sdk 4.0.3 → 5.0.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/index.js +2 -0
- package/package.json +6 -59
- package/README.md +0 -132
- package/dist/__tests__/identity.did.test.d.ts +0 -2
- package/dist/__tests__/identity.did.test.d.ts.map +0 -1
- package/dist/__tests__/identity.did.test.js +0 -56
- package/dist/__tests__/identity.did.test.js.map +0 -1
- package/dist/__tests__/staking.test.d.ts +0 -2
- package/dist/__tests__/staking.test.d.ts.map +0 -1
- package/dist/__tests__/staking.test.js +0 -70
- package/dist/__tests__/staking.test.js.map +0 -1
- package/dist/__tests__/verify.test.d.ts +0 -2
- package/dist/__tests__/verify.test.d.ts.map +0 -1
- package/dist/__tests__/verify.test.js +0 -57
- package/dist/__tests__/verify.test.js.map +0 -1
- package/dist/abi.d.ts +0 -47
- package/dist/abi.d.ts.map +0 -1
- package/dist/abi.js +0 -257
- package/dist/abi.js.map +0 -1
- package/dist/bridge/abis.d.ts +0 -64
- package/dist/bridge/abis.d.ts.map +0 -1
- package/dist/bridge/abis.js +0 -131
- package/dist/bridge/abis.js.map +0 -1
- package/dist/bridge/client.d.ts +0 -50
- package/dist/bridge/client.d.ts.map +0 -1
- package/dist/bridge/client.js +0 -232
- package/dist/bridge/client.js.map +0 -1
- package/dist/bridge/index.d.ts +0 -3
- package/dist/bridge/index.d.ts.map +0 -1
- package/dist/bridge/index.js +0 -5
- package/dist/bridge/index.js.map +0 -1
- package/dist/bridge/types.d.ts +0 -53
- package/dist/bridge/types.d.ts.map +0 -1
- package/dist/bridge/types.js +0 -55
- package/dist/bridge/types.js.map +0 -1
- package/dist/identity/did.d.ts +0 -66
- package/dist/identity/did.d.ts.map +0 -1
- package/dist/identity/did.js +0 -186
- package/dist/identity/did.js.map +0 -1
- package/dist/identity/erc8004.d.ts +0 -150
- package/dist/identity/erc8004.d.ts.map +0 -1
- package/dist/identity/erc8004.js +0 -382
- package/dist/identity/erc8004.js.map +0 -1
- package/dist/identity/index.d.ts +0 -3
- package/dist/identity/index.d.ts.map +0 -1
- package/dist/identity/index.js +0 -3
- package/dist/identity/index.js.map +0 -1
- package/dist/index.d.ts +0 -7190
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -372
- package/dist/index.js.map +0 -1
- package/dist/plugins/elizaos.d.ts +0 -40
- package/dist/plugins/elizaos.d.ts.map +0 -1
- package/dist/plugins/elizaos.js +0 -91
- package/dist/plugins/elizaos.js.map +0 -1
- package/dist/policy/SpendingPolicy.d.ts +0 -32
- package/dist/policy/SpendingPolicy.d.ts.map +0 -1
- package/dist/policy/SpendingPolicy.js +0 -157
- package/dist/policy/SpendingPolicy.js.map +0 -1
- package/dist/staking/AgentStakingPool.d.ts +0 -100
- package/dist/staking/AgentStakingPool.d.ts.map +0 -1
- package/dist/staking/AgentStakingPool.js +0 -298
- package/dist/staking/AgentStakingPool.js.map +0 -1
- package/dist/staking/index.d.ts +0 -2
- package/dist/staking/index.d.ts.map +0 -1
- package/dist/staking/index.js +0 -2
- package/dist/staking/index.js.map +0 -1
- package/dist/swap/SwapModule.d.ts +0 -45
- package/dist/swap/SwapModule.d.ts.map +0 -1
- package/dist/swap/SwapModule.js +0 -146
- package/dist/swap/SwapModule.js.map +0 -1
- package/dist/swap/abi.d.ts +0 -51
- package/dist/swap/abi.d.ts.map +0 -1
- package/dist/swap/abi.js +0 -120
- package/dist/swap/abi.js.map +0 -1
- package/dist/swap/index.d.ts +0 -4
- package/dist/swap/index.d.ts.map +0 -1
- package/dist/swap/index.js +0 -6
- package/dist/swap/index.js.map +0 -1
- package/dist/swap/types.d.ts +0 -17
- package/dist/swap/types.d.ts.map +0 -1
- package/dist/swap/types.js +0 -19
- package/dist/swap/types.js.map +0 -1
- package/dist/types.d.ts +0 -9
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -11
- package/dist/types.js.map +0 -1
- package/dist/verify/index.d.ts +0 -2
- package/dist/verify/index.d.ts.map +0 -1
- package/dist/verify/index.js +0 -2
- package/dist/verify/index.js.map +0 -1
- package/dist/verify/verifyAgent.d.ts +0 -42
- package/dist/verify/verifyAgent.d.ts.map +0 -1
- package/dist/verify/verifyAgent.js +0 -216
- package/dist/verify/verifyAgent.js.map +0 -1
- package/dist/x402/budget.d.ts +0 -44
- package/dist/x402/budget.d.ts.map +0 -1
- package/dist/x402/budget.js +0 -115
- package/dist/x402/budget.js.map +0 -1
- package/dist/x402/chains/abstract/index.d.ts +0 -107
- package/dist/x402/chains/abstract/index.d.ts.map +0 -1
- package/dist/x402/chains/abstract/index.js +0 -192
- package/dist/x402/chains/abstract/index.js.map +0 -1
- package/dist/x402/client.d.ts +0 -46
- package/dist/x402/client.d.ts.map +0 -1
- package/dist/x402/client.js +0 -207
- package/dist/x402/client.js.map +0 -1
- package/dist/x402/index.d.ts +0 -6
- package/dist/x402/index.d.ts.map +0 -1
- package/dist/x402/index.js +0 -10
- package/dist/x402/index.js.map +0 -1
- package/dist/x402/middleware.d.ts +0 -37
- package/dist/x402/middleware.d.ts.map +0 -1
- package/dist/x402/middleware.js +0 -67
- package/dist/x402/middleware.js.map +0 -1
- package/dist/x402/types.d.ts +0 -8
- package/dist/x402/types.d.ts.map +0 -1
- package/dist/x402/types.js +0 -11
- package/dist/x402/types.js.map +0 -1
package/dist/abi.js
DELETED
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
export const AgentAccountV2Abi = [
|
|
3
|
-
// ─── Owner Functions ───
|
|
4
|
-
{
|
|
5
|
-
name: 'setSpendPolicy',
|
|
6
|
-
type: 'function',
|
|
7
|
-
stateMutability: 'nonpayable',
|
|
8
|
-
inputs: [
|
|
9
|
-
{ name: 'token', type: 'address' },
|
|
10
|
-
{ name: 'perTxLimit', type: 'uint256' },
|
|
11
|
-
{ name: 'periodLimit', type: 'uint256' },
|
|
12
|
-
{ name: 'periodLength', type: 'uint256' },
|
|
13
|
-
],
|
|
14
|
-
outputs: [],
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
name: 'setOperator',
|
|
18
|
-
type: 'function',
|
|
19
|
-
stateMutability: 'nonpayable',
|
|
20
|
-
inputs: [
|
|
21
|
-
{ name: 'operator', type: 'address' },
|
|
22
|
-
{ name: 'authorized', type: 'bool' },
|
|
23
|
-
],
|
|
24
|
-
outputs: [],
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'execute',
|
|
28
|
-
type: 'function',
|
|
29
|
-
stateMutability: 'payable',
|
|
30
|
-
inputs: [
|
|
31
|
-
{ name: 'to', type: 'address' },
|
|
32
|
-
{ name: 'value', type: 'uint256' },
|
|
33
|
-
{ name: 'data', type: 'bytes' },
|
|
34
|
-
],
|
|
35
|
-
outputs: [{ name: '', type: 'bytes' }],
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
name: 'approvePending',
|
|
39
|
-
type: 'function',
|
|
40
|
-
stateMutability: 'nonpayable',
|
|
41
|
-
inputs: [{ name: 'txId', type: 'uint256' }],
|
|
42
|
-
outputs: [],
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: 'cancelPending',
|
|
46
|
-
type: 'function',
|
|
47
|
-
stateMutability: 'nonpayable',
|
|
48
|
-
inputs: [{ name: 'txId', type: 'uint256' }],
|
|
49
|
-
outputs: [],
|
|
50
|
-
},
|
|
51
|
-
// ─── Agent Functions ───
|
|
52
|
-
{
|
|
53
|
-
name: 'agentExecute',
|
|
54
|
-
type: 'function',
|
|
55
|
-
stateMutability: 'payable',
|
|
56
|
-
inputs: [
|
|
57
|
-
{ name: 'to', type: 'address' },
|
|
58
|
-
{ name: 'value', type: 'uint256' },
|
|
59
|
-
{ name: 'data', type: 'bytes' },
|
|
60
|
-
],
|
|
61
|
-
outputs: [{ name: '', type: 'bytes' }],
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
name: 'agentTransferToken',
|
|
65
|
-
type: 'function',
|
|
66
|
-
stateMutability: 'nonpayable',
|
|
67
|
-
inputs: [
|
|
68
|
-
{ name: 'token', type: 'address' },
|
|
69
|
-
{ name: 'to', type: 'address' },
|
|
70
|
-
{ name: 'amount', type: 'uint256' },
|
|
71
|
-
],
|
|
72
|
-
outputs: [],
|
|
73
|
-
},
|
|
74
|
-
// ─── View Functions ───
|
|
75
|
-
{
|
|
76
|
-
name: 'remainingBudget',
|
|
77
|
-
type: 'function',
|
|
78
|
-
stateMutability: 'view',
|
|
79
|
-
inputs: [{ name: 'token', type: 'address' }],
|
|
80
|
-
outputs: [
|
|
81
|
-
{ name: 'perTx', type: 'uint256' },
|
|
82
|
-
{ name: 'inPeriod', type: 'uint256' },
|
|
83
|
-
],
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
name: 'getPending',
|
|
87
|
-
type: 'function',
|
|
88
|
-
stateMutability: 'view',
|
|
89
|
-
inputs: [{ name: 'txId', type: 'uint256' }],
|
|
90
|
-
outputs: [
|
|
91
|
-
{ name: 'to', type: 'address' },
|
|
92
|
-
{ name: 'value', type: 'uint256' },
|
|
93
|
-
{ name: 'token', type: 'address' },
|
|
94
|
-
{ name: 'amount', type: 'uint256' },
|
|
95
|
-
{ name: 'createdAt', type: 'uint256' },
|
|
96
|
-
{ name: 'executed', type: 'bool' },
|
|
97
|
-
{ name: 'cancelled', type: 'bool' },
|
|
98
|
-
],
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
name: 'spendPolicies',
|
|
102
|
-
type: 'function',
|
|
103
|
-
stateMutability: 'view',
|
|
104
|
-
inputs: [{ name: 'token', type: 'address' }],
|
|
105
|
-
outputs: [
|
|
106
|
-
{ name: 'perTxLimit', type: 'uint256' },
|
|
107
|
-
{ name: 'periodLimit', type: 'uint256' },
|
|
108
|
-
{ name: 'periodLength', type: 'uint256' },
|
|
109
|
-
{ name: 'periodSpent', type: 'uint256' },
|
|
110
|
-
{ name: 'periodStart', type: 'uint256' },
|
|
111
|
-
],
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
name: 'operators',
|
|
115
|
-
type: 'function',
|
|
116
|
-
stateMutability: 'view',
|
|
117
|
-
inputs: [{ name: 'operator', type: 'address' }],
|
|
118
|
-
outputs: [{ name: '', type: 'bool' }],
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
name: 'pendingNonce',
|
|
122
|
-
type: 'function',
|
|
123
|
-
stateMutability: 'view',
|
|
124
|
-
inputs: [],
|
|
125
|
-
outputs: [{ name: '', type: 'uint256' }],
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
name: 'nonce',
|
|
129
|
-
type: 'function',
|
|
130
|
-
stateMutability: 'view',
|
|
131
|
-
inputs: [],
|
|
132
|
-
outputs: [{ name: '', type: 'uint256' }],
|
|
133
|
-
},
|
|
134
|
-
// [MAX-ADDED] ABI entries for wallet health check & activity history
|
|
135
|
-
{
|
|
136
|
-
name: 'tokenContract',
|
|
137
|
-
type: 'function',
|
|
138
|
-
stateMutability: 'view',
|
|
139
|
-
inputs: [],
|
|
140
|
-
outputs: [{ name: '', type: 'address' }],
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
name: 'tokenId',
|
|
144
|
-
type: 'function',
|
|
145
|
-
stateMutability: 'view',
|
|
146
|
-
inputs: [],
|
|
147
|
-
outputs: [{ name: '', type: 'uint256' }],
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
name: 'operatorEpoch',
|
|
151
|
-
type: 'function',
|
|
152
|
-
stateMutability: 'view',
|
|
153
|
-
inputs: [],
|
|
154
|
-
outputs: [{ name: '', type: 'uint256' }],
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
name: 'isOperatorActive',
|
|
158
|
-
type: 'function',
|
|
159
|
-
stateMutability: 'view',
|
|
160
|
-
inputs: [{ name: 'operator', type: 'address' }],
|
|
161
|
-
outputs: [{ name: '', type: 'bool' }],
|
|
162
|
-
},
|
|
163
|
-
// ─── Events ───
|
|
164
|
-
{
|
|
165
|
-
name: 'TransactionExecuted',
|
|
166
|
-
type: 'event',
|
|
167
|
-
inputs: [
|
|
168
|
-
{ name: 'target', type: 'address', indexed: true },
|
|
169
|
-
{ name: 'value', type: 'uint256', indexed: false },
|
|
170
|
-
{ name: 'data', type: 'bytes', indexed: false },
|
|
171
|
-
{ name: 'executor', type: 'address', indexed: true },
|
|
172
|
-
],
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
name: 'SpendPolicyUpdated',
|
|
176
|
-
type: 'event',
|
|
177
|
-
inputs: [
|
|
178
|
-
{ name: 'token', type: 'address', indexed: true },
|
|
179
|
-
{ name: 'perTxLimit', type: 'uint256', indexed: false },
|
|
180
|
-
{ name: 'periodLimit', type: 'uint256', indexed: false },
|
|
181
|
-
{ name: 'periodLength', type: 'uint256', indexed: false },
|
|
182
|
-
],
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
name: 'OperatorUpdated',
|
|
186
|
-
type: 'event',
|
|
187
|
-
inputs: [
|
|
188
|
-
{ name: 'operator', type: 'address', indexed: true },
|
|
189
|
-
{ name: 'authorized', type: 'bool', indexed: false },
|
|
190
|
-
],
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
name: 'TransactionQueued',
|
|
194
|
-
type: 'event',
|
|
195
|
-
inputs: [
|
|
196
|
-
{ name: 'txId', type: 'uint256', indexed: true },
|
|
197
|
-
{ name: 'to', type: 'address', indexed: true },
|
|
198
|
-
{ name: 'value', type: 'uint256', indexed: false },
|
|
199
|
-
{ name: 'token', type: 'address', indexed: false },
|
|
200
|
-
{ name: 'amount', type: 'uint256', indexed: false },
|
|
201
|
-
],
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
name: 'TransactionApproved',
|
|
205
|
-
type: 'event',
|
|
206
|
-
inputs: [{ name: 'txId', type: 'uint256', indexed: true }],
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
name: 'TransactionCancelled',
|
|
210
|
-
type: 'event',
|
|
211
|
-
inputs: [{ name: 'txId', type: 'uint256', indexed: true }],
|
|
212
|
-
},
|
|
213
|
-
];
|
|
214
|
-
export const AgentAccountFactoryV2Abi = [
|
|
215
|
-
{
|
|
216
|
-
name: 'createAccount',
|
|
217
|
-
type: 'function',
|
|
218
|
-
stateMutability: 'nonpayable',
|
|
219
|
-
inputs: [
|
|
220
|
-
{ name: 'tokenContract', type: 'address' },
|
|
221
|
-
{ name: 'tokenId', type: 'uint256' },
|
|
222
|
-
],
|
|
223
|
-
outputs: [{ name: 'wallet', type: 'address' }],
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
name: 'getAddress',
|
|
227
|
-
type: 'function',
|
|
228
|
-
stateMutability: 'view',
|
|
229
|
-
inputs: [
|
|
230
|
-
{ name: 'tokenContract', type: 'address' },
|
|
231
|
-
{ name: 'tokenId', type: 'uint256' },
|
|
232
|
-
],
|
|
233
|
-
outputs: [{ name: '', type: 'address' }],
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
name: 'wallets',
|
|
237
|
-
type: 'function',
|
|
238
|
-
stateMutability: 'view',
|
|
239
|
-
inputs: [
|
|
240
|
-
{ name: 'tokenContract', type: 'address' },
|
|
241
|
-
{ name: 'tokenId', type: 'uint256' },
|
|
242
|
-
],
|
|
243
|
-
outputs: [{ name: '', type: 'address' }],
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
name: 'WalletCreated',
|
|
247
|
-
type: 'event',
|
|
248
|
-
inputs: [
|
|
249
|
-
{ name: 'wallet', type: 'address', indexed: true },
|
|
250
|
-
{ name: 'tokenContract', type: 'address', indexed: true },
|
|
251
|
-
{ name: 'tokenId', type: 'uint256', indexed: true },
|
|
252
|
-
{ name: 'deployer', type: 'address', indexed: false },
|
|
253
|
-
],
|
|
254
|
-
},
|
|
255
|
-
];
|
|
256
|
-
//# sourceMappingURL=abi.js.map
|
|
257
|
-
//# sourceMappingURL=abi.js.map
|
package/dist/abi.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1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
-
* Key function: depositForBurn — burns USDC and emits a MessageSent event
|
|
4
|
-
*/
|
|
5
|
-
export declare const TokenMessengerV2Abi: {
|
|
6
|
-
name: string;
|
|
7
|
-
type: string;
|
|
8
|
-
stateMutability: string;
|
|
9
|
-
inputs: {
|
|
10
|
-
name: string;
|
|
11
|
-
type: string;
|
|
12
|
-
}[];
|
|
13
|
-
outputs: {
|
|
14
|
-
name: string;
|
|
15
|
-
type: string;
|
|
16
|
-
}[];
|
|
17
|
-
}[];
|
|
18
|
-
/**
|
|
19
|
-
* CCTP V2 MessageTransmitterV2 ABI (destination chain)
|
|
20
|
-
* Key function: receiveMessage — mints USDC using attested message
|
|
21
|
-
*/
|
|
22
|
-
export declare const MessageTransmitterV2Abi: {
|
|
23
|
-
name: string;
|
|
24
|
-
type: string;
|
|
25
|
-
stateMutability: string;
|
|
26
|
-
inputs: {
|
|
27
|
-
name: string;
|
|
28
|
-
type: string;
|
|
29
|
-
}[];
|
|
30
|
-
outputs: {
|
|
31
|
-
name: string;
|
|
32
|
-
type: string;
|
|
33
|
-
}[];
|
|
34
|
-
}[];
|
|
35
|
-
/**
|
|
36
|
-
* Minimal ERC20 ABI — approve + allowance + balanceOf
|
|
37
|
-
*/
|
|
38
|
-
export declare const ERC20BridgeAbi: {
|
|
39
|
-
name: string;
|
|
40
|
-
type: string;
|
|
41
|
-
stateMutability: string;
|
|
42
|
-
inputs: {
|
|
43
|
-
name: string;
|
|
44
|
-
type: string;
|
|
45
|
-
}[];
|
|
46
|
-
outputs: {
|
|
47
|
-
name: string;
|
|
48
|
-
type: string;
|
|
49
|
-
}[];
|
|
50
|
-
}[];
|
|
51
|
-
/**
|
|
52
|
-
* MessageTransmitter MessageSent event ABI — emitted during depositForBurn
|
|
53
|
-
* Used to extract the CCTP message bytes and hash for attestation polling.
|
|
54
|
-
*/
|
|
55
|
-
export declare const MessageSentEventAbi: {
|
|
56
|
-
name: string;
|
|
57
|
-
type: string;
|
|
58
|
-
inputs: {
|
|
59
|
-
name: string;
|
|
60
|
-
type: string;
|
|
61
|
-
indexed: boolean;
|
|
62
|
-
}[];
|
|
63
|
-
}[];
|
|
64
|
-
//# sourceMappingURL=abis.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"abis.d.ts","sourceRoot":"","sources":["../../src/bridge/abis.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;GA8C/B,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;GAyBnC,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;GA4B1B,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;GAQ/B,CAAC"}
|
package/dist/bridge/abis.js
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
// [MAX-ADDED] CCTP V2 Contract ABIs — Circle Cross-Chain Transfer Protocol V2
|
|
3
|
-
// Sources: https://developers.circle.com/stablecoins/cctp-protocol-contract
|
|
4
|
-
/**
|
|
5
|
-
* CCTP V2 TokenMessengerV2 ABI (source chain)
|
|
6
|
-
* Key function: depositForBurn — burns USDC and emits a MessageSent event
|
|
7
|
-
*/
|
|
8
|
-
export const TokenMessengerV2Abi = [
|
|
9
|
-
{
|
|
10
|
-
name: 'depositForBurn',
|
|
11
|
-
type: 'function',
|
|
12
|
-
stateMutability: 'nonpayable',
|
|
13
|
-
inputs: [
|
|
14
|
-
{ name: 'amount', type: 'uint256' },
|
|
15
|
-
{ name: 'destinationDomain', type: 'uint32' },
|
|
16
|
-
{ name: 'mintRecipient', type: 'bytes32' },
|
|
17
|
-
{ name: 'burnToken', type: 'address' },
|
|
18
|
-
{ name: 'destinationCaller', type: 'bytes32' },
|
|
19
|
-
{ name: 'maxFee', type: 'uint256' },
|
|
20
|
-
{ name: 'minFinalityThreshold', type: 'uint32' },
|
|
21
|
-
],
|
|
22
|
-
outputs: [{ name: 'nonce', type: 'uint64' }],
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
name: 'depositForBurnWithHook',
|
|
26
|
-
type: 'function',
|
|
27
|
-
stateMutability: 'nonpayable',
|
|
28
|
-
inputs: [
|
|
29
|
-
{ name: 'amount', type: 'uint256' },
|
|
30
|
-
{ name: 'destinationDomain', type: 'uint32' },
|
|
31
|
-
{ name: 'mintRecipient', type: 'bytes32' },
|
|
32
|
-
{ name: 'burnToken', type: 'address' },
|
|
33
|
-
{ name: 'destinationCaller', type: 'bytes32' },
|
|
34
|
-
{ name: 'maxFee', type: 'uint256' },
|
|
35
|
-
{ name: 'minFinalityThreshold', type: 'uint32' },
|
|
36
|
-
{ name: 'hookData', type: 'bytes' },
|
|
37
|
-
],
|
|
38
|
-
outputs: [{ name: 'nonce', type: 'uint64' }],
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: 'localMessageTransmitter',
|
|
42
|
-
type: 'function',
|
|
43
|
-
stateMutability: 'view',
|
|
44
|
-
inputs: [],
|
|
45
|
-
outputs: [{ name: '', type: 'address' }],
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
name: 'localDomain',
|
|
49
|
-
type: 'function',
|
|
50
|
-
stateMutability: 'view',
|
|
51
|
-
inputs: [],
|
|
52
|
-
outputs: [{ name: '', type: 'uint32' }],
|
|
53
|
-
},
|
|
54
|
-
];
|
|
55
|
-
/**
|
|
56
|
-
* CCTP V2 MessageTransmitterV2 ABI (destination chain)
|
|
57
|
-
* Key function: receiveMessage — mints USDC using attested message
|
|
58
|
-
*/
|
|
59
|
-
export const MessageTransmitterV2Abi = [
|
|
60
|
-
{
|
|
61
|
-
name: 'receiveMessage',
|
|
62
|
-
type: 'function',
|
|
63
|
-
stateMutability: 'nonpayable',
|
|
64
|
-
inputs: [
|
|
65
|
-
{ name: 'message', type: 'bytes' },
|
|
66
|
-
{ name: 'attestation', type: 'bytes' },
|
|
67
|
-
],
|
|
68
|
-
outputs: [{ name: 'success', type: 'bool' }],
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
name: 'usedNonces',
|
|
72
|
-
type: 'function',
|
|
73
|
-
stateMutability: 'view',
|
|
74
|
-
inputs: [{ name: '', type: 'bytes32' }],
|
|
75
|
-
outputs: [{ name: '', type: 'uint256' }],
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
name: 'localDomain',
|
|
79
|
-
type: 'function',
|
|
80
|
-
stateMutability: 'view',
|
|
81
|
-
inputs: [],
|
|
82
|
-
outputs: [{ name: '', type: 'uint32' }],
|
|
83
|
-
},
|
|
84
|
-
];
|
|
85
|
-
/**
|
|
86
|
-
* Minimal ERC20 ABI — approve + allowance + balanceOf
|
|
87
|
-
*/
|
|
88
|
-
export const ERC20BridgeAbi = [
|
|
89
|
-
{
|
|
90
|
-
name: 'approve',
|
|
91
|
-
type: 'function',
|
|
92
|
-
stateMutability: 'nonpayable',
|
|
93
|
-
inputs: [
|
|
94
|
-
{ name: 'spender', type: 'address' },
|
|
95
|
-
{ name: 'amount', type: 'uint256' },
|
|
96
|
-
],
|
|
97
|
-
outputs: [{ name: '', type: 'bool' }],
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
name: 'allowance',
|
|
101
|
-
type: 'function',
|
|
102
|
-
stateMutability: 'view',
|
|
103
|
-
inputs: [
|
|
104
|
-
{ name: 'owner', type: 'address' },
|
|
105
|
-
{ name: 'spender', type: 'address' },
|
|
106
|
-
],
|
|
107
|
-
outputs: [{ name: '', type: 'uint256' }],
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
name: 'balanceOf',
|
|
111
|
-
type: 'function',
|
|
112
|
-
stateMutability: 'view',
|
|
113
|
-
inputs: [{ name: 'account', type: 'address' }],
|
|
114
|
-
outputs: [{ name: '', type: 'uint256' }],
|
|
115
|
-
},
|
|
116
|
-
];
|
|
117
|
-
/**
|
|
118
|
-
* MessageTransmitter MessageSent event ABI — emitted during depositForBurn
|
|
119
|
-
* Used to extract the CCTP message bytes and hash for attestation polling.
|
|
120
|
-
*/
|
|
121
|
-
export const MessageSentEventAbi = [
|
|
122
|
-
{
|
|
123
|
-
name: 'MessageSent',
|
|
124
|
-
type: 'event',
|
|
125
|
-
inputs: [
|
|
126
|
-
{ name: 'message', type: 'bytes', indexed: false },
|
|
127
|
-
],
|
|
128
|
-
},
|
|
129
|
-
];
|
|
130
|
-
//# sourceMappingURL=abis.js.map
|
|
131
|
-
//# sourceMappingURL=abis.js.map
|
package/dist/bridge/abis.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"abis.js","sourceRoot":"","sources":["../../src/bridge/abis.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,8EAA8E;AAC9E,4EAA4E;AAC5E;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B;QACI,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,YAAY;QAC7B,MAAM,EAAE;YACJ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;YACnC,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC7C,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE;YAC1C,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;YACtC,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,SAAS,EAAE;YAC9C,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;YACnC,EAAE,IAAI,EAAE,sBAAsB,EAAE,IAAI,EAAE,QAAQ,EAAE;SACnD;QACD,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;KAC/C;IACD;QACI,IAAI,EAAE,wBAAwB;QAC9B,IAAI,EAAE,UAAU;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IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;KAC3C;IACD;QACI,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAC9C,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;KAC3C;CACJ,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B;QACI,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,OAAO;QACb,MAAM,EAAE;YACJ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;SACrD;KACJ;CACJ,CAAC;AACF,gCAAgC"}
|
package/dist/bridge/client.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { CCTP_DOMAIN_IDS, BRIDGE_CHAIN_IDS, USDC_CONTRACT, TOKEN_MESSENGER_V2, MESSAGE_TRANSMITTER_V2, FINALITY_THRESHOLD } from './types.js';
|
|
2
|
-
export declare class BridgeModule {
|
|
3
|
-
constructor(walletClient: any, fromChain?: string, options?: {});
|
|
4
|
-
bridge(amount: any, toChain: any, options?: {}): Promise<{
|
|
5
|
-
burnTxHash: any;
|
|
6
|
-
mintTxHash: any;
|
|
7
|
-
amount: any;
|
|
8
|
-
fromChain: any;
|
|
9
|
-
toChain: any;
|
|
10
|
-
recipient: any;
|
|
11
|
-
nonce: bigint;
|
|
12
|
-
elapsedMs: number;
|
|
13
|
-
}>;
|
|
14
|
-
burn(amount: any, toChain: any, options?: {}): Promise<{
|
|
15
|
-
burnTxHash: any;
|
|
16
|
-
nonce: bigint;
|
|
17
|
-
messageHash: `0x${string}`;
|
|
18
|
-
messageBytes: string;
|
|
19
|
-
sourceDomain: any;
|
|
20
|
-
destinationDomain: any;
|
|
21
|
-
}>;
|
|
22
|
-
waitForAttestation(messageHash: any, apiUrl?: string): Promise<any>;
|
|
23
|
-
mint(messageBytes: any, attestation: any, toChain: any, destinationRpcUrl: any): Promise<any>;
|
|
24
|
-
getUsdcBalance(): Promise<any>;
|
|
25
|
-
getUsdcAllowance(): Promise<any>;
|
|
26
|
-
approveUsdc(amount: any): Promise<void>;
|
|
27
|
-
depositForBurn(amount: any, toChain: any, recipient: any, minFinalityThreshold: any, maxFee: any): Promise<{
|
|
28
|
-
burnTxHash: any;
|
|
29
|
-
nonce: bigint;
|
|
30
|
-
messageHash: `0x${string}`;
|
|
31
|
-
messageBytes: string;
|
|
32
|
-
sourceDomain: any;
|
|
33
|
-
destinationDomain: any;
|
|
34
|
-
}>;
|
|
35
|
-
extractMessageSent(receipt: any): {
|
|
36
|
-
messageBytes: string;
|
|
37
|
-
messageHash: `0x${string}`;
|
|
38
|
-
nonce: bigint;
|
|
39
|
-
};
|
|
40
|
-
pollForAttestation(messageHash: any, fromChain: any, apiUrl: any): Promise<any>;
|
|
41
|
-
receiveMessage(messageBytes: any, attestation: any, toChain: any, destinationRpcUrl: any): Promise<any>;
|
|
42
|
-
validateBridgeParams(amount: any, toChain: any): void;
|
|
43
|
-
sleep(ms: any): Promise<unknown>;
|
|
44
|
-
}
|
|
45
|
-
export declare class BridgeError extends Error {
|
|
46
|
-
constructor(code: any, message: any);
|
|
47
|
-
}
|
|
48
|
-
export declare function createBridge(walletClient: any, fromChain?: string, options?: {}): BridgeModule;
|
|
49
|
-
export { CCTP_DOMAIN_IDS, BRIDGE_CHAIN_IDS, USDC_CONTRACT, TOKEN_MESSENGER_V2, MESSAGE_TRANSMITTER_V2, FINALITY_THRESHOLD, };
|
|
50
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/bridge/client.ts"],"names":[],"mappings":"AAMA,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