@rhinestone/sdk 1.0.0-alpha.13 → 1.0.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/accounts/index.d.ts.map +1 -1
- package/dist/src/accounts/index.js +7 -6
- package/dist/src/accounts/index.test.js +3 -3
- package/dist/src/accounts/kernel.test.js +8 -8
- package/dist/src/accounts/nexus.d.ts.map +1 -1
- package/dist/src/accounts/nexus.js +34 -8
- package/dist/src/accounts/nexus.test.js +12 -12
- package/dist/src/accounts/safe.test.js +8 -8
- package/dist/src/accounts/signing/common.d.ts +10 -6
- package/dist/src/accounts/signing/common.d.ts.map +1 -1
- package/dist/src/accounts/signing/common.js +29 -9
- package/dist/src/accounts/signing/message.d.ts +2 -2
- package/dist/src/accounts/signing/message.d.ts.map +1 -1
- package/dist/src/accounts/signing/message.js +7 -11
- package/dist/src/accounts/signing/passkeys.d.ts +29 -0
- package/dist/src/accounts/signing/passkeys.d.ts.map +1 -0
- package/dist/src/accounts/signing/passkeys.js +90 -0
- package/dist/src/accounts/signing/passkeys.test.d.ts +2 -0
- package/dist/src/accounts/signing/passkeys.test.d.ts.map +1 -0
- package/dist/src/accounts/signing/passkeys.test.js +73 -0
- package/dist/src/accounts/signing/typedData.d.ts +2 -2
- package/dist/src/accounts/signing/typedData.d.ts.map +1 -1
- package/dist/src/accounts/signing/typedData.js +7 -11
- package/dist/src/accounts/startale.test.js +8 -8
- package/dist/src/actions/index.d.ts +45 -1
- package/dist/src/actions/index.d.ts.map +1 -1
- package/dist/src/actions/index.js +168 -6
- package/dist/src/actions/index.test.js +16 -16
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +3 -3
- package/dist/src/execution/utils.d.ts +1 -1
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +12 -11
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +7 -1
- package/dist/src/modules/index.d.ts +2 -17
- package/dist/src/modules/index.d.ts.map +1 -1
- package/dist/src/modules/index.js +4 -55
- package/dist/src/modules/index.test.js +2 -16
- package/dist/src/modules/omni-account.d.ts +2 -1
- package/dist/src/modules/omni-account.d.ts.map +1 -1
- package/dist/src/modules/omni-account.js +3 -1
- package/dist/src/modules/validators/core.d.ts +1 -1
- package/dist/src/modules/validators/core.d.ts.map +1 -1
- package/dist/src/modules/validators/core.js +37 -33
- package/dist/src/modules/validators/core.test.js +6 -6
- package/dist/src/modules/validators/smart-sessions.test.js +4 -4
- package/dist/src/orchestrator/client.d.ts +2 -2
- package/dist/src/orchestrator/client.d.ts.map +1 -1
- package/dist/src/orchestrator/consts.d.ts +2 -1
- package/dist/src/orchestrator/consts.d.ts.map +1 -1
- package/dist/src/orchestrator/consts.js +3 -1
- package/dist/src/orchestrator/index.d.ts +1 -1
- package/dist/src/orchestrator/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +10 -4
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,12 @@ exports.disablePasskeys = disablePasskeys;
|
|
|
8
8
|
exports.addOwner = addOwner;
|
|
9
9
|
exports.removeOwner = removeOwner;
|
|
10
10
|
exports.changeThreshold = changeThreshold;
|
|
11
|
+
exports.addPasskeyOwner = addPasskeyOwner;
|
|
12
|
+
exports.removePasskeyOwner = removePasskeyOwner;
|
|
13
|
+
exports.changePasskeyThreshold = changePasskeyThreshold;
|
|
11
14
|
exports.recover = recover;
|
|
15
|
+
exports.recoverEcdsaOwnership = recoverEcdsaOwnership;
|
|
16
|
+
exports.recoverPasskeyOwnership = recoverPasskeyOwnership;
|
|
12
17
|
exports.setUpRecovery = setUpRecovery;
|
|
13
18
|
exports.enableMultiFactor = enableMultiFactor;
|
|
14
19
|
exports.disableMultiFactor = disableMultiFactor;
|
|
@@ -40,6 +45,7 @@ function setUpRecovery({ rhinestoneAccount, guardians, threshold = 1, }) {
|
|
|
40
45
|
* @param chain Chain to recover ownership on
|
|
41
46
|
* @param provider Provider to use for the recovery
|
|
42
47
|
* @returns Calls to recover ownership
|
|
48
|
+
* @deprecated Use `recoverEcdsaOwnership` or `recoverPasskeyOwnership` instead
|
|
43
49
|
*/
|
|
44
50
|
async function recover(address, newOwners, chain, provider) {
|
|
45
51
|
switch (newOwners.type) {
|
|
@@ -74,7 +80,7 @@ function enableEcdsa({ rhinestoneAccount, owners, threshold = 1, }) {
|
|
|
74
80
|
* @returns Calls to enable passkeys authentication
|
|
75
81
|
*/
|
|
76
82
|
function enablePasskeys({ rhinestoneAccount, pubKey, authenticatorId, }) {
|
|
77
|
-
const module = (0, core_1.getWebAuthnValidator)({ pubKey, authenticatorId });
|
|
83
|
+
const module = (0, core_1.getWebAuthnValidator)(1, [{ pubKey, authenticatorId }]);
|
|
78
84
|
const calls = (0, accounts_1.getModuleInstallationCalls)(rhinestoneAccount.config, module);
|
|
79
85
|
return calls;
|
|
80
86
|
}
|
|
@@ -94,11 +100,13 @@ function disableEcdsa({ rhinestoneAccount, }) {
|
|
|
94
100
|
* @returns Calls to disable passkeys authentication
|
|
95
101
|
*/
|
|
96
102
|
function disablePasskeys({ rhinestoneAccount, }) {
|
|
97
|
-
const module = (0, core_1.getWebAuthnValidator)(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
const module = (0, core_1.getWebAuthnValidator)(1, [
|
|
104
|
+
{
|
|
105
|
+
// Mocked values
|
|
106
|
+
pubKey: '0x580a9af0569ad3905b26a703201b358aa0904236642ebe79b22a19d00d3737637d46f725a5427ae45a9569259bf67e1e16b187d7b3ad1ed70138c4f0409677d1',
|
|
107
|
+
authenticatorId: '0x',
|
|
108
|
+
},
|
|
109
|
+
]);
|
|
102
110
|
const calls = (0, accounts_1.getModuleUninstallationCalls)(rhinestoneAccount.config, module);
|
|
103
111
|
return calls;
|
|
104
112
|
}
|
|
@@ -180,6 +188,93 @@ function changeThreshold(newThreshold) {
|
|
|
180
188
|
}),
|
|
181
189
|
};
|
|
182
190
|
}
|
|
191
|
+
/**
|
|
192
|
+
* Add a passkey owner
|
|
193
|
+
* @param pubKeyX Public key X
|
|
194
|
+
* @param pubKeyY Public key Y
|
|
195
|
+
* @param requireUserVerification Whether to require user verification
|
|
196
|
+
* @returns Call to add the passkey owner
|
|
197
|
+
*/
|
|
198
|
+
function addPasskeyOwner(pubKeyX, pubKeyY, requireUserVerification) {
|
|
199
|
+
return {
|
|
200
|
+
to: core_1.WEBAUTHN_VALIDATOR_ADDRESS,
|
|
201
|
+
value: 0n,
|
|
202
|
+
data: (0, viem_1.encodeFunctionData)({
|
|
203
|
+
abi: [
|
|
204
|
+
{
|
|
205
|
+
inputs: [
|
|
206
|
+
{ name: 'pubKeyX', type: 'uint256' },
|
|
207
|
+
{ name: 'pubKeyY', type: 'uint256' },
|
|
208
|
+
{
|
|
209
|
+
name: 'requireUserVerification',
|
|
210
|
+
type: 'bool',
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
name: 'addCredential',
|
|
214
|
+
outputs: [],
|
|
215
|
+
stateMutability: 'nonpayable',
|
|
216
|
+
type: 'function',
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
functionName: 'addCredential',
|
|
220
|
+
args: [pubKeyX, pubKeyY, requireUserVerification],
|
|
221
|
+
}),
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Remove a passkey owner
|
|
226
|
+
* @param pubKeyX Public key X
|
|
227
|
+
* @param pubKeyY Public key Y
|
|
228
|
+
* @returns Call to remove the passkey owner
|
|
229
|
+
*/
|
|
230
|
+
function removePasskeyOwner(pubKeyX, pubKeyY) {
|
|
231
|
+
return {
|
|
232
|
+
to: core_1.WEBAUTHN_VALIDATOR_ADDRESS,
|
|
233
|
+
value: 0n,
|
|
234
|
+
data: (0, viem_1.encodeFunctionData)({
|
|
235
|
+
abi: [
|
|
236
|
+
{
|
|
237
|
+
inputs: [
|
|
238
|
+
{ name: 'pubKeyX', type: 'uint256' },
|
|
239
|
+
{ name: 'pubKeyY', type: 'uint256' },
|
|
240
|
+
],
|
|
241
|
+
name: 'removeCredential',
|
|
242
|
+
outputs: [],
|
|
243
|
+
stateMutability: 'nonpayable',
|
|
244
|
+
type: 'function',
|
|
245
|
+
},
|
|
246
|
+
],
|
|
247
|
+
functionName: 'removeCredential',
|
|
248
|
+
args: [pubKeyX, pubKeyY],
|
|
249
|
+
}),
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Change an account's signer threshold (passkey)
|
|
254
|
+
* @param newThreshold New threshold
|
|
255
|
+
* @returns Call to change the threshold
|
|
256
|
+
*/
|
|
257
|
+
function changePasskeyThreshold(newThreshold) {
|
|
258
|
+
return {
|
|
259
|
+
to: core_1.WEBAUTHN_VALIDATOR_ADDRESS,
|
|
260
|
+
value: 0n,
|
|
261
|
+
data: (0, viem_1.encodeFunctionData)({
|
|
262
|
+
abi: [
|
|
263
|
+
{
|
|
264
|
+
inputs: [
|
|
265
|
+
{ internalType: 'uint256', name: '_threshold', type: 'uint256' },
|
|
266
|
+
],
|
|
267
|
+
name: 'setThreshold',
|
|
268
|
+
outputs: [],
|
|
269
|
+
stateMutability: 'nonpayable',
|
|
270
|
+
type: 'function',
|
|
271
|
+
},
|
|
272
|
+
],
|
|
273
|
+
functionName: 'setThreshold',
|
|
274
|
+
args: [BigInt(newThreshold)],
|
|
275
|
+
}),
|
|
276
|
+
};
|
|
277
|
+
}
|
|
183
278
|
/**
|
|
184
279
|
* Recover an account's ownership (ECDSA)
|
|
185
280
|
* @param address Account address
|
|
@@ -278,6 +373,73 @@ async function recoverEcdsaOwnership(address, newOwners, chain, provider) {
|
|
|
278
373
|
}
|
|
279
374
|
return calls;
|
|
280
375
|
}
|
|
376
|
+
/**
|
|
377
|
+
* Recover an account's ownership (Passkey)
|
|
378
|
+
* @param address Account address
|
|
379
|
+
* @param oldCredentials Old credentials to be replaced (with pubKeyX, pubKeyY)
|
|
380
|
+
* @param newOwners New passkey owners
|
|
381
|
+
* @param chain Chain to recover ownership on
|
|
382
|
+
* @param provider Provider to use for the recovery
|
|
383
|
+
* @returns Calls to recover ownership
|
|
384
|
+
*/
|
|
385
|
+
async function recoverPasskeyOwnership(address, oldCredentials, newOwners, chain, provider) {
|
|
386
|
+
const publicClient = (0, viem_1.createPublicClient)({
|
|
387
|
+
chain,
|
|
388
|
+
transport: (0, utils_1.createTransport)(chain, provider),
|
|
389
|
+
});
|
|
390
|
+
const existingThreshold = await publicClient.readContract({
|
|
391
|
+
address: core_1.WEBAUTHN_VALIDATOR_ADDRESS,
|
|
392
|
+
abi: [
|
|
393
|
+
{
|
|
394
|
+
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
|
|
395
|
+
name: 'threshold',
|
|
396
|
+
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
|
397
|
+
stateMutability: 'view',
|
|
398
|
+
type: 'function',
|
|
399
|
+
},
|
|
400
|
+
],
|
|
401
|
+
functionName: 'threshold',
|
|
402
|
+
args: [address],
|
|
403
|
+
});
|
|
404
|
+
const calls = [];
|
|
405
|
+
// Convert new owners config to credentials and threshold
|
|
406
|
+
const newCredentials = newOwners.accounts.map((account) => {
|
|
407
|
+
const publicKey = account.publicKey;
|
|
408
|
+
// Parse the public key hex string to extract x and y coordinates
|
|
409
|
+
const publicKeyBytes = publicKey.startsWith('0x')
|
|
410
|
+
? publicKey.slice(2)
|
|
411
|
+
: publicKey;
|
|
412
|
+
// The public key is 64 bytes: 32 bytes for x, 32 bytes for y
|
|
413
|
+
const x = BigInt(`0x${publicKeyBytes.slice(0, 64)}`);
|
|
414
|
+
const y = BigInt(`0x${publicKeyBytes.slice(64, 128)}`);
|
|
415
|
+
return {
|
|
416
|
+
pubKeyX: x,
|
|
417
|
+
pubKeyY: y,
|
|
418
|
+
requireUV: false, // Default to false for now
|
|
419
|
+
};
|
|
420
|
+
});
|
|
421
|
+
const newThreshold = newOwners.threshold ?? 1;
|
|
422
|
+
// Check if threshold needs to be updated
|
|
423
|
+
if (Number(existingThreshold) !== newThreshold) {
|
|
424
|
+
calls.push(changePasskeyThreshold(newThreshold));
|
|
425
|
+
}
|
|
426
|
+
// Compare existing and new credentials to determine what to add/remove
|
|
427
|
+
const existingCredentialKeys = oldCredentials.map((cred) => `${cred.pubKeyX.toString()}-${cred.pubKeyY.toString()}`);
|
|
428
|
+
const newCredentialKeys = newCredentials.map((cred) => `${cred.pubKeyX.toString()}-${cred.pubKeyY.toString()}`);
|
|
429
|
+
// Find credentials to add (new ones not in existing)
|
|
430
|
+
const credentialsToAdd = newCredentials.filter((cred) => !existingCredentialKeys.includes(`${cred.pubKeyX.toString()}-${cred.pubKeyY.toString()}`));
|
|
431
|
+
// Find credentials to remove (existing ones not in new)
|
|
432
|
+
const credentialsToRemove = oldCredentials.filter((cred) => !newCredentialKeys.includes(`${cred.pubKeyX.toString()}-${cred.pubKeyY.toString()}`));
|
|
433
|
+
// Remove old credentials first (important for security in recovery scenarios)
|
|
434
|
+
for (const credential of credentialsToRemove) {
|
|
435
|
+
calls.push(removePasskeyOwner(credential.pubKeyX, credential.pubKeyY));
|
|
436
|
+
}
|
|
437
|
+
// Then add new credentials
|
|
438
|
+
for (const credential of credentialsToAdd) {
|
|
439
|
+
calls.push(addPasskeyOwner(credential.pubKeyX, credential.pubKeyY, credential.requireUV));
|
|
440
|
+
}
|
|
441
|
+
return calls;
|
|
442
|
+
}
|
|
281
443
|
/**
|
|
282
444
|
* Enable multi-factor authentication
|
|
283
445
|
* @param rhinestoneAccount Account to enable multi-factor authentication on
|
|
@@ -10,7 +10,7 @@ const MOCK_OWNER_A = '0xd1aefebdceefc094f1805b241fa5e6db63a9181a';
|
|
|
10
10
|
const MOCK_OWNER_B = '0xeddfcb50d18f6d3d51c4f7cbca5ed6bdebc59817';
|
|
11
11
|
const MOCK_OWNER_C = '0xb31e76f19defe76edc4b7eceeb4b0a2d6ddaca39';
|
|
12
12
|
const MOCK_ACCOUNT_ADDRESS = '0x1234567890123456789012345678901234567890';
|
|
13
|
-
const accountAddress = '
|
|
13
|
+
const accountAddress = '0x36c03e7d593f7b2c6b06fc18b5f4e9a4a29c99b0';
|
|
14
14
|
// Mock viem
|
|
15
15
|
vitest_1.vi.mock('viem', async (importOriginal) => {
|
|
16
16
|
const actual = await importOriginal();
|
|
@@ -37,7 +37,7 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
|
|
|
37
37
|
{
|
|
38
38
|
to: accountAddress,
|
|
39
39
|
value: 0n,
|
|
40
|
-
data: '
|
|
40
|
+
data: '0x9517e29f0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000013fdb5234e4e3162a810f54d9f7e9800000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d1aefebdceefc094f1805b241fa5e6db63a9181a',
|
|
41
41
|
},
|
|
42
42
|
]);
|
|
43
43
|
});
|
|
@@ -49,7 +49,7 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
|
|
|
49
49
|
{
|
|
50
50
|
to: accountAddress,
|
|
51
51
|
value: 0n,
|
|
52
|
-
data: '
|
|
52
|
+
data: '0x9517e29f0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000013fdb5234e4e3162a810f54d9f7e98000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d1aefebdceefc094f1805b241fa5e6db63a9181a000000000000000000000000eddfcb50d18f6d3d51c4f7cbca5ed6bdebc59817',
|
|
53
53
|
},
|
|
54
54
|
]);
|
|
55
55
|
});
|
|
@@ -62,7 +62,7 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
|
|
|
62
62
|
{
|
|
63
63
|
to: accountAddress,
|
|
64
64
|
value: 0n,
|
|
65
|
-
data: '
|
|
65
|
+
data: '0x9517e29f0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000013fdb5234e4e3162a810f54d9f7e98000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000003000000000000000000000000b31e76f19defe76edc4b7eceeb4b0a2d6ddaca39000000000000000000000000d1aefebdceefc094f1805b241fa5e6db63a9181a000000000000000000000000eddfcb50d18f6d3d51c4f7cbca5ed6bdebc59817',
|
|
66
66
|
},
|
|
67
67
|
]);
|
|
68
68
|
});
|
|
@@ -84,7 +84,7 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
|
|
|
84
84
|
{
|
|
85
85
|
to: accountAddress,
|
|
86
86
|
value: 0n,
|
|
87
|
-
data: '
|
|
87
|
+
data: '0x9517e29f00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000578c4cb0e472a5462da43c495c3f33000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001580a9af0569ad3905b26a703201b358aa0904236642ebe79b22a19d00d3737637d46f725a5427ae45a9569259bf67e1e16b187d7b3ad1ed70138c4f0409677d10000000000000000000000000000000000000000000000000000000000000000',
|
|
88
88
|
},
|
|
89
89
|
]);
|
|
90
90
|
});
|
|
@@ -104,7 +104,7 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
|
|
|
104
104
|
{
|
|
105
105
|
to: accountAddress,
|
|
106
106
|
value: 0n,
|
|
107
|
-
data: '
|
|
107
|
+
data: '0xa71763a80000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000013fdb5234e4e3162a810f54d9f7e9800000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
|
|
108
108
|
},
|
|
109
109
|
]);
|
|
110
110
|
});
|
|
@@ -132,7 +132,7 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
|
|
|
132
132
|
(0, vitest_1.describe)('Add Owner', () => {
|
|
133
133
|
(0, vitest_1.test)('', () => {
|
|
134
134
|
(0, vitest_1.expect)((0, _1.addOwner)(MOCK_OWNER_A)).toEqual({
|
|
135
|
-
to: '
|
|
135
|
+
to: '0x000000000013fdB5234E4E3162a810F54d9f7E98',
|
|
136
136
|
value: 0n,
|
|
137
137
|
data: '0x7065cb48000000000000000000000000d1aefebdceefc094f1805b241fa5e6db63a9181a',
|
|
138
138
|
});
|
|
@@ -141,7 +141,7 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
|
|
|
141
141
|
(0, vitest_1.describe)('Remove Owner', () => {
|
|
142
142
|
(0, vitest_1.test)('', () => {
|
|
143
143
|
(0, vitest_1.expect)((0, _1.removeOwner)(MOCK_OWNER_A, MOCK_OWNER_B)).toEqual({
|
|
144
|
-
to: '
|
|
144
|
+
to: '0x000000000013fdB5234E4E3162a810F54d9f7E98',
|
|
145
145
|
value: 0n,
|
|
146
146
|
data: '0xfbe5ce0a000000000000000000000000d1aefebdceefc094f1805b241fa5e6db63a9181a000000000000000000000000eddfcb50d18f6d3d51c4f7cbca5ed6bdebc59817',
|
|
147
147
|
});
|
|
@@ -150,7 +150,7 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
|
|
|
150
150
|
(0, vitest_1.describe)('Set Threshold', () => {
|
|
151
151
|
(0, vitest_1.test)('', () => {
|
|
152
152
|
(0, vitest_1.expect)((0, _1.changeThreshold)(1)).toEqual({
|
|
153
|
-
to: '
|
|
153
|
+
to: '0x000000000013fdB5234E4E3162a810F54d9f7E98',
|
|
154
154
|
value: 0n,
|
|
155
155
|
data: '0x960bfe040000000000000000000000000000000000000000000000000000000000000001',
|
|
156
156
|
});
|
|
@@ -216,12 +216,12 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
|
|
|
216
216
|
(0, vitest_1.expect)(mockPublicClient.multicall).toHaveBeenCalledTimes(1);
|
|
217
217
|
(0, vitest_1.expect)(result).toEqual([
|
|
218
218
|
{
|
|
219
|
-
to: '
|
|
219
|
+
to: '0x000000000013fdB5234E4E3162a810F54d9f7E98',
|
|
220
220
|
value: 0n,
|
|
221
221
|
data: '0x7065cb480000000000000000000000006092086a3dc0020cd604a68fcf5d430007d51bb7',
|
|
222
222
|
},
|
|
223
223
|
{
|
|
224
|
-
to: '
|
|
224
|
+
to: '0x000000000013fdB5234E4E3162a810F54d9f7E98',
|
|
225
225
|
value: 0n,
|
|
226
226
|
data: '0xfbe5ce0a0000000000000000000000006092086a3dc0020cd604a68fcf5d430007d51bb7000000000000000000000000f6c02c78ded62973b43bfa523b247da099486936',
|
|
227
227
|
},
|
|
@@ -249,12 +249,12 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
|
|
|
249
249
|
(0, vitest_1.expect)(mockPublicClient.multicall).toHaveBeenCalledTimes(1);
|
|
250
250
|
(0, vitest_1.expect)(result).toEqual([
|
|
251
251
|
{
|
|
252
|
-
to: '
|
|
252
|
+
to: '0x000000000013fdB5234E4E3162a810F54d9f7E98',
|
|
253
253
|
value: 0n,
|
|
254
254
|
data: '0x7065cb48000000000000000000000000c5587d912c862252599b61926adaef316ba06da0',
|
|
255
255
|
},
|
|
256
256
|
{
|
|
257
|
-
to: '
|
|
257
|
+
to: '0x000000000013fdB5234E4E3162a810F54d9f7E98',
|
|
258
258
|
value: 0n,
|
|
259
259
|
data: '0xfbe5ce0a000000000000000000000000c5587d912c862252599b61926adaef316ba06da0000000000000000000000000f6c02c78ded62973b43bfa523b247da099486936',
|
|
260
260
|
},
|
|
@@ -282,17 +282,17 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
|
|
|
282
282
|
(0, vitest_1.expect)(mockPublicClient.multicall).toHaveBeenCalledTimes(1);
|
|
283
283
|
(0, vitest_1.expect)(result).toEqual([
|
|
284
284
|
{
|
|
285
|
-
to: '
|
|
285
|
+
to: '0x000000000013fdB5234E4E3162a810F54d9f7E98',
|
|
286
286
|
value: 0n,
|
|
287
287
|
data: '0x7065cb48000000000000000000000000c5587d912c862252599b61926adaef316ba06da0',
|
|
288
288
|
},
|
|
289
289
|
{
|
|
290
|
-
to: '
|
|
290
|
+
to: '0x000000000013fdB5234E4E3162a810F54d9f7E98',
|
|
291
291
|
value: 0n,
|
|
292
292
|
data: '0xfbe5ce0a000000000000000000000000c5587d912c862252599b61926adaef316ba06da0000000000000000000000000f6c02c78ded62973b43bfa523b247da099486936',
|
|
293
293
|
},
|
|
294
294
|
{
|
|
295
|
-
to: '
|
|
295
|
+
to: '0x000000000013fdB5234E4E3162a810F54d9f7E98',
|
|
296
296
|
value: 0n,
|
|
297
297
|
data: '0xfbe5ce0a0000000000000000000000006092086a3dc0020cd604a68fcf5d430007d51bb7000000000000000000000000c27b7578151c5ef713c62c65db09763d57ac3596',
|
|
298
298
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../execution/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAmC,MAAM,MAAM,CAAA;AAKhF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAQrD,OAAO,KAAK,EAEV,uBAAuB,EAGvB,WAAW,EACZ,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,gCAAgC,EAChC,yBAAyB,EACzB,0CAA0C,EAC1C,0CAA0C,EAC3C,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAa5D,iBAAe,eAAe,CAC5B,MAAM,EAAE,uBAAuB,EAC/B,WAAW,EAAE,WAAW,8BA2BzB;AAyID,iBAAe,gBAAgB,CAC7B,MAAM,EAAE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
|
@@ -110,7 +110,7 @@ async function waitForExecution(config, result, acceptsPreconfirmations) {
|
|
|
110
110
|
case 'intent': {
|
|
111
111
|
let intentStatus = null;
|
|
112
112
|
while (intentStatus === null || !validStatuses.has(intentStatus.status)) {
|
|
113
|
-
const orchestrator = (0, utils_2.getOrchestratorByChain)(result.targetChain, config.rhinestoneApiKey);
|
|
113
|
+
const orchestrator = (0, utils_2.getOrchestratorByChain)(result.targetChain, config.rhinestoneApiKey, config.useDev);
|
|
114
114
|
intentStatus = await orchestrator.getIntentOpStatus(result.id);
|
|
115
115
|
await new Promise((resolve) => setTimeout(resolve, POLLING_INTERVAL));
|
|
116
116
|
}
|
|
@@ -138,12 +138,12 @@ async function waitForExecution(config, result, acceptsPreconfirmations) {
|
|
|
138
138
|
}
|
|
139
139
|
async function getMaxSpendableAmount(config, chain, tokenAddress, gasUnits) {
|
|
140
140
|
const address = (0, accounts_1.getAddress)(config);
|
|
141
|
-
const orchestrator = (0, utils_2.getOrchestratorByChain)(chain.id, config.rhinestoneApiKey);
|
|
141
|
+
const orchestrator = (0, utils_2.getOrchestratorByChain)(chain.id, config.rhinestoneApiKey, config.useDev);
|
|
142
142
|
return orchestrator.getMaxTokenAmount(address, chain.id, tokenAddress, gasUnits);
|
|
143
143
|
}
|
|
144
144
|
async function getPortfolio(config, onTestnets) {
|
|
145
145
|
const address = (0, accounts_1.getAddress)(config);
|
|
146
146
|
const chainId = onTestnets ? chains_1.sepolia.id : chains_1.mainnet.id;
|
|
147
|
-
const orchestrator = (0, utils_2.getOrchestratorByChain)(chainId, config.rhinestoneApiKey);
|
|
147
|
+
const orchestrator = (0, utils_2.getOrchestratorByChain)(chainId, config.rhinestoneApiKey, config.useDev);
|
|
148
148
|
return orchestrator.getPortfolio(address);
|
|
149
149
|
}
|
|
@@ -37,7 +37,7 @@ declare function signAuthorizationsInternal(config: RhinestoneAccountConfig, dat
|
|
|
37
37
|
declare function submitTransaction(config: RhinestoneAccountConfig, signedTransaction: SignedTransactionData, authorizations: SignedAuthorizationList): Promise<TransactionResult>;
|
|
38
38
|
declare function prepareTransactionAsIntent(config: RhinestoneAccountConfig, sourceChains: Chain[] | undefined, targetChain: Chain, callInputs: CallInput[], gasLimit: bigint | undefined, tokenRequests: TokenRequest[], accountAddress: Address, isSponsored: boolean, eip7702InitSignature?: Hex): Promise<IntentData>;
|
|
39
39
|
declare function signIntent(config: RhinestoneAccountConfig, targetChain: Chain, intentOp: IntentOp, signers?: SignerSet): Promise<`0x${string}`>;
|
|
40
|
-
declare function getOrchestratorByChain(chainId: number, apiKey: string): import("../orchestrator").Orchestrator;
|
|
40
|
+
declare function getOrchestratorByChain(chainId: number, apiKey: string | undefined, useDev: boolean | undefined): import("../orchestrator").Orchestrator;
|
|
41
41
|
declare function submitIntentInternal(config: RhinestoneAccountConfig, sourceChains: Chain[] | undefined, targetChain: Chain, intentOp: IntentOp, signature: Hex, authorizations: SignedAuthorizationList): Promise<TransactionResult>;
|
|
42
42
|
declare function getValidatorAccount(config: RhinestoneAccountConfig, signers: SignerSet | undefined, publicClient: PublicClient, chain: Chain): Promise<import("viem/account-abstraction").SmartAccount<import("viem/account-abstraction").SmartAccountImplementation<import("viem").Abi, "0.7">> | null | undefined>;
|
|
43
43
|
declare function parseCalls(calls: CallInput[], chainId: number): Call[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../execution/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EAIV,KAAK,uBAAuB,EAC5B,KAAK,GAAG,EAER,KAAK,YAAY,EAEjB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EAGf,MAAM,MAAM,CAAA;AACb,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,0BAA0B,CAAA;AAuBjC,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,WAAW,EAGjB,MAAM,iB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AAoB,CAAC,EAAE,GAAG,uBAoD3B;AAED,iBAAe,UAAU,CACvB,MAAM,EAAE,uBAAuB,EAC/B,WAAW,EAAE,KAAK,EAClB,QAAQ,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE,SAAS,0BAqBpB;AA6FD,iBAAS,sBAAsB,CAC7B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,MAAM,EAAE,OAAO,GAAG,SAAS,0CAS5B;AAED,iBAAe,oBAAoB,CACjC,MAAM,EAAE,uBAAuB,EAC/B,YAAY,EAAE,KAAK,EAAE,GAAG,SAAS,EACjC,WAAW,EAAE,KAAK,EAClB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,GAAG,EACd,cAAc,EAAE,uBAAuB,8BA8BxC;AAED,iBAAe,mBAAmB,CAChC,MAAM,EAAE,uBAAuB,EAC/B,OAAO,EAAE,SAAS,GAAG,SAAS,EAC9B,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,yKA6Bb;AAmDD,iBAAS,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE,CAM/D;AAmDD,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,0BAA0B,EAC1B,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,sBAAsB,EACtB,UAAU,EACV,0BAA0B,EAC1B,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,GACX,CAAA;AACD,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,GACtB,CAAA"}
|
|
@@ -238,7 +238,7 @@ async function prepareTransactionAsIntent(config, sourceChains, targetChain, cal
|
|
|
238
238
|
},
|
|
239
239
|
},
|
|
240
240
|
};
|
|
241
|
-
const orchestrator = getOrchestratorByChain(targetChain.id, config.rhinestoneApiKey);
|
|
241
|
+
const orchestrator = getOrchestratorByChain(targetChain.id, config.rhinestoneApiKey, config.useDev);
|
|
242
242
|
const intentRoute = await orchestrator.getIntentRoute(metaIntent);
|
|
243
243
|
return {
|
|
244
244
|
type: 'intent',
|
|
@@ -316,10 +316,12 @@ async function submitUserOp(config, chain, userOp, signature) {
|
|
|
316
316
|
async function submitIntent(config, sourceChains, targetChain, intentOp, signature, authorizations) {
|
|
317
317
|
return submitIntentInternal(config, sourceChains, targetChain, intentOp, signature, authorizations);
|
|
318
318
|
}
|
|
319
|
-
function getOrchestratorByChain(chainId, apiKey) {
|
|
320
|
-
const orchestratorUrl = (
|
|
321
|
-
? consts_1.
|
|
322
|
-
:
|
|
319
|
+
function getOrchestratorByChain(chainId, apiKey, useDev) {
|
|
320
|
+
const orchestratorUrl = (useDev ?? false)
|
|
321
|
+
? consts_1.DEV_ORCHESTRATOR_URL
|
|
322
|
+
: (0, registry_1.isTestnet)(chainId)
|
|
323
|
+
? consts_1.STAGING_ORCHESTRATOR_URL
|
|
324
|
+
: consts_1.PROD_ORCHESTRATOR_URL;
|
|
323
325
|
return (0, orchestrator_1.getOrchestrator)(apiKey, orchestratorUrl);
|
|
324
326
|
}
|
|
325
327
|
async function submitIntentInternal(config, sourceChains, targetChain, intentOp, signature, authorizations) {
|
|
@@ -338,7 +340,7 @@ async function submitIntentInternal(config, sourceChains, targetChain, intentOp,
|
|
|
338
340
|
}))
|
|
339
341
|
: undefined,
|
|
340
342
|
};
|
|
341
|
-
const orchestrator = getOrchestratorByChain(targetChain.id, config.rhinestoneApiKey);
|
|
343
|
+
const orchestrator = getOrchestratorByChain(targetChain.id, config.rhinestoneApiKey, config.useDev);
|
|
342
344
|
const intentResults = await orchestrator.submitIntent(signedIntentOp);
|
|
343
345
|
return {
|
|
344
346
|
type: 'intent',
|
|
@@ -380,11 +382,10 @@ function getValidator(config, signers) {
|
|
|
380
382
|
}
|
|
381
383
|
// Passkeys (WebAuthn)
|
|
382
384
|
if (withOwner.kind === 'passkey') {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
});
|
|
385
|
+
return (0, core_1.getWebAuthnValidator)(1, withOwner.accounts.map((account) => ({
|
|
386
|
+
pubKey: account.publicKey,
|
|
387
|
+
authenticatorId: account.id,
|
|
388
|
+
})));
|
|
388
389
|
}
|
|
389
390
|
// Multi-factor
|
|
390
391
|
if (withOwner.kind === 'multi-factor') {
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address, Chain, HashTypedDataParameters, Hex, SignableMessage, SignedAuthorizationList, TypedData } from 'viem';
|
|
2
2
|
import type { UserOperationReceipt } from 'viem/account-abstraction';
|
|
3
3
|
import { AccountError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, isAccountError, SigningNotSupportedForAccountError, SignMessageNotSupportedByAccountError, SmartSessionsNotEnabledError } from './accounts';
|
|
4
|
-
import { addOwner, changeMultiFactorThreshold, changeThreshold, disableEcdsa, disableMultiFactor, disablePasskeys, enableEcdsa, enableMultiFactor, enablePasskeys, encodeSmartSessionSignature, recover, removeOwner, removeSubValidator, setSubValidator, setUpRecovery } from './actions';
|
|
4
|
+
import { addOwner, addPasskeyOwner, changeMultiFactorThreshold, changePasskeyThreshold, changeThreshold, disableEcdsa, disableMultiFactor, disablePasskeys, enableEcdsa, enableMultiFactor, enablePasskeys, encodeSmartSessionSignature, recover, recoverEcdsaOwnership, recoverPasskeyOwnership, removeOwner, removePasskeyOwner, removeSubValidator, setSubValidator, setUpRecovery } from './actions';
|
|
5
5
|
import type { TransactionResult } from './execution';
|
|
6
6
|
import { ExecutionError, IntentFailedError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SourceChainsNotAvailableForUserOpFlowError, UserOperationRequiredForSmartSessionsError } from './execution';
|
|
7
7
|
import { type SessionDetails } from './execution/smart-session';
|
|
@@ -37,6 +37,6 @@ interface RhinestoneAccount {
|
|
|
37
37
|
* @returns account
|
|
38
38
|
*/
|
|
39
39
|
declare function createRhinestoneAccount(config: RhinestoneAccountConfig): Promise<RhinestoneAccount>;
|
|
40
|
-
export { createRhinestoneAccount, addOwner, changeMultiFactorThreshold, changeThreshold, disableEcdsa, disableMultiFactor, disablePasskeys, enableEcdsa, enableMultiFactor, enablePasskeys, encodeSmartSessionSignature, recover, removeOwner, removeSubValidator, setSubValidator, setUpRecovery, isAccountError, AccountError, Eip7702AccountMustHaveEoaError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, SmartSessionsNotEnabledError, SigningNotSupportedForAccountError, SignMessageNotSupportedByAccountError, Eip7702NotSupportedForAccountError, isExecutionError, IntentFailedError, ExecutionError, SourceChainsNotAvailableForUserOpFlowError, UserOperationRequiredForSmartSessionsError, OrderPathRequiredForIntentsError, SessionChainRequiredError, isOrchestratorError, AuthenticationRequiredError, InsufficientBalanceError, InvalidApiKeyError, InvalidIntentSignatureError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, IntentNotFoundError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError, getSupportedTokens, getTokenAddress, };
|
|
40
|
+
export { createRhinestoneAccount, addOwner, addPasskeyOwner, changeMultiFactorThreshold, changeThreshold, changePasskeyThreshold, disableEcdsa, disableMultiFactor, disablePasskeys, enableEcdsa, enableMultiFactor, enablePasskeys, encodeSmartSessionSignature, recover, recoverEcdsaOwnership, recoverPasskeyOwnership, removeOwner, removePasskeyOwner, removeSubValidator, setSubValidator, setUpRecovery, isAccountError, AccountError, Eip7702AccountMustHaveEoaError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, SmartSessionsNotEnabledError, SigningNotSupportedForAccountError, SignMessageNotSupportedByAccountError, Eip7702NotSupportedForAccountError, isExecutionError, IntentFailedError, ExecutionError, SourceChainsNotAvailableForUserOpFlowError, UserOperationRequiredForSmartSessionsError, OrderPathRequiredForIntentsError, SessionChainRequiredError, isOrchestratorError, AuthenticationRequiredError, InsufficientBalanceError, InvalidApiKeyError, InvalidIntentSignatureError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, IntentNotFoundError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError, getSupportedTokens, getTokenAddress, };
|
|
41
41
|
export type { RhinestoneAccount, Session, Call, IntentData, PreparedTransactionData, SignedTransactionData, TransactionResult, IntentCost, IntentInput, IntentOp, IntentOpStatus, IntentResult, IntentRoute, SettlementSystem, SignedIntentOp, Portfolio, };
|
|
42
42
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,KAAK,EACL,uBAAuB,EACvB,GAAG,EACH,eAAe,EACf,uBAAuB,EACvB,SAAS,EACV,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,EACL,YAAY,EAEZ,8BAA8B,EAC9B,kCAAkC,EAClC,wCAAwC,EACxC,4BAA4B,EAE5B,cAAc,EACd,kCAAkC,EAClC,qCAAqC,EACrC,4BAA4B,EAE7B,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,QAAQ,EACR,0BAA0B,EAC1B,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,2BAA2B,EAC3B,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,aAAa,EACd,MAAM,WAAW,CAAA;AAClB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EACL,cAAc,EAGd,iBAAiB,EACjB,gBAAgB,EAChB,gCAAgC,EAChC,yBAAyB,EACzB,0CAA0C,EAE1C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AAS,EAAE,MAAM,CAAA;KAClB,GAAG,IAAI,CAAC,CAAA;IACT,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;CACpD;AAED;;;;;GAKG;AACH,iBAAe,uBAAuB,CACpC,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,iBAAiB,CAAC,CA8M5B;AAED,OAAO,EACL,uBAAuB,EAEvB,QAAQ,EACR,0BAA0B,EAC1B,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,2BAA2B,EAC3B,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,aAAa,EAEb,cAAc,EACd,YAAY,EACZ,8BAA8B,EAC9B,wCAAwC,EACxC,4BAA4B,EAC5B,4BAA4B,EAC5B,kCAAkC,EAClC,qCAAqC,EACrC,kCAAkC,EAElC,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,0CAA0C,EAC1C,0CAA0C,EAC1C,gCAAgC,EAChC,yBAAyB,EAEzB,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,2BAA2B,EAC3B,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EAErB,kBAAkB,EAClB,eAAe,GAChB,CAAA;AACD,YAAY,EACV,iBAAiB,EACjB,OAAO,EACP,IAAI,EACJ,UAAU,EACV,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,SAAS,GACV,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAA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vB,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,aAAa,EAEb,cAAc,EACd,YAAY,EACZ,8BAA8B,EAC9B,wCAAwC,EACxC,4BAA4B,EAC5B,4BAA4B,EAC5B,kCAAkC,EAClC,qCAAqC,EACrC,kCAAkC,EAElC,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,0CAA0C,EAC1C,0CAA0C,EAC1C,gCAAgC,EAChC,yBAAyB,EAEzB,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,2BAA2B,EAC3B,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EAErB,kBAAkB,EAClB,eAAe,GAChB,CAAA;AACD,YAAY,EACV,iBAAiB,EACjB,OAAO,EACP,IAAI,EACJ,UAAU,EACV,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,SAAS,GACV,CAAA"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getSupportedTokens = exports.UnsupportedTokenError = exports.UnsupportedChainIdError = exports.UnsupportedChainError = exports.TokenNotSupportedError = exports.IntentNotFoundError = exports.OrchestratorError = exports.OnlyOneTargetTokenAmountCanBeUnsetError = exports.NoPathFoundError = exports.InvalidIntentSignatureError = exports.InvalidApiKeyError = exports.InsufficientBalanceError = exports.AuthenticationRequiredError = exports.isOrchestratorError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.UserOperationRequiredForSmartSessionsError = exports.SourceChainsNotAvailableForUserOpFlowError = exports.ExecutionError = exports.IntentFailedError = exports.isExecutionError = exports.Eip7702NotSupportedForAccountError = exports.SignMessageNotSupportedByAccountError = exports.SigningNotSupportedForAccountError = exports.SmartSessionsNotEnabledError = exports.FactoryArgsNotAvailableError = exports.ExistingEip7702AccountsNotSupportedError = exports.Eip7702AccountMustHaveEoaError = exports.AccountError = exports.isAccountError = exports.setUpRecovery = exports.setSubValidator = exports.removeSubValidator = exports.removePasskeyOwner = exports.removeOwner = exports.recoverPasskeyOwnership = exports.recoverEcdsaOwnership = exports.recover = exports.encodeSmartSessionSignature = exports.enablePasskeys = exports.enableMultiFactor = exports.enableEcdsa = exports.disablePasskeys = exports.disableMultiFactor = exports.disableEcdsa = exports.changePasskeyThreshold = exports.changeThreshold = exports.changeMultiFactorThreshold = exports.addPasskeyOwner = exports.addOwner = void 0;
|
|
4
|
+
exports.getTokenAddress = void 0;
|
|
4
5
|
exports.createRhinestoneAccount = createRhinestoneAccount;
|
|
5
6
|
const accounts_1 = require("./accounts");
|
|
6
7
|
Object.defineProperty(exports, "AccountError", { enumerable: true, get: function () { return accounts_1.AccountError; } });
|
|
@@ -14,7 +15,9 @@ Object.defineProperty(exports, "SignMessageNotSupportedByAccountError", { enumer
|
|
|
14
15
|
Object.defineProperty(exports, "SmartSessionsNotEnabledError", { enumerable: true, get: function () { return accounts_1.SmartSessionsNotEnabledError; } });
|
|
15
16
|
const actions_1 = require("./actions");
|
|
16
17
|
Object.defineProperty(exports, "addOwner", { enumerable: true, get: function () { return actions_1.addOwner; } });
|
|
18
|
+
Object.defineProperty(exports, "addPasskeyOwner", { enumerable: true, get: function () { return actions_1.addPasskeyOwner; } });
|
|
17
19
|
Object.defineProperty(exports, "changeMultiFactorThreshold", { enumerable: true, get: function () { return actions_1.changeMultiFactorThreshold; } });
|
|
20
|
+
Object.defineProperty(exports, "changePasskeyThreshold", { enumerable: true, get: function () { return actions_1.changePasskeyThreshold; } });
|
|
18
21
|
Object.defineProperty(exports, "changeThreshold", { enumerable: true, get: function () { return actions_1.changeThreshold; } });
|
|
19
22
|
Object.defineProperty(exports, "disableEcdsa", { enumerable: true, get: function () { return actions_1.disableEcdsa; } });
|
|
20
23
|
Object.defineProperty(exports, "disableMultiFactor", { enumerable: true, get: function () { return actions_1.disableMultiFactor; } });
|
|
@@ -24,7 +27,10 @@ Object.defineProperty(exports, "enableMultiFactor", { enumerable: true, get: fun
|
|
|
24
27
|
Object.defineProperty(exports, "enablePasskeys", { enumerable: true, get: function () { return actions_1.enablePasskeys; } });
|
|
25
28
|
Object.defineProperty(exports, "encodeSmartSessionSignature", { enumerable: true, get: function () { return actions_1.encodeSmartSessionSignature; } });
|
|
26
29
|
Object.defineProperty(exports, "recover", { enumerable: true, get: function () { return actions_1.recover; } });
|
|
30
|
+
Object.defineProperty(exports, "recoverEcdsaOwnership", { enumerable: true, get: function () { return actions_1.recoverEcdsaOwnership; } });
|
|
31
|
+
Object.defineProperty(exports, "recoverPasskeyOwnership", { enumerable: true, get: function () { return actions_1.recoverPasskeyOwnership; } });
|
|
27
32
|
Object.defineProperty(exports, "removeOwner", { enumerable: true, get: function () { return actions_1.removeOwner; } });
|
|
33
|
+
Object.defineProperty(exports, "removePasskeyOwner", { enumerable: true, get: function () { return actions_1.removePasskeyOwner; } });
|
|
28
34
|
Object.defineProperty(exports, "removeSubValidator", { enumerable: true, get: function () { return actions_1.removeSubValidator; } });
|
|
29
35
|
Object.defineProperty(exports, "setSubValidator", { enumerable: true, get: function () { return actions_1.setSubValidator; } });
|
|
30
36
|
Object.defineProperty(exports, "setUpRecovery", { enumerable: true, get: function () { return actions_1.setUpRecovery; } });
|
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
import { type Chain
|
|
1
|
+
import { type Chain } from 'viem';
|
|
2
2
|
import type { RhinestoneAccountConfig } from '../types';
|
|
3
3
|
import { type Module } from './common';
|
|
4
4
|
import { HOOK_ADDRESS } from './omni-account';
|
|
5
5
|
import { getOwners, getValidators } from './read';
|
|
6
6
|
import { getOwnerValidator } from './validators';
|
|
7
|
-
interface WebAuthnData {
|
|
8
|
-
authenticatorData: Hex;
|
|
9
|
-
clientDataJSON: string;
|
|
10
|
-
typeIndex: number | bigint;
|
|
11
|
-
}
|
|
12
|
-
interface WebauthnValidatorSignature {
|
|
13
|
-
webauthn: WebAuthnData;
|
|
14
|
-
signature: WebauthnSignature | Hex | Uint8Array;
|
|
15
|
-
usePrecompiled?: boolean;
|
|
16
|
-
}
|
|
17
|
-
interface WebauthnSignature {
|
|
18
|
-
r: bigint;
|
|
19
|
-
s: bigint;
|
|
20
|
-
}
|
|
21
7
|
interface ModeleSetup {
|
|
22
8
|
validators: Module[];
|
|
23
9
|
executors: Module[];
|
|
@@ -25,7 +11,6 @@ interface ModeleSetup {
|
|
|
25
11
|
hooks: Module[];
|
|
26
12
|
}
|
|
27
13
|
declare function getSetup(config: RhinestoneAccountConfig): ModeleSetup;
|
|
28
|
-
declare function getWebauthnValidatorSignature({ webauthn, signature, usePrecompiled, }: WebauthnValidatorSignature): `0x${string}`;
|
|
29
14
|
declare function isRip7212SupportedNetwork(chain: Chain): boolean;
|
|
30
|
-
export { HOOK_ADDRESS, getSetup, getOwnerValidator,
|
|
15
|
+
export { HOOK_ADDRESS, getSetup, getOwnerValidator, getOwners, getValidators, isRip7212SupportedNetwork, };
|
|
31
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,KAAK,EAAuB,MAAM,MAAM,CAAA;AAWpE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAEvD,OAAO,EAGL,KAAK,MAAM,EACZ,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,YAAY,EAGb,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAA4B,MAAM,cAAc,CAAA;AAM1E,UAAU,WAAW;IACnB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB;AAED,iBAAS,QAAQ,CAAC,MAAM,EAAE,uBAAuB,GAAG,WAAW,CA2D9D;AAED,iBAAS,yBAAyB,CAAC,KAAK,EAAE,KAAK,WAW9C;AAED,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,aAAa,EACb,yBAAyB,GAC1B,CAAA"}
|