@vaultum/sdk 0.1.5
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 +56 -0
- package/dist/index.d.mts +2203 -0
- package/dist/index.d.ts +2203 -0
- package/dist/index.js +2019 -0
- package/dist/index.mjs +1982 -0
- package/package.json +63 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2203 @@
|
|
|
1
|
+
import { Address, Hex, TypedDataDefinition } from 'viem';
|
|
2
|
+
|
|
3
|
+
interface RetryConfig {
|
|
4
|
+
maxAttempts?: number;
|
|
5
|
+
baseDelayMs?: number;
|
|
6
|
+
maxDelayMs?: number;
|
|
7
|
+
}
|
|
8
|
+
interface RequestContext {
|
|
9
|
+
method: string;
|
|
10
|
+
path: string;
|
|
11
|
+
headers: Record<string, string>;
|
|
12
|
+
body?: unknown;
|
|
13
|
+
}
|
|
14
|
+
interface ResponseContext {
|
|
15
|
+
status: number;
|
|
16
|
+
headers: Headers;
|
|
17
|
+
data: unknown;
|
|
18
|
+
}
|
|
19
|
+
type RequestInterceptor = (ctx: RequestContext) => RequestContext | Promise<RequestContext>;
|
|
20
|
+
type ResponseInterceptor = (ctx: ResponseContext) => ResponseContext | Promise<ResponseContext>;
|
|
21
|
+
interface VaultumConfig {
|
|
22
|
+
baseURL: string;
|
|
23
|
+
apiKey?: string;
|
|
24
|
+
bearer?: string;
|
|
25
|
+
chain?: string;
|
|
26
|
+
timeout?: number;
|
|
27
|
+
retry?: RetryConfig | boolean;
|
|
28
|
+
onRequest?: RequestInterceptor;
|
|
29
|
+
onResponse?: ResponseInterceptor;
|
|
30
|
+
}
|
|
31
|
+
interface ApiUser {
|
|
32
|
+
id: number;
|
|
33
|
+
email?: string | null;
|
|
34
|
+
name?: string | null;
|
|
35
|
+
is_admin?: boolean;
|
|
36
|
+
}
|
|
37
|
+
interface AuthTokenResponse<TUser = ApiUser> {
|
|
38
|
+
user: TUser;
|
|
39
|
+
token: string;
|
|
40
|
+
type: string;
|
|
41
|
+
abilities?: string[];
|
|
42
|
+
requires_wallet?: boolean;
|
|
43
|
+
}
|
|
44
|
+
interface AuthMeResponse<TUser = ApiUser> {
|
|
45
|
+
user: TUser;
|
|
46
|
+
}
|
|
47
|
+
interface LogoutResponse {
|
|
48
|
+
message: string;
|
|
49
|
+
}
|
|
50
|
+
interface WalletChallengeResponse {
|
|
51
|
+
message: string;
|
|
52
|
+
expiresAt: string;
|
|
53
|
+
}
|
|
54
|
+
interface UserWalletInfo {
|
|
55
|
+
address: Address;
|
|
56
|
+
chainId: number;
|
|
57
|
+
type: string;
|
|
58
|
+
}
|
|
59
|
+
interface WalletsResponse {
|
|
60
|
+
wallets: UserWalletInfo[];
|
|
61
|
+
}
|
|
62
|
+
interface PackedUserOperation {
|
|
63
|
+
sender: Address;
|
|
64
|
+
nonce: bigint;
|
|
65
|
+
initCode: Hex;
|
|
66
|
+
callData: Hex;
|
|
67
|
+
accountGasLimits: Hex;
|
|
68
|
+
preVerificationGas: bigint;
|
|
69
|
+
gasFees: Hex;
|
|
70
|
+
paymasterAndData: Hex;
|
|
71
|
+
signature: Hex;
|
|
72
|
+
}
|
|
73
|
+
interface UserOperation {
|
|
74
|
+
sender: Address;
|
|
75
|
+
nonce: Hex;
|
|
76
|
+
initCode: Hex;
|
|
77
|
+
callData: Hex;
|
|
78
|
+
callGasLimit: Hex;
|
|
79
|
+
verificationGasLimit: Hex;
|
|
80
|
+
preVerificationGas: Hex;
|
|
81
|
+
maxFeePerGas: Hex;
|
|
82
|
+
maxPriorityFeePerGas: Hex;
|
|
83
|
+
paymasterAndData: Hex;
|
|
84
|
+
signature: Hex;
|
|
85
|
+
}
|
|
86
|
+
interface UserOpGasLimits {
|
|
87
|
+
verificationGasLimit: bigint;
|
|
88
|
+
callGasLimit: bigint;
|
|
89
|
+
preVerificationGas: bigint;
|
|
90
|
+
maxFeePerGas: bigint;
|
|
91
|
+
maxPriorityFeePerGas: bigint;
|
|
92
|
+
}
|
|
93
|
+
interface OperationResult {
|
|
94
|
+
id: string;
|
|
95
|
+
state: 'queued' | 'sent' | 'retrying' | 'success' | 'failed';
|
|
96
|
+
txHash?: Hex;
|
|
97
|
+
userOpHash?: Hex;
|
|
98
|
+
error?: string;
|
|
99
|
+
}
|
|
100
|
+
interface UserOpSimulationResponse {
|
|
101
|
+
ok: boolean;
|
|
102
|
+
result: Record<string, unknown>;
|
|
103
|
+
fallback?: string;
|
|
104
|
+
}
|
|
105
|
+
interface WaitOptions {
|
|
106
|
+
timeout?: number;
|
|
107
|
+
interval?: number;
|
|
108
|
+
signal?: AbortSignal;
|
|
109
|
+
onProgress?: (result: OperationResult) => void;
|
|
110
|
+
}
|
|
111
|
+
interface AccountCreateResult {
|
|
112
|
+
chain: string;
|
|
113
|
+
factory: Address;
|
|
114
|
+
address: Address;
|
|
115
|
+
config: {
|
|
116
|
+
owners: Address[];
|
|
117
|
+
threshold: number;
|
|
118
|
+
securityCouncil: Address;
|
|
119
|
+
salt: Hex;
|
|
120
|
+
};
|
|
121
|
+
userOp: Record<string, unknown>;
|
|
122
|
+
}
|
|
123
|
+
interface AccountVerifyResult {
|
|
124
|
+
address: Address;
|
|
125
|
+
exists: boolean;
|
|
126
|
+
owners: Address[];
|
|
127
|
+
threshold: number | null;
|
|
128
|
+
balance: string;
|
|
129
|
+
chain: string;
|
|
130
|
+
isSmartAccount: boolean;
|
|
131
|
+
}
|
|
132
|
+
interface VaultState {
|
|
133
|
+
address: Address;
|
|
134
|
+
chain: string;
|
|
135
|
+
owners: Address[];
|
|
136
|
+
threshold: number | null;
|
|
137
|
+
balanceWei: string;
|
|
138
|
+
}
|
|
139
|
+
interface FeatureInfo {
|
|
140
|
+
implementation: Address;
|
|
141
|
+
enabled: boolean;
|
|
142
|
+
mandatory: boolean;
|
|
143
|
+
reserved: string;
|
|
144
|
+
}
|
|
145
|
+
interface SessionKeyInfo {
|
|
146
|
+
wallet: Address;
|
|
147
|
+
sessionKey: Address;
|
|
148
|
+
chain: string;
|
|
149
|
+
manager: Address;
|
|
150
|
+
status: SessionKeyStatus | null;
|
|
151
|
+
info: {
|
|
152
|
+
expiry: string;
|
|
153
|
+
nonce: string;
|
|
154
|
+
maxValuePerCall: string;
|
|
155
|
+
} | null;
|
|
156
|
+
roles: Hex[];
|
|
157
|
+
tokenLimits: TokenLimitStatus[];
|
|
158
|
+
}
|
|
159
|
+
interface SessionKeyList {
|
|
160
|
+
wallet: Address;
|
|
161
|
+
chain: string;
|
|
162
|
+
manager: Address;
|
|
163
|
+
sessionKeys: Address[];
|
|
164
|
+
}
|
|
165
|
+
interface SessionKeyStatus {
|
|
166
|
+
active: boolean;
|
|
167
|
+
startTime: number;
|
|
168
|
+
expiry: number;
|
|
169
|
+
lastResetTime: number;
|
|
170
|
+
nonce: number;
|
|
171
|
+
maxValuePerCall: string;
|
|
172
|
+
paused: boolean;
|
|
173
|
+
}
|
|
174
|
+
interface TokenLimitStatus {
|
|
175
|
+
token: Address;
|
|
176
|
+
limit: string;
|
|
177
|
+
spent: string;
|
|
178
|
+
remaining: string;
|
|
179
|
+
}
|
|
180
|
+
interface SpendingLimitStatus {
|
|
181
|
+
wallet: Address;
|
|
182
|
+
chain: string;
|
|
183
|
+
manager: Address;
|
|
184
|
+
activeNativeLimits: Array<{
|
|
185
|
+
window: number;
|
|
186
|
+
amount: string;
|
|
187
|
+
available: string;
|
|
188
|
+
utilizationBps: string;
|
|
189
|
+
}>;
|
|
190
|
+
}
|
|
191
|
+
interface AllowlistStatus {
|
|
192
|
+
wallet: Address;
|
|
193
|
+
chain: string;
|
|
194
|
+
allowlistEnabled: boolean;
|
|
195
|
+
addressRoot: Hex | null;
|
|
196
|
+
selectorRoot: Hex | null;
|
|
197
|
+
manager: Address;
|
|
198
|
+
}
|
|
199
|
+
interface GuardianConfig {
|
|
200
|
+
wallet: Address;
|
|
201
|
+
chain: string;
|
|
202
|
+
guardians: Address[];
|
|
203
|
+
threshold: number | null;
|
|
204
|
+
timelock: number | null;
|
|
205
|
+
guardianSetHash: Hex | null;
|
|
206
|
+
manager: Address;
|
|
207
|
+
}
|
|
208
|
+
interface RecoveryProposal {
|
|
209
|
+
proposalId: Hex;
|
|
210
|
+
proposedOwner: Address;
|
|
211
|
+
executeAfter: number;
|
|
212
|
+
approvalCount: number;
|
|
213
|
+
executed: boolean;
|
|
214
|
+
active: boolean;
|
|
215
|
+
}
|
|
216
|
+
interface RecoveryStatus {
|
|
217
|
+
wallet: Address;
|
|
218
|
+
chain: string;
|
|
219
|
+
recoveryActive: boolean;
|
|
220
|
+
proposal: RecoveryProposal | null;
|
|
221
|
+
manager: Address;
|
|
222
|
+
}
|
|
223
|
+
interface AggregatedRecoveryStatus {
|
|
224
|
+
status: 'pending' | 'ready';
|
|
225
|
+
chain: string;
|
|
226
|
+
chainId: number;
|
|
227
|
+
wallet: Address;
|
|
228
|
+
proposedOwner: Address;
|
|
229
|
+
proposalId: Hex | null;
|
|
230
|
+
executeAfter: number | null;
|
|
231
|
+
guardianSetHash: Hex;
|
|
232
|
+
threshold: number;
|
|
233
|
+
validUntil: number;
|
|
234
|
+
collected: number;
|
|
235
|
+
guardians: Address[];
|
|
236
|
+
}
|
|
237
|
+
interface AggregatedRecoveryInitiateResponse {
|
|
238
|
+
status: 'initiated' | 'needs_onchain_initiation';
|
|
239
|
+
chain: string;
|
|
240
|
+
chainId: number;
|
|
241
|
+
wallet: Address;
|
|
242
|
+
proposedOwner: Address;
|
|
243
|
+
manager: Address;
|
|
244
|
+
proposalId: Hex | null;
|
|
245
|
+
executeAfter: number | null;
|
|
246
|
+
threshold: number;
|
|
247
|
+
timelock: number;
|
|
248
|
+
guardianSetHash: Hex;
|
|
249
|
+
guardianCount: number;
|
|
250
|
+
validUntil: number;
|
|
251
|
+
digest?: Hex;
|
|
252
|
+
initiateCalldata: Hex;
|
|
253
|
+
}
|
|
254
|
+
interface AggregatedRecoveryPrepareExecutionResponse {
|
|
255
|
+
wallet: Address;
|
|
256
|
+
proposedOwner: Address;
|
|
257
|
+
chain: string;
|
|
258
|
+
chainId: number;
|
|
259
|
+
proposalId: Hex;
|
|
260
|
+
executeAfter: number;
|
|
261
|
+
validUntil: number;
|
|
262
|
+
threshold: number;
|
|
263
|
+
signatures: Hex[];
|
|
264
|
+
ecdsaModule: Address;
|
|
265
|
+
userOp: Record<string, unknown>;
|
|
266
|
+
calldata?: Hex;
|
|
267
|
+
}
|
|
268
|
+
interface Proposal {
|
|
269
|
+
id: string;
|
|
270
|
+
wallet: Address;
|
|
271
|
+
chainId: number;
|
|
272
|
+
status: 'pending' | 'ready' | 'submitted' | 'cancelled' | 'failed';
|
|
273
|
+
threshold: number;
|
|
274
|
+
owners: Address[];
|
|
275
|
+
userOpHash: Hex;
|
|
276
|
+
calls: ProposalCall[];
|
|
277
|
+
executeAfter: string | null;
|
|
278
|
+
executeBefore: string | null;
|
|
279
|
+
createdAt: string;
|
|
280
|
+
}
|
|
281
|
+
interface ProposalsPage extends CursorPage {
|
|
282
|
+
proposals: Proposal[];
|
|
283
|
+
}
|
|
284
|
+
interface ProposalCall {
|
|
285
|
+
to: Address;
|
|
286
|
+
value?: string;
|
|
287
|
+
data: Hex;
|
|
288
|
+
}
|
|
289
|
+
interface ProposalSignature {
|
|
290
|
+
signer: Address;
|
|
291
|
+
signature: Hex;
|
|
292
|
+
createdAt: string;
|
|
293
|
+
}
|
|
294
|
+
interface ProposalDigest {
|
|
295
|
+
proposalId: string;
|
|
296
|
+
chainId: number;
|
|
297
|
+
wallet: Address;
|
|
298
|
+
userOpHash: Hex;
|
|
299
|
+
ethSignedMessageHash: Hex;
|
|
300
|
+
}
|
|
301
|
+
interface FinalizedProposal {
|
|
302
|
+
proposalId: string;
|
|
303
|
+
wallet: Address;
|
|
304
|
+
chainId: number;
|
|
305
|
+
userOpHash: Hex;
|
|
306
|
+
signature: Hex;
|
|
307
|
+
userOp: Record<string, unknown>;
|
|
308
|
+
}
|
|
309
|
+
interface SettlementTokens {
|
|
310
|
+
tokens: Array<{
|
|
311
|
+
symbol: string;
|
|
312
|
+
address: Address;
|
|
313
|
+
decimals: number;
|
|
314
|
+
}>;
|
|
315
|
+
}
|
|
316
|
+
interface SettlementQuote {
|
|
317
|
+
token: string;
|
|
318
|
+
tokenAmount: string;
|
|
319
|
+
gasCostWei: string;
|
|
320
|
+
exchangeRate: string;
|
|
321
|
+
validUntil: number;
|
|
322
|
+
}
|
|
323
|
+
type SwapRouteStepType = 'swap' | 'bridge';
|
|
324
|
+
interface SwapRouteStep {
|
|
325
|
+
type: SwapRouteStepType;
|
|
326
|
+
protocol: string;
|
|
327
|
+
chainId: number;
|
|
328
|
+
}
|
|
329
|
+
interface SwapRoute {
|
|
330
|
+
routeId: string;
|
|
331
|
+
fromAmount: string;
|
|
332
|
+
toAmount: string;
|
|
333
|
+
toAmountMin: string;
|
|
334
|
+
gasEstimate?: string | null;
|
|
335
|
+
approvalRequired: boolean;
|
|
336
|
+
approvalSpender?: Address | null;
|
|
337
|
+
steps: SwapRouteStep[];
|
|
338
|
+
}
|
|
339
|
+
interface SwapQuotePayload {
|
|
340
|
+
quoteId: string;
|
|
341
|
+
expiresAt: string;
|
|
342
|
+
routes: SwapRoute[];
|
|
343
|
+
}
|
|
344
|
+
interface SwapQuoteResponse {
|
|
345
|
+
wallet: Address;
|
|
346
|
+
fromChain: string;
|
|
347
|
+
toChain: string;
|
|
348
|
+
quote: SwapQuotePayload;
|
|
349
|
+
}
|
|
350
|
+
interface SwapBuildMeta {
|
|
351
|
+
fromChainId: number;
|
|
352
|
+
toChainId: number;
|
|
353
|
+
fromToken: Address;
|
|
354
|
+
toToken: Address;
|
|
355
|
+
fromAmount: string;
|
|
356
|
+
toAmountMin: string;
|
|
357
|
+
steps: string[];
|
|
358
|
+
}
|
|
359
|
+
interface SwapBuildResponse {
|
|
360
|
+
userOp: Record<string, unknown>;
|
|
361
|
+
quoteId: string;
|
|
362
|
+
routeId: string;
|
|
363
|
+
routeHash: Hex;
|
|
364
|
+
meta: SwapBuildMeta;
|
|
365
|
+
}
|
|
366
|
+
interface CrossChainConfig {
|
|
367
|
+
wallet: Address;
|
|
368
|
+
chain: string;
|
|
369
|
+
registry: Address;
|
|
370
|
+
registered: boolean;
|
|
371
|
+
bridgePaused: boolean;
|
|
372
|
+
governanceDomainSeparator: Hex;
|
|
373
|
+
config: {
|
|
374
|
+
owners: Address[];
|
|
375
|
+
threshold: string;
|
|
376
|
+
securityCouncil: Address;
|
|
377
|
+
nonce: string;
|
|
378
|
+
lastUpdateTime: string;
|
|
379
|
+
active: boolean;
|
|
380
|
+
} | null;
|
|
381
|
+
}
|
|
382
|
+
interface CrossChainPendingProposal {
|
|
383
|
+
proposalId: Hex;
|
|
384
|
+
newOwners: Address[];
|
|
385
|
+
newThreshold: string;
|
|
386
|
+
executionTime: string;
|
|
387
|
+
}
|
|
388
|
+
interface RoleInfo {
|
|
389
|
+
wallet: Address;
|
|
390
|
+
roleId: Hex;
|
|
391
|
+
chain: string;
|
|
392
|
+
name: string;
|
|
393
|
+
targetBitmap: string;
|
|
394
|
+
selectorBitmap: string;
|
|
395
|
+
maxValue: string;
|
|
396
|
+
}
|
|
397
|
+
interface RoleBudget {
|
|
398
|
+
wallet: Address;
|
|
399
|
+
roleId: Hex;
|
|
400
|
+
chain: string;
|
|
401
|
+
budget: string;
|
|
402
|
+
spent: string;
|
|
403
|
+
remaining: string;
|
|
404
|
+
}
|
|
405
|
+
interface CursorPage {
|
|
406
|
+
nextCursor: string | null;
|
|
407
|
+
hasMore: boolean;
|
|
408
|
+
}
|
|
409
|
+
interface AddressBookEntry {
|
|
410
|
+
id: number;
|
|
411
|
+
address: Address;
|
|
412
|
+
chainId: number;
|
|
413
|
+
label: string;
|
|
414
|
+
tags: string[];
|
|
415
|
+
notes: string | null;
|
|
416
|
+
createdAt?: string | null;
|
|
417
|
+
updatedAt?: string | null;
|
|
418
|
+
}
|
|
419
|
+
interface AddressBookPage extends CursorPage {
|
|
420
|
+
entries: AddressBookEntry[];
|
|
421
|
+
}
|
|
422
|
+
type AutomationType = 'recurring_payment' | 'stop_loss' | 'dca' | 'rebalance';
|
|
423
|
+
type AutomationStatus = 'active' | 'paused' | 'completed' | 'failed';
|
|
424
|
+
interface Automation {
|
|
425
|
+
id: string;
|
|
426
|
+
wallet: Address;
|
|
427
|
+
type: AutomationType;
|
|
428
|
+
status: AutomationStatus;
|
|
429
|
+
sessionKey: Address | null;
|
|
430
|
+
config: Record<string, unknown>;
|
|
431
|
+
executionCount: number;
|
|
432
|
+
failureCount: number;
|
|
433
|
+
lastExecutedAt: string | null;
|
|
434
|
+
nextExecutionAt: string | null;
|
|
435
|
+
lastTxHash: Hex | null;
|
|
436
|
+
lastError: string | null;
|
|
437
|
+
createdAt: string;
|
|
438
|
+
updatedAt: string;
|
|
439
|
+
}
|
|
440
|
+
type AutomationExecutionStatus = 'pending' | 'success' | 'failed';
|
|
441
|
+
interface AutomationExecution {
|
|
442
|
+
id: string;
|
|
443
|
+
status: AutomationExecutionStatus;
|
|
444
|
+
txHash: Hex | null;
|
|
445
|
+
error: string | null;
|
|
446
|
+
gasUsed: string | null;
|
|
447
|
+
createdAt: string;
|
|
448
|
+
}
|
|
449
|
+
interface AutomationResponse {
|
|
450
|
+
automation: Automation;
|
|
451
|
+
}
|
|
452
|
+
interface TriggerAutomationResponse extends AutomationResponse {
|
|
453
|
+
message: string;
|
|
454
|
+
}
|
|
455
|
+
interface AutomationPage extends CursorPage {
|
|
456
|
+
automations: Automation[];
|
|
457
|
+
}
|
|
458
|
+
interface AutomationDetails {
|
|
459
|
+
automation: Automation;
|
|
460
|
+
executions: AutomationExecution[];
|
|
461
|
+
}
|
|
462
|
+
interface UserOpResponse {
|
|
463
|
+
userOp: Record<string, unknown>;
|
|
464
|
+
}
|
|
465
|
+
interface EnabledFeature {
|
|
466
|
+
featureId: Hex;
|
|
467
|
+
name: string;
|
|
468
|
+
implementation: Address;
|
|
469
|
+
enabled: boolean;
|
|
470
|
+
}
|
|
471
|
+
interface FeatureConfig {
|
|
472
|
+
featureId: Hex;
|
|
473
|
+
implementation: Address;
|
|
474
|
+
enabled: boolean;
|
|
475
|
+
mandatory: boolean;
|
|
476
|
+
reserved: string;
|
|
477
|
+
}
|
|
478
|
+
interface SessionKeyCount {
|
|
479
|
+
wallet: Address;
|
|
480
|
+
chain: string;
|
|
481
|
+
count: number;
|
|
482
|
+
}
|
|
483
|
+
interface SessionKeyPolicySigner {
|
|
484
|
+
wallet: Address;
|
|
485
|
+
chain: string;
|
|
486
|
+
policySigner: Address;
|
|
487
|
+
}
|
|
488
|
+
interface SessionKeyRoles {
|
|
489
|
+
wallet: Address;
|
|
490
|
+
sessionKey: Address;
|
|
491
|
+
chain: string;
|
|
492
|
+
roles: Hex[];
|
|
493
|
+
}
|
|
494
|
+
interface SessionKeyTokenLimit {
|
|
495
|
+
wallet: Address;
|
|
496
|
+
sessionKey: Address;
|
|
497
|
+
token: Address;
|
|
498
|
+
chain: string;
|
|
499
|
+
limit: string;
|
|
500
|
+
spent: string;
|
|
501
|
+
remaining: string;
|
|
502
|
+
}
|
|
503
|
+
interface SpendingLimitSummary {
|
|
504
|
+
window: number;
|
|
505
|
+
limit: string;
|
|
506
|
+
spent: string;
|
|
507
|
+
remaining: string;
|
|
508
|
+
windowStart: number;
|
|
509
|
+
windowEnd: number;
|
|
510
|
+
}
|
|
511
|
+
interface SpendingLimitPreview {
|
|
512
|
+
wallet: Address;
|
|
513
|
+
chain: string;
|
|
514
|
+
nativeLimits: SpendingLimitSummary[];
|
|
515
|
+
tokenLimits: Array<{
|
|
516
|
+
token: Address;
|
|
517
|
+
limits: SpendingLimitSummary[];
|
|
518
|
+
}>;
|
|
519
|
+
}
|
|
520
|
+
interface SpendingLimitBucket {
|
|
521
|
+
wallet: Address;
|
|
522
|
+
chain: string;
|
|
523
|
+
windowStart: number;
|
|
524
|
+
native: string;
|
|
525
|
+
tokens: Record<Address, string>;
|
|
526
|
+
}
|
|
527
|
+
interface NativeLimitConfig {
|
|
528
|
+
wallet: Address;
|
|
529
|
+
chain: string;
|
|
530
|
+
window: number;
|
|
531
|
+
limit: string;
|
|
532
|
+
enabled: boolean;
|
|
533
|
+
}
|
|
534
|
+
interface NativeLimitStatus {
|
|
535
|
+
wallet: Address;
|
|
536
|
+
chain: string;
|
|
537
|
+
window: number;
|
|
538
|
+
limit: string;
|
|
539
|
+
spent: string;
|
|
540
|
+
remaining: string;
|
|
541
|
+
windowStart: number;
|
|
542
|
+
windowEnd: number;
|
|
543
|
+
}
|
|
544
|
+
interface TokenLimitConfig {
|
|
545
|
+
wallet: Address;
|
|
546
|
+
token: Address;
|
|
547
|
+
chain: string;
|
|
548
|
+
window: number;
|
|
549
|
+
limit: string;
|
|
550
|
+
enabled: boolean;
|
|
551
|
+
}
|
|
552
|
+
interface TokenLimitFullStatus {
|
|
553
|
+
wallet: Address;
|
|
554
|
+
token: Address;
|
|
555
|
+
chain: string;
|
|
556
|
+
window: number;
|
|
557
|
+
limit: string;
|
|
558
|
+
spent: string;
|
|
559
|
+
remaining: string;
|
|
560
|
+
windowStart: number;
|
|
561
|
+
windowEnd: number;
|
|
562
|
+
}
|
|
563
|
+
interface AllowlistRoots {
|
|
564
|
+
wallet: Address;
|
|
565
|
+
chain: string;
|
|
566
|
+
addressRoot: Hex;
|
|
567
|
+
selectorRoot: Hex;
|
|
568
|
+
}
|
|
569
|
+
interface ActorPermissions {
|
|
570
|
+
wallet: Address;
|
|
571
|
+
actor: Address;
|
|
572
|
+
chain: string;
|
|
573
|
+
permissions: Hex;
|
|
574
|
+
}
|
|
575
|
+
interface TokenMaxTransfer {
|
|
576
|
+
wallet: Address;
|
|
577
|
+
token: Address;
|
|
578
|
+
chain: string;
|
|
579
|
+
maxTransfer: string;
|
|
580
|
+
}
|
|
581
|
+
interface RecoveryGuardians {
|
|
582
|
+
wallet: Address;
|
|
583
|
+
chain: string;
|
|
584
|
+
guardians: Address[];
|
|
585
|
+
threshold: number;
|
|
586
|
+
guardianSetHash: Hex;
|
|
587
|
+
}
|
|
588
|
+
interface RecoveryProposalInfo {
|
|
589
|
+
wallet: Address;
|
|
590
|
+
chain: string;
|
|
591
|
+
hasProposal: boolean;
|
|
592
|
+
proposal: RecoveryProposal | null;
|
|
593
|
+
}
|
|
594
|
+
interface RecoveryProposalState {
|
|
595
|
+
wallet: Address;
|
|
596
|
+
chain: string;
|
|
597
|
+
state: 'none' | 'pending' | 'ready' | 'executed';
|
|
598
|
+
}
|
|
599
|
+
interface GuardianApproval {
|
|
600
|
+
wallet: Address;
|
|
601
|
+
guardian: Address;
|
|
602
|
+
chain: string;
|
|
603
|
+
approved: boolean;
|
|
604
|
+
}
|
|
605
|
+
interface IsGuardian {
|
|
606
|
+
wallet: Address;
|
|
607
|
+
guardian: Address;
|
|
608
|
+
chain: string;
|
|
609
|
+
isGuardian: boolean;
|
|
610
|
+
}
|
|
611
|
+
interface RecoveryStatusHint {
|
|
612
|
+
wallet: Address;
|
|
613
|
+
chain: string;
|
|
614
|
+
note: string;
|
|
615
|
+
}
|
|
616
|
+
type OnChainRecoveryStatus = RecoveryStatusHint;
|
|
617
|
+
interface RolesInfo {
|
|
618
|
+
wallet: Address;
|
|
619
|
+
chain: string;
|
|
620
|
+
roles: RoleInfo[];
|
|
621
|
+
}
|
|
622
|
+
interface AccountRoles {
|
|
623
|
+
wallet: Address;
|
|
624
|
+
account: Address;
|
|
625
|
+
chain: string;
|
|
626
|
+
roles: Hex[];
|
|
627
|
+
}
|
|
628
|
+
interface ArmedStatus {
|
|
629
|
+
wallet: Address;
|
|
630
|
+
chain: string;
|
|
631
|
+
armed: boolean;
|
|
632
|
+
}
|
|
633
|
+
interface TargetIndex {
|
|
634
|
+
wallet: Address;
|
|
635
|
+
target: Address;
|
|
636
|
+
chain: string;
|
|
637
|
+
index: number;
|
|
638
|
+
}
|
|
639
|
+
interface SelectorIndex {
|
|
640
|
+
wallet: Address;
|
|
641
|
+
selector: Hex;
|
|
642
|
+
chain: string;
|
|
643
|
+
index: number;
|
|
644
|
+
}
|
|
645
|
+
interface HasRole {
|
|
646
|
+
wallet: Address;
|
|
647
|
+
account: Address;
|
|
648
|
+
roleId: Hex;
|
|
649
|
+
chain: string;
|
|
650
|
+
hasRole: boolean;
|
|
651
|
+
}
|
|
652
|
+
interface CrossChainReceiverState {
|
|
653
|
+
wallet: Address;
|
|
654
|
+
chain: string;
|
|
655
|
+
stateFresh: boolean;
|
|
656
|
+
lastSyncTime: number;
|
|
657
|
+
}
|
|
658
|
+
interface CrossChainSkipProposal {
|
|
659
|
+
wallet: Address;
|
|
660
|
+
chain: string;
|
|
661
|
+
skipProposal: boolean;
|
|
662
|
+
}
|
|
663
|
+
interface CrossChainGasLimit {
|
|
664
|
+
chainId: number;
|
|
665
|
+
gasLimit: string;
|
|
666
|
+
}
|
|
667
|
+
interface RegistryFeatures {
|
|
668
|
+
chain: string;
|
|
669
|
+
registry: Address;
|
|
670
|
+
featureIds: Hex[];
|
|
671
|
+
count: number;
|
|
672
|
+
}
|
|
673
|
+
interface RegistryVersion {
|
|
674
|
+
chain: string;
|
|
675
|
+
registry: Address;
|
|
676
|
+
version: string;
|
|
677
|
+
}
|
|
678
|
+
interface FeatureInternal {
|
|
679
|
+
chain: string;
|
|
680
|
+
registry: Address;
|
|
681
|
+
featureId: Hex;
|
|
682
|
+
internal: boolean;
|
|
683
|
+
}
|
|
684
|
+
interface ValidatorSelectorPermitted {
|
|
685
|
+
chain: string;
|
|
686
|
+
registry: Address;
|
|
687
|
+
validatorId: Hex;
|
|
688
|
+
selector: Hex;
|
|
689
|
+
permitted: boolean;
|
|
690
|
+
}
|
|
691
|
+
interface GloballyPaused {
|
|
692
|
+
wallet: Address;
|
|
693
|
+
chain: string;
|
|
694
|
+
registry: Address;
|
|
695
|
+
globallyPaused: boolean;
|
|
696
|
+
}
|
|
697
|
+
interface CanaryOptIn {
|
|
698
|
+
wallet: Address;
|
|
699
|
+
chain: string;
|
|
700
|
+
registry: Address;
|
|
701
|
+
canaryOptIn: boolean;
|
|
702
|
+
}
|
|
703
|
+
interface RegistryCapabilitySnapshot {
|
|
704
|
+
wallet: Address;
|
|
705
|
+
chain: string;
|
|
706
|
+
registry: Address;
|
|
707
|
+
capability_snapshot: Hex;
|
|
708
|
+
}
|
|
709
|
+
interface RegistryMandatoryInitData {
|
|
710
|
+
wallet: Address;
|
|
711
|
+
chain: string;
|
|
712
|
+
registry: Address;
|
|
713
|
+
feature_id: Hex;
|
|
714
|
+
init_data: Hex;
|
|
715
|
+
}
|
|
716
|
+
interface RegistryCoreModuleId {
|
|
717
|
+
chain: string;
|
|
718
|
+
registry: Address;
|
|
719
|
+
key: Hex;
|
|
720
|
+
module_id: Hex;
|
|
721
|
+
}
|
|
722
|
+
interface RegistrySlotAccess {
|
|
723
|
+
chain: string;
|
|
724
|
+
registry: Address;
|
|
725
|
+
feature_id: Hex;
|
|
726
|
+
slot: Hex;
|
|
727
|
+
allowed: boolean;
|
|
728
|
+
}
|
|
729
|
+
interface RegistrySupportsMigration {
|
|
730
|
+
chain: string;
|
|
731
|
+
registry: Address;
|
|
732
|
+
feature_id: Hex;
|
|
733
|
+
supports_migration: boolean;
|
|
734
|
+
}
|
|
735
|
+
interface RegistryIsFeatureImplementation {
|
|
736
|
+
chain: string;
|
|
737
|
+
registry: Address;
|
|
738
|
+
implementation: Address;
|
|
739
|
+
is_feature_implementation: boolean;
|
|
740
|
+
}
|
|
741
|
+
interface RegistryFeatureImplementation {
|
|
742
|
+
chain: string;
|
|
743
|
+
registry: Address;
|
|
744
|
+
feature_id: Hex;
|
|
745
|
+
implementation: Address;
|
|
746
|
+
}
|
|
747
|
+
interface RegistryFeatureImplementationForWallet {
|
|
748
|
+
wallet: Address;
|
|
749
|
+
chain: string;
|
|
750
|
+
registry: Address;
|
|
751
|
+
feature_id: Hex;
|
|
752
|
+
implementation: Address;
|
|
753
|
+
}
|
|
754
|
+
interface RegistryIsMandatoryFeature {
|
|
755
|
+
chain: string;
|
|
756
|
+
registry: Address;
|
|
757
|
+
feature_id: Hex;
|
|
758
|
+
mandatory: boolean;
|
|
759
|
+
}
|
|
760
|
+
interface RegistryEcdsaModule {
|
|
761
|
+
chain: string;
|
|
762
|
+
registry: Address;
|
|
763
|
+
ecdsa_module: Address;
|
|
764
|
+
}
|
|
765
|
+
interface RegistrySessionKeyManager {
|
|
766
|
+
chain: string;
|
|
767
|
+
registry: Address;
|
|
768
|
+
session_key_manager: Address;
|
|
769
|
+
}
|
|
770
|
+
interface RegistrySpendingLimitManager {
|
|
771
|
+
chain: string;
|
|
772
|
+
registry: Address;
|
|
773
|
+
spending_limit_manager: Address;
|
|
774
|
+
}
|
|
775
|
+
interface RegistryPermissionsManager {
|
|
776
|
+
chain: string;
|
|
777
|
+
registry: Address;
|
|
778
|
+
permissions_manager: Address;
|
|
779
|
+
}
|
|
780
|
+
interface UserOpTemplate {
|
|
781
|
+
chainId: number;
|
|
782
|
+
sender: Address;
|
|
783
|
+
nonce: string;
|
|
784
|
+
initCode: Hex;
|
|
785
|
+
callData: Hex;
|
|
786
|
+
accountGasLimits: Hex;
|
|
787
|
+
preVerificationGas: string;
|
|
788
|
+
gasFees: Hex;
|
|
789
|
+
paymasterAndData: Hex;
|
|
790
|
+
}
|
|
791
|
+
interface EIP712Template {
|
|
792
|
+
domain: {
|
|
793
|
+
name: string;
|
|
794
|
+
version: string;
|
|
795
|
+
chainId: number;
|
|
796
|
+
verifyingContract: Address;
|
|
797
|
+
};
|
|
798
|
+
types: Record<string, Array<{
|
|
799
|
+
name: string;
|
|
800
|
+
type: string;
|
|
801
|
+
}>>;
|
|
802
|
+
primaryType: string;
|
|
803
|
+
}
|
|
804
|
+
interface TimestampValidation {
|
|
805
|
+
valid: boolean;
|
|
806
|
+
validAfter: number;
|
|
807
|
+
validUntil: number;
|
|
808
|
+
serverTime: number;
|
|
809
|
+
}
|
|
810
|
+
interface RelayEstimate {
|
|
811
|
+
gasLimit: string;
|
|
812
|
+
maxFeePerGas: string;
|
|
813
|
+
maxPriorityFeePerGas: string;
|
|
814
|
+
estimatedCost: string;
|
|
815
|
+
}
|
|
816
|
+
interface RelayPreview {
|
|
817
|
+
chain: string;
|
|
818
|
+
chainId: number;
|
|
819
|
+
sender: Address;
|
|
820
|
+
sessionKey: Address | null;
|
|
821
|
+
approvalWitnessRequired: boolean;
|
|
822
|
+
approvalCallCount: number;
|
|
823
|
+
policySigner: Address | null;
|
|
824
|
+
policySignerConfigured: boolean;
|
|
825
|
+
policySignerError: string | null;
|
|
826
|
+
rejected: boolean;
|
|
827
|
+
reason?: string;
|
|
828
|
+
}
|
|
829
|
+
interface HealthStatus {
|
|
830
|
+
status: string;
|
|
831
|
+
timestamp: string;
|
|
832
|
+
}
|
|
833
|
+
type OperationState = 'queued' | 'sent' | 'success' | 'failed' | 'retrying';
|
|
834
|
+
interface AccountOperation {
|
|
835
|
+
id: string;
|
|
836
|
+
state: OperationState;
|
|
837
|
+
chain: string;
|
|
838
|
+
txHash: Hex | null;
|
|
839
|
+
sender: Address | null;
|
|
840
|
+
error: string | null;
|
|
841
|
+
createdAt: string;
|
|
842
|
+
updatedAt: string;
|
|
843
|
+
}
|
|
844
|
+
interface AccountOperations extends CursorPage {
|
|
845
|
+
operations: AccountOperation[];
|
|
846
|
+
account: Address;
|
|
847
|
+
total: number;
|
|
848
|
+
}
|
|
849
|
+
interface AddressCapabilities {
|
|
850
|
+
chains: number[];
|
|
851
|
+
contracts: string[];
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
declare const API: {
|
|
855
|
+
readonly op: {
|
|
856
|
+
readonly submit: "/api/op/submit";
|
|
857
|
+
readonly simulate: "/api/op/simulate";
|
|
858
|
+
readonly capabilities: "/api/op/capabilities";
|
|
859
|
+
readonly status: (id: string) => string;
|
|
860
|
+
readonly wait: (id: string) => string;
|
|
861
|
+
};
|
|
862
|
+
readonly auth: {
|
|
863
|
+
readonly register: "/api/auth/register";
|
|
864
|
+
readonly login: "/api/auth/login";
|
|
865
|
+
readonly walletChallenge: "/api/auth/wallet/challenge";
|
|
866
|
+
readonly walletVerify: "/api/auth/wallet/verify";
|
|
867
|
+
readonly walletRegisterChallenge: "/api/auth/wallet/register/challenge";
|
|
868
|
+
readonly walletRegisterVerify: "/api/auth/wallet/register/verify";
|
|
869
|
+
readonly logout: "/api/auth/logout";
|
|
870
|
+
readonly logoutAll: "/api/auth/logout-all";
|
|
871
|
+
readonly me: "/api/auth/me";
|
|
872
|
+
readonly walletLinkChallenge: "/api/auth/wallet/link/challenge";
|
|
873
|
+
readonly walletLinkVerify: "/api/auth/wallet/link/verify";
|
|
874
|
+
readonly wallets: "/api/auth/wallets";
|
|
875
|
+
};
|
|
876
|
+
readonly accounts: {
|
|
877
|
+
readonly create: "/api/accounts";
|
|
878
|
+
readonly verify: "/api/accounts/verify";
|
|
879
|
+
readonly operations: "/api/accounts/operations";
|
|
880
|
+
};
|
|
881
|
+
readonly vault: {
|
|
882
|
+
readonly state: (wallet: Address) => string;
|
|
883
|
+
readonly features: (wallet: Address) => string;
|
|
884
|
+
readonly feature: (wallet: Address, featureId: string) => string;
|
|
885
|
+
readonly opNonce: (wallet: Address) => string;
|
|
886
|
+
readonly securityCouncil: (wallet: Address) => string;
|
|
887
|
+
readonly fallbackSigner: (wallet: Address) => string;
|
|
888
|
+
readonly paused: (wallet: Address) => string;
|
|
889
|
+
readonly l2Receiver: (wallet: Address) => string;
|
|
890
|
+
readonly tryExecute: "/api/vault/try-execute";
|
|
891
|
+
readonly pause: "/api/vault/pause";
|
|
892
|
+
readonly unpause: "/api/vault/unpause";
|
|
893
|
+
readonly setSecurityCouncil: "/api/vault/security-council";
|
|
894
|
+
readonly setFallbackSigner: "/api/vault/fallback-signer";
|
|
895
|
+
readonly overrideGlobalPause: "/api/vault/override-global-pause";
|
|
896
|
+
};
|
|
897
|
+
readonly sessionKey: {
|
|
898
|
+
readonly grant: "/api/sessionkey/grant";
|
|
899
|
+
readonly revoke: "/api/sessionkey/revoke";
|
|
900
|
+
readonly revokeAll: "/api/sessionkey/revoke-all";
|
|
901
|
+
readonly tokenLimits: "/api/sessionkey/token-limits";
|
|
902
|
+
readonly maxValuePerCall: "/api/sessionkey/max-value-per-call";
|
|
903
|
+
readonly sync: "/api/sessionkey/sync";
|
|
904
|
+
readonly list: (wallet: Address) => string;
|
|
905
|
+
readonly info: (wallet: Address, key: Address) => string;
|
|
906
|
+
readonly count: (wallet: Address) => string;
|
|
907
|
+
readonly policySigner: (wallet: Address) => string;
|
|
908
|
+
readonly roles: (wallet: Address, key: Address) => string;
|
|
909
|
+
readonly tokenLimit: (wallet: Address, key: Address, token: Address) => string;
|
|
910
|
+
};
|
|
911
|
+
readonly feature: {
|
|
912
|
+
readonly enable: "/api/feature/enable";
|
|
913
|
+
readonly disable: "/api/feature/disable";
|
|
914
|
+
readonly reset: "/api/feature/reset";
|
|
915
|
+
readonly spendingLimits: (wallet: Address) => string;
|
|
916
|
+
readonly allowlist: (wallet: Address) => string;
|
|
917
|
+
readonly guardians: (wallet: Address) => string;
|
|
918
|
+
readonly recovery: (wallet: Address) => string;
|
|
919
|
+
readonly roles: (wallet: Address) => string;
|
|
920
|
+
readonly accountRoles: (wallet: Address, account: Address) => string;
|
|
921
|
+
};
|
|
922
|
+
readonly spendingLimit: {
|
|
923
|
+
readonly enable: "/api/spending-limit/enable";
|
|
924
|
+
readonly disable: "/api/spending-limit/disable";
|
|
925
|
+
readonly update: "/api/spending-limit/update";
|
|
926
|
+
readonly enableToken: "/api/spending-limit/token/enable";
|
|
927
|
+
readonly disableToken: "/api/spending-limit/token/disable";
|
|
928
|
+
readonly updateToken: "/api/spending-limit/token/update";
|
|
929
|
+
readonly setSpendValidator: "/api/spending-limit/validator/set";
|
|
930
|
+
readonly status: (wallet: Address) => string;
|
|
931
|
+
readonly nativeSummaries: (wallet: Address) => string;
|
|
932
|
+
readonly tokenSummaries: (wallet: Address, token: Address) => string;
|
|
933
|
+
readonly preview: (wallet: Address) => string;
|
|
934
|
+
readonly bucket: (wallet: Address, windowStart: number) => string;
|
|
935
|
+
readonly nativeLimit: (wallet: Address, window: number) => string;
|
|
936
|
+
readonly nativeStatus: (wallet: Address, window: number) => string;
|
|
937
|
+
readonly tokenLimit: (wallet: Address, token: Address, window: number) => string;
|
|
938
|
+
readonly tokenStatus: (wallet: Address, token: Address, window: number) => string;
|
|
939
|
+
};
|
|
940
|
+
readonly allowlist: {
|
|
941
|
+
readonly enable: "/api/allowlist/enable";
|
|
942
|
+
readonly disable: "/api/allowlist/disable";
|
|
943
|
+
readonly contractOnly: "/api/allowlist/contract-only";
|
|
944
|
+
readonly roots: "/api/allowlist/roots";
|
|
945
|
+
readonly sync: "/api/allowlist/sync";
|
|
946
|
+
readonly transferLimit: "/api/allowlist/transfer-limit";
|
|
947
|
+
readonly actorPermissions: "/api/allowlist/actor/permissions";
|
|
948
|
+
readonly getRoots: (wallet: Address) => string;
|
|
949
|
+
readonly getActorPermissions: (wallet: Address, actor: Address) => string;
|
|
950
|
+
readonly tokenMaxTransfer: (wallet: Address, token: Address) => string;
|
|
951
|
+
};
|
|
952
|
+
readonly guardians: {
|
|
953
|
+
readonly configure: "/api/guardians/configure";
|
|
954
|
+
};
|
|
955
|
+
readonly recovery: {
|
|
956
|
+
readonly initiate: "/api/recovery/initiate";
|
|
957
|
+
readonly support: "/api/recovery/support";
|
|
958
|
+
readonly execute: "/api/recovery/execute";
|
|
959
|
+
readonly cancel: "/api/recovery/cancel";
|
|
960
|
+
readonly status: (wallet: Address) => string;
|
|
961
|
+
readonly guardians: (wallet: Address) => string;
|
|
962
|
+
readonly proposal: (wallet: Address) => string;
|
|
963
|
+
readonly proposalState: (wallet: Address) => string;
|
|
964
|
+
readonly guardianApproved: (wallet: Address, guardian: Address) => string;
|
|
965
|
+
readonly isGuardian: (wallet: Address, guardian: Address) => string;
|
|
966
|
+
};
|
|
967
|
+
readonly recoveryAggregated: {
|
|
968
|
+
readonly initiate: "/api/recovery/aggregated/initiate";
|
|
969
|
+
readonly signature: "/api/recovery/aggregated/signature";
|
|
970
|
+
readonly status: (wallet: Address, proposedOwner: Address) => string;
|
|
971
|
+
readonly prepare: "/api/recovery/aggregated/prepare";
|
|
972
|
+
};
|
|
973
|
+
readonly roles: {
|
|
974
|
+
readonly create: "/api/roles/create";
|
|
975
|
+
readonly createBatch: "/api/roles/create-batch";
|
|
976
|
+
readonly grant: "/api/roles/grant";
|
|
977
|
+
readonly revoke: "/api/roles/revoke";
|
|
978
|
+
readonly grantBatch: "/api/roles/grant-batch";
|
|
979
|
+
readonly revokeBatch: "/api/roles/revoke-batch";
|
|
980
|
+
readonly update: "/api/roles/update";
|
|
981
|
+
readonly grantMulti: "/api/roles/grant-multi";
|
|
982
|
+
readonly arm: "/api/roles/arm";
|
|
983
|
+
readonly armed: (wallet: Address) => string;
|
|
984
|
+
readonly targetIndex: (wallet: Address, target: Address) => string;
|
|
985
|
+
readonly selectorIndex: (wallet: Address, selector: string) => string;
|
|
986
|
+
readonly hasRole: (wallet: Address, account: Address, roleId: string) => string;
|
|
987
|
+
readonly budget: (wallet: Address, roleId: string) => string;
|
|
988
|
+
readonly setBudget: (wallet: Address, roleId: string) => string;
|
|
989
|
+
readonly show: (wallet: Address, roleId: string) => string;
|
|
990
|
+
};
|
|
991
|
+
readonly proposals: {
|
|
992
|
+
readonly list: "/api/proposals";
|
|
993
|
+
readonly due: "/api/proposals/due";
|
|
994
|
+
readonly create: "/api/proposals";
|
|
995
|
+
readonly show: (id: string) => string;
|
|
996
|
+
readonly digest: (id: string) => string;
|
|
997
|
+
readonly sign: (id: string) => string;
|
|
998
|
+
readonly finalize: (id: string) => string;
|
|
999
|
+
readonly cancel: (id: string) => string;
|
|
1000
|
+
};
|
|
1001
|
+
readonly crosschain: {
|
|
1002
|
+
readonly config: (wallet: Address) => string;
|
|
1003
|
+
readonly pendingProposals: (wallet: Address) => string;
|
|
1004
|
+
readonly receiverStateFresh: (wallet: Address) => string;
|
|
1005
|
+
readonly receiverSkipProposal: (wallet: Address) => string;
|
|
1006
|
+
readonly gasLimit: (chainId: number) => string;
|
|
1007
|
+
readonly proposeOwnerUpdate: "/api/crosschain/propose-owner-update";
|
|
1008
|
+
readonly executeOwnerUpdate: "/api/crosschain/execute-owner-update";
|
|
1009
|
+
readonly resync: "/api/crosschain/resync";
|
|
1010
|
+
};
|
|
1011
|
+
readonly settlement: {
|
|
1012
|
+
readonly tokens: "/api/settlement/tokens";
|
|
1013
|
+
readonly quote: "/api/settlement/quote";
|
|
1014
|
+
readonly prepare: "/api/settlement/prepare";
|
|
1015
|
+
};
|
|
1016
|
+
readonly swap: {
|
|
1017
|
+
readonly quote: "/api/swap/quote";
|
|
1018
|
+
readonly build: "/api/swap/build";
|
|
1019
|
+
};
|
|
1020
|
+
readonly addressBook: {
|
|
1021
|
+
readonly list: "/api/address-book";
|
|
1022
|
+
readonly create: "/api/address-book";
|
|
1023
|
+
readonly update: (id: number) => string;
|
|
1024
|
+
readonly delete: (id: number) => string;
|
|
1025
|
+
};
|
|
1026
|
+
readonly automations: {
|
|
1027
|
+
readonly list: "/api/automations";
|
|
1028
|
+
readonly create: "/api/automations";
|
|
1029
|
+
readonly show: (id: string) => string;
|
|
1030
|
+
readonly update: (id: string) => string;
|
|
1031
|
+
readonly delete: (id: string) => string;
|
|
1032
|
+
readonly pause: (id: string) => string;
|
|
1033
|
+
readonly resume: (id: string) => string;
|
|
1034
|
+
readonly trigger: (id: string) => string;
|
|
1035
|
+
};
|
|
1036
|
+
readonly addresses: {
|
|
1037
|
+
readonly capabilities: "/api/addresses/capabilities";
|
|
1038
|
+
readonly all: (chainId: number) => string;
|
|
1039
|
+
readonly get: (chainId: number, name: string) => string;
|
|
1040
|
+
};
|
|
1041
|
+
readonly signature: {
|
|
1042
|
+
readonly timing: "/api/signature/timing";
|
|
1043
|
+
readonly userOpTemplate: "/api/signature/userop-template";
|
|
1044
|
+
readonly eip712Template: "/api/signature/eip712-template";
|
|
1045
|
+
readonly validateTimestamp: "/api/signature/validate-timestamp";
|
|
1046
|
+
};
|
|
1047
|
+
readonly registry: {
|
|
1048
|
+
readonly features: "/api/registry/features";
|
|
1049
|
+
readonly version: "/api/registry/version";
|
|
1050
|
+
readonly isInternal: (featureId: string) => string;
|
|
1051
|
+
readonly canValidatorHandleSelector: (validatorId: string, selector: string) => string;
|
|
1052
|
+
readonly coreModuleId: (key: string) => string;
|
|
1053
|
+
readonly slotAccess: (featureId: string, slot: string) => string;
|
|
1054
|
+
readonly supportsMigration: (featureId: string) => string;
|
|
1055
|
+
readonly isFeatureImplementation: (impl: Address) => string;
|
|
1056
|
+
readonly featureImplementation: (featureId: string) => string;
|
|
1057
|
+
readonly featureImplementationForWallet: (wallet: Address, featureId: string) => string;
|
|
1058
|
+
readonly isMandatoryFeature: (featureId: string) => string;
|
|
1059
|
+
readonly ecdsaModule: "/api/registry/ecdsa-module";
|
|
1060
|
+
readonly sessionKeyManager: "/api/registry/session-key-manager";
|
|
1061
|
+
readonly spendingLimitManager: "/api/registry/spending-limit-manager";
|
|
1062
|
+
readonly permissionsManager: "/api/registry/permissions-manager";
|
|
1063
|
+
readonly globallyPaused: (wallet: Address) => string;
|
|
1064
|
+
readonly canaryOptIn: (wallet: Address) => string;
|
|
1065
|
+
readonly capabilitySnapshot: (wallet: Address) => string;
|
|
1066
|
+
readonly mandatoryInitData: (wallet: Address, featureId: string) => string;
|
|
1067
|
+
readonly setCanaryOptIn: "/api/registry/canary/opt-in";
|
|
1068
|
+
readonly setMandatoryInitData: "/api/registry/mandatory-init-data";
|
|
1069
|
+
readonly updateCapabilitySnapshot: "/api/registry/capability-snapshot";
|
|
1070
|
+
};
|
|
1071
|
+
readonly paymaster: {
|
|
1072
|
+
readonly banStatus: (account: Address) => string;
|
|
1073
|
+
readonly refundCredit: (wallet: Address, token: Address) => string;
|
|
1074
|
+
readonly claimRefundCredit: "/api/paymaster/refund-credit/claim";
|
|
1075
|
+
};
|
|
1076
|
+
readonly config: {
|
|
1077
|
+
readonly gasLimits: "/api/config/gas-limits";
|
|
1078
|
+
};
|
|
1079
|
+
readonly relay: {
|
|
1080
|
+
readonly estimate: "/api/relay/estimate";
|
|
1081
|
+
readonly preview: "/api/relay/preview";
|
|
1082
|
+
};
|
|
1083
|
+
readonly health: "/api/health";
|
|
1084
|
+
};
|
|
1085
|
+
interface QuoteResponseRaw {
|
|
1086
|
+
gasLimits: {
|
|
1087
|
+
verificationGasLimit: string;
|
|
1088
|
+
callGasLimit: string;
|
|
1089
|
+
preVerificationGas: string;
|
|
1090
|
+
maxFeePerGas: string;
|
|
1091
|
+
maxPriorityFeePerGas: string;
|
|
1092
|
+
};
|
|
1093
|
+
paymasterAndData: string;
|
|
1094
|
+
sponsored: boolean;
|
|
1095
|
+
}
|
|
1096
|
+
interface QuoteResponse {
|
|
1097
|
+
gasLimits: {
|
|
1098
|
+
verificationGasLimit: bigint;
|
|
1099
|
+
callGasLimit: bigint;
|
|
1100
|
+
preVerificationGas: bigint;
|
|
1101
|
+
maxFeePerGas: bigint;
|
|
1102
|
+
maxPriorityFeePerGas: bigint;
|
|
1103
|
+
};
|
|
1104
|
+
paymasterAndData: string;
|
|
1105
|
+
sponsored: boolean;
|
|
1106
|
+
}
|
|
1107
|
+
interface BanStatus {
|
|
1108
|
+
account: string;
|
|
1109
|
+
chain: string;
|
|
1110
|
+
banned: boolean;
|
|
1111
|
+
}
|
|
1112
|
+
interface RefundCredit {
|
|
1113
|
+
wallet: string;
|
|
1114
|
+
token: string;
|
|
1115
|
+
chain: string;
|
|
1116
|
+
paymaster: string;
|
|
1117
|
+
refund_credit: string;
|
|
1118
|
+
}
|
|
1119
|
+
interface Capabilities {
|
|
1120
|
+
sponsored: boolean;
|
|
1121
|
+
chainId: number;
|
|
1122
|
+
entryPoint: string;
|
|
1123
|
+
}
|
|
1124
|
+
interface TimingConfig {
|
|
1125
|
+
maxAge: number;
|
|
1126
|
+
gracePeriod: number;
|
|
1127
|
+
minValidAfter: number;
|
|
1128
|
+
}
|
|
1129
|
+
declare function parseQuoteResponse(raw: QuoteResponseRaw): QuoteResponse;
|
|
1130
|
+
|
|
1131
|
+
type SDKErrorCode = 'INVALID_USEROP' | 'BUNDLER_ERROR' | 'RATE_LIMITED' | 'TIMEOUT' | 'UNAUTHORIZED' | 'NOT_FOUND' | 'FORBIDDEN' | 'INVALID_CONFIG' | 'VALIDATION_ERROR';
|
|
1132
|
+
declare class VaultumError extends Error {
|
|
1133
|
+
code?: SDKErrorCode | undefined;
|
|
1134
|
+
status?: number | undefined;
|
|
1135
|
+
details?: unknown | undefined;
|
|
1136
|
+
retryable: boolean;
|
|
1137
|
+
constructor(message: string, code?: SDKErrorCode | undefined, status?: number | undefined, details?: unknown | undefined, retryable?: boolean);
|
|
1138
|
+
}
|
|
1139
|
+
declare class VaultumClient {
|
|
1140
|
+
private baseURL;
|
|
1141
|
+
private headers;
|
|
1142
|
+
private timeout;
|
|
1143
|
+
private chain?;
|
|
1144
|
+
private retry;
|
|
1145
|
+
private onRequest?;
|
|
1146
|
+
private onResponse?;
|
|
1147
|
+
constructor(config: VaultumConfig);
|
|
1148
|
+
setBearer(token: string | null | undefined): void;
|
|
1149
|
+
setApiKey(key: string | null | undefined): void;
|
|
1150
|
+
setDefaultChain(chain: string | null | undefined): void;
|
|
1151
|
+
request<T = unknown>(method: string, path: string, body?: unknown, options?: {
|
|
1152
|
+
idempotencyKey?: string;
|
|
1153
|
+
timestamp?: number;
|
|
1154
|
+
headers?: Record<string, string>;
|
|
1155
|
+
signal?: AbortSignal;
|
|
1156
|
+
retry?: boolean;
|
|
1157
|
+
}): Promise<T>;
|
|
1158
|
+
submit(userOp: UserOperation | PackedUserOperation, options?: {
|
|
1159
|
+
chain?: string;
|
|
1160
|
+
idempotencyKey?: string;
|
|
1161
|
+
timestamp?: number;
|
|
1162
|
+
signal?: AbortSignal;
|
|
1163
|
+
}): Promise<OperationResult>;
|
|
1164
|
+
simulate(userOp: UserOperation | PackedUserOperation, options?: {
|
|
1165
|
+
chain?: string;
|
|
1166
|
+
signal?: AbortSignal;
|
|
1167
|
+
}): Promise<UserOpSimulationResponse>;
|
|
1168
|
+
authRegister(params: {
|
|
1169
|
+
name: string;
|
|
1170
|
+
email: string;
|
|
1171
|
+
password: string;
|
|
1172
|
+
signal?: AbortSignal;
|
|
1173
|
+
}): Promise<AuthTokenResponse>;
|
|
1174
|
+
authLogin(params: {
|
|
1175
|
+
email: string;
|
|
1176
|
+
password: string;
|
|
1177
|
+
signal?: AbortSignal;
|
|
1178
|
+
}): Promise<AuthTokenResponse>;
|
|
1179
|
+
authMe(signal?: AbortSignal): Promise<AuthMeResponse>;
|
|
1180
|
+
authLogout(signal?: AbortSignal): Promise<LogoutResponse>;
|
|
1181
|
+
authLogoutAll(signal?: AbortSignal): Promise<LogoutResponse>;
|
|
1182
|
+
walletChallenge(params: {
|
|
1183
|
+
chain: string;
|
|
1184
|
+
address: Address;
|
|
1185
|
+
signal?: AbortSignal;
|
|
1186
|
+
}): Promise<WalletChallengeResponse>;
|
|
1187
|
+
walletVerify(params: {
|
|
1188
|
+
chain: string;
|
|
1189
|
+
address: Address;
|
|
1190
|
+
signature: Hex;
|
|
1191
|
+
signal?: AbortSignal;
|
|
1192
|
+
}): Promise<AuthTokenResponse>;
|
|
1193
|
+
walletRegisterChallenge(params: {
|
|
1194
|
+
chain: string;
|
|
1195
|
+
address: Address;
|
|
1196
|
+
signal?: AbortSignal;
|
|
1197
|
+
}): Promise<WalletChallengeResponse>;
|
|
1198
|
+
walletRegisterVerify(params: {
|
|
1199
|
+
chain: string;
|
|
1200
|
+
address: Address;
|
|
1201
|
+
signature: Hex;
|
|
1202
|
+
name: string;
|
|
1203
|
+
email: string;
|
|
1204
|
+
signal?: AbortSignal;
|
|
1205
|
+
}): Promise<AuthTokenResponse>;
|
|
1206
|
+
walletLinkChallenge(params: {
|
|
1207
|
+
chain: string;
|
|
1208
|
+
address: Address;
|
|
1209
|
+
signal?: AbortSignal;
|
|
1210
|
+
}): Promise<WalletChallengeResponse>;
|
|
1211
|
+
walletLinkVerify(params: {
|
|
1212
|
+
chain: string;
|
|
1213
|
+
address: Address;
|
|
1214
|
+
signature: Hex;
|
|
1215
|
+
signal?: AbortSignal;
|
|
1216
|
+
}): Promise<WalletsResponse>;
|
|
1217
|
+
wallets(signal?: AbortSignal): Promise<WalletsResponse>;
|
|
1218
|
+
getOperation(id: string, signal?: AbortSignal): Promise<OperationResult>;
|
|
1219
|
+
waitForOperation(id: string, options?: WaitOptions): Promise<OperationResult>;
|
|
1220
|
+
getCapabilities(signal?: AbortSignal): Promise<Capabilities>;
|
|
1221
|
+
createAccount(options: {
|
|
1222
|
+
sessionKeyAddress: Address;
|
|
1223
|
+
chain?: string;
|
|
1224
|
+
salt?: Hex;
|
|
1225
|
+
owners?: Address[];
|
|
1226
|
+
threshold?: number;
|
|
1227
|
+
securityCouncil?: Address;
|
|
1228
|
+
modules?: Address[];
|
|
1229
|
+
featureInits?: Array<{
|
|
1230
|
+
featureId: Hex;
|
|
1231
|
+
initData?: Hex;
|
|
1232
|
+
}>;
|
|
1233
|
+
signal?: AbortSignal;
|
|
1234
|
+
}): Promise<AccountCreateResult>;
|
|
1235
|
+
verifyAccount(address: Address, options?: {
|
|
1236
|
+
chain?: string;
|
|
1237
|
+
signal?: AbortSignal;
|
|
1238
|
+
}): Promise<AccountVerifyResult>;
|
|
1239
|
+
getVaultState(wallet: Address, options?: {
|
|
1240
|
+
chain?: string;
|
|
1241
|
+
signal?: AbortSignal;
|
|
1242
|
+
}): Promise<VaultState>;
|
|
1243
|
+
getNonce(wallet: Address, options?: {
|
|
1244
|
+
chain?: string;
|
|
1245
|
+
signal?: AbortSignal;
|
|
1246
|
+
}): Promise<string>;
|
|
1247
|
+
getBanStatus(account: Address, options?: {
|
|
1248
|
+
chain?: string;
|
|
1249
|
+
signal?: AbortSignal;
|
|
1250
|
+
}): Promise<BanStatus>;
|
|
1251
|
+
getRefundCredit(wallet: Address, token: Address, options?: {
|
|
1252
|
+
chain?: string;
|
|
1253
|
+
signal?: AbortSignal;
|
|
1254
|
+
}): Promise<RefundCredit>;
|
|
1255
|
+
buildClaimRefundCredit(params: {
|
|
1256
|
+
wallet: Address;
|
|
1257
|
+
token: Address;
|
|
1258
|
+
chain: string;
|
|
1259
|
+
signal?: AbortSignal;
|
|
1260
|
+
}): Promise<UserOpResponse>;
|
|
1261
|
+
getSessionKeyInfo(wallet: Address, key: Address, options?: {
|
|
1262
|
+
chain?: string;
|
|
1263
|
+
signal?: AbortSignal;
|
|
1264
|
+
}): Promise<SessionKeyInfo>;
|
|
1265
|
+
getSpendingLimitStatus(wallet: Address, options?: {
|
|
1266
|
+
chain?: string;
|
|
1267
|
+
signal?: AbortSignal;
|
|
1268
|
+
}): Promise<SpendingLimitStatus>;
|
|
1269
|
+
getAllowlistStatus(wallet: Address, options?: {
|
|
1270
|
+
chain?: string;
|
|
1271
|
+
signal?: AbortSignal;
|
|
1272
|
+
}): Promise<AllowlistStatus>;
|
|
1273
|
+
getGuardians(wallet: Address, options?: {
|
|
1274
|
+
chain?: string;
|
|
1275
|
+
signal?: AbortSignal;
|
|
1276
|
+
}): Promise<GuardianConfig>;
|
|
1277
|
+
getRecoveryStatus(wallet: Address, options?: {
|
|
1278
|
+
chain?: string;
|
|
1279
|
+
signal?: AbortSignal;
|
|
1280
|
+
}): Promise<RecoveryStatus>;
|
|
1281
|
+
getRecoveryStatusHint(account: Address, options?: {
|
|
1282
|
+
chain?: string;
|
|
1283
|
+
signal?: AbortSignal;
|
|
1284
|
+
}): Promise<OnChainRecoveryStatus>;
|
|
1285
|
+
initiateAggregatedRecovery(params: {
|
|
1286
|
+
wallet: Address;
|
|
1287
|
+
proposedOwner: Address;
|
|
1288
|
+
chain: string;
|
|
1289
|
+
validUntil?: number;
|
|
1290
|
+
signal?: AbortSignal;
|
|
1291
|
+
}): Promise<AggregatedRecoveryInitiateResponse>;
|
|
1292
|
+
submitRecoverySignature(params: {
|
|
1293
|
+
wallet: Address;
|
|
1294
|
+
proposedOwner: Address;
|
|
1295
|
+
guardian: Address;
|
|
1296
|
+
signature: Hex;
|
|
1297
|
+
chain: string;
|
|
1298
|
+
signal?: AbortSignal;
|
|
1299
|
+
}): Promise<{
|
|
1300
|
+
status: string;
|
|
1301
|
+
collected: number;
|
|
1302
|
+
threshold: number;
|
|
1303
|
+
}>;
|
|
1304
|
+
getAggregatedRecoveryStatus(wallet: Address, proposedOwner: Address, options?: {
|
|
1305
|
+
chain?: string;
|
|
1306
|
+
signal?: AbortSignal;
|
|
1307
|
+
}): Promise<AggregatedRecoveryStatus>;
|
|
1308
|
+
prepareAggregatedRecovery(params: {
|
|
1309
|
+
wallet: Address;
|
|
1310
|
+
proposedOwner: Address;
|
|
1311
|
+
chain: string;
|
|
1312
|
+
signal?: AbortSignal;
|
|
1313
|
+
}): Promise<AggregatedRecoveryPrepareExecutionResponse>;
|
|
1314
|
+
getProposals(options?: {
|
|
1315
|
+
wallet?: Address;
|
|
1316
|
+
status?: string;
|
|
1317
|
+
limit?: number;
|
|
1318
|
+
cursor?: string;
|
|
1319
|
+
signal?: AbortSignal;
|
|
1320
|
+
}): Promise<ProposalsPage>;
|
|
1321
|
+
getDueProposals(options?: {
|
|
1322
|
+
limit?: number;
|
|
1323
|
+
cursor?: string;
|
|
1324
|
+
signal?: AbortSignal;
|
|
1325
|
+
}): Promise<ProposalsPage>;
|
|
1326
|
+
createProposal(params: {
|
|
1327
|
+
wallet: Address;
|
|
1328
|
+
chain: string;
|
|
1329
|
+
calls: ProposalCall[];
|
|
1330
|
+
executeAfter?: string;
|
|
1331
|
+
executeBefore?: string;
|
|
1332
|
+
signal?: AbortSignal;
|
|
1333
|
+
}): Promise<{
|
|
1334
|
+
proposal: Proposal;
|
|
1335
|
+
userOpHash: Hex;
|
|
1336
|
+
moduleId: Hex;
|
|
1337
|
+
threshold: number;
|
|
1338
|
+
owners: Address[];
|
|
1339
|
+
}>;
|
|
1340
|
+
getProposal(id: string, signal?: AbortSignal): Promise<{
|
|
1341
|
+
proposal: Proposal;
|
|
1342
|
+
signatures: ProposalSignature[];
|
|
1343
|
+
}>;
|
|
1344
|
+
getProposalDigest(id: string, signal?: AbortSignal): Promise<ProposalDigest>;
|
|
1345
|
+
signProposal(params: {
|
|
1346
|
+
id: string;
|
|
1347
|
+
signer: Address;
|
|
1348
|
+
signature: Hex;
|
|
1349
|
+
signal?: AbortSignal;
|
|
1350
|
+
}): Promise<{
|
|
1351
|
+
proposalId: string;
|
|
1352
|
+
status: string;
|
|
1353
|
+
collected: number;
|
|
1354
|
+
threshold: number;
|
|
1355
|
+
}>;
|
|
1356
|
+
finalizeProposal(id: string, signal?: AbortSignal): Promise<FinalizedProposal>;
|
|
1357
|
+
cancelProposal(id: string, signal?: AbortSignal): Promise<{
|
|
1358
|
+
cancelled: boolean;
|
|
1359
|
+
}>;
|
|
1360
|
+
getSettlementTokens(options?: {
|
|
1361
|
+
chain?: string;
|
|
1362
|
+
signal?: AbortSignal;
|
|
1363
|
+
}): Promise<SettlementTokens>;
|
|
1364
|
+
getSettlementQuote(params: {
|
|
1365
|
+
chain: string;
|
|
1366
|
+
sender: Address;
|
|
1367
|
+
token: 'USDC' | 'USDT';
|
|
1368
|
+
maxGasCost: string;
|
|
1369
|
+
maxFeePerGas: string;
|
|
1370
|
+
signal?: AbortSignal;
|
|
1371
|
+
}): Promise<SettlementQuote>;
|
|
1372
|
+
prepareSettlement(params: {
|
|
1373
|
+
chain: string;
|
|
1374
|
+
token: 'USDC' | 'USDT';
|
|
1375
|
+
userOp: UserOperation | PackedUserOperation | Record<string, unknown>;
|
|
1376
|
+
idempotencyKey?: string;
|
|
1377
|
+
timestamp?: number;
|
|
1378
|
+
signal?: AbortSignal;
|
|
1379
|
+
}): Promise<UserOpResponse>;
|
|
1380
|
+
swapQuote(params: {
|
|
1381
|
+
wallet: Address;
|
|
1382
|
+
fromChain: string;
|
|
1383
|
+
toChain: string;
|
|
1384
|
+
fromToken: Address;
|
|
1385
|
+
toToken: Address;
|
|
1386
|
+
amount: string;
|
|
1387
|
+
slippageBps: number;
|
|
1388
|
+
deadlineSeconds: number;
|
|
1389
|
+
allowBridges?: string[];
|
|
1390
|
+
allowDexes?: string[];
|
|
1391
|
+
signal?: AbortSignal;
|
|
1392
|
+
}): Promise<SwapQuoteResponse>;
|
|
1393
|
+
swapBuild(params: {
|
|
1394
|
+
wallet: Address;
|
|
1395
|
+
fromChain: string;
|
|
1396
|
+
toChain: string;
|
|
1397
|
+
quoteId: string;
|
|
1398
|
+
routeId: string;
|
|
1399
|
+
slippageBps: number;
|
|
1400
|
+
signal?: AbortSignal;
|
|
1401
|
+
}): Promise<SwapBuildResponse>;
|
|
1402
|
+
getCrossChainConfig(wallet: Address, options?: {
|
|
1403
|
+
chain?: string;
|
|
1404
|
+
signal?: AbortSignal;
|
|
1405
|
+
}): Promise<CrossChainConfig>;
|
|
1406
|
+
getCrossChainPendingProposals(wallet: Address, options?: {
|
|
1407
|
+
chain?: string;
|
|
1408
|
+
lookbackBlocks?: number;
|
|
1409
|
+
max?: number;
|
|
1410
|
+
signal?: AbortSignal;
|
|
1411
|
+
}): Promise<{
|
|
1412
|
+
pendingProposals: CrossChainPendingProposal[];
|
|
1413
|
+
}>;
|
|
1414
|
+
buildSessionKeyGrant(params: {
|
|
1415
|
+
wallet: Address;
|
|
1416
|
+
sessionKey: Address;
|
|
1417
|
+
chain: string;
|
|
1418
|
+
expiry: number;
|
|
1419
|
+
startTime?: number;
|
|
1420
|
+
targets?: Address[];
|
|
1421
|
+
selectors?: Hex[];
|
|
1422
|
+
roles?: Hex[];
|
|
1423
|
+
signal?: AbortSignal;
|
|
1424
|
+
}): Promise<UserOpResponse>;
|
|
1425
|
+
buildSessionKeyRevoke(params: {
|
|
1426
|
+
wallet: Address;
|
|
1427
|
+
sessionKey: Address;
|
|
1428
|
+
chain: string;
|
|
1429
|
+
signal?: AbortSignal;
|
|
1430
|
+
}): Promise<UserOpResponse>;
|
|
1431
|
+
buildEnableFeature(params: {
|
|
1432
|
+
wallet: Address;
|
|
1433
|
+
featureId: Hex;
|
|
1434
|
+
chain: string;
|
|
1435
|
+
initData?: Hex;
|
|
1436
|
+
signal?: AbortSignal;
|
|
1437
|
+
}): Promise<UserOpResponse>;
|
|
1438
|
+
buildDisableFeature(params: {
|
|
1439
|
+
wallet: Address;
|
|
1440
|
+
featureId: Hex;
|
|
1441
|
+
chain: string;
|
|
1442
|
+
signal?: AbortSignal;
|
|
1443
|
+
}): Promise<UserOpResponse>;
|
|
1444
|
+
buildResetFeatureInitialization(params: {
|
|
1445
|
+
wallet: Address;
|
|
1446
|
+
featureId: Hex;
|
|
1447
|
+
chain: string;
|
|
1448
|
+
signal?: AbortSignal;
|
|
1449
|
+
}): Promise<UserOpResponse>;
|
|
1450
|
+
buildTryExecute(params: {
|
|
1451
|
+
wallet: Address;
|
|
1452
|
+
chain: string;
|
|
1453
|
+
calls: Array<{
|
|
1454
|
+
to: Address;
|
|
1455
|
+
value?: number;
|
|
1456
|
+
data: Hex;
|
|
1457
|
+
}>;
|
|
1458
|
+
signal?: AbortSignal;
|
|
1459
|
+
}): Promise<UserOpResponse>;
|
|
1460
|
+
buildConfigureGuardians(params: {
|
|
1461
|
+
wallet: Address;
|
|
1462
|
+
chain: string;
|
|
1463
|
+
guardians: Address[];
|
|
1464
|
+
threshold: number;
|
|
1465
|
+
timelock: number;
|
|
1466
|
+
signal?: AbortSignal;
|
|
1467
|
+
}): Promise<UserOpResponse>;
|
|
1468
|
+
getAddressBook(options?: {
|
|
1469
|
+
chain?: string;
|
|
1470
|
+
limit?: number;
|
|
1471
|
+
cursor?: string;
|
|
1472
|
+
signal?: AbortSignal;
|
|
1473
|
+
}): Promise<AddressBookPage>;
|
|
1474
|
+
createAddressBookEntry(params: {
|
|
1475
|
+
chain: string;
|
|
1476
|
+
label: string;
|
|
1477
|
+
address: Address;
|
|
1478
|
+
tags?: string[];
|
|
1479
|
+
notes?: string;
|
|
1480
|
+
signal?: AbortSignal;
|
|
1481
|
+
}): Promise<AddressBookEntry>;
|
|
1482
|
+
updateAddressBookEntry(id: number, params: {
|
|
1483
|
+
label?: string;
|
|
1484
|
+
tags?: string[];
|
|
1485
|
+
notes?: string | null;
|
|
1486
|
+
signal?: AbortSignal;
|
|
1487
|
+
}): Promise<AddressBookEntry>;
|
|
1488
|
+
deleteAddressBookEntry(id: number, signal?: AbortSignal): Promise<void>;
|
|
1489
|
+
getAutomations(params: {
|
|
1490
|
+
wallet: Address;
|
|
1491
|
+
limit?: number;
|
|
1492
|
+
cursor?: string;
|
|
1493
|
+
signal?: AbortSignal;
|
|
1494
|
+
}): Promise<AutomationPage>;
|
|
1495
|
+
createAutomation(params: {
|
|
1496
|
+
wallet: Address;
|
|
1497
|
+
type: Automation['type'];
|
|
1498
|
+
config: Record<string, unknown>;
|
|
1499
|
+
sessionKey?: Address;
|
|
1500
|
+
signal?: AbortSignal;
|
|
1501
|
+
}): Promise<Automation>;
|
|
1502
|
+
getAutomation(id: string, signal?: AbortSignal): Promise<AutomationDetails>;
|
|
1503
|
+
pauseAutomation(id: string, signal?: AbortSignal): Promise<Automation>;
|
|
1504
|
+
resumeAutomation(id: string, signal?: AbortSignal): Promise<Automation>;
|
|
1505
|
+
deleteAutomation(id: string, signal?: AbortSignal): Promise<void>;
|
|
1506
|
+
getContractAddresses(chainId: number, signal?: AbortSignal): Promise<Record<string, Address>>;
|
|
1507
|
+
getContractAddress(chainId: number, name: string, signal?: AbortSignal): Promise<{
|
|
1508
|
+
address: Address;
|
|
1509
|
+
chain_id: number;
|
|
1510
|
+
contract_name: string;
|
|
1511
|
+
}>;
|
|
1512
|
+
getTimingConfig(signal?: AbortSignal): Promise<TimingConfig>;
|
|
1513
|
+
getGasLimits(signal?: AbortSignal): Promise<Record<string, unknown>>;
|
|
1514
|
+
getAccountOperations(options: {
|
|
1515
|
+
account: Address;
|
|
1516
|
+
chain?: string;
|
|
1517
|
+
state?: string;
|
|
1518
|
+
limit?: number;
|
|
1519
|
+
cursor?: string;
|
|
1520
|
+
signal?: AbortSignal;
|
|
1521
|
+
}): Promise<AccountOperations>;
|
|
1522
|
+
getEnabledFeatures(wallet: Address, options?: {
|
|
1523
|
+
chain?: string;
|
|
1524
|
+
signal?: AbortSignal;
|
|
1525
|
+
}): Promise<{
|
|
1526
|
+
features: EnabledFeature[];
|
|
1527
|
+
}>;
|
|
1528
|
+
getFeatureConfig(wallet: Address, featureId: Hex, options?: {
|
|
1529
|
+
chain?: string;
|
|
1530
|
+
signal?: AbortSignal;
|
|
1531
|
+
}): Promise<FeatureConfig>;
|
|
1532
|
+
getSecurityCouncil(wallet: Address, options?: {
|
|
1533
|
+
chain?: string;
|
|
1534
|
+
signal?: AbortSignal;
|
|
1535
|
+
}): Promise<{
|
|
1536
|
+
wallet: Address;
|
|
1537
|
+
chain: string;
|
|
1538
|
+
securityCouncil: Address;
|
|
1539
|
+
}>;
|
|
1540
|
+
getFallbackSigner(wallet: Address, options?: {
|
|
1541
|
+
chain?: string;
|
|
1542
|
+
signal?: AbortSignal;
|
|
1543
|
+
}): Promise<{
|
|
1544
|
+
wallet: Address;
|
|
1545
|
+
chain: string;
|
|
1546
|
+
fallbackSigner: Address;
|
|
1547
|
+
}>;
|
|
1548
|
+
isPaused(wallet: Address, options?: {
|
|
1549
|
+
chain?: string;
|
|
1550
|
+
signal?: AbortSignal;
|
|
1551
|
+
}): Promise<{
|
|
1552
|
+
wallet: Address;
|
|
1553
|
+
chain: string;
|
|
1554
|
+
paused: boolean;
|
|
1555
|
+
}>;
|
|
1556
|
+
getL2Receiver(wallet: Address, options?: {
|
|
1557
|
+
chain?: string;
|
|
1558
|
+
signal?: AbortSignal;
|
|
1559
|
+
}): Promise<{
|
|
1560
|
+
wallet: Address;
|
|
1561
|
+
chain: string;
|
|
1562
|
+
receiver: Address;
|
|
1563
|
+
}>;
|
|
1564
|
+
buildPauseCore(params: {
|
|
1565
|
+
wallet: Address;
|
|
1566
|
+
chain: string;
|
|
1567
|
+
signal?: AbortSignal;
|
|
1568
|
+
}): Promise<UserOpResponse>;
|
|
1569
|
+
buildUnpauseCore(params: {
|
|
1570
|
+
wallet: Address;
|
|
1571
|
+
chain: string;
|
|
1572
|
+
signal?: AbortSignal;
|
|
1573
|
+
}): Promise<UserOpResponse>;
|
|
1574
|
+
buildSetSecurityCouncil(params: {
|
|
1575
|
+
wallet: Address;
|
|
1576
|
+
chain: string;
|
|
1577
|
+
securityCouncil: Address;
|
|
1578
|
+
signal?: AbortSignal;
|
|
1579
|
+
}): Promise<UserOpResponse>;
|
|
1580
|
+
buildSetFallbackSigner(params: {
|
|
1581
|
+
wallet: Address;
|
|
1582
|
+
chain: string;
|
|
1583
|
+
fallbackSigner: Address;
|
|
1584
|
+
signal?: AbortSignal;
|
|
1585
|
+
}): Promise<UserOpResponse>;
|
|
1586
|
+
buildOverrideGlobalPause(params: {
|
|
1587
|
+
wallet: Address;
|
|
1588
|
+
chain: string;
|
|
1589
|
+
override: boolean;
|
|
1590
|
+
signal?: AbortSignal;
|
|
1591
|
+
}): Promise<UserOpResponse>;
|
|
1592
|
+
getSessionKeyCount(wallet: Address, options?: {
|
|
1593
|
+
chain?: string;
|
|
1594
|
+
signal?: AbortSignal;
|
|
1595
|
+
}): Promise<SessionKeyCount>;
|
|
1596
|
+
getSessionKeyPolicySigner(wallet: Address, options?: {
|
|
1597
|
+
chain?: string;
|
|
1598
|
+
signal?: AbortSignal;
|
|
1599
|
+
}): Promise<SessionKeyPolicySigner>;
|
|
1600
|
+
getSessionKeyRoles(wallet: Address, sessionKey: Address, options?: {
|
|
1601
|
+
chain?: string;
|
|
1602
|
+
signal?: AbortSignal;
|
|
1603
|
+
}): Promise<SessionKeyRoles>;
|
|
1604
|
+
getSessionKeyTokenLimit(wallet: Address, sessionKey: Address, token: Address, options?: {
|
|
1605
|
+
chain?: string;
|
|
1606
|
+
signal?: AbortSignal;
|
|
1607
|
+
}): Promise<SessionKeyTokenLimit>;
|
|
1608
|
+
buildRevokeAllSessionKeys(params: {
|
|
1609
|
+
wallet: Address;
|
|
1610
|
+
chain: string;
|
|
1611
|
+
signal?: AbortSignal;
|
|
1612
|
+
}): Promise<UserOpResponse>;
|
|
1613
|
+
buildSetSessionKeyTokenLimits(params: {
|
|
1614
|
+
wallet: Address;
|
|
1615
|
+
sessionKey: Address;
|
|
1616
|
+
chain: string;
|
|
1617
|
+
limits: Array<{
|
|
1618
|
+
token: Address;
|
|
1619
|
+
limit: string;
|
|
1620
|
+
}>;
|
|
1621
|
+
signal?: AbortSignal;
|
|
1622
|
+
}): Promise<UserOpResponse>;
|
|
1623
|
+
buildSetMaxValuePerCall(params: {
|
|
1624
|
+
wallet: Address;
|
|
1625
|
+
sessionKey: Address;
|
|
1626
|
+
chain: string;
|
|
1627
|
+
maxValue: string;
|
|
1628
|
+
signal?: AbortSignal;
|
|
1629
|
+
}): Promise<UserOpResponse>;
|
|
1630
|
+
buildSyncSessionKey(params: {
|
|
1631
|
+
wallet: Address;
|
|
1632
|
+
sessionKey: Address;
|
|
1633
|
+
chain: string;
|
|
1634
|
+
signal?: AbortSignal;
|
|
1635
|
+
}): Promise<UserOpResponse>;
|
|
1636
|
+
getFeatureSessionKeys(wallet: Address, options?: {
|
|
1637
|
+
chain?: string;
|
|
1638
|
+
signal?: AbortSignal;
|
|
1639
|
+
}): Promise<SessionKeyList>;
|
|
1640
|
+
getFeatureSpendingLimits(wallet: Address, options?: {
|
|
1641
|
+
chain?: string;
|
|
1642
|
+
signal?: AbortSignal;
|
|
1643
|
+
}): Promise<SpendingLimitStatus>;
|
|
1644
|
+
getFeatureRoles(wallet: Address, options?: {
|
|
1645
|
+
chain?: string;
|
|
1646
|
+
signal?: AbortSignal;
|
|
1647
|
+
}): Promise<RolesInfo>;
|
|
1648
|
+
getAccountRoles(wallet: Address, account: Address, options?: {
|
|
1649
|
+
chain?: string;
|
|
1650
|
+
signal?: AbortSignal;
|
|
1651
|
+
}): Promise<AccountRoles>;
|
|
1652
|
+
getNativeSpendingSummaries(wallet: Address, options?: {
|
|
1653
|
+
chain?: string;
|
|
1654
|
+
signal?: AbortSignal;
|
|
1655
|
+
}): Promise<{
|
|
1656
|
+
wallet: Address;
|
|
1657
|
+
chain: string;
|
|
1658
|
+
summaries: SpendingLimitSummary[];
|
|
1659
|
+
}>;
|
|
1660
|
+
getTokenSpendingSummaries(wallet: Address, token: Address, options?: {
|
|
1661
|
+
chain?: string;
|
|
1662
|
+
signal?: AbortSignal;
|
|
1663
|
+
}): Promise<{
|
|
1664
|
+
wallet: Address;
|
|
1665
|
+
token: Address;
|
|
1666
|
+
chain: string;
|
|
1667
|
+
summaries: SpendingLimitSummary[];
|
|
1668
|
+
}>;
|
|
1669
|
+
getSpendingPreview(wallet: Address, options?: {
|
|
1670
|
+
chain?: string;
|
|
1671
|
+
signal?: AbortSignal;
|
|
1672
|
+
}): Promise<SpendingLimitPreview>;
|
|
1673
|
+
getSpendingBucket(wallet: Address, windowStart: number, options?: {
|
|
1674
|
+
chain?: string;
|
|
1675
|
+
signal?: AbortSignal;
|
|
1676
|
+
}): Promise<SpendingLimitBucket>;
|
|
1677
|
+
getNativeLimit(wallet: Address, window: number, options?: {
|
|
1678
|
+
chain?: string;
|
|
1679
|
+
signal?: AbortSignal;
|
|
1680
|
+
}): Promise<NativeLimitConfig>;
|
|
1681
|
+
getNativeLimitStatus(wallet: Address, window: number, options?: {
|
|
1682
|
+
chain?: string;
|
|
1683
|
+
signal?: AbortSignal;
|
|
1684
|
+
}): Promise<NativeLimitStatus>;
|
|
1685
|
+
getTokenLimit(wallet: Address, token: Address, window: number, options?: {
|
|
1686
|
+
chain?: string;
|
|
1687
|
+
signal?: AbortSignal;
|
|
1688
|
+
}): Promise<TokenLimitConfig>;
|
|
1689
|
+
getTokenLimitStatus(wallet: Address, token: Address, window: number, options?: {
|
|
1690
|
+
chain?: string;
|
|
1691
|
+
signal?: AbortSignal;
|
|
1692
|
+
}): Promise<TokenLimitFullStatus>;
|
|
1693
|
+
buildEnableSpendingLimit(params: {
|
|
1694
|
+
wallet: Address;
|
|
1695
|
+
chain: string;
|
|
1696
|
+
window: number;
|
|
1697
|
+
limit: string;
|
|
1698
|
+
signal?: AbortSignal;
|
|
1699
|
+
}): Promise<UserOpResponse>;
|
|
1700
|
+
buildDisableSpendingLimit(params: {
|
|
1701
|
+
wallet: Address;
|
|
1702
|
+
chain: string;
|
|
1703
|
+
window: number;
|
|
1704
|
+
signal?: AbortSignal;
|
|
1705
|
+
}): Promise<UserOpResponse>;
|
|
1706
|
+
buildUpdateSpendingLimit(params: {
|
|
1707
|
+
wallet: Address;
|
|
1708
|
+
chain: string;
|
|
1709
|
+
window: number;
|
|
1710
|
+
limit: string;
|
|
1711
|
+
signal?: AbortSignal;
|
|
1712
|
+
}): Promise<UserOpResponse>;
|
|
1713
|
+
buildEnableTokenSpendingLimit(params: {
|
|
1714
|
+
wallet: Address;
|
|
1715
|
+
chain: string;
|
|
1716
|
+
token: Address;
|
|
1717
|
+
window: number;
|
|
1718
|
+
limit: string;
|
|
1719
|
+
signal?: AbortSignal;
|
|
1720
|
+
}): Promise<UserOpResponse>;
|
|
1721
|
+
buildDisableTokenSpendingLimit(params: {
|
|
1722
|
+
wallet: Address;
|
|
1723
|
+
chain: string;
|
|
1724
|
+
token: Address;
|
|
1725
|
+
window: number;
|
|
1726
|
+
signal?: AbortSignal;
|
|
1727
|
+
}): Promise<UserOpResponse>;
|
|
1728
|
+
buildUpdateTokenSpendingLimit(params: {
|
|
1729
|
+
wallet: Address;
|
|
1730
|
+
chain: string;
|
|
1731
|
+
token: Address;
|
|
1732
|
+
window: number;
|
|
1733
|
+
limit: string;
|
|
1734
|
+
signal?: AbortSignal;
|
|
1735
|
+
}): Promise<UserOpResponse>;
|
|
1736
|
+
buildSetSpendValidator(params: {
|
|
1737
|
+
wallet: Address;
|
|
1738
|
+
chain: string;
|
|
1739
|
+
target: Address;
|
|
1740
|
+
selector: Hex;
|
|
1741
|
+
module: Address;
|
|
1742
|
+
signal?: AbortSignal;
|
|
1743
|
+
}): Promise<UserOpResponse>;
|
|
1744
|
+
getAllowlistRoots(wallet: Address, options?: {
|
|
1745
|
+
chain?: string;
|
|
1746
|
+
signal?: AbortSignal;
|
|
1747
|
+
}): Promise<AllowlistRoots>;
|
|
1748
|
+
getActorPermissions(wallet: Address, actor: Address, options?: {
|
|
1749
|
+
chain?: string;
|
|
1750
|
+
signal?: AbortSignal;
|
|
1751
|
+
}): Promise<ActorPermissions>;
|
|
1752
|
+
getTokenMaxTransfer(wallet: Address, token: Address, options?: {
|
|
1753
|
+
chain?: string;
|
|
1754
|
+
signal?: AbortSignal;
|
|
1755
|
+
}): Promise<TokenMaxTransfer>;
|
|
1756
|
+
buildEnableAllowlist(params: {
|
|
1757
|
+
wallet: Address;
|
|
1758
|
+
chain: string;
|
|
1759
|
+
signal?: AbortSignal;
|
|
1760
|
+
}): Promise<UserOpResponse>;
|
|
1761
|
+
buildDisableAllowlist(params: {
|
|
1762
|
+
wallet: Address;
|
|
1763
|
+
chain: string;
|
|
1764
|
+
signal?: AbortSignal;
|
|
1765
|
+
}): Promise<UserOpResponse>;
|
|
1766
|
+
buildEnableContractOnly(params: {
|
|
1767
|
+
wallet: Address;
|
|
1768
|
+
chain: string;
|
|
1769
|
+
enabled: boolean;
|
|
1770
|
+
signal?: AbortSignal;
|
|
1771
|
+
}): Promise<UserOpResponse>;
|
|
1772
|
+
buildSetAllowlistRoots(params: {
|
|
1773
|
+
wallet: Address;
|
|
1774
|
+
chain: string;
|
|
1775
|
+
addressRoot: Hex;
|
|
1776
|
+
selectorRoot: Hex;
|
|
1777
|
+
signal?: AbortSignal;
|
|
1778
|
+
}): Promise<UserOpResponse>;
|
|
1779
|
+
buildSyncAllowlist(params: {
|
|
1780
|
+
wallet: Address;
|
|
1781
|
+
chain: string;
|
|
1782
|
+
signal?: AbortSignal;
|
|
1783
|
+
}): Promise<UserOpResponse>;
|
|
1784
|
+
buildSetMaxTransferAmount(params: {
|
|
1785
|
+
wallet: Address;
|
|
1786
|
+
chain: string;
|
|
1787
|
+
token: Address;
|
|
1788
|
+
maxAmount: string;
|
|
1789
|
+
signal?: AbortSignal;
|
|
1790
|
+
}): Promise<UserOpResponse>;
|
|
1791
|
+
buildSetActorPermissions(params: {
|
|
1792
|
+
wallet: Address;
|
|
1793
|
+
chain: string;
|
|
1794
|
+
actor: Address;
|
|
1795
|
+
permissions: Hex;
|
|
1796
|
+
signal?: AbortSignal;
|
|
1797
|
+
}): Promise<UserOpResponse>;
|
|
1798
|
+
getRecoveryGuardians(wallet: Address, options?: {
|
|
1799
|
+
chain?: string;
|
|
1800
|
+
signal?: AbortSignal;
|
|
1801
|
+
}): Promise<RecoveryGuardians>;
|
|
1802
|
+
getRecoveryProposal(wallet: Address, options?: {
|
|
1803
|
+
chain?: string;
|
|
1804
|
+
signal?: AbortSignal;
|
|
1805
|
+
}): Promise<RecoveryProposalInfo>;
|
|
1806
|
+
getRecoveryProposalState(wallet: Address, options?: {
|
|
1807
|
+
chain?: string;
|
|
1808
|
+
signal?: AbortSignal;
|
|
1809
|
+
}): Promise<RecoveryProposalState>;
|
|
1810
|
+
hasGuardianApproved(wallet: Address, guardian: Address, options?: {
|
|
1811
|
+
chain?: string;
|
|
1812
|
+
signal?: AbortSignal;
|
|
1813
|
+
}): Promise<GuardianApproval>;
|
|
1814
|
+
isGuardian(wallet: Address, guardian: Address, options?: {
|
|
1815
|
+
chain?: string;
|
|
1816
|
+
signal?: AbortSignal;
|
|
1817
|
+
}): Promise<IsGuardian>;
|
|
1818
|
+
buildInitiateRecovery(params: {
|
|
1819
|
+
wallet: Address;
|
|
1820
|
+
chain: string;
|
|
1821
|
+
proposedOwner: Address;
|
|
1822
|
+
signal?: AbortSignal;
|
|
1823
|
+
}): Promise<UserOpResponse>;
|
|
1824
|
+
buildSupportRecovery(params: {
|
|
1825
|
+
wallet: Address;
|
|
1826
|
+
chain: string;
|
|
1827
|
+
guardian: Address;
|
|
1828
|
+
signature: Hex;
|
|
1829
|
+
signal?: AbortSignal;
|
|
1830
|
+
}): Promise<UserOpResponse>;
|
|
1831
|
+
buildExecuteRecovery(params: {
|
|
1832
|
+
wallet: Address;
|
|
1833
|
+
chain: string;
|
|
1834
|
+
signal?: AbortSignal;
|
|
1835
|
+
}): Promise<UserOpResponse>;
|
|
1836
|
+
buildCancelRecovery(params: {
|
|
1837
|
+
wallet: Address;
|
|
1838
|
+
chain: string;
|
|
1839
|
+
signal?: AbortSignal;
|
|
1840
|
+
}): Promise<UserOpResponse>;
|
|
1841
|
+
getArmedStatus(wallet: Address, options?: {
|
|
1842
|
+
chain?: string;
|
|
1843
|
+
signal?: AbortSignal;
|
|
1844
|
+
}): Promise<ArmedStatus>;
|
|
1845
|
+
getTargetIndex(wallet: Address, target: Address, options?: {
|
|
1846
|
+
chain?: string;
|
|
1847
|
+
signal?: AbortSignal;
|
|
1848
|
+
}): Promise<TargetIndex>;
|
|
1849
|
+
getSelectorIndex(wallet: Address, selector: Hex, options?: {
|
|
1850
|
+
chain?: string;
|
|
1851
|
+
signal?: AbortSignal;
|
|
1852
|
+
}): Promise<SelectorIndex>;
|
|
1853
|
+
hasRole(wallet: Address, account: Address, roleId: Hex, options?: {
|
|
1854
|
+
chain?: string;
|
|
1855
|
+
signal?: AbortSignal;
|
|
1856
|
+
}): Promise<HasRole>;
|
|
1857
|
+
getRoleBudget(wallet: Address, roleId: Hex, options?: {
|
|
1858
|
+
chain?: string;
|
|
1859
|
+
signal?: AbortSignal;
|
|
1860
|
+
}): Promise<RoleBudget>;
|
|
1861
|
+
getRole(wallet: Address, roleId: Hex, options?: {
|
|
1862
|
+
chain?: string;
|
|
1863
|
+
signal?: AbortSignal;
|
|
1864
|
+
}): Promise<RoleInfo>;
|
|
1865
|
+
buildCreateRole(params: {
|
|
1866
|
+
wallet: Address;
|
|
1867
|
+
chain: string;
|
|
1868
|
+
roleId: Hex;
|
|
1869
|
+
name: string;
|
|
1870
|
+
targetBitmap: string;
|
|
1871
|
+
selectorBitmap: string;
|
|
1872
|
+
maxValue?: number;
|
|
1873
|
+
signal?: AbortSignal;
|
|
1874
|
+
}): Promise<UserOpResponse>;
|
|
1875
|
+
buildCreateRolesBatch(params: {
|
|
1876
|
+
wallet: Address;
|
|
1877
|
+
chain: string;
|
|
1878
|
+
roles: Array<{
|
|
1879
|
+
roleId: Hex;
|
|
1880
|
+
name: string;
|
|
1881
|
+
targetBitmap: string;
|
|
1882
|
+
selectorBitmap: string;
|
|
1883
|
+
maxValue?: string | number;
|
|
1884
|
+
}>;
|
|
1885
|
+
signal?: AbortSignal;
|
|
1886
|
+
}): Promise<UserOpResponse>;
|
|
1887
|
+
buildGrantRole(params: {
|
|
1888
|
+
wallet: Address;
|
|
1889
|
+
chain: string;
|
|
1890
|
+
account: Address;
|
|
1891
|
+
roleId: Hex;
|
|
1892
|
+
signal?: AbortSignal;
|
|
1893
|
+
}): Promise<UserOpResponse>;
|
|
1894
|
+
buildRevokeRole(params: {
|
|
1895
|
+
wallet: Address;
|
|
1896
|
+
chain: string;
|
|
1897
|
+
account: Address;
|
|
1898
|
+
roleId: Hex;
|
|
1899
|
+
signal?: AbortSignal;
|
|
1900
|
+
}): Promise<UserOpResponse>;
|
|
1901
|
+
buildGrantRolesBatch(params: {
|
|
1902
|
+
wallet: Address;
|
|
1903
|
+
chain: string;
|
|
1904
|
+
grants: Array<{
|
|
1905
|
+
account: Address;
|
|
1906
|
+
roleId: Hex;
|
|
1907
|
+
}>;
|
|
1908
|
+
signal?: AbortSignal;
|
|
1909
|
+
}): Promise<UserOpResponse>;
|
|
1910
|
+
buildRevokeRolesBatch(params: {
|
|
1911
|
+
wallet: Address;
|
|
1912
|
+
chain: string;
|
|
1913
|
+
revokes: Array<{
|
|
1914
|
+
account: Address;
|
|
1915
|
+
roleId: Hex;
|
|
1916
|
+
}>;
|
|
1917
|
+
signal?: AbortSignal;
|
|
1918
|
+
}): Promise<UserOpResponse>;
|
|
1919
|
+
buildUpdateRole(params: {
|
|
1920
|
+
wallet: Address;
|
|
1921
|
+
chain: string;
|
|
1922
|
+
roleId: Hex;
|
|
1923
|
+
name: string;
|
|
1924
|
+
targetBitmap: string;
|
|
1925
|
+
selectorBitmap: string;
|
|
1926
|
+
maxValue: string;
|
|
1927
|
+
signal?: AbortSignal;
|
|
1928
|
+
}): Promise<UserOpResponse>;
|
|
1929
|
+
buildSetRoleBitmap(params: {
|
|
1930
|
+
wallet: Address;
|
|
1931
|
+
chain: string;
|
|
1932
|
+
roleId: Hex;
|
|
1933
|
+
targetBitmap: string;
|
|
1934
|
+
selectorBitmap: string;
|
|
1935
|
+
signal?: AbortSignal;
|
|
1936
|
+
}): Promise<UserOpResponse>;
|
|
1937
|
+
buildGrantRolesMultiAccount(params: {
|
|
1938
|
+
wallet: Address;
|
|
1939
|
+
chain: string;
|
|
1940
|
+
accounts: Address[];
|
|
1941
|
+
roleIds: Hex[];
|
|
1942
|
+
signal?: AbortSignal;
|
|
1943
|
+
}): Promise<UserOpResponse>;
|
|
1944
|
+
buildArmRoles(params: {
|
|
1945
|
+
wallet: Address;
|
|
1946
|
+
chain: string;
|
|
1947
|
+
armed: boolean;
|
|
1948
|
+
signal?: AbortSignal;
|
|
1949
|
+
}): Promise<UserOpResponse>;
|
|
1950
|
+
buildSetRoleBudget(params: {
|
|
1951
|
+
wallet: Address;
|
|
1952
|
+
chain: string;
|
|
1953
|
+
roleId: Hex;
|
|
1954
|
+
budget: string;
|
|
1955
|
+
signal?: AbortSignal;
|
|
1956
|
+
}): Promise<UserOpResponse>;
|
|
1957
|
+
getCrossChainReceiverState(wallet: Address, options?: {
|
|
1958
|
+
chain?: string;
|
|
1959
|
+
signal?: AbortSignal;
|
|
1960
|
+
}): Promise<CrossChainReceiverState>;
|
|
1961
|
+
getCrossChainSkipProposal(wallet: Address, options?: {
|
|
1962
|
+
chain?: string;
|
|
1963
|
+
signal?: AbortSignal;
|
|
1964
|
+
}): Promise<CrossChainSkipProposal>;
|
|
1965
|
+
getCrossChainGasLimit(chainId: number, signal?: AbortSignal): Promise<CrossChainGasLimit>;
|
|
1966
|
+
buildProposeOwnerUpdate(params: {
|
|
1967
|
+
wallet: Address;
|
|
1968
|
+
chain: string;
|
|
1969
|
+
newOwners: Address[];
|
|
1970
|
+
newThreshold: number;
|
|
1971
|
+
targetChains: number[];
|
|
1972
|
+
signal?: AbortSignal;
|
|
1973
|
+
}): Promise<UserOpResponse>;
|
|
1974
|
+
buildExecuteOwnerUpdate(params: {
|
|
1975
|
+
wallet: Address;
|
|
1976
|
+
chain: string;
|
|
1977
|
+
proposalId: Hex;
|
|
1978
|
+
signal?: AbortSignal;
|
|
1979
|
+
}): Promise<UserOpResponse>;
|
|
1980
|
+
buildResyncL2(params: {
|
|
1981
|
+
wallet: Address;
|
|
1982
|
+
chain: string;
|
|
1983
|
+
targetChain: number;
|
|
1984
|
+
signal?: AbortSignal;
|
|
1985
|
+
}): Promise<UserOpResponse>;
|
|
1986
|
+
updateAutomation(id: string, params: {
|
|
1987
|
+
sessionKey?: Address | null;
|
|
1988
|
+
config?: Record<string, unknown>;
|
|
1989
|
+
signal?: AbortSignal;
|
|
1990
|
+
}): Promise<Automation>;
|
|
1991
|
+
triggerAutomation(id: string, signal?: AbortSignal): Promise<TriggerAutomationResponse>;
|
|
1992
|
+
getAddressCapabilities(signal?: AbortSignal): Promise<AddressCapabilities>;
|
|
1993
|
+
getUserOpTemplate(options?: {
|
|
1994
|
+
chain?: string;
|
|
1995
|
+
signal?: AbortSignal;
|
|
1996
|
+
}): Promise<UserOpTemplate>;
|
|
1997
|
+
getEIP712Template(options?: {
|
|
1998
|
+
chain?: string;
|
|
1999
|
+
signal?: AbortSignal;
|
|
2000
|
+
}): Promise<EIP712Template>;
|
|
2001
|
+
validateTimestamp(params: {
|
|
2002
|
+
validAfter: number;
|
|
2003
|
+
validUntil: number;
|
|
2004
|
+
signal?: AbortSignal;
|
|
2005
|
+
}): Promise<TimestampValidation>;
|
|
2006
|
+
getRegistryFeatures(options?: {
|
|
2007
|
+
chain?: string;
|
|
2008
|
+
signal?: AbortSignal;
|
|
2009
|
+
}): Promise<RegistryFeatures>;
|
|
2010
|
+
getRegistryVersion(options?: {
|
|
2011
|
+
chain?: string;
|
|
2012
|
+
signal?: AbortSignal;
|
|
2013
|
+
}): Promise<RegistryVersion>;
|
|
2014
|
+
isFeatureInternal(featureId: Hex, options?: {
|
|
2015
|
+
chain?: string;
|
|
2016
|
+
signal?: AbortSignal;
|
|
2017
|
+
}): Promise<FeatureInternal>;
|
|
2018
|
+
canValidatorHandleSelector(validatorId: Hex, selector: Hex, options?: {
|
|
2019
|
+
chain?: string;
|
|
2020
|
+
signal?: AbortSignal;
|
|
2021
|
+
}): Promise<ValidatorSelectorPermitted>;
|
|
2022
|
+
getRegistryCoreModuleId(key: Hex, options?: {
|
|
2023
|
+
chain?: string;
|
|
2024
|
+
signal?: AbortSignal;
|
|
2025
|
+
}): Promise<RegistryCoreModuleId>;
|
|
2026
|
+
canAccessRegistrySlot(featureId: Hex, slot: Hex, options?: {
|
|
2027
|
+
chain?: string;
|
|
2028
|
+
signal?: AbortSignal;
|
|
2029
|
+
}): Promise<RegistrySlotAccess>;
|
|
2030
|
+
registrySupportsMigration(featureId: Hex, options?: {
|
|
2031
|
+
chain?: string;
|
|
2032
|
+
signal?: AbortSignal;
|
|
2033
|
+
}): Promise<RegistrySupportsMigration>;
|
|
2034
|
+
isRegistryFeatureImplementation(impl: Address, options?: {
|
|
2035
|
+
chain?: string;
|
|
2036
|
+
signal?: AbortSignal;
|
|
2037
|
+
}): Promise<RegistryIsFeatureImplementation>;
|
|
2038
|
+
getRegistryFeatureImplementation(featureId: Hex, options?: {
|
|
2039
|
+
chain?: string;
|
|
2040
|
+
signal?: AbortSignal;
|
|
2041
|
+
}): Promise<RegistryFeatureImplementation>;
|
|
2042
|
+
getRegistryFeatureImplementationForWallet(wallet: Address, featureId: Hex, options?: {
|
|
2043
|
+
chain?: string;
|
|
2044
|
+
signal?: AbortSignal;
|
|
2045
|
+
}): Promise<RegistryFeatureImplementationForWallet>;
|
|
2046
|
+
isRegistryMandatoryFeature(featureId: Hex, options?: {
|
|
2047
|
+
chain?: string;
|
|
2048
|
+
signal?: AbortSignal;
|
|
2049
|
+
}): Promise<RegistryIsMandatoryFeature>;
|
|
2050
|
+
getRegistryEcdsaModule(options?: {
|
|
2051
|
+
chain?: string;
|
|
2052
|
+
signal?: AbortSignal;
|
|
2053
|
+
}): Promise<RegistryEcdsaModule>;
|
|
2054
|
+
getRegistrySessionKeyManager(options?: {
|
|
2055
|
+
chain?: string;
|
|
2056
|
+
signal?: AbortSignal;
|
|
2057
|
+
}): Promise<RegistrySessionKeyManager>;
|
|
2058
|
+
getRegistrySpendingLimitManager(options?: {
|
|
2059
|
+
chain?: string;
|
|
2060
|
+
signal?: AbortSignal;
|
|
2061
|
+
}): Promise<RegistrySpendingLimitManager>;
|
|
2062
|
+
getRegistryPermissionsManager(options?: {
|
|
2063
|
+
chain?: string;
|
|
2064
|
+
signal?: AbortSignal;
|
|
2065
|
+
}): Promise<RegistryPermissionsManager>;
|
|
2066
|
+
getRegistryCapabilitySnapshot(wallet: Address, options?: {
|
|
2067
|
+
chain?: string;
|
|
2068
|
+
signal?: AbortSignal;
|
|
2069
|
+
}): Promise<RegistryCapabilitySnapshot>;
|
|
2070
|
+
getRegistryMandatoryInitData(wallet: Address, featureId: Hex, options?: {
|
|
2071
|
+
chain?: string;
|
|
2072
|
+
signal?: AbortSignal;
|
|
2073
|
+
}): Promise<RegistryMandatoryInitData>;
|
|
2074
|
+
buildSetRegistryCanaryOptIn(params: {
|
|
2075
|
+
wallet: Address;
|
|
2076
|
+
chain: string;
|
|
2077
|
+
optIn: boolean;
|
|
2078
|
+
signal?: AbortSignal;
|
|
2079
|
+
}): Promise<UserOpResponse>;
|
|
2080
|
+
buildSetRegistryMandatoryInitData(params: {
|
|
2081
|
+
wallet: Address;
|
|
2082
|
+
chain: string;
|
|
2083
|
+
featureId: Hex;
|
|
2084
|
+
initData: Hex;
|
|
2085
|
+
signal?: AbortSignal;
|
|
2086
|
+
}): Promise<UserOpResponse>;
|
|
2087
|
+
buildUpdateRegistryCapabilitySnapshot(params: {
|
|
2088
|
+
wallet: Address;
|
|
2089
|
+
chain: string;
|
|
2090
|
+
snapshot: Hex;
|
|
2091
|
+
signal?: AbortSignal;
|
|
2092
|
+
}): Promise<UserOpResponse>;
|
|
2093
|
+
isGloballyPaused(wallet: Address, options?: {
|
|
2094
|
+
chain?: string;
|
|
2095
|
+
signal?: AbortSignal;
|
|
2096
|
+
}): Promise<GloballyPaused>;
|
|
2097
|
+
isCanaryOptIn(wallet: Address, options?: {
|
|
2098
|
+
chain?: string;
|
|
2099
|
+
signal?: AbortSignal;
|
|
2100
|
+
}): Promise<CanaryOptIn>;
|
|
2101
|
+
estimateRelay(params: {
|
|
2102
|
+
chain: string;
|
|
2103
|
+
userOp: Record<string, unknown>;
|
|
2104
|
+
signal?: AbortSignal;
|
|
2105
|
+
}): Promise<RelayEstimate>;
|
|
2106
|
+
previewRelay(params: {
|
|
2107
|
+
chain: string;
|
|
2108
|
+
userOp: Record<string, unknown>;
|
|
2109
|
+
signal?: AbortSignal;
|
|
2110
|
+
}): Promise<RelayPreview>;
|
|
2111
|
+
getHealth(signal?: AbortSignal): Promise<HealthStatus>;
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
interface UserOpBuilderConfig {
|
|
2115
|
+
account: Address;
|
|
2116
|
+
chainId: number;
|
|
2117
|
+
entryPoint?: Address;
|
|
2118
|
+
}
|
|
2119
|
+
interface ExecuteCall {
|
|
2120
|
+
target: Address;
|
|
2121
|
+
value: bigint;
|
|
2122
|
+
data: Hex;
|
|
2123
|
+
}
|
|
2124
|
+
declare function packGasLimits(verificationGasLimit: bigint, callGasLimit: bigint): Hex;
|
|
2125
|
+
declare function unpackGasLimits(packed: Hex): {
|
|
2126
|
+
verificationGasLimit: bigint;
|
|
2127
|
+
callGasLimit: bigint;
|
|
2128
|
+
};
|
|
2129
|
+
declare function packGasFees(maxPriorityFeePerGas: bigint, maxFeePerGas: bigint): Hex;
|
|
2130
|
+
declare function unpackGasFees(packed: Hex): {
|
|
2131
|
+
maxPriorityFeePerGas: bigint;
|
|
2132
|
+
maxFeePerGas: bigint;
|
|
2133
|
+
};
|
|
2134
|
+
declare function getUserOpHash(userOp: PackedUserOperation, entryPoint: Address, chainId: number): Hex;
|
|
2135
|
+
declare class UserOpBuilder {
|
|
2136
|
+
private account;
|
|
2137
|
+
private chainId;
|
|
2138
|
+
private entryPoint;
|
|
2139
|
+
constructor(config: UserOpBuilderConfig);
|
|
2140
|
+
create(callData: Hex, nonce: bigint): PackedUserOperation;
|
|
2141
|
+
encodeExecute(call: ExecuteCall): Hex;
|
|
2142
|
+
encodeExecuteBatch(calls: ExecuteCall[]): Hex;
|
|
2143
|
+
encodeEnableFeature(featureId: Hex, initData: Hex): Hex;
|
|
2144
|
+
encodeDisableFeature(featureId: Hex): Hex;
|
|
2145
|
+
buildExecute(call: ExecuteCall, nonce: bigint): PackedUserOperation;
|
|
2146
|
+
buildExecuteBatch(calls: ExecuteCall[], nonce: bigint): PackedUserOperation;
|
|
2147
|
+
buildEnableFeature(featureId: Hex, initData: Hex, nonce: bigint): PackedUserOperation;
|
|
2148
|
+
buildDisableFeature(featureId: Hex, nonce: bigint): PackedUserOperation;
|
|
2149
|
+
withGas(userOp: PackedUserOperation, gas: Partial<UserOpGasLimits>): PackedUserOperation;
|
|
2150
|
+
withPaymaster(userOp: PackedUserOperation, paymasterAndData: Hex): PackedUserOperation;
|
|
2151
|
+
withSignature(userOp: PackedUserOperation, signature: Hex): PackedUserOperation;
|
|
2152
|
+
getHash(userOp: PackedUserOperation): Hex;
|
|
2153
|
+
}
|
|
2154
|
+
declare function createUserOpBuilder(config: UserOpBuilderConfig): UserOpBuilder;
|
|
2155
|
+
|
|
2156
|
+
declare const ENTRYPOINT_V07: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
|
|
2157
|
+
declare const FEATURE_ID_STRINGS: {
|
|
2158
|
+
readonly MODULE_ECDSA_VALIDATION: "module.validation.ecdsa";
|
|
2159
|
+
readonly MODULE_SESSION_KEY_VALIDATION: "module.validation.session_key";
|
|
2160
|
+
readonly FEATURE_SESSION_KEYS: "feature.session_keys";
|
|
2161
|
+
readonly FEATURE_SPENDING_LIMIT: "feature.spending_limit";
|
|
2162
|
+
readonly FEATURE_APPROVAL_LIMIT: "feature.approval_limit";
|
|
2163
|
+
readonly FEATURE_PERMISSIONS: "feature.permissions";
|
|
2164
|
+
readonly FEATURE_SOCIAL_RECOVERY: "feature.social_recovery";
|
|
2165
|
+
readonly FEATURE_PAYMASTER_GUARD: "feature.paymaster_guard";
|
|
2166
|
+
};
|
|
2167
|
+
declare const FEATURE_IDS: Record<keyof typeof FEATURE_ID_STRINGS, Hex>;
|
|
2168
|
+
declare const CONTRACTS: {
|
|
2169
|
+
readonly VAULTUM_CORE: "VaultumCore";
|
|
2170
|
+
readonly VAULTUM_FACTORY: "VaultumAccountFactory";
|
|
2171
|
+
readonly FEATURE_REGISTRY: "FeatureRegistry";
|
|
2172
|
+
readonly IMPLEMENTATION_REGISTRY: "ImplementationRegistry";
|
|
2173
|
+
readonly SESSION_KEY_MANAGER: "SessionKeyManager";
|
|
2174
|
+
readonly SPENDING_LIMIT_MANAGER: "SpendingLimitManager";
|
|
2175
|
+
readonly PERMISSIONS_MANAGER: "PermissionsManager";
|
|
2176
|
+
readonly SOCIAL_RECOVERY_MANAGER: "SocialRecoveryManager";
|
|
2177
|
+
readonly PAYMASTER_GUARD: "PaymasterGuard";
|
|
2178
|
+
readonly ECDSA_VALIDATION_MODULE: "ECDSAValidationModuleSingleton";
|
|
2179
|
+
readonly SESSION_KEY_VALIDATION_MODULE: "SessionKeyValidationModuleSingleton";
|
|
2180
|
+
readonly VAULTUM_SETTLEMENT_PAYMASTER: "VaultumSettlementPaymaster";
|
|
2181
|
+
};
|
|
2182
|
+
type ContractName = (typeof CONTRACTS)[keyof typeof CONTRACTS];
|
|
2183
|
+
|
|
2184
|
+
declare const GOVERNANCE_DOMAIN_NAME = "VaultumGovernance";
|
|
2185
|
+
declare const GOVERNANCE_DOMAIN_VERSION = "1";
|
|
2186
|
+
type CrossChainRootTypedMessage = {
|
|
2187
|
+
merkleRoot: Hex;
|
|
2188
|
+
nonce: bigint;
|
|
2189
|
+
validUntil: bigint;
|
|
2190
|
+
};
|
|
2191
|
+
interface CrossChainRootTypedDataParams {
|
|
2192
|
+
merkleRoot: Hex;
|
|
2193
|
+
nonce: bigint;
|
|
2194
|
+
validUntil: bigint;
|
|
2195
|
+
registry: Address;
|
|
2196
|
+
chainId: number;
|
|
2197
|
+
}
|
|
2198
|
+
declare function buildCrossChainRootTypedData(params: CrossChainRootTypedDataParams): TypedDataDefinition;
|
|
2199
|
+
declare function hashCrossChainRootTypedData(params: CrossChainRootTypedDataParams): Hex;
|
|
2200
|
+
|
|
2201
|
+
declare const VERSION: string;
|
|
2202
|
+
|
|
2203
|
+
export { API, type AccountCreateResult, type AccountOperation, type AccountOperations, type AccountRoles, type AccountVerifyResult, type ActorPermissions, type AddressBookEntry, type AddressBookPage, type AddressCapabilities, type AggregatedRecoveryInitiateResponse, type AggregatedRecoveryPrepareExecutionResponse, type AggregatedRecoveryStatus, type AllowlistRoots, type AllowlistStatus, type ApiUser, type ArmedStatus, type AuthMeResponse, type AuthTokenResponse, type Automation, type AutomationDetails, type AutomationExecution, type AutomationExecutionStatus, type AutomationPage, type AutomationResponse, type AutomationStatus, type AutomationType, type BanStatus, CONTRACTS, type CanaryOptIn, type Capabilities, type ContractName, type CrossChainConfig, type CrossChainGasLimit, type CrossChainPendingProposal, type CrossChainReceiverState, type CrossChainRootTypedDataParams, type CrossChainRootTypedMessage, type CrossChainSkipProposal, type CursorPage, type EIP712Template, ENTRYPOINT_V07, type EnabledFeature, type ExecuteCall, FEATURE_IDS, FEATURE_ID_STRINGS, type FeatureConfig, type FeatureInfo, type FeatureInternal, type FinalizedProposal, GOVERNANCE_DOMAIN_NAME, GOVERNANCE_DOMAIN_VERSION, type GloballyPaused, type GuardianApproval, type GuardianConfig, type HasRole, type HealthStatus, type IsGuardian, type LogoutResponse, type NativeLimitConfig, type NativeLimitStatus, type OnChainRecoveryStatus, type OperationResult, type OperationState, type PackedUserOperation, type Proposal, type ProposalCall, type ProposalDigest, type ProposalSignature, type ProposalsPage, type QuoteResponse, type QuoteResponseRaw, type RecoveryGuardians, type RecoveryProposal, type RecoveryProposalInfo, type RecoveryProposalState, type RecoveryStatus, type RegistryFeatures, type RegistryVersion, type RelayEstimate, type RequestContext, type RequestInterceptor, type ResponseContext, type ResponseInterceptor, type RetryConfig, type RoleBudget, type RoleInfo, type RolesInfo, type SDKErrorCode, type SelectorIndex, type SessionKeyCount, type SessionKeyInfo, type SessionKeyList, type SessionKeyPolicySigner, type SessionKeyRoles, type SessionKeyStatus, type SessionKeyTokenLimit, type SettlementQuote, type SettlementTokens, type SpendingLimitBucket, type SpendingLimitPreview, type SpendingLimitStatus, type SpendingLimitSummary, type TargetIndex, type TimestampValidation, type TimingConfig, type TokenLimitConfig, type TokenLimitFullStatus, type TokenLimitStatus, type TokenMaxTransfer, type TriggerAutomationResponse, UserOpBuilder, type UserOpBuilderConfig, type UserOpGasLimits, type UserOpResponse, type UserOpSimulationResponse, type UserOpTemplate, type UserOperation, type UserWalletInfo, VERSION, type ValidatorSelectorPermitted, type VaultState, VaultumClient, type VaultumConfig, VaultumError, type WaitOptions, type WalletChallengeResponse, type WalletsResponse, buildCrossChainRootTypedData, createUserOpBuilder, getUserOpHash, hashCrossChainRootTypedData, packGasFees, packGasLimits, parseQuoteResponse, unpackGasFees, unpackGasLimits };
|