@rhinestone/sdk 1.0.0-alpha.25 → 1.0.0-alpha.27
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/error.d.ts +12 -5
- package/dist/src/accounts/error.d.ts.map +1 -1
- package/dist/src/accounts/error.js +19 -10
- package/dist/src/accounts/index.d.ts +11 -4
- package/dist/src/accounts/index.d.ts.map +1 -1
- package/dist/src/accounts/index.js +119 -40
- package/dist/src/accounts/index.test.js +2 -2
- package/dist/src/accounts/kernel.d.ts +1 -1
- package/dist/src/accounts/kernel.d.ts.map +1 -1
- package/dist/src/accounts/kernel.js +29 -1
- package/dist/src/accounts/kernel.test.js +37 -4
- package/dist/src/accounts/nexus.d.ts +4 -3
- package/dist/src/accounts/nexus.d.ts.map +1 -1
- package/dist/src/accounts/nexus.js +82 -14
- package/dist/src/accounts/nexus.test.js +35 -2
- package/dist/src/accounts/safe.d.ts.map +1 -1
- package/dist/src/accounts/safe.js +79 -55
- package/dist/src/accounts/safe.test.js +35 -2
- package/dist/src/accounts/signing/common.d.ts +1 -1
- package/dist/src/accounts/signing/common.d.ts.map +1 -1
- package/dist/src/accounts/signing/common.js +14 -13
- package/dist/src/accounts/signing/message.js +3 -3
- package/dist/src/accounts/signing/passkeys.d.ts +8 -1
- package/dist/src/accounts/signing/passkeys.d.ts.map +1 -1
- package/dist/src/accounts/signing/passkeys.js +35 -0
- package/dist/src/accounts/signing/passkeys.test.js +15 -0
- package/dist/src/accounts/walletClient.d.ts.map +1 -1
- package/dist/src/accounts/walletClient.js +2 -1
- package/dist/src/actions/index.d.ts +30 -2
- package/dist/src/actions/index.d.ts.map +1 -1
- package/dist/src/actions/index.js +37 -6
- package/dist/src/actions/index.test.js +11 -11
- package/dist/src/execution/error.d.ts +8 -1
- package/dist/src/execution/error.d.ts.map +1 -1
- package/dist/src/execution/error.js +10 -1
- package/dist/src/execution/index.d.ts +12 -3
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +25 -17
- 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 +24 -6
- package/dist/src/index.d.ts +6 -5
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +19 -3
- package/dist/src/modules/common.d.ts +10 -4
- package/dist/src/modules/common.d.ts.map +1 -1
- package/dist/src/modules/common.js +22 -1
- package/dist/src/modules/index.d.ts +2 -1
- package/dist/src/modules/index.d.ts.map +1 -1
- package/dist/src/modules/index.js +16 -13
- package/dist/src/modules/index.test.js +8 -7
- package/dist/src/modules/validators/core.d.ts +4 -3
- package/dist/src/modules/validators/core.d.ts.map +1 -1
- package/dist/src/modules/validators/core.js +24 -14
- package/dist/src/modules/validators/core.test.js +4 -4
- package/dist/src/orchestrator/client.js +6 -6
- package/dist/src/orchestrator/registry.d.ts.map +1 -1
- package/dist/src/orchestrator/registry.js +11 -10
- package/dist/src/orchestrator/registry.test.js +4 -4
- package/dist/src/types.d.ts +30 -20
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/src/accounts/custom.d.ts +0 -18
- package/dist/src/accounts/custom.d.ts.map +0 -1
- package/dist/src/accounts/custom.js +0 -121
- package/dist/src/accounts/custom.test.d.ts +0 -2
- package/dist/src/accounts/custom.test.d.ts.map +0 -1
- package/dist/src/accounts/custom.test.js +0 -64
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.UserOperationRequiredForSmartSessionsError = exports.SourceChainsNotAvailableForUserOpFlowError = exports.SimulationNotSupportedForUserOpFlowError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.IntentFailedError = exports.ExecutionError = exports.isExecutionError = void 0;
|
|
4
4
|
exports.sendTransaction = sendTransaction;
|
|
5
|
+
exports.sendTransactionInternal = sendTransactionInternal;
|
|
5
6
|
exports.waitForExecution = waitForExecution;
|
|
6
7
|
exports.getMaxSpendableAmount = getMaxSpendableAmount;
|
|
7
8
|
exports.getPortfolio = getPortfolio;
|
|
@@ -17,43 +18,50 @@ Object.defineProperty(exports, "IntentFailedError", { enumerable: true, get: fun
|
|
|
17
18
|
Object.defineProperty(exports, "isExecutionError", { enumerable: true, get: function () { return error_1.isExecutionError; } });
|
|
18
19
|
Object.defineProperty(exports, "OrderPathRequiredForIntentsError", { enumerable: true, get: function () { return error_1.OrderPathRequiredForIntentsError; } });
|
|
19
20
|
Object.defineProperty(exports, "SessionChainRequiredError", { enumerable: true, get: function () { return error_1.SessionChainRequiredError; } });
|
|
21
|
+
Object.defineProperty(exports, "SimulationNotSupportedForUserOpFlowError", { enumerable: true, get: function () { return error_1.SimulationNotSupportedForUserOpFlowError; } });
|
|
20
22
|
Object.defineProperty(exports, "SourceChainsNotAvailableForUserOpFlowError", { enumerable: true, get: function () { return error_1.SourceChainsNotAvailableForUserOpFlowError; } });
|
|
21
23
|
Object.defineProperty(exports, "UserOperationRequiredForSmartSessionsError", { enumerable: true, get: function () { return error_1.UserOperationRequiredForSmartSessionsError; } });
|
|
22
24
|
const smart_session_1 = require("./smart-session");
|
|
23
25
|
const utils_2 = require("./utils");
|
|
24
26
|
const POLLING_INTERVAL = 500;
|
|
25
27
|
async function sendTransaction(config, transaction) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
const sourceChains = 'chain' in transaction
|
|
29
|
+
? [transaction.chain]
|
|
30
|
+
: transaction.sourceChains || [];
|
|
31
|
+
const targetChain = 'chain' in transaction ? transaction.chain : transaction.targetChain;
|
|
32
|
+
const { calls, gasLimit, tokenRequests, signers, sponsored, settlementLayers, } = transaction;
|
|
33
|
+
return await sendTransactionInternal(config, sourceChains, targetChain, calls, {
|
|
34
|
+
gasLimit,
|
|
35
|
+
initialTokenRequests: tokenRequests,
|
|
36
|
+
signers,
|
|
37
|
+
sponsored,
|
|
38
|
+
settlementLayers,
|
|
39
|
+
});
|
|
34
40
|
}
|
|
35
|
-
async function sendTransactionInternal(config, sourceChains, targetChain, callInputs,
|
|
41
|
+
async function sendTransactionInternal(config, sourceChains, targetChain, callInputs, options) {
|
|
36
42
|
const accountAddress = (0, accounts_1.getAddress)(config);
|
|
37
43
|
// Across requires passing some value to repay the solvers
|
|
38
|
-
const tokenRequests = !initialTokenRequests || initialTokenRequests.length === 0
|
|
44
|
+
const tokenRequests = !options.initialTokenRequests || options.initialTokenRequests.length === 0
|
|
39
45
|
? [
|
|
40
46
|
{
|
|
41
47
|
address: viem_1.zeroAddress,
|
|
42
48
|
amount: 1n,
|
|
43
49
|
},
|
|
44
50
|
]
|
|
45
|
-
: initialTokenRequests;
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
: options.initialTokenRequests;
|
|
52
|
+
const sendAsUserOp = options.asUserOp ||
|
|
53
|
+
options.signers?.type === 'guardians' ||
|
|
54
|
+
options.signers?.type === 'session';
|
|
55
|
+
if (sendAsUserOp) {
|
|
56
|
+
const withSession = options.signers?.type === 'session' ? options.signers.session : null;
|
|
49
57
|
if (withSession) {
|
|
50
58
|
await (0, smart_session_1.enableSmartSession)(targetChain, config, withSession);
|
|
51
59
|
}
|
|
52
60
|
// Smart sessions require a UserOp flow
|
|
53
|
-
return await sendTransactionAsUserOp(config, targetChain, callInputs, signers);
|
|
61
|
+
return await sendTransactionAsUserOp(config, targetChain, callInputs, options.signers);
|
|
54
62
|
}
|
|
55
63
|
else {
|
|
56
|
-
return await sendTransactionAsIntent(config, sourceChains, targetChain, callInputs, gasLimit, tokenRequests, accountAddress, signers, sponsored, settlementLayers);
|
|
64
|
+
return await sendTransactionAsIntent(config, sourceChains, targetChain, callInputs, options.gasLimit, tokenRequests, accountAddress, options.signers, options.sponsored, options.settlementLayers);
|
|
57
65
|
}
|
|
58
66
|
}
|
|
59
67
|
async function sendTransactionAsUserOp(config, chain, callInputs, signers) {
|
|
@@ -42,7 +42,7 @@ declare function signIntent(config: RhinestoneAccountConfig, targetChain: Chain,
|
|
|
42
42
|
declare function getOrchestratorByChain(chainId: number, apiKey: string | undefined, orchestratorUrl?: string): import("../orchestrator").Orchestrator;
|
|
43
43
|
declare function submitIntentInternal(config: RhinestoneAccountConfig, sourceChains: Chain[] | undefined, targetChain: Chain, intentOp: IntentOp, signature: Hex, authorizations: SignedAuthorizationList): Promise<TransactionResult>;
|
|
44
44
|
declare function simulateIntentInternal(config: RhinestoneAccountConfig, _sourceChains: Chain[] | undefined, targetChain: Chain, intentOp: IntentOp, signature: Hex, authorizations: SignedAuthorizationList): Promise<import("../orchestrator").IntentResult>;
|
|
45
|
-
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
|
|
45
|
+
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>;
|
|
46
46
|
declare function parseCalls(calls: CallInput[], chainId: number): Call[];
|
|
47
47
|
export { prepareTransaction, signTransaction, signAuthorizations, signAuthorizationsInternal, signMessage, signTypedData, submitTransaction, simulateTransaction, getOrchestratorByChain, signIntent, prepareTransactionAsIntent, submitIntentInternal, simulateIntentInternal, getValidatorAccount, parseCalls, };
|
|
48
48
|
export type { IntentData, TransactionResult, PreparedTransactionData, SignedTransactionData, };
|
|
@@ -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,K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AAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,UAAU,EACV,0BAA0B,EAC1B,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,UAAU,GACX,CAAA;AACD,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,GACtB,CAAA"}
|
|
@@ -159,7 +159,7 @@ async function simulateTransaction(config, signedTransaction, authorizations) {
|
|
|
159
159
|
const { sourceChains, targetChain } = getTransactionParams(transaction);
|
|
160
160
|
const asUserOp = data.type === 'userop';
|
|
161
161
|
if (asUserOp) {
|
|
162
|
-
throw new
|
|
162
|
+
throw new error_1.SimulationNotSupportedForUserOpFlowError();
|
|
163
163
|
}
|
|
164
164
|
else {
|
|
165
165
|
const intentOp = data.intentRoute.intentOp;
|
|
@@ -232,7 +232,7 @@ async function prepareTransactionAsIntent(config, sourceChains, targetChain, cal
|
|
|
232
232
|
chainIds: sourceChains.map((chain) => chain.id),
|
|
233
233
|
}
|
|
234
234
|
: undefined;
|
|
235
|
-
const { setupOps, delegations } = await getSetupOperationsAndDelegations(config, accountAddress, eip7702InitSignature);
|
|
235
|
+
const { setupOps, delegations } = await getSetupOperationsAndDelegations(config, targetChain, accountAddress, eip7702InitSignature);
|
|
236
236
|
const metaIntent = {
|
|
237
237
|
destinationChainId: targetChain.id,
|
|
238
238
|
tokenTransfers: tokenRequests.map((tokenRequest) => ({
|
|
@@ -272,11 +272,23 @@ async function signIntent(config, targetChain, intentOp, signers) {
|
|
|
272
272
|
}
|
|
273
273
|
const ownerValidator = (0, validators_1.getOwnerValidator)(config);
|
|
274
274
|
const isRoot = validator.address === ownerValidator.address;
|
|
275
|
+
const signature = await getIntentSignature(config, intentOp, signers, targetChain, validator, isRoot);
|
|
276
|
+
return signature;
|
|
277
|
+
}
|
|
278
|
+
async function getIntentSignature(config, intentOp, signers, targetChain, validator, isRoot) {
|
|
275
279
|
const typedData = (0, compact_1.getIntentData)(intentOp);
|
|
276
|
-
|
|
280
|
+
if ((0, core_1.supportsEip712)(validator)) {
|
|
281
|
+
const signature = await (0, accounts_1.getTypedDataPackedSignature)(config, signers, targetChain, {
|
|
282
|
+
address: validator.address,
|
|
283
|
+
isRoot,
|
|
284
|
+
}, typedData);
|
|
285
|
+
return signature;
|
|
286
|
+
}
|
|
287
|
+
const hash = (0, viem_1.hashTypedData)(typedData);
|
|
288
|
+
const signature = await (0, accounts_1.getPackedSignature)(config, signers, targetChain, {
|
|
277
289
|
address: validator.address,
|
|
278
290
|
isRoot,
|
|
279
|
-
},
|
|
291
|
+
}, hash);
|
|
280
292
|
return signature;
|
|
281
293
|
}
|
|
282
294
|
async function signUserOp(config, chain, signers, userOp) {
|
|
@@ -384,7 +396,7 @@ async function simulateIntentInternal(config, _sourceChains, targetChain, intent
|
|
|
384
396
|
}
|
|
385
397
|
async function getValidatorAccount(config, signers, publicClient, chain) {
|
|
386
398
|
if (!signers) {
|
|
387
|
-
return
|
|
399
|
+
return (0, accounts_1.getSmartAccount)(config, publicClient, chain);
|
|
388
400
|
}
|
|
389
401
|
// Owners
|
|
390
402
|
const withOwner = signers.type === 'owner' ? signers : null;
|
|
@@ -445,7 +457,7 @@ function parseCalls(calls, chainId) {
|
|
|
445
457
|
to: (0, registry_1.resolveTokenAddress)(call.to, chainId),
|
|
446
458
|
}));
|
|
447
459
|
}
|
|
448
|
-
async function getSetupOperationsAndDelegations(config, accountAddress, eip7702InitSignature) {
|
|
460
|
+
async function getSetupOperationsAndDelegations(config, chain, accountAddress, eip7702InitSignature) {
|
|
449
461
|
const initCode = (0, accounts_1.getInitCode)(config);
|
|
450
462
|
if (config.eoa) {
|
|
451
463
|
// EIP-7702 initialization is only needed for EOA accounts
|
|
@@ -468,6 +480,12 @@ async function getSetupOperationsAndDelegations(config, accountAddress, eip7702I
|
|
|
468
480
|
};
|
|
469
481
|
}
|
|
470
482
|
else if (initCode) {
|
|
483
|
+
const isAccountDeployed = await (0, accounts_1.isDeployed)(config, chain);
|
|
484
|
+
if (isAccountDeployed) {
|
|
485
|
+
return {
|
|
486
|
+
setupOps: [],
|
|
487
|
+
};
|
|
488
|
+
}
|
|
471
489
|
// Contract account with init code
|
|
472
490
|
return {
|
|
473
491
|
setupOps: [
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import type { Address, Chain, HashTypedDataParameters, Hex, SignableMessage, SignedAuthorizationList, TypedData } from 'viem';
|
|
2
2
|
import type { UserOperationReceipt } from 'viem/account-abstraction';
|
|
3
|
-
import { AccountError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, isAccountError, SigningNotSupportedForAccountError,
|
|
3
|
+
import { AccountConfigurationNotSupportedError, AccountError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, isAccountError, SigningNotSupportedForAccountError, SmartSessionsNotEnabledError, WalletClientNoConnectedAccountError } from './accounts';
|
|
4
4
|
import { walletClientToAccount } from './accounts/walletClient';
|
|
5
|
-
import { addOwner, addPasskeyOwner, changeMultiFactorThreshold, changePasskeyThreshold, changeThreshold, disableEcdsa, disableMultiFactor, disablePasskeys, enableEcdsa, enableMultiFactor, enablePasskeys, encodeSmartSessionSignature, recover, recoverEcdsaOwnership, recoverPasskeyOwnership, removeOwner, removePasskeyOwner, removeSubValidator, setSubValidator, setUpRecovery } from './actions';
|
|
6
|
-
import { ExecutionError, IntentFailedError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SourceChainsNotAvailableForUserOpFlowError, type TransactionResult, UserOperationRequiredForSmartSessionsError } from './execution';
|
|
5
|
+
import { addOwner, addPasskeyOwner, changeMultiFactorThreshold, changePasskeyThreshold, changeThreshold, disableEcdsa, disableMultiFactor, disablePasskeys, enableEcdsa, enableMultiFactor, enablePasskeys, encodeSmartSessionSignature, installModule, recover, recoverEcdsaOwnership, recoverPasskeyOwnership, removeOwner, removePasskeyOwner, removeSubValidator, setSubValidator, setUpRecovery, uninstallModule } from './actions';
|
|
6
|
+
import { ExecutionError, IntentFailedError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SimulationNotSupportedForUserOpFlowError, SourceChainsNotAvailableForUserOpFlowError, type TransactionResult, 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
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;
|
|
13
|
-
deploy: (chain: Chain, session?: Session) => Promise<
|
|
13
|
+
deploy: (chain: Chain, session?: Session) => Promise<boolean>;
|
|
14
|
+
setup: (chain: Chain) => Promise<boolean>;
|
|
14
15
|
signEip7702InitData: () => Promise<Hex>;
|
|
15
16
|
prepareTransaction: (transaction: Transaction) => Promise<PreparedTransactionData>;
|
|
16
17
|
signTransaction: (preparedTransaction: PreparedTransactionData) => Promise<SignedTransactionData>;
|
|
@@ -38,6 +39,6 @@ interface RhinestoneAccount {
|
|
|
38
39
|
* @returns account
|
|
39
40
|
*/
|
|
40
41
|
declare function createRhinestoneAccount(config: RhinestoneAccountConfig): Promise<RhinestoneAccount>;
|
|
41
|
-
export { createRhinestoneAccount, walletClientToAccount, 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,
|
|
42
|
+
export { createRhinestoneAccount, walletClientToAccount, addOwner, addPasskeyOwner, changeMultiFactorThreshold, changeThreshold, changePasskeyThreshold, disableEcdsa, disableMultiFactor, disablePasskeys, enableEcdsa, enableMultiFactor, enablePasskeys, encodeSmartSessionSignature, installModule, recover, recoverEcdsaOwnership, recoverPasskeyOwnership, removeOwner, removePasskeyOwner, removeSubValidator, setSubValidator, setUpRecovery, uninstallModule, isAccountError, AccountError, AccountConfigurationNotSupportedError, Eip7702AccountMustHaveEoaError, ExistingEip7702AccountsNotSupportedError, FactoryArgsNotAvailableError, SmartSessionsNotEnabledError, SigningNotSupportedForAccountError, Eip7702NotSupportedForAccountError, WalletClientNoConnectedAccountError, isExecutionError, ExecutionError, IntentFailedError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SimulationNotSupportedForUserOpFlowError, SourceChainsNotAvailableForUserOpFlowError, UserOperationRequiredForSmartSessionsError, isOrchestratorError, AuthenticationRequiredError, InsufficientBalanceError, InvalidApiKeyError, InvalidIntentSignatureError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, IntentNotFoundError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError, getSupportedTokens, getTokenAddress, };
|
|
42
43
|
export type { RhinestoneAccount, Session, Call, IntentData, PreparedTransactionData, SignedTransactionData, TransactionResult, IntentCost, IntentInput, IntentOp, IntentOpStatus, IntentResult, IntentRoute, SettlementSystem, SignedIntentOp, Portfolio, };
|
|
43
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,
|
|
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,qCAAqC,EACrC,YAAY,EAGZ,8BAA8B,EAC9B,kCAAkC,EAClC,wCAAwC,EACxC,4BAA4B,EAE5B,cAAc,EACd,kCAAkC,EAClC,4BAA4B,EAG5B,mCAAmC,EACpC,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EACL,QAAQ,EACR,eAAe,EACf,0BAA0B,EAC1B,sBAAsB,EACtB,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,2BAA2B,EAC3B,aAAa,EACb,OAAO,EACP,qBAAqB,EACrB,uBAAuB,EACvB,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,eAAe,EAChB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,cAAc,EAGd,iBAAiB,EACjB,gBAAgB,EACh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,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,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.getTokenAddress = exports.getSupportedTokens = void 0;
|
|
3
|
+
exports.IntentNotFoundError = exports.OrchestratorError = exports.OnlyOneTargetTokenAmountCanBeUnsetError = exports.NoPathFoundError = exports.InvalidIntentSignatureError = exports.InvalidApiKeyError = exports.InsufficientBalanceError = exports.AuthenticationRequiredError = exports.isOrchestratorError = exports.UserOperationRequiredForSmartSessionsError = exports.SourceChainsNotAvailableForUserOpFlowError = exports.SimulationNotSupportedForUserOpFlowError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.IntentFailedError = exports.ExecutionError = exports.isExecutionError = exports.WalletClientNoConnectedAccountError = exports.Eip7702NotSupportedForAccountError = exports.SigningNotSupportedForAccountError = exports.SmartSessionsNotEnabledError = exports.FactoryArgsNotAvailableError = exports.ExistingEip7702AccountsNotSupportedError = exports.Eip7702AccountMustHaveEoaError = exports.AccountConfigurationNotSupportedError = exports.AccountError = exports.isAccountError = exports.uninstallModule = exports.setUpRecovery = exports.setSubValidator = exports.removeSubValidator = exports.removePasskeyOwner = exports.removeOwner = exports.recoverPasskeyOwnership = exports.recoverEcdsaOwnership = exports.recover = exports.installModule = exports.encodeSmartSessionSignature = exports.enablePasskeys = exports.enableMultiFactor = exports.enableEcdsa = exports.disablePasskeys = exports.disableMultiFactor = exports.disableEcdsa = exports.changePasskeyThreshold = exports.changeThreshold = exports.changeMultiFactorThreshold = exports.addPasskeyOwner = exports.addOwner = exports.walletClientToAccount = void 0;
|
|
4
|
+
exports.getTokenAddress = exports.getSupportedTokens = exports.UnsupportedTokenError = exports.UnsupportedChainIdError = exports.UnsupportedChainError = exports.TokenNotSupportedError = void 0;
|
|
5
5
|
exports.createRhinestoneAccount = createRhinestoneAccount;
|
|
6
6
|
const accounts_1 = require("./accounts");
|
|
7
|
+
Object.defineProperty(exports, "AccountConfigurationNotSupportedError", { enumerable: true, get: function () { return accounts_1.AccountConfigurationNotSupportedError; } });
|
|
7
8
|
Object.defineProperty(exports, "AccountError", { enumerable: true, get: function () { return accounts_1.AccountError; } });
|
|
8
9
|
Object.defineProperty(exports, "Eip7702AccountMustHaveEoaError", { enumerable: true, get: function () { return accounts_1.Eip7702AccountMustHaveEoaError; } });
|
|
9
10
|
Object.defineProperty(exports, "Eip7702NotSupportedForAccountError", { enumerable: true, get: function () { return accounts_1.Eip7702NotSupportedForAccountError; } });
|
|
@@ -11,8 +12,8 @@ Object.defineProperty(exports, "ExistingEip7702AccountsNotSupportedError", { enu
|
|
|
11
12
|
Object.defineProperty(exports, "FactoryArgsNotAvailableError", { enumerable: true, get: function () { return accounts_1.FactoryArgsNotAvailableError; } });
|
|
12
13
|
Object.defineProperty(exports, "isAccountError", { enumerable: true, get: function () { return accounts_1.isAccountError; } });
|
|
13
14
|
Object.defineProperty(exports, "SigningNotSupportedForAccountError", { enumerable: true, get: function () { return accounts_1.SigningNotSupportedForAccountError; } });
|
|
14
|
-
Object.defineProperty(exports, "SignMessageNotSupportedByAccountError", { enumerable: true, get: function () { return accounts_1.SignMessageNotSupportedByAccountError; } });
|
|
15
15
|
Object.defineProperty(exports, "SmartSessionsNotEnabledError", { enumerable: true, get: function () { return accounts_1.SmartSessionsNotEnabledError; } });
|
|
16
|
+
Object.defineProperty(exports, "WalletClientNoConnectedAccountError", { enumerable: true, get: function () { return accounts_1.WalletClientNoConnectedAccountError; } });
|
|
16
17
|
const walletClient_1 = require("./accounts/walletClient");
|
|
17
18
|
Object.defineProperty(exports, "walletClientToAccount", { enumerable: true, get: function () { return walletClient_1.walletClientToAccount; } });
|
|
18
19
|
const actions_1 = require("./actions");
|
|
@@ -28,6 +29,7 @@ Object.defineProperty(exports, "enableEcdsa", { enumerable: true, get: function
|
|
|
28
29
|
Object.defineProperty(exports, "enableMultiFactor", { enumerable: true, get: function () { return actions_1.enableMultiFactor; } });
|
|
29
30
|
Object.defineProperty(exports, "enablePasskeys", { enumerable: true, get: function () { return actions_1.enablePasskeys; } });
|
|
30
31
|
Object.defineProperty(exports, "encodeSmartSessionSignature", { enumerable: true, get: function () { return actions_1.encodeSmartSessionSignature; } });
|
|
32
|
+
Object.defineProperty(exports, "installModule", { enumerable: true, get: function () { return actions_1.installModule; } });
|
|
31
33
|
Object.defineProperty(exports, "recover", { enumerable: true, get: function () { return actions_1.recover; } });
|
|
32
34
|
Object.defineProperty(exports, "recoverEcdsaOwnership", { enumerable: true, get: function () { return actions_1.recoverEcdsaOwnership; } });
|
|
33
35
|
Object.defineProperty(exports, "recoverPasskeyOwnership", { enumerable: true, get: function () { return actions_1.recoverPasskeyOwnership; } });
|
|
@@ -36,12 +38,14 @@ Object.defineProperty(exports, "removePasskeyOwner", { enumerable: true, get: fu
|
|
|
36
38
|
Object.defineProperty(exports, "removeSubValidator", { enumerable: true, get: function () { return actions_1.removeSubValidator; } });
|
|
37
39
|
Object.defineProperty(exports, "setSubValidator", { enumerable: true, get: function () { return actions_1.setSubValidator; } });
|
|
38
40
|
Object.defineProperty(exports, "setUpRecovery", { enumerable: true, get: function () { return actions_1.setUpRecovery; } });
|
|
41
|
+
Object.defineProperty(exports, "uninstallModule", { enumerable: true, get: function () { return actions_1.uninstallModule; } });
|
|
39
42
|
const execution_1 = require("./execution");
|
|
40
43
|
Object.defineProperty(exports, "ExecutionError", { enumerable: true, get: function () { return execution_1.ExecutionError; } });
|
|
41
44
|
Object.defineProperty(exports, "IntentFailedError", { enumerable: true, get: function () { return execution_1.IntentFailedError; } });
|
|
42
45
|
Object.defineProperty(exports, "isExecutionError", { enumerable: true, get: function () { return execution_1.isExecutionError; } });
|
|
43
46
|
Object.defineProperty(exports, "OrderPathRequiredForIntentsError", { enumerable: true, get: function () { return execution_1.OrderPathRequiredForIntentsError; } });
|
|
44
47
|
Object.defineProperty(exports, "SessionChainRequiredError", { enumerable: true, get: function () { return execution_1.SessionChainRequiredError; } });
|
|
48
|
+
Object.defineProperty(exports, "SimulationNotSupportedForUserOpFlowError", { enumerable: true, get: function () { return execution_1.SimulationNotSupportedForUserOpFlowError; } });
|
|
45
49
|
Object.defineProperty(exports, "SourceChainsNotAvailableForUserOpFlowError", { enumerable: true, get: function () { return execution_1.SourceChainsNotAvailableForUserOpFlowError; } });
|
|
46
50
|
Object.defineProperty(exports, "UserOperationRequiredForSmartSessionsError", { enumerable: true, get: function () { return execution_1.UserOperationRequiredForSmartSessionsError; } });
|
|
47
51
|
const smart_session_1 = require("./execution/smart-session");
|
|
@@ -70,6 +74,9 @@ Object.defineProperty(exports, "UnsupportedTokenError", { enumerable: true, get:
|
|
|
70
74
|
* @returns account
|
|
71
75
|
*/
|
|
72
76
|
async function createRhinestoneAccount(config) {
|
|
77
|
+
// Sanity check for existing (externally created) accounts
|
|
78
|
+
// Ensures we decode the initdata correctly
|
|
79
|
+
(0, accounts_1.checkAddress)(config);
|
|
73
80
|
/**
|
|
74
81
|
* Deploys the account on a given chain
|
|
75
82
|
* @param chain Chain to deploy the account on
|
|
@@ -78,6 +85,14 @@ async function createRhinestoneAccount(config) {
|
|
|
78
85
|
function deploy(chain, session) {
|
|
79
86
|
return (0, accounts_1.deploy)(config, chain, session);
|
|
80
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Sets up the existing account on a given chain
|
|
90
|
+
* by installing the missing modules (if any).
|
|
91
|
+
* @param chain Chain to set up the account on
|
|
92
|
+
*/
|
|
93
|
+
function setup(chain) {
|
|
94
|
+
return (0, accounts_1.setup)(config, chain);
|
|
95
|
+
}
|
|
81
96
|
/**
|
|
82
97
|
* Prepare and sign the EIP-7702 account initialization data
|
|
83
98
|
* @returns init data signature
|
|
@@ -219,6 +234,7 @@ async function createRhinestoneAccount(config) {
|
|
|
219
234
|
return {
|
|
220
235
|
config,
|
|
221
236
|
deploy,
|
|
237
|
+
setup,
|
|
222
238
|
signEip7702InitData,
|
|
223
239
|
prepareTransaction,
|
|
224
240
|
signTransaction,
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import type { Address, Hex } from 'viem';
|
|
2
|
-
type
|
|
2
|
+
type ModuleTypeId = typeof MODULE_TYPE_ID_VALIDATOR | typeof MODULE_TYPE_ID_EXECUTOR | typeof MODULE_TYPE_ID_FALLBACK | typeof MODULE_TYPE_ID_HOOK;
|
|
3
|
+
type ModuleType = typeof MODULE_TYPE_VALIDATOR | typeof MODULE_TYPE_EXECUTOR | typeof MODULE_TYPE_FALLBACK | typeof MODULE_TYPE_HOOK;
|
|
3
4
|
interface Module {
|
|
4
5
|
address: Address;
|
|
5
6
|
initData: Hex;
|
|
6
7
|
deInitData: Hex;
|
|
7
8
|
additionalContext: Hex;
|
|
8
|
-
type:
|
|
9
|
+
type: ModuleTypeId;
|
|
9
10
|
}
|
|
10
11
|
declare const MODULE_TYPE_ID_VALIDATOR = 1n;
|
|
11
12
|
declare const MODULE_TYPE_ID_EXECUTOR = 2n;
|
|
12
13
|
declare const MODULE_TYPE_ID_FALLBACK = 3n;
|
|
13
14
|
declare const MODULE_TYPE_ID_HOOK = 4n;
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
declare const MODULE_TYPE_VALIDATOR = "validator";
|
|
16
|
+
declare const MODULE_TYPE_EXECUTOR = "executor";
|
|
17
|
+
declare const MODULE_TYPE_FALLBACK = "fallback";
|
|
18
|
+
declare const MODULE_TYPE_HOOK = "hook";
|
|
19
|
+
declare function toModuleTypeId(type: ModuleType): ModuleTypeId;
|
|
20
|
+
export { MODULE_TYPE_ID_VALIDATOR, MODULE_TYPE_ID_EXECUTOR, MODULE_TYPE_ID_FALLBACK, MODULE_TYPE_ID_HOOK, MODULE_TYPE_VALIDATOR, MODULE_TYPE_EXECUTOR, MODULE_TYPE_FALLBACK, MODULE_TYPE_HOOK, toModuleTypeId, };
|
|
21
|
+
export type { Module, ModuleType, ModuleTypeId };
|
|
16
22
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../modules/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAExC,KAAK,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../modules/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAExC,KAAK,YAAY,GACb,OAAO,wBAAwB,GAC/B,OAAO,uBAAuB,GAC9B,OAAO,uBAAuB,GAC9B,OAAO,mBAAmB,CAAA;AAE9B,KAAK,UAAU,GACX,OAAO,qBAAqB,GAC5B,OAAO,oBAAoB,GAC3B,OAAO,oBAAoB,GAC3B,OAAO,gBAAgB,CAAA;AAE3B,UAAU,MAAM;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,GAAG,CAAA;IACb,UAAU,EAAE,GAAG,CAAA;IACf,iBAAiB,EAAE,GAAG,CAAA;IACtB,IAAI,EAAE,YAAY,CAAA;CACnB;AAED,QAAA,MAAM,wBAAwB,KAAK,CAAA;AACnC,QAAA,MAAM,uBAAuB,KAAK,CAAA;AAClC,QAAA,MAAM,uBAAuB,KAAK,CAAA;AAClC,QAAA,MAAM,mBAAmB,KAAK,CAAA;AAE9B,QAAA,MAAM,qBAAqB,cAAc,CAAA;AACzC,QAAA,MAAM,oBAAoB,aAAa,CAAA;AACvC,QAAA,MAAM,oBAAoB,aAAa,CAAA;AACvC,QAAA,MAAM,gBAAgB,SAAS,CAAA;AAE/B,iBAAS,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,YAAY,CAWtD;AAED,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,GACf,CAAA;AACD,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MODULE_TYPE_ID_HOOK = exports.MODULE_TYPE_ID_FALLBACK = exports.MODULE_TYPE_ID_EXECUTOR = exports.MODULE_TYPE_ID_VALIDATOR = void 0;
|
|
3
|
+
exports.MODULE_TYPE_HOOK = exports.MODULE_TYPE_FALLBACK = exports.MODULE_TYPE_EXECUTOR = exports.MODULE_TYPE_VALIDATOR = exports.MODULE_TYPE_ID_HOOK = exports.MODULE_TYPE_ID_FALLBACK = exports.MODULE_TYPE_ID_EXECUTOR = exports.MODULE_TYPE_ID_VALIDATOR = void 0;
|
|
4
|
+
exports.toModuleTypeId = toModuleTypeId;
|
|
4
5
|
const MODULE_TYPE_ID_VALIDATOR = 1n;
|
|
5
6
|
exports.MODULE_TYPE_ID_VALIDATOR = MODULE_TYPE_ID_VALIDATOR;
|
|
6
7
|
const MODULE_TYPE_ID_EXECUTOR = 2n;
|
|
@@ -9,3 +10,23 @@ const MODULE_TYPE_ID_FALLBACK = 3n;
|
|
|
9
10
|
exports.MODULE_TYPE_ID_FALLBACK = MODULE_TYPE_ID_FALLBACK;
|
|
10
11
|
const MODULE_TYPE_ID_HOOK = 4n;
|
|
11
12
|
exports.MODULE_TYPE_ID_HOOK = MODULE_TYPE_ID_HOOK;
|
|
13
|
+
const MODULE_TYPE_VALIDATOR = 'validator';
|
|
14
|
+
exports.MODULE_TYPE_VALIDATOR = MODULE_TYPE_VALIDATOR;
|
|
15
|
+
const MODULE_TYPE_EXECUTOR = 'executor';
|
|
16
|
+
exports.MODULE_TYPE_EXECUTOR = MODULE_TYPE_EXECUTOR;
|
|
17
|
+
const MODULE_TYPE_FALLBACK = 'fallback';
|
|
18
|
+
exports.MODULE_TYPE_FALLBACK = MODULE_TYPE_FALLBACK;
|
|
19
|
+
const MODULE_TYPE_HOOK = 'hook';
|
|
20
|
+
exports.MODULE_TYPE_HOOK = MODULE_TYPE_HOOK;
|
|
21
|
+
function toModuleTypeId(type) {
|
|
22
|
+
switch (type) {
|
|
23
|
+
case MODULE_TYPE_VALIDATOR:
|
|
24
|
+
return MODULE_TYPE_ID_VALIDATOR;
|
|
25
|
+
case MODULE_TYPE_EXECUTOR:
|
|
26
|
+
return MODULE_TYPE_ID_EXECUTOR;
|
|
27
|
+
case MODULE_TYPE_FALLBACK:
|
|
28
|
+
return MODULE_TYPE_ID_FALLBACK;
|
|
29
|
+
case MODULE_TYPE_HOOK:
|
|
30
|
+
return MODULE_TYPE_ID_HOOK;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -11,6 +11,7 @@ interface ModeleSetup {
|
|
|
11
11
|
hooks: Module[];
|
|
12
12
|
}
|
|
13
13
|
declare function getSetup(config: RhinestoneAccountConfig): ModeleSetup;
|
|
14
|
+
declare function getIntentExecutor(config: RhinestoneAccountConfig): Module;
|
|
14
15
|
declare function isRip7212SupportedNetwork(chain: Chain): boolean;
|
|
15
|
-
export { HOOK_ADDRESS, getSetup, getOwnerValidator, getOwners, getValidators, isRip7212SupportedNetwork, };
|
|
16
|
+
export { HOOK_ADDRESS, getSetup, getOwnerValidator, getOwners, getIntentExecutor, getValidators, isRip7212SupportedNetwork, };
|
|
16
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,CAiD9D;AAED,iBAAS,iBAAiB,CAAC,MAAM,EAAE,uBAAuB,GAAG,MAAM,CAWlE;AAED,iBAAS,yBAAyB,CAAC,KAAK,EAAE,KAAK,WAW9C;AAED,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,iBAAiB,EACjB,aAAa,EACb,yBAAyB,GAC1B,CAAA"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getValidators = exports.getOwners = exports.getOwnerValidator = exports.HOOK_ADDRESS = void 0;
|
|
4
4
|
exports.getSetup = getSetup;
|
|
5
|
+
exports.getIntentExecutor = getIntentExecutor;
|
|
5
6
|
exports.isRip7212SupportedNetwork = isRip7212SupportedNetwork;
|
|
6
7
|
const viem_1 = require("viem");
|
|
7
8
|
const chains_1 = require("viem/chains");
|
|
@@ -14,7 +15,7 @@ Object.defineProperty(exports, "getValidators", { enumerable: true, get: functio
|
|
|
14
15
|
const validators_1 = require("./validators");
|
|
15
16
|
Object.defineProperty(exports, "getOwnerValidator", { enumerable: true, get: function () { return validators_1.getOwnerValidator; } });
|
|
16
17
|
const core_1 = require("./validators/core");
|
|
17
|
-
const SMART_SESSION_COMPATIBILITY_FALLBACK_ADDRESS = '
|
|
18
|
+
const SMART_SESSION_COMPATIBILITY_FALLBACK_ADDRESS = '0x000000000052e9685932845660777DF43C2dC496';
|
|
18
19
|
function getSetup(config) {
|
|
19
20
|
const ownerValidator = (0, validators_1.getOwnerValidator)(config);
|
|
20
21
|
const smartSessionValidator = (0, validators_1.getSmartSessionValidator)(config);
|
|
@@ -26,18 +27,8 @@ function getSetup(config) {
|
|
|
26
27
|
const socialRecoveryValidator = (0, core_1.getSocialRecoveryValidator)(config.recovery.guardians, config.recovery.threshold);
|
|
27
28
|
validators.push(socialRecoveryValidator);
|
|
28
29
|
}
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
: omni_account_1.INTENT_EXECUTOR_ADDRESS;
|
|
32
|
-
const executors = [
|
|
33
|
-
{
|
|
34
|
-
address: intentExecutorAddress,
|
|
35
|
-
initData: '0x',
|
|
36
|
-
deInitData: '0x',
|
|
37
|
-
additionalContext: '0x',
|
|
38
|
-
type: common_1.MODULE_TYPE_ID_EXECUTOR,
|
|
39
|
-
},
|
|
40
|
-
];
|
|
30
|
+
const intentExecutor = getIntentExecutor(config);
|
|
31
|
+
const executors = [intentExecutor];
|
|
41
32
|
const fallbacks = [];
|
|
42
33
|
// Some accounts (e.g. Safe) need a fallback method to support smart sessions
|
|
43
34
|
if (config.sessions) {
|
|
@@ -63,6 +54,18 @@ function getSetup(config) {
|
|
|
63
54
|
hooks,
|
|
64
55
|
};
|
|
65
56
|
}
|
|
57
|
+
function getIntentExecutor(config) {
|
|
58
|
+
const intentExecutorAddress = config.orchestratorUrl
|
|
59
|
+
? omni_account_1.INTENT_EXECUTOR_ADDRESS_DEV
|
|
60
|
+
: omni_account_1.INTENT_EXECUTOR_ADDRESS;
|
|
61
|
+
return {
|
|
62
|
+
address: intentExecutorAddress,
|
|
63
|
+
initData: '0x',
|
|
64
|
+
deInitData: '0x',
|
|
65
|
+
additionalContext: '0x',
|
|
66
|
+
type: common_1.MODULE_TYPE_ID_EXECUTOR,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
66
69
|
function isRip7212SupportedNetwork(chain) {
|
|
67
70
|
const supportedChains = [
|
|
68
71
|
chains_1.optimism,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const vitest_1 = require("vitest");
|
|
4
4
|
const consts_1 = require("../../test/consts");
|
|
5
|
+
const common_1 = require("./common");
|
|
5
6
|
const index_1 = require("./index");
|
|
6
7
|
(0, vitest_1.describe)('Modules', () => {
|
|
7
8
|
(0, vitest_1.describe)('Setup', () => {
|
|
@@ -15,8 +16,8 @@ const index_1 = require("./index");
|
|
|
15
16
|
},
|
|
16
17
|
};
|
|
17
18
|
const setup = (0, index_1.getSetup)(config);
|
|
18
|
-
(0, vitest_1.expect)(setup.validators[0].address).toBe('
|
|
19
|
-
(0, vitest_1.expect)(setup.validators[0].type).toBe(
|
|
19
|
+
(0, vitest_1.expect)(setup.validators[0].address).toBe('0x000000000013fdb5234e4e3162a810f54d9f7e98');
|
|
20
|
+
(0, vitest_1.expect)(setup.validators[0].type).toBe(common_1.MODULE_TYPE_ID_VALIDATOR);
|
|
20
21
|
});
|
|
21
22
|
(0, vitest_1.test)('should use webauthn validator for passkey owners', () => {
|
|
22
23
|
const config = {
|
|
@@ -28,8 +29,8 @@ const index_1 = require("./index");
|
|
|
28
29
|
};
|
|
29
30
|
const setup = (0, index_1.getSetup)(config);
|
|
30
31
|
(0, vitest_1.expect)(setup.validators).toHaveLength(1);
|
|
31
|
-
(0, vitest_1.expect)(setup.validators[0].address).toBe('
|
|
32
|
-
(0, vitest_1.expect)(setup.validators[0].type).toBe(
|
|
32
|
+
(0, vitest_1.expect)(setup.validators[0].address).toBe('0x0000000000578c4cb0e472a5462da43c495c3f33');
|
|
33
|
+
(0, vitest_1.expect)(setup.validators[0].type).toBe(common_1.MODULE_TYPE_ID_VALIDATOR);
|
|
33
34
|
});
|
|
34
35
|
(0, vitest_1.test)('should use smart session validator when sessions are enabled', () => {
|
|
35
36
|
const config = {
|
|
@@ -54,7 +55,7 @@ const index_1 = require("./index");
|
|
|
54
55
|
if (!smartSessionValidator) {
|
|
55
56
|
return;
|
|
56
57
|
}
|
|
57
|
-
(0, vitest_1.expect)(smartSessionValidator.type).toBe(
|
|
58
|
+
(0, vitest_1.expect)(smartSessionValidator.type).toBe(common_1.MODULE_TYPE_ID_VALIDATOR);
|
|
58
59
|
});
|
|
59
60
|
(0, vitest_1.test)('should use smart session compatibility fallback for safe accounts with sessions', () => {
|
|
60
61
|
const config = {
|
|
@@ -78,12 +79,12 @@ const index_1 = require("./index");
|
|
|
78
79
|
},
|
|
79
80
|
};
|
|
80
81
|
const setup = (0, index_1.getSetup)(config);
|
|
81
|
-
const smartSessionFallback = setup.fallbacks.find((fallback) => fallback.address === '
|
|
82
|
+
const smartSessionFallback = setup.fallbacks.find((fallback) => fallback.address === '0x000000000052e9685932845660777DF43C2dC496');
|
|
82
83
|
(0, vitest_1.expect)(smartSessionFallback).toBeDefined();
|
|
83
84
|
if (!smartSessionFallback) {
|
|
84
85
|
return;
|
|
85
86
|
}
|
|
86
|
-
(0, vitest_1.expect)(smartSessionFallback.type).toBe(
|
|
87
|
+
(0, vitest_1.expect)(smartSessionFallback.type).toBe(common_1.MODULE_TYPE_ID_FALLBACK);
|
|
87
88
|
});
|
|
88
89
|
vitest_1.test.todo('using the omni account should install the necessary modules');
|
|
89
90
|
});
|
|
@@ -13,14 +13,15 @@ interface WebauthnCredential {
|
|
|
13
13
|
declare const OWNABLE_VALIDATOR_ADDRESS: Address;
|
|
14
14
|
declare const WEBAUTHN_VALIDATOR_ADDRESS: Address;
|
|
15
15
|
declare const MULTI_FACTOR_VALIDATOR_ADDRESS: Address;
|
|
16
|
-
declare const
|
|
16
|
+
declare const WEBAUTHN_V0_VALIDATOR_ADDRESS: Address;
|
|
17
17
|
declare function getOwnerValidator(config: RhinestoneAccountConfig): Module;
|
|
18
18
|
declare function getMockSignature(ownerSet: OwnerSet): Hex;
|
|
19
19
|
declare function getValidator(owners: OwnerSet): Module;
|
|
20
20
|
declare function getOwnableValidator(threshold: number, owners: Address[], address?: Address): Module;
|
|
21
|
-
declare function getWebAuthnValidator(threshold: number, webAuthnCredentials: WebauthnCredential[]): Module;
|
|
21
|
+
declare function getWebAuthnValidator(threshold: number, webAuthnCredentials: WebauthnCredential[], address?: Address): Module;
|
|
22
22
|
declare function getMultiFactorValidator(threshold: number, validators: (OwnableValidatorConfig | WebauthnValidatorConfig | null)[]): Module;
|
|
23
23
|
declare function getSocialRecoveryValidator(guardians: Account[], threshold?: number): Module;
|
|
24
|
-
|
|
24
|
+
declare function supportsEip712(validator: Module): boolean;
|
|
25
|
+
export { OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, WEBAUTHN_V0_VALIDATOR_ADDRESS, getOwnerValidator, getOwnableValidator, getWebAuthnValidator, getMultiFactorValidator, getSocialRecoveryValidator, getValidator, getMockSignature, supportsEip712, };
|
|
25
26
|
export type { WebauthnCredential };
|
|
26
27
|
//# sourceMappingURL=core.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../../modules/validators/core.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EAKZ,KAAK,GAAG,EAIT,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EACV,sBAAsB,EACtB,QAAQ,EACR,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAA4B,KAAK,MAAM,EAAE,MAAM,WAAW,CAAA;AAEjE,UAAU,SAAS;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAED,UAAU,kBAAkB;IAC1B,MAAM,EAAE,SAAS,GAAG,GAAG,GAAG,UAAU,CAAA;IACpC,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,QAAA,MAAM,yBAAyB,EAAE,OACa,CAAA;AAC9C,QAAA,MAAM,0BAA0B,EAAE,OACY,CAAA;AAG9C,QAAA,MAAM,8BAA8B,EAAE,OACQ,CAAA;
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../../modules/validators/core.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EAKZ,KAAK,GAAG,EAIT,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EACV,sBA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