@rhinestone/sdk 0.7.10 → 0.8.1
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/dist/{src/accounts → accounts}/index.d.ts +2 -2
- package/dist/accounts/index.d.ts.map +1 -0
- package/dist/{src/accounts → accounts}/index.js +55 -45
- package/dist/accounts/nexus.d.ts.map +1 -0
- package/dist/{src/accounts → accounts}/nexus.js +48 -42
- package/dist/accounts/safe.d.ts.map +1 -0
- package/dist/{src/accounts → accounts}/safe.js +35 -29
- package/dist/accounts/utils.d.ts.map +1 -0
- package/dist/{src/accounts → accounts}/utils.js +23 -19
- package/dist/execution/index.d.ts.map +1 -0
- package/dist/{src/execution → execution}/index.js +72 -61
- package/dist/execution/smart-session.d.ts.map +1 -0
- package/dist/execution/smart-session.js +85 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/{src/index.js → index.js} +10 -8
- package/dist/modules/abi/smart-sessions.d.ts.map +1 -0
- package/dist/modules/common.d.ts.map +1 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/modules/omni-account.d.ts.map +1 -0
- package/dist/modules/validators/core.d.ts.map +1 -0
- package/dist/modules/validators/index.d.ts.map +1 -0
- package/dist/modules/validators/smart-sessions.d.ts.map +1 -0
- package/dist/orchestrator/client.d.ts.map +1 -0
- package/dist/{cjs/orchestrator → orchestrator}/consts.d.ts +2 -2
- package/dist/orchestrator/consts.d.ts.map +1 -0
- package/dist/{cjs/orchestrator → orchestrator}/consts.js +2 -2
- package/dist/orchestrator/error.d.ts.map +1 -0
- package/dist/orchestrator/index.d.ts.map +1 -0
- package/dist/orchestrator/registry.d.ts.map +1 -0
- package/dist/{src/orchestrator → orchestrator}/types.d.ts +14 -15
- package/dist/orchestrator/types.d.ts.map +1 -0
- package/dist/orchestrator/utils.d.ts.map +1 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +13 -13
- package/dist/cjs/modules/abi/smart-sessions.d.ts.map +0 -1
- package/dist/cjs/modules/common.d.ts.map +0 -1
- package/dist/cjs/modules/index.d.ts.map +0 -1
- package/dist/cjs/modules/omni-account.d.ts.map +0 -1
- package/dist/cjs/modules/validators/core.d.ts.map +0 -1
- package/dist/cjs/modules/validators/index.d.ts.map +0 -1
- package/dist/cjs/modules/validators/smart-sessions.d.ts.map +0 -1
- package/dist/cjs/orchestrator/client.d.ts.map +0 -1
- package/dist/cjs/orchestrator/consts.d.ts.map +0 -1
- package/dist/cjs/orchestrator/error.d.ts.map +0 -1
- package/dist/cjs/orchestrator/index.d.ts.map +0 -1
- package/dist/cjs/orchestrator/registry.d.ts.map +0 -1
- package/dist/cjs/orchestrator/types.d.ts +0 -222
- package/dist/cjs/orchestrator/types.d.ts.map +0 -1
- package/dist/cjs/orchestrator/utils.d.ts.map +0 -1
- package/dist/cjs/types.d.ts.map +0 -1
- package/dist/src/accounts/index.d.ts.map +0 -1
- package/dist/src/accounts/nexus.d.ts.map +0 -1
- package/dist/src/accounts/safe.d.ts.map +0 -1
- package/dist/src/accounts/utils.d.ts.map +0 -1
- package/dist/src/execution/index.d.ts.map +0 -1
- package/dist/src/execution/smart-session.d.ts.map +0 -1
- package/dist/src/execution/smart-session.js +0 -81
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/modules/abi/smart-sessions.d.ts +0 -42
- package/dist/src/modules/abi/smart-sessions.d.ts.map +0 -1
- package/dist/src/modules/abi/smart-sessions.js +0 -128
- package/dist/src/modules/common.d.ts +0 -16
- package/dist/src/modules/common.d.ts.map +0 -1
- package/dist/src/modules/common.js +0 -5
- package/dist/src/modules/index.d.ts +0 -33
- package/dist/src/modules/index.d.ts.map +0 -1
- package/dist/src/modules/index.js +0 -146
- package/dist/src/modules/omni-account.d.ts +0 -9
- package/dist/src/modules/omni-account.d.ts.map +0 -1
- package/dist/src/modules/omni-account.js +0 -7
- package/dist/src/modules/validators/core.d.ts +0 -23
- package/dist/src/modules/validators/core.d.ts.map +0 -1
- package/dist/src/modules/validators/core.js +0 -112
- package/dist/src/modules/validators/index.d.ts +0 -4
- package/dist/src/modules/validators/index.d.ts.map +0 -1
- package/dist/src/modules/validators/index.js +0 -3
- package/dist/src/modules/validators/smart-sessions.d.ts +0 -29
- package/dist/src/modules/validators/smart-sessions.d.ts.map +0 -1
- package/dist/src/modules/validators/smart-sessions.js +0 -414
- package/dist/src/orchestrator/client.d.ts +0 -29
- package/dist/src/orchestrator/client.d.ts.map +0 -1
- package/dist/src/orchestrator/client.js +0 -243
- package/dist/src/orchestrator/consts.d.ts +0 -5
- package/dist/src/orchestrator/consts.d.ts.map +0 -1
- package/dist/src/orchestrator/consts.js +0 -4
- package/dist/src/orchestrator/error.d.ts +0 -18
- package/dist/src/orchestrator/error.d.ts.map +0 -1
- package/dist/src/orchestrator/error.js +0 -28
- package/dist/src/orchestrator/index.d.ts +0 -11
- package/dist/src/orchestrator/index.d.ts.map +0 -1
- package/dist/src/orchestrator/index.js +0 -10
- package/dist/src/orchestrator/registry.d.ts +0 -17
- package/dist/src/orchestrator/registry.d.ts.map +0 -1
- package/dist/src/orchestrator/registry.js +0 -344
- package/dist/src/orchestrator/types.d.ts.map +0 -1
- package/dist/src/orchestrator/types.js +0 -9
- package/dist/src/orchestrator/utils.d.ts +0 -29
- package/dist/src/orchestrator/utils.d.ts.map +0 -1
- package/dist/src/orchestrator/utils.js +0 -303
- package/dist/src/types.d.ts +0 -113
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -1
- package/dist/test/modules/validators/smart-sessions.test.d.ts +0 -2
- package/dist/test/modules/validators/smart-sessions.test.d.ts.map +0 -1
- package/dist/test/modules/validators/smart-sessions.test.js +0 -20
- /package/dist/{src/accounts → accounts}/nexus.d.ts +0 -0
- /package/dist/{src/accounts → accounts}/safe.d.ts +0 -0
- /package/dist/{src/accounts → accounts}/utils.d.ts +0 -0
- /package/dist/{src/execution → execution}/index.d.ts +0 -0
- /package/dist/{src/execution → execution}/smart-session.d.ts +0 -0
- /package/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{cjs/modules → modules}/abi/smart-sessions.d.ts +0 -0
- /package/dist/{cjs/modules → modules}/abi/smart-sessions.js +0 -0
- /package/dist/{cjs/modules → modules}/common.d.ts +0 -0
- /package/dist/{cjs/modules → modules}/common.js +0 -0
- /package/dist/{cjs/modules → modules}/index.d.ts +0 -0
- /package/dist/{cjs/modules → modules}/index.js +0 -0
- /package/dist/{cjs/modules → modules}/omni-account.d.ts +0 -0
- /package/dist/{cjs/modules → modules}/omni-account.js +0 -0
- /package/dist/{cjs/modules → modules}/validators/core.d.ts +0 -0
- /package/dist/{cjs/modules → modules}/validators/core.js +0 -0
- /package/dist/{cjs/modules → modules}/validators/index.d.ts +0 -0
- /package/dist/{cjs/modules → modules}/validators/index.js +0 -0
- /package/dist/{cjs/modules → modules}/validators/smart-sessions.d.ts +0 -0
- /package/dist/{cjs/modules → modules}/validators/smart-sessions.js +0 -0
- /package/dist/{cjs/orchestrator → orchestrator}/client.d.ts +0 -0
- /package/dist/{cjs/orchestrator → orchestrator}/client.js +0 -0
- /package/dist/{cjs/orchestrator → orchestrator}/error.d.ts +0 -0
- /package/dist/{cjs/orchestrator → orchestrator}/error.js +0 -0
- /package/dist/{cjs/orchestrator → orchestrator}/index.d.ts +0 -0
- /package/dist/{cjs/orchestrator → orchestrator}/index.js +0 -0
- /package/dist/{cjs/orchestrator → orchestrator}/registry.d.ts +0 -0
- /package/dist/{cjs/orchestrator → orchestrator}/registry.js +0 -0
- /package/dist/{cjs/orchestrator → orchestrator}/types.js +0 -0
- /package/dist/{cjs/orchestrator → orchestrator}/utils.d.ts +0 -0
- /package/dist/{cjs/orchestrator → orchestrator}/utils.js +0 -0
- /package/dist/{cjs/types.d.ts → types.d.ts} +0 -0
- /package/dist/{cjs/types.js → types.js} +0 -0
|
@@ -1,414 +0,0 @@
|
|
|
1
|
-
import { createPublicClient, encodeAbiParameters, encodeFunctionData, encodePacked, http, isHex, keccak256, padHex, parseAbi, toHex, zeroHash, } from 'viem';
|
|
2
|
-
import { getWethAddress, RHINESTONE_SPOKE_POOL_ADDRESS, } from '../../orchestrator/index.js';
|
|
3
|
-
import { enableSessionsAbi } from '../abi/smart-sessions.js';
|
|
4
|
-
import { MODULE_TYPE_ID_VALIDATOR } from '../common.js';
|
|
5
|
-
import { HOOK_ADDRESS } from '../omni-account.js';
|
|
6
|
-
import { getValidator } from './core.js';
|
|
7
|
-
const SMART_SESSIONS_VALIDATOR_ADDRESS = '0x00000000002b0ecfbd0496ee71e01257da0e37de';
|
|
8
|
-
const SMART_SESSION_MODE_USE = '0x00';
|
|
9
|
-
const SMART_SESSION_MODE_ENABLE = '0x01';
|
|
10
|
-
const SMART_SESSION_MODE_UNSAFE_ENABLE = '0x02';
|
|
11
|
-
const SPENDING_LIMITS_POLICY_ADDRESS = '0x00000088D48cF102A8Cdb0137A9b173f957c6343';
|
|
12
|
-
const TIME_FRAME_POLICY_ADDRESS = '0x8177451511dE0577b911C254E9551D981C26dc72';
|
|
13
|
-
const SUDO_POLICY_ADDRESS = '0x0000003111cD8e92337C100F22B7A9dbf8DEE301';
|
|
14
|
-
const UNIVERSAL_ACTION_POLICY_ADDRESS = '0x0000006DDA6c463511C4e9B05CFc34C1247fCF1F';
|
|
15
|
-
const USAGE_LIMIT_POLICY_ADDRESS = '0x1F34eF8311345A3A4a4566aF321b313052F51493';
|
|
16
|
-
const VALUE_LIMIT_POLICY_ADDRESS = '0x730DA93267E7E513e932301B47F2ac7D062abC83';
|
|
17
|
-
const SMART_SESSIONS_FALLBACK_TARGET_FLAG = '0x0000000000000000000000000000000000000001';
|
|
18
|
-
const SMART_SESSIONS_FALLBACK_TARGET_SELECTOR_FLAG = '0x00000001';
|
|
19
|
-
const ACTION_CONDITION_EQUAL = 0;
|
|
20
|
-
const ACTION_CONDITION_GREATER_THAN = 1;
|
|
21
|
-
const ACTION_CONDITION_LESS_THAN = 2;
|
|
22
|
-
const ACTION_CONDITION_GREATER_THAN_OR_EQUAL = 3;
|
|
23
|
-
const ACTION_CONDITION_LESS_THAN_OR_EQUAL = 4;
|
|
24
|
-
const ACTION_CONDITION_NOT_EQUAL = 5;
|
|
25
|
-
const ACTION_CONDITION_IN_RANGE = 6;
|
|
26
|
-
async function getEnableSessionCall(chain, session) {
|
|
27
|
-
const { appDomainSeparator, contentsType } = await getSessionAllowedERC7739Content(chain);
|
|
28
|
-
const allowedERC7739Content = [
|
|
29
|
-
{
|
|
30
|
-
appDomainSeparator,
|
|
31
|
-
contentName: [contentsType],
|
|
32
|
-
},
|
|
33
|
-
];
|
|
34
|
-
const sessionData = await getSmartSessionData(chain, session, allowedERC7739Content);
|
|
35
|
-
return {
|
|
36
|
-
to: SMART_SESSIONS_VALIDATOR_ADDRESS,
|
|
37
|
-
data: encodeFunctionData({
|
|
38
|
-
abi: enableSessionsAbi,
|
|
39
|
-
functionName: 'enableSessions',
|
|
40
|
-
args: [[sessionData]],
|
|
41
|
-
}),
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
function getOmniAccountActions(chain) {
|
|
45
|
-
const wethAddress = getWethAddress(chain);
|
|
46
|
-
const omniActions = [
|
|
47
|
-
{
|
|
48
|
-
actionTarget: RHINESTONE_SPOKE_POOL_ADDRESS,
|
|
49
|
-
actionTargetSelector: '0xa2418864', // injected execution
|
|
50
|
-
actionPolicies: [getPolicyData({ type: 'sudo' })],
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
actionTarget: HOOK_ADDRESS,
|
|
54
|
-
actionTargetSelector: '0x27c777a9', // injected execution
|
|
55
|
-
actionPolicies: [getPolicyData({ type: 'sudo' })],
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
actionTarget: wethAddress,
|
|
59
|
-
actionTargetSelector: '0xd0e30db0', // deposit
|
|
60
|
-
actionPolicies: [getPolicyData({ type: 'sudo' })],
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
actionTarget: wethAddress,
|
|
64
|
-
actionTargetSelector: '0x2e1a7d4d', // widthdraw
|
|
65
|
-
actionPolicies: [getPolicyData({ type: 'sudo' })],
|
|
66
|
-
},
|
|
67
|
-
];
|
|
68
|
-
return omniActions;
|
|
69
|
-
}
|
|
70
|
-
async function getSessionAllowedERC7739Content(chain) {
|
|
71
|
-
const publicClient = createPublicClient({
|
|
72
|
-
chain,
|
|
73
|
-
transport: http(),
|
|
74
|
-
});
|
|
75
|
-
const appDomainSeparator = await publicClient.readContract({
|
|
76
|
-
address: HOOK_ADDRESS,
|
|
77
|
-
abi: parseAbi(['function DOMAIN_SEPARATOR() view returns (bytes32)']),
|
|
78
|
-
functionName: 'DOMAIN_SEPARATOR',
|
|
79
|
-
});
|
|
80
|
-
const contentsType = 'MultichainCompact(address sponsor,uint256 nonce,uint256 expires,Segment[] segments)Segment(address arbiter,uint256 chainId,uint256[2][] idsAndAmounts,Witness witness)Witness(address recipient,uint256[2][] tokenOut,uint256 depositId,uint256 targetChain,uint32 fillDeadline,XchainExec[] execs,bytes32 userOpHash,uint32 maxFeeBps)XchainExec(address to,uint256 value,bytes data)';
|
|
81
|
-
return {
|
|
82
|
-
appDomainSeparator,
|
|
83
|
-
contentsType,
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
async function getSmartSessionData(chain, session, allowedERC7739Content) {
|
|
87
|
-
const omniActions = getOmniAccountActions(chain);
|
|
88
|
-
const sessionValidator = getValidator(session.owners);
|
|
89
|
-
const userOpPolicies = (session.policies || [
|
|
90
|
-
{
|
|
91
|
-
type: 'sudo',
|
|
92
|
-
},
|
|
93
|
-
]).map((policy) => {
|
|
94
|
-
return getPolicyData(policy);
|
|
95
|
-
});
|
|
96
|
-
return {
|
|
97
|
-
sessionValidator: sessionValidator.address,
|
|
98
|
-
sessionValidatorInitData: sessionValidator.initData,
|
|
99
|
-
salt: session.salt ?? zeroHash,
|
|
100
|
-
userOpPolicies,
|
|
101
|
-
// Using the fallback action by default (any transaction will pass)
|
|
102
|
-
actions: (session.actions || [
|
|
103
|
-
{
|
|
104
|
-
target: SMART_SESSIONS_FALLBACK_TARGET_FLAG,
|
|
105
|
-
selector: SMART_SESSIONS_FALLBACK_TARGET_SELECTOR_FLAG,
|
|
106
|
-
},
|
|
107
|
-
])
|
|
108
|
-
.map((action) => {
|
|
109
|
-
const actionPolicies = (action.policies || [
|
|
110
|
-
{
|
|
111
|
-
type: 'sudo',
|
|
112
|
-
},
|
|
113
|
-
]).map((policy) => {
|
|
114
|
-
return getPolicyData(policy);
|
|
115
|
-
});
|
|
116
|
-
return {
|
|
117
|
-
actionTargetSelector: action.selector,
|
|
118
|
-
actionTarget: action.target,
|
|
119
|
-
actionPolicies,
|
|
120
|
-
};
|
|
121
|
-
})
|
|
122
|
-
.concat(omniActions),
|
|
123
|
-
erc7739Policies: {
|
|
124
|
-
allowedERC7739Content,
|
|
125
|
-
erc1271Policies: [getPolicyData({ type: 'sudo' })],
|
|
126
|
-
},
|
|
127
|
-
permitERC4337Paymaster: true,
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
function getSmartSessionValidator(config) {
|
|
131
|
-
if (!config.sessions) {
|
|
132
|
-
return null;
|
|
133
|
-
}
|
|
134
|
-
return {
|
|
135
|
-
address: SMART_SESSIONS_VALIDATOR_ADDRESS,
|
|
136
|
-
initData: '0x',
|
|
137
|
-
deInitData: '0x',
|
|
138
|
-
additionalContext: '0x',
|
|
139
|
-
type: MODULE_TYPE_ID_VALIDATOR,
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
function getPolicyData(policy) {
|
|
143
|
-
switch (policy.type) {
|
|
144
|
-
case 'sudo':
|
|
145
|
-
return {
|
|
146
|
-
policy: SUDO_POLICY_ADDRESS,
|
|
147
|
-
initData: '0x',
|
|
148
|
-
};
|
|
149
|
-
case 'universal-action': {
|
|
150
|
-
function getCondition(condition) {
|
|
151
|
-
switch (condition) {
|
|
152
|
-
case 'equal':
|
|
153
|
-
return ACTION_CONDITION_EQUAL;
|
|
154
|
-
case 'greaterThan':
|
|
155
|
-
return ACTION_CONDITION_GREATER_THAN;
|
|
156
|
-
case 'lessThan':
|
|
157
|
-
return ACTION_CONDITION_LESS_THAN;
|
|
158
|
-
case 'greaterThanOrEqual':
|
|
159
|
-
return ACTION_CONDITION_GREATER_THAN_OR_EQUAL;
|
|
160
|
-
case 'lessThanOrEqual':
|
|
161
|
-
return ACTION_CONDITION_LESS_THAN_OR_EQUAL;
|
|
162
|
-
case 'notEqual':
|
|
163
|
-
return ACTION_CONDITION_NOT_EQUAL;
|
|
164
|
-
case 'inRange':
|
|
165
|
-
return ACTION_CONDITION_IN_RANGE;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
const MAX_RULES = 16;
|
|
169
|
-
const rules = createFixedArray(MAX_RULES, () => ({
|
|
170
|
-
condition: ACTION_CONDITION_EQUAL,
|
|
171
|
-
offset: 0n,
|
|
172
|
-
isLimited: false,
|
|
173
|
-
ref: zeroHash,
|
|
174
|
-
usage: { limit: 0n, used: 0n },
|
|
175
|
-
}));
|
|
176
|
-
for (let i = 0; i < policy.rules.length; i++) {
|
|
177
|
-
const rule = policy.rules[i];
|
|
178
|
-
const ref = isHex(rule.referenceValue)
|
|
179
|
-
? padHex(rule.referenceValue)
|
|
180
|
-
: toHex(rule.referenceValue, { size: 32 });
|
|
181
|
-
rules[i] = {
|
|
182
|
-
condition: getCondition(rule.condition),
|
|
183
|
-
offset: rule.calldataOffset,
|
|
184
|
-
isLimited: rule.usageLimit !== undefined,
|
|
185
|
-
ref,
|
|
186
|
-
usage: {
|
|
187
|
-
limit: rule.usageLimit ? rule.usageLimit : 0n,
|
|
188
|
-
used: 0n,
|
|
189
|
-
},
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
return {
|
|
193
|
-
policy: UNIVERSAL_ACTION_POLICY_ADDRESS,
|
|
194
|
-
initData: encodeAbiParameters([
|
|
195
|
-
{
|
|
196
|
-
components: [
|
|
197
|
-
{
|
|
198
|
-
name: 'valueLimitPerUse',
|
|
199
|
-
type: 'uint256',
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
components: [
|
|
203
|
-
{
|
|
204
|
-
name: 'length',
|
|
205
|
-
type: 'uint256',
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
components: [
|
|
209
|
-
{
|
|
210
|
-
name: 'condition',
|
|
211
|
-
type: 'uint8',
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
name: 'offset',
|
|
215
|
-
type: 'uint64',
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
name: 'isLimited',
|
|
219
|
-
type: 'bool',
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
name: 'ref',
|
|
223
|
-
type: 'bytes32',
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
components: [
|
|
227
|
-
{
|
|
228
|
-
name: 'limit',
|
|
229
|
-
type: 'uint256',
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
name: 'used',
|
|
233
|
-
type: 'uint256',
|
|
234
|
-
},
|
|
235
|
-
],
|
|
236
|
-
name: 'usage',
|
|
237
|
-
type: 'tuple',
|
|
238
|
-
},
|
|
239
|
-
],
|
|
240
|
-
name: 'rules',
|
|
241
|
-
type: 'tuple[16]',
|
|
242
|
-
},
|
|
243
|
-
],
|
|
244
|
-
name: 'paramRules',
|
|
245
|
-
type: 'tuple',
|
|
246
|
-
},
|
|
247
|
-
],
|
|
248
|
-
name: 'ActionConfig',
|
|
249
|
-
type: 'tuple',
|
|
250
|
-
},
|
|
251
|
-
], [
|
|
252
|
-
{
|
|
253
|
-
valueLimitPerUse: policy.valueLimitPerUse ?? 0n,
|
|
254
|
-
paramRules: {
|
|
255
|
-
length: BigInt(policy.rules.length),
|
|
256
|
-
rules: rules,
|
|
257
|
-
},
|
|
258
|
-
},
|
|
259
|
-
]),
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
case 'spending-limits': {
|
|
263
|
-
const tokens = policy.limits.map(({ token }) => token);
|
|
264
|
-
const limits = policy.limits.map(({ amount }) => amount);
|
|
265
|
-
return {
|
|
266
|
-
policy: SPENDING_LIMITS_POLICY_ADDRESS,
|
|
267
|
-
initData: encodeAbiParameters([{ type: 'address[]' }, { type: 'uint256[]' }], [tokens, limits]),
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
case 'time-frame': {
|
|
271
|
-
return {
|
|
272
|
-
policy: TIME_FRAME_POLICY_ADDRESS,
|
|
273
|
-
initData: encodePacked(['uint128', 'uint128'], [
|
|
274
|
-
BigInt(policy.validUntil) / 1000n,
|
|
275
|
-
BigInt(policy.validAfter) / 1000n,
|
|
276
|
-
]),
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
case 'usage-limit': {
|
|
280
|
-
return {
|
|
281
|
-
policy: USAGE_LIMIT_POLICY_ADDRESS,
|
|
282
|
-
initData: encodePacked(['uint128'], [policy.limit]),
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
case 'value-limit': {
|
|
286
|
-
return {
|
|
287
|
-
policy: VALUE_LIMIT_POLICY_ADDRESS,
|
|
288
|
-
initData: encodeAbiParameters([{ type: 'uint256' }], [policy.limit]),
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
function createFixedArray(length, getValue) {
|
|
294
|
-
return Array.from({ length }, (_, i) => getValue(i));
|
|
295
|
-
}
|
|
296
|
-
async function isSessionEnabled(client, address, permissionId) {
|
|
297
|
-
return await client.readContract({
|
|
298
|
-
address: SMART_SESSIONS_VALIDATOR_ADDRESS,
|
|
299
|
-
abi: [
|
|
300
|
-
{
|
|
301
|
-
inputs: [
|
|
302
|
-
{
|
|
303
|
-
internalType: 'PermissionId',
|
|
304
|
-
name: 'permissionId',
|
|
305
|
-
type: 'bytes32',
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
internalType: 'address',
|
|
309
|
-
name: 'account',
|
|
310
|
-
type: 'address',
|
|
311
|
-
},
|
|
312
|
-
],
|
|
313
|
-
name: 'isPermissionEnabled',
|
|
314
|
-
outputs: [
|
|
315
|
-
{
|
|
316
|
-
internalType: 'bool',
|
|
317
|
-
name: '',
|
|
318
|
-
type: 'bool',
|
|
319
|
-
},
|
|
320
|
-
],
|
|
321
|
-
stateMutability: 'view',
|
|
322
|
-
type: 'function',
|
|
323
|
-
},
|
|
324
|
-
],
|
|
325
|
-
functionName: 'isPermissionEnabled',
|
|
326
|
-
args: [permissionId, address],
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
function encodeSmartSessionSignature(mode, permissionId, signature) {
|
|
330
|
-
switch (mode) {
|
|
331
|
-
case SMART_SESSION_MODE_USE:
|
|
332
|
-
return encodePacked(['bytes1', 'bytes32', 'bytes'], [mode, permissionId, signature]);
|
|
333
|
-
case SMART_SESSION_MODE_ENABLE:
|
|
334
|
-
case SMART_SESSION_MODE_UNSAFE_ENABLE:
|
|
335
|
-
throw new Error('Enable mode not implemented');
|
|
336
|
-
default:
|
|
337
|
-
throw new Error(`Unknown mode ${mode}`);
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
function getPermissionId(session) {
|
|
341
|
-
const sessionValidator = getValidator(session.owners);
|
|
342
|
-
return keccak256(encodeAbiParameters([
|
|
343
|
-
{
|
|
344
|
-
type: 'address',
|
|
345
|
-
name: 'sessionValidator',
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
type: 'bytes',
|
|
349
|
-
name: 'sessionValidatorInitData',
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
type: 'bytes32',
|
|
353
|
-
name: 'salt',
|
|
354
|
-
},
|
|
355
|
-
], [
|
|
356
|
-
sessionValidator.address,
|
|
357
|
-
sessionValidator.initData,
|
|
358
|
-
session.salt ?? zeroHash,
|
|
359
|
-
]));
|
|
360
|
-
}
|
|
361
|
-
async function getAccountEIP712Domain(client, account) {
|
|
362
|
-
const data = await client.readContract({
|
|
363
|
-
address: account,
|
|
364
|
-
abi: [
|
|
365
|
-
{
|
|
366
|
-
type: 'function',
|
|
367
|
-
name: 'eip712Domain',
|
|
368
|
-
inputs: [],
|
|
369
|
-
outputs: [
|
|
370
|
-
{
|
|
371
|
-
type: 'bytes1',
|
|
372
|
-
name: 'fields,',
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
type: 'string',
|
|
376
|
-
name: 'name',
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
type: 'string',
|
|
380
|
-
name: 'version',
|
|
381
|
-
},
|
|
382
|
-
{
|
|
383
|
-
type: 'uint256',
|
|
384
|
-
name: 'chainId',
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
type: 'address',
|
|
388
|
-
name: 'verifyingContract',
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
type: 'bytes32',
|
|
392
|
-
name: 'salt',
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
type: 'uint256[]',
|
|
396
|
-
name: 'extensions',
|
|
397
|
-
},
|
|
398
|
-
],
|
|
399
|
-
stateMutability: 'view',
|
|
400
|
-
constant: true,
|
|
401
|
-
},
|
|
402
|
-
],
|
|
403
|
-
functionName: 'eip712Domain',
|
|
404
|
-
args: [],
|
|
405
|
-
});
|
|
406
|
-
return {
|
|
407
|
-
name: data[1],
|
|
408
|
-
version: data[2],
|
|
409
|
-
chainId: data[3],
|
|
410
|
-
verifyingContract: data[4],
|
|
411
|
-
salt: data[5],
|
|
412
|
-
};
|
|
413
|
-
}
|
|
414
|
-
export { SMART_SESSION_MODE_USE, SMART_SESSION_MODE_ENABLE, SMART_SESSIONS_VALIDATOR_ADDRESS, getSmartSessionValidator, getEnableSessionCall, encodeSmartSessionSignature, getPermissionId, getAccountEIP712Domain, isSessionEnabled, getSessionAllowedERC7739Content, };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type Address, type Hex } from 'viem';
|
|
2
|
-
import type { UserOperation } from 'viem/account-abstraction';
|
|
3
|
-
import type { BundleEvent, BundleResult, MetaIntent, OrderCostResult, OrderFeeInput, OrderPath, PostOrderBundleResult, SignedMultiChainCompact, UserTokenBalance } from './types';
|
|
4
|
-
export declare class Orchestrator {
|
|
5
|
-
private serverUrl;
|
|
6
|
-
private apiKey;
|
|
7
|
-
constructor(serverUrl: string, apiKey: string);
|
|
8
|
-
getPortfolio(userAddress: Address, filter?: {
|
|
9
|
-
chainIds?: number[];
|
|
10
|
-
tokens?: {
|
|
11
|
-
[chainId: number]: Address[];
|
|
12
|
-
};
|
|
13
|
-
}): Promise<UserTokenBalance[]>;
|
|
14
|
-
getMaxTokenAmount(userAddress: Address, targetChainId: number, targetTokenAddress: Address, targetGasUnits: bigint): Promise<bigint>;
|
|
15
|
-
getIntentCost(intent: OrderFeeInput, userAddress: Address): Promise<OrderCostResult>;
|
|
16
|
-
getOrderPath(intent: MetaIntent, userAddress: Address): Promise<OrderPath>;
|
|
17
|
-
postSignedOrderBundle(signedOrderBundles: {
|
|
18
|
-
signedOrderBundle: SignedMultiChainCompact;
|
|
19
|
-
initCode?: Hex;
|
|
20
|
-
userOp?: UserOperation;
|
|
21
|
-
}[]): Promise<PostOrderBundleResult>;
|
|
22
|
-
getBundleStatus(bundleId: bigint): Promise<BundleResult>;
|
|
23
|
-
getPendingBundles(count?: number, offset?: number): Promise<{
|
|
24
|
-
pendingBundles: BundleEvent[];
|
|
25
|
-
nextOffset?: number;
|
|
26
|
-
}>;
|
|
27
|
-
private parseError;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../orchestrator/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,OAAO,EAAU,KAAK,GAAG,EAAE,MAAM,MAAM,CAAA;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAG7D,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EACZ,UAAU,EACV,eAAe,EACf,aAAa,EACb,SAAS,EACT,qBAAqB,EACrB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAShB,qBAAa,YAAY;IACvB,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,MAAM,CAAQ;gBAEV,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAKvC,YAAY,CAChB,WAAW,EAAE,OAAO,EACpB,MAAM,CAAC,EAAE;QACP,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,MAAM,CAAC,EAAE;YACP,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,EAAE,CAAA;SAC7B,CAAA;KACF,GACA,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAwCxB,iBAAiB,CACrB,WAAW,EAAE,OAAO,EACpB,aAAa,EAAE,MAAM,EACrB,kBAAkB,EAAE,OAAO,EAC3B,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,MAAM,CAAC;IAgCZ,aAAa,CACjB,MAAM,EAAE,aAAa,EACrB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,eAAe,CAAC;IAqBrB,YAAY,CAChB,MAAM,EAAE,UAAU,EAClB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,SAAS,CAAC;IAgCf,qBAAqB,CACzB,kBAAkB,EAAE;QAClB,iBAAiB,EAAE,uBAAuB,CAAA;QAC1C,QAAQ,CAAC,EAAE,GAAG,CAAA;QACd,MAAM,CAAC,EAAE,aAAa,CAAA;KACvB,EAAE,GACF,OAAO,CAAC,qBAAqB,CAAC;IA2C3B,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAyBxD,iBAAiB,CACrB,KAAK,GAAE,MAAW,EAClB,MAAM,GAAE,MAAU,GACjB,OAAO,CAAC;QAAE,cAAc,EAAE,WAAW,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAuBlE,OAAO,CAAC,UAAU;CA6DnB"}
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
|
-
import { concat } from 'viem';
|
|
3
|
-
import { OrchestratorError } from './error.js';
|
|
4
|
-
import { convertBigIntFields, parseCompactResponse, parseOrderCost, parseOrderCostResult, parsePendingBundleEvent, } from './utils.js';
|
|
5
|
-
export class Orchestrator {
|
|
6
|
-
serverUrl;
|
|
7
|
-
apiKey;
|
|
8
|
-
constructor(serverUrl, apiKey) {
|
|
9
|
-
this.serverUrl = serverUrl;
|
|
10
|
-
this.apiKey = apiKey;
|
|
11
|
-
}
|
|
12
|
-
async getPortfolio(userAddress, filter) {
|
|
13
|
-
try {
|
|
14
|
-
const response = await axios.get(`${this.serverUrl}/accounts/${userAddress}/portfolio`, {
|
|
15
|
-
params: {
|
|
16
|
-
chainIds: filter?.chainIds,
|
|
17
|
-
tokens: filter?.tokens
|
|
18
|
-
? Object.entries(filter.tokens)
|
|
19
|
-
.map(([chainId, tokens]) => tokens.map((token) => `${chainId}:${token}`))
|
|
20
|
-
.reduce(concat, [])
|
|
21
|
-
: undefined,
|
|
22
|
-
},
|
|
23
|
-
headers: {
|
|
24
|
-
'x-api-key': this.apiKey,
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
return response.data.portfolio.map((balance) => {
|
|
28
|
-
return {
|
|
29
|
-
...balance,
|
|
30
|
-
balance: BigInt(balance.balance),
|
|
31
|
-
tokenChainBalance: balance.tokenChainBalance.map((chainBalance) => {
|
|
32
|
-
return {
|
|
33
|
-
...chainBalance,
|
|
34
|
-
balance: BigInt(chainBalance.balance),
|
|
35
|
-
};
|
|
36
|
-
}),
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
catch (error) {
|
|
41
|
-
this.parseError(error);
|
|
42
|
-
throw new Error('Failed to get portfolio');
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
async getMaxTokenAmount(userAddress, targetChainId, targetTokenAddress, targetGasUnits) {
|
|
46
|
-
const intentCost = await this.getIntentCost({
|
|
47
|
-
targetChainId,
|
|
48
|
-
targetGasUnits,
|
|
49
|
-
tokenTransfers: [
|
|
50
|
-
{
|
|
51
|
-
tokenAddress: targetTokenAddress,
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
}, userAddress);
|
|
55
|
-
if (!intentCost.hasFulfilledAll) {
|
|
56
|
-
return 0n;
|
|
57
|
-
}
|
|
58
|
-
const tokenReceived = intentCost.tokensReceived.find((token) => token.tokenAddress.toLowerCase() === targetTokenAddress.toLowerCase());
|
|
59
|
-
if (!tokenReceived) {
|
|
60
|
-
return 0n;
|
|
61
|
-
}
|
|
62
|
-
const tokenAmount = tokenReceived.targetAmount;
|
|
63
|
-
if (tokenAmount < 0n) {
|
|
64
|
-
throw new Error(`Balance not available. Make sure the account is deployed`);
|
|
65
|
-
}
|
|
66
|
-
return tokenReceived.targetAmount;
|
|
67
|
-
}
|
|
68
|
-
async getIntentCost(intent, userAddress) {
|
|
69
|
-
try {
|
|
70
|
-
const response = await axios.post(`${this.serverUrl}/accounts/${userAddress}/bundles/cost`, {
|
|
71
|
-
...convertBigIntFields(intent),
|
|
72
|
-
}, {
|
|
73
|
-
headers: {
|
|
74
|
-
'x-api-key': this.apiKey,
|
|
75
|
-
},
|
|
76
|
-
});
|
|
77
|
-
return parseOrderCostResult(response.data);
|
|
78
|
-
}
|
|
79
|
-
catch (error) {
|
|
80
|
-
this.parseError(error);
|
|
81
|
-
throw new Error(error);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
async getOrderPath(intent, userAddress) {
|
|
85
|
-
try {
|
|
86
|
-
const response = await axios.post(`${this.serverUrl}/accounts/${userAddress}/bundles/path`, {
|
|
87
|
-
...convertBigIntFields(intent),
|
|
88
|
-
}, {
|
|
89
|
-
headers: {
|
|
90
|
-
'x-api-key': this.apiKey,
|
|
91
|
-
},
|
|
92
|
-
});
|
|
93
|
-
return response.data.orderBundles.map((orderPath) => {
|
|
94
|
-
return {
|
|
95
|
-
orderBundle: parseCompactResponse(orderPath.orderBundle),
|
|
96
|
-
injectedExecutions: orderPath.injectedExecutions.map((exec) => {
|
|
97
|
-
return {
|
|
98
|
-
...exec,
|
|
99
|
-
value: BigInt(exec.value),
|
|
100
|
-
};
|
|
101
|
-
}),
|
|
102
|
-
intentCost: parseOrderCost(orderPath.intentCost),
|
|
103
|
-
};
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
catch (error) {
|
|
107
|
-
this.parseError(error);
|
|
108
|
-
throw new Error(error);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
async postSignedOrderBundle(signedOrderBundles) {
|
|
112
|
-
try {
|
|
113
|
-
const bundles = signedOrderBundles.map((signedOrderBundle) => {
|
|
114
|
-
return {
|
|
115
|
-
signedOrderBundle: convertBigIntFields(signedOrderBundle.signedOrderBundle),
|
|
116
|
-
initCode: signedOrderBundle.initCode,
|
|
117
|
-
userOp: signedOrderBundle.userOp
|
|
118
|
-
? convertBigIntFields(signedOrderBundle.userOp)
|
|
119
|
-
: undefined,
|
|
120
|
-
};
|
|
121
|
-
});
|
|
122
|
-
const response = await axios.post(`${this.serverUrl}/bundles`, {
|
|
123
|
-
bundles,
|
|
124
|
-
}, {
|
|
125
|
-
headers: {
|
|
126
|
-
'x-api-key': this.apiKey,
|
|
127
|
-
},
|
|
128
|
-
});
|
|
129
|
-
return response.data.bundleResults.map((bundleResult) => {
|
|
130
|
-
return {
|
|
131
|
-
...bundleResult,
|
|
132
|
-
bundleId: BigInt(bundleResult.bundleId),
|
|
133
|
-
};
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
catch (error) {
|
|
137
|
-
this.parseError(error);
|
|
138
|
-
throw new Error('Failed to post order bundle');
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
async getBundleStatus(bundleId) {
|
|
142
|
-
try {
|
|
143
|
-
const response = await axios.get(`${this.serverUrl}/bundles/${bundleId.toString()}`, {
|
|
144
|
-
headers: {
|
|
145
|
-
'x-api-key': this.apiKey,
|
|
146
|
-
},
|
|
147
|
-
});
|
|
148
|
-
response.data.claims = response.data.claims.map((claim) => {
|
|
149
|
-
return {
|
|
150
|
-
...claim,
|
|
151
|
-
depositId: BigInt(claim.depositId),
|
|
152
|
-
};
|
|
153
|
-
});
|
|
154
|
-
return response.data;
|
|
155
|
-
}
|
|
156
|
-
catch (error) {
|
|
157
|
-
this.parseError(error);
|
|
158
|
-
throw new Error('Failed to get bundle status');
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
async getPendingBundles(count = 20, offset = 0) {
|
|
162
|
-
try {
|
|
163
|
-
const response = await axios.get(`${this.serverUrl}/bundles/events`, {
|
|
164
|
-
params: {
|
|
165
|
-
count,
|
|
166
|
-
offset,
|
|
167
|
-
},
|
|
168
|
-
headers: {
|
|
169
|
-
'x-api-key': this.apiKey,
|
|
170
|
-
},
|
|
171
|
-
});
|
|
172
|
-
const { events: pendingBundles, nextOffset } = response.data;
|
|
173
|
-
return {
|
|
174
|
-
pendingBundles: pendingBundles.map(parsePendingBundleEvent),
|
|
175
|
-
nextOffset,
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
catch (error) {
|
|
179
|
-
this.parseError(error);
|
|
180
|
-
throw new Error('Failed to get pending bundles');
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
parseError(error) {
|
|
184
|
-
if (error.response) {
|
|
185
|
-
let errorType;
|
|
186
|
-
if (error.response.status) {
|
|
187
|
-
switch (error.response.status) {
|
|
188
|
-
case 400:
|
|
189
|
-
errorType = 'Bad Request';
|
|
190
|
-
break;
|
|
191
|
-
case 401:
|
|
192
|
-
errorType = 'Unauthorized';
|
|
193
|
-
break;
|
|
194
|
-
case 403:
|
|
195
|
-
errorType = 'Forbidden';
|
|
196
|
-
break;
|
|
197
|
-
case 404:
|
|
198
|
-
errorType = 'Not Found';
|
|
199
|
-
break;
|
|
200
|
-
case 409:
|
|
201
|
-
errorType = 'Conflict';
|
|
202
|
-
break;
|
|
203
|
-
case 422:
|
|
204
|
-
errorType = 'Unprocessable Entity';
|
|
205
|
-
break;
|
|
206
|
-
case 500:
|
|
207
|
-
errorType = 'Internal Server Error';
|
|
208
|
-
break;
|
|
209
|
-
default:
|
|
210
|
-
errorType = 'Unknown';
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
let context = {};
|
|
214
|
-
if (error.response.data) {
|
|
215
|
-
const { errors, traceId } = error.response.data;
|
|
216
|
-
for (const err of errors) {
|
|
217
|
-
let errorMessage = `Rhinestone Error: ${err.message}`;
|
|
218
|
-
if (errorType) {
|
|
219
|
-
errorMessage += ` (${errorType})`;
|
|
220
|
-
}
|
|
221
|
-
if (traceId) {
|
|
222
|
-
errorMessage += ` [Trace ID: ${traceId}]`;
|
|
223
|
-
context.traceId = traceId;
|
|
224
|
-
}
|
|
225
|
-
console.error(errorMessage);
|
|
226
|
-
if (err.context) {
|
|
227
|
-
console.error(`Context: ${JSON.stringify(err.context, undefined, 4)}`);
|
|
228
|
-
}
|
|
229
|
-
context = { ...context, ...err.context };
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
else {
|
|
233
|
-
console.error(error);
|
|
234
|
-
}
|
|
235
|
-
throw new OrchestratorError({
|
|
236
|
-
message: error.response.data.errors[0].message,
|
|
237
|
-
context,
|
|
238
|
-
errorType,
|
|
239
|
-
traceId: context.traceId,
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
declare const PROD_ORCHESTRATOR_URL = "https://orchestrator.rhinestone.wtf";
|
|
2
|
-
declare const DEV_ORCHESTRATOR_URL = "https://dev.orchestrator.rhinestone.wtf";
|
|
3
|
-
declare const RHINESTONE_SPOKE_POOL_ADDRESS = "0x000000000060f6e853447881951574cdd0663530";
|
|
4
|
-
export { PROD_ORCHESTRATOR_URL, DEV_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS, };
|
|
5
|
-
//# sourceMappingURL=consts.d.ts.map
|