@rhinestone/sdk 1.0.0-alpha.13 → 1.0.0-alpha.15
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.map +1 -1
- package/dist/src/accounts/index.js +7 -6
- package/dist/src/accounts/index.test.js +3 -3
- package/dist/src/accounts/kernel.test.js +8 -8
- package/dist/src/accounts/nexus.d.ts.map +1 -1
- package/dist/src/accounts/nexus.js +34 -8
- package/dist/src/accounts/nexus.test.js +12 -12
- package/dist/src/accounts/safe.test.js +8 -8
- package/dist/src/accounts/signing/common.d.ts +10 -6
- package/dist/src/accounts/signing/common.d.ts.map +1 -1
- package/dist/src/accounts/signing/common.js +29 -9
- package/dist/src/accounts/signing/message.d.ts +2 -2
- package/dist/src/accounts/signing/message.d.ts.map +1 -1
- package/dist/src/accounts/signing/message.js +7 -11
- package/dist/src/accounts/signing/passkeys.d.ts +29 -0
- package/dist/src/accounts/signing/passkeys.d.ts.map +1 -0
- package/dist/src/accounts/signing/passkeys.js +90 -0
- package/dist/src/accounts/signing/passkeys.test.d.ts +2 -0
- package/dist/src/accounts/signing/passkeys.test.d.ts.map +1 -0
- package/dist/src/accounts/signing/passkeys.test.js +73 -0
- package/dist/src/accounts/signing/typedData.d.ts +2 -2
- package/dist/src/accounts/signing/typedData.d.ts.map +1 -1
- package/dist/src/accounts/signing/typedData.js +7 -11
- package/dist/src/accounts/startale.test.js +8 -8
- package/dist/src/actions/index.d.ts +45 -1
- package/dist/src/actions/index.d.ts.map +1 -1
- package/dist/src/actions/index.js +168 -6
- package/dist/src/actions/index.test.js +16 -16
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +3 -3
- 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 +12 -11
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +7 -1
- package/dist/src/modules/index.d.ts +2 -17
- package/dist/src/modules/index.d.ts.map +1 -1
- package/dist/src/modules/index.js +4 -55
- package/dist/src/modules/index.test.js +2 -16
- package/dist/src/modules/omni-account.d.ts +2 -1
- package/dist/src/modules/omni-account.d.ts.map +1 -1
- package/dist/src/modules/omni-account.js +3 -1
- package/dist/src/modules/validators/core.d.ts +1 -1
- package/dist/src/modules/validators/core.d.ts.map +1 -1
- package/dist/src/modules/validators/core.js +37 -33
- package/dist/src/modules/validators/core.test.js +6 -6
- package/dist/src/modules/validators/smart-sessions.test.js +4 -4
- package/dist/src/orchestrator/client.d.ts +2 -2
- package/dist/src/orchestrator/client.d.ts.map +1 -1
- package/dist/src/orchestrator/consts.d.ts +2 -1
- package/dist/src/orchestrator/consts.d.ts.map +1 -1
- package/dist/src/orchestrator/consts.js +3 -1
- package/dist/src/orchestrator/index.d.ts +1 -1
- package/dist/src/orchestrator/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +10 -4
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getValidators = exports.getOwners = exports.getOwnerValidator = exports.HOOK_ADDRESS = void 0;
|
|
4
4
|
exports.getSetup = getSetup;
|
|
5
|
-
exports.getWebauthnValidatorSignature = getWebauthnValidatorSignature;
|
|
6
5
|
exports.isRip7212SupportedNetwork = isRip7212SupportedNetwork;
|
|
7
6
|
const viem_1 = require("viem");
|
|
8
7
|
const chains_1 = require("viem/chains");
|
|
@@ -27,9 +26,12 @@ function getSetup(config) {
|
|
|
27
26
|
const socialRecoveryValidator = (0, core_1.getSocialRecoveryValidator)(config.recovery.guardians, config.recovery.threshold);
|
|
28
27
|
validators.push(socialRecoveryValidator);
|
|
29
28
|
}
|
|
29
|
+
const intentExecutorAddress = config.useDev
|
|
30
|
+
? omni_account_1.INTENT_EXECUTOR_ADDRESS_DEV
|
|
31
|
+
: omni_account_1.INTENT_EXECUTOR_ADDRESS;
|
|
30
32
|
const executors = [
|
|
31
33
|
{
|
|
32
|
-
address:
|
|
34
|
+
address: intentExecutorAddress,
|
|
33
35
|
initData: '0x',
|
|
34
36
|
deInitData: '0x',
|
|
35
37
|
additionalContext: '0x',
|
|
@@ -61,50 +63,6 @@ function getSetup(config) {
|
|
|
61
63
|
hooks,
|
|
62
64
|
};
|
|
63
65
|
}
|
|
64
|
-
function getWebauthnValidatorSignature({ webauthn, signature, usePrecompiled = false, }) {
|
|
65
|
-
const { authenticatorData, clientDataJSON, typeIndex } = webauthn;
|
|
66
|
-
let r;
|
|
67
|
-
let s;
|
|
68
|
-
if (typeof signature === 'string' || signature instanceof Uint8Array) {
|
|
69
|
-
const parsedSignature = parseSignature(signature);
|
|
70
|
-
r = parsedSignature.r;
|
|
71
|
-
s = parsedSignature.s;
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
r = signature.r;
|
|
75
|
-
s = signature.s;
|
|
76
|
-
}
|
|
77
|
-
return (0, viem_1.encodeAbiParameters)([
|
|
78
|
-
{ type: 'bytes', name: 'authenticatorData' },
|
|
79
|
-
{
|
|
80
|
-
type: 'string',
|
|
81
|
-
name: 'clientDataJSON',
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
type: 'uint256',
|
|
85
|
-
name: 'responseTypeLocation',
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
type: 'uint256',
|
|
89
|
-
name: 'r',
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
type: 'uint256',
|
|
93
|
-
name: 's',
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
type: 'bool',
|
|
97
|
-
name: 'usePrecompiled',
|
|
98
|
-
},
|
|
99
|
-
], [
|
|
100
|
-
authenticatorData,
|
|
101
|
-
clientDataJSON,
|
|
102
|
-
typeof typeIndex === 'bigint' ? typeIndex : BigInt(typeIndex),
|
|
103
|
-
r,
|
|
104
|
-
s,
|
|
105
|
-
usePrecompiled,
|
|
106
|
-
]);
|
|
107
|
-
}
|
|
108
66
|
function isRip7212SupportedNetwork(chain) {
|
|
109
67
|
const supportedChains = [
|
|
110
68
|
chains_1.optimism,
|
|
@@ -117,12 +75,3 @@ function isRip7212SupportedNetwork(chain) {
|
|
|
117
75
|
];
|
|
118
76
|
return supportedChains.includes(chain);
|
|
119
77
|
}
|
|
120
|
-
function parseSignature(signature) {
|
|
121
|
-
const bytes = typeof signature === 'string' ? (0, viem_1.hexToBytes)(signature) : signature;
|
|
122
|
-
const r = bytes.slice(0, 32);
|
|
123
|
-
const s = bytes.slice(32, 64);
|
|
124
|
-
return {
|
|
125
|
-
r: BigInt((0, viem_1.bytesToHex)(r)),
|
|
126
|
-
s: BigInt((0, viem_1.bytesToHex)(s)),
|
|
127
|
-
};
|
|
128
|
-
}
|
|
@@ -15,7 +15,7 @@ const index_1 = require("./index");
|
|
|
15
15
|
},
|
|
16
16
|
};
|
|
17
17
|
const setup = (0, index_1.getSetup)(config);
|
|
18
|
-
(0, vitest_1.expect)(setup.validators[0].address).toBe('
|
|
18
|
+
(0, vitest_1.expect)(setup.validators[0].address).toBe('0x000000000013fdB5234E4E3162a810F54d9f7E98');
|
|
19
19
|
(0, vitest_1.expect)(setup.validators[0].type).toBe(1n);
|
|
20
20
|
});
|
|
21
21
|
(0, vitest_1.test)('should use webauthn validator for passkey owners', () => {
|
|
@@ -23,7 +23,7 @@ const index_1 = require("./index");
|
|
|
23
23
|
rhinestoneApiKey: consts_1.MOCK_API_KEY,
|
|
24
24
|
owners: {
|
|
25
25
|
type: 'passkey',
|
|
26
|
-
|
|
26
|
+
accounts: [consts_1.passkeyAccount],
|
|
27
27
|
},
|
|
28
28
|
};
|
|
29
29
|
const setup = (0, index_1.getSetup)(config);
|
|
@@ -87,18 +87,4 @@ const index_1 = require("./index");
|
|
|
87
87
|
});
|
|
88
88
|
vitest_1.test.todo('using the omni account should install the necessary modules');
|
|
89
89
|
});
|
|
90
|
-
(0, vitest_1.describe)('WebAuthn Validator Signature', () => {
|
|
91
|
-
(0, vitest_1.test)('default', () => {
|
|
92
|
-
const signature = (0, index_1.getWebauthnValidatorSignature)({
|
|
93
|
-
webauthn: {
|
|
94
|
-
authenticatorData: '0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97631d00000000',
|
|
95
|
-
clientDataJSON: '{"type":"webauthn.get","challenge":"tbxXNFS9X_4Byr1cMwqKrIGB-_30a0QhZ6y7ucM0BOE","origin":"http://localhost:3000","crossOrigin":false, "other_keys_can_be_added_here":"do not compare clientDataJSON against a template. See https://goo.gl/yabPex"}',
|
|
96
|
-
typeIndex: 44941127272049826721201904734628716258498742255959991581049806490182030242267n,
|
|
97
|
-
},
|
|
98
|
-
signature: '0x00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000001635bc6d0f68ff895cae8a288ecf7542a6a9cd555df784b73e1e2ea7e9104b1db15e9015d280cb19527881c625fee43fd3a405d5b0d199a8c8e6589a7381209e40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97631d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f47b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a22746278584e465339585f3442797231634d77714b724947422d5f3330613051685a36793775634d30424f45222c226f726967696e223a22687474703a2f2f6c6f63616c686f73743a33303030222c2263726f73734f726967696e223a66616c73652c20226f746865725f6b6579735f63616e5f62655f61646465645f68657265223a22646f206e6f7420636f6d7061726520636c69656e74446174614a534f4e20616761696e737420612074656d706c6174652e205365652068747470733a2f2f676f6f2e676c2f796162506578227d000000000000000000000000',
|
|
99
|
-
usePrecompiled: true,
|
|
100
|
-
});
|
|
101
|
-
(0, vitest_1.expect)(signature).toEqual('0x00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000120635bc6d0f68ff895cae8a288ecf7542a6a9cd555df784b73e1e2ea7e9104b1db00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97631d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f47b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a22746278584e465339585f3442797231634d77714b724947422d5f3330613051685a36793775634d30424f45222c226f726967696e223a22687474703a2f2f6c6f63616c686f73743a33303030222c2263726f73734f726967696e223a66616c73652c20226f746865725f6b6579735f63616e5f62655f61646465645f68657265223a22646f206e6f7420636f6d7061726520636c69656e74446174614a534f4e20616761696e737420612074656d706c6174652e205365652068747470733a2f2f676f6f2e676c2f796162506578227d000000000000000000000000');
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
90
|
});
|
|
@@ -3,5 +3,6 @@ declare const HOOK_ADDRESS: Address;
|
|
|
3
3
|
declare const TARGET_MODULE_ADDRESS: Address;
|
|
4
4
|
declare const SAME_CHAIN_MODULE_ADDRESS: Address;
|
|
5
5
|
declare const INTENT_EXECUTOR_ADDRESS: Address;
|
|
6
|
-
|
|
6
|
+
declare const INTENT_EXECUTOR_ADDRESS_DEV: Address;
|
|
7
|
+
export { HOOK_ADDRESS, TARGET_MODULE_ADDRESS, SAME_CHAIN_MODULE_ADDRESS, INTENT_EXECUTOR_ADDRESS, INTENT_EXECUTOR_ADDRESS_DEV, };
|
|
7
8
|
//# sourceMappingURL=omni-account.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"omni-account.d.ts","sourceRoot":"","sources":["../../../modules/omni-account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,QAAA,MAAM,YAAY,EAAE,OAAsD,CAAA;AAC1E,QAAA,MAAM,qBAAqB,EAAE,OACiB,CAAA;AAC9C,QAAA,MAAM,yBAAyB,EAAE,OACa,CAAA;AAE9C,QAAA,MAAM,uBAAuB,EAAE,OACe,CAAA;AAE9C,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,yBAAyB,EACzB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"omni-account.d.ts","sourceRoot":"","sources":["../../../modules/omni-account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,QAAA,MAAM,YAAY,EAAE,OAAsD,CAAA;AAC1E,QAAA,MAAM,qBAAqB,EAAE,OACiB,CAAA;AAC9C,QAAA,MAAM,yBAAyB,EAAE,OACa,CAAA;AAE9C,QAAA,MAAM,uBAAuB,EAAE,OACe,CAAA;AAC9C,QAAA,MAAM,2BAA2B,EAAE,OACW,CAAA;AAE9C,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,yBAAyB,EACzB,uBAAuB,EACvB,2BAA2B,GAC5B,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.INTENT_EXECUTOR_ADDRESS = exports.SAME_CHAIN_MODULE_ADDRESS = exports.TARGET_MODULE_ADDRESS = exports.HOOK_ADDRESS = void 0;
|
|
3
|
+
exports.INTENT_EXECUTOR_ADDRESS_DEV = exports.INTENT_EXECUTOR_ADDRESS = exports.SAME_CHAIN_MODULE_ADDRESS = exports.TARGET_MODULE_ADDRESS = exports.HOOK_ADDRESS = void 0;
|
|
4
4
|
const HOOK_ADDRESS = '0x0000000000f6Ed8Be424d673c63eeFF8b9267420';
|
|
5
5
|
exports.HOOK_ADDRESS = HOOK_ADDRESS;
|
|
6
6
|
const TARGET_MODULE_ADDRESS = '0x0000000000E5a37279A001301A837a91b5de1D5E';
|
|
@@ -9,3 +9,5 @@ const SAME_CHAIN_MODULE_ADDRESS = '0x000000000043ff16d5776c7F0f65Ec485C17Ca04';
|
|
|
9
9
|
exports.SAME_CHAIN_MODULE_ADDRESS = SAME_CHAIN_MODULE_ADDRESS;
|
|
10
10
|
const INTENT_EXECUTOR_ADDRESS = '0x00000000005aD9ce1f5035FD62CA96CEf16AdAAF';
|
|
11
11
|
exports.INTENT_EXECUTOR_ADDRESS = INTENT_EXECUTOR_ADDRESS;
|
|
12
|
+
const INTENT_EXECUTOR_ADDRESS_DEV = '0xbf9b5b917a83f8adac17b0752846d41d8d7b7e17';
|
|
13
|
+
exports.INTENT_EXECUTOR_ADDRESS_DEV = INTENT_EXECUTOR_ADDRESS_DEV;
|
|
@@ -17,7 +17,7 @@ declare function getOwnerValidator(config: RhinestoneAccountConfig): Module;
|
|
|
17
17
|
declare function getMockSignature(ownerSet: OwnerSet): Hex;
|
|
18
18
|
declare function getValidator(owners: OwnerSet): Module;
|
|
19
19
|
declare function getOwnableValidator(threshold: number, owners: Address[]): Module;
|
|
20
|
-
declare function getWebAuthnValidator(
|
|
20
|
+
declare function getWebAuthnValidator(threshold: number, webAuthnCredentials: WebauthnCredential[]): Module;
|
|
21
21
|
declare function getMultiFactorValidator(threshold: number, validators: (OwnableValidatorConfig | WebauthnValidatorConfig | null)[]): Module;
|
|
22
22
|
declare function getSocialRecoveryValidator(guardians: Account[], threshold?: number): Module;
|
|
23
23
|
export { OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, getOwnerValidator, getOwnableValidator, getWebAuthnValidator, getMultiFactorValidator, getSocialRecoveryValidator, getValidator, getMockSignature, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../../modules/validators/core.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EAKZ,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../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AM,CAsBR;AAeD,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,8BAA8B,EAC9B,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC1B,YAAY,EACZ,gBAAgB,GACjB,CAAA;AACD,YAAY,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -10,7 +10,7 @@ exports.getValidator = getValidator;
|
|
|
10
10
|
exports.getMockSignature = getMockSignature;
|
|
11
11
|
const viem_1 = require("viem");
|
|
12
12
|
const common_1 = require("../common");
|
|
13
|
-
const OWNABLE_VALIDATOR_ADDRESS = '
|
|
13
|
+
const OWNABLE_VALIDATOR_ADDRESS = '0x000000000013fdB5234E4E3162a810F54d9f7E98';
|
|
14
14
|
exports.OWNABLE_VALIDATOR_ADDRESS = OWNABLE_VALIDATOR_ADDRESS;
|
|
15
15
|
const WEBAUTHN_VALIDATOR_ADDRESS = '0x0000000000578c4cB0e472a5462da43C495C3F33';
|
|
16
16
|
exports.WEBAUTHN_VALIDATOR_ADDRESS = WEBAUTHN_VALIDATOR_ADDRESS;
|
|
@@ -18,7 +18,7 @@ const SOCIAL_RECOVERY_VALIDATOR_ADDRESS = '0xA04D053b3C8021e8D5bF641816c42dAA75D
|
|
|
18
18
|
const MULTI_FACTOR_VALIDATOR_ADDRESS = '0xf6bDf42c9BE18cEcA5C06c42A43DAf7FBbe7896b';
|
|
19
19
|
exports.MULTI_FACTOR_VALIDATOR_ADDRESS = MULTI_FACTOR_VALIDATOR_ADDRESS;
|
|
20
20
|
const ECDSA_MOCK_SIGNATURE = '0x81d4b4981670cb18f99f0b4a66446df1bf5b204d24cfcb659bf38ba27a4359b5711649ec2423c5e1247245eba2964679b6a1dbb85c992ae40b9b00c6935b02ff1b';
|
|
21
|
-
const WEBAUTHN_MOCK_SIGNATURE = '
|
|
21
|
+
const WEBAUTHN_MOCK_SIGNATURE = '0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001b9b86eb98fda3ed4d797d9e690588dfadf17b329a76a47cec935bebf92d7ddc80000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000001700000000000000000000000000000000000000000000000000000000000000019b2e9410bb6850f9f660a03d609d5a844fb96bcdc87a15139b03ee22c70f469100d2b865a215c3bf786387064effa8fcedcb1d625b5148f8a1236d5e3ff11acf000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d9763050000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000867b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a22396a4546696a75684557724d34534f572d7443684a625545484550343456636a634a2d42716f3166544d38222c226f726967696e223a22687474703a2f2f6c6f63616c686f73743a38303830222c2263726f73734f726967696e223a66616c73657d0000000000000000000000000000000000000000000000000000';
|
|
22
22
|
function getOwnerValidator(config) {
|
|
23
23
|
return getValidator(config.owners);
|
|
24
24
|
}
|
|
@@ -67,10 +67,10 @@ function getValidator(owners) {
|
|
|
67
67
|
case 'ecdsa':
|
|
68
68
|
return getOwnableValidator(owners.threshold ?? 1, owners.accounts.map((account) => account.address));
|
|
69
69
|
case 'passkey':
|
|
70
|
-
return getWebAuthnValidator({
|
|
71
|
-
pubKey:
|
|
72
|
-
authenticatorId:
|
|
73
|
-
});
|
|
70
|
+
return getWebAuthnValidator(owners.threshold ?? 1, owners.accounts.map((account) => ({
|
|
71
|
+
pubKey: account.publicKey,
|
|
72
|
+
authenticatorId: account.id,
|
|
73
|
+
})));
|
|
74
74
|
case 'multi-factor': {
|
|
75
75
|
return getMultiFactorValidator(owners.threshold ?? 1, owners.validators);
|
|
76
76
|
}
|
|
@@ -91,29 +91,33 @@ function getOwnableValidator(threshold, owners) {
|
|
|
91
91
|
type: common_1.MODULE_TYPE_ID_VALIDATOR,
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
-
function getWebAuthnValidator(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
94
|
+
function getWebAuthnValidator(threshold, webAuthnCredentials) {
|
|
95
|
+
function getPublicKey(webAuthnCredential) {
|
|
96
|
+
if (typeof webAuthnCredential.pubKey === 'string' ||
|
|
97
|
+
webAuthnCredential.pubKey instanceof Uint8Array) {
|
|
98
|
+
// It's a P256Credential
|
|
99
|
+
const { x, y, prefix } = parsePublicKey(webAuthnCredential.pubKey);
|
|
100
|
+
if (prefix && prefix !== 4) {
|
|
101
|
+
throw new Error('Only uncompressed public keys are supported');
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
x,
|
|
105
|
+
y,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
// It's already a PublicKey
|
|
110
|
+
return webAuthnCredential.pubKey;
|
|
106
111
|
}
|
|
107
112
|
}
|
|
108
|
-
|
|
109
|
-
// It's already a PublicKey
|
|
110
|
-
pubKeyX = webAuthnCredential.pubKey.x;
|
|
111
|
-
pubKeyY = webAuthnCredential.pubKey.y;
|
|
112
|
-
}
|
|
113
|
+
const publicKeys = webAuthnCredentials.map(getPublicKey);
|
|
113
114
|
return {
|
|
114
115
|
address: WEBAUTHN_VALIDATOR_ADDRESS,
|
|
115
116
|
initData: (0, viem_1.encodeAbiParameters)([
|
|
117
|
+
{ name: 'threshold', type: 'uint256' },
|
|
116
118
|
{
|
|
119
|
+
name: 'credentials',
|
|
120
|
+
type: 'tuple[]',
|
|
117
121
|
components: [
|
|
118
122
|
{
|
|
119
123
|
name: 'pubKeyX',
|
|
@@ -123,19 +127,19 @@ function getWebAuthnValidator(webAuthnCredential) {
|
|
|
123
127
|
name: 'pubKeyY',
|
|
124
128
|
type: 'uint256',
|
|
125
129
|
},
|
|
130
|
+
{
|
|
131
|
+
name: 'requireUV',
|
|
132
|
+
type: 'bool',
|
|
133
|
+
},
|
|
126
134
|
],
|
|
127
|
-
type: 'tuple',
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
type: 'bytes32',
|
|
131
|
-
name: 'authenticatorIdHash',
|
|
132
135
|
},
|
|
133
136
|
], [
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
BigInt(threshold),
|
|
138
|
+
publicKeys.map((publicKey) => ({
|
|
139
|
+
pubKeyX: publicKey.x,
|
|
140
|
+
pubKeyY: publicKey.y,
|
|
141
|
+
requireUV: false,
|
|
142
|
+
})),
|
|
139
143
|
]),
|
|
140
144
|
deInitData: '0x',
|
|
141
145
|
additionalContext: '0x',
|
|
@@ -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,18 +35,18 @@ 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', () => {
|
|
42
42
|
const validator = (0, core_1.getValidator)({
|
|
43
43
|
type: 'passkey',
|
|
44
|
-
|
|
44
|
+
accounts: [consts_1.passkeyAccount],
|
|
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
48
|
(0, vitest_1.expect)(validator.address).toEqual('0x0000000000578c4cB0e472a5462da43C495C3F33');
|
|
49
|
-
(0, vitest_1.expect)(validator.initData).toEqual('
|
|
49
|
+
(0, vitest_1.expect)(validator.initData).toEqual('0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001580a9af0569ad3905b26a703201b358aa0904236642ebe79b22a19d00d3737637d46f725a5427ae45a9569259bf67e1e16b187d7b3ad1ed70138c4f0409677d10000000000000000000000000000000000000000000000000000000000000000');
|
|
50
50
|
});
|
|
51
51
|
});
|
|
52
52
|
(0, vitest_1.describe)('Mock Signature', () => {
|
|
@@ -67,7 +67,7 @@ const core_1 = require("./core");
|
|
|
67
67
|
(0, vitest_1.test)('Passkey', () => {
|
|
68
68
|
const signature = (0, core_1.getMockSignature)({
|
|
69
69
|
type: 'passkey',
|
|
70
|
-
|
|
70
|
+
accounts: [consts_1.passkeyAccount],
|
|
71
71
|
});
|
|
72
72
|
// Should have the proper schema
|
|
73
73
|
(0, viem_1.decodeAbiParameters)([
|
|
@@ -15,7 +15,7 @@ const smart_sessions_2 = require("./smart-sessions");
|
|
|
15
15
|
type: 'ecdsa',
|
|
16
16
|
accounts: [consts_1.accountA, consts_1.accountB],
|
|
17
17
|
},
|
|
18
|
-
})).toBe('
|
|
18
|
+
})).toBe('0xd3b39024e437b4cac278e33965b9a9326e81ee46bd45d890adbfc8eb45412fa1');
|
|
19
19
|
});
|
|
20
20
|
(0, vitest_1.test)('with salt', () => {
|
|
21
21
|
(0, vitest_1.expect)((0, smart_sessions_2.getPermissionId)({
|
|
@@ -24,7 +24,7 @@ const smart_sessions_2 = require("./smart-sessions");
|
|
|
24
24
|
accounts: [consts_1.accountA, consts_1.accountB],
|
|
25
25
|
},
|
|
26
26
|
salt: '0x97340e1cfff3319c76ef22b2bc9d3231071d550125d68c9d4a8972823f166320',
|
|
27
|
-
})).toBe('
|
|
27
|
+
})).toBe('0xeb47b4699298a847a0f6fb7365e56aefcc95630e7d0e3d9ca5917620c7dc3d08');
|
|
28
28
|
});
|
|
29
29
|
});
|
|
30
30
|
(0, vitest_1.describe)('Smart Session Validator', () => {
|
|
@@ -217,10 +217,10 @@ const smart_sessions_2 = require("./smart-sessions");
|
|
|
217
217
|
});
|
|
218
218
|
(0, vitest_1.describe)('Encode Smart Session Signature', () => {
|
|
219
219
|
(0, vitest_1.test)('use mode', () => {
|
|
220
|
-
const permissionId = '
|
|
220
|
+
const permissionId = '0xd3b39024e437b4cac278e33965b9a9326e81ee46bd45d890adbfc8eb45412fa1';
|
|
221
221
|
const signature = '0xabcdef';
|
|
222
222
|
const sessionSignature = (0, smart_sessions_2.encodeSmartSessionSignature)(smart_sessions_2.SMART_SESSION_MODE_USE, permissionId, signature);
|
|
223
|
-
(0, vitest_1.expect)(sessionSignature).toEqual('
|
|
223
|
+
(0, vitest_1.expect)(sessionSignature).toEqual('0x00d3b39024e437b4cac278e33965b9a9326e81ee46bd45d890adbfc8eb45412fa1abcdef');
|
|
224
224
|
});
|
|
225
225
|
});
|
|
226
226
|
});
|
|
@@ -2,8 +2,8 @@ import { type Address } from 'viem';
|
|
|
2
2
|
import type { IntentCost, IntentInput, IntentOpStatus, IntentResult, IntentRoute, Portfolio, SignedIntentOp } from './types';
|
|
3
3
|
export declare class Orchestrator {
|
|
4
4
|
private serverUrl;
|
|
5
|
-
private apiKey
|
|
6
|
-
constructor(serverUrl: string, apiKey
|
|
5
|
+
private apiKey?;
|
|
6
|
+
constructor(serverUrl: string, apiKey?: string);
|
|
7
7
|
getPortfolio(userAddress: Address, filter?: {
|
|
8
8
|
chainIds?: number[];
|
|
9
9
|
tokens?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../orchestrator/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,OAAO,EAAuB,MAAM,MAAM,CAA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,OAAO,CAAC,cAAc,CAAC;IAkBlE,OAAO,CAAC,UAAU;IA0ElB,OAAO,CAAC,iBAAiB;CAmD1B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare const PROD_ORCHESTRATOR_URL = "https://v1.orchestrator.rhinestone.dev";
|
|
2
2
|
declare const STAGING_ORCHESTRATOR_URL = "https://staging.v1.orchestrator.rhinestone.dev";
|
|
3
|
+
declare const DEV_ORCHESTRATOR_URL = "https://dev.v1.orchestrator.rhinestone.dev";
|
|
3
4
|
declare const RHINESTONE_SPOKE_POOL_ADDRESS = "0x000000000060f6e853447881951574cdd0663530";
|
|
4
|
-
export { PROD_ORCHESTRATOR_URL, STAGING_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS, };
|
|
5
|
+
export { PROD_ORCHESTRATOR_URL, STAGING_ORCHESTRATOR_URL, DEV_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS, };
|
|
5
6
|
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../orchestrator/consts.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,qBAAqB,2CAA2C,CAAA;AACtE,QAAA,MAAM,wBAAwB,mDACoB,CAAA;AAClD,QAAA,MAAM,6BAA6B,+CACW,CAAA;AAE9C,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,6BAA6B,GAC9B,CAAA"}
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../orchestrator/consts.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,qBAAqB,2CAA2C,CAAA;AACtE,QAAA,MAAM,wBAAwB,mDACoB,CAAA;AAClD,QAAA,MAAM,oBAAoB,+CAA+C,CAAA;AACzE,QAAA,MAAM,6BAA6B,+CACW,CAAA;AAE9C,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,6BAA6B,GAC9B,CAAA"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RHINESTONE_SPOKE_POOL_ADDRESS = exports.STAGING_ORCHESTRATOR_URL = exports.PROD_ORCHESTRATOR_URL = void 0;
|
|
3
|
+
exports.RHINESTONE_SPOKE_POOL_ADDRESS = exports.DEV_ORCHESTRATOR_URL = exports.STAGING_ORCHESTRATOR_URL = exports.PROD_ORCHESTRATOR_URL = void 0;
|
|
4
4
|
const PROD_ORCHESTRATOR_URL = 'https://v1.orchestrator.rhinestone.dev';
|
|
5
5
|
exports.PROD_ORCHESTRATOR_URL = PROD_ORCHESTRATOR_URL;
|
|
6
6
|
const STAGING_ORCHESTRATOR_URL = 'https://staging.v1.orchestrator.rhinestone.dev';
|
|
7
7
|
exports.STAGING_ORCHESTRATOR_URL = STAGING_ORCHESTRATOR_URL;
|
|
8
|
+
const DEV_ORCHESTRATOR_URL = 'https://dev.v1.orchestrator.rhinestone.dev';
|
|
9
|
+
exports.DEV_ORCHESTRATOR_URL = DEV_ORCHESTRATOR_URL;
|
|
8
10
|
const RHINESTONE_SPOKE_POOL_ADDRESS = '0x000000000060f6e853447881951574cdd0663530';
|
|
9
11
|
exports.RHINESTONE_SPOKE_POOL_ADDRESS = RHINESTONE_SPOKE_POOL_ADDRESS;
|
|
@@ -4,7 +4,7 @@ import { AuthenticationRequiredError, InsufficientBalanceError, IntentNotFoundEr
|
|
|
4
4
|
import { getSupportedTokens, getTokenAddress, getTokenSymbol, getWethAddress, isTokenAddressSupported } from './registry';
|
|
5
5
|
import type { IntentCost, IntentInput, IntentOp, IntentOpStatus, IntentResult, IntentRoute, Portfolio, SettlementSystem, SignedIntentOp, SupportedChain, TokenConfig } from './types';
|
|
6
6
|
import { INTENT_STATUS_COMPLETED, INTENT_STATUS_EXPIRED, INTENT_STATUS_FAILED, INTENT_STATUS_FILLED, INTENT_STATUS_PARTIALLY_COMPLETED, INTENT_STATUS_PENDING, INTENT_STATUS_PRECONFIRMED, INTENT_STATUS_UNKNOWN } from './types';
|
|
7
|
-
declare function getOrchestrator(apiKey
|
|
7
|
+
declare function getOrchestrator(apiKey?: string, orchestratorUrl?: string): Orchestrator;
|
|
8
8
|
export type { IntentCost, IntentInput, IntentOp, IntentOpStatus, IntentResult, IntentRoute, SettlementSystem, SignedIntentOp, SupportedChain, TokenConfig, Portfolio, };
|
|
9
9
|
export { INTENT_STATUS_PENDING, INTENT_STATUS_EXPIRED, INTENT_STATUS_PARTIALLY_COMPLETED, INTENT_STATUS_COMPLETED, INTENT_STATUS_FILLED, INTENT_STATUS_FAILED, INTENT_STATUS_PRECONFIRMED, INTENT_STATUS_UNKNOWN, RHINESTONE_SPOKE_POOL_ADDRESS, Orchestrator, AuthenticationRequiredError, InsufficientBalanceError, InvalidApiKeyError, InvalidIntentSignatureError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, IntentNotFoundError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError, getOrchestrator, getWethAddress, getTokenSymbol, getTokenAddress, getSupportedTokens, isOrchestratorError, isTokenAddressSupported, };
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../orchestrator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAyB,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAC/E,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,mBAAmB,EACnB,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,cAAc,EACd,uBAAuB,EACxB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,WAAW,EACZ,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,iCAAiC,EACjC,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAEhB,iBAAS,eAAe,CACtB,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../orchestrator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAyB,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAC/E,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,mBAAmB,EACnB,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,cAAc,EACd,uBAAuB,EACxB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,WAAW,EACZ,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,iCAAiC,EACjC,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAEhB,iBAAS,eAAe,CACtB,MAAM,CAAC,EAAE,MAAM,EACf,eAAe,CAAC,EAAE,MAAM,GACvB,YAAY,CAEd;AAED,YAAY,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,WAAW,EACX,SAAS,GACV,CAAA;AACD,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,iCAAiC,EACjC,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EACrB,6BAA6B,EAC7B,YAAY,EACZ,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,2BAA2B,EAC3B,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,GACxB,CAAA"}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -12,7 +12,8 @@ interface OwnableValidatorConfig {
|
|
|
12
12
|
}
|
|
13
13
|
interface WebauthnValidatorConfig {
|
|
14
14
|
type: 'passkey';
|
|
15
|
-
|
|
15
|
+
accounts: WebAuthnAccount[];
|
|
16
|
+
threshold?: number;
|
|
16
17
|
}
|
|
17
18
|
interface MultiFactorValidatorConfig {
|
|
18
19
|
type: 'multi-factor';
|
|
@@ -87,13 +88,18 @@ interface Recovery {
|
|
|
87
88
|
interface RhinestoneAccountConfig {
|
|
88
89
|
account?: AccountProviderConfig;
|
|
89
90
|
owners: OwnerSet;
|
|
90
|
-
rhinestoneApiKey
|
|
91
|
+
rhinestoneApiKey?: string;
|
|
91
92
|
sessions?: Session[];
|
|
92
93
|
recovery?: Recovery;
|
|
93
94
|
eoa?: Account;
|
|
94
95
|
provider?: ProviderConfig;
|
|
95
96
|
bundler?: BundlerConfig;
|
|
96
97
|
paymaster?: PaymasterConfig;
|
|
98
|
+
/**
|
|
99
|
+
* @internal
|
|
100
|
+
* For internal testing only - do not use
|
|
101
|
+
*/
|
|
102
|
+
useDev?: boolean;
|
|
97
103
|
}
|
|
98
104
|
type TokenSymbol = 'ETH' | 'WETH' | 'USDC' | 'USDT';
|
|
99
105
|
interface CallInput {
|
|
@@ -117,7 +123,7 @@ type OwnerSignerSet = {
|
|
|
117
123
|
} | {
|
|
118
124
|
type: 'owner';
|
|
119
125
|
kind: 'passkey';
|
|
120
|
-
|
|
126
|
+
accounts: WebAuthnAccount[];
|
|
121
127
|
} | {
|
|
122
128
|
type: 'owner';
|
|
123
129
|
kind: 'multi-factor';
|
|
@@ -128,7 +134,7 @@ type OwnerSignerSet = {
|
|
|
128
134
|
} | {
|
|
129
135
|
type: 'passkey';
|
|
130
136
|
id: number | Hex;
|
|
131
|
-
|
|
137
|
+
accounts: WebAuthnAccount[];
|
|
132
138
|
})[];
|
|
133
139
|
};
|
|
134
140
|
interface SessionSignerSet {
|
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,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAE5E,KAAK,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAA;AAE3D,UAAU,qBAAqB;IAC7B,IAAI,EAAE,WAAW,CAAA;CAClB;AAED,UAAU,sBAAsB;IAC9B,IAAI,EAAE,OAAO,CAAA;IACb,QAAQ,EAAE,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