@rhinestone/sdk 1.5.0 → 2.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/accounts/error.d.ts +1 -1
- package/dist/src/accounts/error.js +1 -19
- package/dist/src/accounts/index.d.ts +5 -5
- package/dist/src/accounts/index.js +121 -157
- package/dist/src/accounts/json-rpc/index.d.ts +1 -1
- package/dist/src/accounts/json-rpc/index.js +8 -10
- package/dist/src/accounts/json-rpc/providers.d.ts +1 -1
- package/dist/src/accounts/json-rpc/providers.js +4 -7
- package/dist/src/accounts/kernel.d.ts +3 -3
- package/dist/src/accounts/kernel.js +66 -75
- package/dist/src/accounts/nexus.d.ts +3 -3
- package/dist/src/accounts/nexus.js +62 -73
- package/dist/src/accounts/passport.d.ts +3 -3
- package/dist/src/accounts/passport.js +9 -13
- package/dist/src/accounts/safe.d.ts +3 -3
- package/dist/src/accounts/safe.js +54 -63
- package/dist/src/accounts/signing/common.d.ts +2 -2
- package/dist/src/accounts/signing/common.js +30 -36
- package/dist/src/accounts/signing/message.d.ts +2 -2
- package/dist/src/accounts/signing/message.js +10 -12
- package/dist/src/accounts/signing/passkeys.js +11 -17
- package/dist/src/accounts/signing/typedData.d.ts +1 -1
- package/dist/src/accounts/signing/typedData.js +6 -8
- package/dist/src/accounts/startale.d.ts +3 -3
- package/dist/src/accounts/startale.js +37 -47
- package/dist/src/accounts/utils.d.ts +2 -2
- package/dist/src/accounts/utils.js +22 -28
- package/dist/src/accounts/walletClient.js +4 -8
- package/dist/src/actions/compact.d.ts +1 -1
- package/dist/src/actions/compact.js +22 -35
- package/dist/src/actions/deployment.d.ts +1 -1
- package/dist/src/actions/deployment.js +11 -13
- package/dist/src/actions/ecdsa.d.ts +1 -1
- package/dist/src/actions/ecdsa.js +14 -20
- package/dist/src/actions/index.d.ts +2 -2
- package/dist/src/actions/index.js +6 -10
- package/dist/src/actions/mfa.d.ts +1 -1
- package/dist/src/actions/mfa.js +18 -24
- package/dist/src/actions/passkeys.d.ts +2 -2
- package/dist/src/actions/passkeys.js +14 -20
- package/dist/src/actions/recovery.d.ts +1 -1
- package/dist/src/actions/recovery.js +25 -29
- package/dist/src/actions/smart-sessions.d.ts +1 -1
- package/dist/src/actions/smart-sessions.js +8 -12
- package/dist/src/auth/provider.d.ts +1 -1
- package/dist/src/auth/provider.js +1 -4
- package/dist/src/errors/index.d.ts +3 -3
- package/dist/src/errors/index.js +10 -54
- package/dist/src/execution/compact.d.ts +3 -3
- package/dist/src/execution/compact.js +10 -18
- package/dist/src/execution/error.js +1 -11
- package/dist/src/execution/index.d.ts +8 -8
- package/dist/src/execution/index.js +50 -65
- package/dist/src/execution/permit2.d.ts +5 -5
- package/dist/src/execution/permit2.js +8 -13
- package/dist/src/execution/singleChainOps.d.ts +2 -2
- package/dist/src/execution/singleChainOps.js +1 -3
- package/dist/src/execution/types.d.ts +1 -1
- package/dist/src/execution/types.js +1 -2
- package/dist/src/execution/utils.d.ts +4 -4
- package/dist/src/execution/utils.js +133 -156
- package/dist/src/index.d.ts +9 -9
- package/dist/src/index.js +55 -66
- package/dist/src/jwt-server/digest.js +3 -6
- package/dist/src/jwt-server/express.d.ts +1 -1
- package/dist/src/jwt-server/express.d.ts.map +1 -1
- package/dist/src/jwt-server/express.js +6 -7
- package/dist/src/jwt-server/handlers.d.ts +1 -1
- package/dist/src/jwt-server/handlers.js +7 -11
- package/dist/src/jwt-server/index.d.ts +7 -7
- package/dist/src/jwt-server/index.js +6 -17
- package/dist/src/jwt-server/jcs.js +1 -4
- package/dist/src/jwt-server/signer.d.ts +1 -1
- package/dist/src/jwt-server/signer.js +10 -13
- package/dist/src/jwt-server/sponsorship.js +2 -7
- package/dist/src/jwt-server/web.d.ts +1 -1
- package/dist/src/jwt-server/web.js +5 -9
- package/dist/src/modules/abi/smart-session-emissary.js +1 -3
- package/dist/src/modules/abi/smart-sessions.js +1 -4
- package/dist/src/modules/chain-abstraction.js +1 -5
- package/dist/src/modules/common.d.ts +1 -1
- package/dist/src/modules/common.js +1 -13
- package/dist/src/modules/index.d.ts +5 -5
- package/dist/src/modules/index.js +35 -50
- package/dist/src/modules/legacy.d.ts +2 -2
- package/dist/src/modules/legacy.js +11 -14
- package/dist/src/modules/read.d.ts +1 -1
- package/dist/src/modules/read.js +11 -15
- package/dist/src/modules/validators/core.d.ts +2 -2
- package/dist/src/modules/validators/core.js +26 -44
- package/dist/src/modules/validators/index.d.ts +2 -2
- package/dist/src/modules/validators/index.js +3 -19
- package/dist/src/modules/validators/policies/claim/permit2.d.ts +1 -1
- package/dist/src/modules/validators/policies/claim/permit2.js +39 -44
- package/dist/src/modules/validators/policies/claim/types.js +11 -14
- package/dist/src/modules/validators/smart-sessions.d.ts +3 -3
- package/dist/src/modules/validators/smart-sessions.js +65 -94
- package/dist/src/orchestrator/client.d.ts +2 -2
- package/dist/src/orchestrator/client.js +46 -50
- package/dist/src/orchestrator/consts.d.ts +1 -1
- package/dist/src/orchestrator/consts.d.ts.map +1 -1
- package/dist/src/orchestrator/consts.js +2 -8
- package/dist/src/orchestrator/error.js +1 -33
- package/dist/src/orchestrator/index.d.ts +7 -7
- package/dist/src/orchestrator/index.js +7 -56
- package/dist/src/orchestrator/registry.d.ts +2 -2
- package/dist/src/orchestrator/registry.js +19 -33
- package/dist/src/orchestrator/types.js +1 -17
- package/dist/src/orchestrator/utils.js +1 -3
- package/dist/src/types.d.ts +3 -3
- package/dist/src/types.js +1 -2
- package/dist/src/utils/index.d.ts +2 -2
- package/dist/src/utils/index.js +9 -15
- package/package.json +15 -98
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.enableSessionsAbi = void 0;
|
|
4
1
|
const enableSessionsAbi = [
|
|
5
2
|
{
|
|
6
3
|
type: 'function',
|
|
@@ -128,4 +125,4 @@ const enableSessionsAbi = [
|
|
|
128
125
|
stateMutability: 'nonpayable',
|
|
129
126
|
},
|
|
130
127
|
];
|
|
131
|
-
|
|
128
|
+
export { enableSessionsAbi };
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.INTENT_EXECUTOR_ADDRESS_DEV = exports.INTENT_EXECUTOR_ADDRESS = void 0;
|
|
4
1
|
const INTENT_EXECUTOR_ADDRESS = '0x00000000005aD9ce1f5035FD62CA96CEf16AdAAF';
|
|
5
|
-
exports.INTENT_EXECUTOR_ADDRESS = INTENT_EXECUTOR_ADDRESS;
|
|
6
2
|
const INTENT_EXECUTOR_ADDRESS_DEV = '0xbf9b5b917a83f8adac17b0752846d41d8d7b7e17';
|
|
7
|
-
|
|
3
|
+
export { INTENT_EXECUTOR_ADDRESS, INTENT_EXECUTOR_ADDRESS_DEV };
|
|
@@ -1,24 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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;
|
|
5
|
-
exports.getModule = getModule;
|
|
6
1
|
const MODULE_TYPE_ID_VALIDATOR = 1n;
|
|
7
|
-
exports.MODULE_TYPE_ID_VALIDATOR = MODULE_TYPE_ID_VALIDATOR;
|
|
8
2
|
const MODULE_TYPE_ID_EXECUTOR = 2n;
|
|
9
|
-
exports.MODULE_TYPE_ID_EXECUTOR = MODULE_TYPE_ID_EXECUTOR;
|
|
10
3
|
const MODULE_TYPE_ID_FALLBACK = 3n;
|
|
11
|
-
exports.MODULE_TYPE_ID_FALLBACK = MODULE_TYPE_ID_FALLBACK;
|
|
12
4
|
const MODULE_TYPE_ID_HOOK = 4n;
|
|
13
|
-
exports.MODULE_TYPE_ID_HOOK = MODULE_TYPE_ID_HOOK;
|
|
14
5
|
const MODULE_TYPE_VALIDATOR = 'validator';
|
|
15
|
-
exports.MODULE_TYPE_VALIDATOR = MODULE_TYPE_VALIDATOR;
|
|
16
6
|
const MODULE_TYPE_EXECUTOR = 'executor';
|
|
17
|
-
exports.MODULE_TYPE_EXECUTOR = MODULE_TYPE_EXECUTOR;
|
|
18
7
|
const MODULE_TYPE_FALLBACK = 'fallback';
|
|
19
|
-
exports.MODULE_TYPE_FALLBACK = MODULE_TYPE_FALLBACK;
|
|
20
8
|
const MODULE_TYPE_HOOK = 'hook';
|
|
21
|
-
exports.MODULE_TYPE_HOOK = MODULE_TYPE_HOOK;
|
|
22
9
|
function toModuleTypeId(type) {
|
|
23
10
|
switch (type) {
|
|
24
11
|
case MODULE_TYPE_VALIDATOR:
|
|
@@ -40,3 +27,4 @@ function getModule(module) {
|
|
|
40
27
|
additionalContext: module.additionalContext ?? '0x',
|
|
41
28
|
};
|
|
42
29
|
}
|
|
30
|
+
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, getModule, };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type Chain } from 'viem';
|
|
2
|
-
import type { RhinestoneConfig } from '../types';
|
|
3
|
-
import { type ModeleSetup, type Module } from './common';
|
|
4
|
-
import { getExecutors, getOwners, getValidators } from './read';
|
|
5
|
-
import { getOwnerValidator, MULTI_FACTOR_VALIDATOR_ADDRESS, OWNABLE_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS } from './validators';
|
|
6
|
-
import { getSessionDetails, signEnableSession } from './validators/smart-sessions';
|
|
2
|
+
import type { RhinestoneConfig } from '../types.js';
|
|
3
|
+
import { type ModeleSetup, type Module } from './common.js';
|
|
4
|
+
import { getExecutors, getOwners, getValidators } from './read.js';
|
|
5
|
+
import { getOwnerValidator, MULTI_FACTOR_VALIDATOR_ADDRESS, OWNABLE_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS } from './validators/index.js';
|
|
6
|
+
import { getSessionDetails, signEnableSession } from './validators/smart-sessions.js';
|
|
7
7
|
declare function getSetup(config: RhinestoneConfig): ModeleSetup;
|
|
8
8
|
declare function getIntentExecutor(config: RhinestoneConfig): Module;
|
|
9
9
|
declare function isRip7212SupportedNetwork(chain: Chain): boolean;
|
|
@@ -1,37 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const chain_abstraction_1 = require("./chain-abstraction");
|
|
10
|
-
const common_1 = require("./common");
|
|
11
|
-
const read_1 = require("./read");
|
|
12
|
-
Object.defineProperty(exports, "getExecutors", { enumerable: true, get: function () { return read_1.getExecutors; } });
|
|
13
|
-
Object.defineProperty(exports, "getOwners", { enumerable: true, get: function () { return read_1.getOwners; } });
|
|
14
|
-
Object.defineProperty(exports, "getValidators", { enumerable: true, get: function () { return read_1.getValidators; } });
|
|
15
|
-
const validators_1 = require("./validators");
|
|
16
|
-
Object.defineProperty(exports, "getOwnerValidator", { enumerable: true, get: function () { return validators_1.getOwnerValidator; } });
|
|
17
|
-
Object.defineProperty(exports, "MULTI_FACTOR_VALIDATOR_ADDRESS", { enumerable: true, get: function () { return validators_1.MULTI_FACTOR_VALIDATOR_ADDRESS; } });
|
|
18
|
-
Object.defineProperty(exports, "OWNABLE_VALIDATOR_ADDRESS", { enumerable: true, get: function () { return validators_1.OWNABLE_VALIDATOR_ADDRESS; } });
|
|
19
|
-
Object.defineProperty(exports, "SMART_SESSION_EMISSARY_ADDRESS", { enumerable: true, get: function () { return validators_1.SMART_SESSION_EMISSARY_ADDRESS; } });
|
|
20
|
-
Object.defineProperty(exports, "WEBAUTHN_VALIDATOR_ADDRESS", { enumerable: true, get: function () { return validators_1.WEBAUTHN_VALIDATOR_ADDRESS; } });
|
|
21
|
-
const core_1 = require("./validators/core");
|
|
22
|
-
const smart_sessions_1 = require("./validators/smart-sessions");
|
|
23
|
-
Object.defineProperty(exports, "getSessionDetails", { enumerable: true, get: function () { return smart_sessions_1.getSessionDetails; } });
|
|
24
|
-
Object.defineProperty(exports, "signEnableSession", { enumerable: true, get: function () { return smart_sessions_1.signEnableSession; } });
|
|
1
|
+
import { encodeAbiParameters } from 'viem';
|
|
2
|
+
import { arbitrum, arbitrumSepolia, base, baseSepolia, mainnet, optimism, optimismSepolia, polygon, sepolia, soneium, } from 'viem/chains';
|
|
3
|
+
import { INTENT_EXECUTOR_ADDRESS, INTENT_EXECUTOR_ADDRESS_DEV, } from './chain-abstraction.js';
|
|
4
|
+
import { getModule, MODULE_TYPE_EXECUTOR, MODULE_TYPE_FALLBACK, MODULE_TYPE_HOOK, MODULE_TYPE_ID_EXECUTOR, MODULE_TYPE_ID_FALLBACK, MODULE_TYPE_VALIDATOR, } from './common.js';
|
|
5
|
+
import { getExecutors, getOwners, getValidators } from './read.js';
|
|
6
|
+
import { getOwnerValidator, getSmartSessionValidator, MULTI_FACTOR_VALIDATOR_ADDRESS, OWNABLE_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, } from './validators/index.js';
|
|
7
|
+
import { getSocialRecoveryValidator } from './validators/core.js';
|
|
8
|
+
import { getSessionDetails, signEnableSession, } from './validators/smart-sessions.js';
|
|
25
9
|
const SMART_SESSION_COMPATIBILITY_FALLBACK_ADDRESS = '0x000000000052e9685932845660777DF43C2dC496';
|
|
26
10
|
function getSetup(config) {
|
|
27
|
-
const ownerValidator =
|
|
28
|
-
const smartSessionValidator =
|
|
11
|
+
const ownerValidator = getOwnerValidator(config);
|
|
12
|
+
const smartSessionValidator = getSmartSessionValidator(config);
|
|
29
13
|
const validators = [ownerValidator];
|
|
30
14
|
if (smartSessionValidator) {
|
|
31
15
|
validators.push(smartSessionValidator);
|
|
32
16
|
}
|
|
33
17
|
if (config.recovery) {
|
|
34
|
-
const socialRecoveryValidator =
|
|
18
|
+
const socialRecoveryValidator = getSocialRecoveryValidator(config.recovery.guardians, config.recovery.threshold);
|
|
35
19
|
validators.push(socialRecoveryValidator);
|
|
36
20
|
}
|
|
37
21
|
const intentExecutor = getIntentExecutor(config);
|
|
@@ -43,31 +27,31 @@ function getSetup(config) {
|
|
|
43
27
|
if (enabled && config.account && config.account.type === 'safe') {
|
|
44
28
|
fallbacks.push({
|
|
45
29
|
address: compatibilityFallback ?? SMART_SESSION_COMPATIBILITY_FALLBACK_ADDRESS,
|
|
46
|
-
initData:
|
|
30
|
+
initData: encodeAbiParameters([
|
|
47
31
|
{ name: 'selector', type: 'bytes4' },
|
|
48
32
|
{ name: 'flags', type: 'bytes1' },
|
|
49
33
|
{ name: 'data', type: 'bytes' },
|
|
50
34
|
], ['0x84b0196e', '0xfe', '0x']),
|
|
51
35
|
deInitData: '0x',
|
|
52
36
|
additionalContext: '0x',
|
|
53
|
-
type:
|
|
37
|
+
type: MODULE_TYPE_ID_FALLBACK,
|
|
54
38
|
});
|
|
55
39
|
}
|
|
56
40
|
}
|
|
57
41
|
const hooks = [];
|
|
58
42
|
if (config.modules) {
|
|
59
43
|
validators.push(...config.modules
|
|
60
|
-
.filter((m) => m.type ===
|
|
61
|
-
.map((m) =>
|
|
44
|
+
.filter((m) => m.type === MODULE_TYPE_VALIDATOR)
|
|
45
|
+
.map((m) => getModule(m)));
|
|
62
46
|
executors.push(...config.modules
|
|
63
|
-
.filter((m) => m.type ===
|
|
64
|
-
.map((m) =>
|
|
47
|
+
.filter((m) => m.type === MODULE_TYPE_EXECUTOR)
|
|
48
|
+
.map((m) => getModule(m)));
|
|
65
49
|
fallbacks.push(...config.modules
|
|
66
|
-
.filter((m) => m.type ===
|
|
67
|
-
.map((m) =>
|
|
50
|
+
.filter((m) => m.type === MODULE_TYPE_FALLBACK)
|
|
51
|
+
.map((m) => getModule(m)));
|
|
68
52
|
hooks.push(...config.modules
|
|
69
|
-
.filter((m) => m.type ===
|
|
70
|
-
.map((m) =>
|
|
53
|
+
.filter((m) => m.type === MODULE_TYPE_HOOK)
|
|
54
|
+
.map((m) => getModule(m)));
|
|
71
55
|
}
|
|
72
56
|
return {
|
|
73
57
|
validators,
|
|
@@ -78,28 +62,29 @@ function getSetup(config) {
|
|
|
78
62
|
}
|
|
79
63
|
function getIntentExecutor(config) {
|
|
80
64
|
const intentExecutorAddress = config.useDevContracts === true
|
|
81
|
-
?
|
|
82
|
-
:
|
|
65
|
+
? INTENT_EXECUTOR_ADDRESS_DEV
|
|
66
|
+
: INTENT_EXECUTOR_ADDRESS;
|
|
83
67
|
return {
|
|
84
68
|
address: intentExecutorAddress,
|
|
85
69
|
initData: '0x',
|
|
86
70
|
deInitData: '0x',
|
|
87
71
|
additionalContext: '0x',
|
|
88
|
-
type:
|
|
72
|
+
type: MODULE_TYPE_ID_EXECUTOR,
|
|
89
73
|
};
|
|
90
74
|
}
|
|
91
75
|
function isRip7212SupportedNetwork(chain) {
|
|
92
76
|
const supportedChains = [
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
77
|
+
mainnet,
|
|
78
|
+
sepolia,
|
|
79
|
+
optimism,
|
|
80
|
+
optimismSepolia,
|
|
81
|
+
polygon,
|
|
82
|
+
base,
|
|
83
|
+
baseSepolia,
|
|
84
|
+
arbitrum,
|
|
85
|
+
arbitrumSepolia,
|
|
86
|
+
soneium,
|
|
103
87
|
];
|
|
104
88
|
return supportedChains.includes(chain);
|
|
105
89
|
}
|
|
90
|
+
export { OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, getSetup, getOwnerValidator, getOwners, getExecutors, getIntentExecutor, getValidators, isRip7212SupportedNetwork, getSessionDetails, signEnableSession, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Address } from 'viem';
|
|
2
|
-
import type { RhinestoneAccountConfig } from '../types';
|
|
3
|
-
import { type ModeleSetup } from './common';
|
|
2
|
+
import type { RhinestoneAccountConfig } from '../types.js';
|
|
3
|
+
import { type ModeleSetup } from './common.js';
|
|
4
4
|
declare function getV0Attesters(): {
|
|
5
5
|
addresses: Address[];
|
|
6
6
|
threshold: number;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.getV0Setup = getV0Setup;
|
|
5
|
-
const viem_1 = require("viem");
|
|
6
|
-
const _1 = require(".");
|
|
7
|
-
const common_1 = require("./common");
|
|
1
|
+
import { encodeAbiParameters } from 'viem';
|
|
2
|
+
import { getSetup } from './index.js';
|
|
3
|
+
import { getModule, MODULE_TYPE_ID_EXECUTOR, MODULE_TYPE_ID_FALLBACK, MODULE_TYPE_ID_HOOK, MODULE_TYPE_ID_VALIDATOR, } from './common.js';
|
|
8
4
|
const OMNI_ACCOUNT_MOCK_ATTESTER_ADDRESS = '0x6D0515e8E499468DCe9583626f0cA15b887f9d03';
|
|
9
5
|
const RHINESTONE_ATTESTER_ADDRESS = '0x000000333034E9f539ce08819E12c1b8Cb29084d';
|
|
10
6
|
const HOOK_ADDRESS = '0x0000000000f6Ed8Be424d673c63eeFF8b9267420';
|
|
@@ -20,7 +16,7 @@ function getV0Attesters() {
|
|
|
20
16
|
};
|
|
21
17
|
}
|
|
22
18
|
function getV0Setup(config) {
|
|
23
|
-
const defaultSetup =
|
|
19
|
+
const defaultSetup = getSetup(config);
|
|
24
20
|
// Define v0 modules
|
|
25
21
|
const v0ModuleInputs = [
|
|
26
22
|
// Same Chain Module
|
|
@@ -42,7 +38,7 @@ function getV0Setup(config) {
|
|
|
42
38
|
{
|
|
43
39
|
type: 'fallback',
|
|
44
40
|
address: TARGET_MODULE_ADDRESS,
|
|
45
|
-
initData:
|
|
41
|
+
initData: encodeAbiParameters([
|
|
46
42
|
{ name: 'selector', type: 'bytes4' },
|
|
47
43
|
{ name: 'flags', type: 'bytes1' },
|
|
48
44
|
{ name: 'data', type: 'bytes' },
|
|
@@ -50,11 +46,11 @@ function getV0Setup(config) {
|
|
|
50
46
|
},
|
|
51
47
|
];
|
|
52
48
|
// Convert and categorize v0 modules once
|
|
53
|
-
const v0Modules = v0ModuleInputs.map((m) =>
|
|
54
|
-
const v0Validators = v0Modules.filter((m) => m.type ===
|
|
55
|
-
const v0Executors = v0Modules.filter((m) => m.type ===
|
|
56
|
-
const v0Fallbacks = v0Modules.filter((m) => m.type ===
|
|
57
|
-
const v0Hooks = v0Modules.filter((m) => m.type ===
|
|
49
|
+
const v0Modules = v0ModuleInputs.map((m) => getModule(m));
|
|
50
|
+
const v0Validators = v0Modules.filter((m) => m.type === MODULE_TYPE_ID_VALIDATOR);
|
|
51
|
+
const v0Executors = v0Modules.filter((m) => m.type === MODULE_TYPE_ID_EXECUTOR);
|
|
52
|
+
const v0Fallbacks = v0Modules.filter((m) => m.type === MODULE_TYPE_ID_FALLBACK);
|
|
53
|
+
const v0Hooks = v0Modules.filter((m) => m.type === MODULE_TYPE_ID_HOOK);
|
|
58
54
|
// Merge directly with default setup
|
|
59
55
|
return {
|
|
60
56
|
validators: [...v0Validators, ...defaultSetup.validators],
|
|
@@ -63,3 +59,4 @@ function getV0Setup(config) {
|
|
|
63
59
|
hooks: [...v0Hooks, ...defaultSetup.hooks],
|
|
64
60
|
};
|
|
65
61
|
}
|
|
62
|
+
export { getV0Attesters, getV0Setup };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Address, type Chain } from 'viem';
|
|
2
|
-
import type { AccountType, ProviderConfig } from '../types';
|
|
2
|
+
import type { AccountType, ProviderConfig } from '../types.js';
|
|
3
3
|
declare function getValidators(accountType: AccountType, account: Address, chain: Chain, provider?: ProviderConfig): Promise<Address[]>;
|
|
4
4
|
declare function getOwners(account: Address, chain: Chain, provider?: ProviderConfig): Promise<{
|
|
5
5
|
accounts: Address[];
|
package/dist/src/modules/read.js
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.getExecutors = getExecutors;
|
|
5
|
-
exports.getOwners = getOwners;
|
|
6
|
-
const viem_1 = require("viem");
|
|
7
|
-
const utils_1 = require("../accounts/utils");
|
|
8
|
-
const core_1 = require("./validators/core");
|
|
1
|
+
import { createPublicClient } from 'viem';
|
|
2
|
+
import { createTransport } from '../accounts/utils.js';
|
|
3
|
+
import { OWNABLE_VALIDATOR_ADDRESS } from './validators/core.js';
|
|
9
4
|
async function getValidators(accountType, account, chain, provider) {
|
|
10
|
-
const publicClient =
|
|
5
|
+
const publicClient = createPublicClient({
|
|
11
6
|
chain,
|
|
12
|
-
transport:
|
|
7
|
+
transport: createTransport(chain, provider),
|
|
13
8
|
});
|
|
14
9
|
switch (accountType) {
|
|
15
10
|
case 'safe':
|
|
@@ -58,11 +53,11 @@ async function getValidators(accountType, account, chain, provider) {
|
|
|
58
53
|
}
|
|
59
54
|
}
|
|
60
55
|
async function getOwners(account, chain, provider) {
|
|
61
|
-
const publicClient =
|
|
56
|
+
const publicClient = createPublicClient({
|
|
62
57
|
chain,
|
|
63
|
-
transport:
|
|
58
|
+
transport: createTransport(chain, provider),
|
|
64
59
|
});
|
|
65
|
-
const moduleAddress =
|
|
60
|
+
const moduleAddress = OWNABLE_VALIDATOR_ADDRESS;
|
|
66
61
|
const [ownerResult, thresholdResult] = await publicClient.multicall({
|
|
67
62
|
contracts: [
|
|
68
63
|
{
|
|
@@ -125,9 +120,9 @@ async function getOwners(account, chain, provider) {
|
|
|
125
120
|
};
|
|
126
121
|
}
|
|
127
122
|
async function getExecutors(accountType, account, chain, provider) {
|
|
128
|
-
const publicClient =
|
|
123
|
+
const publicClient = createPublicClient({
|
|
129
124
|
chain,
|
|
130
|
-
transport:
|
|
125
|
+
transport: createTransport(chain, provider),
|
|
131
126
|
});
|
|
132
127
|
switch (accountType) {
|
|
133
128
|
case 'safe':
|
|
@@ -175,3 +170,4 @@ async function getExecutors(accountType, account, chain, provider) {
|
|
|
175
170
|
}
|
|
176
171
|
}
|
|
177
172
|
}
|
|
173
|
+
export { getValidators, getExecutors, getOwners };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Account, type Address, type Hex } from 'viem';
|
|
2
|
-
import type { ENSValidatorConfig, OwnableValidatorConfig, OwnerSet, RhinestoneAccountConfig, WebauthnValidatorConfig } from '../../types';
|
|
3
|
-
import { type Module } from '../common';
|
|
2
|
+
import type { ENSValidatorConfig, OwnableValidatorConfig, OwnerSet, RhinestoneAccountConfig, WebauthnValidatorConfig } from '../../types.js';
|
|
3
|
+
import { type Module } from '../common.js';
|
|
4
4
|
declare const SMART_SESSION_EMISSARY_ADDRESS_DEV: Address;
|
|
5
5
|
declare const SMART_SESSION_EMISSARY_ADDRESS: Address;
|
|
6
6
|
interface PublicKey {
|
|
@@ -1,41 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.getOwnerValidator = getOwnerValidator;
|
|
5
|
-
exports.getOwnableValidator = getOwnableValidator;
|
|
6
|
-
exports.getENSValidator = getENSValidator;
|
|
7
|
-
exports.getWebAuthnValidator = getWebAuthnValidator;
|
|
8
|
-
exports.getMultiFactorValidator = getMultiFactorValidator;
|
|
9
|
-
exports.getSocialRecoveryValidator = getSocialRecoveryValidator;
|
|
10
|
-
exports.getValidator = getValidator;
|
|
11
|
-
exports.getMockSignature = getMockSignature;
|
|
12
|
-
exports.supportsEip712 = supportsEip712;
|
|
13
|
-
const viem_1 = require("viem");
|
|
14
|
-
const error_1 = require("../../accounts/error");
|
|
15
|
-
const common_1 = require("../common");
|
|
1
|
+
import { bytesToHex, concat, encodeAbiParameters, encodePacked, hexToBytes, maxUint48, pad, toHex, } from 'viem';
|
|
2
|
+
import { OwnersFieldRequiredError } from '../../accounts/error.js';
|
|
3
|
+
import { MODULE_TYPE_ID_VALIDATOR } from '../common.js';
|
|
16
4
|
const SMART_SESSION_EMISSARY_ADDRESS_DEV = '0x60731de80d78548875f8a67c4fec2a8660194e0c';
|
|
17
|
-
exports.SMART_SESSION_EMISSARY_ADDRESS_DEV = SMART_SESSION_EMISSARY_ADDRESS_DEV;
|
|
18
5
|
const SMART_SESSION_EMISSARY_ADDRESS = '0xad568b3f825a8d5ffc06dd3253526b64d810ae89';
|
|
19
|
-
exports.SMART_SESSION_EMISSARY_ADDRESS = SMART_SESSION_EMISSARY_ADDRESS;
|
|
20
6
|
const OWNABLE_VALIDATOR_ADDRESS = '0x000000000013fdb5234e4e3162a810f54d9f7e98';
|
|
21
|
-
exports.OWNABLE_VALIDATOR_ADDRESS = OWNABLE_VALIDATOR_ADDRESS;
|
|
22
7
|
const ENS_VALIDATOR_ADDRESS = '0xdc38f07b060374b6480c4bf06231e7d10955bca4';
|
|
23
|
-
exports.ENS_VALIDATOR_ADDRESS = ENS_VALIDATOR_ADDRESS;
|
|
24
8
|
const WEBAUTHN_VALIDATOR_ADDRESS = '0x0000000000578c4cb0e472a5462da43c495c3f33';
|
|
25
|
-
exports.WEBAUTHN_VALIDATOR_ADDRESS = WEBAUTHN_VALIDATOR_ADDRESS;
|
|
26
9
|
const SOCIAL_RECOVERY_VALIDATOR_ADDRESS = '0xa04d053b3c8021e8d5bf641816c42daa75d8b597';
|
|
27
10
|
const MULTI_FACTOR_VALIDATOR_ADDRESS = '0xf6bdf42c9be18ceca5c06c42a43daf7fbbe7896b';
|
|
28
|
-
exports.MULTI_FACTOR_VALIDATOR_ADDRESS = MULTI_FACTOR_VALIDATOR_ADDRESS;
|
|
29
11
|
// Legacy
|
|
30
12
|
const OWNABLE_V0_VALIDATOR_ADDRESS = '0x2483da3a338895199e5e538530213157e931bf06';
|
|
31
13
|
const OWNABLE_BETA_VALIDATOR_ADDRESS = '0x0000000000e9e6e96bcaa3c113187cdb7e38aed9';
|
|
32
14
|
const WEBAUTHN_V0_VALIDATOR_ADDRESS = '0x0000000000578c4cb0e472a5462da43c495c3f33';
|
|
33
|
-
exports.WEBAUTHN_V0_VALIDATOR_ADDRESS = WEBAUTHN_V0_VALIDATOR_ADDRESS;
|
|
34
15
|
const ECDSA_MOCK_SIGNATURE = '0x81d4b4981670cb18f99f0b4a66446df1bf5b204d24cfcb659bf38ba27a4359b5711649ec2423c5e1247245eba2964679b6a1dbb85c992ae40b9b00c6935b02ff1b';
|
|
35
16
|
const WEBAUTHN_MOCK_SIGNATURE = '0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001b9b86eb98fda3ed4d797d9e690588dfadf17b329a76a47cec935bebf92d7ddc80000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000001700000000000000000000000000000000000000000000000000000000000000019b2e9410bb6850f9f660a03d609d5a844fb96bcdc87a15139b03ee22c70f469100d2b865a215c3bf786387064effa8fcedcb1d625b5148f8a1236d5e3ff11acf000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d9763050000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000867b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a22396a4546696a75684557724d34534f572d7443684a625545484550343456636a634a2d42716f3166544d38222c226f726967696e223a22687474703a2f2f6c6f63616c686f73743a38303830222c2263726f73734f726967696e223a66616c73657d0000000000000000000000000000000000000000000000000000';
|
|
36
17
|
function getOwnerValidator(config) {
|
|
37
18
|
if (!config.owners) {
|
|
38
|
-
throw new
|
|
19
|
+
throw new OwnersFieldRequiredError();
|
|
39
20
|
}
|
|
40
21
|
return getValidator(config.owners);
|
|
41
22
|
}
|
|
@@ -46,7 +27,7 @@ function getMockSignature(ownerSet) {
|
|
|
46
27
|
// ENS validator uses same mock signature format as ECDSA for UserOps
|
|
47
28
|
const owners = ownerSet.accounts.map((account) => account.address);
|
|
48
29
|
const signatures = owners.map(() => ECDSA_MOCK_SIGNATURE);
|
|
49
|
-
return
|
|
30
|
+
return concat(signatures);
|
|
50
31
|
}
|
|
51
32
|
case 'passkey':
|
|
52
33
|
return WEBAUTHN_MOCK_SIGNATURE;
|
|
@@ -55,8 +36,8 @@ function getMockSignature(ownerSet) {
|
|
|
55
36
|
const validatorModule = getValidator(validator);
|
|
56
37
|
const signature = getMockSignature(validator);
|
|
57
38
|
return {
|
|
58
|
-
packedValidatorAndId:
|
|
59
|
-
|
|
39
|
+
packedValidatorAndId: encodePacked(['bytes12', 'address'], [
|
|
40
|
+
pad(toHex(index), {
|
|
60
41
|
size: 12,
|
|
61
42
|
}),
|
|
62
43
|
validatorModule.address,
|
|
@@ -64,7 +45,7 @@ function getMockSignature(ownerSet) {
|
|
|
64
45
|
data: signature,
|
|
65
46
|
};
|
|
66
47
|
});
|
|
67
|
-
return
|
|
48
|
+
return encodeAbiParameters([
|
|
68
49
|
{
|
|
69
50
|
components: [
|
|
70
51
|
{
|
|
@@ -100,7 +81,7 @@ function getValidator(owners) {
|
|
|
100
81
|
function getOwnableValidator(threshold, owners, address) {
|
|
101
82
|
return {
|
|
102
83
|
address: address ?? OWNABLE_VALIDATOR_ADDRESS,
|
|
103
|
-
initData:
|
|
84
|
+
initData: encodeAbiParameters([
|
|
104
85
|
{ name: 'threshold', type: 'uint256' },
|
|
105
86
|
{ name: 'owners', type: 'address[]' },
|
|
106
87
|
], [
|
|
@@ -109,7 +90,7 @@ function getOwnableValidator(threshold, owners, address) {
|
|
|
109
90
|
]),
|
|
110
91
|
deInitData: '0x',
|
|
111
92
|
additionalContext: '0x',
|
|
112
|
-
type:
|
|
93
|
+
type: MODULE_TYPE_ID_VALIDATOR,
|
|
113
94
|
};
|
|
114
95
|
}
|
|
115
96
|
function getENSValidator(threshold, owners, ownerExpirations, address) {
|
|
@@ -117,12 +98,12 @@ function getENSValidator(threshold, owners, ownerExpirations, address) {
|
|
|
117
98
|
// where Owner is a tuple of (address addr, uint48 expiration)
|
|
118
99
|
const ownerPairs = owners.map((owner, index) => ({
|
|
119
100
|
addr: owner.toLowerCase(),
|
|
120
|
-
expiration: ownerExpirations[index] ??
|
|
101
|
+
expiration: ownerExpirations[index] ?? maxUint48,
|
|
121
102
|
}));
|
|
122
103
|
// Sort by address to match ENS validator's expectations
|
|
123
104
|
const sortedPairs = ownerPairs.sort((a, b) => a.addr.localeCompare(b.addr));
|
|
124
105
|
const ownersWithExpiration = sortedPairs;
|
|
125
|
-
const initData =
|
|
106
|
+
const initData = encodeAbiParameters([
|
|
126
107
|
{ name: 'threshold', type: 'uint256' },
|
|
127
108
|
{
|
|
128
109
|
name: 'owners',
|
|
@@ -139,7 +120,7 @@ function getENSValidator(threshold, owners, ownerExpirations, address) {
|
|
|
139
120
|
initData,
|
|
140
121
|
deInitData: '0x',
|
|
141
122
|
additionalContext: '0x',
|
|
142
|
-
type:
|
|
123
|
+
type: MODULE_TYPE_ID_VALIDATOR,
|
|
143
124
|
};
|
|
144
125
|
}
|
|
145
126
|
function getWebAuthnValidator(threshold, webAuthnCredentials, address) {
|
|
@@ -164,7 +145,7 @@ function getWebAuthnValidator(threshold, webAuthnCredentials, address) {
|
|
|
164
145
|
const publicKeys = webAuthnCredentials.map(getPublicKey);
|
|
165
146
|
return {
|
|
166
147
|
address: address ?? WEBAUTHN_VALIDATOR_ADDRESS,
|
|
167
|
-
initData:
|
|
148
|
+
initData: encodeAbiParameters([
|
|
168
149
|
{ name: 'threshold', type: 'uint256' },
|
|
169
150
|
{
|
|
170
151
|
name: 'credentials',
|
|
@@ -194,15 +175,15 @@ function getWebAuthnValidator(threshold, webAuthnCredentials, address) {
|
|
|
194
175
|
]),
|
|
195
176
|
deInitData: '0x',
|
|
196
177
|
additionalContext: '0x',
|
|
197
|
-
type:
|
|
178
|
+
type: MODULE_TYPE_ID_VALIDATOR,
|
|
198
179
|
};
|
|
199
180
|
}
|
|
200
181
|
function getMultiFactorValidator(threshold, validators) {
|
|
201
182
|
return {
|
|
202
183
|
address: MULTI_FACTOR_VALIDATOR_ADDRESS,
|
|
203
|
-
initData:
|
|
184
|
+
initData: encodePacked(['uint8', 'bytes'], [
|
|
204
185
|
threshold,
|
|
205
|
-
|
|
186
|
+
encodeAbiParameters([
|
|
206
187
|
{
|
|
207
188
|
components: [
|
|
208
189
|
{
|
|
@@ -223,8 +204,8 @@ function getMultiFactorValidator(threshold, validators) {
|
|
|
223
204
|
}
|
|
224
205
|
const validatorModule = getValidator(validator);
|
|
225
206
|
return {
|
|
226
|
-
packedValidatorAndId:
|
|
227
|
-
|
|
207
|
+
packedValidatorAndId: concat([
|
|
208
|
+
pad(toHex(index), {
|
|
228
209
|
size: 12,
|
|
229
210
|
}),
|
|
230
211
|
validatorModule.address,
|
|
@@ -237,16 +218,16 @@ function getMultiFactorValidator(threshold, validators) {
|
|
|
237
218
|
]),
|
|
238
219
|
deInitData: '0x',
|
|
239
220
|
additionalContext: '0x',
|
|
240
|
-
type:
|
|
221
|
+
type: MODULE_TYPE_ID_VALIDATOR,
|
|
241
222
|
};
|
|
242
223
|
}
|
|
243
224
|
function getSocialRecoveryValidator(guardians, threshold = 1) {
|
|
244
225
|
const guardianAddresses = guardians.map((guardian) => guardian.address);
|
|
245
226
|
guardianAddresses.sort();
|
|
246
227
|
return {
|
|
247
|
-
type:
|
|
228
|
+
type: MODULE_TYPE_ID_VALIDATOR,
|
|
248
229
|
address: SOCIAL_RECOVERY_VALIDATOR_ADDRESS,
|
|
249
|
-
initData:
|
|
230
|
+
initData: encodeAbiParameters([
|
|
250
231
|
{
|
|
251
232
|
type: 'uint256',
|
|
252
233
|
name: 'threshold',
|
|
@@ -261,14 +242,14 @@ function getSocialRecoveryValidator(guardians, threshold = 1) {
|
|
|
261
242
|
};
|
|
262
243
|
}
|
|
263
244
|
function parsePublicKey(publicKey) {
|
|
264
|
-
const bytes = typeof publicKey === 'string' ?
|
|
245
|
+
const bytes = typeof publicKey === 'string' ? hexToBytes(publicKey) : publicKey;
|
|
265
246
|
const offset = bytes.length === 65 ? 1 : 0;
|
|
266
247
|
const x = bytes.slice(offset, 32 + offset);
|
|
267
248
|
const y = bytes.slice(32 + offset, 64 + offset);
|
|
268
249
|
return {
|
|
269
250
|
prefix: bytes.length === 65 ? bytes[0] : undefined,
|
|
270
|
-
x: BigInt(
|
|
271
|
-
y: BigInt(
|
|
251
|
+
x: BigInt(bytesToHex(x)),
|
|
252
|
+
y: BigInt(bytesToHex(y)),
|
|
272
253
|
};
|
|
273
254
|
}
|
|
274
255
|
function supportsEip712(validator) {
|
|
@@ -282,3 +263,4 @@ function supportsEip712(validator) {
|
|
|
282
263
|
return true;
|
|
283
264
|
}
|
|
284
265
|
}
|
|
266
|
+
export { OWNABLE_VALIDATOR_ADDRESS, ENS_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, WEBAUTHN_V0_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS_DEV, getOwnerValidator, getOwnableValidator, getENSValidator, getWebAuthnValidator, getMultiFactorValidator, getSocialRecoveryValidator, getValidator, getMockSignature, supportsEip712, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getMockSignature, getOwnerValidator, MULTI_FACTOR_VALIDATOR_ADDRESS, OWNABLE_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS } from './core';
|
|
2
|
-
import { buildMockSignature, DUMMY_PRECLAIMOP_SELECTOR, DUMMY_PRECLAIMOP_TARGET, getEnableSessionCall, getPermissionId, getSmartSessionValidator, isSessionEnabled, packSignature } from './smart-sessions';
|
|
1
|
+
import { getMockSignature, getOwnerValidator, MULTI_FACTOR_VALIDATOR_ADDRESS, OWNABLE_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS } from './core.js';
|
|
2
|
+
import { buildMockSignature, DUMMY_PRECLAIMOP_SELECTOR, DUMMY_PRECLAIMOP_TARGET, getEnableSessionCall, getPermissionId, getSmartSessionValidator, isSessionEnabled, packSignature } from './smart-sessions.js';
|
|
3
3
|
export { OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, DUMMY_PRECLAIMOP_TARGET, DUMMY_PRECLAIMOP_SELECTOR, getOwnerValidator, getSmartSessionValidator, getEnableSessionCall, getPermissionId, getMockSignature, buildMockSignature, isSessionEnabled, packSignature, };
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const core_1 = require("./core");
|
|
5
|
-
Object.defineProperty(exports, "getMockSignature", { enumerable: true, get: function () { return core_1.getMockSignature; } });
|
|
6
|
-
Object.defineProperty(exports, "getOwnerValidator", { enumerable: true, get: function () { return core_1.getOwnerValidator; } });
|
|
7
|
-
Object.defineProperty(exports, "MULTI_FACTOR_VALIDATOR_ADDRESS", { enumerable: true, get: function () { return core_1.MULTI_FACTOR_VALIDATOR_ADDRESS; } });
|
|
8
|
-
Object.defineProperty(exports, "OWNABLE_VALIDATOR_ADDRESS", { enumerable: true, get: function () { return core_1.OWNABLE_VALIDATOR_ADDRESS; } });
|
|
9
|
-
Object.defineProperty(exports, "SMART_SESSION_EMISSARY_ADDRESS", { enumerable: true, get: function () { return core_1.SMART_SESSION_EMISSARY_ADDRESS; } });
|
|
10
|
-
Object.defineProperty(exports, "WEBAUTHN_VALIDATOR_ADDRESS", { enumerable: true, get: function () { return core_1.WEBAUTHN_VALIDATOR_ADDRESS; } });
|
|
11
|
-
const smart_sessions_1 = require("./smart-sessions");
|
|
12
|
-
Object.defineProperty(exports, "buildMockSignature", { enumerable: true, get: function () { return smart_sessions_1.buildMockSignature; } });
|
|
13
|
-
Object.defineProperty(exports, "DUMMY_PRECLAIMOP_SELECTOR", { enumerable: true, get: function () { return smart_sessions_1.DUMMY_PRECLAIMOP_SELECTOR; } });
|
|
14
|
-
Object.defineProperty(exports, "DUMMY_PRECLAIMOP_TARGET", { enumerable: true, get: function () { return smart_sessions_1.DUMMY_PRECLAIMOP_TARGET; } });
|
|
15
|
-
Object.defineProperty(exports, "getEnableSessionCall", { enumerable: true, get: function () { return smart_sessions_1.getEnableSessionCall; } });
|
|
16
|
-
Object.defineProperty(exports, "getPermissionId", { enumerable: true, get: function () { return smart_sessions_1.getPermissionId; } });
|
|
17
|
-
Object.defineProperty(exports, "getSmartSessionValidator", { enumerable: true, get: function () { return smart_sessions_1.getSmartSessionValidator; } });
|
|
18
|
-
Object.defineProperty(exports, "isSessionEnabled", { enumerable: true, get: function () { return smart_sessions_1.isSessionEnabled; } });
|
|
19
|
-
Object.defineProperty(exports, "packSignature", { enumerable: true, get: function () { return smart_sessions_1.packSignature; } });
|
|
1
|
+
import { getMockSignature, getOwnerValidator, MULTI_FACTOR_VALIDATOR_ADDRESS, OWNABLE_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, } from './core.js';
|
|
2
|
+
import { buildMockSignature, DUMMY_PRECLAIMOP_SELECTOR, DUMMY_PRECLAIMOP_TARGET, getEnableSessionCall, getPermissionId, getSmartSessionValidator, isSessionEnabled, packSignature, } from './smart-sessions.js';
|
|
3
|
+
export { OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, DUMMY_PRECLAIMOP_TARGET, DUMMY_PRECLAIMOP_SELECTOR, getOwnerValidator, getSmartSessionValidator, getEnableSessionCall, getPermissionId, getMockSignature, buildMockSignature, isSessionEnabled, packSignature, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Address, type Hex } from 'viem';
|
|
2
|
-
import type { Permit2ClaimPolicy } from '../../../../types';
|
|
2
|
+
import type { Permit2ClaimPolicy } from '../../../../types.js';
|
|
3
3
|
/** Typed representation of the Permit2 message fields used for calldata building */
|
|
4
4
|
export interface Permit2ClaimMessage {
|
|
5
5
|
permitted: readonly {
|