@charterlabs/rhinestone-sdk 0.2.5 → 0.2.7-dev.1

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.
Files changed (81) hide show
  1. package/dist/src/accounts/index.d.ts.map +1 -1
  2. package/dist/src/accounts/index.js +7 -6
  3. package/dist/src/accounts/index.test.js +3 -3
  4. package/dist/src/accounts/json-rpc/index.d.ts +5 -0
  5. package/dist/src/accounts/json-rpc/index.d.ts.map +1 -0
  6. package/dist/src/accounts/json-rpc/index.js +16 -0
  7. package/dist/src/accounts/json-rpc/index.test.d.ts +2 -0
  8. package/dist/src/accounts/json-rpc/index.test.d.ts.map +1 -0
  9. package/dist/src/accounts/json-rpc/index.test.js +16 -0
  10. package/dist/src/accounts/json-rpc/providers.d.ts +4 -0
  11. package/dist/src/accounts/json-rpc/providers.d.ts.map +1 -0
  12. package/dist/src/accounts/json-rpc/providers.js +14 -0
  13. package/dist/src/accounts/json-rpc/providers.test.d.ts +2 -0
  14. package/dist/src/accounts/json-rpc/providers.test.d.ts.map +1 -0
  15. package/dist/src/accounts/json-rpc/providers.test.js +15 -0
  16. package/dist/src/accounts/kernel.test.js +8 -8
  17. package/dist/src/accounts/nexus.d.ts.map +1 -1
  18. package/dist/src/accounts/nexus.js +42 -11
  19. package/dist/src/accounts/nexus.test.js +12 -12
  20. package/dist/src/accounts/safe.test.js +8 -8
  21. package/dist/src/accounts/signing/common.d.ts +10 -6
  22. package/dist/src/accounts/signing/common.d.ts.map +1 -1
  23. package/dist/src/accounts/signing/common.js +29 -9
  24. package/dist/src/accounts/signing/message.d.ts +2 -2
  25. package/dist/src/accounts/signing/message.d.ts.map +1 -1
  26. package/dist/src/accounts/signing/message.js +7 -11
  27. package/dist/src/accounts/signing/passkeys.d.ts +29 -0
  28. package/dist/src/accounts/signing/passkeys.d.ts.map +1 -0
  29. package/dist/src/accounts/signing/passkeys.js +90 -0
  30. package/dist/src/accounts/signing/passkeys.test.d.ts +2 -0
  31. package/dist/src/accounts/signing/passkeys.test.d.ts.map +1 -0
  32. package/dist/src/accounts/signing/passkeys.test.js +73 -0
  33. package/dist/src/accounts/signing/typedData.d.ts +2 -2
  34. package/dist/src/accounts/signing/typedData.d.ts.map +1 -1
  35. package/dist/src/accounts/signing/typedData.js +7 -11
  36. package/dist/src/accounts/startale.test.js +8 -8
  37. package/dist/src/accounts/utils.d.ts +3 -3
  38. package/dist/src/accounts/utils.d.ts.map +1 -1
  39. package/dist/src/accounts/utils.js +3 -40
  40. package/dist/src/actions/index.d.ts +45 -1
  41. package/dist/src/actions/index.d.ts.map +1 -1
  42. package/dist/src/actions/index.js +168 -6
  43. package/dist/src/actions/index.test.js +16 -16
  44. package/dist/src/execution/index.d.ts.map +1 -1
  45. package/dist/src/execution/index.js +3 -6
  46. package/dist/src/execution/utils.d.ts +1 -1
  47. package/dist/src/execution/utils.d.ts.map +1 -1
  48. package/dist/src/execution/utils.js +12 -14
  49. package/dist/src/index.d.ts +4 -4
  50. package/dist/src/index.d.ts.map +1 -1
  51. package/dist/src/index.js +9 -3
  52. package/dist/src/modules/index.d.ts +2 -17
  53. package/dist/src/modules/index.d.ts.map +1 -1
  54. package/dist/src/modules/index.js +4 -55
  55. package/dist/src/modules/index.test.js +2 -16
  56. package/dist/src/modules/omni-account.d.ts +2 -1
  57. package/dist/src/modules/omni-account.d.ts.map +1 -1
  58. package/dist/src/modules/omni-account.js +3 -1
  59. package/dist/src/modules/validators/core.d.ts +1 -1
  60. package/dist/src/modules/validators/core.d.ts.map +1 -1
  61. package/dist/src/modules/validators/core.js +45 -42
  62. package/dist/src/modules/validators/core.test.js +6 -6
  63. package/dist/src/modules/validators/smart-sessions.test.js +4 -4
  64. package/dist/src/modules/validators/webauthn-contract.d.ts.map +1 -1
  65. package/dist/src/orchestrator/client.d.ts +2 -2
  66. package/dist/src/orchestrator/client.d.ts.map +1 -1
  67. package/dist/src/orchestrator/consts.d.ts +2 -1
  68. package/dist/src/orchestrator/consts.d.ts.map +1 -1
  69. package/dist/src/orchestrator/consts.js +3 -1
  70. package/dist/src/orchestrator/index.d.ts +1 -1
  71. package/dist/src/orchestrator/index.d.ts.map +1 -1
  72. package/dist/src/orchestrator/registry.d.ts +1 -23
  73. package/dist/src/orchestrator/registry.d.ts.map +1 -1
  74. package/dist/src/orchestrator/registry.js +22 -24
  75. package/dist/src/orchestrator/registry.test.js +4 -4
  76. package/dist/src/orchestrator/types.d.ts +1 -6
  77. package/dist/src/orchestrator/types.d.ts.map +1 -1
  78. package/dist/src/types.d.ts +10 -4
  79. package/dist/src/types.d.ts.map +1 -1
  80. package/package.json +1 -1
  81. package/dist/src/orchestrator/registry.json +0 -365
