@aspect-wallet/sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/LICENSE +21 -0
- package/README.md +708 -0
- package/dist/audit/history.d.ts +44 -0
- package/dist/audit/history.d.ts.map +1 -0
- package/dist/audit/history.js +80 -0
- package/dist/audit/history.js.map +1 -0
- package/dist/auth/email.d.ts +52 -0
- package/dist/auth/email.d.ts.map +1 -0
- package/dist/auth/email.js +66 -0
- package/dist/auth/email.js.map +1 -0
- package/dist/auth/oauth.d.ts +47 -0
- package/dist/auth/oauth.d.ts.map +1 -0
- package/dist/auth/oauth.js +103 -0
- package/dist/auth/oauth.js.map +1 -0
- package/dist/auth/passkey-auth.d.ts +39 -0
- package/dist/auth/passkey-auth.d.ts.map +1 -0
- package/dist/auth/passkey-auth.js +108 -0
- package/dist/auth/passkey-auth.js.map +1 -0
- package/dist/auth/session.d.ts +30 -0
- package/dist/auth/session.d.ts.map +1 -0
- package/dist/auth/session.js +61 -0
- package/dist/auth/session.js.map +1 -0
- package/dist/chain/registry.d.ts +25 -0
- package/dist/chain/registry.d.ts.map +1 -0
- package/dist/chain/registry.js +46 -0
- package/dist/chain/registry.js.map +1 -0
- package/dist/core/client.d.ts +78 -0
- package/dist/core/client.d.ts.map +1 -0
- package/dist/core/client.js +129 -0
- package/dist/core/client.js.map +1 -0
- package/dist/core/config.d.ts +22 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +91 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/errors.d.ts +32 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +95 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +64 -0
- package/dist/index.js.map +1 -0
- package/dist/mfa/guardian.d.ts +27 -0
- package/dist/mfa/guardian.d.ts.map +1 -0
- package/dist/mfa/guardian.js +37 -0
- package/dist/mfa/guardian.js.map +1 -0
- package/dist/mfa/multisig.d.ts +28 -0
- package/dist/mfa/multisig.d.ts.map +1 -0
- package/dist/mfa/multisig.js +40 -0
- package/dist/mfa/multisig.js.map +1 -0
- package/dist/mfa/tiers.d.ts +34 -0
- package/dist/mfa/tiers.d.ts.map +1 -0
- package/dist/mfa/tiers.js +66 -0
- package/dist/mfa/tiers.js.map +1 -0
- package/dist/mfa/timelock.d.ts +32 -0
- package/dist/mfa/timelock.d.ts.map +1 -0
- package/dist/mfa/timelock.js +47 -0
- package/dist/mfa/timelock.js.map +1 -0
- package/dist/recovery/devices.d.ts +31 -0
- package/dist/recovery/devices.d.ts.map +1 -0
- package/dist/recovery/devices.js +33 -0
- package/dist/recovery/devices.js.map +1 -0
- package/dist/recovery/export.d.ts +33 -0
- package/dist/recovery/export.d.ts.map +1 -0
- package/dist/recovery/export.js +44 -0
- package/dist/recovery/export.js.map +1 -0
- package/dist/recovery/rotation.d.ts +26 -0
- package/dist/recovery/rotation.d.ts.map +1 -0
- package/dist/recovery/rotation.js +31 -0
- package/dist/recovery/rotation.js.map +1 -0
- package/dist/recovery/social.d.ts +33 -0
- package/dist/recovery/social.d.ts.map +1 -0
- package/dist/recovery/social.js +36 -0
- package/dist/recovery/social.js.map +1 -0
- package/dist/security/freeze.d.ts +34 -0
- package/dist/security/freeze.d.ts.map +1 -0
- package/dist/security/freeze.js +42 -0
- package/dist/security/freeze.js.map +1 -0
- package/dist/security/revoke.d.ts +27 -0
- package/dist/security/revoke.d.ts.map +1 -0
- package/dist/security/revoke.js +27 -0
- package/dist/security/revoke.js.map +1 -0
- package/dist/security/watchtower.d.ts +34 -0
- package/dist/security/watchtower.d.ts.map +1 -0
- package/dist/security/watchtower.js +38 -0
- package/dist/security/watchtower.js.map +1 -0
- package/dist/session-keys/manager.d.ts +40 -0
- package/dist/session-keys/manager.d.ts.map +1 -0
- package/dist/session-keys/manager.js +65 -0
- package/dist/session-keys/manager.js.map +1 -0
- package/dist/session-keys/permissions.d.ts +44 -0
- package/dist/session-keys/permissions.d.ts.map +1 -0
- package/dist/session-keys/permissions.js +63 -0
- package/dist/session-keys/permissions.js.map +1 -0
- package/dist/session-keys/templates.d.ts +49 -0
- package/dist/session-keys/templates.d.ts.map +1 -0
- package/dist/session-keys/templates.js +65 -0
- package/dist/session-keys/templates.js.map +1 -0
- package/dist/signer/eoa.d.ts +24 -0
- package/dist/signer/eoa.d.ts.map +1 -0
- package/dist/signer/eoa.js +32 -0
- package/dist/signer/eoa.js.map +1 -0
- package/dist/signer/interface.d.ts +60 -0
- package/dist/signer/interface.d.ts.map +1 -0
- package/dist/signer/interface.js +47 -0
- package/dist/signer/interface.js.map +1 -0
- package/dist/signer/multisig.d.ts +38 -0
- package/dist/signer/multisig.d.ts.map +1 -0
- package/dist/signer/multisig.js +56 -0
- package/dist/signer/multisig.js.map +1 -0
- package/dist/signer/passkey.d.ts +35 -0
- package/dist/signer/passkey.d.ts.map +1 -0
- package/dist/signer/passkey.js +112 -0
- package/dist/signer/passkey.js.map +1 -0
- package/dist/signer/session.d.ts +24 -0
- package/dist/signer/session.d.ts.map +1 -0
- package/dist/signer/session.js +32 -0
- package/dist/signer/session.js.map +1 -0
- package/dist/sponsor/paymaster.d.ts +27 -0
- package/dist/sponsor/paymaster.d.ts.map +1 -0
- package/dist/sponsor/paymaster.js +43 -0
- package/dist/sponsor/paymaster.js.map +1 -0
- package/dist/transport/api.d.ts +25 -0
- package/dist/transport/api.d.ts.map +1 -0
- package/dist/transport/api.js +79 -0
- package/dist/transport/api.js.map +1 -0
- package/dist/transport/bundler.d.ts +52 -0
- package/dist/transport/bundler.d.ts.map +1 -0
- package/dist/transport/bundler.js +109 -0
- package/dist/transport/bundler.js.map +1 -0
- package/dist/transport/iframe.d.ts +33 -0
- package/dist/transport/iframe.d.ts.map +1 -0
- package/dist/transport/iframe.js +131 -0
- package/dist/transport/iframe.js.map +1 -0
- package/dist/types.d.ts +366 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/dist/userop/builder.d.ts +75 -0
- package/dist/userop/builder.d.ts.map +1 -0
- package/dist/userop/builder.js +150 -0
- package/dist/userop/builder.js.map +1 -0
- package/dist/userop/encoding.d.ts +44 -0
- package/dist/userop/encoding.d.ts.map +1 -0
- package/dist/userop/encoding.js +99 -0
- package/dist/userop/encoding.js.map +1 -0
- package/dist/userop/gas.d.ts +35 -0
- package/dist/userop/gas.d.ts.map +1 -0
- package/dist/userop/gas.js +53 -0
- package/dist/userop/gas.js.map +1 -0
- package/dist/userop/hash.d.ts +34 -0
- package/dist/userop/hash.d.ts.map +1 -0
- package/dist/userop/hash.js +55 -0
- package/dist/userop/hash.js.map +1 -0
- package/dist/userop/nonce.d.ts +53 -0
- package/dist/userop/nonce.d.ts.map +1 -0
- package/dist/userop/nonce.js +79 -0
- package/dist/userop/nonce.js.map +1 -0
- package/dist/wallet/factory.d.ts +63 -0
- package/dist/wallet/factory.d.ts.map +1 -0
- package/dist/wallet/factory.js +63 -0
- package/dist/wallet/factory.js.map +1 -0
- package/package.json +70 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core type definitions for the FcxWallet SDK.
|
|
3
|
+
* Corresponds to SPEC-013 Section 18.
|
|
4
|
+
*/
|
|
5
|
+
export type Hex = `0x${string}`;
|
|
6
|
+
export type Address = `0x${string}`;
|
|
7
|
+
export type ChainId = 'arbitrum-one' | 'arbitrum-sepolia' | 'base' | 'base-sepolia' | 'polygon' | 'polygon-amoy' | 'ethereum' | 'sepolia';
|
|
8
|
+
export interface UserOperation {
|
|
9
|
+
sender: Address;
|
|
10
|
+
nonce: bigint;
|
|
11
|
+
initCode: Hex;
|
|
12
|
+
callData: Hex;
|
|
13
|
+
callGasLimit: bigint;
|
|
14
|
+
verificationGasLimit: bigint;
|
|
15
|
+
preVerificationGas: bigint;
|
|
16
|
+
maxFeePerGas: bigint;
|
|
17
|
+
maxPriorityFeePerGas: bigint;
|
|
18
|
+
paymasterAndData: Hex;
|
|
19
|
+
signature: Hex;
|
|
20
|
+
}
|
|
21
|
+
export interface ExecutionResult {
|
|
22
|
+
userOpHash: Hex;
|
|
23
|
+
transactionHash: Hex;
|
|
24
|
+
success: boolean;
|
|
25
|
+
actualGasCost: bigint;
|
|
26
|
+
actualGasUsed: bigint;
|
|
27
|
+
blockNumber: bigint;
|
|
28
|
+
timestamp: number;
|
|
29
|
+
}
|
|
30
|
+
export interface CallRequest {
|
|
31
|
+
target: Address;
|
|
32
|
+
value: bigint;
|
|
33
|
+
data: Hex;
|
|
34
|
+
}
|
|
35
|
+
export interface ExecuteOptions extends CallRequest {
|
|
36
|
+
sponsored?: boolean;
|
|
37
|
+
authTier?: 1 | 2 | 3 | 4;
|
|
38
|
+
}
|
|
39
|
+
export interface BatchExecuteOptions {
|
|
40
|
+
calls: CallRequest[];
|
|
41
|
+
sponsored?: boolean;
|
|
42
|
+
authTier?: 1 | 2 | 3 | 4;
|
|
43
|
+
}
|
|
44
|
+
export interface SessionInfo {
|
|
45
|
+
jwt: string;
|
|
46
|
+
user: {
|
|
47
|
+
id: string;
|
|
48
|
+
email?: string;
|
|
49
|
+
oauthProvider?: string;
|
|
50
|
+
};
|
|
51
|
+
wallet: {
|
|
52
|
+
address: Address;
|
|
53
|
+
deployed: boolean;
|
|
54
|
+
};
|
|
55
|
+
signer: {
|
|
56
|
+
address: Address;
|
|
57
|
+
type: 'turnkey' | 'passkey';
|
|
58
|
+
};
|
|
59
|
+
expiresAt: number;
|
|
60
|
+
}
|
|
61
|
+
export interface WalletInfo {
|
|
62
|
+
address: Address;
|
|
63
|
+
deployed: boolean;
|
|
64
|
+
chain: ChainId;
|
|
65
|
+
factory: Address;
|
|
66
|
+
salt: Hex;
|
|
67
|
+
}
|
|
68
|
+
export interface WalletState {
|
|
69
|
+
address: Address;
|
|
70
|
+
deployed: boolean;
|
|
71
|
+
owner: Address;
|
|
72
|
+
balance: bigint;
|
|
73
|
+
entryPointDeposit: bigint;
|
|
74
|
+
nonce: {
|
|
75
|
+
key: bigint;
|
|
76
|
+
sequence: bigint;
|
|
77
|
+
};
|
|
78
|
+
modules: ModuleInfo[];
|
|
79
|
+
frozen: boolean;
|
|
80
|
+
}
|
|
81
|
+
export interface ModuleInfo {
|
|
82
|
+
moduleId: number;
|
|
83
|
+
type: 'SingleSigner' | 'SessionKey' | 'WebAuthn' | 'DeviceGuardian' | 'MultiSig';
|
|
84
|
+
signer: Address;
|
|
85
|
+
installedAt: number;
|
|
86
|
+
expiresAt?: number;
|
|
87
|
+
hooks?: HookInfo[];
|
|
88
|
+
}
|
|
89
|
+
export interface HookInfo {
|
|
90
|
+
type: 'Allowlist' | 'SpendLimit' | 'TimeRange' | 'PaymasterGuard';
|
|
91
|
+
config: AllowlistConfig | SpendLimitConfig | TimeRangeConfig | PaymasterGuardConfig;
|
|
92
|
+
}
|
|
93
|
+
export interface AllowlistConfig {
|
|
94
|
+
entries: Array<{
|
|
95
|
+
target: Address;
|
|
96
|
+
selector: Hex;
|
|
97
|
+
}>;
|
|
98
|
+
}
|
|
99
|
+
export interface SpendLimitConfig {
|
|
100
|
+
maxPerTx: bigint;
|
|
101
|
+
maxCumulative: bigint;
|
|
102
|
+
spent: bigint;
|
|
103
|
+
}
|
|
104
|
+
export interface TimeRangeConfig {
|
|
105
|
+
validAfter: number;
|
|
106
|
+
validUntil: number;
|
|
107
|
+
}
|
|
108
|
+
export interface PaymasterGuardConfig {
|
|
109
|
+
requiredPaymaster: Address;
|
|
110
|
+
}
|
|
111
|
+
export interface SessionKeyPermissions {
|
|
112
|
+
allowlist: Array<{
|
|
113
|
+
target: Address;
|
|
114
|
+
selector: Hex;
|
|
115
|
+
}>;
|
|
116
|
+
spendLimit: {
|
|
117
|
+
perTx: bigint;
|
|
118
|
+
cumulative: bigint;
|
|
119
|
+
};
|
|
120
|
+
timeRange: {
|
|
121
|
+
validAfter: number;
|
|
122
|
+
validUntil: number;
|
|
123
|
+
};
|
|
124
|
+
requiredPaymaster?: Address;
|
|
125
|
+
}
|
|
126
|
+
export interface SessionKeyInfo {
|
|
127
|
+
moduleId: number;
|
|
128
|
+
address: Address;
|
|
129
|
+
expiresAt: number;
|
|
130
|
+
permissions: SessionKeyPermissions;
|
|
131
|
+
}
|
|
132
|
+
export interface SessionKeyStatus {
|
|
133
|
+
active: boolean;
|
|
134
|
+
remainingTime: number;
|
|
135
|
+
remainingSpend: bigint;
|
|
136
|
+
usageCount: number;
|
|
137
|
+
}
|
|
138
|
+
export interface PaymasterApproval {
|
|
139
|
+
paymasterAndData: Hex;
|
|
140
|
+
validUntil: number;
|
|
141
|
+
validAfter: number;
|
|
142
|
+
estimatedCost: bigint;
|
|
143
|
+
}
|
|
144
|
+
export interface SponsorshipBudget {
|
|
145
|
+
daily: {
|
|
146
|
+
limit: bigint;
|
|
147
|
+
used: bigint;
|
|
148
|
+
remaining: bigint;
|
|
149
|
+
};
|
|
150
|
+
perUser: {
|
|
151
|
+
limit: bigint;
|
|
152
|
+
used: bigint;
|
|
153
|
+
remaining: bigint;
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
export interface SponsorshipPolicy {
|
|
157
|
+
allowedTargets: Address[];
|
|
158
|
+
allowedSelectors: Hex[];
|
|
159
|
+
blockedTargets: Address[];
|
|
160
|
+
perUserLimit: {
|
|
161
|
+
maxGasPerDay: bigint;
|
|
162
|
+
};
|
|
163
|
+
globalBudget: {
|
|
164
|
+
maxGasPerDay: bigint;
|
|
165
|
+
remaining: bigint;
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
export interface GuardianInfo {
|
|
169
|
+
address: Address;
|
|
170
|
+
label: string;
|
|
171
|
+
addedAt: number;
|
|
172
|
+
}
|
|
173
|
+
export interface MultiSigProposal {
|
|
174
|
+
id: string;
|
|
175
|
+
userOpHash: Hex;
|
|
176
|
+
signatures: number;
|
|
177
|
+
threshold: number;
|
|
178
|
+
}
|
|
179
|
+
export interface TimelockOperation {
|
|
180
|
+
id: string;
|
|
181
|
+
executeAfter: number;
|
|
182
|
+
status: 'pending' | 'ready' | 'executed' | 'cancelled';
|
|
183
|
+
}
|
|
184
|
+
export interface RecoveryStatus {
|
|
185
|
+
pending: boolean;
|
|
186
|
+
newOwner?: Address;
|
|
187
|
+
approvals: number;
|
|
188
|
+
threshold: number;
|
|
189
|
+
executeAfter?: number;
|
|
190
|
+
canExecute: boolean;
|
|
191
|
+
canCancel: boolean;
|
|
192
|
+
}
|
|
193
|
+
export interface DeviceInfo {
|
|
194
|
+
moduleId: number;
|
|
195
|
+
name: string;
|
|
196
|
+
type: 'turnkey' | 'passkey';
|
|
197
|
+
active: boolean;
|
|
198
|
+
}
|
|
199
|
+
export interface KeyExportResult {
|
|
200
|
+
privateKey: Hex;
|
|
201
|
+
address: Address;
|
|
202
|
+
warning: string;
|
|
203
|
+
}
|
|
204
|
+
export type AuditOperationType = 'execute' | 'deploy' | 'module_install' | 'module_uninstall' | 'recovery_initiate' | 'recovery_execute' | 'freeze' | 'unfreeze';
|
|
205
|
+
export interface AuditOperation {
|
|
206
|
+
id: string;
|
|
207
|
+
type: AuditOperationType;
|
|
208
|
+
userOpHash: Hex;
|
|
209
|
+
transactionHash: Hex;
|
|
210
|
+
sender: Address;
|
|
211
|
+
target: Address;
|
|
212
|
+
value: string;
|
|
213
|
+
selector: Hex;
|
|
214
|
+
signer: Address;
|
|
215
|
+
signerType: 'turnkey' | 'passkey' | 'session-key' | 'multi-sig';
|
|
216
|
+
moduleId: number;
|
|
217
|
+
sponsored: boolean;
|
|
218
|
+
paymaster?: Address;
|
|
219
|
+
gasCost: string;
|
|
220
|
+
success: boolean;
|
|
221
|
+
blockNumber: number;
|
|
222
|
+
timestamp: number;
|
|
223
|
+
}
|
|
224
|
+
export interface AuditHistoryQuery {
|
|
225
|
+
limit?: number;
|
|
226
|
+
offset?: number;
|
|
227
|
+
from?: string;
|
|
228
|
+
to?: string;
|
|
229
|
+
types?: AuditOperationType[];
|
|
230
|
+
}
|
|
231
|
+
export interface AuditHistoryResult {
|
|
232
|
+
total: number;
|
|
233
|
+
operations: AuditOperation[];
|
|
234
|
+
}
|
|
235
|
+
export type WebhookEventType = 'userop.submitted' | 'userop.mined' | 'userop.failed' | 'account.deployed' | 'session_key.installed' | 'session_key.revoked' | 'session_key.expired' | 'recovery.initiated' | 'recovery.executed' | 'guardian.added' | 'guardian.removed' | 'security.freeze' | 'security.alert';
|
|
236
|
+
export interface WebhookConfig {
|
|
237
|
+
url: string;
|
|
238
|
+
secret: string;
|
|
239
|
+
events: WebhookEventType[];
|
|
240
|
+
filters?: {
|
|
241
|
+
wallets?: Address[];
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
export interface WebhookInfo extends WebhookConfig {
|
|
245
|
+
id: string;
|
|
246
|
+
createdAt: number;
|
|
247
|
+
}
|
|
248
|
+
export interface WebhookEvent {
|
|
249
|
+
id: string;
|
|
250
|
+
type: string;
|
|
251
|
+
timestamp: number;
|
|
252
|
+
data: Record<string, unknown>;
|
|
253
|
+
signature: string;
|
|
254
|
+
}
|
|
255
|
+
export interface ChainInfo {
|
|
256
|
+
id: ChainId;
|
|
257
|
+
chainId: number;
|
|
258
|
+
name: string;
|
|
259
|
+
entryPoint: Address;
|
|
260
|
+
factory: Address;
|
|
261
|
+
paymaster: Address;
|
|
262
|
+
bundlerUrl: string;
|
|
263
|
+
rip7212: boolean;
|
|
264
|
+
blockTime: number;
|
|
265
|
+
features: string[];
|
|
266
|
+
}
|
|
267
|
+
export interface ChainConfig {
|
|
268
|
+
chainId: number;
|
|
269
|
+
entryPoint: Address;
|
|
270
|
+
contracts: {
|
|
271
|
+
factory: Address;
|
|
272
|
+
paymaster: Address;
|
|
273
|
+
webAuthnModule: Address;
|
|
274
|
+
multiSigModule: Address;
|
|
275
|
+
sessionKeyModule: Address;
|
|
276
|
+
socialRecoveryModule: Address;
|
|
277
|
+
allowlistModule: Address;
|
|
278
|
+
spendLimitModule: Address;
|
|
279
|
+
timeRangeModule: Address;
|
|
280
|
+
paymasterGuardModule: Address;
|
|
281
|
+
};
|
|
282
|
+
gas: {
|
|
283
|
+
safetyMargin: number;
|
|
284
|
+
minPriorityFee: bigint;
|
|
285
|
+
estimationMethod: 'bundler' | 'eth_estimateGas';
|
|
286
|
+
};
|
|
287
|
+
features: {
|
|
288
|
+
rip7212: boolean;
|
|
289
|
+
erc6900: boolean;
|
|
290
|
+
sponsorship: boolean;
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
export interface ApiKeyPermission {
|
|
294
|
+
resource: 'wallet' | 'userop' | 'sponsor' | 'auth' | 'session-key' | 'recovery' | 'audit';
|
|
295
|
+
actions: ('read' | 'write' | 'admin')[];
|
|
296
|
+
}
|
|
297
|
+
export interface ApiKeyQuotas {
|
|
298
|
+
maxRequestsPerMinute: number;
|
|
299
|
+
maxRequestsPerDay: number;
|
|
300
|
+
maxSponsoredGasPerDay: bigint;
|
|
301
|
+
maxWalletsPerDay: number;
|
|
302
|
+
maxSessionKeysPerWallet: number;
|
|
303
|
+
}
|
|
304
|
+
export interface FcxWalletClientConfig {
|
|
305
|
+
apiKey: string;
|
|
306
|
+
chain: ChainId;
|
|
307
|
+
entryPoint?: Address;
|
|
308
|
+
bundlerUrl?: string;
|
|
309
|
+
paymasterUrl?: string;
|
|
310
|
+
authUrl?: string;
|
|
311
|
+
signerIframeUrl?: string;
|
|
312
|
+
}
|
|
313
|
+
export type IframeRequest = {
|
|
314
|
+
type: 'INIT';
|
|
315
|
+
origin: string;
|
|
316
|
+
} | {
|
|
317
|
+
type: 'AUTH_REQUEST';
|
|
318
|
+
method: 'email' | 'google' | 'apple' | 'facebook' | 'passkey';
|
|
319
|
+
params: Record<string, unknown>;
|
|
320
|
+
} | {
|
|
321
|
+
type: 'SIGN_REQUEST';
|
|
322
|
+
userOpHash: Hex;
|
|
323
|
+
moduleId: number;
|
|
324
|
+
} | {
|
|
325
|
+
type: 'EXPORT_REQUEST';
|
|
326
|
+
} | {
|
|
327
|
+
type: 'LOGOUT';
|
|
328
|
+
};
|
|
329
|
+
export type IframeResponse = {
|
|
330
|
+
type: 'READY';
|
|
331
|
+
} | {
|
|
332
|
+
type: 'AUTH_RESPONSE';
|
|
333
|
+
success: boolean;
|
|
334
|
+
session?: SessionInfo;
|
|
335
|
+
error?: string;
|
|
336
|
+
} | {
|
|
337
|
+
type: 'SIGN_RESPONSE';
|
|
338
|
+
success: boolean;
|
|
339
|
+
signature?: Hex;
|
|
340
|
+
error?: string;
|
|
341
|
+
} | {
|
|
342
|
+
type: 'EXPORT_RESPONSE';
|
|
343
|
+
success: boolean;
|
|
344
|
+
privateKey?: Hex;
|
|
345
|
+
error?: string;
|
|
346
|
+
} | {
|
|
347
|
+
type: 'ERROR';
|
|
348
|
+
code: string;
|
|
349
|
+
message: string;
|
|
350
|
+
};
|
|
351
|
+
export type SecurityEventType = 'rapid_session_key_creation' | 'unusual_target' | 'high_frequency';
|
|
352
|
+
export interface SecurityEvent {
|
|
353
|
+
type: SecurityEventType;
|
|
354
|
+
details: Record<string, unknown>;
|
|
355
|
+
recommendation: 'freeze' | 'revoke_sessions' | 'review';
|
|
356
|
+
}
|
|
357
|
+
export type WatchtowerAlertType = 'recovery_initiated' | 'owner_changed' | 'module_installed' | 'large_transfer' | 'session_key_installed' | 'upgrade_initiated';
|
|
358
|
+
export interface WatchtowerSubscription {
|
|
359
|
+
account: Address;
|
|
360
|
+
alerts: WatchtowerAlertType[];
|
|
361
|
+
channels: {
|
|
362
|
+
email?: string;
|
|
363
|
+
webhook?: string;
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,MAAM,GAAG,GAAG,KAAK,MAAM,EAAE,CAAC;AAChC,MAAM,M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,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAIrD,MAAM,MAAM,iBAAiB,GACzB,4BAA4B,GAC5B,gBAAgB,GAChB,gBAAgB,CAAC;AAErB,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,cAAc,EAAE,QAAQ,GAAG,iBAAiB,GAAG,QAAQ,CAAC;CACzD;AAED,MAAM,MAAM,mBAAmB,GAC3B,oBAAoB,GACpB,eAAe,GACf,kBAAkB,GAClB,gBAAgB,GAChB,uBAAuB,GACvB,mBAAmB,CAAC;AAExB,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B,QAAQ,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UserOperation construction pipeline.
|
|
3
|
+
* Corresponds to SPEC-013 Section 5.2.
|
|
4
|
+
*
|
|
5
|
+
* Provides both a fluent builder API and a high-level execute() shortcut.
|
|
6
|
+
*/
|
|
7
|
+
import type { Address, Hex, UserOperation, CallRequest } from '../types.js';
|
|
8
|
+
import { BundlerClient } from '../transport/bundler.js';
|
|
9
|
+
/**
|
|
10
|
+
* Fluent builder for constructing UserOperations.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const userOp = await new UserOpBuilder(bundler, entryPoint, chainId)
|
|
15
|
+
* .setSender(walletAddress)
|
|
16
|
+
* .setCallData({ target, value, data })
|
|
17
|
+
* .build();
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare class UserOpBuilder {
|
|
21
|
+
private readonly bundler;
|
|
22
|
+
private readonly entryPoint;
|
|
23
|
+
private readonly chainId;
|
|
24
|
+
private readonly rpcCall?;
|
|
25
|
+
private userOp;
|
|
26
|
+
private nonceKey;
|
|
27
|
+
private initCodeParams?;
|
|
28
|
+
constructor(bundler: BundlerClient, entryPoint?: Address, chainId?: bigint, rpcCall?: ((method: string, params: unknown[]) => Promise<Hex>) | undefined);
|
|
29
|
+
/** Set the sender (smart wallet) address */
|
|
30
|
+
setSender(sender: Address): this;
|
|
31
|
+
/** Set callData for a single execution */
|
|
32
|
+
setCallData(call: CallRequest): this;
|
|
33
|
+
/** Set callData for batch execution */
|
|
34
|
+
setCallDataBatch(calls: CallRequest[]): this;
|
|
35
|
+
/** Set raw callData directly */
|
|
36
|
+
setRawCallData(callData: Hex): this;
|
|
37
|
+
/** Set the nonce key for parallel streams (default: 0) */
|
|
38
|
+
setNonce(options: {
|
|
39
|
+
key: bigint;
|
|
40
|
+
}): this;
|
|
41
|
+
/** Set initCode for first-time deployment */
|
|
42
|
+
setInitCode(params: {
|
|
43
|
+
factory: Address;
|
|
44
|
+
owner: Address;
|
|
45
|
+
salt: bigint;
|
|
46
|
+
}): this;
|
|
47
|
+
/** Set raw initCode directly */
|
|
48
|
+
setRawInitCode(initCode: Hex): this;
|
|
49
|
+
/** Set paymasterAndData (from paymaster service approval) */
|
|
50
|
+
setPaymasterAndData(data: Hex): this;
|
|
51
|
+
/** Set gas fees explicitly */
|
|
52
|
+
setFees(fees: {
|
|
53
|
+
maxFeePerGas: bigint;
|
|
54
|
+
maxPriorityFeePerGas: bigint;
|
|
55
|
+
}): this;
|
|
56
|
+
/** Set signature (after signing) */
|
|
57
|
+
setSignature(signature: Hex): this;
|
|
58
|
+
/**
|
|
59
|
+
* Build the UserOperation:
|
|
60
|
+
* 1. Resolve nonce from EntryPoint
|
|
61
|
+
* 2. Estimate gas fees
|
|
62
|
+
* 3. Estimate gas limits with safety margins
|
|
63
|
+
*
|
|
64
|
+
* Returns a fully populated UserOperation ready for signing.
|
|
65
|
+
*/
|
|
66
|
+
build(): Promise<UserOperation>;
|
|
67
|
+
/**
|
|
68
|
+
* Compute the hash that must be signed.
|
|
69
|
+
* MUST match EntryPoint.getUserOpHash() exactly.
|
|
70
|
+
*/
|
|
71
|
+
getHash(userOp: UserOperation): Hex;
|
|
72
|
+
/** Get a copy of the current UserOperation state */
|
|
73
|
+
getUserOp(): UserOperation;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/userop/builder.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK5E,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAoBxD;;;;;;;;;;GAUG;AACH,qBAAa,aAAa;IAMtB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;IAR3B,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,QAAQ,CAAc;IAC9B,OAAO,CAAC,cAAc,CAAC,CAAqD;gBAGzD,OAAO,EAAE,aAAa,EACtB,UAAU,GAAE,OAAwB,EACpC,OAAO,GAAE,MAAe,EACxB,OAAO,CAAC,GAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,aAAA;IAKhF,4CAA4C;IAC5C,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAKhC,0CAA0C;IAC1C,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI;IAKpC,uCAAuC;IACvC,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI;IAK5C,gCAAgC;IAChC,cAAc,CAAC,QAAQ,EAAE,GAAG,GAAG,IAAI;IAKnC,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAKxC,6CAA6C;IAC7C,WAAW,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAM7E,gCAAgC;IAChC,cAAc,CAAC,QAAQ,EAAE,GAAG,GAAG,IAAI;IAKnC,6DAA6D;IAC7D,mBAAmB,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI;IAKpC,8BAA8B;IAC9B,OAAO,CAAC,IAAI,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,oBAAoB,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAM3E,oCAAoC;IACpC,YAAY,CAAC,SAAS,EAAE,GAAG,GAAG,IAAI;IAKlC;;;;;;;OAOG;IACG,KAAK,IAAI,OAAO,CAAC,aAAa,CAAC;IA6BrC;;;OAGG;IACH,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,GAAG;IAInC,oDAAoD;IACpD,SAAS,IAAI,aAAa;CAG3B"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UserOperation construction pipeline.
|
|
3
|
+
* Corresponds to SPEC-013 Section 5.2.
|
|
4
|
+
*
|
|
5
|
+
* Provides both a fluent builder API and a high-level execute() shortcut.
|
|
6
|
+
*/
|
|
7
|
+
import { encodeCallData, encodeBatchCallData, encodeInitCode } from './encoding.js';
|
|
8
|
+
import { getUserOpHash } from './hash.js';
|
|
9
|
+
import { estimateGas, estimateFees } from './gas.js';
|
|
10
|
+
import { NonceManager } from './nonce.js';
|
|
11
|
+
import { ENTRYPOINT_V06 } from '../core/config.js';
|
|
12
|
+
/** Empty UserOperation with all fields zeroed */
|
|
13
|
+
function emptyUserOp(sender) {
|
|
14
|
+
return {
|
|
15
|
+
sender,
|
|
16
|
+
nonce: 0n,
|
|
17
|
+
initCode: '0x',
|
|
18
|
+
callData: '0x',
|
|
19
|
+
callGasLimit: 0n,
|
|
20
|
+
verificationGasLimit: 0n,
|
|
21
|
+
preVerificationGas: 0n,
|
|
22
|
+
maxFeePerGas: 0n,
|
|
23
|
+
maxPriorityFeePerGas: 0n,
|
|
24
|
+
paymasterAndData: '0x',
|
|
25
|
+
signature: '0x',
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Fluent builder for constructing UserOperations.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const userOp = await new UserOpBuilder(bundler, entryPoint, chainId)
|
|
34
|
+
* .setSender(walletAddress)
|
|
35
|
+
* .setCallData({ target, value, data })
|
|
36
|
+
* .build();
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export class UserOpBuilder {
|
|
40
|
+
bundler;
|
|
41
|
+
entryPoint;
|
|
42
|
+
chainId;
|
|
43
|
+
rpcCall;
|
|
44
|
+
userOp;
|
|
45
|
+
nonceKey = 0n;
|
|
46
|
+
initCodeParams;
|
|
47
|
+
constructor(bundler, entryPoint = ENTRYPOINT_V06, chainId = 42161n, rpcCall) {
|
|
48
|
+
this.bundler = bundler;
|
|
49
|
+
this.entryPoint = entryPoint;
|
|
50
|
+
this.chainId = chainId;
|
|
51
|
+
this.rpcCall = rpcCall;
|
|
52
|
+
this.userOp = emptyUserOp('0x0000000000000000000000000000000000000000');
|
|
53
|
+
}
|
|
54
|
+
/** Set the sender (smart wallet) address */
|
|
55
|
+
setSender(sender) {
|
|
56
|
+
this.userOp.sender = sender;
|
|
57
|
+
return this;
|
|
58
|
+
}
|
|
59
|
+
/** Set callData for a single execution */
|
|
60
|
+
setCallData(call) {
|
|
61
|
+
this.userOp.callData = encodeCallData(call);
|
|
62
|
+
return this;
|
|
63
|
+
}
|
|
64
|
+
/** Set callData for batch execution */
|
|
65
|
+
setCallDataBatch(calls) {
|
|
66
|
+
this.userOp.callData = encodeBatchCallData(calls);
|
|
67
|
+
return this;
|
|
68
|
+
}
|
|
69
|
+
/** Set raw callData directly */
|
|
70
|
+
setRawCallData(callData) {
|
|
71
|
+
this.userOp.callData = callData;
|
|
72
|
+
return this;
|
|
73
|
+
}
|
|
74
|
+
/** Set the nonce key for parallel streams (default: 0) */
|
|
75
|
+
setNonce(options) {
|
|
76
|
+
this.nonceKey = options.key;
|
|
77
|
+
return this;
|
|
78
|
+
}
|
|
79
|
+
/** Set initCode for first-time deployment */
|
|
80
|
+
setInitCode(params) {
|
|
81
|
+
this.initCodeParams = params;
|
|
82
|
+
this.userOp.initCode = encodeInitCode(params);
|
|
83
|
+
return this;
|
|
84
|
+
}
|
|
85
|
+
/** Set raw initCode directly */
|
|
86
|
+
setRawInitCode(initCode) {
|
|
87
|
+
this.userOp.initCode = initCode;
|
|
88
|
+
return this;
|
|
89
|
+
}
|
|
90
|
+
/** Set paymasterAndData (from paymaster service approval) */
|
|
91
|
+
setPaymasterAndData(data) {
|
|
92
|
+
this.userOp.paymasterAndData = data;
|
|
93
|
+
return this;
|
|
94
|
+
}
|
|
95
|
+
/** Set gas fees explicitly */
|
|
96
|
+
setFees(fees) {
|
|
97
|
+
this.userOp.maxFeePerGas = fees.maxFeePerGas;
|
|
98
|
+
this.userOp.maxPriorityFeePerGas = fees.maxPriorityFeePerGas;
|
|
99
|
+
return this;
|
|
100
|
+
}
|
|
101
|
+
/** Set signature (after signing) */
|
|
102
|
+
setSignature(signature) {
|
|
103
|
+
this.userOp.signature = signature;
|
|
104
|
+
return this;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Build the UserOperation:
|
|
108
|
+
* 1. Resolve nonce from EntryPoint
|
|
109
|
+
* 2. Estimate gas fees
|
|
110
|
+
* 3. Estimate gas limits with safety margins
|
|
111
|
+
*
|
|
112
|
+
* Returns a fully populated UserOperation ready for signing.
|
|
113
|
+
*/
|
|
114
|
+
async build() {
|
|
115
|
+
// Resolve nonce
|
|
116
|
+
if (this.rpcCall) {
|
|
117
|
+
const nonceManager = new NonceManager(this.entryPoint, this.rpcCall);
|
|
118
|
+
this.userOp.nonce = await nonceManager.get(this.userOp.sender, this.nonceKey);
|
|
119
|
+
}
|
|
120
|
+
// Estimate fees if not set
|
|
121
|
+
if (this.userOp.maxFeePerGas === 0n && this.rpcCall) {
|
|
122
|
+
const fees = await estimateFees(this.rpcCall);
|
|
123
|
+
this.userOp.maxFeePerGas = fees.maxFeePerGas;
|
|
124
|
+
this.userOp.maxPriorityFeePerGas = fees.maxPriorityFeePerGas;
|
|
125
|
+
}
|
|
126
|
+
// Estimate gas with safety margins
|
|
127
|
+
// Use a dummy signature for estimation
|
|
128
|
+
const estimationOp = {
|
|
129
|
+
...this.userOp,
|
|
130
|
+
signature: '0x' + 'ff'.repeat(69), // Dummy 69-byte signature
|
|
131
|
+
};
|
|
132
|
+
const estimated = await estimateGas(this.bundler, estimationOp);
|
|
133
|
+
return {
|
|
134
|
+
...estimated,
|
|
135
|
+
signature: '0x', // Clear dummy signature
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Compute the hash that must be signed.
|
|
140
|
+
* MUST match EntryPoint.getUserOpHash() exactly.
|
|
141
|
+
*/
|
|
142
|
+
getHash(userOp) {
|
|
143
|
+
return getUserOpHash(userOp, this.entryPoint, this.chainId);
|
|
144
|
+
}
|
|
145
|
+
/** Get a copy of the current UserOperation state */
|
|
146
|
+
getUserOp() {
|
|
147
|
+
return { ...this.userOp };
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/userop/builder.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,iDAAiD;AACjD,SAAS,WAAW,CAAC,MAAe;IAClC,OAAO;QACL,MAAM;QACN,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,EAAE;QAChB,oBAAoB,EAAE,EAAE;QACxB,kBAAkB,EAAE,EAAE;QACtB,YAAY,EAAE,EAAE;QAChB,oBAAoB,EAAE,EAAE;QACxB,gBAAgB,EAAE,IAAI;QACtB,SAAS,EAAE,IAAI;KAChB,CAAC;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,OAAO,aAAa;IAML;IACA;IACA;IACA;IARX,MAAM,CAAgB;IACtB,QAAQ,GAAW,EAAE,CAAC;IACtB,cAAc,CAAsD;IAE5E,YACmB,OAAsB,EACtB,aAAsB,cAAc,EACpC,UAAkB,MAAM,EACxB,OAA6D;QAH7D,YAAO,GAAP,OAAO,CAAe;QACtB,eAAU,GAAV,UAAU,CAA0B;QACpC,YAAO,GAAP,OAAO,CAAiB;QACxB,YAAO,GAAP,OAAO,CAAsD;QAE9E,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,4CAA4C,CAAC,CAAC;IAC1E,CAAC;IAED,4CAA4C;IAC5C,SAAS,CAAC,MAAe;QAC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IACJ,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,MAAqB;QAC3B,OAAO,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED,oDAAoD;IACpD,SAAS;QACP,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UserOperation callData and initCode encoding.
|
|
3
|
+
* Corresponds to SPEC-013 Sections 4-5, SPEC-002.
|
|
4
|
+
*/
|
|
5
|
+
import { type Abi } from 'viem';
|
|
6
|
+
import type { Address, Hex } from '../types.js';
|
|
7
|
+
/**
|
|
8
|
+
* Encode callData for a single execute call on the smart account.
|
|
9
|
+
*/
|
|
10
|
+
export declare function encodeCallData(params: {
|
|
11
|
+
target: Address;
|
|
12
|
+
value: bigint;
|
|
13
|
+
data: Hex;
|
|
14
|
+
}): Hex;
|
|
15
|
+
/**
|
|
16
|
+
* Encode callData for a batch execute call on the smart account.
|
|
17
|
+
*/
|
|
18
|
+
export declare function encodeBatchCallData(calls: Array<{
|
|
19
|
+
target: Address;
|
|
20
|
+
value: bigint;
|
|
21
|
+
data: Hex;
|
|
22
|
+
}>): Hex;
|
|
23
|
+
/**
|
|
24
|
+
* Encode initCode for first-time account deployment.
|
|
25
|
+
* Format: factory address (20 bytes) + factory.createAccount(owner, salt) calldata
|
|
26
|
+
*
|
|
27
|
+
* @param factory - The factory contract address
|
|
28
|
+
* @param owner - The initial owner/signer address
|
|
29
|
+
* @param salt - Deployment salt for CREATE2
|
|
30
|
+
*/
|
|
31
|
+
export declare function encodeInitCode(params: {
|
|
32
|
+
factory: Address;
|
|
33
|
+
owner: Address;
|
|
34
|
+
salt: bigint;
|
|
35
|
+
}): Hex;
|
|
36
|
+
/**
|
|
37
|
+
* Encode arbitrary function call data using an ABI.
|
|
38
|
+
*/
|
|
39
|
+
export declare function encodeCall(params: {
|
|
40
|
+
abi: Abi;
|
|
41
|
+
functionName: string;
|
|
42
|
+
args?: readonly unknown[];
|
|
43
|
+
}): Hex;
|
|
44
|
+
//# sourceMappingURL=encoding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../src/userop/encoding.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAIL,KAAK,GAAG,EACT,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAoDhD;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,GAAG,CAAC;CACX,GAAG,GAAG,CAMN;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,KAAK,CAAC;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,GAAG,CAAA;CAAE,CAAC,GAC1D,GAAG,CAML;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,GAAG,CAQN;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE;IACjC,GAAG,EAAE,GAAG,CAAC;IACT,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;CAC3B,GAAG,GAAG,CAMN"}
|