@charterlabs/rhinestone-sdk 0.2.5 → 0.2.7-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/accounts/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/json-rpc/index.d.ts +5 -0
- package/dist/src/accounts/json-rpc/index.d.ts.map +1 -0
- package/dist/src/accounts/json-rpc/index.js +16 -0
- package/dist/src/accounts/json-rpc/index.test.d.ts +2 -0
- package/dist/src/accounts/json-rpc/index.test.d.ts.map +1 -0
- package/dist/src/accounts/json-rpc/index.test.js +16 -0
- package/dist/src/accounts/json-rpc/providers.d.ts +4 -0
- package/dist/src/accounts/json-rpc/providers.d.ts.map +1 -0
- package/dist/src/accounts/json-rpc/providers.js +14 -0
- package/dist/src/accounts/json-rpc/providers.test.d.ts +2 -0
- package/dist/src/accounts/json-rpc/providers.test.d.ts.map +1 -0
- package/dist/src/accounts/json-rpc/providers.test.js +15 -0
- 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 +42 -11
- 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/accounts/utils.d.ts +3 -3
- package/dist/src/accounts/utils.d.ts.map +1 -1
- package/dist/src/accounts/utils.js +3 -40
- 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 -6
- 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 -14
- package/dist/src/index.d.ts +4 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +9 -3
- 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 +45 -42
- package/dist/src/modules/validators/core.test.js +6 -6
- package/dist/src/modules/validators/smart-sessions.test.js +4 -4
- package/dist/src/modules/validators/webauthn-contract.d.ts.map +1 -1
- 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/orchestrator/registry.d.ts +1 -23
- package/dist/src/orchestrator/registry.d.ts.map +1 -1
- package/dist/src/orchestrator/registry.js +22 -24
- package/dist/src/orchestrator/registry.test.js +4 -4
- package/dist/src/orchestrator/types.d.ts +1 -6
- package/dist/src/orchestrator/types.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
- package/dist/src/orchestrator/registry.json +0 -365
|
@@ -20,6 +20,7 @@ declare function setUpRecovery({ rhinestoneAccount, guardians, threshold, }: {
|
|
|
20
20
|
* @param chain Chain to recover ownership on
|
|
21
21
|
* @param provider Provider to use for the recovery
|
|
22
22
|
* @returns Calls to recover ownership
|
|
23
|
+
* @deprecated Use `recoverEcdsaOwnership` or `recoverPasskeyOwnership` instead
|
|
23
24
|
*/
|
|
24
25
|
declare function recover(address: Address, newOwners: OwnerSet, chain: Chain, provider?: ProviderConfig): Promise<Call[]>;
|
|
25
26
|
/**
|
|
@@ -79,6 +80,49 @@ declare function removeOwner(prevOwner: Address, ownerToRemove: Address): Call;
|
|
|
79
80
|
* @returns Call to change the threshold
|
|
80
81
|
*/
|
|
81
82
|
declare function changeThreshold(newThreshold: number): Call;
|
|
83
|
+
/**
|
|
84
|
+
* Add a passkey owner
|
|
85
|
+
* @param pubKeyX Public key X
|
|
86
|
+
* @param pubKeyY Public key Y
|
|
87
|
+
* @param requireUserVerification Whether to require user verification
|
|
88
|
+
* @returns Call to add the passkey owner
|
|
89
|
+
*/
|
|
90
|
+
declare function addPasskeyOwner(pubKeyX: bigint, pubKeyY: bigint, requireUserVerification: boolean): Call;
|
|
91
|
+
/**
|
|
92
|
+
* Remove a passkey owner
|
|
93
|
+
* @param pubKeyX Public key X
|
|
94
|
+
* @param pubKeyY Public key Y
|
|
95
|
+
* @returns Call to remove the passkey owner
|
|
96
|
+
*/
|
|
97
|
+
declare function removePasskeyOwner(pubKeyX: bigint, pubKeyY: bigint): Call;
|
|
98
|
+
/**
|
|
99
|
+
* Change an account's signer threshold (passkey)
|
|
100
|
+
* @param newThreshold New threshold
|
|
101
|
+
* @returns Call to change the threshold
|
|
102
|
+
*/
|
|
103
|
+
declare function changePasskeyThreshold(newThreshold: number): Call;
|
|
104
|
+
/**
|
|
105
|
+
* Recover an account's ownership (ECDSA)
|
|
106
|
+
* @param address Account address
|
|
107
|
+
* @param newOwners New owners
|
|
108
|
+
* @param chain Chain to recover ownership on
|
|
109
|
+
* @param provider Provider to use for the recovery
|
|
110
|
+
* @returns Calls to recover ownership
|
|
111
|
+
*/
|
|
112
|
+
declare function recoverEcdsaOwnership(address: Address, newOwners: OwnableValidatorConfig, chain: Chain, provider?: ProviderConfig): Promise<Call[]>;
|
|
113
|
+
/**
|
|
114
|
+
* Recover an account's ownership (Passkey)
|
|
115
|
+
* @param address Account address
|
|
116
|
+
* @param oldCredentials Old credentials to be replaced (with pubKeyX, pubKeyY)
|
|
117
|
+
* @param newOwners New passkey owners
|
|
118
|
+
* @param chain Chain to recover ownership on
|
|
119
|
+
* @param provider Provider to use for the recovery
|
|
120
|
+
* @returns Calls to recover ownership
|
|
121
|
+
*/
|
|
122
|
+
declare function recoverPasskeyOwnership(address: Address, oldCredentials: {
|
|
123
|
+
pubKeyX: bigint;
|
|
124
|
+
pubKeyY: bigint;
|
|
125
|
+
}[], newOwners: WebauthnValidatorConfig, chain: Chain, provider?: ProviderConfig): Promise<Call[]>;
|
|
82
126
|
/**
|
|
83
127
|
* Enable multi-factor authentication
|
|
84
128
|
* @param rhinestoneAccount Account to enable multi-factor authentication on
|
|
@@ -119,5 +163,5 @@ declare function setSubValidator(id: Hex | number, validator: OwnableValidatorCo
|
|
|
119
163
|
* @returns Call to remove the sub-validator
|
|
120
164
|
*/
|
|
121
165
|
declare function removeSubValidator(id: Hex | number, validator: OwnableValidatorConfig | WebauthnValidatorConfig): Call;
|
|
122
|
-
export { enableEcdsa, enablePasskeys, disableEcdsa, disablePasskeys, addOwner, removeOwner, changeThreshold, recover, setUpRecovery, encodeSmartSessionSignature, enableMultiFactor, disableMultiFactor, changeMultiFactorThreshold, setSubValidator, removeSubValidator, };
|
|
166
|
+
export { enableEcdsa, enablePasskeys, disableEcdsa, disablePasskeys, addOwner, removeOwner, changeThreshold, addPasskeyOwner, removePasskeyOwner, changePasskeyThreshold, recover, recoverEcdsaOwnership, recoverPasskeyOwnership, setUpRecovery, encodeSmartSessionSignature, enableMultiFactor, disableMultiFactor, changeMultiFactorThreshold, setSubValidator, removeSubValidator, };
|
|
123
167
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EAGV,KAAK,GAAG,EAGT,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAA;AAM3C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EAGV,KAAK,GAAG,EAGT,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAA;AAM3C,OAAO,EASL,KAAK,kBAAkB,EACxB,MAAM,4BAA4B,CAAA;AACnC,OAAO,KAAK,EACV,IAAI,EACJ,sBAAsB,EACtB,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,uBAAuB,EACxB,MAAM,UAAU,CAAA;AAEjB,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAA;AAE7D;;;;;;GAMG;AACH,iBAAS,aAAa,CAAC,EACrB,iBAAiB,EACjB,SAAS,EACT,SAAa,GACd,EAAE;IACD,iBAAiB,EAAE,iBAAiB,CAAA;CACrC,GAAG,QAAQ,UAIX;AAED;;;;;;;;GAQG;AACH,iBAAe,OAAO,CACpB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,QAAQ,EACnB,KAAK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eAAe,EACf,QAAQ,EACR,WAAW,EACX,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,OAAO,EACP,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,EACb,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,EAClB,0BAA0B,EAC1B,eAAe,EACf,kBAAkB,GACnB,CAAA"}
|
|
@@ -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,uBAAuB,EAC/B,MAAM,EAAE,iBAAiB,EACzB,uBAAuB,EAAE,OAAO;;;;;;;;;;;;
|
|
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,uBAAuB,EAC/B,MAAM,EAAE,iBAAiB,EACzB,uBAAuB,EAAE,OAAO;;;;;;;;;;;;GAyCjC;AAED,iBAAe,qBAAqB,CAClC,MAAM,EAAE,uBAAuB,EAC/B,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,OAAO,EACrB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,CAajB;AAED,iBAAe,YAAY,CACzB,MAAM,EAAE,uBAAuB,EAC/B,UAAU,EAAE,OAAO,gDAUpB;AAED,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EAEZ,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,0CAA0C,EAC1C,0CAA0C,EAC1C,gCAAgC,EAChC,yBAAyB,GAC1B,CAAA;AACD,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -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
|
}
|
|
@@ -121,9 +121,6 @@ async function waitForExecution(config, result, acceptsPreconfirmations) {
|
|
|
121
121
|
}
|
|
122
122
|
case 'userop': {
|
|
123
123
|
const targetChain = (0, registry_1.getChainById)(result.chain);
|
|
124
|
-
if (!targetChain) {
|
|
125
|
-
throw new Error(`Unsupported chain ID: ${result.chain}`);
|
|
126
|
-
}
|
|
127
124
|
const publicClient = (0, viem_1.createPublicClient)({
|
|
128
125
|
chain: targetChain,
|
|
129
126
|
transport: (0, utils_1.createTransport)(targetChain, config.provider),
|
|
@@ -138,12 +135,12 @@ async function waitForExecution(config, result, acceptsPreconfirmations) {
|
|
|
138
135
|
}
|
|
139
136
|
async function getMaxSpendableAmount(config, chain, tokenAddress, gasUnits) {
|
|
140
137
|
const address = (0, accounts_1.getAddress)(config);
|
|
141
|
-
const orchestrator = (0, utils_2.getOrchestratorByChain)(chain.id, config.rhinestoneApiKey);
|
|
138
|
+
const orchestrator = (0, utils_2.getOrchestratorByChain)(chain.id, config.rhinestoneApiKey, config.useDev);
|
|
142
139
|
return orchestrator.getMaxTokenAmount(address, chain.id, tokenAddress, gasUnits);
|
|
143
140
|
}
|
|
144
141
|
async function getPortfolio(config, onTestnets) {
|
|
145
142
|
const address = (0, accounts_1.getAddress)(config);
|
|
146
143
|
const chainId = onTestnets ? chains_1.sepolia.id : chains_1.mainnet.id;
|
|
147
|
-
const orchestrator = (0, utils_2.getOrchestratorByChain)(chainId, config.rhinestoneApiKey);
|
|
144
|
+
const orchestrator = (0, utils_2.getOrchestratorByChain)(chainId, config.rhinestoneApiKey, config.useDev);
|
|
148
145
|
return orchestrator.getPortfolio(address);
|
|
149
146
|
}
|
|
@@ -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,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../execution/utils.ts"],"names":[],"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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"}
|
|
@@ -111,9 +111,6 @@ async function signAuthorizationsInternal(config, data) {
|
|
|
111
111
|
for (const chainId in requiredDelegations) {
|
|
112
112
|
const delegation = requiredDelegations[chainId];
|
|
113
113
|
const chain = (0, registry_1.getChainById)(Number(chainId));
|
|
114
|
-
if (!chain) {
|
|
115
|
-
throw new Error(`Chain not supported: ${chainId}`);
|
|
116
|
-
}
|
|
117
114
|
const walletClient = (0, viem_1.createWalletClient)({
|
|
118
115
|
chain,
|
|
119
116
|
account: eoa,
|
|
@@ -238,7 +235,7 @@ async function prepareTransactionAsIntent(config, sourceChains, targetChain, cal
|
|
|
238
235
|
},
|
|
239
236
|
},
|
|
240
237
|
};
|
|
241
|
-
const orchestrator = getOrchestratorByChain(targetChain.id, config.rhinestoneApiKey);
|
|
238
|
+
const orchestrator = getOrchestratorByChain(targetChain.id, config.rhinestoneApiKey, config.useDev);
|
|
242
239
|
const intentRoute = await orchestrator.getIntentRoute(metaIntent);
|
|
243
240
|
return {
|
|
244
241
|
type: 'intent',
|
|
@@ -316,10 +313,12 @@ async function submitUserOp(config, chain, userOp, signature) {
|
|
|
316
313
|
async function submitIntent(config, sourceChains, targetChain, intentOp, signature, authorizations) {
|
|
317
314
|
return submitIntentInternal(config, sourceChains, targetChain, intentOp, signature, authorizations);
|
|
318
315
|
}
|
|
319
|
-
function getOrchestratorByChain(chainId, apiKey) {
|
|
320
|
-
const orchestratorUrl = (
|
|
321
|
-
? consts_1.
|
|
322
|
-
:
|
|
316
|
+
function getOrchestratorByChain(chainId, apiKey, useDev) {
|
|
317
|
+
const orchestratorUrl = (useDev ?? false)
|
|
318
|
+
? consts_1.DEV_ORCHESTRATOR_URL
|
|
319
|
+
: (0, registry_1.isTestnet)(chainId)
|
|
320
|
+
? consts_1.STAGING_ORCHESTRATOR_URL
|
|
321
|
+
: consts_1.PROD_ORCHESTRATOR_URL;
|
|
323
322
|
return (0, orchestrator_1.getOrchestrator)(apiKey, orchestratorUrl);
|
|
324
323
|
}
|
|
325
324
|
async function submitIntentInternal(config, sourceChains, targetChain, intentOp, signature, authorizations) {
|
|
@@ -338,7 +337,7 @@ async function submitIntentInternal(config, sourceChains, targetChain, intentOp,
|
|
|
338
337
|
}))
|
|
339
338
|
: undefined,
|
|
340
339
|
};
|
|
341
|
-
const orchestrator = getOrchestratorByChain(targetChain.id, config.rhinestoneApiKey);
|
|
340
|
+
const orchestrator = getOrchestratorByChain(targetChain.id, config.rhinestoneApiKey, config.useDev);
|
|
342
341
|
const intentResults = await orchestrator.submitIntent(signedIntentOp);
|
|
343
342
|
return {
|
|
344
343
|
type: 'intent',
|
|
@@ -380,11 +379,10 @@ function getValidator(config, signers) {
|
|
|
380
379
|
}
|
|
381
380
|
// Passkeys (WebAuthn)
|
|
382
381
|
if (withOwner.kind === 'passkey') {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
});
|
|
382
|
+
return (0, core_1.getWebAuthnValidator)(1, withOwner.accounts.map((account) => ({
|
|
383
|
+
pubKey: account.publicKey,
|
|
384
|
+
authenticatorId: account.id,
|
|
385
|
+
})));
|
|
388
386
|
}
|
|
389
387
|
// Multi-factor
|
|
390
388
|
if (withOwner.kind === 'multi-factor') {
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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';
|
|
8
8
|
import { type IntentData, type PreparedTransactionData, type SignedTransactionData } from './execution/utils';
|
|
9
|
-
import { AuthenticationRequiredError, InsufficientBalanceError, type IntentCost, type IntentInput, IntentNotFoundError, type IntentOp, type IntentOpStatus, type IntentResult, type IntentRoute, InvalidApiKeyError, InvalidIntentSignatureError, isOrchestratorError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, type Portfolio, type SettlementSystem, type SignedIntentOp, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError } from './orchestrator';
|
|
9
|
+
import { AuthenticationRequiredError, getSupportedTokens, getTokenAddress, InsufficientBalanceError, type IntentCost, type IntentInput, IntentNotFoundError, type IntentOp, type IntentOpStatus, type IntentResult, type IntentRoute, InvalidApiKeyError, InvalidIntentSignatureError, isOrchestratorError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, type Portfolio, type SettlementSystem, type SignedIntentOp, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError } from './orchestrator';
|
|
10
10
|
import type { Call, RhinestoneAccountConfig, Session, SignerSet, Transaction } from './types';
|
|
11
11
|
interface RhinestoneAccount {
|
|
12
12
|
config: RhinestoneAccountConfig;
|
|
@@ -37,8 +37,8 @@ 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, };
|
|
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
|
export { generateCredentialId, getCredentialIds, hasCredentialById, hasCredential, addCredential, removeCredential, setThreshold, getCredentialInfo, getThreshold, getCredentials, WEBAUTHN_VALIDATOR_ABI, } from './modules/validators/webauthn-contract';
|
|
43
|
-
export { getOrchestrator
|
|
43
|
+
export { getOrchestrator } from './orchestrator';
|
|
44
44
|
//# 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,0CAA0C,EAE3C,MAAM,aAAa,CAAA;AACp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