@rhinestone/sdk 1.0.0-alpha.4 → 1.0.0-alpha.6
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 +2 -2
- package/dist/src/accounts/index.d.ts.map +1 -1
- package/dist/src/accounts/index.js +118 -13
- package/dist/src/accounts/safe.d.ts.map +1 -1
- package/dist/src/accounts/safe.js +4 -0
- package/dist/src/actions/index.d.ts +14 -3
- package/dist/src/actions/index.d.ts.map +1 -1
- package/dist/src/actions/index.js +99 -8
- package/dist/src/execution/error.d.ts +2 -9
- package/dist/src/execution/error.d.ts.map +1 -1
- package/dist/src/execution/error.js +4 -13
- package/dist/src/execution/index.d.ts +2 -3
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +23 -70
- package/dist/src/execution/smart-session.js +1 -1
- package/dist/src/execution/utils.d.ts +4 -5
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +29 -73
- package/dist/src/index.d.ts +3 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +7 -7
- package/dist/src/modules/validators/core.d.ts +5 -6
- package/dist/src/modules/validators/core.d.ts.map +1 -1
- package/dist/src/modules/validators/core.js +81 -6
- package/dist/src/orchestrator/client.d.ts +1 -0
- package/dist/src/orchestrator/client.d.ts.map +1 -1
- package/dist/src/orchestrator/client.js +66 -55
- package/dist/src/orchestrator/consts.d.ts +3 -3
- package/dist/src/orchestrator/consts.d.ts.map +1 -1
- package/dist/src/orchestrator/consts.js +4 -4
- package/dist/src/types.d.ts +20 -4
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Chain, type Hex, type PublicClient } from 'viem';
|
|
2
2
|
import type { Module } from '../modules/common';
|
|
3
3
|
import type { EnableSessionData } from '../modules/validators/smart-sessions';
|
|
4
|
-
import type { AccountProviderConfig, Call, OwnerSet, RhinestoneAccountConfig, Session } from '../types';
|
|
4
|
+
import type { AccountProviderConfig, Call, OwnerSet, RhinestoneAccountConfig, Session, SignerSet } from '../types';
|
|
5
5
|
import { AccountError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, isAccountError, SigningNotSupportedForAccountError, SignMessageNotSupportedByAccountError, SmartSessionsNotEnabledError } from './error';
|
|
6
6
|
import { type ValidatorConfig } from './utils';
|
|
7
7
|
declare function getInitCode(config: RhinestoneAccountConfig): {
|
|
@@ -11,7 +11,7 @@ declare function getInitCode(config: RhinestoneAccountConfig): {
|
|
|
11
11
|
declare function getModuleInstallationCalls(config: RhinestoneAccountConfig, module: Module): Call[];
|
|
12
12
|
declare function getModuleUninstallationCalls(config: RhinestoneAccountConfig, module: Module): Call[];
|
|
13
13
|
declare function getAddress(config: RhinestoneAccountConfig): `0x${string}`;
|
|
14
|
-
declare function getPackedSignature(config: RhinestoneAccountConfig,
|
|
14
|
+
declare function getPackedSignature(config: RhinestoneAccountConfig, signers: SignerSet | undefined, chain: Chain, validator: ValidatorConfig, hash: Hex, transformSignature?: (signature: Hex) => Hex): Promise<`0x${string}`>;
|
|
15
15
|
declare function isDeployed(chain: Chain, config: RhinestoneAccountConfig): Promise<boolean>;
|
|
16
16
|
declare function deploy(config: RhinestoneAccountConfig, chain: Chain, session?: Session): Promise<void>;
|
|
17
17
|
declare function getSmartAccount(config: RhinestoneAccountConfig, client: PublicClient, chain: Chain): Promise<import("viem/account-abstraction").SmartAccount<import("viem/account-abstraction").SmartAccountImplementation<import("viem").Abi, "0.7">>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../accounts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../accounts/index.ts"],"names":[],"mappings":"AAAA,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C,EAAE,OAAO,iBAMlB;AAwBD,iBAAe,eAAe,CAC5B,MAAM,EAAE,uBAAuB,EAC/B,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,KAAK,sJAoCb;AAED,iBAAe,2BAA2B,CACxC,MAAM,EAAE,uBAAuB,EAC/B,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,iBAAiB,GAAG,IAAI,sJA+CrC;AAED,iBAAe,uBAAuB,CACpC,MAAM,EAAE,uBAAuB,EAC/B,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,QAAQ,sJA4CpB;AAoGD,iBAAS,kBAAkB,CACzB,MAAM,EAAE,uBAAuB,GAC9B,qBAAqB,CAOvB;AA6CD,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,MAAM,EACN,eAAe,EACf,2BAA2B,EAC3B,uBAAuB,EACvB,kBAAkB,EAElB,cAAc,EACd,YAAY,EACZ,8BAA8B,EAC9B,wCAAwC,EACxC,4BAA4B,EAC5B,4BAA4B,EAC5B,kCAAkC,EAClC,qCAAqC,EACrC,kCAAkC,GACnC,CAAA"}
|
|
@@ -134,9 +134,10 @@ function getAddress(config) {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
// Signs and packs a signature to be EIP-1271
|
|
138
|
-
async function getPackedSignature(config,
|
|
139
|
-
|
|
137
|
+
// Signs and packs a signature to be EIP-1271 compatible
|
|
138
|
+
async function getPackedSignature(config, signers, chain, validator, hash, transformSignature = (signature) => signature) {
|
|
139
|
+
signers = signers ?? convertOwnerSetToSignerSet(config.owners);
|
|
140
|
+
const signFn = (hash) => sign(signers, chain, hash);
|
|
140
141
|
const account = getAccountProvider(config);
|
|
141
142
|
const address = getAddress(config);
|
|
142
143
|
switch (account.type) {
|
|
@@ -200,7 +201,8 @@ async function getSmartAccount(config, client, chain) {
|
|
|
200
201
|
const account = getAccountProvider(config);
|
|
201
202
|
const address = getAddress(config);
|
|
202
203
|
const ownerValidator = (0, validators_1.getOwnerValidator)(config);
|
|
203
|
-
const
|
|
204
|
+
const signers = convertOwnerSetToSignerSet(config.owners);
|
|
205
|
+
const signFn = (hash) => sign(signers, chain, hash);
|
|
204
206
|
switch (account.type) {
|
|
205
207
|
case 'safe': {
|
|
206
208
|
return (0, safe_1.getSmartAccount)(client, address, config.owners, ownerValidator.address, signFn);
|
|
@@ -219,7 +221,12 @@ async function getSmartSessionSmartAccount(config, client, chain, session, enabl
|
|
|
219
221
|
if (!smartSessionValidator) {
|
|
220
222
|
throw new error_1.SmartSessionsNotEnabledError();
|
|
221
223
|
}
|
|
222
|
-
const
|
|
224
|
+
const signers = {
|
|
225
|
+
type: 'session',
|
|
226
|
+
session,
|
|
227
|
+
enableData: enableData || undefined,
|
|
228
|
+
};
|
|
229
|
+
const signFn = (hash) => sign(signers, chain, hash);
|
|
223
230
|
const account = getAccountProvider(config);
|
|
224
231
|
switch (account.type) {
|
|
225
232
|
case 'safe': {
|
|
@@ -240,7 +247,11 @@ async function getGuardianSmartAccount(config, client, chain, guardians) {
|
|
|
240
247
|
if (!socialRecoveryValidator) {
|
|
241
248
|
throw new Error('Social recovery is not available');
|
|
242
249
|
}
|
|
243
|
-
const
|
|
250
|
+
const signers = {
|
|
251
|
+
type: 'guardians',
|
|
252
|
+
guardians: accounts,
|
|
253
|
+
};
|
|
254
|
+
const signFn = (hash) => sign(signers, chain, hash);
|
|
244
255
|
const account = getAccountProvider(config);
|
|
245
256
|
switch (account.type) {
|
|
246
257
|
case 'safe': {
|
|
@@ -254,14 +265,66 @@ async function getGuardianSmartAccount(config, client, chain, guardians) {
|
|
|
254
265
|
}
|
|
255
266
|
}
|
|
256
267
|
}
|
|
257
|
-
async function sign(
|
|
258
|
-
switch (
|
|
259
|
-
case '
|
|
260
|
-
|
|
261
|
-
|
|
268
|
+
async function sign(signers, chain, hash) {
|
|
269
|
+
switch (signers.type) {
|
|
270
|
+
case 'owner': {
|
|
271
|
+
switch (signers.kind) {
|
|
272
|
+
case 'ecdsa': {
|
|
273
|
+
const signatures = await Promise.all(signers.accounts.map((account) => signEcdsa(account, hash)));
|
|
274
|
+
return (0, viem_1.concat)(signatures);
|
|
275
|
+
}
|
|
276
|
+
case 'passkey': {
|
|
277
|
+
return await signPasskey(signers.account, chain, hash);
|
|
278
|
+
}
|
|
279
|
+
case 'multi-factor': {
|
|
280
|
+
const signatures = await Promise.all(signers.validators.map(async (validator) => {
|
|
281
|
+
if (validator === null) {
|
|
282
|
+
return '0x';
|
|
283
|
+
}
|
|
284
|
+
const validatorSigners = convertOwnerSetToSignerSet(validator);
|
|
285
|
+
return sign(validatorSigners, chain, hash);
|
|
286
|
+
}));
|
|
287
|
+
const data = (0, viem_1.encodeAbiParameters)([
|
|
288
|
+
{
|
|
289
|
+
components: [
|
|
290
|
+
{
|
|
291
|
+
internalType: 'bytes32',
|
|
292
|
+
name: 'packedValidatorAndId',
|
|
293
|
+
type: 'bytes32',
|
|
294
|
+
},
|
|
295
|
+
{ internalType: 'bytes', name: 'data', type: 'bytes' },
|
|
296
|
+
],
|
|
297
|
+
name: 'validators',
|
|
298
|
+
type: 'tuple[]',
|
|
299
|
+
},
|
|
300
|
+
], [
|
|
301
|
+
signers.validators.map((validator, index) => {
|
|
302
|
+
const validatorModule = (0, core_1.getValidator)(validator);
|
|
303
|
+
return {
|
|
304
|
+
packedValidatorAndId: (0, viem_1.concat)([
|
|
305
|
+
(0, viem_1.pad)((0, viem_1.toHex)(validator.id), {
|
|
306
|
+
size: 12,
|
|
307
|
+
}),
|
|
308
|
+
validatorModule.address,
|
|
309
|
+
]),
|
|
310
|
+
data: signatures[index],
|
|
311
|
+
};
|
|
312
|
+
}),
|
|
313
|
+
]);
|
|
314
|
+
return data;
|
|
315
|
+
}
|
|
316
|
+
default: {
|
|
317
|
+
throw new Error('Unsupported owner kind');
|
|
318
|
+
}
|
|
319
|
+
}
|
|
262
320
|
}
|
|
263
|
-
case '
|
|
264
|
-
|
|
321
|
+
case 'session': {
|
|
322
|
+
const sessionSigners = convertOwnerSetToSignerSet(signers.session.owners);
|
|
323
|
+
return sign(sessionSigners, chain, hash);
|
|
324
|
+
}
|
|
325
|
+
case 'guardians': {
|
|
326
|
+
const signatures = await Promise.all(signers.guardians.map((account) => signEcdsa(account, hash)));
|
|
327
|
+
return (0, viem_1.concat)(signatures);
|
|
265
328
|
}
|
|
266
329
|
}
|
|
267
330
|
}
|
|
@@ -292,3 +355,45 @@ function getAccountProvider(config) {
|
|
|
292
355
|
type: 'nexus',
|
|
293
356
|
};
|
|
294
357
|
}
|
|
358
|
+
function convertOwnerSetToSignerSet(owners) {
|
|
359
|
+
switch (owners.type) {
|
|
360
|
+
case 'ecdsa': {
|
|
361
|
+
return {
|
|
362
|
+
type: 'owner',
|
|
363
|
+
kind: 'ecdsa',
|
|
364
|
+
accounts: owners.accounts,
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
case 'passkey': {
|
|
368
|
+
return {
|
|
369
|
+
type: 'owner',
|
|
370
|
+
kind: 'passkey',
|
|
371
|
+
account: owners.account,
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
case 'multi-factor': {
|
|
375
|
+
return {
|
|
376
|
+
type: 'owner',
|
|
377
|
+
kind: 'multi-factor',
|
|
378
|
+
validators: owners.validators.map((validator, index) => {
|
|
379
|
+
switch (validator.type) {
|
|
380
|
+
case 'ecdsa': {
|
|
381
|
+
return {
|
|
382
|
+
type: 'ecdsa',
|
|
383
|
+
id: index,
|
|
384
|
+
accounts: validator.accounts,
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
case 'passkey': {
|
|
388
|
+
return {
|
|
389
|
+
type: 'passkey',
|
|
390
|
+
id: index,
|
|
391
|
+
account: validator.account,
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
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E,CAAC,SAAS,EAAE,GAAG,KAAK,GAA8B,0BAQvE;AAED,iBAAe,eAAe,CAC5B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,QAAQ,EAChB,gBAAgB,EAAE,OAAO,EACzB,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,iEAWlC;AAED,iBAAe,sBAAsB,CACnC,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,OAAO,EACzB,UAAU,EAAE,iBAAiB,GAAG,IAAI,EACpC,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,iEAyClC;AAED,iBAAe,uBAAuB,CACpC,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,QAAQ,EACnB,gBAAgB,EAAE,OAAO,EACzB,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,iEAalC;AAkGD,OAAO,EACL,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,uBAAuB,GACxB,CAAA"}
|
|
@@ -221,6 +221,8 @@ function getOwners(config) {
|
|
|
221
221
|
return ownerSet.accounts.map((account) => account.address);
|
|
222
222
|
case 'passkey':
|
|
223
223
|
return [NO_SAFE_OWNER_ADDRESS];
|
|
224
|
+
case 'multi-factor':
|
|
225
|
+
return [NO_SAFE_OWNER_ADDRESS];
|
|
224
226
|
}
|
|
225
227
|
}
|
|
226
228
|
function getThreshold(config) {
|
|
@@ -230,5 +232,7 @@ function getThreshold(config) {
|
|
|
230
232
|
return ownerSet.threshold ? BigInt(ownerSet.threshold) : 1n;
|
|
231
233
|
case 'passkey':
|
|
232
234
|
return 1n;
|
|
235
|
+
case 'multi-factor':
|
|
236
|
+
return 1n;
|
|
233
237
|
}
|
|
234
238
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type Address, type Chain } from 'viem';
|
|
1
|
+
import { type Address, type Chain, type Hex } from 'viem';
|
|
2
2
|
import type { RhinestoneAccount } from '..';
|
|
3
3
|
import { type WebauthnCredential } from '../modules/validators/core';
|
|
4
|
-
import type { Call, OwnerSet, ProviderConfig, Recovery } from '../types';
|
|
4
|
+
import type { Call, OwnableValidatorConfig, OwnerSet, ProviderConfig, Recovery, WebauthnValidatorConfig } from '../types';
|
|
5
5
|
import { trustAttester } from './registry';
|
|
6
6
|
import { encodeSmartSessionSignature } from './smart-session';
|
|
7
7
|
declare function setUpRecovery({ rhinestoneAccount, guardians, threshold, }: {
|
|
@@ -25,5 +25,16 @@ declare function disablePasskeys({ rhinestoneAccount, }: {
|
|
|
25
25
|
declare function addOwner(owner: Address): Call;
|
|
26
26
|
declare function removeOwner(prevOwner: Address, ownerToRemove: Address): Call;
|
|
27
27
|
declare function changeThreshold(newThreshold: number): Call;
|
|
28
|
-
|
|
28
|
+
declare function enableMultiFactor({ rhinestoneAccount, validators, threshold, }: {
|
|
29
|
+
rhinestoneAccount: RhinestoneAccount;
|
|
30
|
+
validators: (OwnableValidatorConfig | WebauthnValidatorConfig | null)[];
|
|
31
|
+
threshold?: number;
|
|
32
|
+
}): Call[];
|
|
33
|
+
declare function disableMultiFactor({ rhinestoneAccount, }: {
|
|
34
|
+
rhinestoneAccount: RhinestoneAccount;
|
|
35
|
+
}): Call[];
|
|
36
|
+
declare function changeMultiFactorThreshold(newThreshold: number): Call;
|
|
37
|
+
declare function setSubValidator(id: Hex | number, validator: OwnableValidatorConfig | WebauthnValidatorConfig): Call;
|
|
38
|
+
declare function removeSubValidator(id: Hex | number, validator: OwnableValidatorConfig | WebauthnValidatorConfig): Call;
|
|
39
|
+
export { enableEcdsa, enablePasskeys, disableEcdsa, disablePasskeys, addOwner, removeOwner, changeThreshold, recover, setUpRecovery, encodeSmartSessionSignature, trustAttester, enableMultiFactor, disableMultiFactor, changeMultiFactorThreshold, setSubValidator, removeSubValidator, };
|
|
29
40
|
//# 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,
|
|
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,EAQL,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,aAAa,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAA;AAE7D,iBAAS,aAAa,CAAC,EACrB,iBAAiB,EACjB,SAAS,EACT,SAAa,GACd,EAAE;IACD,iBAAiB,EAAE,iBAAiB,CAAA;CACrC,GAAG,QAAQ,UAIX;AAED,iBAAe,OAAO,CACpB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,QAAQ,EACnB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,IAAI,EAAE,CAAC,CAYjB;AAED,iBAAS,WAAW,CAAC,EACnB,iBAAiB,EACjB,MAAM,EACN,SAAa,GACd,EAAE;IACD,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,MAAM,EAAE,OAAO,EAAE,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,UA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EACf,QAAQ,EACR,WAAW,EACX,eAAe,EACf,OAAO,EACP,aAAa,EACb,2BAA2B,EAC3B,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,0BAA0B,EAC1B,eAAe,EACf,kBAAkB,GACnB,CAAA"}
|
|
@@ -10,6 +10,11 @@ exports.removeOwner = removeOwner;
|
|
|
10
10
|
exports.changeThreshold = changeThreshold;
|
|
11
11
|
exports.recover = recover;
|
|
12
12
|
exports.setUpRecovery = setUpRecovery;
|
|
13
|
+
exports.enableMultiFactor = enableMultiFactor;
|
|
14
|
+
exports.disableMultiFactor = disableMultiFactor;
|
|
15
|
+
exports.changeMultiFactorThreshold = changeMultiFactorThreshold;
|
|
16
|
+
exports.setSubValidator = setSubValidator;
|
|
17
|
+
exports.removeSubValidator = removeSubValidator;
|
|
13
18
|
const viem_1 = require("viem");
|
|
14
19
|
const accounts_1 = require("../accounts");
|
|
15
20
|
const utils_1 = require("../accounts/utils");
|
|
@@ -31,13 +36,13 @@ async function recover(address, newOwners, chain, provider) {
|
|
|
31
36
|
case 'passkey': {
|
|
32
37
|
throw new Error('Passkey ownership recovery is not yet supported');
|
|
33
38
|
}
|
|
39
|
+
case 'multi-factor': {
|
|
40
|
+
throw new Error('Multi-factor ownership recovery is not yet supported');
|
|
41
|
+
}
|
|
34
42
|
}
|
|
35
43
|
}
|
|
36
44
|
function enableEcdsa({ rhinestoneAccount, owners, threshold = 1, }) {
|
|
37
|
-
const module = (0, core_1.getOwnableValidator)(
|
|
38
|
-
threshold,
|
|
39
|
-
owners,
|
|
40
|
-
});
|
|
45
|
+
const module = (0, core_1.getOwnableValidator)(threshold, owners);
|
|
41
46
|
const calls = (0, accounts_1.getModuleInstallationCalls)(rhinestoneAccount.config, module);
|
|
42
47
|
return calls;
|
|
43
48
|
}
|
|
@@ -47,10 +52,7 @@ function enablePasskeys({ rhinestoneAccount, pubKey, authenticatorId, }) {
|
|
|
47
52
|
return calls;
|
|
48
53
|
}
|
|
49
54
|
function disableEcdsa({ rhinestoneAccount, }) {
|
|
50
|
-
const module = (0, core_1.getOwnableValidator)(
|
|
51
|
-
threshold: 1,
|
|
52
|
-
owners: [],
|
|
53
|
-
});
|
|
55
|
+
const module = (0, core_1.getOwnableValidator)(1, []);
|
|
54
56
|
const calls = (0, accounts_1.getModuleUninstallationCalls)(rhinestoneAccount.config, module);
|
|
55
57
|
return calls;
|
|
56
58
|
}
|
|
@@ -215,3 +217,92 @@ async function recoverEcdsaOwnership(address, newOwners, chain, provider) {
|
|
|
215
217
|
}
|
|
216
218
|
return calls;
|
|
217
219
|
}
|
|
220
|
+
function enableMultiFactor({ rhinestoneAccount, validators, threshold = 1, }) {
|
|
221
|
+
const module = (0, core_1.getMultiFactorValidator)(threshold, validators);
|
|
222
|
+
const calls = (0, accounts_1.getModuleInstallationCalls)(rhinestoneAccount.config, module);
|
|
223
|
+
return calls;
|
|
224
|
+
}
|
|
225
|
+
function disableMultiFactor({ rhinestoneAccount, }) {
|
|
226
|
+
const module = (0, core_1.getMultiFactorValidator)(1, []);
|
|
227
|
+
const calls = (0, accounts_1.getModuleUninstallationCalls)(rhinestoneAccount.config, module);
|
|
228
|
+
return calls;
|
|
229
|
+
}
|
|
230
|
+
function changeMultiFactorThreshold(newThreshold) {
|
|
231
|
+
return {
|
|
232
|
+
to: core_1.MULTI_FACTOR_VALIDATOR_ADDRESS,
|
|
233
|
+
value: 0n,
|
|
234
|
+
data: (0, viem_1.encodeFunctionData)({
|
|
235
|
+
abi: [
|
|
236
|
+
{
|
|
237
|
+
inputs: [{ internalType: 'uint8', name: 'threshold', type: 'uint8' }],
|
|
238
|
+
name: 'setThreshold',
|
|
239
|
+
outputs: [],
|
|
240
|
+
stateMutability: 'nonpayable',
|
|
241
|
+
type: 'function',
|
|
242
|
+
},
|
|
243
|
+
],
|
|
244
|
+
functionName: 'setThreshold',
|
|
245
|
+
args: [newThreshold],
|
|
246
|
+
}),
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
function setSubValidator(id, validator) {
|
|
250
|
+
const validatorId = (0, viem_1.padHex)((0, viem_1.toHex)(id), { size: 12 });
|
|
251
|
+
const validatorModule = (0, core_1.getValidator)(validator);
|
|
252
|
+
return {
|
|
253
|
+
to: core_1.MULTI_FACTOR_VALIDATOR_ADDRESS,
|
|
254
|
+
value: 0n,
|
|
255
|
+
data: (0, viem_1.encodeFunctionData)({
|
|
256
|
+
abi: [
|
|
257
|
+
{
|
|
258
|
+
type: 'function',
|
|
259
|
+
name: 'setValidator',
|
|
260
|
+
inputs: [
|
|
261
|
+
{
|
|
262
|
+
type: 'address',
|
|
263
|
+
name: 'validatorAddress',
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
type: 'bytes12',
|
|
267
|
+
name: 'validatorId',
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
type: 'bytes',
|
|
271
|
+
name: 'newValidatorData',
|
|
272
|
+
},
|
|
273
|
+
],
|
|
274
|
+
},
|
|
275
|
+
],
|
|
276
|
+
functionName: 'setValidator',
|
|
277
|
+
args: [validatorModule.address, validatorId, validatorModule.initData],
|
|
278
|
+
}),
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
function removeSubValidator(id, validator) {
|
|
282
|
+
const validatorId = (0, viem_1.padHex)((0, viem_1.toHex)(id), { size: 12 });
|
|
283
|
+
const validatorModule = (0, core_1.getValidator)(validator);
|
|
284
|
+
return {
|
|
285
|
+
to: core_1.MULTI_FACTOR_VALIDATOR_ADDRESS,
|
|
286
|
+
value: 0n,
|
|
287
|
+
data: (0, viem_1.encodeFunctionData)({
|
|
288
|
+
abi: [
|
|
289
|
+
{
|
|
290
|
+
type: 'function',
|
|
291
|
+
name: 'removeValidator',
|
|
292
|
+
inputs: [
|
|
293
|
+
{
|
|
294
|
+
type: 'address',
|
|
295
|
+
name: 'validatorAddress',
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
type: 'bytes12',
|
|
299
|
+
name: 'validatorId',
|
|
300
|
+
},
|
|
301
|
+
],
|
|
302
|
+
},
|
|
303
|
+
],
|
|
304
|
+
functionName: 'removeValidator',
|
|
305
|
+
args: [validatorModule.address, validatorId],
|
|
306
|
+
}),
|
|
307
|
+
};
|
|
308
|
+
}
|
|
@@ -14,14 +14,7 @@ declare class ExecutionError extends Error {
|
|
|
14
14
|
get errorType(): string;
|
|
15
15
|
get traceId(): string;
|
|
16
16
|
}
|
|
17
|
-
declare class
|
|
18
|
-
constructor(params?: {
|
|
19
|
-
context?: any;
|
|
20
|
-
errorType?: string;
|
|
21
|
-
traceId?: string;
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
declare class SourceTargetChainMismatchError extends ExecutionError {
|
|
17
|
+
declare class SourceChainsNotAvailableForUserOpFlowError extends ExecutionError {
|
|
25
18
|
constructor(params?: {
|
|
26
19
|
context?: any;
|
|
27
20
|
errorType?: string;
|
|
@@ -57,5 +50,5 @@ declare class IntentFailedError extends ExecutionError {
|
|
|
57
50
|
});
|
|
58
51
|
}
|
|
59
52
|
declare function isExecutionError(error: Error): error is ExecutionError;
|
|
60
|
-
export { isExecutionError, ExecutionError,
|
|
53
|
+
export { isExecutionError, ExecutionError, SourceChainsNotAvailableForUserOpFlowError, UserOperationRequiredForSmartSessionsError, OrderPathRequiredForIntentsError, SessionChainRequiredError, IntentFailedError, };
|
|
61
54
|
//# sourceMappingURL=error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../execution/error.ts"],"names":[],"mappings":"AAAA,cAAM,cAAe,SAAQ,KAAK;IAChC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;IACjC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAK;IAC9B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAQ;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;gBAErB,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,MAAM,CAAA;Q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;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;CAMF;AAED,cAAM,yBAA0B,SAAQ,cAAc;gBACxC,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;CAOF;AAED,cAAM,iBAAkB,SAAQ,cAAc;gBAChC,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;CAMF;AAED,iBAAS,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,cAAc,CAE/D;AAED,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,0CAA0C,EAC1C,0CAA0C,EAC1C,gCAAgC,EAChC,yBAAyB,EACzB,iBAAiB,GAClB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IntentFailedError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.UserOperationRequiredForSmartSessionsError = exports.
|
|
3
|
+
exports.IntentFailedError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.UserOperationRequiredForSmartSessionsError = exports.SourceChainsNotAvailableForUserOpFlowError = exports.ExecutionError = void 0;
|
|
4
4
|
exports.isExecutionError = isExecutionError;
|
|
5
5
|
class ExecutionError extends Error {
|
|
6
6
|
_message;
|
|
@@ -28,24 +28,15 @@ class ExecutionError extends Error {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
exports.ExecutionError = ExecutionError;
|
|
31
|
-
class
|
|
31
|
+
class SourceChainsNotAvailableForUserOpFlowError extends ExecutionError {
|
|
32
32
|
constructor(params) {
|
|
33
33
|
super({
|
|
34
|
-
message: '
|
|
34
|
+
message: "Can't specify the source chains when using user operations",
|
|
35
35
|
...params,
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
exports.
|
|
40
|
-
class SourceTargetChainMismatchError extends ExecutionError {
|
|
41
|
-
constructor(params) {
|
|
42
|
-
super({
|
|
43
|
-
message: 'Source and target chain must be the same when using user operations',
|
|
44
|
-
...params,
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
exports.SourceTargetChainMismatchError = SourceTargetChainMismatchError;
|
|
39
|
+
exports.SourceChainsNotAvailableForUserOpFlowError = SourceChainsNotAvailableForUserOpFlowError;
|
|
49
40
|
class UserOperationRequiredForSmartSessionsError extends ExecutionError {
|
|
50
41
|
constructor(params) {
|
|
51
42
|
super({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Address, type Chain } from 'viem';
|
|
2
2
|
import type { IntentOpStatus } from '../orchestrator';
|
|
3
3
|
import type { RhinestoneAccountConfig, Transaction } from '../types';
|
|
4
|
-
import { ExecutionError, IntentFailedError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError,
|
|
4
|
+
import { ExecutionError, IntentFailedError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SourceChainsNotAvailableForUserOpFlowError, UserOperationRequiredForSmartSessionsError } from './error';
|
|
5
5
|
import type { IntentData, TransactionResult } from './utils';
|
|
6
6
|
declare function sendTransaction(config: RhinestoneAccountConfig, transaction: Transaction): Promise<TransactionResult>;
|
|
7
7
|
declare function waitForExecution(config: RhinestoneAccountConfig, result: TransactionResult, acceptsPreconfirmations: boolean): Promise<IntentOpStatus | {
|
|
@@ -19,7 +19,6 @@ declare function waitForExecution(config: RhinestoneAccountConfig, result: Trans
|
|
|
19
19
|
}>;
|
|
20
20
|
declare function getMaxSpendableAmount(config: RhinestoneAccountConfig, chain: Chain, tokenAddress: Address, gasUnits: bigint): Promise<bigint>;
|
|
21
21
|
declare function getPortfolio(config: RhinestoneAccountConfig, onTestnets: boolean): Promise<import("../orchestrator").Portfolio>;
|
|
22
|
-
|
|
23
|
-
export { sendTransaction, waitForExecution, getMaxSpendableAmount, getPortfolio, deposit, isExecutionError, IntentFailedError, ExecutionError, SourceChainRequiredForSmartSessionsError, SourceTargetChainMismatchError, UserOperationRequiredForSmartSessionsError, OrderPathRequiredForIntentsError, SessionChainRequiredError, };
|
|
22
|
+
export { sendTransaction, waitForExecution, getMaxSpendableAmount, getPortfolio, isExecutionError, IntentFailedError, ExecutionError, SourceChainsNotAvailableForUserOpFlowError, UserOperationRequiredForSmartSessionsError, OrderPathRequiredForIntentsError, SessionChainRequiredError, };
|
|
24
23
|
export type { IntentData, TransactionResult };
|
|
25
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../execution/index.ts"],"names":[],"mappings":"AAAA,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;AAY5D,iBAAe,eAAe,CAC5B,MAAM,EAAE,uBAAuB,EAC/B,WAAW,EAAE,WAAW,8BAyBzB;AA0HD,iBAAe,gBAAgB,CAC7B,MAAM,EAAE,uBAAuB,EAC/B,MAAM,EAAE,iBAAiB,EACzB,uBAAuB,EAAE,OAAO;;;;;;;;;;;;GA2CjC;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,CASjB;AAED,iBAAe,YAAY,CACzB,MAAM,EAAE,uBAAuB,EAC/B,UAAU,EAAE,OAAO,gDAMpB;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"}
|