@charterlabs/rhinestone-sdk 0.1.0 → 0.1.2
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 +74 -181
- package/dist/src/accounts/error.d.ts +69 -0
- package/dist/src/accounts/error.d.ts.map +1 -0
- package/dist/src/accounts/error.js +109 -0
- package/dist/{accounts → src/accounts}/index.d.ts +14 -21
- package/dist/src/accounts/index.d.ts.map +1 -0
- package/dist/src/accounts/index.js +469 -0
- package/dist/src/accounts/index.test.d.ts +2 -0
- package/dist/src/accounts/index.test.d.ts.map +1 -0
- package/dist/src/accounts/index.test.js +36 -0
- package/dist/{accounts → src/accounts}/kernel.d.ts +7 -9
- package/dist/src/accounts/kernel.d.ts.map +1 -0
- package/dist/{accounts → src/accounts}/kernel.js +0 -8
- package/dist/src/accounts/kernel.test.d.ts +2 -0
- package/dist/src/accounts/kernel.test.d.ts.map +1 -0
- package/dist/src/accounts/kernel.test.js +105 -0
- package/dist/{accounts → src/accounts}/nexus.d.ts +14 -13
- package/dist/src/accounts/nexus.d.ts.map +1 -0
- package/dist/{accounts → src/accounts}/nexus.js +92 -88
- package/dist/src/accounts/nexus.test.d.ts +2 -0
- package/dist/src/accounts/nexus.test.d.ts.map +1 -0
- package/dist/src/accounts/nexus.test.js +87 -0
- package/dist/{accounts → src/accounts}/safe.d.ts +4 -6
- package/dist/src/accounts/safe.d.ts.map +1 -0
- package/dist/{accounts → src/accounts}/safe.js +20 -29
- package/dist/src/accounts/safe.test.d.ts +2 -0
- package/dist/src/accounts/safe.test.d.ts.map +1 -0
- package/dist/src/accounts/safe.test.js +87 -0
- package/dist/src/accounts/startale.d.ts +20 -0
- package/dist/src/accounts/startale.d.ts.map +1 -0
- package/dist/src/accounts/startale.js +100 -0
- package/dist/src/accounts/startale.test.d.ts +2 -0
- package/dist/src/accounts/startale.test.d.ts.map +1 -0
- package/dist/src/accounts/startale.test.js +99 -0
- package/dist/{accounts → src/accounts}/utils.d.ts +4 -3
- package/dist/src/accounts/utils.d.ts.map +1 -0
- package/dist/{accounts → src/accounts}/utils.js +44 -0
- package/dist/src/accounts/utils.test.d.ts +2 -0
- package/dist/src/accounts/utils.test.d.ts.map +1 -0
- package/dist/src/accounts/utils.test.js +49 -0
- package/dist/src/actions/index.d.ts +39 -0
- package/dist/src/actions/index.d.ts.map +1 -0
- package/dist/{actions → src/actions}/index.js +108 -15
- package/dist/src/actions/index.test.d.ts +2 -0
- package/dist/src/actions/index.test.d.ts.map +1 -0
- package/dist/src/actions/index.test.js +302 -0
- package/dist/{actions → src/actions}/smart-session.d.ts +2 -2
- package/dist/src/actions/smart-session.d.ts.map +1 -0
- package/dist/src/execution/compact.d.ts +8 -0
- package/dist/src/execution/compact.d.ts.map +1 -0
- package/dist/src/execution/compact.js +105 -0
- package/dist/src/execution/error.d.ts +54 -0
- package/dist/src/execution/error.d.ts.map +1 -0
- package/dist/src/execution/error.js +78 -0
- package/dist/{execution → src/execution}/index.d.ts +7 -6
- package/dist/src/execution/index.d.ts.map +1 -0
- package/dist/src/execution/index.js +150 -0
- package/dist/src/execution/smart-session.d.ts +15 -0
- package/dist/src/execution/smart-session.d.ts.map +1 -0
- package/dist/{execution → src/execution}/smart-session.js +16 -77
- package/dist/src/execution/smart-session.test.d.ts +2 -0
- package/dist/src/execution/smart-session.test.d.ts.map +1 -0
- package/dist/src/execution/smart-session.test.js +34 -0
- package/dist/src/execution/utils.d.ts +45 -0
- package/dist/src/execution/utils.d.ts.map +1 -0
- package/dist/src/execution/utils.js +433 -0
- package/dist/src/index.d.ts +41 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +154 -0
- package/dist/src/modules/abi/smart-sessions.d.ts.map +1 -0
- package/dist/src/modules/common.d.ts.map +1 -0
- package/dist/{modules → src/modules}/index.d.ts +3 -11
- package/dist/src/modules/index.d.ts.map +1 -0
- package/dist/{modules → src/modules}/index.js +3 -45
- package/dist/src/modules/index.test.d.ts +2 -0
- package/dist/src/modules/index.test.d.ts.map +1 -0
- package/dist/src/modules/index.test.js +107 -0
- package/dist/src/modules/omni-account.d.ts +7 -0
- package/dist/src/modules/omni-account.d.ts.map +1 -0
- package/dist/src/modules/omni-account.js +11 -0
- package/dist/src/modules/read.d.ts +9 -0
- package/dist/src/modules/read.d.ts.map +1 -0
- package/dist/{modules → src/modules}/read.js +6 -37
- package/dist/{modules → src/modules}/validators/core.d.ts +6 -7
- package/dist/src/modules/validators/core.d.ts.map +1 -0
- package/dist/{modules → src/modules}/validators/core.js +83 -8
- package/dist/src/modules/validators/core.test.d.ts +2 -0
- package/dist/src/modules/validators/core.test.d.ts.map +1 -0
- package/dist/src/modules/validators/core.test.js +108 -0
- package/dist/src/modules/validators/index.d.ts +4 -0
- package/dist/src/modules/validators/index.d.ts.map +1 -0
- package/dist/{modules → src/modules}/validators/index.js +1 -3
- package/dist/{modules → src/modules}/validators/smart-sessions.d.ts +4 -15
- package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -0
- package/dist/{modules → src/modules}/validators/smart-sessions.js +7 -61
- package/dist/src/modules/validators/smart-sessions.test.d.ts +2 -0
- package/dist/src/modules/validators/smart-sessions.test.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions.test.js +226 -0
- package/dist/src/orchestrator/client.d.ts +21 -0
- package/dist/src/orchestrator/client.d.ts.map +1 -0
- package/dist/src/orchestrator/client.js +284 -0
- package/dist/src/orchestrator/consts.d.ts +5 -0
- package/dist/src/orchestrator/consts.d.ts.map +1 -0
- package/dist/src/orchestrator/consts.js +9 -0
- package/dist/src/orchestrator/error.d.ts +96 -0
- package/dist/src/orchestrator/error.d.ts.map +1 -0
- package/dist/src/orchestrator/error.js +132 -0
- package/dist/src/orchestrator/index.d.ts +11 -0
- package/dist/src/orchestrator/index.d.ts.map +1 -0
- package/dist/src/orchestrator/index.js +42 -0
- package/dist/src/orchestrator/registry.d.ts +39 -0
- package/dist/src/orchestrator/registry.d.ts.map +1 -0
- package/dist/src/orchestrator/registry.js +121 -0
- package/dist/src/orchestrator/registry.json +365 -0
- package/dist/src/orchestrator/registry.test.d.ts +2 -0
- package/dist/src/orchestrator/registry.test.d.ts.map +1 -0
- package/dist/src/orchestrator/registry.test.js +137 -0
- package/dist/src/orchestrator/types.d.ts +275 -0
- package/dist/src/orchestrator/types.d.ts.map +1 -0
- package/dist/src/orchestrator/types.js +19 -0
- package/dist/src/orchestrator/utils.d.ts +5 -0
- package/dist/src/orchestrator/utils.d.ts.map +1 -0
- package/dist/src/orchestrator/utils.js +126 -0
- package/dist/{types.d.ts → src/types.d.ts} +42 -21
- package/dist/src/types.d.ts.map +1 -0
- package/dist/test/consts.d.ts +10 -0
- package/dist/test/consts.d.ts.map +1 -0
- package/dist/test/consts.js +22 -0
- package/package.json +11 -20
- package/dist/accounts/index.d.ts.map +0 -1
- package/dist/accounts/index.js +0 -419
- package/dist/accounts/kernel.d.ts.map +0 -1
- package/dist/accounts/nexus.d.ts.map +0 -1
- package/dist/accounts/safe.d.ts.map +0 -1
- package/dist/accounts/utils.d.ts.map +0 -1
- package/dist/actions/index.d.ts +0 -29
- package/dist/actions/index.d.ts.map +0 -1
- package/dist/actions/registry.d.ts +0 -7
- package/dist/actions/registry.d.ts.map +0 -1
- package/dist/actions/registry.js +0 -7
- package/dist/actions/smart-session.d.ts.map +0 -1
- package/dist/execution/index.d.ts.map +0 -1
- package/dist/execution/index.js +0 -149
- package/dist/execution/smart-session.d.ts +0 -23
- package/dist/execution/smart-session.d.ts.map +0 -1
- package/dist/execution/utils.d.ts +0 -68
- package/dist/execution/utils.d.ts.map +0 -1
- package/dist/execution/utils.js +0 -482
- package/dist/index.d.ts +0 -38
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -119
- package/dist/modules/abi/smart-sessions.d.ts.map +0 -1
- package/dist/modules/common.d.ts.map +0 -1
- package/dist/modules/index.d.ts.map +0 -1
- package/dist/modules/omni-account.d.ts +0 -9
- package/dist/modules/omni-account.d.ts.map +0 -1
- package/dist/modules/omni-account.js +0 -15
- package/dist/modules/read.d.ts +0 -10
- package/dist/modules/read.d.ts.map +0 -1
- package/dist/modules/registry.d.ts +0 -9
- package/dist/modules/registry.d.ts.map +0 -1
- package/dist/modules/registry.js +0 -60
- package/dist/modules/validators/core.d.ts.map +0 -1
- package/dist/modules/validators/index.d.ts +0 -4
- package/dist/modules/validators/index.d.ts.map +0 -1
- package/dist/modules/validators/smart-sessions.d.ts.map +0 -1
- package/dist/orchestrator/client.d.ts +0 -29
- package/dist/orchestrator/client.d.ts.map +0 -1
- package/dist/orchestrator/client.js +0 -250
- package/dist/orchestrator/consts.d.ts +0 -5
- package/dist/orchestrator/consts.d.ts.map +0 -1
- package/dist/orchestrator/consts.js +0 -9
- package/dist/orchestrator/error.d.ts +0 -18
- package/dist/orchestrator/error.d.ts.map +0 -1
- package/dist/orchestrator/error.js +0 -33
- package/dist/orchestrator/index.d.ts +0 -11
- package/dist/orchestrator/index.d.ts.map +0 -1
- package/dist/orchestrator/index.js +0 -40
- package/dist/orchestrator/registry.d.ts +0 -20
- package/dist/orchestrator/registry.d.ts.map +0 -1
- package/dist/orchestrator/registry.js +0 -444
- package/dist/orchestrator/types.d.ts +0 -242
- package/dist/orchestrator/types.d.ts.map +0 -1
- package/dist/orchestrator/types.js +0 -19
- package/dist/orchestrator/utils.d.ts +0 -29
- package/dist/orchestrator/utils.d.ts.map +0 -1
- package/dist/orchestrator/utils.js +0 -319
- package/dist/types.d.ts.map +0 -1
- /package/dist/{actions → src/actions}/smart-session.js +0 -0
- /package/dist/{modules → src/modules}/abi/smart-sessions.d.ts +0 -0
- /package/dist/{modules → src/modules}/abi/smart-sessions.js +0 -0
- /package/dist/{modules → src/modules}/common.d.ts +0 -0
- /package/dist/{modules → src/modules}/common.js +0 -0
- /package/dist/{types.js → src/types.js} +0 -0
|
@@ -1,444 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTokenSymbol = getTokenSymbol;
|
|
4
|
-
exports.getTokenAddress = getTokenAddress;
|
|
5
|
-
exports.getTokenRootBalanceSlot = getTokenRootBalanceSlot;
|
|
6
|
-
exports.getTokenBalanceSlot = getTokenBalanceSlot;
|
|
7
|
-
exports.getWethAddress = getWethAddress;
|
|
8
|
-
exports.getHookAddress = getHookAddress;
|
|
9
|
-
exports.getSameChainModuleAddress = getSameChainModuleAddress;
|
|
10
|
-
exports.getTargetModuleAddress = getTargetModuleAddress;
|
|
11
|
-
exports.getRhinestoneSpokePoolAddress = getRhinestoneSpokePoolAddress;
|
|
12
|
-
exports.getChainById = getChainById;
|
|
13
|
-
exports.getSupportedTokens = getSupportedTokens;
|
|
14
|
-
exports.isTestnet = isTestnet;
|
|
15
|
-
exports.isTokenAddressSupported = isTokenAddressSupported;
|
|
16
|
-
exports.getDefaultAccountAccessList = getDefaultAccountAccessList;
|
|
17
|
-
const viem_1 = require("viem");
|
|
18
|
-
const chains_1 = require("viem/chains");
|
|
19
|
-
function getWethAddress(chain) {
|
|
20
|
-
switch (chain.id) {
|
|
21
|
-
case chains_1.mainnet.id: {
|
|
22
|
-
return '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2';
|
|
23
|
-
}
|
|
24
|
-
case chains_1.sepolia.id: {
|
|
25
|
-
return '0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14';
|
|
26
|
-
}
|
|
27
|
-
case chains_1.base.id: {
|
|
28
|
-
return '0x4200000000000000000000000000000000000006';
|
|
29
|
-
}
|
|
30
|
-
case chains_1.baseSepolia.id: {
|
|
31
|
-
return '0x4200000000000000000000000000000000000006';
|
|
32
|
-
}
|
|
33
|
-
case chains_1.arbitrum.id: {
|
|
34
|
-
return '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1';
|
|
35
|
-
}
|
|
36
|
-
case chains_1.arbitrumSepolia.id: {
|
|
37
|
-
return '0x980B62Da83eFf3D4576C647993b0c1D7faf17c73';
|
|
38
|
-
}
|
|
39
|
-
case chains_1.optimism.id: {
|
|
40
|
-
return '0x4200000000000000000000000000000000000006';
|
|
41
|
-
}
|
|
42
|
-
case chains_1.optimismSepolia.id: {
|
|
43
|
-
return '0x4200000000000000000000000000000000000006';
|
|
44
|
-
}
|
|
45
|
-
case chains_1.polygon.id: {
|
|
46
|
-
return '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619';
|
|
47
|
-
}
|
|
48
|
-
case chains_1.polygonAmoy.id: {
|
|
49
|
-
return '0x52eF3d68BaB452a294342DC3e5f464d7f610f72E';
|
|
50
|
-
}
|
|
51
|
-
case chains_1.zksync.id: {
|
|
52
|
-
return '0x5aea5775959fbc2557cc8789bc1bf90a239d9a91';
|
|
53
|
-
}
|
|
54
|
-
default: {
|
|
55
|
-
throw new Error(`Unsupported chain ${chain.id}`);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function getUsdcAddress(chain) {
|
|
60
|
-
switch (chain.id) {
|
|
61
|
-
case chains_1.mainnet.id: {
|
|
62
|
-
return '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48';
|
|
63
|
-
}
|
|
64
|
-
case chains_1.sepolia.id: {
|
|
65
|
-
return '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238';
|
|
66
|
-
}
|
|
67
|
-
case chains_1.base.id: {
|
|
68
|
-
return '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913';
|
|
69
|
-
}
|
|
70
|
-
case chains_1.baseSepolia.id: {
|
|
71
|
-
return '0x036CbD53842c5426634e7929541eC2318f3dCF7e';
|
|
72
|
-
}
|
|
73
|
-
case chains_1.arbitrum.id: {
|
|
74
|
-
return '0xaf88d065e77c8cC2239327C5EDb3A432268e5831';
|
|
75
|
-
}
|
|
76
|
-
case chains_1.arbitrumSepolia.id: {
|
|
77
|
-
return '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d';
|
|
78
|
-
}
|
|
79
|
-
case chains_1.optimism.id: {
|
|
80
|
-
return '0x0b2c639c533813f4aa9d7837caf62653d097ff85';
|
|
81
|
-
}
|
|
82
|
-
case chains_1.optimismSepolia.id: {
|
|
83
|
-
return '0x5fd84259d66Cd46123540766Be93DFE6D43130D7';
|
|
84
|
-
}
|
|
85
|
-
case chains_1.polygon.id: {
|
|
86
|
-
return '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359';
|
|
87
|
-
}
|
|
88
|
-
case chains_1.polygonAmoy.id: {
|
|
89
|
-
return '0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582';
|
|
90
|
-
}
|
|
91
|
-
case chains_1.zksync.id: {
|
|
92
|
-
return '0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4';
|
|
93
|
-
}
|
|
94
|
-
default: {
|
|
95
|
-
throw new Error(`Unsupported chain ${chain.id}`);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
function getUsdtAddress(chain) {
|
|
100
|
-
switch (chain.id) {
|
|
101
|
-
case chains_1.mainnet.id: {
|
|
102
|
-
return '0xdAC17F958D2ee523a2206206994597C13D831ec7';
|
|
103
|
-
}
|
|
104
|
-
case chains_1.base.id: {
|
|
105
|
-
return '0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2';
|
|
106
|
-
}
|
|
107
|
-
case chains_1.arbitrum.id: {
|
|
108
|
-
return '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9';
|
|
109
|
-
}
|
|
110
|
-
case chains_1.optimism.id: {
|
|
111
|
-
return '0x94b008aa00579c1307b0ef2c499ad98a8ce58e58';
|
|
112
|
-
}
|
|
113
|
-
case chains_1.polygon.id: {
|
|
114
|
-
return '0xc2132D05D31c914a87C6611C10748AEb04B58e8F';
|
|
115
|
-
}
|
|
116
|
-
case chains_1.zksync.id: {
|
|
117
|
-
return '0x493257fD37EDB34451f62EDf8D2a0C418852bA4C';
|
|
118
|
-
}
|
|
119
|
-
default: {
|
|
120
|
-
throw new Error(`Unsupported chain ${chain.id}`);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
function getTokenRootBalanceSlot(chain, tokenAddress) {
|
|
125
|
-
switch (chain.id) {
|
|
126
|
-
case chains_1.mainnet.id: {
|
|
127
|
-
// ETH
|
|
128
|
-
if (tokenAddress === viem_1.zeroAddress) {
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
// USDC
|
|
132
|
-
if (tokenAddress === '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48') {
|
|
133
|
-
return 9n;
|
|
134
|
-
}
|
|
135
|
-
// WETH
|
|
136
|
-
if (tokenAddress === '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2') {
|
|
137
|
-
return 3n;
|
|
138
|
-
}
|
|
139
|
-
// USDT
|
|
140
|
-
if (tokenAddress === '0xdAC17F958D2ee523a2206206994597C13D831ec7') {
|
|
141
|
-
return 2n;
|
|
142
|
-
}
|
|
143
|
-
break;
|
|
144
|
-
}
|
|
145
|
-
case chains_1.sepolia.id: {
|
|
146
|
-
// ETH
|
|
147
|
-
if (tokenAddress === viem_1.zeroAddress) {
|
|
148
|
-
return null;
|
|
149
|
-
}
|
|
150
|
-
// USDC
|
|
151
|
-
if (tokenAddress === '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238') {
|
|
152
|
-
return 9n;
|
|
153
|
-
}
|
|
154
|
-
// WETH
|
|
155
|
-
if (tokenAddress === '0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14') {
|
|
156
|
-
return 3n;
|
|
157
|
-
}
|
|
158
|
-
break;
|
|
159
|
-
}
|
|
160
|
-
case chains_1.base.id: {
|
|
161
|
-
// ETH
|
|
162
|
-
if (tokenAddress === viem_1.zeroAddress) {
|
|
163
|
-
return null;
|
|
164
|
-
}
|
|
165
|
-
// USDC
|
|
166
|
-
if (tokenAddress === '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913') {
|
|
167
|
-
return 9n;
|
|
168
|
-
}
|
|
169
|
-
// WETH
|
|
170
|
-
if (tokenAddress === '0x4200000000000000000000000000000000000006') {
|
|
171
|
-
return 3n;
|
|
172
|
-
}
|
|
173
|
-
// USDT
|
|
174
|
-
if (tokenAddress === '0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2') {
|
|
175
|
-
return 51n;
|
|
176
|
-
}
|
|
177
|
-
break;
|
|
178
|
-
}
|
|
179
|
-
case chains_1.baseSepolia.id: {
|
|
180
|
-
// ETH
|
|
181
|
-
if (tokenAddress === viem_1.zeroAddress) {
|
|
182
|
-
return null;
|
|
183
|
-
}
|
|
184
|
-
// USDC
|
|
185
|
-
if (tokenAddress === '0x036CbD53842c5426634e7929541eC2318f3dCF7e') {
|
|
186
|
-
return 9n;
|
|
187
|
-
}
|
|
188
|
-
// WETH
|
|
189
|
-
if (tokenAddress === '0x4200000000000000000000000000000000000006') {
|
|
190
|
-
return 3n;
|
|
191
|
-
}
|
|
192
|
-
break;
|
|
193
|
-
}
|
|
194
|
-
case chains_1.arbitrum.id: {
|
|
195
|
-
// ETH
|
|
196
|
-
if (tokenAddress === viem_1.zeroAddress) {
|
|
197
|
-
return null;
|
|
198
|
-
}
|
|
199
|
-
// USDC
|
|
200
|
-
if (tokenAddress === '0xaf88d065e77c8cC2239327C5EDb3A432268e5831') {
|
|
201
|
-
return 9n;
|
|
202
|
-
}
|
|
203
|
-
// WETH
|
|
204
|
-
if (tokenAddress === '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1') {
|
|
205
|
-
return 51n;
|
|
206
|
-
}
|
|
207
|
-
// USDT
|
|
208
|
-
if (tokenAddress === '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9') {
|
|
209
|
-
return 51n;
|
|
210
|
-
}
|
|
211
|
-
break;
|
|
212
|
-
}
|
|
213
|
-
case chains_1.arbitrumSepolia.id: {
|
|
214
|
-
// ETH
|
|
215
|
-
if (tokenAddress === viem_1.zeroAddress) {
|
|
216
|
-
return null;
|
|
217
|
-
}
|
|
218
|
-
// USDC
|
|
219
|
-
if (tokenAddress === '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d') {
|
|
220
|
-
return 9n;
|
|
221
|
-
}
|
|
222
|
-
// WETH
|
|
223
|
-
if (tokenAddress === '0x980B62Da83eFf3D4576C647993b0c1D7faf17c73') {
|
|
224
|
-
return 51n;
|
|
225
|
-
}
|
|
226
|
-
break;
|
|
227
|
-
}
|
|
228
|
-
case chains_1.optimism.id: {
|
|
229
|
-
// ETH
|
|
230
|
-
if (tokenAddress === viem_1.zeroAddress) {
|
|
231
|
-
return null;
|
|
232
|
-
}
|
|
233
|
-
// USDC
|
|
234
|
-
if (tokenAddress === '0x0b2c639c533813f4aa9d7837caf62653d097ff85') {
|
|
235
|
-
return 9n;
|
|
236
|
-
}
|
|
237
|
-
// WETH
|
|
238
|
-
if (tokenAddress === '0x4200000000000000000000000000000000000006') {
|
|
239
|
-
return 3n;
|
|
240
|
-
}
|
|
241
|
-
// USDT
|
|
242
|
-
if (tokenAddress === '0x94b008aa00579c1307b0ef2c499ad98a8ce58e58') {
|
|
243
|
-
return 0n;
|
|
244
|
-
}
|
|
245
|
-
break;
|
|
246
|
-
}
|
|
247
|
-
case chains_1.optimismSepolia.id: {
|
|
248
|
-
// ETH
|
|
249
|
-
if (tokenAddress === viem_1.zeroAddress) {
|
|
250
|
-
return null;
|
|
251
|
-
}
|
|
252
|
-
// USDC
|
|
253
|
-
if (tokenAddress === '0x5fd84259d66Cd46123540766Be93DFE6D43130D7') {
|
|
254
|
-
return 9n;
|
|
255
|
-
}
|
|
256
|
-
// WETH
|
|
257
|
-
if (tokenAddress === '0x4200000000000000000000000000000000000006') {
|
|
258
|
-
return 3n;
|
|
259
|
-
}
|
|
260
|
-
break;
|
|
261
|
-
}
|
|
262
|
-
case chains_1.polygon.id: {
|
|
263
|
-
// USDC
|
|
264
|
-
if (tokenAddress === '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359') {
|
|
265
|
-
return 9n;
|
|
266
|
-
}
|
|
267
|
-
// WETH
|
|
268
|
-
if (tokenAddress === '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619') {
|
|
269
|
-
return 3n;
|
|
270
|
-
}
|
|
271
|
-
// USDT
|
|
272
|
-
if (tokenAddress === '0xc2132D05D31c914a87C6611C10748AEb04B58e8F') {
|
|
273
|
-
return 0n;
|
|
274
|
-
}
|
|
275
|
-
break;
|
|
276
|
-
}
|
|
277
|
-
case chains_1.polygonAmoy.id: {
|
|
278
|
-
// USDC
|
|
279
|
-
if (tokenAddress === '0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582') {
|
|
280
|
-
return 9n;
|
|
281
|
-
}
|
|
282
|
-
// WETH
|
|
283
|
-
if (tokenAddress === '0x52eF3d68BaB452a294342DC3e5f464d7f610f72E') {
|
|
284
|
-
return 3n;
|
|
285
|
-
}
|
|
286
|
-
break;
|
|
287
|
-
}
|
|
288
|
-
case chains_1.zksync.id: {
|
|
289
|
-
// ETH
|
|
290
|
-
if (tokenAddress === viem_1.zeroAddress) {
|
|
291
|
-
return null;
|
|
292
|
-
}
|
|
293
|
-
// USDC
|
|
294
|
-
if (tokenAddress === '0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4') {
|
|
295
|
-
return 9n;
|
|
296
|
-
}
|
|
297
|
-
// WETH
|
|
298
|
-
if (tokenAddress === '0x5aea5775959fbc2557cc8789bc1bf90a239d9a91') {
|
|
299
|
-
return 3n;
|
|
300
|
-
}
|
|
301
|
-
// USDT
|
|
302
|
-
if (tokenAddress === '0x493257fD37EDB34451f62EDf8D2a0C418852bA4C') {
|
|
303
|
-
return 2n;
|
|
304
|
-
}
|
|
305
|
-
break;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
throw new Error(`Unsupported token address ${tokenAddress} for chain ${chain.id}`);
|
|
309
|
-
}
|
|
310
|
-
function getTokenBalanceSlot(tokenSymbol, chainId, accountAddress) {
|
|
311
|
-
const tokenAddress = getTokenAddress(tokenSymbol, chainId);
|
|
312
|
-
const chain = getChainById(chainId);
|
|
313
|
-
if (!chain) {
|
|
314
|
-
throw new Error(`Unsupported chain: ${chainId}`);
|
|
315
|
-
}
|
|
316
|
-
const rootBalanceSlot = getTokenRootBalanceSlot(chain, tokenAddress);
|
|
317
|
-
const balanceSlot = rootBalanceSlot
|
|
318
|
-
? (0, viem_1.keccak256)((0, viem_1.encodeAbiParameters)([{ type: 'address' }, { type: 'uint256' }], [accountAddress, rootBalanceSlot]))
|
|
319
|
-
: '0x';
|
|
320
|
-
return balanceSlot;
|
|
321
|
-
}
|
|
322
|
-
function getHookAddress(_chainId) {
|
|
323
|
-
return '0x0000000000f6Ed8Be424d673c63eeFF8b9267420';
|
|
324
|
-
}
|
|
325
|
-
function getSameChainModuleAddress(_chainId) {
|
|
326
|
-
return '0x000000000043ff16d5776c7F0f65Ec485C17Ca04';
|
|
327
|
-
}
|
|
328
|
-
function getTargetModuleAddress(_chainId) {
|
|
329
|
-
return '0x0000000000E5a37279A001301A837a91b5de1D5E';
|
|
330
|
-
}
|
|
331
|
-
function getRhinestoneSpokePoolAddress(_chainId) {
|
|
332
|
-
return '0x000000000060f6e853447881951574CDd0663530';
|
|
333
|
-
}
|
|
334
|
-
function getTokenSymbol(tokenAddress, chainId) {
|
|
335
|
-
const knownSymbols = getKnownSymbols();
|
|
336
|
-
for (const symbol of knownSymbols) {
|
|
337
|
-
const address = getTokenAddress(symbol, chainId);
|
|
338
|
-
if (address.toLowerCase() === tokenAddress.toLowerCase()) {
|
|
339
|
-
return symbol;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
throw new Error(`Unsupported token address ${tokenAddress} for chain ${chainId}`);
|
|
343
|
-
}
|
|
344
|
-
function getTokenAddress(tokenSymbol, chainId) {
|
|
345
|
-
if (chainId === 137 && tokenSymbol === 'ETH') {
|
|
346
|
-
throw new Error(`Chain ${chainId} does not allow for ETH to be used`);
|
|
347
|
-
}
|
|
348
|
-
if (tokenSymbol === 'ETH') {
|
|
349
|
-
return viem_1.zeroAddress;
|
|
350
|
-
}
|
|
351
|
-
const chain = getChainById(chainId);
|
|
352
|
-
if (!chain) {
|
|
353
|
-
throw new Error(`Unsupported chain ${chainId}`);
|
|
354
|
-
}
|
|
355
|
-
if (tokenSymbol === 'WETH') {
|
|
356
|
-
return getWethAddress(chain);
|
|
357
|
-
}
|
|
358
|
-
if (tokenSymbol === 'USDC') {
|
|
359
|
-
return getUsdcAddress(chain);
|
|
360
|
-
}
|
|
361
|
-
if (tokenSymbol === 'USDT') {
|
|
362
|
-
return getUsdtAddress(chain);
|
|
363
|
-
}
|
|
364
|
-
throw new Error(`Unsupported token symbol ${tokenSymbol}`);
|
|
365
|
-
}
|
|
366
|
-
function getChainById(chainId) {
|
|
367
|
-
const supportedChains = [
|
|
368
|
-
chains_1.mainnet,
|
|
369
|
-
chains_1.sepolia,
|
|
370
|
-
chains_1.base,
|
|
371
|
-
chains_1.baseSepolia,
|
|
372
|
-
chains_1.arbitrum,
|
|
373
|
-
chains_1.arbitrumSepolia,
|
|
374
|
-
chains_1.optimism,
|
|
375
|
-
chains_1.optimismSepolia,
|
|
376
|
-
chains_1.polygon,
|
|
377
|
-
chains_1.polygonAmoy,
|
|
378
|
-
chains_1.zksync,
|
|
379
|
-
];
|
|
380
|
-
for (const chain of supportedChains) {
|
|
381
|
-
if (chain.id === chainId) {
|
|
382
|
-
return chain;
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
function isTestnet(chainId) {
|
|
387
|
-
const chain = getChainById(chainId);
|
|
388
|
-
if (!chain) {
|
|
389
|
-
throw new Error(`Chain not supported: ${chainId}`);
|
|
390
|
-
}
|
|
391
|
-
return chain.testnet ?? false;
|
|
392
|
-
}
|
|
393
|
-
function isTokenAddressSupported(address, chainId) {
|
|
394
|
-
const chain = getChainById(chainId);
|
|
395
|
-
if (!chain) {
|
|
396
|
-
throw new Error(`Chain not supported: ${chainId}`);
|
|
397
|
-
}
|
|
398
|
-
try {
|
|
399
|
-
getTokenSymbol(address, chainId);
|
|
400
|
-
return true;
|
|
401
|
-
}
|
|
402
|
-
catch {
|
|
403
|
-
return false;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
function getSupportedTokens(chainId) {
|
|
407
|
-
const chain = getChainById(chainId);
|
|
408
|
-
if (!chain) {
|
|
409
|
-
throw new Error(`Chain not supported: ${chainId}`);
|
|
410
|
-
}
|
|
411
|
-
const knownSymbols = getKnownSymbols();
|
|
412
|
-
return knownSymbols.map((symbol) => {
|
|
413
|
-
const decimals = getTokenDecimals(symbol);
|
|
414
|
-
const address = getTokenAddress(symbol, chainId);
|
|
415
|
-
return {
|
|
416
|
-
symbol,
|
|
417
|
-
address,
|
|
418
|
-
decimals,
|
|
419
|
-
balanceSlot: (accountAddress) => getTokenBalanceSlot(symbol, chainId, accountAddress),
|
|
420
|
-
};
|
|
421
|
-
});
|
|
422
|
-
}
|
|
423
|
-
function getKnownSymbols() {
|
|
424
|
-
return ['ETH', 'WETH', 'USDC', 'USDT'];
|
|
425
|
-
}
|
|
426
|
-
function getTokenDecimals(symbol) {
|
|
427
|
-
switch (symbol) {
|
|
428
|
-
case 'ETH':
|
|
429
|
-
case 'WETH':
|
|
430
|
-
return 18;
|
|
431
|
-
case 'USDC':
|
|
432
|
-
case 'USDT':
|
|
433
|
-
return 6;
|
|
434
|
-
default:
|
|
435
|
-
throw new Error(`Symbol not supported: ${symbol}`);
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
function getDefaultAccountAccessList(onTestnets) {
|
|
439
|
-
return {
|
|
440
|
-
chainIds: onTestnets
|
|
441
|
-
? [chains_1.sepolia.id, chains_1.baseSepolia.id, chains_1.arbitrumSepolia.id, chains_1.optimismSepolia.id]
|
|
442
|
-
: [chains_1.mainnet.id, chains_1.base.id, chains_1.arbitrum.id, chains_1.optimism.id],
|
|
443
|
-
};
|
|
444
|
-
}
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import type { Address, Hex } from 'viem';
|
|
2
|
-
import type { UserOperation } from 'viem/account-abstraction';
|
|
3
|
-
import type { arbitrum, arbitrumSepolia, base, baseSepolia, mainnet, optimism, optimismSepolia, polygon, polygonAmoy, sepolia, zksync } from 'viem/chains';
|
|
4
|
-
type SupportedTestnet = typeof sepolia.id | typeof baseSepolia.id | typeof arbitrumSepolia.id | typeof optimismSepolia.id | typeof polygonAmoy.id;
|
|
5
|
-
type SupportedMainnet = typeof mainnet.id | typeof base.id | typeof arbitrum.id | typeof optimism.id | typeof polygon.id | typeof zksync.id;
|
|
6
|
-
type SupportedOPStackMainnet = typeof optimism.id | typeof base.id;
|
|
7
|
-
type SupportedOPStackTestnet = typeof optimismSepolia.id | typeof baseSepolia.id;
|
|
8
|
-
type SupportedChain = SupportedMainnet | SupportedTestnet;
|
|
9
|
-
type SupportedTokenSymbol = 'ETH' | 'WETH' | 'USDC' | 'USDT';
|
|
10
|
-
type SupportedToken = SupportedTokenSymbol | Address;
|
|
11
|
-
type BundleStatus = typeof BUNDLE_STATUS_PENDING | typeof BUNDLE_STATUS_EXPIRED | typeof BUNDLE_STATUS_PARTIALLY_COMPLETED | typeof BUNDLE_STATUS_COMPLETED | typeof BUNDLE_STATUS_FILLED | typeof BUNDLE_STATUS_PRECONFIRMED | typeof BUNDLE_STATUS_FAILED | typeof BUNDLE_STATUS_UNKNOWN;
|
|
12
|
-
type AccountAccessListLegacy = {
|
|
13
|
-
chainId: number;
|
|
14
|
-
tokenAddress: Address;
|
|
15
|
-
}[];
|
|
16
|
-
type MappedChainTokenAccessList = {
|
|
17
|
-
chainTokens?: {
|
|
18
|
-
[chainId in SupportedChain]?: SupportedToken[];
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
type UnmappedChainTokenAccessList = {
|
|
22
|
-
chainIds?: SupportedChain[];
|
|
23
|
-
tokens?: SupportedToken[];
|
|
24
|
-
};
|
|
25
|
-
type AccountAccessList = AccountAccessListLegacy | MappedChainTokenAccessList | UnmappedChainTokenAccessList;
|
|
26
|
-
type ClaimStatus = 'PENDING' | 'EXPIRED' | 'CLAIMED';
|
|
27
|
-
interface Claim {
|
|
28
|
-
depositId: bigint;
|
|
29
|
-
chainId: number;
|
|
30
|
-
status: ClaimStatus;
|
|
31
|
-
claimTimestamp?: number;
|
|
32
|
-
claimTransactionHash?: Hex;
|
|
33
|
-
}
|
|
34
|
-
interface Execution {
|
|
35
|
-
to: Address;
|
|
36
|
-
value: bigint;
|
|
37
|
-
data: Hex;
|
|
38
|
-
}
|
|
39
|
-
type SimulationResult = {
|
|
40
|
-
success: true;
|
|
41
|
-
} | {
|
|
42
|
-
success: false;
|
|
43
|
-
call: Execution;
|
|
44
|
-
details: {
|
|
45
|
-
message: string;
|
|
46
|
-
contractAddress: Address;
|
|
47
|
-
args: any[];
|
|
48
|
-
functionName: string;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
type PostOrderBundleResult = ({
|
|
52
|
-
bundleId: bigint;
|
|
53
|
-
status: typeof BUNDLE_STATUS_PENDING;
|
|
54
|
-
} | {
|
|
55
|
-
bundleId: bigint;
|
|
56
|
-
status: typeof BUNDLE_STATUS_FAILED;
|
|
57
|
-
error: SimulationResult;
|
|
58
|
-
})[];
|
|
59
|
-
interface BundleResult {
|
|
60
|
-
status: BundleStatus;
|
|
61
|
-
fillTimestamp?: number;
|
|
62
|
-
fillTransactionHash?: Hex;
|
|
63
|
-
claims: Claim[];
|
|
64
|
-
}
|
|
65
|
-
interface TokenTransfer {
|
|
66
|
-
tokenAddress: Address;
|
|
67
|
-
amount: bigint;
|
|
68
|
-
}
|
|
69
|
-
interface WithUserOp {
|
|
70
|
-
userOp: UserOperation;
|
|
71
|
-
targetExecutions?: never;
|
|
72
|
-
}
|
|
73
|
-
interface WithExecutions {
|
|
74
|
-
userOp?: never;
|
|
75
|
-
targetExecutions: Execution[];
|
|
76
|
-
}
|
|
77
|
-
interface WithoutOperation {
|
|
78
|
-
userOp?: never;
|
|
79
|
-
targetExecutions?: never;
|
|
80
|
-
}
|
|
81
|
-
type LockMode = 'HOOK' | 'COMPACT';
|
|
82
|
-
interface MetaIntentBase {
|
|
83
|
-
targetAccount: Address;
|
|
84
|
-
targetChainId: number;
|
|
85
|
-
targetGasUnits?: bigint;
|
|
86
|
-
tokenTransfers: TokenTransfer[];
|
|
87
|
-
accountAccessList?: AccountAccessList;
|
|
88
|
-
lockMode?: LockMode;
|
|
89
|
-
omniLock?: boolean;
|
|
90
|
-
}
|
|
91
|
-
type OrderPath = {
|
|
92
|
-
orderBundle: MultiChainCompact;
|
|
93
|
-
injectedExecutions: Execution[];
|
|
94
|
-
intentCost: OrderCost;
|
|
95
|
-
}[];
|
|
96
|
-
type MetaIntentEmpty = MetaIntentBase & WithoutOperation;
|
|
97
|
-
type MetaIntentWithUserOp = MetaIntentBase & WithUserOp;
|
|
98
|
-
type MetaIntentWithExecutions = MetaIntentBase & WithExecutions;
|
|
99
|
-
type MetaIntent = MetaIntentEmpty | MetaIntentWithUserOp | MetaIntentWithExecutions;
|
|
100
|
-
type ChainExecution = Execution & {
|
|
101
|
-
chainId: number;
|
|
102
|
-
};
|
|
103
|
-
interface DepositEvent {
|
|
104
|
-
originClaimPayload: ChainExecution;
|
|
105
|
-
inputToken: Address;
|
|
106
|
-
outputToken: Address;
|
|
107
|
-
inputAmount: bigint;
|
|
108
|
-
outputAmount: bigint;
|
|
109
|
-
destinationChainId: number;
|
|
110
|
-
originChainId: number;
|
|
111
|
-
depositId: bigint;
|
|
112
|
-
quoteTimestamp: number;
|
|
113
|
-
fillDeadline: number;
|
|
114
|
-
exclusivityDeadline: number;
|
|
115
|
-
depositor: Address;
|
|
116
|
-
recipient: Address;
|
|
117
|
-
exclusiveRelayer: Address;
|
|
118
|
-
message: Hex;
|
|
119
|
-
}
|
|
120
|
-
interface BundleEvent {
|
|
121
|
-
bundleId: bigint;
|
|
122
|
-
type: string;
|
|
123
|
-
targetFillPayload: ChainExecution;
|
|
124
|
-
acrossDepositEvents: DepositEvent[];
|
|
125
|
-
}
|
|
126
|
-
interface Witness {
|
|
127
|
-
recipient: Address;
|
|
128
|
-
tokenOut: [bigint, bigint][];
|
|
129
|
-
depositId: bigint;
|
|
130
|
-
targetChain: bigint;
|
|
131
|
-
fillDeadline: number;
|
|
132
|
-
execs: Execution[];
|
|
133
|
-
userOpHash: Hex;
|
|
134
|
-
maxFeeBps: number;
|
|
135
|
-
}
|
|
136
|
-
interface Segment {
|
|
137
|
-
arbiter: Address;
|
|
138
|
-
chainId: bigint;
|
|
139
|
-
idsAndAmounts: [bigint, bigint][];
|
|
140
|
-
witness: Witness;
|
|
141
|
-
}
|
|
142
|
-
interface MultiChainCompact {
|
|
143
|
-
sponsor: Address;
|
|
144
|
-
nonce: bigint;
|
|
145
|
-
expires: bigint;
|
|
146
|
-
segments: Segment[];
|
|
147
|
-
tokenPrices: TokenPrices;
|
|
148
|
-
gasPrices: GasPrices;
|
|
149
|
-
opGasParams: OPNetworkParams;
|
|
150
|
-
}
|
|
151
|
-
interface SignedMultiChainCompact extends MultiChainCompact {
|
|
152
|
-
originSignatures: Hex[];
|
|
153
|
-
targetSignature: Hex;
|
|
154
|
-
}
|
|
155
|
-
interface UserTokenBalance {
|
|
156
|
-
tokenName: string;
|
|
157
|
-
tokenDecimals: number;
|
|
158
|
-
balance: bigint;
|
|
159
|
-
tokenChainBalance: {
|
|
160
|
-
chainId: number;
|
|
161
|
-
tokenAddress: Address;
|
|
162
|
-
balance: bigint;
|
|
163
|
-
}[];
|
|
164
|
-
}
|
|
165
|
-
interface UserChainBalances {
|
|
166
|
-
[chainId: number]: {
|
|
167
|
-
[tokenAddress: Address]: bigint;
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
interface OrderFeeInput {
|
|
171
|
-
targetChainId: number;
|
|
172
|
-
targetGasUnits?: bigint;
|
|
173
|
-
userOp?: {
|
|
174
|
-
callGasLimit: bigint;
|
|
175
|
-
verificationGasLimit: bigint;
|
|
176
|
-
preVerificationGas: bigint;
|
|
177
|
-
};
|
|
178
|
-
tokenTransfers: {
|
|
179
|
-
tokenAddress: Address;
|
|
180
|
-
amount?: bigint;
|
|
181
|
-
}[];
|
|
182
|
-
accountAccessList?: AccountAccessList;
|
|
183
|
-
}
|
|
184
|
-
interface TokenFulfillmentStatus {
|
|
185
|
-
hasFulfilled: boolean;
|
|
186
|
-
tokenAddress: Address;
|
|
187
|
-
amountSpent: bigint;
|
|
188
|
-
targetAmount: bigint;
|
|
189
|
-
fee: bigint;
|
|
190
|
-
}
|
|
191
|
-
interface OrderCost {
|
|
192
|
-
hasFulfilledAll: true;
|
|
193
|
-
tokensSpent: UserChainBalances;
|
|
194
|
-
tokensReceived: TokenFulfillmentStatus[];
|
|
195
|
-
}
|
|
196
|
-
interface InsufficientBalanceResult {
|
|
197
|
-
hasFulfilledAll: false;
|
|
198
|
-
tokenShortfall: {
|
|
199
|
-
tokenAddress: Address;
|
|
200
|
-
targetAmount: bigint;
|
|
201
|
-
amountSpent: bigint;
|
|
202
|
-
fee: bigint;
|
|
203
|
-
tokenSymbol: string;
|
|
204
|
-
tokenDecimals: number;
|
|
205
|
-
}[];
|
|
206
|
-
totalTokenShortfallInUSD: bigint;
|
|
207
|
-
}
|
|
208
|
-
type OrderCostResult = OrderCost | InsufficientBalanceResult;
|
|
209
|
-
type TokenArrays6909 = readonly (readonly [bigint, bigint])[];
|
|
210
|
-
interface TokenConfig {
|
|
211
|
-
symbol: string;
|
|
212
|
-
address: Address;
|
|
213
|
-
decimals: number;
|
|
214
|
-
balanceSlot: (address: Address) => Hex;
|
|
215
|
-
}
|
|
216
|
-
export type TokenPrices = {
|
|
217
|
-
[key in SupportedTokenSymbol]?: number;
|
|
218
|
-
};
|
|
219
|
-
export type GasPrices = {
|
|
220
|
-
[key in SupportedMainnet | SupportedTestnet]?: bigint;
|
|
221
|
-
};
|
|
222
|
-
export type OPNetworkParams = {
|
|
223
|
-
[key in SupportedOPStackMainnet | SupportedOPStackTestnet]?: {
|
|
224
|
-
l1BaseFee: bigint;
|
|
225
|
-
l1BlobBaseFee: bigint;
|
|
226
|
-
baseFeeScalar: bigint;
|
|
227
|
-
blobFeeScalar: bigint;
|
|
228
|
-
};
|
|
229
|
-
} | {
|
|
230
|
-
estimatedCalldataSize: number;
|
|
231
|
-
};
|
|
232
|
-
declare const BUNDLE_STATUS_PENDING = "PENDING";
|
|
233
|
-
declare const BUNDLE_STATUS_FAILED = "FAILED";
|
|
234
|
-
declare const BUNDLE_STATUS_EXPIRED = "EXPIRED";
|
|
235
|
-
declare const BUNDLE_STATUS_PARTIALLY_COMPLETED = "PARTIALLY_COMPLETED";
|
|
236
|
-
declare const BUNDLE_STATUS_COMPLETED = "COMPLETED";
|
|
237
|
-
declare const BUNDLE_STATUS_FILLED = "FILLED";
|
|
238
|
-
declare const BUNDLE_STATUS_PRECONFIRMED = "PRECONFIRMED";
|
|
239
|
-
declare const BUNDLE_STATUS_UNKNOWN = "UNKNOWN";
|
|
240
|
-
export type { AccountAccessList, SupportedChain, BundleStatus, PostOrderBundleResult, MetaIntentEmpty, MetaIntentWithUserOp, MetaIntentWithExecutions, MetaIntent, TokenArrays6909, Execution, BundleResult, BundleEvent, Witness, Segment, MultiChainCompact, SignedMultiChainCompact, UserTokenBalance, OrderPath, UserChainBalances, OrderFeeInput, TokenFulfillmentStatus, OrderCost, InsufficientBalanceResult, OrderCostResult, TokenConfig, };
|
|
241
|
-
export { BUNDLE_STATUS_PENDING, BUNDLE_STATUS_FAILED, BUNDLE_STATUS_EXPIRED, BUNDLE_STATUS_PARTIALLY_COMPLETED, BUNDLE_STATUS_COMPLETED, BUNDLE_STATUS_FILLED, BUNDLE_STATUS_PRECONFIRMED, BUNDLE_STATUS_UNKNOWN, };
|
|
242
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../orchestrator/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAA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