@rhinestone/sdk 1.0.0-alpha.25 → 1.0.0-alpha.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/accounts/index.d.ts +10 -3
- package/dist/src/accounts/index.d.ts.map +1 -1
- package/dist/src/accounts/index.js +114 -36
- package/dist/src/accounts/index.test.js +2 -2
- package/dist/src/accounts/kernel.d.ts +1 -1
- package/dist/src/accounts/kernel.d.ts.map +1 -1
- package/dist/src/accounts/kernel.js +28 -1
- package/dist/src/accounts/kernel.test.js +37 -4
- package/dist/src/accounts/nexus.d.ts +4 -3
- package/dist/src/accounts/nexus.d.ts.map +1 -1
- package/dist/src/accounts/nexus.js +82 -14
- package/dist/src/accounts/nexus.test.js +35 -2
- package/dist/src/accounts/safe.d.ts.map +1 -1
- package/dist/src/accounts/safe.js +78 -55
- package/dist/src/accounts/safe.test.js +35 -2
- package/dist/src/accounts/signing/common.d.ts +1 -1
- package/dist/src/accounts/signing/common.d.ts.map +1 -1
- package/dist/src/accounts/signing/common.js +14 -13
- package/dist/src/accounts/signing/message.js +3 -3
- package/dist/src/accounts/signing/passkeys.d.ts +8 -1
- package/dist/src/accounts/signing/passkeys.d.ts.map +1 -1
- package/dist/src/accounts/signing/passkeys.js +35 -0
- package/dist/src/accounts/signing/passkeys.test.js +15 -0
- package/dist/src/actions/index.d.ts +1 -1
- package/dist/src/actions/index.d.ts.map +1 -1
- package/dist/src/actions/index.js +3 -6
- package/dist/src/actions/index.test.js +11 -11
- package/dist/src/execution/index.d.ts +11 -2
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +23 -16
- package/dist/src/execution/utils.d.ts +1 -1
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +23 -5
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +12 -0
- package/dist/src/modules/index.d.ts +2 -1
- package/dist/src/modules/index.d.ts.map +1 -1
- package/dist/src/modules/index.js +16 -13
- package/dist/src/modules/index.test.js +3 -3
- package/dist/src/modules/validators/core.d.ts +4 -3
- package/dist/src/modules/validators/core.d.ts.map +1 -1
- package/dist/src/modules/validators/core.js +24 -14
- package/dist/src/modules/validators/core.test.js +4 -4
- package/dist/src/types.d.ts +30 -20
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/src/accounts/custom.d.ts +0 -18
- package/dist/src/accounts/custom.d.ts.map +0 -1
- package/dist/src/accounts/custom.js +0 -121
- package/dist/src/accounts/custom.test.d.ts +0 -2
- package/dist/src/accounts/custom.test.d.ts.map +0 -1
- package/dist/src/accounts/custom.test.js +0 -64
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.WEBAUTHN_V0_VALIDATOR_ADDRESS = exports.MULTI_FACTOR_VALIDATOR_ADDRESS = exports.WEBAUTHN_VALIDATOR_ADDRESS = exports.OWNABLE_VALIDATOR_ADDRESS = void 0;
|
|
4
4
|
exports.getOwnerValidator = getOwnerValidator;
|
|
5
5
|
exports.getOwnableValidator = getOwnableValidator;
|
|
6
6
|
exports.getWebAuthnValidator = getWebAuthnValidator;
|
|
@@ -8,17 +8,21 @@ exports.getMultiFactorValidator = getMultiFactorValidator;
|
|
|
8
8
|
exports.getSocialRecoveryValidator = getSocialRecoveryValidator;
|
|
9
9
|
exports.getValidator = getValidator;
|
|
10
10
|
exports.getMockSignature = getMockSignature;
|
|
11
|
+
exports.supportsEip712 = supportsEip712;
|
|
11
12
|
const viem_1 = require("viem");
|
|
12
13
|
const common_1 = require("../common");
|
|
13
|
-
const OWNABLE_VALIDATOR_ADDRESS = '
|
|
14
|
+
const OWNABLE_VALIDATOR_ADDRESS = '0x000000000013fdb5234e4e3162a810f54d9f7e98';
|
|
14
15
|
exports.OWNABLE_VALIDATOR_ADDRESS = OWNABLE_VALIDATOR_ADDRESS;
|
|
15
|
-
const WEBAUTHN_VALIDATOR_ADDRESS = '
|
|
16
|
+
const WEBAUTHN_VALIDATOR_ADDRESS = '0x0000000000578c4cb0e472a5462da43c495c3f33';
|
|
16
17
|
exports.WEBAUTHN_VALIDATOR_ADDRESS = WEBAUTHN_VALIDATOR_ADDRESS;
|
|
17
|
-
const SOCIAL_RECOVERY_VALIDATOR_ADDRESS = '
|
|
18
|
-
const MULTI_FACTOR_VALIDATOR_ADDRESS = '
|
|
18
|
+
const SOCIAL_RECOVERY_VALIDATOR_ADDRESS = '0xa04d053b3c8021e8d5bf641816c42daa75d8b597';
|
|
19
|
+
const MULTI_FACTOR_VALIDATOR_ADDRESS = '0xf6bdf42c9be18ceca5c06c42a43daf7fbbe7896b';
|
|
19
20
|
exports.MULTI_FACTOR_VALIDATOR_ADDRESS = MULTI_FACTOR_VALIDATOR_ADDRESS;
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
// Legacy
|
|
22
|
+
const OWNABLE_V0_VALIDATOR_ADDRESS = '0x2483da3a338895199e5e538530213157e931bf06';
|
|
23
|
+
const OWNABLE_BETA_VALIDATOR_ADDRESS = '0x0000000000e9e6e96bcaa3c113187cdb7e38aed9';
|
|
24
|
+
const WEBAUTHN_V0_VALIDATOR_ADDRESS = '0x0000000000578c4cb0e472a5462da43c495c3f33';
|
|
25
|
+
exports.WEBAUTHN_V0_VALIDATOR_ADDRESS = WEBAUTHN_V0_VALIDATOR_ADDRESS;
|
|
22
26
|
const ECDSA_MOCK_SIGNATURE = '0x81d4b4981670cb18f99f0b4a66446df1bf5b204d24cfcb659bf38ba27a4359b5711649ec2423c5e1247245eba2964679b6a1dbb85c992ae40b9b00c6935b02ff1b';
|
|
23
27
|
const WEBAUTHN_MOCK_SIGNATURE = '0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001b9b86eb98fda3ed4d797d9e690588dfadf17b329a76a47cec935bebf92d7ddc80000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000001700000000000000000000000000000000000000000000000000000000000000019b2e9410bb6850f9f660a03d609d5a844fb96bcdc87a15139b03ee22c70f469100d2b865a215c3bf786387064effa8fcedcb1d625b5148f8a1236d5e3ff11acf000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d9763050000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000867b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a22396a4546696a75684557724d34534f572d7443684a625545484550343456636a634a2d42716f3166544d38222c226f726967696e223a22687474703a2f2f6c6f63616c686f73743a38303830222c2263726f73734f726967696e223a66616c73657d0000000000000000000000000000000000000000000000000000';
|
|
24
28
|
function getOwnerValidator(config) {
|
|
@@ -26,8 +30,7 @@ function getOwnerValidator(config) {
|
|
|
26
30
|
}
|
|
27
31
|
function getMockSignature(ownerSet) {
|
|
28
32
|
switch (ownerSet.type) {
|
|
29
|
-
case 'ecdsa':
|
|
30
|
-
case 'ecdsa-v0': {
|
|
33
|
+
case 'ecdsa': {
|
|
31
34
|
const owners = ownerSet.accounts.map((account) => account.address);
|
|
32
35
|
const signatures = owners.map(() => ECDSA_MOCK_SIGNATURE);
|
|
33
36
|
return (0, viem_1.concat)(signatures);
|
|
@@ -68,9 +71,7 @@ function getMockSignature(ownerSet) {
|
|
|
68
71
|
function getValidator(owners) {
|
|
69
72
|
switch (owners.type) {
|
|
70
73
|
case 'ecdsa':
|
|
71
|
-
return getOwnableValidator(owners.threshold ?? 1, owners.accounts.map((account) => account.address));
|
|
72
|
-
case 'ecdsa-v0':
|
|
73
|
-
return getOwnableValidator(owners.threshold ?? 1, owners.accounts.map((account) => account.address), OWNABLE_V0_VALIDATOR_ADDRESS);
|
|
74
|
+
return getOwnableValidator(owners.threshold ?? 1, owners.accounts.map((account) => account.address), owners.module);
|
|
74
75
|
case 'passkey':
|
|
75
76
|
return getWebAuthnValidator(owners.threshold ?? 1, owners.accounts.map((account) => ({
|
|
76
77
|
pubKey: account.publicKey,
|
|
@@ -96,7 +97,7 @@ function getOwnableValidator(threshold, owners, address) {
|
|
|
96
97
|
type: common_1.MODULE_TYPE_ID_VALIDATOR,
|
|
97
98
|
};
|
|
98
99
|
}
|
|
99
|
-
function getWebAuthnValidator(threshold, webAuthnCredentials) {
|
|
100
|
+
function getWebAuthnValidator(threshold, webAuthnCredentials, address) {
|
|
100
101
|
function getPublicKey(webAuthnCredential) {
|
|
101
102
|
if (typeof webAuthnCredential.pubKey === 'string' ||
|
|
102
103
|
webAuthnCredential.pubKey instanceof Uint8Array) {
|
|
@@ -117,7 +118,7 @@ function getWebAuthnValidator(threshold, webAuthnCredentials) {
|
|
|
117
118
|
}
|
|
118
119
|
const publicKeys = webAuthnCredentials.map(getPublicKey);
|
|
119
120
|
return {
|
|
120
|
-
address: WEBAUTHN_VALIDATOR_ADDRESS,
|
|
121
|
+
address: address ?? WEBAUTHN_VALIDATOR_ADDRESS,
|
|
121
122
|
initData: (0, viem_1.encodeAbiParameters)([
|
|
122
123
|
{ name: 'threshold', type: 'uint256' },
|
|
123
124
|
{
|
|
@@ -225,3 +226,12 @@ function parsePublicKey(publicKey) {
|
|
|
225
226
|
y: BigInt((0, viem_1.bytesToHex)(y)),
|
|
226
227
|
};
|
|
227
228
|
}
|
|
229
|
+
function supportsEip712(validator) {
|
|
230
|
+
switch (validator.address.toLowerCase()) {
|
|
231
|
+
case OWNABLE_BETA_VALIDATOR_ADDRESS: // Ownable Validator V1-beta
|
|
232
|
+
case OWNABLE_V0_VALIDATOR_ADDRESS: // Ownable Validator V0
|
|
233
|
+
return false;
|
|
234
|
+
default:
|
|
235
|
+
return true;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
@@ -14,7 +14,7 @@ const core_1 = require("./core");
|
|
|
14
14
|
});
|
|
15
15
|
(0, vitest_1.expect)(validator.type).toEqual(common_1.MODULE_TYPE_ID_VALIDATOR);
|
|
16
16
|
(0, vitest_1.expect)((0, viem_1.isAddress)(validator.address)).toEqual(true);
|
|
17
|
-
(0, vitest_1.expect)(validator.address).toEqual('
|
|
17
|
+
(0, vitest_1.expect)(validator.address).toEqual('0x000000000013fdb5234e4e3162a810f54d9f7e98');
|
|
18
18
|
(0, vitest_1.expect)(validator.initData).toEqual('0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f6c02c78ded62973b43bfa523b247da099486936');
|
|
19
19
|
});
|
|
20
20
|
(0, vitest_1.test)('ECDSA: two addresses', () => {
|
|
@@ -24,7 +24,7 @@ const core_1 = require("./core");
|
|
|
24
24
|
});
|
|
25
25
|
(0, vitest_1.expect)(validator.type).toEqual(common_1.MODULE_TYPE_ID_VALIDATOR);
|
|
26
26
|
(0, vitest_1.expect)((0, viem_1.isAddress)(validator.address)).toEqual(true);
|
|
27
|
-
(0, vitest_1.expect)(validator.address).toEqual('
|
|
27
|
+
(0, vitest_1.expect)(validator.address).toEqual('0x000000000013fdb5234e4e3162a810f54d9f7e98');
|
|
28
28
|
(0, vitest_1.expect)(validator.initData).toEqual('0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006092086a3dc0020cd604a68fcf5d430007d51bb7000000000000000000000000f6c02c78ded62973b43bfa523b247da099486936');
|
|
29
29
|
});
|
|
30
30
|
(0, vitest_1.test)('ECDSA: three addresses, custom threshold', () => {
|
|
@@ -35,7 +35,7 @@ const core_1 = require("./core");
|
|
|
35
35
|
});
|
|
36
36
|
(0, vitest_1.expect)(validator.type).toEqual(common_1.MODULE_TYPE_ID_VALIDATOR);
|
|
37
37
|
(0, vitest_1.expect)((0, viem_1.isAddress)(validator.address)).toEqual(true);
|
|
38
|
-
(0, vitest_1.expect)(validator.address).toEqual('
|
|
38
|
+
(0, vitest_1.expect)(validator.address).toEqual('0x000000000013fdb5234e4e3162a810f54d9f7e98');
|
|
39
39
|
(0, vitest_1.expect)(validator.initData).toEqual('0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000030000000000000000000000006092086a3dc0020cd604a68fcf5d430007d51bb7000000000000000000000000c27b7578151c5ef713c62c65db09763d57ac3596000000000000000000000000f6c02c78ded62973b43bfa523b247da099486936');
|
|
40
40
|
});
|
|
41
41
|
(0, vitest_1.test)('Passkey', () => {
|
|
@@ -45,7 +45,7 @@ const core_1 = require("./core");
|
|
|
45
45
|
});
|
|
46
46
|
(0, vitest_1.expect)(validator.type).toEqual(common_1.MODULE_TYPE_ID_VALIDATOR);
|
|
47
47
|
(0, vitest_1.expect)((0, viem_1.isAddress)(validator.address)).toEqual(true);
|
|
48
|
-
(0, vitest_1.expect)(validator.address).toEqual('
|
|
48
|
+
(0, vitest_1.expect)(validator.address).toEqual('0x0000000000578c4cb0e472a5462da43c495c3f33');
|
|
49
49
|
(0, vitest_1.expect)(validator.initData).toEqual('0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001580a9af0569ad3905b26a703201b358aa0904236642ebe79b22a19d00d3737637d46f725a5427ae45a9569259bf67e1e16b187d7b3ad1ed70138c4f0409677d10000000000000000000000000000000000000000000000000000000000000000');
|
|
50
50
|
});
|
|
51
51
|
});
|
package/dist/src/types.d.ts
CHANGED
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
import type { Account, Address, Chain, Hex } from 'viem';
|
|
2
2
|
import type { WebAuthnAccount } from 'viem/account-abstraction';
|
|
3
|
-
import type { ValidatorConfig } from './accounts/utils';
|
|
4
|
-
import type { Module } from './modules/common';
|
|
5
3
|
import type { EnableSessionData } from './modules/validators/smart-sessions';
|
|
6
4
|
import type { SettlementLayer } from './orchestrator/types';
|
|
7
5
|
type AccountType = 'safe' | 'nexus' | 'kernel' | 'startale' | 'custom';
|
|
8
|
-
interface
|
|
9
|
-
type:
|
|
10
|
-
|
|
6
|
+
interface SafeAccount {
|
|
7
|
+
type: 'safe';
|
|
8
|
+
version?: '1.4.1';
|
|
9
|
+
adapter?: '1.0.0' | '2.0.0';
|
|
11
10
|
}
|
|
12
|
-
interface
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
getPackedSignature: (signature: Hex, validator: ValidatorConfig, transformSignature: (signature: Hex) => Hex) => Promise<Hex>;
|
|
20
|
-
getSessionStubSignature: (session: Session, enableData: EnableSessionData | null) => Promise<Hex>;
|
|
21
|
-
signSessionUserOperation: (session: Session, enableData: EnableSessionData | null, hash: Hex) => Promise<Hex>;
|
|
22
|
-
getStubSignature: () => Promise<Hex>;
|
|
23
|
-
sign: (hash: Hex) => Promise<Hex>;
|
|
11
|
+
interface NexusAccount {
|
|
12
|
+
type: 'nexus';
|
|
13
|
+
version?: '1.0.2' | '1.2.0' | 'rhinestone-1.0.0-beta' | 'rhinestone-1.0.0';
|
|
14
|
+
}
|
|
15
|
+
interface KernelAccount {
|
|
16
|
+
type: 'kernel';
|
|
17
|
+
version?: '3.1' | '3.2' | '3.3';
|
|
24
18
|
}
|
|
19
|
+
interface StartaleAccount {
|
|
20
|
+
type: 'startale';
|
|
21
|
+
}
|
|
22
|
+
type AccountProviderConfig = SafeAccount | NexusAccount | KernelAccount | StartaleAccount;
|
|
25
23
|
interface OwnableValidatorConfig {
|
|
26
|
-
type: 'ecdsa'
|
|
24
|
+
type: 'ecdsa';
|
|
27
25
|
accounts: Account[];
|
|
28
26
|
threshold?: number;
|
|
27
|
+
module?: Address;
|
|
29
28
|
}
|
|
30
29
|
interface WebauthnValidatorConfig {
|
|
31
30
|
type: 'passkey';
|
|
32
31
|
accounts: WebAuthnAccount[];
|
|
33
32
|
threshold?: number;
|
|
33
|
+
module?: Address;
|
|
34
34
|
}
|
|
35
35
|
interface MultiFactorValidatorConfig {
|
|
36
36
|
type: 'multi-factor';
|
|
37
37
|
validators: (OwnableValidatorConfig | WebauthnValidatorConfig)[];
|
|
38
38
|
threshold?: number;
|
|
39
|
+
module?: Address;
|
|
39
40
|
}
|
|
40
41
|
interface ProviderConfig {
|
|
41
42
|
type: 'alchemy';
|
|
@@ -109,6 +110,12 @@ interface RhinestoneAccountConfig {
|
|
|
109
110
|
sessions?: Session[];
|
|
110
111
|
recovery?: Recovery;
|
|
111
112
|
eoa?: Account;
|
|
113
|
+
initData?: {
|
|
114
|
+
address: Address;
|
|
115
|
+
factory: Address;
|
|
116
|
+
factoryData: Hex;
|
|
117
|
+
intentExecutorInstalled: boolean;
|
|
118
|
+
};
|
|
112
119
|
provider?: ProviderConfig;
|
|
113
120
|
bundler?: BundlerConfig;
|
|
114
121
|
paymaster?: PaymasterConfig;
|
|
@@ -135,17 +142,19 @@ interface TokenRequest {
|
|
|
135
142
|
}
|
|
136
143
|
type OwnerSignerSet = {
|
|
137
144
|
type: 'owner';
|
|
138
|
-
kind: 'ecdsa'
|
|
145
|
+
kind: 'ecdsa';
|
|
139
146
|
accounts: Account[];
|
|
147
|
+
module?: Address;
|
|
140
148
|
} | {
|
|
141
149
|
type: 'owner';
|
|
142
150
|
kind: 'passkey';
|
|
143
151
|
accounts: WebAuthnAccount[];
|
|
152
|
+
module?: Address;
|
|
144
153
|
} | {
|
|
145
154
|
type: 'owner';
|
|
146
155
|
kind: 'multi-factor';
|
|
147
156
|
validators: ({
|
|
148
|
-
type: 'ecdsa'
|
|
157
|
+
type: 'ecdsa';
|
|
149
158
|
id: number | Hex;
|
|
150
159
|
accounts: Account[];
|
|
151
160
|
} | {
|
|
@@ -153,6 +162,7 @@ type OwnerSignerSet = {
|
|
|
153
162
|
id: number | Hex;
|
|
154
163
|
accounts: WebAuthnAccount[];
|
|
155
164
|
})[];
|
|
165
|
+
module?: Address;
|
|
156
166
|
};
|
|
157
167
|
interface SessionSignerSet {
|
|
158
168
|
type: 'session';
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,KAAK,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAA;AAEtE,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;CAC5B;AAED,UAAU,YAAY;IACpB,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,uBAAuB,GAAG,kBAAkB,CAAA;CAC3E;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,QAAQ,CAAA;IACd,OAAO,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAA;CAChC;AAED,UAAU,eAAe;IACvB,IAAI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,CAAA;CACnB;AAED,KAAK,WAAW,GAAG,oBAAoB,GAAG,qBAAqB,CAAA;AAE/D,YAAY,EACV,WAAW,EACX,uBAAuB,EACvB,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,eAAe,EACf,WAAW,EACX,WAAW,EACX,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,SAAS,EACT,OAAO,EACP,QAAQ,EACR,MAAM,EACN,mCAAmC,GACpC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type Abi, type Address, type Hex, type PublicClient } from 'viem';
|
|
2
|
-
import { type SmartAccount, type SmartAccountImplementation } from 'viem/account-abstraction';
|
|
3
|
-
import type { Module } from '../modules/common';
|
|
4
|
-
import type { EnableSessionData } from '../modules/validators/smart-sessions';
|
|
5
|
-
import type { RhinestoneAccountConfig, Session } from '../types';
|
|
6
|
-
import { type ValidatorConfig } from './utils';
|
|
7
|
-
declare function getDeployArgs(config: RhinestoneAccountConfig): {
|
|
8
|
-
factory: Address;
|
|
9
|
-
factoryData: Hex;
|
|
10
|
-
};
|
|
11
|
-
declare function getInstallData(config: RhinestoneAccountConfig, module: Module): Hex[];
|
|
12
|
-
declare function getAddress(config: RhinestoneAccountConfig): Address;
|
|
13
|
-
declare function getPackedSignature(config: RhinestoneAccountConfig, signature: Hex, validator: ValidatorConfig, transformSignature?: (signature: Hex) => Hex): Promise<`0x${string}`>;
|
|
14
|
-
declare function getSessionSmartAccount(config: RhinestoneAccountConfig, client: PublicClient, address: Address, session: Session, validatorAddress: Address, enableData: EnableSessionData | null): Promise<SmartAccount<SmartAccountImplementation<Abi, "0.7">>>;
|
|
15
|
-
declare function getBaseSmartAccount(address: Address, client: PublicClient, validatorAddress: Address, getStubSignature: () => Promise<Hex>, signUserOperation: (hash: Hex) => Promise<Hex>): Promise<SmartAccount<SmartAccountImplementation<Abi, '0.7'>>>;
|
|
16
|
-
declare function getSmartAccount(config: RhinestoneAccountConfig, client: PublicClient, address: Address, validatorAddress: Address, sign: (hash: Hex) => Promise<Hex>): Promise<SmartAccount<SmartAccountImplementation<Abi, "0.7">>>;
|
|
17
|
-
export { getDeployArgs, getInstallData, getAddress, getPackedSignature, getSessionSmartAccount, getBaseSmartAccount, getSmartAccount, };
|
|
18
|
-
//# sourceMappingURL=custom.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom.d.ts","sourceRoot":"","sources":["../../../accounts/custom.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EACR,KAAK,OAAO,EAEZ,KAAK,GAAG,EACR,KAAK,YAAY,EAClB,MAAM,MAAM,CAAA;AACb,OAAO,EAIL,KAAK,YAAY,EACjB,KAAK,0BAA0B,EAEhC,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAA;AAC7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAChE,OAAO,EAAoC,KAAK,eAAe,EAAE,MAAM,SAAS,CAAA;AAEhF,iBAAS,aAAa,CAAC,MAAM,EAAE,uBAAuB;;;EAMrD;AAED,iBAAS,cAAc,CACrB,MAAM,EAAE,uBAAuB,EAC/B,MAAM,EAAE,MAAM,GACb,GAAG,EAAE,CAMP;AAED,iBAAS,UAAU,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAM5D;AAED,iBAAe,kBAAkB,CAC/B,MAAM,EAAE,uBAAuB,EAC/B,SAAS,EAAE,GAAG,EACd,SAAS,EAAE,eAAe,EAC1B,kBAAkB,GAAE,CAAC,SAAS,EAAE,GAAG,KAAK,GAA8B,0BAWvE;AAED,iBAAe,sBAAsB,CACnC,MAAM,EAAE,uBAAuB,EAC/B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,OAAO,EACzB,UAAU,EAAE,iBAAiB,GAAG,IAAI,iEAyBrC;AAED,iBAAe,mBAAmB,CAChC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,YAAY,EACpB,gBAAgB,EAAE,OAAO,EACzB,gBAAgB,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,EACpC,iBAAiB,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,GAC7C,OAAO,CAAC,YAAY,CAAC,0BAA0B,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAgE/D;AAED,iBAAe,eAAe,CAC5B,MAAM,EAAE,uBAAuB,EAC/B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,OAAO,EACzB,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,iEAelC;AAED,OAAO,EACL,aAAa,EACb,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,GAChB,CAAA"}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDeployArgs = getDeployArgs;
|
|
4
|
-
exports.getInstallData = getInstallData;
|
|
5
|
-
exports.getAddress = getAddress;
|
|
6
|
-
exports.getPackedSignature = getPackedSignature;
|
|
7
|
-
exports.getSessionSmartAccount = getSessionSmartAccount;
|
|
8
|
-
exports.getBaseSmartAccount = getBaseSmartAccount;
|
|
9
|
-
exports.getSmartAccount = getSmartAccount;
|
|
10
|
-
const viem_1 = require("viem");
|
|
11
|
-
const account_abstraction_1 = require("viem/account-abstraction");
|
|
12
|
-
const utils_1 = require("./utils");
|
|
13
|
-
function getDeployArgs(config) {
|
|
14
|
-
if (!config.account || !config.account.custom) {
|
|
15
|
-
throw new Error('Account provider not found');
|
|
16
|
-
}
|
|
17
|
-
return config.account.custom.getDeployArgs();
|
|
18
|
-
}
|
|
19
|
-
function getInstallData(config, module) {
|
|
20
|
-
if (!config.account || !config.account.custom) {
|
|
21
|
-
throw new Error('Account provider not found');
|
|
22
|
-
}
|
|
23
|
-
return config.account.custom.getInstallData(module);
|
|
24
|
-
}
|
|
25
|
-
function getAddress(config) {
|
|
26
|
-
if (!config.account || !config.account.custom) {
|
|
27
|
-
throw new Error('Account provider not found');
|
|
28
|
-
}
|
|
29
|
-
return config.account.custom.getAddress();
|
|
30
|
-
}
|
|
31
|
-
async function getPackedSignature(config, signature, validator, transformSignature = (signature) => signature) {
|
|
32
|
-
if (!config.account || !config.account.custom) {
|
|
33
|
-
throw new Error('Account provider not found');
|
|
34
|
-
}
|
|
35
|
-
return config.account.custom.getPackedSignature(signature, validator, transformSignature);
|
|
36
|
-
}
|
|
37
|
-
async function getSessionSmartAccount(config, client, address, session, validatorAddress, enableData) {
|
|
38
|
-
return await getBaseSmartAccount(address, client, validatorAddress, async () => {
|
|
39
|
-
if (!config.account || !config.account.custom) {
|
|
40
|
-
throw new Error('Account provider not found');
|
|
41
|
-
}
|
|
42
|
-
return config.account.custom.getSessionStubSignature(session, enableData);
|
|
43
|
-
}, async (hash) => {
|
|
44
|
-
if (!config.account || !config.account.custom) {
|
|
45
|
-
throw new Error('Account provider not found');
|
|
46
|
-
}
|
|
47
|
-
return config.account.custom.signSessionUserOperation(session, enableData, hash);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
async function getBaseSmartAccount(address, client, validatorAddress, getStubSignature, signUserOperation) {
|
|
51
|
-
return await (0, account_abstraction_1.toSmartAccount)({
|
|
52
|
-
client,
|
|
53
|
-
entryPoint: {
|
|
54
|
-
abi: account_abstraction_1.entryPoint07Abi,
|
|
55
|
-
address: account_abstraction_1.entryPoint07Address,
|
|
56
|
-
version: '0.7',
|
|
57
|
-
},
|
|
58
|
-
async decodeCalls() {
|
|
59
|
-
throw new Error('Not implemented');
|
|
60
|
-
},
|
|
61
|
-
async encodeCalls(calls) {
|
|
62
|
-
return (0, utils_1.encode7579Calls)({
|
|
63
|
-
mode: {
|
|
64
|
-
type: calls.length > 1 ? 'batchcall' : 'call',
|
|
65
|
-
revertOnError: false,
|
|
66
|
-
selector: '0x',
|
|
67
|
-
context: '0x',
|
|
68
|
-
},
|
|
69
|
-
callData: calls,
|
|
70
|
-
});
|
|
71
|
-
},
|
|
72
|
-
async getAddress() {
|
|
73
|
-
return address;
|
|
74
|
-
},
|
|
75
|
-
async getFactoryArgs() {
|
|
76
|
-
return {};
|
|
77
|
-
},
|
|
78
|
-
async getNonce() {
|
|
79
|
-
const key = (0, viem_1.concat)([validatorAddress, '0x00000000']);
|
|
80
|
-
const nonce = await (0, utils_1.getAccountNonce)(client, {
|
|
81
|
-
address,
|
|
82
|
-
entryPointAddress: account_abstraction_1.entryPoint07Address,
|
|
83
|
-
key: BigInt(key),
|
|
84
|
-
});
|
|
85
|
-
return nonce;
|
|
86
|
-
},
|
|
87
|
-
async getStubSignature() {
|
|
88
|
-
return getStubSignature();
|
|
89
|
-
},
|
|
90
|
-
async signMessage() {
|
|
91
|
-
throw new Error('Not implemented');
|
|
92
|
-
},
|
|
93
|
-
async signTypedData() {
|
|
94
|
-
throw new Error('Not implemented');
|
|
95
|
-
},
|
|
96
|
-
async signUserOperation(parameters) {
|
|
97
|
-
const { chainId = client.chain?.id, ...userOperation } = parameters;
|
|
98
|
-
if (!chainId)
|
|
99
|
-
throw new Error('Chain id not found');
|
|
100
|
-
const hash = (0, account_abstraction_1.getUserOperationHash)({
|
|
101
|
-
userOperation: {
|
|
102
|
-
...userOperation,
|
|
103
|
-
sender: userOperation.sender ?? (await this.getAddress()),
|
|
104
|
-
signature: '0x',
|
|
105
|
-
},
|
|
106
|
-
entryPointAddress: account_abstraction_1.entryPoint07Address,
|
|
107
|
-
entryPointVersion: '0.7',
|
|
108
|
-
chainId: chainId,
|
|
109
|
-
});
|
|
110
|
-
return await signUserOperation(hash);
|
|
111
|
-
},
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
async function getSmartAccount(config, client, address, validatorAddress, sign) {
|
|
115
|
-
return getBaseSmartAccount(address, client, validatorAddress, async () => {
|
|
116
|
-
if (!config.account || !config.account.custom) {
|
|
117
|
-
throw new Error('Account provider not found');
|
|
118
|
-
}
|
|
119
|
-
return config.account.custom.getStubSignature();
|
|
120
|
-
}, sign);
|
|
121
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom.test.d.ts","sourceRoot":"","sources":["../../../accounts/custom.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const viem_1 = require("viem");
|
|
4
|
-
const account_abstraction_1 = require("viem/account-abstraction");
|
|
5
|
-
const accounts_1 = require("viem/accounts");
|
|
6
|
-
const chains_1 = require("viem/chains");
|
|
7
|
-
const vitest_1 = require("vitest");
|
|
8
|
-
const __1 = require("..");
|
|
9
|
-
(0, vitest_1.describe)('Custom Accounts', () => {
|
|
10
|
-
(0, vitest_1.describe)('Coinbase, account', async () => {
|
|
11
|
-
const client = (0, viem_1.createPublicClient)({
|
|
12
|
-
chain: chains_1.mainnet,
|
|
13
|
-
transport: (0, viem_1.http)(),
|
|
14
|
-
});
|
|
15
|
-
const owner = (0, accounts_1.privateKeyToAccount)((0, accounts_1.generatePrivateKey)());
|
|
16
|
-
const coinbaseAccount = await (0, account_abstraction_1.toCoinbaseSmartAccount)({
|
|
17
|
-
client,
|
|
18
|
-
owners: [owner],
|
|
19
|
-
});
|
|
20
|
-
(0, vitest_1.test)('Coinbase, getAddress', async () => {
|
|
21
|
-
const account = await (0, __1.createRhinestoneAccount)({
|
|
22
|
-
account: {
|
|
23
|
-
type: 'custom',
|
|
24
|
-
custom: {
|
|
25
|
-
getDeployArgs: () => {
|
|
26
|
-
return {
|
|
27
|
-
factory: '0x',
|
|
28
|
-
factoryData: '0x',
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
getInstallData: () => {
|
|
32
|
-
return [];
|
|
33
|
-
},
|
|
34
|
-
getAddress: () => {
|
|
35
|
-
return coinbaseAccount.address;
|
|
36
|
-
},
|
|
37
|
-
getPackedSignature: async () => {
|
|
38
|
-
throw new Error('Not implemented');
|
|
39
|
-
},
|
|
40
|
-
getSessionStubSignature: async () => {
|
|
41
|
-
throw new Error('Not implemented');
|
|
42
|
-
},
|
|
43
|
-
signSessionUserOperation: async () => {
|
|
44
|
-
throw new Error('Not implemented');
|
|
45
|
-
},
|
|
46
|
-
getStubSignature: async () => {
|
|
47
|
-
return coinbaseAccount.getStubSignature();
|
|
48
|
-
},
|
|
49
|
-
sign: async () => {
|
|
50
|
-
throw new Error('Not implemented');
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
owners: {
|
|
55
|
-
type: 'ecdsa-v0',
|
|
56
|
-
accounts: [owner],
|
|
57
|
-
threshold: 1,
|
|
58
|
-
},
|
|
59
|
-
rhinestoneApiKey: '',
|
|
60
|
-
});
|
|
61
|
-
(0, vitest_1.expect)(account.getAddress()).toEqual(coinbaseAccount.address);
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
});
|