package/dist/src/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.removeCredential = exports.addCredential = exports.hasCredential = exports.hasCredentialById = exports.getCredentialIds = exports.generateCredentialId = exports.UnsupportedTokenError = exports.UnsupportedChainIdError = exports.UnsupportedChainError = exports.TokenNotSupportedError = exports.IntentNotFoundError = exports.OrchestratorError = exports.OnlyOneTargetTokenAmountCanBeUnsetError = exports.NoPathFoundError = exports.InvalidIntentSignatureError = exports.InvalidApiKeyError = exports.InsufficientBalanceError = exports.AuthenticationRequiredError = exports.isOrchestratorError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.UserOperationRequiredForSmartSessionsError = exports.SourceChainsNotAvailableForUserOpFlowError = exports.ExecutionError = exports.IntentFailedError = exports.isExecutionError = exports.Eip7702NotSupportedForAccountError = exports.SignMessageNotSupportedByAccountError = exports.SigningNotSupportedForAccountError = exports.SmartSessionsNotEnabledError = exports.FactoryArgsNotAvailableError = exports.ExistingEip7702AccountsNotSupportedError = exports.Eip7702AccountMustHaveEoaError = exports.AccountError = exports.isAccountError = exports.setUpRecovery = exports.setSubValidator = exports.removeSubValidator = exports.removeOwner = exports.recover = exports.encodeSmartSessionSignature = exports.enablePasskeys = exports.enableMultiFactor = exports.enableEcdsa = exports.disablePasskeys = exports.disableMultiFactor = exports.disableEcdsa = exports.changeThreshold = exports.changeMultiFactorThreshold = exports.addOwner = void 0;
4
- exports.getTokenAddress = exports.getOrchestrator = exports.WEBAUTHN_VALIDATOR_ABI = exports.getCredentials = exports.getThreshold = exports.getCredentialInfo = exports.setThreshold = void 0;
3
+ exports.getSupportedTokens = exports.UnsupportedTokenError = exports.UnsupportedChainIdError = exports.UnsupportedChainError = exports.TokenNotSupportedError = exports.IntentNotFoundError = exports.OrchestratorError = exports.OnlyOneTargetTokenAmountCanBeUnsetError = exports.NoPathFoundError = exports.InvalidIntentSignatureError = exports.InvalidApiKeyError = exports.InsufficientBalanceError = exports.AuthenticationRequiredError = exports.isOrchestratorError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.UserOperationRequiredForSmartSessionsError = exports.SourceChainsNotAvailableForUserOpFlowError = exports.ExecutionError = exports.IntentFailedError = exports.isExecutionError = exports.Eip7702NotSupportedForAccountError = exports.SignMessageNotSupportedByAccountError = exports.SigningNotSupportedForAccountError = exports.SmartSessionsNotEnabledError = exports.FactoryArgsNotAvailableError = exports.ExistingEip7702AccountsNotSupportedError = exports.Eip7702AccountMustHaveEoaError = exports.AccountError = exports.isAccountError = exports.setUpRecovery = exports.setSubValidator = exports.removeSubValidator = exports.removePasskeyOwner = exports.removeOwner = exports.recoverPasskeyOwnership = exports.recoverEcdsaOwnership = exports.recover = exports.encodeSmartSessionSignature = exports.enablePasskeys = exports.enableMultiFactor = exports.enableEcdsa = exports.disablePasskeys = exports.disableMultiFactor = exports.disableEcdsa = exports.changePasskeyThreshold = exports.changeThreshold = exports.changeMultiFactorThreshold = exports.addPasskeyOwner = exports.addOwner = void 0;
4
+ exports.getOrchestrator = exports.WEBAUTHN_VALIDATOR_ABI = exports.getCredentials = exports.getThreshold = exports.getCredentialInfo = exports.setThreshold = exports.removeCredential = exports.addCredential = exports.hasCredential = exports.hasCredentialById = exports.getCredentialIds = exports.generateCredentialId = exports.getTokenAddress = void 0;
5
5
  exports.createRhinestoneAccount = createRhinestoneAccount;
