@spicenet-io/spiceflow-core 0.1.3 → 0.3.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 +82 -0
- package/dist/abis/delegate.d.ts +419 -0
- package/dist/abis/delegate.d.ts.map +1 -0
- package/dist/abis/erc20.d.ts +130 -0
- package/dist/abis/erc20.d.ts.map +1 -0
- package/dist/abis/index.d.ts +5 -0
- package/dist/abis/index.d.ts.map +1 -0
- package/dist/abis/uniV3.d.ts +93 -0
- package/dist/abis/uniV3.d.ts.map +1 -0
- package/dist/abis/wcbtc.d.ts +58 -0
- package/dist/abis/wcbtc.d.ts.map +1 -0
- package/dist/authorization.d.ts +23 -37
- package/dist/authorization.d.ts.map +1 -1
- package/dist/chains/index.d.ts +10 -0
- package/dist/chains/index.d.ts.map +1 -0
- package/dist/chains/list.d.ts +3 -0
- package/dist/chains/list.d.ts.map +1 -0
- package/dist/chains/types.d.ts +19 -0
- package/dist/chains/types.d.ts.map +1 -0
- package/dist/config.d.ts +0 -6
- package/dist/config.d.ts.map +1 -1
- package/dist/core.d.ts +3 -15
- package/dist/core.d.ts.map +1 -1
- package/dist/index.cjs +1002 -41
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +963 -38
- package/dist/logos.d.ts +10 -0
- package/dist/logos.d.ts.map +1 -0
- package/dist/relayer.d.ts +0 -9
- package/dist/relayer.d.ts.map +1 -1
- package/dist/rfqt.d.ts +0 -10
- package/dist/rfqt.d.ts.map +1 -1
- package/dist/status.d.ts +0 -7
- package/dist/status.d.ts.map +1 -1
- package/dist/swap.d.ts +31 -0
- package/dist/swap.d.ts.map +1 -0
- package/dist/tokens/index.d.ts +15 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/list.d.ts +3 -0
- package/dist/tokens/list.d.ts.map +1 -0
- package/dist/tokens/types.d.ts +33 -0
- package/dist/tokens/types.d.ts.map +1 -0
- package/dist/types.d.ts +52 -14
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +11 -0
- package/dist/utils.d.ts.map +1 -0
- package/package.json +6 -2
package/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# @spicenet-io/spiceflow-core
|
|
2
|
+
|
|
3
|
+
Single source of truth for chain configs, token lists, logos, ABIs, and shared utilities across spiceflow repos.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
npm install @spicenet-io/spiceflow-core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What's in here
|
|
12
|
+
|
|
13
|
+
### Chains
|
|
14
|
+
|
|
15
|
+
`CHAINS` is a record of all supported chains keyed by chain ID. Each entry has id, name, display name, network (mainnet/testnet), native currency, delegate contract address, block explorer, rpc url, and logo.
|
|
16
|
+
|
|
17
|
+
Helper functions: `getChainMeta(chainId)`, `getChainsByNetwork(network)`, `getChainIdsByNetwork(network)`, `getMainnetChains()`, `getTestnetChains()`, `getDelegateContract(chainId)`.
|
|
18
|
+
|
|
19
|
+
### Tokens
|
|
20
|
+
|
|
21
|
+
`TOKENS` is the official token list. Each token has symbol, name, equivalence group, logo, and deployments across chains (address, decimals, network per chain).
|
|
22
|
+
|
|
23
|
+
Helper functions: `getTokensForChain(chainId)`, `getTokenByAddress(address, chainId)`, `getEquivalentAddresses(tokenAddress)`, `areEquivalent(a, b)`, `isUsdDenominated(address)`, `isBtcDenominated(address)`.
|
|
24
|
+
|
|
25
|
+
### Logos
|
|
26
|
+
|
|
27
|
+
All chain and token logos are bundled as base64 data URIs in the package. They work directly in img src attributes with no network requests. To add a new logo, drop the PNG in `logos/` and reference it in the chain or token list. `npm run build` auto generates the base64 file.
|
|
28
|
+
|
|
29
|
+
### Utilities
|
|
30
|
+
|
|
31
|
+
`isNativeToken(address)` checks if an address is a native token (zero address, 0x0, or 0xeee...eee).
|
|
32
|
+
|
|
33
|
+
`normalizeNativeTokenAddress(address)` normalizes any native token address to the zero address.
|
|
34
|
+
|
|
35
|
+
`convertAmountBetweenDecimals(amount, fromDecimals, toDecimals)` converts token amounts between different decimal precisions.
|
|
36
|
+
|
|
37
|
+
`formatTokenAmount(amount, decimals)` formats a bigint token amount into a human readable string.
|
|
38
|
+
|
|
39
|
+
`truncateAddress(address)` shortens an address for display.
|
|
40
|
+
|
|
41
|
+
`withRetry(fn, maxRetries, delayMs)` retries an async function with exponential backoff.
|
|
42
|
+
|
|
43
|
+
Constants: `NATIVE_TOKEN_ADDRESS`, `ZERO_ADDRESS`, `ESCROW_ADDRESS`.
|
|
44
|
+
|
|
45
|
+
### ABIs
|
|
46
|
+
|
|
47
|
+
`DELEGATE_ABI`, `ERC20_ABI`, `WCBTC_ABI`.
|
|
48
|
+
|
|
49
|
+
### Authorization
|
|
50
|
+
|
|
51
|
+
`hashChainBatches(chainCalls)` hashes chain call batches for intent signing.
|
|
52
|
+
|
|
53
|
+
`getIntentHash(signatureType, nbf, exp, chainBatches)` computes the intent hash.
|
|
54
|
+
|
|
55
|
+
`getAccountNonce(address, publicClient)` gets the account nonce from chain.
|
|
56
|
+
|
|
57
|
+
### Core SDK
|
|
58
|
+
|
|
59
|
+
`SpiceFlowCore` class for building and submitting intents. Handles delegation signing, chain batch construction, intent signing, and transaction submission.
|
|
60
|
+
|
|
61
|
+
### HTTP
|
|
62
|
+
|
|
63
|
+
`fetchWithRetry(url, init, opts)` is a fetch wrapper with retry and exponential backoff.
|
|
64
|
+
|
|
65
|
+
`submitTransaction(baseUrl, request)` submits a transaction to the relayer API.
|
|
66
|
+
|
|
67
|
+
`getIntentStepStatus(txApiUrl, intentId, stepId)` checks intent execution status.
|
|
68
|
+
|
|
69
|
+
`prepareRFQT(txApiUrl, request)` prepares an RFQT quote.
|
|
70
|
+
|
|
71
|
+
## Adding a token
|
|
72
|
+
|
|
73
|
+
1. Drop the logo PNG in `logos/`
|
|
74
|
+
2. Add the token entry in `src/tokens/list.ts` with symbol, name, equivalence group, logo reference, and deployments
|
|
75
|
+
3. `npm run build` and publish
|
|
76
|
+
|
|
77
|
+
## Adding a chain
|
|
78
|
+
|
|
79
|
+
1. Drop the logo PNG in `logos/` if it's a new chain logo
|
|
80
|
+
2. Add the chain entry in `src/chains/list.ts`
|
|
81
|
+
3. Add token deployments on that chain in `src/tokens/list.ts`
|
|
82
|
+
4. `npm run build` and publish
|
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
export declare const DELEGATE_ABI: readonly [{
|
|
2
|
+
readonly type: "fallback";
|
|
3
|
+
readonly stateMutability: "payable";
|
|
4
|
+
}, {
|
|
5
|
+
readonly type: "receive";
|
|
6
|
+
readonly stateMutability: "payable";
|
|
7
|
+
}, {
|
|
8
|
+
readonly type: "function";
|
|
9
|
+
readonly name: "execute";
|
|
10
|
+
readonly inputs: readonly [{
|
|
11
|
+
readonly name: "intent";
|
|
12
|
+
readonly type: "tuple";
|
|
13
|
+
readonly internalType: "struct Delegate.Intent";
|
|
14
|
+
readonly components: readonly [{
|
|
15
|
+
readonly name: "signatureType";
|
|
16
|
+
readonly type: "string";
|
|
17
|
+
readonly internalType: "string";
|
|
18
|
+
}, {
|
|
19
|
+
readonly name: "signature";
|
|
20
|
+
readonly type: "bytes";
|
|
21
|
+
readonly internalType: "bytes";
|
|
22
|
+
}, {
|
|
23
|
+
readonly name: "nbf";
|
|
24
|
+
readonly type: "uint256";
|
|
25
|
+
readonly internalType: "uint256";
|
|
26
|
+
}, {
|
|
27
|
+
readonly name: "exp";
|
|
28
|
+
readonly type: "uint256";
|
|
29
|
+
readonly internalType: "uint256";
|
|
30
|
+
}, {
|
|
31
|
+
readonly name: "chainBatches";
|
|
32
|
+
readonly type: "tuple[]";
|
|
33
|
+
readonly internalType: "struct Delegate.ChainBatch[]";
|
|
34
|
+
readonly components: readonly [{
|
|
35
|
+
readonly name: "hash";
|
|
36
|
+
readonly type: "bytes32";
|
|
37
|
+
readonly internalType: "bytes32";
|
|
38
|
+
}, {
|
|
39
|
+
readonly name: "chainId";
|
|
40
|
+
readonly type: "uint256";
|
|
41
|
+
readonly internalType: "uint256";
|
|
42
|
+
}, {
|
|
43
|
+
readonly name: "calls";
|
|
44
|
+
readonly type: "tuple[]";
|
|
45
|
+
readonly internalType: "struct Delegate.Call[]";
|
|
46
|
+
readonly components: readonly [{
|
|
47
|
+
readonly name: "to";
|
|
48
|
+
readonly type: "address";
|
|
49
|
+
readonly internalType: "address";
|
|
50
|
+
}, {
|
|
51
|
+
readonly name: "value";
|
|
52
|
+
readonly type: "uint256";
|
|
53
|
+
readonly internalType: "uint256";
|
|
54
|
+
}, {
|
|
55
|
+
readonly name: "data";
|
|
56
|
+
readonly type: "bytes";
|
|
57
|
+
readonly internalType: "bytes";
|
|
58
|
+
}];
|
|
59
|
+
}];
|
|
60
|
+
}];
|
|
61
|
+
}];
|
|
62
|
+
readonly outputs: readonly [];
|
|
63
|
+
readonly stateMutability: "payable";
|
|
64
|
+
}, {
|
|
65
|
+
readonly type: "function";
|
|
66
|
+
readonly name: "selfExecute";
|
|
67
|
+
readonly inputs: readonly [{
|
|
68
|
+
readonly name: "calls";
|
|
69
|
+
readonly type: "tuple[]";
|
|
70
|
+
readonly internalType: "struct Delegate.Call[]";
|
|
71
|
+
readonly components: readonly [{
|
|
72
|
+
readonly name: "to";
|
|
73
|
+
readonly type: "address";
|
|
74
|
+
readonly internalType: "address";
|
|
75
|
+
}, {
|
|
76
|
+
readonly name: "value";
|
|
77
|
+
readonly type: "uint256";
|
|
78
|
+
readonly internalType: "uint256";
|
|
79
|
+
}, {
|
|
80
|
+
readonly name: "data";
|
|
81
|
+
readonly type: "bytes";
|
|
82
|
+
readonly internalType: "bytes";
|
|
83
|
+
}];
|
|
84
|
+
}];
|
|
85
|
+
readonly outputs: readonly [];
|
|
86
|
+
readonly stateMutability: "payable";
|
|
87
|
+
}, {
|
|
88
|
+
readonly type: "function";
|
|
89
|
+
readonly name: "isChainBatchProcessed";
|
|
90
|
+
readonly inputs: readonly [{
|
|
91
|
+
readonly name: "chainBatchHash";
|
|
92
|
+
readonly type: "bytes32";
|
|
93
|
+
readonly internalType: "bytes32";
|
|
94
|
+
}];
|
|
95
|
+
readonly outputs: readonly [{
|
|
96
|
+
readonly name: "";
|
|
97
|
+
readonly type: "bool";
|
|
98
|
+
readonly internalType: "bool";
|
|
99
|
+
}];
|
|
100
|
+
readonly stateMutability: "view";
|
|
101
|
+
}, {
|
|
102
|
+
readonly type: "function";
|
|
103
|
+
readonly name: "normalizeIntentAndComputeHash";
|
|
104
|
+
readonly inputs: readonly [{
|
|
105
|
+
readonly name: "userIntent";
|
|
106
|
+
readonly type: "tuple";
|
|
107
|
+
readonly internalType: "struct Delegate.Intent";
|
|
108
|
+
readonly components: readonly [{
|
|
109
|
+
readonly name: "signatureType";
|
|
110
|
+
readonly type: "string";
|
|
111
|
+
readonly internalType: "string";
|
|
112
|
+
}, {
|
|
113
|
+
readonly name: "signature";
|
|
114
|
+
readonly type: "bytes";
|
|
115
|
+
readonly internalType: "bytes";
|
|
116
|
+
}, {
|
|
117
|
+
readonly name: "nbf";
|
|
118
|
+
readonly type: "uint256";
|
|
119
|
+
readonly internalType: "uint256";
|
|
120
|
+
}, {
|
|
121
|
+
readonly name: "exp";
|
|
122
|
+
readonly type: "uint256";
|
|
123
|
+
readonly internalType: "uint256";
|
|
124
|
+
}, {
|
|
125
|
+
readonly name: "chainBatches";
|
|
126
|
+
readonly type: "tuple[]";
|
|
127
|
+
readonly internalType: "struct Delegate.ChainBatch[]";
|
|
128
|
+
readonly components: readonly [{
|
|
129
|
+
readonly name: "hash";
|
|
130
|
+
readonly type: "bytes32";
|
|
131
|
+
readonly internalType: "bytes32";
|
|
132
|
+
}, {
|
|
133
|
+
readonly name: "chainId";
|
|
134
|
+
readonly type: "uint256";
|
|
135
|
+
readonly internalType: "uint256";
|
|
136
|
+
}, {
|
|
137
|
+
readonly name: "calls";
|
|
138
|
+
readonly type: "tuple[]";
|
|
139
|
+
readonly internalType: "struct Delegate.Call[]";
|
|
140
|
+
readonly components: readonly [{
|
|
141
|
+
readonly name: "to";
|
|
142
|
+
readonly type: "address";
|
|
143
|
+
readonly internalType: "address";
|
|
144
|
+
}, {
|
|
145
|
+
readonly name: "value";
|
|
146
|
+
readonly type: "uint256";
|
|
147
|
+
readonly internalType: "uint256";
|
|
148
|
+
}, {
|
|
149
|
+
readonly name: "data";
|
|
150
|
+
readonly type: "bytes";
|
|
151
|
+
readonly internalType: "bytes";
|
|
152
|
+
}];
|
|
153
|
+
}];
|
|
154
|
+
}];
|
|
155
|
+
}];
|
|
156
|
+
readonly outputs: readonly [{
|
|
157
|
+
readonly name: "intent";
|
|
158
|
+
readonly type: "tuple";
|
|
159
|
+
readonly internalType: "struct Delegate.Intent";
|
|
160
|
+
readonly components: readonly [{
|
|
161
|
+
readonly name: "signatureType";
|
|
162
|
+
readonly type: "string";
|
|
163
|
+
readonly internalType: "string";
|
|
164
|
+
}, {
|
|
165
|
+
readonly name: "signature";
|
|
166
|
+
readonly type: "bytes";
|
|
167
|
+
readonly internalType: "bytes";
|
|
168
|
+
}, {
|
|
169
|
+
readonly name: "nbf";
|
|
170
|
+
readonly type: "uint256";
|
|
171
|
+
readonly internalType: "uint256";
|
|
172
|
+
}, {
|
|
173
|
+
readonly name: "exp";
|
|
174
|
+
readonly type: "uint256";
|
|
175
|
+
readonly internalType: "uint256";
|
|
176
|
+
}, {
|
|
177
|
+
readonly name: "chainBatches";
|
|
178
|
+
readonly type: "tuple[]";
|
|
179
|
+
readonly internalType: "struct Delegate.ChainBatch[]";
|
|
180
|
+
readonly components: readonly [{
|
|
181
|
+
readonly name: "hash";
|
|
182
|
+
readonly type: "bytes32";
|
|
183
|
+
readonly internalType: "bytes32";
|
|
184
|
+
}, {
|
|
185
|
+
readonly name: "chainId";
|
|
186
|
+
readonly type: "uint256";
|
|
187
|
+
readonly internalType: "uint256";
|
|
188
|
+
}, {
|
|
189
|
+
readonly name: "calls";
|
|
190
|
+
readonly type: "tuple[]";
|
|
191
|
+
readonly internalType: "struct Delegate.Call[]";
|
|
192
|
+
readonly components: readonly [{
|
|
193
|
+
readonly name: "to";
|
|
194
|
+
readonly type: "address";
|
|
195
|
+
readonly internalType: "address";
|
|
196
|
+
}, {
|
|
197
|
+
readonly name: "value";
|
|
198
|
+
readonly type: "uint256";
|
|
199
|
+
readonly internalType: "uint256";
|
|
200
|
+
}, {
|
|
201
|
+
readonly name: "data";
|
|
202
|
+
readonly type: "bytes";
|
|
203
|
+
readonly internalType: "bytes";
|
|
204
|
+
}];
|
|
205
|
+
}];
|
|
206
|
+
}];
|
|
207
|
+
}, {
|
|
208
|
+
readonly name: "hash";
|
|
209
|
+
readonly type: "bytes32";
|
|
210
|
+
readonly internalType: "bytes32";
|
|
211
|
+
}];
|
|
212
|
+
readonly stateMutability: "pure";
|
|
213
|
+
}, {
|
|
214
|
+
readonly type: "event";
|
|
215
|
+
readonly name: "BatchExecuted";
|
|
216
|
+
readonly inputs: readonly [{
|
|
217
|
+
readonly name: "block";
|
|
218
|
+
readonly type: "uint256";
|
|
219
|
+
readonly indexed: true;
|
|
220
|
+
readonly internalType: "uint256";
|
|
221
|
+
}, {
|
|
222
|
+
readonly name: "calls";
|
|
223
|
+
readonly type: "tuple[]";
|
|
224
|
+
readonly indexed: false;
|
|
225
|
+
readonly internalType: "struct Delegate.Call[]";
|
|
226
|
+
readonly components: readonly [{
|
|
227
|
+
readonly name: "to";
|
|
228
|
+
readonly type: "address";
|
|
229
|
+
readonly internalType: "address";
|
|
230
|
+
}, {
|
|
231
|
+
readonly name: "value";
|
|
232
|
+
readonly type: "uint256";
|
|
233
|
+
readonly internalType: "uint256";
|
|
234
|
+
}, {
|
|
235
|
+
readonly name: "data";
|
|
236
|
+
readonly type: "bytes";
|
|
237
|
+
readonly internalType: "bytes";
|
|
238
|
+
}];
|
|
239
|
+
}];
|
|
240
|
+
readonly anonymous: false;
|
|
241
|
+
}, {
|
|
242
|
+
readonly type: "event";
|
|
243
|
+
readonly name: "CallExecuted";
|
|
244
|
+
readonly inputs: readonly [{
|
|
245
|
+
readonly name: "executor";
|
|
246
|
+
readonly type: "address";
|
|
247
|
+
readonly indexed: true;
|
|
248
|
+
readonly internalType: "address";
|
|
249
|
+
}, {
|
|
250
|
+
readonly name: "sender";
|
|
251
|
+
readonly type: "address";
|
|
252
|
+
readonly indexed: true;
|
|
253
|
+
readonly internalType: "address";
|
|
254
|
+
}, {
|
|
255
|
+
readonly name: "to";
|
|
256
|
+
readonly type: "address";
|
|
257
|
+
readonly indexed: true;
|
|
258
|
+
readonly internalType: "address";
|
|
259
|
+
}, {
|
|
260
|
+
readonly name: "value";
|
|
261
|
+
readonly type: "uint256";
|
|
262
|
+
readonly indexed: false;
|
|
263
|
+
readonly internalType: "uint256";
|
|
264
|
+
}, {
|
|
265
|
+
readonly name: "data";
|
|
266
|
+
readonly type: "bytes";
|
|
267
|
+
readonly indexed: false;
|
|
268
|
+
readonly internalType: "bytes";
|
|
269
|
+
}, {
|
|
270
|
+
readonly name: "returnData";
|
|
271
|
+
readonly type: "bytes";
|
|
272
|
+
readonly indexed: false;
|
|
273
|
+
readonly internalType: "bytes";
|
|
274
|
+
}];
|
|
275
|
+
readonly anonymous: false;
|
|
276
|
+
}, {
|
|
277
|
+
readonly type: "event";
|
|
278
|
+
readonly name: "IntentSubmitted";
|
|
279
|
+
readonly inputs: readonly [{
|
|
280
|
+
readonly name: "signature";
|
|
281
|
+
readonly type: "bytes";
|
|
282
|
+
readonly indexed: true;
|
|
283
|
+
readonly internalType: "bytes";
|
|
284
|
+
}];
|
|
285
|
+
readonly anonymous: false;
|
|
286
|
+
}, {
|
|
287
|
+
readonly type: "error";
|
|
288
|
+
readonly name: "CallReverted";
|
|
289
|
+
readonly inputs: readonly [{
|
|
290
|
+
readonly name: "account";
|
|
291
|
+
readonly type: "address";
|
|
292
|
+
readonly internalType: "address";
|
|
293
|
+
}, {
|
|
294
|
+
readonly name: "to";
|
|
295
|
+
readonly type: "address";
|
|
296
|
+
readonly internalType: "address";
|
|
297
|
+
}, {
|
|
298
|
+
readonly name: "value";
|
|
299
|
+
readonly type: "uint256";
|
|
300
|
+
readonly internalType: "uint256";
|
|
301
|
+
}, {
|
|
302
|
+
readonly name: "data";
|
|
303
|
+
readonly type: "bytes";
|
|
304
|
+
readonly internalType: "bytes";
|
|
305
|
+
}, {
|
|
306
|
+
readonly name: "errorMessage";
|
|
307
|
+
readonly type: "bytes";
|
|
308
|
+
readonly internalType: "bytes";
|
|
309
|
+
}];
|
|
310
|
+
}, {
|
|
311
|
+
readonly type: "error";
|
|
312
|
+
readonly name: "DuplicateChainBatch";
|
|
313
|
+
readonly inputs: readonly [{
|
|
314
|
+
readonly name: "intentSignature";
|
|
315
|
+
readonly type: "bytes";
|
|
316
|
+
readonly internalType: "bytes";
|
|
317
|
+
}, {
|
|
318
|
+
readonly name: "chainBatchHash";
|
|
319
|
+
readonly type: "bytes32";
|
|
320
|
+
readonly internalType: "bytes32";
|
|
321
|
+
}, {
|
|
322
|
+
readonly name: "chainBatchId";
|
|
323
|
+
readonly type: "bytes32";
|
|
324
|
+
readonly internalType: "bytes32";
|
|
325
|
+
}];
|
|
326
|
+
}, {
|
|
327
|
+
readonly type: "error";
|
|
328
|
+
readonly name: "ECDSAInvalidSignature";
|
|
329
|
+
readonly inputs: readonly [];
|
|
330
|
+
}, {
|
|
331
|
+
readonly type: "error";
|
|
332
|
+
readonly name: "ECDSAInvalidSignatureLength";
|
|
333
|
+
readonly inputs: readonly [{
|
|
334
|
+
readonly name: "length";
|
|
335
|
+
readonly type: "uint256";
|
|
336
|
+
readonly internalType: "uint256";
|
|
337
|
+
}];
|
|
338
|
+
}, {
|
|
339
|
+
readonly type: "error";
|
|
340
|
+
readonly name: "ECDSAInvalidSignatureS";
|
|
341
|
+
readonly inputs: readonly [{
|
|
342
|
+
readonly name: "s";
|
|
343
|
+
readonly type: "bytes32";
|
|
344
|
+
readonly internalType: "bytes32";
|
|
345
|
+
}];
|
|
346
|
+
}, {
|
|
347
|
+
readonly type: "error";
|
|
348
|
+
readonly name: "IntentExpired";
|
|
349
|
+
readonly inputs: readonly [{
|
|
350
|
+
readonly name: "currentTime";
|
|
351
|
+
readonly type: "uint256";
|
|
352
|
+
readonly internalType: "uint256";
|
|
353
|
+
}, {
|
|
354
|
+
readonly name: "exp";
|
|
355
|
+
readonly type: "uint256";
|
|
356
|
+
readonly internalType: "uint256";
|
|
357
|
+
}];
|
|
358
|
+
}, {
|
|
359
|
+
readonly type: "error";
|
|
360
|
+
readonly name: "IntentTooEarly";
|
|
361
|
+
readonly inputs: readonly [{
|
|
362
|
+
readonly name: "currentTime";
|
|
363
|
+
readonly type: "uint256";
|
|
364
|
+
readonly internalType: "uint256";
|
|
365
|
+
}, {
|
|
366
|
+
readonly name: "nbf";
|
|
367
|
+
readonly type: "uint256";
|
|
368
|
+
readonly internalType: "uint256";
|
|
369
|
+
}];
|
|
370
|
+
}, {
|
|
371
|
+
readonly type: "error";
|
|
372
|
+
readonly name: "InvalidAuthority";
|
|
373
|
+
readonly inputs: readonly [{
|
|
374
|
+
readonly name: "actual";
|
|
375
|
+
readonly type: "address";
|
|
376
|
+
readonly internalType: "address";
|
|
377
|
+
}, {
|
|
378
|
+
readonly name: "expected";
|
|
379
|
+
readonly type: "address";
|
|
380
|
+
readonly internalType: "address";
|
|
381
|
+
}];
|
|
382
|
+
}, {
|
|
383
|
+
readonly type: "error";
|
|
384
|
+
readonly name: "InvalidChainId";
|
|
385
|
+
readonly inputs: readonly [{
|
|
386
|
+
readonly name: "actual";
|
|
387
|
+
readonly type: "uint256";
|
|
388
|
+
readonly internalType: "uint256";
|
|
389
|
+
}, {
|
|
390
|
+
readonly name: "expected";
|
|
391
|
+
readonly type: "uint256";
|
|
392
|
+
readonly internalType: "uint256";
|
|
393
|
+
}];
|
|
394
|
+
}, {
|
|
395
|
+
readonly type: "error";
|
|
396
|
+
readonly name: "InvalidSignature";
|
|
397
|
+
readonly inputs: readonly [{
|
|
398
|
+
readonly name: "signatureType";
|
|
399
|
+
readonly type: "string";
|
|
400
|
+
readonly internalType: "string";
|
|
401
|
+
}, {
|
|
402
|
+
readonly name: "recovered";
|
|
403
|
+
readonly type: "address";
|
|
404
|
+
readonly internalType: "address";
|
|
405
|
+
}, {
|
|
406
|
+
readonly name: "expected";
|
|
407
|
+
readonly type: "address";
|
|
408
|
+
readonly internalType: "address";
|
|
409
|
+
}];
|
|
410
|
+
}, {
|
|
411
|
+
readonly type: "error";
|
|
412
|
+
readonly name: "InvalidSignatureType";
|
|
413
|
+
readonly inputs: readonly [{
|
|
414
|
+
readonly name: "signatureType";
|
|
415
|
+
readonly type: "string";
|
|
416
|
+
readonly internalType: "string";
|
|
417
|
+
}];
|
|
418
|
+
}];
|
|
419
|
+
//# sourceMappingURL=delegate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delegate.d.ts","sourceRoot":"","sources":["../../src/abis/delegate.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqQf,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
export declare const ERC20_ABI: readonly [{
|
|
2
|
+
readonly inputs: readonly [];
|
|
3
|
+
readonly name: "name";
|
|
4
|
+
readonly outputs: readonly [{
|
|
5
|
+
readonly type: "string";
|
|
6
|
+
}];
|
|
7
|
+
readonly stateMutability: "view";
|
|
8
|
+
readonly type: "function";
|
|
9
|
+
}, {
|
|
10
|
+
readonly inputs: readonly [];
|
|
11
|
+
readonly name: "symbol";
|
|
12
|
+
readonly outputs: readonly [{
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
}];
|
|
15
|
+
readonly stateMutability: "view";
|
|
16
|
+
readonly type: "function";
|
|
17
|
+
}, {
|
|
18
|
+
readonly inputs: readonly [];
|
|
19
|
+
readonly name: "decimals";
|
|
20
|
+
readonly outputs: readonly [{
|
|
21
|
+
readonly type: "uint8";
|
|
22
|
+
}];
|
|
23
|
+
readonly stateMutability: "view";
|
|
24
|
+
readonly type: "function";
|
|
25
|
+
}, {
|
|
26
|
+
readonly inputs: readonly [{
|
|
27
|
+
readonly name: "account";
|
|
28
|
+
readonly type: "address";
|
|
29
|
+
}];
|
|
30
|
+
readonly name: "balanceOf";
|
|
31
|
+
readonly outputs: readonly [{
|
|
32
|
+
readonly type: "uint256";
|
|
33
|
+
}];
|
|
34
|
+
readonly stateMutability: "view";
|
|
35
|
+
readonly type: "function";
|
|
36
|
+
}, {
|
|
37
|
+
readonly inputs: readonly [{
|
|
38
|
+
readonly name: "to";
|
|
39
|
+
readonly type: "address";
|
|
40
|
+
}, {
|
|
41
|
+
readonly name: "amount";
|
|
42
|
+
readonly type: "uint256";
|
|
43
|
+
}];
|
|
44
|
+
readonly name: "transfer";
|
|
45
|
+
readonly outputs: readonly [{
|
|
46
|
+
readonly type: "bool";
|
|
47
|
+
}];
|
|
48
|
+
readonly stateMutability: "nonpayable";
|
|
49
|
+
readonly type: "function";
|
|
50
|
+
}, {
|
|
51
|
+
readonly inputs: readonly [{
|
|
52
|
+
readonly name: "from";
|
|
53
|
+
readonly type: "address";
|
|
54
|
+
}, {
|
|
55
|
+
readonly name: "to";
|
|
56
|
+
readonly type: "address";
|
|
57
|
+
}, {
|
|
58
|
+
readonly name: "amount";
|
|
59
|
+
readonly type: "uint256";
|
|
60
|
+
}];
|
|
61
|
+
readonly name: "transferFrom";
|
|
62
|
+
readonly outputs: readonly [{
|
|
63
|
+
readonly type: "bool";
|
|
64
|
+
}];
|
|
65
|
+
readonly stateMutability: "nonpayable";
|
|
66
|
+
readonly type: "function";
|
|
67
|
+
}, {
|
|
68
|
+
readonly inputs: readonly [{
|
|
69
|
+
readonly name: "spender";
|
|
70
|
+
readonly type: "address";
|
|
71
|
+
}, {
|
|
72
|
+
readonly name: "amount";
|
|
73
|
+
readonly type: "uint256";
|
|
74
|
+
}];
|
|
75
|
+
readonly name: "approve";
|
|
76
|
+
readonly outputs: readonly [{
|
|
77
|
+
readonly type: "bool";
|
|
78
|
+
}];
|
|
79
|
+
readonly stateMutability: "nonpayable";
|
|
80
|
+
readonly type: "function";
|
|
81
|
+
}, {
|
|
82
|
+
readonly inputs: readonly [{
|
|
83
|
+
readonly name: "owner";
|
|
84
|
+
readonly type: "address";
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "spender";
|
|
87
|
+
readonly type: "address";
|
|
88
|
+
}];
|
|
89
|
+
readonly name: "allowance";
|
|
90
|
+
readonly outputs: readonly [{
|
|
91
|
+
readonly type: "uint256";
|
|
92
|
+
}];
|
|
93
|
+
readonly stateMutability: "view";
|
|
94
|
+
readonly type: "function";
|
|
95
|
+
}, {
|
|
96
|
+
readonly anonymous: false;
|
|
97
|
+
readonly inputs: readonly [{
|
|
98
|
+
readonly indexed: true;
|
|
99
|
+
readonly name: "from";
|
|
100
|
+
readonly type: "address";
|
|
101
|
+
}, {
|
|
102
|
+
readonly indexed: true;
|
|
103
|
+
readonly name: "to";
|
|
104
|
+
readonly type: "address";
|
|
105
|
+
}, {
|
|
106
|
+
readonly indexed: false;
|
|
107
|
+
readonly name: "value";
|
|
108
|
+
readonly type: "uint256";
|
|
109
|
+
}];
|
|
110
|
+
readonly name: "Transfer";
|
|
111
|
+
readonly type: "event";
|
|
112
|
+
}, {
|
|
113
|
+
readonly anonymous: false;
|
|
114
|
+
readonly inputs: readonly [{
|
|
115
|
+
readonly indexed: true;
|
|
116
|
+
readonly name: "owner";
|
|
117
|
+
readonly type: "address";
|
|
118
|
+
}, {
|
|
119
|
+
readonly indexed: true;
|
|
120
|
+
readonly name: "spender";
|
|
121
|
+
readonly type: "address";
|
|
122
|
+
}, {
|
|
123
|
+
readonly indexed: false;
|
|
124
|
+
readonly name: "value";
|
|
125
|
+
readonly type: "uint256";
|
|
126
|
+
}];
|
|
127
|
+
readonly name: "Approval";
|
|
128
|
+
readonly type: "event";
|
|
129
|
+
}];
|
|
130
|
+
//# sourceMappingURL=erc20.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"erc20.d.ts","sourceRoot":"","sources":["../../src/abis/erc20.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWZ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/abis/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC"}
|