@charterlabs/rhinestone-sdk 0.2.7-dev.3 → 0.2.7-dev.4
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 +38 -3
- package/dist/src/accounts/error.d.ts.map +1 -1
- package/dist/src/accounts/error.js +55 -7
- package/dist/src/accounts/index.d.ts +28 -20
- package/dist/src/accounts/index.d.ts.map +1 -1
- package/dist/src/accounts/index.js +196 -21
- package/dist/src/accounts/index.test.js +2 -4
- package/dist/src/accounts/json-rpc/index.d.ts +5 -0
- package/dist/src/accounts/json-rpc/index.d.ts.map +1 -0
- package/dist/src/accounts/json-rpc/index.js +16 -0
- package/dist/src/accounts/json-rpc/providers.d.ts +4 -0
- package/dist/src/accounts/json-rpc/providers.d.ts.map +1 -0
- package/dist/src/accounts/json-rpc/providers.js +52 -0
- 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 +35 -8
- 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 +33 -6
- package/dist/src/accounts/safe.d.ts.map +1 -1
- package/dist/src/accounts/safe.js +85 -53
- package/dist/src/accounts/safe.test.js +33 -6
- package/dist/src/accounts/signing/common.d.ts +4 -4
- package/dist/src/accounts/signing/common.d.ts.map +1 -1
- package/dist/src/accounts/signing/common.js +21 -9
- package/dist/src/accounts/signing/message.d.ts +1 -1
- package/dist/src/accounts/signing/message.d.ts.map +1 -1
- package/dist/src/accounts/signing/message.js +6 -6
- 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/signing/typedData.d.ts.map +1 -1
- package/dist/src/accounts/signing/typedData.js +2 -2
- package/dist/src/accounts/startale.test.js +0 -4
- package/dist/src/accounts/utils.d.ts +4 -4
- package/dist/src/accounts/utils.d.ts.map +1 -1
- package/dist/src/accounts/utils.js +3 -40
- package/dist/src/accounts/walletClient.d.ts +7 -0
- package/dist/src/accounts/walletClient.d.ts.map +1 -0
- package/dist/src/accounts/walletClient.js +38 -0
- package/dist/src/actions/compact.d.ts +13 -0
- package/dist/src/actions/compact.d.ts.map +1 -0
- package/dist/src/actions/compact.js +210 -0
- package/dist/src/actions/ecdsa.d.ts +35 -0
- package/dist/src/actions/ecdsa.d.ts.map +1 -0
- package/dist/src/actions/ecdsa.js +114 -0
- package/dist/src/actions/ecdsa.test.d.ts +2 -0
- package/dist/src/actions/ecdsa.test.d.ts.map +1 -0
- package/dist/src/actions/ecdsa.test.js +99 -0
- package/dist/src/actions/index.d.ts +23 -166
- package/dist/src/actions/index.d.ts.map +1 -1
- package/dist/src/actions/index.js +25 -544
- package/dist/src/actions/mfa.d.ts +37 -0
- package/dist/src/actions/mfa.d.ts.map +1 -0
- package/dist/src/actions/mfa.js +133 -0
- package/dist/src/actions/passkeys.d.ts +37 -0
- package/dist/src/actions/passkeys.d.ts.map +1 -0
- package/dist/src/actions/passkeys.js +129 -0
- package/dist/src/actions/passkeys.test.d.ts +2 -0
- package/dist/src/actions/passkeys.test.d.ts.map +1 -0
- package/dist/src/actions/passkeys.test.js +54 -0
- package/dist/src/actions/recovery.d.ts +33 -0
- package/dist/src/actions/recovery.d.ts.map +1 -0
- package/dist/src/actions/recovery.js +193 -0
- package/dist/src/actions/recovery.test.d.ts +2 -0
- package/dist/src/actions/recovery.test.d.ts.map +1 -0
- package/dist/src/actions/recovery.test.js +168 -0
- package/dist/src/errors/index.d.ts +5 -0
- package/dist/src/errors/index.d.ts.map +1 -0
- package/dist/src/errors/index.js +35 -0
- package/dist/src/execution/compact.d.ts +24 -8
- package/dist/src/execution/compact.d.ts.map +1 -1
- package/dist/src/execution/compact.js +29 -103
- 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 +33 -22
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +57 -41
- package/dist/src/execution/permit2.d.ts +148 -0
- package/dist/src/execution/permit2.d.ts.map +1 -0
- package/dist/src/execution/permit2.js +282 -0
- package/dist/src/execution/smart-session.d.ts +3 -3
- package/dist/src/execution/smart-session.d.ts.map +1 -1
- package/dist/src/execution/types.d.ts +35 -0
- package/dist/src/execution/types.d.ts.map +1 -0
- package/dist/src/execution/types.js +2 -0
- package/dist/src/execution/utils.d.ts +36 -28
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +245 -91
- package/dist/src/index.d.ts +37 -19
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +130 -66
- 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 +3 -2
- 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 -11
- package/dist/src/modules/read.d.ts.map +1 -1
- package/dist/src/modules/read.js +4 -0
- package/dist/src/modules/validators/core.d.ts +5 -3
- package/dist/src/modules/validators/core.d.ts.map +1 -1
- package/dist/src/modules/validators/core.js +29 -10
- package/dist/src/modules/validators/core.test.js +4 -4
- package/dist/src/modules/validators/smart-sessions.test.js +0 -3
- package/dist/src/modules/validators/webauthn-contract.d.ts.map +1 -1
- package/dist/src/orchestrator/client.d.ts +2 -1
- package/dist/src/orchestrator/client.d.ts.map +1 -1
- package/dist/src/orchestrator/client.js +36 -14
- package/dist/src/orchestrator/consts.d.ts +1 -2
- package/dist/src/orchestrator/consts.d.ts.map +1 -1
- package/dist/src/orchestrator/consts.js +1 -3
- package/dist/src/orchestrator/registry.d.ts +3 -25
- package/dist/src/orchestrator/registry.d.ts.map +1 -1
- package/dist/src/orchestrator/registry.js +82 -46
- package/dist/src/orchestrator/registry.test.js +7 -7
- package/dist/src/orchestrator/types.d.ts +35 -31
- package/dist/src/orchestrator/types.d.ts.map +1 -1
- package/dist/src/types.d.ts +64 -9
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +73 -2
- package/dist/src/actions/index.test.d.ts +0 -2
- package/dist/src/actions/index.test.d.ts.map +0 -1
- package/dist/src/actions/index.test.js +0 -302
- package/dist/src/orchestrator/registry.json +0 -365
|
@@ -13,7 +13,6 @@ const MOCK_MODULE_ADDRESS = '0x28de6501fa86f2e6cd0b33c3aabdaeb4a1b93f3f';
|
|
|
13
13
|
type: 'ecdsa',
|
|
14
14
|
accounts: [consts_1.accountA, consts_1.accountB],
|
|
15
15
|
},
|
|
16
|
-
rhinestoneApiKey: consts_1.MOCK_API_KEY,
|
|
17
16
|
});
|
|
18
17
|
(0, vitest_1.expect)(factory).toEqual('0x4e1dcf7ad4e460cfd30791ccc4f9c8a4f820ec67');
|
|
19
18
|
(0, vitest_1.expect)(factoryData).toEqual('0x1688f0b900000000000000000000000029fcb43b46531bca003ddc8fcb67ffe91900c762000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000444b63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000075798463024bda64d83c94a64bc7d7eab41300ef00000000000000000000000000000000000000000000000000000000000001600000000000000000000000007579f2ad53b01c3d8779fe17928e0d48885b00030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f6c02c78ded62973b43bfa523b247da0994869360000000000000000000000006092086a3dc0020cd604a68fcf5d430007d51bb700000000000000000000000000000000000000000000000000000000000002a447cbbdca0000000000000000000000007579f2ad53b01c3d8779fe17928e0d48885b0003000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000013fdb5234e4e3162a810f54d9f7e980000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006092086a3dc0020cd604a68fcf5d430007d51bb7000000000000000000000000f6c02c78ded62973b43bfa523b247da09948693600000000000000000000000000000000005ad9ce1f5035fd62ca96cef16adaaf00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000');
|
|
@@ -27,7 +26,6 @@ const MOCK_MODULE_ADDRESS = '0x28de6501fa86f2e6cd0b33c3aabdaeb4a1b93f3f';
|
|
|
27
26
|
type: 'passkey',
|
|
28
27
|
accounts: [consts_1.passkeyAccount],
|
|
29
28
|
},
|
|
30
|
-
rhinestoneApiKey: consts_1.MOCK_API_KEY,
|
|
31
29
|
});
|
|
32
30
|
(0, vitest_1.expect)(factory).toEqual('0x4e1dcf7ad4e460cfd30791ccc4f9c8a4f820ec67');
|
|
33
31
|
(0, vitest_1.expect)(factoryData).toEqual('0x1688f0b900000000000000000000000029fcb43b46531bca003ddc8fcb67ffe91900c762000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000444b63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000075798463024bda64d83c94a64bc7d7eab41300ef00000000000000000000000000000000000000000000000000000000000001400000000000000000000000007579f2ad53b01c3d8779fe17928e0d48885b00030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000babe99e62d8bcbd3acf5ccbcfcd4f64fe75e5e7200000000000000000000000000000000000000000000000000000000000002c447cbbdca0000000000000000000000007579f2ad53b01c3d8779fe17928e0d48885b0003000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000578c4cb0e472a5462da43c495c3f330000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001580a9af0569ad3905b26a703201b358aa0904236642ebe79b22a19d00d3737637d46f725a5427ae45a9569259bf67e1e16b187d7b3ad1ed70138c4f0409677d1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005ad9ce1f5035fd62ca96cef16adaaf00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000');
|
|
@@ -35,6 +33,22 @@ const MOCK_MODULE_ADDRESS = '0x28de6501fa86f2e6cd0b33c3aabdaeb4a1b93f3f';
|
|
|
35
33
|
(0, vitest_1.expect)(implementation).toEqual('0x29fcb43b46531bca003ddc8fcb67ffe91900c762');
|
|
36
34
|
(0, vitest_1.expect)(initializationCallData).toEqual(null);
|
|
37
35
|
});
|
|
36
|
+
(0, vitest_1.test)('Existing account', () => {
|
|
37
|
+
const { factory, factoryData } = (0, safe_1.getDeployArgs)({
|
|
38
|
+
owners: {
|
|
39
|
+
type: 'ecdsa',
|
|
40
|
+
accounts: [consts_1.accountA, consts_1.accountB],
|
|
41
|
+
},
|
|
42
|
+
initData: {
|
|
43
|
+
factory: '0x4e1dcf7ad4e460cfd30791ccc4f9c8a4f820ec67',
|
|
44
|
+
factoryData: '0x1688f0b90000000000000000000000007579011ab74c46090561ea277ba79d510c6c00ff0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000844fff40e1ec88f0966a6bc17a138345cdf7519caf9a1e0bb840330108a6a4315f1028c39000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
|
45
|
+
address: '0xc41bb9cfB2658dD3D74Ada0862044f5f30304b38',
|
|
46
|
+
intentExecutorInstalled: true,
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
(0, vitest_1.expect)(factory).toEqual('0x4e1dcf7ad4e460cfd30791ccc4f9c8a4f820ec67');
|
|
50
|
+
(0, vitest_1.expect)(factoryData).toEqual('0x1688f0b90000000000000000000000007579011ab74c46090561ea277ba79d510c6c00ff0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000844fff40e1ec88f0966a6bc17a138345cdf7519caf9a1e0bb840330108a6a4315f1028c39000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000');
|
|
51
|
+
});
|
|
38
52
|
});
|
|
39
53
|
(0, vitest_1.describe)('Get Address', () => {
|
|
40
54
|
(0, vitest_1.test)('ECDSA owners', () => {
|
|
@@ -43,9 +57,8 @@ const MOCK_MODULE_ADDRESS = '0x28de6501fa86f2e6cd0b33c3aabdaeb4a1b93f3f';
|
|
|
43
57
|
type: 'ecdsa',
|
|
44
58
|
accounts: [consts_1.accountA, consts_1.accountB],
|
|
45
59
|
},
|
|
46
|
-
rhinestoneApiKey: consts_1.MOCK_API_KEY,
|
|
47
60
|
});
|
|
48
|
-
(0, vitest_1.expect)(address).toEqual('
|
|
61
|
+
(0, vitest_1.expect)(address).toEqual('0x3a249204D37245504d4aB37FF88f574B222a6349');
|
|
49
62
|
});
|
|
50
63
|
(0, vitest_1.test)('Passkey owner', () => {
|
|
51
64
|
const address = (0, safe_1.getAddress)({
|
|
@@ -53,9 +66,23 @@ const MOCK_MODULE_ADDRESS = '0x28de6501fa86f2e6cd0b33c3aabdaeb4a1b93f3f';
|
|
|
53
66
|
type: 'passkey',
|
|
54
67
|
accounts: [consts_1.passkeyAccount],
|
|
55
68
|
},
|
|
56
|
-
rhinestoneApiKey: consts_1.MOCK_API_KEY,
|
|
57
69
|
});
|
|
58
|
-
(0, vitest_1.expect)(address).toEqual('
|
|
70
|
+
(0, vitest_1.expect)(address).toEqual('0xE86e416045645E1Ca4360D5DC396E4c513277C31');
|
|
71
|
+
});
|
|
72
|
+
(0, vitest_1.test)('Existing account', () => {
|
|
73
|
+
const address = (0, safe_1.getAddress)({
|
|
74
|
+
owners: {
|
|
75
|
+
type: 'ecdsa',
|
|
76
|
+
accounts: [consts_1.accountA, consts_1.accountB],
|
|
77
|
+
},
|
|
78
|
+
initData: {
|
|
79
|
+
factory: '0x4e1dcf7ad4e460cfd30791ccc4f9c8a4f820ec67',
|
|
80
|
+
factoryData: '0x1688f0b90000000000000000000000007579011ab74c46090561ea277ba79d510c6c00ff0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000844fff40e1ec88f0966a6bc17a138345cdf7519caf9a1e0bb840330108a6a4315f1028c39000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
|
81
|
+
address: '0xc41bb9cfB2658dD3D74Ada0862044f5f30304b38',
|
|
82
|
+
intentExecutorInstalled: true,
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
(0, vitest_1.expect)(address).toEqual('0xc41bb9cfB2658dD3D74Ada0862044f5f30304b38');
|
|
59
86
|
});
|
|
60
87
|
});
|
|
61
88
|
(0, vitest_1.describe)('Get Install Data', () => {
|
|
@@ -4,7 +4,7 @@ import type { WebAuthnAccount } from 'viem/account-abstraction';
|
|
|
4
4
|
import type { OwnerSet, SignerSet } from '../../types';
|
|
5
5
|
declare function convertOwnerSetToSignerSet(owners: OwnerSet): SignerSet;
|
|
6
6
|
type SigningFunctions<T> = {
|
|
7
|
-
signEcdsa: (account: Account, params: T) => Promise<Hex>;
|
|
7
|
+
signEcdsa: (account: Account, params: T, updateV: boolean) => Promise<Hex>;
|
|
8
8
|
signPasskey: (account: WebAuthnAccount, params: T) => Promise<{
|
|
9
9
|
webauthn: WebAuthnP256.SignMetadata;
|
|
10
10
|
signature: Hex;
|
|
@@ -13,15 +13,15 @@ type SigningFunctions<T> = {
|
|
|
13
13
|
declare function signWithMultiFactorAuth<T>(signers: SignerSet & {
|
|
14
14
|
type: 'owner';
|
|
15
15
|
kind: 'multi-factor';
|
|
16
|
-
}, chain: Chain, address: Address, params: T, signMain: (signers: SignerSet, chain: Chain, address: Address, params: T) => Promise<Hex>): Promise<Hex>;
|
|
16
|
+
}, chain: Chain, address: Address, params: T, isUserOpHash: boolean, signMain: (signers: SignerSet, chain: Chain, address: Address, params: T, isUserOpHash: boolean) => Promise<Hex>): Promise<Hex>;
|
|
17
17
|
declare function signWithSession<T>(signers: SignerSet & {
|
|
18
18
|
type: 'session';
|
|
19
|
-
}, chain: Chain, address: Address, params: T, signMain: (signers: SignerSet, chain: Chain, address: Address, params: T) => Promise<Hex>): Promise<Hex>;
|
|
19
|
+
}, chain: Chain, address: Address, params: T, isUserOpHash: boolean, signMain: (signers: SignerSet, chain: Chain, address: Address, params: T, isUserOpHash: boolean) => Promise<Hex>): Promise<Hex>;
|
|
20
20
|
declare function signWithGuardians<T>(signers: SignerSet & {
|
|
21
21
|
type: 'guardians';
|
|
22
22
|
}, params: T, signingFunctions: SigningFunctions<T>): Promise<Hex>;
|
|
23
23
|
declare function signWithOwners<T>(signers: SignerSet & {
|
|
24
24
|
type: 'owner';
|
|
25
|
-
}, chain: Chain, address: Address, params: T, signingFunctions: SigningFunctions<T>, signMain: (signers: SignerSet, chain: Chain, address: Address, params: T) => Promise<Hex>): Promise<Hex>;
|
|
25
|
+
}, chain: Chain, address: Address, params: T, signingFunctions: SigningFunctions<T>, isUserOpHash: boolean, signMain: (signers: SignerSet, chain: Chain, address: Address, params: T, isUserOpHash: boolean) => Promise<Hex>): Promise<Hex>;
|
|
26
26
|
export { convertOwnerSetToSignerSet, signWithMultiFactorAuth, signWithSession, signWithGuardians, signWithOwners, type SigningFunctions, };
|
|
27
27
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../accounts/signing/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,IAAI,CAAA;AACtC,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,KAAK,EAGV,KAAK,GAAG,EAGT,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../accounts/signing/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,IAAI,CAAA;AACtC,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,KAAK,EAGV,KAAK,GAAG,EAGT,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAO/D,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAStD,iBAAS,0BAA0B,CAAC,MAAM,EAAE,QAAQ,GAAG,SAAS,CA6C/D;AAED,KAAK,gBAAgB,CAAC,CAAC,IAAI;IACzB,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC1E,WAAW,EAAE,CACX,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,CAAC,KACN,OAAO,CAAC;QACX,QAAQ,EAAE,YAAY,CAAC,YAAY,CAAA;QACnC,SAAS,EAAE,GAAG,CAAA;KACf,CAAC,CAAA;CACH,CAAA;AAED,iBAAe,uBAAuB,CAAC,CAAC,EACtC,OAAO,EAAE,SAAS,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,cAAc,CAAA;CAAE,EAC5D,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,EACT,YAAY,EAAE,OAAO,EACrB,QAAQ,EAAE,CACR,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,EACT,YAAY,EAAE,OAAO,KAClB,OAAO,CAAC,GAAG,CAAC,GAChB,OAAO,CAAC,GAAG,CAAC,CA0Cd;AAED,iBAAe,eAAe,CAAC,CAAC,EAC9B,OAAO,EAAE,SAAS,GAAG;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,EACxC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,EACT,YAAY,EAAE,OAAO,EACrB,QAAQ,EAAE,CACR,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,EACT,YAAY,EAAE,OAAO,KAClB,OAAO,CAAC,GAAG,CAAC,GAChB,OAAO,CAAC,GAAG,CAAC,CAKd;AAED,iBAAe,iBAAiB,CAAC,CAAC,EAChC,OAAO,EAAE,SAAS,GAAG;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,EAC1C,MAAM,EAAE,CAAC,EACT,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,CAAC,GACpC,OAAO,CAAC,GAAG,CAAC,CAOd;AAED,iBAAe,cAAc,CAAC,CAAC,EAC7B,OAAO,EAAE,SAAS,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,EACtC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,EACT,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACrC,YAAY,EAAE,OAAO,EACrB,QAAQ,EAAE,CACR,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,EACT,YAAY,EAAE,OAAO,KAClB,OAAO,CAAC,GAAG,CAAC,GAChB,OAAO,CAAC,GAAG,CAAC,CA0Dd;AAED,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,KAAK,gBAAgB,GACtB,CAAA"}
|
|
@@ -16,6 +16,7 @@ function convertOwnerSetToSignerSet(owners) {
|
|
|
16
16
|
type: 'owner',
|
|
17
17
|
kind: 'ecdsa',
|
|
18
18
|
accounts: owners.accounts,
|
|
19
|
+
module: owners.module,
|
|
19
20
|
};
|
|
20
21
|
}
|
|
21
22
|
case 'passkey': {
|
|
@@ -23,6 +24,7 @@ function convertOwnerSetToSignerSet(owners) {
|
|
|
23
24
|
type: 'owner',
|
|
24
25
|
kind: 'passkey',
|
|
25
26
|
accounts: owners.accounts,
|
|
27
|
+
module: owners.module,
|
|
26
28
|
};
|
|
27
29
|
}
|
|
28
30
|
case 'multi-factor': {
|
|
@@ -33,9 +35,10 @@ function convertOwnerSetToSignerSet(owners) {
|
|
|
33
35
|
switch (validator.type) {
|
|
34
36
|
case 'ecdsa': {
|
|
35
37
|
return {
|
|
36
|
-
type:
|
|
38
|
+
type: validator.type,
|
|
37
39
|
id: index,
|
|
38
40
|
accounts: validator.accounts,
|
|
41
|
+
module: validator.module,
|
|
39
42
|
};
|
|
40
43
|
}
|
|
41
44
|
case 'passkey': {
|
|
@@ -43,6 +46,7 @@ function convertOwnerSetToSignerSet(owners) {
|
|
|
43
46
|
type: 'passkey',
|
|
44
47
|
id: index,
|
|
45
48
|
accounts: validator.accounts,
|
|
49
|
+
module: validator.module,
|
|
46
50
|
};
|
|
47
51
|
}
|
|
48
52
|
}
|
|
@@ -51,13 +55,13 @@ function convertOwnerSetToSignerSet(owners) {
|
|
|
51
55
|
}
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
|
-
async function signWithMultiFactorAuth(signers, chain, address, params, signMain) {
|
|
58
|
+
async function signWithMultiFactorAuth(signers, chain, address, params, isUserOpHash, signMain) {
|
|
55
59
|
const signatures = await Promise.all(signers.validators.map(async (validator) => {
|
|
56
60
|
if (validator === null) {
|
|
57
61
|
return '0x';
|
|
58
62
|
}
|
|
59
63
|
const validatorSigners = convertOwnerSetToSignerSet(validator);
|
|
60
|
-
return signMain(validatorSigners, chain, address, params);
|
|
64
|
+
return signMain(validatorSigners, chain, address, params, isUserOpHash);
|
|
61
65
|
}));
|
|
62
66
|
const data = (0, viem_1.encodeAbiParameters)([
|
|
63
67
|
{
|
|
@@ -88,18 +92,23 @@ async function signWithMultiFactorAuth(signers, chain, address, params, signMain
|
|
|
88
92
|
]);
|
|
89
93
|
return data;
|
|
90
94
|
}
|
|
91
|
-
async function signWithSession(signers, chain, address, params, signMain) {
|
|
95
|
+
async function signWithSession(signers, chain, address, params, isUserOpHash, signMain) {
|
|
92
96
|
const sessionSigners = convertOwnerSetToSignerSet(signers.session.owners);
|
|
93
|
-
return signMain(sessionSigners, chain, address, params);
|
|
97
|
+
return signMain(sessionSigners, chain, address, params, isUserOpHash);
|
|
94
98
|
}
|
|
95
99
|
async function signWithGuardians(signers, params, signingFunctions) {
|
|
96
|
-
const signatures = await Promise.all(signers.guardians.map((account) => signingFunctions.signEcdsa(account, params)));
|
|
100
|
+
const signatures = await Promise.all(signers.guardians.map((account) => signingFunctions.signEcdsa(account, params, false)));
|
|
97
101
|
return (0, viem_1.concat)(signatures);
|
|
98
102
|
}
|
|
99
|
-
async function signWithOwners(signers, chain, address, params, signingFunctions, signMain) {
|
|
103
|
+
async function signWithOwners(signers, chain, address, params, signingFunctions, isUserOpHash, signMain) {
|
|
100
104
|
switch (signers.kind) {
|
|
101
105
|
case 'ecdsa': {
|
|
102
|
-
|
|
106
|
+
// Ownable validator uses `v` value to determine which validation mode to use
|
|
107
|
+
// This is not needed for UserOps
|
|
108
|
+
const updateV = (!signers.module ||
|
|
109
|
+
signers.module?.toLowerCase() === core_1.OWNABLE_VALIDATOR_ADDRESS) &&
|
|
110
|
+
!isUserOpHash;
|
|
111
|
+
const signatures = await Promise.all(signers.accounts.map((account) => signingFunctions.signEcdsa(account, params, updateV)));
|
|
103
112
|
return (0, viem_1.concat)(signatures);
|
|
104
113
|
}
|
|
105
114
|
case 'passkey': {
|
|
@@ -121,10 +130,13 @@ async function signWithOwners(signers, chain, address, params, signingFunctions,
|
|
|
121
130
|
s,
|
|
122
131
|
};
|
|
123
132
|
});
|
|
133
|
+
if (signers.module?.toLowerCase() === core_1.WEBAUTHN_V0_VALIDATOR_ADDRESS) {
|
|
134
|
+
return (0, passkeys_1.packSignatureV0)(webAuthns[0], usePrecompile);
|
|
135
|
+
}
|
|
124
136
|
return (0, passkeys_1.packSignature)(credIds, usePrecompile, webAuthns);
|
|
125
137
|
}
|
|
126
138
|
case 'multi-factor': {
|
|
127
|
-
return signWithMultiFactorAuth(signers, chain, address, params, signMain);
|
|
139
|
+
return signWithMultiFactorAuth(signers, chain, address, params, isUserOpHash, signMain);
|
|
128
140
|
}
|
|
129
141
|
default: {
|
|
130
142
|
throw new Error('Unsupported owner kind');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Address, type Chain, type Hex } from 'viem';
|
|
2
2
|
import type { SignerSet } from '../../types';
|
|
3
|
-
declare function sign(signers: SignerSet, chain: Chain, address: Address, hash: Hex): Promise<Hex>;
|
|
3
|
+
declare function sign(signers: SignerSet, chain: Chain, address: Address, hash: Hex, isUserOpHash: boolean): Promise<Hex>;
|
|
4
4
|
export { sign };
|
|
5
5
|
//# sourceMappingURL=message.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../accounts/signing/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,KAAK,EAEV,KAAK,GAAG,EAGT,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAS5C,iBAAe,IAAI,CACjB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../accounts/signing/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,KAAK,EAEV,KAAK,GAAG,EAGT,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAS5C,iBAAe,IAAI,CACjB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,GAAG,EACT,YAAY,EAAE,OAAO,GACpB,OAAO,CAAC,GAAG,CAAC,CAyBd;AA4BD,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -4,24 +4,24 @@ exports.sign = sign;
|
|
|
4
4
|
const viem_1 = require("viem");
|
|
5
5
|
const error_1 = require("../error");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
|
-
async function sign(signers, chain, address, hash) {
|
|
7
|
+
async function sign(signers, chain, address, hash, isUserOpHash) {
|
|
8
8
|
const signingFunctions = {
|
|
9
|
-
signEcdsa: (account, hash) => signEcdsa(account, hash),
|
|
9
|
+
signEcdsa: (account, hash, updateV) => signEcdsa(account, hash, updateV),
|
|
10
10
|
signPasskey: (account, hash) => signPasskey(account, hash),
|
|
11
11
|
};
|
|
12
12
|
switch (signers.type) {
|
|
13
13
|
case 'owner': {
|
|
14
|
-
return (0, common_1.signWithOwners)(signers, chain, address, hash, signingFunctions, sign);
|
|
14
|
+
return (0, common_1.signWithOwners)(signers, chain, address, hash, signingFunctions, isUserOpHash, sign);
|
|
15
15
|
}
|
|
16
16
|
case 'session': {
|
|
17
|
-
return (0, common_1.signWithSession)(signers, chain, address, hash, sign);
|
|
17
|
+
return (0, common_1.signWithSession)(signers, chain, address, hash, isUserOpHash, sign);
|
|
18
18
|
}
|
|
19
19
|
case 'guardians': {
|
|
20
20
|
return (0, common_1.signWithGuardians)(signers, hash, signingFunctions);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
async function signEcdsa(account, hash) {
|
|
24
|
+
async function signEcdsa(account, hash, updateV) {
|
|
25
25
|
if (!account.signMessage) {
|
|
26
26
|
throw new error_1.SigningNotSupportedForAccountError();
|
|
27
27
|
}
|
|
@@ -34,7 +34,7 @@ async function signEcdsa(account, hash) {
|
|
|
34
34
|
if (!v) {
|
|
35
35
|
throw new Error('Invalid signature');
|
|
36
36
|
}
|
|
37
|
-
const newV = v + 4n;
|
|
37
|
+
const newV = updateV ? v + 4n : v;
|
|
38
38
|
const newSignature = (0, viem_1.concat)([r, s, (0, viem_1.toHex)(newV)]);
|
|
39
39
|
return newSignature;
|
|
40
40
|
}
|
|
@@ -24,6 +24,13 @@ declare function packSignature(credIds: Hex[], usePrecompile: boolean, webAuthns
|
|
|
24
24
|
r: bigint;
|
|
25
25
|
s: bigint;
|
|
26
26
|
}[]): Hex;
|
|
27
|
-
|
|
27
|
+
declare function packSignatureV0(webauthn: {
|
|
28
|
+
authenticatorData: Hex;
|
|
29
|
+
clientDataJSON: string;
|
|
30
|
+
typeIndex: number | bigint;
|
|
31
|
+
r: bigint;
|
|
32
|
+
s: bigint;
|
|
33
|
+
}, usePrecompiled: boolean): `0x${string}`;
|
|
34
|
+
export { parsePublicKey, parseSignature, generateCredentialId, packSignature, packSignatureV0, };
|
|
28
35
|
export type { WebAuthnSignature };
|
|
29
36
|
//# sourceMappingURL=passkeys.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"passkeys.d.ts","sourceRoot":"","sources":["../../../../accounts/signing/passkeys.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EAGZ,KAAK,GAAG,EAGT,MAAM,MAAM,CAAA;AAEb,UAAU,iBAAiB;IACzB,iBAAiB,EAAE,GAAG,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAED,iBAAS,cAAc,CAAC,SAAS,EAAE,GAAG,GAAG,UAAU,GAAG;IACpD,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,CAUA;AAED,iBAAS,cAAc,CAAC,SAAS,EAAE,GAAG,GAAG,UAAU,GAAG;IACpD,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,CASA;AAED,iBAAS,oBAAoB,CAC3B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,OAAO,iBAkBjB;AAED,iBAAS,aAAa,CACpB,OAAO,EAAE,GAAG,EAAE,EACd,aAAa,EAAE,OAAO,EACtB,SAAS,EAAE;IACT,iBAAiB,EAAE,GAAG,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,EAAE,GACF,GAAG,CAqDL;AAED,
|
|
1
|
+
{"version":3,"file":"passkeys.d.ts","sourceRoot":"","sources":["../../../../accounts/signing/passkeys.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EAGZ,KAAK,GAAG,EAGT,MAAM,MAAM,CAAA;AAEb,UAAU,iBAAiB;IACzB,iBAAiB,EAAE,GAAG,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAED,iBAAS,cAAc,CAAC,SAAS,EAAE,GAAG,GAAG,UAAU,GAAG;IACpD,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,CAUA;AAED,iBAAS,cAAc,CAAC,SAAS,EAAE,GAAG,GAAG,UAAU,GAAG;IACpD,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,CASA;AAED,iBAAS,oBAAoB,CAC3B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,OAAO,iBAkBjB;AAED,iBAAS,aAAa,CACpB,OAAO,EAAE,GAAG,EAAE,EACd,aAAa,EAAE,OAAO,EACtB,SAAS,EAAE;IACT,iBAAiB,EAAE,GAAG,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,EAAE,GACF,GAAG,CAqDL;AAED,iBAAS,eAAe,CACtB,QAAQ,EAAE;IACR,iBAAiB,EAAE,GAAG,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,EACD,cAAc,EAAE,OAAO,iBAqCxB;AAED,OAAO,EACL,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,eAAe,GAChB,CAAA;AACD,YAAY,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -4,6 +4,7 @@ exports.parsePublicKey = parsePublicKey;
|
|
|
4
4
|
exports.parseSignature = parseSignature;
|
|
5
5
|
exports.generateCredentialId = generateCredentialId;
|
|
6
6
|
exports.packSignature = packSignature;
|
|
7
|
+
exports.packSignatureV0 = packSignatureV0;
|
|
7
8
|
const viem_1 = require("viem");
|
|
8
9
|
function parsePublicKey(publicKey) {
|
|
9
10
|
const bytes = typeof publicKey === 'string' ? (0, viem_1.hexToBytes)(publicKey) : publicKey;
|
|
@@ -88,3 +89,37 @@ function packSignature(credIds, usePrecompile, webAuthns) {
|
|
|
88
89
|
},
|
|
89
90
|
], [credIds, usePrecompile, webAuthns]);
|
|
90
91
|
}
|
|
92
|
+
function packSignatureV0(webauthn, usePrecompiled) {
|
|
93
|
+
return (0, viem_1.encodeAbiParameters)([
|
|
94
|
+
{ type: 'bytes', name: 'authenticatorData' },
|
|
95
|
+
{
|
|
96
|
+
type: 'string',
|
|
97
|
+
name: 'clientDataJSON',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: 'uint256',
|
|
101
|
+
name: 'responseTypeLocation',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
type: 'uint256',
|
|
105
|
+
name: 'r',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
type: 'uint256',
|
|
109
|
+
name: 's',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: 'bool',
|
|
113
|
+
name: 'usePrecompiled',
|
|
114
|
+
},
|
|
115
|
+
], [
|
|
116
|
+
webauthn.authenticatorData,
|
|
117
|
+
webauthn.clientDataJSON,
|
|
118
|
+
typeof webauthn.typeIndex === 'bigint'
|
|
119
|
+
? webauthn.typeIndex
|
|
120
|
+
: BigInt(webauthn.typeIndex),
|
|
121
|
+
webauthn.r,
|
|
122
|
+
webauthn.s,
|
|
123
|
+
usePrecompiled,
|
|
124
|
+
]);
|
|
125
|
+
}
|
|
@@ -70,4 +70,19 @@ const passkeys_1 = require("./passkeys");
|
|
|
70
70
|
(0, vitest_1.expect)(packed).toEqual('0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000026be9646e4d64132d1a1789a467d0501e948d23afce6792d963f401434d7bef339437809df26444a849d303b1174543f0851df5fae657da19f3bb0d92356426ea00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000001700000000000000000000000000000000000000000000000000000000000000017474c214167b8a4704cf06f75287a738e7ddbcca9cc0383db6dac6a7d090f4ee024ff8e2a2e8c54aa8cf5f36e3b6125016c3d58d896e3a85c5cd2cd0027a2625000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97631d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000867b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a22313971416351415643657563467438745153697a424264627857364a6b65785f336e41656a64527556656b222c226f726967696e223a22687474703a2f2f6c6f63616c686f73743a35313733222c2263726f73734f726967696e223a66616c73657d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000170000000000000000000000000000000000000000000000000000000000000001f60f80fe3fd029d1b380d631f0b659bfbc8f8f60921a88e1e123c159aa540f920ed337464d1bb813dc5f9c3e81998185370da49cc525e9f42cdf805f1030aff8000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97631d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000867b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a2234703254695a70546f6f4c43464659544332486d4d50564d69566a5a476768434a30647a377a5544456541222c226f726967696e223a22687474703a2f2f6c6f63616c686f73743a35313733222c2263726f73734f726967696e223a66616c73657d0000000000000000000000000000000000000000000000000000');
|
|
71
71
|
});
|
|
72
72
|
});
|
|
73
|
+
(0, vitest_1.describe)('Pack Signature V0', () => {
|
|
74
|
+
(0, vitest_1.test)('single', () => {
|
|
75
|
+
const usePrecompile = false;
|
|
76
|
+
const webAuthns = {
|
|
77
|
+
authenticatorData: '0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97631d00000000',
|
|
78
|
+
clientDataJSON: '{"type":"webauthn.get","challenge":"4p2TiZpTooLCFFYTC2HmMPVMiVjZGghCJ0dz7zUDEeA","origin":"http://localhost:5173","crossOrigin":false}',
|
|
79
|
+
challengeIndex: 23n,
|
|
80
|
+
typeIndex: 1n,
|
|
81
|
+
r: 111296353735534357766084082487308191701889898756402773464442570100570127077266n,
|
|
82
|
+
s: 6705566102199758127831148650668918567109283965479844611524279039128750829560n,
|
|
83
|
+
};
|
|
84
|
+
const packed = (0, passkeys_1.packSignatureV0)(webAuthns, usePrecompile);
|
|
85
|
+
(0, vitest_1.expect)(packed).toEqual('0x00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000001f60f80fe3fd029d1b380d631f0b659bfbc8f8f60921a88e1e123c159aa540f920ed337464d1bb813dc5f9c3e81998185370da49cc525e9f42cdf805f1030aff80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97631d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000867b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a2234703254695a70546f6f4c43464659544332486d4d50564d69566a5a476768434a30647a377a5544456541222c226f726967696e223a22687474703a2f2f6c6f63616c686f73743a35313733222c2263726f73734f726967696e223a66616c73657d0000000000000000000000000000000000000000000000000000');
|
|
86
|
+
});
|
|
87
|
+
});
|
|
73
88
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typedData.d.ts","sourceRoot":"","sources":["../../../../accounts/signing/typedData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,OAAO,EACP,KAAK,EACL,uBAAuB,EACvB,GAAG,EACH,SAAS,EACV,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAS5C,iBAAe,IAAI,CACjB,SAAS,SAAS,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EACjE,WAAW,SAAS,MAAM,SAAS,GAAG,cAAc,GAAG,MAAM,SAAS,EAEtE,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,uBAAuB,CAAC,SAAS,EAAE,WAAW,CAAC,GAC1D,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"typedData.d.ts","sourceRoot":"","sources":["../../../../accounts/signing/typedData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,OAAO,EACP,KAAK,EACL,uBAAuB,EACvB,GAAG,EACH,SAAS,EACV,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAS5C,iBAAe,IAAI,CACjB,SAAS,SAAS,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EACjE,WAAW,SAAS,MAAM,SAAS,GAAG,cAAc,GAAG,MAAM,SAAS,EAEtE,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,uBAAuB,CAAC,SAAS,EAAE,WAAW,CAAC,GAC1D,OAAO,CAAC,GAAG,CAAC,CA2Bd;AA6BD,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -10,10 +10,10 @@ async function sign(signers, chain, address, parameters) {
|
|
|
10
10
|
};
|
|
11
11
|
switch (signers.type) {
|
|
12
12
|
case 'owner': {
|
|
13
|
-
return (0, common_1.signWithOwners)(signers, chain, address, parameters, signingFunctions, sign);
|
|
13
|
+
return (0, common_1.signWithOwners)(signers, chain, address, parameters, signingFunctions, false, sign);
|
|
14
14
|
}
|
|
15
15
|
case 'session': {
|
|
16
|
-
return (0, common_1.signWithSession)(signers, chain, address, parameters, sign);
|
|
16
|
+
return (0, common_1.signWithSession)(signers, chain, address, parameters, false, sign);
|
|
17
17
|
}
|
|
18
18
|
case 'guardians': {
|
|
19
19
|
return (0, common_1.signWithGuardians)(signers, parameters, signingFunctions);
|
|
@@ -16,7 +16,6 @@ const MOCK_MODULE_ADDRESS = '0x28de6501fa86f2e6cd0b33c3aabdaeb4a1b93f3f';
|
|
|
16
16
|
type: 'ecdsa',
|
|
17
17
|
accounts: [consts_1.accountA, consts_1.accountB],
|
|
18
18
|
},
|
|
19
|
-
rhinestoneApiKey: consts_1.MOCK_API_KEY,
|
|
20
19
|
});
|
|
21
20
|
(0, vitest_1.expect)(factory).toEqual('0x0000003B3E7b530b4f981aE80d9350392Defef90');
|
|
22
21
|
(0, vitest_1.expect)(factoryData).toEqual('0xea6d13ac0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003a0000000000000000000000000000000552a5fae3db7a8f3917c435448f49ba6a9000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000003240984b2f700000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000013fdb5234e4e3162a810f54d9f7e98000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006092086a3dc0020cd604a68fcf5d430007d51bb7000000000000000000000000f6c02c78ded62973b43bfa523b247da0994869360000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000005ad9ce1f5035fd62ca96cef16adaaf000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000');
|
|
@@ -33,7 +32,6 @@ const MOCK_MODULE_ADDRESS = '0x28de6501fa86f2e6cd0b33c3aabdaeb4a1b93f3f';
|
|
|
33
32
|
type: 'passkey',
|
|
34
33
|
accounts: [consts_1.passkeyAccount],
|
|
35
34
|
},
|
|
36
|
-
rhinestoneApiKey: consts_1.MOCK_API_KEY,
|
|
37
35
|
});
|
|
38
36
|
(0, vitest_1.expect)(factory).toEqual('0x0000003B3E7b530b4f981aE80d9350392Defef90');
|
|
39
37
|
(0, vitest_1.expect)(factoryData).toEqual('0xea6d13ac0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000552a5fae3db7a8f3917c435448f49ba6a9000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000003440984b2f700000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000578c4cb0e472a5462da43c495c3f33000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001580a9af0569ad3905b26a703201b358aa0904236642ebe79b22a19d00d3737637d46f725a5427ae45a9569259bf67e1e16b187d7b3ad1ed70138c4f0409677d100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000005ad9ce1f5035fd62ca96cef16adaaf000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000');
|
|
@@ -52,7 +50,6 @@ const MOCK_MODULE_ADDRESS = '0x28de6501fa86f2e6cd0b33c3aabdaeb4a1b93f3f';
|
|
|
52
50
|
type: 'ecdsa',
|
|
53
51
|
accounts: [consts_1.accountA, consts_1.accountB],
|
|
54
52
|
},
|
|
55
|
-
rhinestoneApiKey: consts_1.MOCK_API_KEY,
|
|
56
53
|
});
|
|
57
54
|
(0, vitest_1.expect)(address).toEqual('0x614ea8885429c480a83deddd2e050d411da36d4b');
|
|
58
55
|
});
|
|
@@ -65,7 +62,6 @@ const MOCK_MODULE_ADDRESS = '0x28de6501fa86f2e6cd0b33c3aabdaeb4a1b93f3f';
|
|
|
65
62
|
type: 'passkey',
|
|
66
63
|
accounts: [consts_1.passkeyAccount],
|
|
67
64
|
},
|
|
68
|
-
rhinestoneApiKey: consts_1.MOCK_API_KEY,
|
|
69
65
|
});
|
|
70
66
|
(0, vitest_1.expect)(address).toEqual('0x4d78f6b273d07f2fd24433ebc7a90d89f0d061ae');
|
|
71
67
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { Address,
|
|
2
|
-
import type {
|
|
1
|
+
import type { Address, Client, Hex } from 'viem';
|
|
2
|
+
import type { RhinestoneConfig } from '../types';
|
|
3
|
+
import { createTransport } from './json-rpc';
|
|
3
4
|
type CallType = 'call' | 'delegatecall' | 'batchcall';
|
|
4
5
|
interface ValidatorConfig {
|
|
5
6
|
address: Address;
|
|
@@ -26,8 +27,7 @@ interface GetAccountNonceParams {
|
|
|
26
27
|
}
|
|
27
28
|
declare function encode7579Calls<callType extends CallType>({ mode, callData, }: EncodeCallDataParams<callType>): Hex;
|
|
28
29
|
declare function getAccountNonce(client: Client, args: GetAccountNonceParams): Promise<bigint>;
|
|
29
|
-
declare function getBundlerClient(config:
|
|
30
|
-
declare function createTransport(chain: Chain, provider?: ProviderConfig): Transport;
|
|
30
|
+
declare function getBundlerClient(config: RhinestoneConfig, client: Client): import("viem/account-abstraction").BundlerClient<import("viem").HttpTransport<undefined, false>, undefined, undefined, Client, undefined>;
|
|
31
31
|
export { encode7579Calls, getAccountNonce, getBundlerClient, createTransport };
|
|
32
32
|
export type { ValidatorConfig };
|
|
33
33
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../accounts/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../accounts/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAgBhD,OAAO,KAAK,EAAkC,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAE5C,KAAK,QAAQ,GAAG,MAAM,GAAG,cAAc,GAAG,WAAW,CAAA;AAErD,UAAU,eAAe;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;CAChB;AAED,UAAU,aAAa,CAAC,QAAQ,SAAS,QAAQ;IAC/C,IAAI,EAAE,QAAQ,CAAA;IACd,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,OAAO,CAAC,EAAE,GAAG,CAAA;CACd;AAED,UAAU,oBAAoB,CAAC,QAAQ,SAAS,QAAQ;IACtD,IAAI,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAA;IAC7B,QAAQ,EAAE,SAAS;QACjB,EAAE,EAAE,OAAO,CAAA;QACX,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,EAAE,GAAG,GAAG,SAAS,CAAA;KACvB,EAAE,CAAA;CACJ;AAED,UAAU,qBAAqB;IAC7B,OAAO,EAAE,OAAO,CAAA;IAChB,iBAAiB,EAAE,OAAO,CAAA;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAkDD,iBAAS,eAAe,CAAC,QAAQ,SAAS,QAAQ,EAAE,EAClD,IAAI,EACJ,QAAQ,GACT,EAAE,oBAAoB,CAAC,QAAQ,CAAC,GAAG,GAAG,CAuFtC;AAED,iBAAe,eAAe,CAC5B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,MAAM,CAAC,CAmCjB;AAED,iBAAS,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,6IA2CjE;AAyBD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAA;AAC9E,YAAY,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTransport = void 0;
|
|
3
4
|
exports.encode7579Calls = encode7579Calls;
|
|
4
5
|
exports.getAccountNonce = getAccountNonce;
|
|
5
6
|
exports.getBundlerClient = getBundlerClient;
|
|
6
|
-
exports.createTransport = createTransport;
|
|
7
7
|
const viem_1 = require("viem");
|
|
8
8
|
const account_abstraction_1 = require("viem/account-abstraction");
|
|
9
9
|
const actions_1 = require("viem/actions");
|
|
10
|
-
const chains_1 = require("viem/chains");
|
|
11
10
|
const utils_1 = require("viem/utils");
|
|
11
|
+
const json_rpc_1 = require("./json-rpc");
|
|
12
|
+
Object.defineProperty(exports, "createTransport", { enumerable: true, get: function () { return json_rpc_1.createTransport; } });
|
|
12
13
|
function parseCallType(callType) {
|
|
13
14
|
switch (callType) {
|
|
14
15
|
case 'call':
|
|
@@ -198,41 +199,3 @@ async function getGasPriceEstimate(bundlerUrl) {
|
|
|
198
199
|
maxPriorityFeePerGas: BigInt(json.result.fast.maxPriorityFeePerGas),
|
|
199
200
|
};
|
|
200
201
|
}
|
|
201
|
-
function createTransport(chain, provider) {
|
|
202
|
-
if (!provider) {
|
|
203
|
-
return (0, viem_1.http)();
|
|
204
|
-
}
|
|
205
|
-
switch (provider.type) {
|
|
206
|
-
case 'alchemy': {
|
|
207
|
-
const alchemyNetwork = getAlchemyNetworkName(chain.id);
|
|
208
|
-
const jsonRpcEndpoint = `https://${alchemyNetwork}.g.alchemy.com/v2/${provider.apiKey}`;
|
|
209
|
-
return (0, viem_1.http)(jsonRpcEndpoint);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
function getAlchemyNetworkName(chainId) {
|
|
214
|
-
switch (chainId) {
|
|
215
|
-
case chains_1.mainnet.id:
|
|
216
|
-
return 'eth-mainnet';
|
|
217
|
-
case chains_1.sepolia.id:
|
|
218
|
-
return 'eth-sepolia';
|
|
219
|
-
case chains_1.polygon.id:
|
|
220
|
-
return 'polygon-mainnet';
|
|
221
|
-
case chains_1.optimism.id:
|
|
222
|
-
return 'opt-mainnet';
|
|
223
|
-
case chains_1.optimismSepolia.id:
|
|
224
|
-
return 'opt-sepolia';
|
|
225
|
-
case chains_1.arbitrum.id:
|
|
226
|
-
return 'arb-mainnet';
|
|
227
|
-
case chains_1.arbitrumSepolia.id:
|
|
228
|
-
return 'arb-sepolia';
|
|
229
|
-
case chains_1.base.id:
|
|
230
|
-
return 'base-mainnet';
|
|
231
|
-
case chains_1.baseSepolia.id:
|
|
232
|
-
return 'base-sepolia';
|
|
233
|
-
case chains_1.zksync.id:
|
|
234
|
-
return 'zksync-mainnet';
|
|
235
|
-
case chains_1.soneium.id:
|
|
236
|
-
return 'soneium-mainnet';
|
|
237
|
-
}
|
|
238
|
-
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Account, WalletClient } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* Adapts a Viem/Wagmi WalletClient into an Account-like signer that the SDK can consume.
|
|
4
|
+
* Ensures address is set and routes sign methods through the provided client.
|
|
5
|
+
*/
|
|
6
|
+
export declare function walletClientToAccount(walletClient: WalletClient): Account;
|
|
7
|
+
//# sourceMappingURL=walletClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walletClient.d.ts","sourceRoot":"","sources":["../../../accounts/walletClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAMP,YAAY,EACb,MAAM,MAAM,CAAA;AAGb;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CA2CzE"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.walletClientToAccount = walletClientToAccount;
|
|
4
|
+
const error_1 = require("./error");
|
|
5
|
+
/**
|
|
6
|
+
* Adapts a Viem/Wagmi WalletClient into an Account-like signer that the SDK can consume.
|
|
7
|
+
* Ensures address is set and routes sign methods through the provided client.
|
|
8
|
+
*/
|
|
9
|
+
function walletClientToAccount(walletClient) {
|
|
10
|
+
const address = walletClient.account?.address;
|
|
11
|
+
if (!address) {
|
|
12
|
+
throw new error_1.WalletClientNoConnectedAccountError();
|
|
13
|
+
}
|
|
14
|
+
const account = {
|
|
15
|
+
address,
|
|
16
|
+
// EIP-191 message signing
|
|
17
|
+
async signMessage({ message, }) {
|
|
18
|
+
return walletClient.signMessage({ account: address, message });
|
|
19
|
+
},
|
|
20
|
+
// EIP-712 typed data signing
|
|
21
|
+
async signTypedData(parameters) {
|
|
22
|
+
const def = parameters;
|
|
23
|
+
const signature = walletClient.signTypedData({
|
|
24
|
+
account: address,
|
|
25
|
+
...def,
|
|
26
|
+
});
|
|
27
|
+
return signature;
|
|
28
|
+
},
|
|
29
|
+
// Raw transaction signing (not currently used by the SDK paths, but provided for completeness)
|
|
30
|
+
async signTransaction(transaction) {
|
|
31
|
+
return walletClient.signTransaction({
|
|
32
|
+
account: address,
|
|
33
|
+
...transaction,
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
return account;
|
|
38
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Address } from 'viem';
|
|
2
|
+
import type { CalldataInput, LazyCallInput } from '../types';
|
|
3
|
+
declare function depositEther(value: bigint): LazyCallInput;
|
|
4
|
+
declare function enableEtherWithdrawal(): CalldataInput;
|
|
5
|
+
declare function disableEtherWithdrawal(): CalldataInput;
|
|
6
|
+
declare function withdrawEther(value: bigint): LazyCallInput;
|
|
7
|
+
declare function depositErc20(tokenAddress: Address, amount: bigint): LazyCallInput;
|
|
8
|
+
declare function enableErc20Withdrawal(tokenAddress: Address): CalldataInput;
|
|
9
|
+
declare function disableErc20Withdrawal(tokenAddress: Address): CalldataInput;
|
|
10
|
+
declare function withdrawErc20(tokenAddress: Address, amount: bigint): LazyCallInput;
|
|
11
|
+
declare function approveErc20(tokenAddress: Address, amount: bigint): CalldataInput;
|
|
12
|
+
export { depositEther, enableEtherWithdrawal, disableEtherWithdrawal, withdrawEther, depositErc20, enableErc20Withdrawal, disableErc20Withdrawal, withdrawErc20, approveErc20, };
|
|
13
|
+
//# sourceMappingURL=compact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compact.d.ts","sourceRoot":"","sources":["../../../actions/compact.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EAMb,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAkB5D,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CA2BlD;AAED,iBAAS,qBAAqB,IAAI,aAAa,CAG9C;AAED,iBAAS,sBAAsB,IAAI,aAAa,CAG/C;AAED,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAOnD;AAED,iBAAS,YAAY,CAAC,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CA6B1E;AAED,iBAAS,qBAAqB,CAAC,YAAY,EAAE,OAAO,GAAG,aAAa,CAGnE;AAED,iBAAS,sBAAsB,CAAC,YAAY,EAAE,OAAO,GAAG,aAAa,CAGpE;AAED,iBAAS,aAAa,CAAC,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CAO3E;AAsED,iBAAS,YAAY,CAAC,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CAU1E;AAoCD,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,qBAAqB,EACrB,sBAAsB,EACtB,aAAa,EACb,YAAY,GACb,CAAA"}
|