6
6
  const accounts_1 = require("./accounts");
7
7
  Object.defineProperty(exports, "AccountError", { enumerable: true, get: function () { return accounts_1.AccountError; } });
@@ -15,7 +15,9 @@ Object.defineProperty(exports, "SignMessageNotSupportedByAccountError", { enumer
15
15
  Object.defineProperty(exports, "SmartSessionsNotEnabledError", { enumerable: true, get: function () { return accounts_1.SmartSessionsNotEnabledError; } });
16
16
  const actions_1 = require("./actions");
17
17
  Object.defineProperty(exports, "addOwner", { enumerable: true, get: function () { return actions_1.addOwner; } });
18
+ Object.defineProperty(exports, "addPasskeyOwner", { enumerable: true, get: function () { return actions_1.addPasskeyOwner; } });
18
19
  Object.defineProperty(exports, "changeMultiFactorThreshold", { enumerable: true, get: function () { return actions_1.changeMultiFactorThreshold; } });
20
+ Object.defineProperty(exports, "changePasskeyThreshold", { enumerable: true, get: function () { return actions_1.changePasskeyThreshold; } });
19
21
  Object.defineProperty(exports, "changeThreshold", { enumerable: true, get: function () { return actions_1.changeThreshold; } });
20
22
  Object.defineProperty(exports, "disableEcdsa", { enumerable: true, get: function () { return actions_1.disableEcdsa; } });
21
23
  Object.defineProperty(exports, "disableMultiFactor", { enumerable: true, get: function () { return actions_1.disableMultiFactor; } });
@@ -25,7 +27,10 @@ Object.defineProperty(exports, "enableMultiFactor", { enumerable: true, get: fun
25
27
  Object.defineProperty(exports, "enablePasskeys", { enumerable: true, get: function () { return actions_1.enablePasskeys; } });
26
28
  Object.defineProperty(exports, "encodeSmartSessionSignature", { enumerable: true, get: function () { return actions_1.encodeSmartSessionSignature; } });
27
29
  Object.defineProperty(exports, "recover", { enumerable: true, get: function () { return actions_1.recover; } });
30
+ Object.defineProperty(exports, "recoverEcdsaOwnership", { enumerable: true, get: function () { return actions_1.recoverEcdsaOwnership; } });
31
+ Object.defineProperty(exports, "recoverPasskeyOwnership", { enumerable: true, get: function () { return actions_1.recoverPasskeyOwnership; } });
28
32
  Object.defineProperty(exports, "removeOwner", { enumerable: true, get: function () { return actions_1.removeOwner; } });
33
+ Object.defineProperty(exports, "removePasskeyOwner", { enumerable: true, get: function () { return actions_1.removePasskeyOwner; } });
29
34
  Object.defineProperty(exports, "removeSubValidator", { enumerable: true, get: function () { return actions_1.removeSubValidator; } });
30
35
  Object.defineProperty(exports, "setSubValidator", { enumerable: true, get: function () { return actions_1.setSubValidator; } });
31
36
  Object.defineProperty(exports, "setUpRecovery", { enumerable: true, get: function () { return actions_1.setUpRecovery; } });
@@ -42,6 +47,8 @@ const utils_1 = require("./execution/utils");
42
47
  const modules_1 = require("./modules");
43
48
  const orchestrator_1 = require("./orchestrator");
44
49
  Object.defineProperty(exports, "AuthenticationRequiredError", { enumerable: true, get: function () { return orchestrator_1.AuthenticationRequiredError; } });
50
+ Object.defineProperty(exports, "getSupportedTokens", { enumerable: true, get: function () { return orchestrator_1.getSupportedTokens; } });
51
+ Object.defineProperty(exports, "getTokenAddress", { enumerable: true, get: function () { return orchestrator_1.getTokenAddress; } });
45
52
  Object.defineProperty(exports, "InsufficientBalanceError", { enumerable: true, get: function () { return orchestrator_1.InsufficientBalanceError; } });
46
53
  Object.defineProperty(exports, "IntentNotFoundError", { enumerable: true, get: function () { return orchestrator_1.IntentNotFoundError; } });
47
54
  Object.defineProperty(exports, "InvalidApiKeyError", { enumerable: true, get: function () { return orchestrator_1.InvalidApiKeyError; } });
@@ -233,4 +240,3 @@ Object.defineProperty(exports, "WEBAUTHN_VALIDATOR_ABI", { enumerable: true, get
233
240
  // Orchestrator helpers
234
241
  var orchestrator_2 = require("./orchestrator");
235
242
  Object.defineProperty(exports, "getOrchestrator", { enumerable: true, get: function () { return orchestrator_2.getOrchestrator; } });
236
- Object.defineProperty(exports, "getTokenAddress", { enumerable: true, get: function () { return orchestrator_2.getTokenAddress; } });
@@ -1,23 +1,9 @@
1
- import { type Chain, type Hex } from 'viem';
1
+ import { type Chain } from 'viem';
2
2
  import type { RhinestoneAccountConfig } from '../types';
3
3
  import { type Module } from './common';
4
4
  import { HOOK_ADDRESS } from './omni-account';
5
5
  import { getOwners, getValidators } from './read';
6
6
  import { getOwnerValidator } from './validators';
7
- interface WebAuthnData {
8
- authenticatorData: Hex;
9
- clientDataJSON: string;
10
- typeIndex: number | bigint;
11
- }
12
- interface WebauthnValidatorSignature {
13
- webauthn: WebAuthnData;
14
- signature: WebauthnSignature | Hex | Uint8Array;
15
- usePrecompiled?: boolean;
16
- }
17
- interface WebauthnSignature {
18
- r: bigint;
19
- s: bigint;
20
- }
21
7
  interface ModeleSetup {
22
8
  validators: Module[];
23
9
  executors: Module[];
@@ -25,7 +11,6 @@ interface ModeleSetup {
25
11
  hooks: Module[];
26
12
  }
27
13
  declare function getSetup(config: RhinestoneAccountConfig): ModeleSetup;
28
- declare function getWebauthnValidatorSignature({ webauthn, signature, usePrecompiled, }: WebauthnValidatorSignature): `0x${string}`;
29
14
  declare function isRip7212SupportedNetwork(chain: Chain): boolean;
30
- export { HOOK_ADDRESS, getSetup, getOwnerValidator, getWebauthnValidatorSignature, getOwners, getValidators, isRip7212SupportedNetwork, };
15
+ export { HOOK_ADDRESS, getSetup, getOwnerValidator, getOwners, getValidators, isRip7212SupportedNetwork, };
31
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,KAAK,EAEV,KAAK,GAAG,EAET,MAAM,MAAM,CAAA;AAWb,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAEvD,OAAO,EAGL,KAAK,MAAM,EACZ,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,YAAY,EAA2B,MAAM,gBAAgB,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAA4B,MAAM,cAAc,CAAA;AAM1E,UAA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AAM,cAAc,CAAA;AAM1E,UAAU,WAAW;IACnB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB;AAED,iBAAS,QAAQ,CAAC,MAAM,EAAE,uBAAuB,GAAG,WAAW,CA2D9D;AAED,iBAAS,yBAAyB,CAAC,KAAK,EAAE,KAAK,WAW9C;AAED,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,aAAa,EACb,yBAAyB,GAC1B,CAAA"}
@@ -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: omni_account_1.INTENT_EXECUTOR_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('0x20C008719Ba9D8aA14C7d07D122cd5E965aA8da5');
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
- account: consts_1.passkeyAccount,
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
- export { HOOK_ADDRESS, TARGET_MODULE_ADDRESS, SAME_CHAIN_MODULE_ADDRESS, INTENT_EXECUTOR_ADDRESS, };
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,GACxB,CAAA"}
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(webAuthnCredential: WebauthnCredential): Module;
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,EAIT,M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uBAAuB,GAAG,IAAI,CAAC,EAAE,GACtE,MAAM,CAgDR;AAED,iBAAS,0BAA0B,CACjC,SAAS,EAAE,OAAO,EAAE,EACpB,SAAS,SAAI,GACZ,MAAM,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 = '0x20C008719Ba9D8aA14C7d07D122cd5E965aA8da5';
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 = '0x00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000001635bc6d0f68ff895cae8a288ecf7542a6a9cd555df784b73e1e2ea7e9104b1db15e9015d280cb19527881c625fee43fd3a405d5b0d199a8c8e6589a7381209e40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97631d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f47b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a22746278584e465339585f3442797231634d77714b724947422d5f3330613051685a36793775634d30424f45222c226f726967696e223a22687474703a2f2f6c6f63616c686f73743a33303030222c2263726f73734f726967696e223a66616c73652c20226f746865725f6b6579735f63616e5f62655f61646465645f68657265223a22646f206e6f7420636f6d7061726520636c69656e74446174614a534f4e20616761696e737420612074656d706c6174652e205365652068747470733a2f2f676f6f2e676c2f796162506578227d000000000000000000000000';
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: owners.account.publicKey,
72
- authenticatorId: owners.account.id,
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,52 +91,55 @@ function getOwnableValidator(threshold, owners) {
91
91
  type: common_1.MODULE_TYPE_ID_VALIDATOR,
92
92
  };
93
93
  }
94
- function getWebAuthnValidator(webAuthnCredential) {
95
- let pubKeyX;
96
- let pubKeyY;
97
- // Distinguish between PublicKey and Hex / byte encoded public key
98
- if (typeof webAuthnCredential.pubKey === 'string' ||
99
- webAuthnCredential.pubKey instanceof Uint8Array) {
100
- // It's a P256Credential
101
- const { x, y, prefix } = parsePublicKey(webAuthnCredential.pubKey);
102
- pubKeyX = x;
103
- pubKeyY = y;
104
- if (prefix && prefix !== 4) {
105
- throw new Error('Only uncompressed public keys are supported');
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
- else {
109
- // It's already a PublicKey
110
- pubKeyX = webAuthnCredential.pubKey.x;
111
- pubKeyY = webAuthnCredential.pubKey.y;
112
- }
113
- // Encode per WebAuthnValidator.onInstall:
114
- // abi.decode(data, (uint256 threshold, WebAuthnCredential[] credentials))
115
- // struct WebAuthnCredential { uint256 pubKeyX; uint256 pubKeyY; bool requireUV; }
116
- const threshold = 1n;
117
- const requireUV = true;
113
+ const publicKeys = webAuthnCredentials.map(getPublicKey);
118
114
  return {
119
115
  address: WEBAUTHN_VALIDATOR_ADDRESS,
120
116
  initData: (0, viem_1.encodeAbiParameters)([
121
- { type: 'uint256', name: 'threshold' },
117
+ { name: 'threshold', type: 'uint256' },
122
118
  {
123
- components: [
124
- { type: 'uint256', name: 'pubKeyX' },
125
- { type: 'uint256', name: 'pubKeyY' },
126
- { type: 'bool', name: 'requireUV' },
127
- ],
128
119
  name: 'credentials',
129
120
  type: 'tuple[]',
121
+ components: [
122
+ {
123
+ name: 'pubKeyX',
124
+ type: 'uint256',
125
+ },
126
+ {
127
+ name: 'pubKeyY',
128
+ type: 'uint256',
129
+ },
130
+ {
131
+ name: 'requireUV',
132
+ type: 'bool',
133
+ },
134
+ ],
130
135
  },
131
136
  ], [
132
- threshold,
133
- [
134
- {
135
- pubKeyX,
136
- pubKeyY,
137
- requireUV,
138
- },
139
- ],
137
+ BigInt(threshold),
138
+ publicKeys.map((publicKey) => ({
139
+ pubKeyX: publicKey.x,
140
+ pubKeyY: publicKey.y,
141
+ requireUV: false,
142
+ })),
140
143
  ]),
141
144
  deInitData: '0x',
142
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('0x20C008719Ba9D8aA14C7d07D122cd5E965aA8da5');
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('0x20C008719Ba9D8aA14C7d07D122cd5E965aA8da5');
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('0x20C008719Ba9D8aA14C7d07D122cd5E965aA8da5');
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
- account: consts_1.passkeyAccount,
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('0x580a9af0569ad3905b26a703201b358aa0904236642ebe79b22a19d00d3737637d46f725a5427ae45a9569259bf67e1e16b187d7b3ad1ed70138c4f0409677d19c9a01073b202db2ed56e604ad11db557d8c3ad75181619597f21b830f2da82a');
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
- account: consts_1.passkeyAccount,
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('0xf24845e5da40837f1dc8f1d6ce3d2fd64e96b35e9c9eccf614ed2c4e3be70e9f');
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('0xee8658aa7297fb41dc2658545e3c99eb2173085b4c982b9ab3802af86b3adf54');
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 = '0xf24845e5da40837f1dc8f1d6ce3d2fd64e96b35e9c9eccf614ed2c4e3be70e9f';
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('0x00f24845e5da40837f1dc8f1d6ce3d2fd64e96b35e9c9eccf614ed2c4e3be70e9fabcdef');
223
+ (0, vitest_1.expect)(sessionSignature).toEqual('0x00d3b39024e437b4cac278e33965b9a9326e81ee46bd45d890adbfc8eb45412fa1abcdef');
224
224
  });
225
225
  });
226
226
  });
@@ -1 +1 @@
1
- {"version":3,"file":"webauthn-contract.d.ts","sourceRoot":"","sources":["../../../../modules/validators/webauthn-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EAGV,KAAK,GAAG,EAET,MAAM,MAAM,CAAA;AAGb,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAGvD;;GAEG;AACH,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyFlB,CAAA;AAEV;;;;;;;;GAQG;AACH,iBAAe,oBAAoB,CACjC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,OAAO,EACvB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,GAAG,CAAC,CAcd;AAED;;;;;;GAMG;AACH,iBAAe,gBAAgB,CAC7B,cAAc,EAAE,OAAO,EACvB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,GAAG,EAAE,CAAC,CAchB;AAED;;;;;;;GAOG;AACH,iBAAe,iBAAiB,CAC9B,YAAY,EAAE,GAAG,EACjB,cAAc,EAAE,OAAO,EACvB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,OAAO,CAAC,CAclB;AAED;;;;;;;;GAQG;AACH,iBAAe,aAAa,CAC1B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,OAAO,EACvB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,OAAO,CAAC,CAclB;AAED;;;;;;GAMG;AACH,iBAAS,aAAa,CACpB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,SAAS,UAAQ,GAChB,IAAI,CAUN;AAED;;;;;GAKG;AACH,iBAAS,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAUhE;AAED;;;;GAIG;AACH,iBAAS,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAU7C;AAED;;;;;;;GAOG;AACH,iBAAe,iBAAiB,CAC9B,YAAY,EAAE,GAAG,EACjB,cAAc,EAAE,OAAO,EACvB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC;IACT,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,OAAO,CAAA;CACnB,CAAC,CAeD;AAED;;;;;;GAMG;AACH,iBAAe,YAAY,CACzB,cAAc,EAAE,OAAO,EACvB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,MAAM,CAAC,CAcjB;AAED;;;;;;GAMG;AACH,iBAAe,cAAc,CAC3B,cAAc,EAAE,OAAO,EACvB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CACR,KAAK,CAAC;IACJ,YAAY,EAAE,GAAG,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,OAAO,CAAA;CACnB,CAAC,CACH,CAqBA;AAED,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,sBAAsB,GACvB,CAAA"}
1
+ {"version":3,"file":"webauthn-contract.d.ts","sourceRoot":"","sources":["../../../../modules/validators/webauthn-contract.ts"],"names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UN;AAED;;;;;GAKG;AACH,iBAAS,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAUhE;AAED;;;;GAIG;AACH,iBAAS,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAU7C;AAED;;;;;;;GAOG;AACH,iBAAe,iBAAiB,CAC9B,YAAY,EAAE,GAAG,EACjB,cAAc,EAAE,OAAO,EACvB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC;IACT,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,OAAO,CAAA;CACnB,CAAC,CAeD;AAED;;;;;;GAMG;AACH,iBAAe,YAAY,CACzB,cAAc,EAAE,OAAO,EACvB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,MAAM,CAAC,CAcjB;AAED;;;;;;GAMG;AACH,iBAAe,cAAc,CAC3B,cAAc,EAAE,OAAO,EACvB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CACR,KAAK,CAAC;IACJ,YAAY,EAAE,GAAG,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,OAAO,CAAA;CACnB,CAAC,CACH,CAqBA;AAED,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,sBAAsB,GACvB,CAAA"}
@@ -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: string);
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,CAAA;AAexD,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EAET,cAAc,EACf,MAAM,SAAS,CAAA;AAGhB,qBAAa,YAAY;IACvB,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,MAAM,CAAQ;gBAEV,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAKvC,YAAY,CAChB,WAAW,EAAE,OAAO,EACpB,MAAM,CAAC,EAAE;QACP,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,MAAM,CAAC,EAAE;YACP,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,EAAE,CAAA;SAC7B,CAAA;KACF,GACA,OAAO,CAAC,SAAS,CAAC;IAmDf,iBAAiB,CACrB,WAAW,EAAE,OAAO,EACpB,kBAAkB,EAAE,MAAM,EAC1B,uBAAuB,EAAE,OAAO,EAChC,mBAAmB,EAAE,MAAM,GAC1B,OAAO,CAAC,MAAM,CAAC;IA0CZ,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;IA0BtD,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAqBxD,YAAY,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;IAqBnE,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAkBlE,OAAO,CAAC,UAAU;IA0ElB,OAAO,CAAC,iBAAiB;CAmD1B"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../orchestrator/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,OAAO,EAAuB,MAAM,MAAM,CAAA;AAexD,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EAET,cAAc,EACf,MAAM,SAAS,CAAA;AAGhB,qBAAa,YAAY;IACvB,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,MAAM,CAAC,CAAQ;gBAEX,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;IAKxC,YAAY,CAChB,WAAW,EAAE,OAAO,EACpB,MAAM,CAAC,EAAE;QACP,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,MAAM,CAAC,EAAE;YACP,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,EAAE,CAAA;SAC7B,CAAA;KACF,GACA,OAAO,CAAC,SAAS,CAAC;IAmDf,iBAAiB,CACrB,WAAW,EAAE,OAAO,EACpB,kBAAkB,EAAE,MAAM,EAC1B,uBAAuB,EAAE,OAAO,EAChC,mBAAmB,EAAE,MAAM,GAC1B,OAAO,CAAC,MAAM,CAAC;IA0CZ,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;IA0BtD,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAqBxD,YAAY,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;IAqBnE,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,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: string, orchestratorUrl?: string): Orchestrator;
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,EACd,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"}
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"}
@@ -1,32 +1,11 @@
1
1
  import { type Address, type Chain } from 'viem';
2
2
  import type { TokenSymbol } from '../types';
3
3
  import type { TokenConfig } from './types';
4
- interface TokenEntry {
5
- symbol: string;
6
- address: Address;
7
- decimals: number;
8
- balanceSlot: number | null;
9
- }
10
- interface ChainContracts {
11
- spokepool: Address;
12
- hook: Address;
13
- originModule: Address;
14
- targetModule: Address;
15
- sameChainModule: Address;
16
- }
17
- interface ChainEntry {
18
- name: string;
19
- contracts: ChainContracts;
20
- tokens: TokenEntry[];
21
- }
22
- interface Registry {
23
- [chainId: string]: ChainEntry;
24
- }
25
4
  declare function getSupportedChainIds(): number[];
26
5
  declare function getWethAddress(chain: Chain): Address;
27
6
  declare function getTokenSymbol(tokenAddress: Address, chainId: number): string;
28
7
  declare function getTokenAddress(tokenSymbol: TokenSymbol, chainId: number): Address;
29
- declare function getChainById(chainId: number): Chain | undefined;
8
+ declare function getChainById(chainId: number): Chain;
30
9
  declare function isTestnet(chainId: number): boolean;
31
10
  declare function isTokenAddressSupported(address: Address, chainId: number): boolean;
32
11
  declare function getSupportedTokens(chainId: number): TokenConfig[];
@@ -35,5 +14,4 @@ declare function getDefaultAccountAccessList(onTestnets?: boolean): {
35
14
  };
36
15
  declare function resolveTokenAddress(token: TokenSymbol | Address, chainId: number): Address;
37
16
  export { getTokenSymbol, getTokenAddress, getWethAddress, getChainById, getSupportedTokens, getSupportedChainIds, isTestnet, isTokenAddressSupported, getDefaultAccountAccessList, resolveTokenAddress, };
38
- export type { TokenEntry, ChainContracts, ChainEntry, Registry };
39
17
  //# sourceMappingURL=registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../orchestrator/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAA0B,MAAM,MAAM,CAAA;AAcvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,UAAU,UAAU;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B;AAED,UAAU,cAAc;IACtB,SAAS,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,OAAO,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA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