@rhinestone/sdk 2.0.0-beta.4 → 2.0.0-beta.41

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 (114) hide show
  1. package/dist/src/accounts/error.d.ts +2 -9
  2. package/dist/src/accounts/error.d.ts.map +1 -1
  3. package/dist/src/accounts/error.js +5 -11
  4. package/dist/src/accounts/hca.d.ts +25 -0
  5. package/dist/src/accounts/hca.d.ts.map +1 -0
  6. package/dist/src/accounts/hca.js +148 -0
  7. package/dist/src/accounts/index.d.ts +23 -10
  8. package/dist/src/accounts/index.d.ts.map +1 -1
  9. package/dist/src/accounts/index.js +170 -79
  10. package/dist/src/accounts/kernel.d.ts +1 -2
  11. package/dist/src/accounts/kernel.d.ts.map +1 -1
  12. package/dist/src/accounts/kernel.js +1 -8
  13. package/dist/src/accounts/nexus.d.ts +3 -2
  14. package/dist/src/accounts/nexus.d.ts.map +1 -1
  15. package/dist/src/accounts/nexus.js +33 -8
  16. package/dist/src/accounts/safe.d.ts +1 -2
  17. package/dist/src/accounts/safe.d.ts.map +1 -1
  18. package/dist/src/accounts/safe.js +3 -9
  19. package/dist/src/accounts/signing/common.d.ts +10 -4
  20. package/dist/src/accounts/signing/common.d.ts.map +1 -1
  21. package/dist/src/accounts/signing/common.js +48 -46
  22. package/dist/src/accounts/signing/message.d.ts.map +1 -1
  23. package/dist/src/accounts/signing/message.js +1 -4
  24. package/dist/src/accounts/signing/typedData.d.ts.map +1 -1
  25. package/dist/src/accounts/signing/typedData.js +1 -4
  26. package/dist/src/accounts/startale.d.ts +1 -2
  27. package/dist/src/accounts/startale.d.ts.map +1 -1
  28. package/dist/src/accounts/startale.js +6 -9
  29. package/dist/src/actions/ecdsa.js +5 -5
  30. package/dist/src/actions/index.js +2 -2
  31. package/dist/src/actions/mfa.js +2 -2
  32. package/dist/src/actions/passkeys.js +2 -2
  33. package/dist/src/actions/smart-sessions.d.ts +29 -5
  34. package/dist/src/actions/smart-sessions.d.ts.map +1 -1
  35. package/dist/src/actions/smart-sessions.js +38 -10
  36. package/dist/src/errors/index.d.ts +6 -4
  37. package/dist/src/errors/index.d.ts.map +1 -1
  38. package/dist/src/errors/index.js +6 -6
  39. package/dist/src/execution/error.d.ts +42 -11
  40. package/dist/src/execution/error.d.ts.map +1 -1
  41. package/dist/src/execution/error.js +53 -15
  42. package/dist/src/execution/index.d.ts +18 -18
  43. package/dist/src/execution/index.d.ts.map +1 -1
  44. package/dist/src/execution/index.js +27 -42
  45. package/dist/src/execution/utils.d.ts +55 -14
  46. package/dist/src/execution/utils.d.ts.map +1 -1
  47. package/dist/src/execution/utils.js +629 -82
  48. package/dist/src/index.d.ts +270 -38
  49. package/dist/src/index.d.ts.map +1 -1
  50. package/dist/src/index.js +89 -116
  51. package/dist/src/jwt-server/jcs.d.ts +1 -1
  52. package/dist/src/jwt-server/jcs.js +4 -2
  53. package/dist/src/modules/index.d.ts.map +1 -1
  54. package/dist/src/modules/index.js +0 -5
  55. package/dist/src/modules/read.d.ts +3 -2
  56. package/dist/src/modules/read.d.ts.map +1 -1
  57. package/dist/src/modules/read.js +52 -4
  58. package/dist/src/modules/validators/core.d.ts +6 -6
  59. package/dist/src/modules/validators/core.d.ts.map +1 -1
  60. package/dist/src/modules/validators/core.js +42 -39
  61. package/dist/src/modules/validators/cross-chain-permits.d.ts +21 -0
  62. package/dist/src/modules/validators/cross-chain-permits.d.ts.map +1 -0
  63. package/dist/src/modules/validators/cross-chain-permits.js +111 -0
  64. package/dist/src/modules/validators/permissions.d.ts +1 -0
  65. package/dist/src/modules/validators/permissions.d.ts.map +1 -1
  66. package/dist/src/modules/validators/permissions.js +192 -18
  67. package/dist/src/modules/validators/policies/claim/arbiters.d.ts +22 -0
  68. package/dist/src/modules/validators/policies/claim/arbiters.d.ts.map +1 -0
  69. package/dist/src/modules/validators/policies/claim/arbiters.js +57 -0
  70. package/dist/src/modules/validators/smart-sessions.d.ts +38 -9
  71. package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
  72. package/dist/src/modules/validators/smart-sessions.js +509 -92
  73. package/dist/src/orchestrator/caip2.d.ts +16 -3
  74. package/dist/src/orchestrator/caip2.d.ts.map +1 -1
  75. package/dist/src/orchestrator/caip2.js +38 -6
  76. package/dist/src/orchestrator/client.d.ts +2 -1
  77. package/dist/src/orchestrator/client.d.ts.map +1 -1
  78. package/dist/src/orchestrator/client.js +50 -24
  79. package/dist/src/orchestrator/consts.d.ts +1 -1
  80. package/dist/src/orchestrator/consts.d.ts.map +1 -1
  81. package/dist/src/orchestrator/consts.js +1 -1
  82. package/dist/src/orchestrator/destinations.d.ts +24 -0
  83. package/dist/src/orchestrator/destinations.d.ts.map +1 -0
  84. package/dist/src/orchestrator/destinations.js +59 -0
  85. package/dist/src/orchestrator/error.d.ts +95 -5
  86. package/dist/src/orchestrator/error.d.ts.map +1 -1
  87. package/dist/src/orchestrator/error.js +260 -4
  88. package/dist/src/orchestrator/index.d.ts +7 -5
  89. package/dist/src/orchestrator/index.d.ts.map +1 -1
  90. package/dist/src/orchestrator/index.js +4 -3
  91. package/dist/src/orchestrator/registry.d.ts +2 -1
  92. package/dist/src/orchestrator/registry.d.ts.map +1 -1
  93. package/dist/src/orchestrator/registry.js +13 -0
  94. package/dist/src/orchestrator/types.d.ts +92 -29
  95. package/dist/src/orchestrator/types.d.ts.map +1 -1
  96. package/dist/src/orchestrator/types.js +1 -5
  97. package/dist/src/orchestrator/wire.d.ts +30 -0
  98. package/dist/src/orchestrator/wire.d.ts.map +1 -0
  99. package/dist/src/orchestrator/wire.gen.d.ts +4290 -0
  100. package/dist/src/orchestrator/wire.gen.d.ts.map +1 -0
  101. package/dist/src/orchestrator/wire.gen.js +1 -0
  102. package/dist/src/orchestrator/wire.js +1 -0
  103. package/dist/src/smart-sessions/index.d.ts +6 -0
  104. package/dist/src/smart-sessions/index.d.ts.map +1 -0
  105. package/dist/src/smart-sessions/index.js +7 -0
  106. package/dist/src/types.d.ts +299 -31
  107. package/dist/src/types.d.ts.map +1 -1
  108. package/dist/src/utils/index.d.ts +59 -0
  109. package/dist/src/utils/index.d.ts.map +1 -1
  110. package/dist/src/utils/index.js +59 -0
  111. package/package.json +5 -9
  112. package/dist/src/actions/recovery.d.ts +0 -33
  113. package/dist/src/actions/recovery.d.ts.map +0 -1
  114. package/dist/src/actions/recovery.js +0 -189
package/dist/src/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { checkAddress, deploy as deployInternal, FactoryArgsNotAvailableError, getAccountProvider, getAddress as getAddressInternal, getInitCode, isDeployed as isDeployedInternal, OwnersFieldRequiredError, setup as setupInternal, signEip7702InitData as signEip7702InitDataInternal, } from './accounts/index.js';
2
2
  import { createAuthProvider } from './auth/provider.js';
3
- import { getIntentStatus as getIntentStatusInternal, getPortfolio as getPortfolioInternal, sendUserOperation as sendUserOperationInternal, splitIntents as splitIntentsInternal, waitForExecution as waitForExecutionInternal, } from './execution/index.js';
4
- import { getTransactionMessages as getTransactionMessagesInternal, prepareTransaction as prepareTransactionInternal, prepareUserOperation as prepareUserOperationInternal, signAuthorizations as signAuthorizationsInternal, signMessage as signMessageInternal, signTransaction as signTransactionInternal, signTypedData as signTypedDataInternal, signUserOperation as signUserOperationInternal, submitTransaction as submitTransactionInternal, submitUserOperation as submitUserOperationInternal, } from './execution/utils.js';
3
+ import { getAppFeeBalances as getAppFeeBalancesInternal, getIntentStatus as getIntentStatusInternal, getPortfolio as getPortfolioInternal, sendUserOperation as sendUserOperationInternal, splitIntents as splitIntentsInternal, waitForExecution as waitForExecutionInternal, } from './execution/index.js';
4
+ import { assembleTransaction as assembleTransactionInternal, getTargetExecutionSignature as getTargetExecutionSignatureInternal, getTransactionMessages as getTransactionMessagesInternal, prepareTransaction as prepareTransactionInternal, prepareUserOperation as prepareUserOperationInternal, signAuthorizations as signAuthorizationsInternal, signIntent as signIntentInternal, signMessage as signMessageInternal, signTransaction as signTransactionInternal, signTypedData as signTypedDataInternal, signUserOperation as signUserOperationInternal, submitTransaction as submitTransactionInternal, submitUserOperation as submitUserOperationInternal, } from './execution/utils.js';
5
5
  import { getExecutors as getExecutorsInternal, getOwners as getOwnersInternal, getSessionDetails as getSessionDetailsInternal, getValidators as getValidatorsInternal, MULTI_FACTOR_VALIDATOR_ADDRESS, OWNABLE_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, signEnableSession as signEnableSessionInternal, WEBAUTHN_VALIDATOR_ADDRESS, } from './modules/index.js';
6
6
  import { isSessionEnabled as isSessionEnabledInternal, } from './modules/validators/smart-sessions.js';
7
+ import { hyperCoreMainnet, solanaMainnet, tronMainnet } from './orchestrator/index.js';
7
8
  /**
8
- * Initialize a Rhinestone account
9
+ * Initialize a Rhinestone account from a fully-resolved config.
9
10
  * Note: accounts are deployed onchain only when the first transaction is sent.
10
- * @param config Account config (e.g. implementation vendor, owner signers, smart sessions)
11
- * @returns account
11
+ * @internal Use {@link RhinestoneSDK.createAccount} instead.
12
12
  */
13
- async function createRhinestoneAccount(config) {
13
+ async function createAccountInternal(config) {
14
14
  // Sanity check for existing (externally created) accounts
15
15
  // Ensures we decode the initdata correctly
16
16
  checkAddress(config);
@@ -21,31 +21,17 @@ async function createRhinestoneAccount(config) {
21
21
  /**
22
22
  * Deploys the account on a given chain
23
23
  * @param chain Chain to deploy the account on
24
- * @param session Session to deploy the account on (optional)
24
+ * @param params Optional deployment params (e.g. `sponsored`)
25
25
  */
26
26
  function deploy(chain, params) {
27
27
  return deployInternal(config, chain, params);
28
28
  }
29
- /**
30
- * Checks if the account is deployed on a given chain
31
- * @param chain Chain to check if the account is deployed on
32
- * @returns true if the account is deployed, false otherwise
33
- */
34
29
  function isDeployed(chain) {
35
30
  return isDeployedInternal(config, chain);
36
31
  }
37
- /**
38
- * Sets up the existing account on a given chain
39
- * by installing the missing modules (if any).
40
- * @param chain Chain to set up the account on
41
- */
42
32
  function setup(chain) {
43
33
  return setupInternal(config, chain);
44
34
  }
45
- /**
46
- * Get the account initialization data. Used for deploying the account onchain.
47
- * @returns factory address and factory data
48
- */
49
35
  function getInitData() {
50
36
  const initData = getInitCode(config);
51
37
  if (!initData) {
@@ -59,147 +45,80 @@ async function createRhinestoneAccount(config) {
59
45
  factoryData: initData.factoryData,
60
46
  };
61
47
  }
62
- /**
63
- * Prepare and sign the EIP-7702 account initialization data
64
- * @returns init data signature
65
- */
66
48
  function signEip7702InitData() {
67
49
  return signEip7702InitDataInternal(config);
68
50
  }
69
- /**
70
- * Prepare a transaction data
71
- * @param transaction Transaction to prepare
72
- * @returns prepared transaction data
73
- */
74
51
  function prepareTransaction(transaction) {
75
52
  return prepareTransactionInternal(config, transaction);
76
53
  }
77
- /**
78
- * Get the transaction typed data message to sign
79
- * @param preparedTransaction Prepared transaction data
80
- * @param options Optional override; pass `{ intentId }` to inspect a specific quote from `preparedTransaction.quotes.all`
81
- * @see {@link prepareTransaction} to prepare the transaction data for signing
82
- */
83
54
  function getTransactionMessages(preparedTransaction, options) {
84
55
  return getTransactionMessagesInternal(config, preparedTransaction, options);
85
56
  }
86
- /**
87
- * Sign a transaction
88
- * @param preparedTransaction Prepared transaction data
89
- * @param options Optional override; pass `{ intentId }` to sign a specific quote from `preparedTransaction.quotes.all`
90
- * @returns signed transaction data
91
- * @see {@link prepareTransaction} to prepare the transaction data for signing
92
- */
93
57
  function signTransaction(preparedTransaction, options) {
58
+ if (options && 'owner' in options) {
59
+ return signTransactionInternal(config, preparedTransaction, options);
60
+ }
94
61
  return signTransactionInternal(config, preparedTransaction, options);
95
62
  }
96
- /**
97
- * Sign the required EIP-7702 authorizations for a transaction
98
- * @param preparedTransaction Prepared transaction data
99
- * @returns signed authorizations
100
- * @see {@link prepareTransaction} to prepare the transaction data for signing
101
- */
63
+ function assembleTransaction(preparedTransaction, signatures) {
64
+ return assembleTransactionInternal(config, preparedTransaction, signatures);
65
+ }
102
66
  function signAuthorizations(preparedTransaction) {
103
67
  return signAuthorizationsInternal(config, preparedTransaction);
104
68
  }
105
- /**
106
- * Sign a message (EIP-191)
107
- * @param message Message to sign
108
- * @param chain Chain to sign the message on
109
- * @param signers Signers to use for signing
110
- * @returns signature
111
- */
112
69
  function signMessage(message, chain, signers) {
113
70
  return signMessageInternal(config, message, chain, signers);
114
71
  }
115
- /**
116
- * Sign a typed data (EIP-712)
117
- * @param parameters Typed data parameters
118
- * @param chain Chain to sign the typed data on
119
- * @param signers Signers to use for signing
120
- * @returns signature
121
- */
122
72
  function signTypedData(parameters, chain, signers) {
123
73
  return signTypedDataInternal(config, parameters, chain, signers);
124
74
  }
125
- /**
126
- * Submit a transaction
127
- * @param signedTransaction Signed transaction data
128
- * @param options Optional submission options
129
- * @param options.authorizations EIP-7702 authorizations to submit
130
- * @returns transaction result object (a UserOp hash)
131
- * @see {@link signTransaction} to sign the transaction data
132
- * @see {@link signAuthorizations} to sign the required EIP-7702 authorizations
133
- */
75
+ async function signIntent(signData, targetChain, signers) {
76
+ const { originSignatures, destinationSignature } = await signIntentInternal(config, signData, targetChain, signers, false);
77
+ const targetExecutionSignature = await getTargetExecutionSignatureInternal(config, signData, targetChain, signers);
78
+ return {
79
+ originSignatures,
80
+ destinationSignature,
81
+ targetExecutionSignature,
82
+ };
83
+ }
134
84
  function submitTransaction(signedTransaction, options) {
135
85
  return submitTransactionInternal(config, signedTransaction, options?.authorizations ?? [], options?.internal_dryRun ?? false);
136
86
  }
137
- /**
138
- * Prepare a user operation data
139
- * @param transaction User operation to prepare
140
- * @returns prepared user operation data
141
- */
142
87
  function prepareUserOperation(transaction) {
143
88
  return prepareUserOperationInternal(config, transaction);
144
89
  }
145
- /**
146
- * Sign a user operation
147
- * @param preparedUserOperation Prepared user operation data
148
- * @returns signed user operation data
149
- * @see {@link prepareUserOperation} to prepare the user operation data for signing
150
- */
151
90
  function signUserOperation(preparedUserOperation) {
152
91
  return signUserOperationInternal(config, preparedUserOperation);
153
92
  }
154
- /**
155
- * Submit a transaction
156
- * @param signedTransaction Signed transaction data
157
- * @returns transaction result object (a UserOp hash)
158
- * @see {@link signUserOperation} to sign the user operation data
159
- */
160
93
  function submitUserOperation(signedUserOperation) {
161
94
  return submitUserOperationInternal(config, signedUserOperation);
162
95
  }
163
- /**
164
- * Sign and send a user operation
165
- * @param transaction User operation to send
166
- * @returns user operation result object (a UserOp hash)
167
- */
168
96
  function sendUserOperation(transaction) {
169
97
  return sendUserOperationInternal(config, transaction);
170
98
  }
171
99
  function waitForExecution(result) {
172
100
  return waitForExecutionInternal(config, result);
173
101
  }
174
- /**
175
- * Get account address
176
- * @returns Address of the smart account
177
- */
178
102
  function getAddress() {
179
103
  return getAddressInternal(config);
180
104
  }
181
- /**
182
- * Get account portfolio
183
- * @param onTestnets Whether to query the testnet balances (default is `false`)
184
- * @returns Account balances
185
- */
186
105
  function getPortfolio(onTestnets = false) {
187
106
  return getPortfolioInternal(config, onTestnets);
188
107
  }
189
- /**
190
- * Get account owners (ECDSA)
191
- * @param chain Chain to get the owners on
192
- * @returns Account owners
193
- */
194
108
  function getOwners(chain) {
109
+ const accountType = getAccountProvider(config).type;
195
110
  const account = getAddress();
196
- return getOwnersInternal(account, chain, config.provider);
111
+ // For HCA, the module lives behind the factory (custom factories define
112
+ // their own). Resolve from the configured or initData factory so reads hit
113
+ // the right module.
114
+ const hcaFactory = config.account?.type === 'hca'
115
+ ? (config.account.factory ??
116
+ (config.initData && 'factory' in config.initData
117
+ ? config.initData.factory
118
+ : undefined))
119
+ : undefined;
120
+ return getOwnersInternal(accountType, account, chain, config.provider, hcaFactory);
197
121
  }
198
- /**
199
- * Get account validator modules
200
- * @param chain Chain to get the validators on
201
- * @returns List of account validators
202
- */
203
122
  function getValidators(chain) {
204
123
  const accountType = getAccountProvider(config).type;
205
124
  const account = getAddress();
@@ -230,9 +149,11 @@ async function createRhinestoneAccount(config) {
230
149
  prepareTransaction,
231
150
  getTransactionMessages,
232
151
  signTransaction,
152
+ assembleTransaction,
233
153
  signAuthorizations,
234
154
  signMessage,
235
155
  signTypedData,
156
+ signIntent,
236
157
  submitTransaction,
237
158
  prepareUserOperation,
238
159
  signUserOperation,
@@ -250,6 +171,10 @@ async function createRhinestoneAccount(config) {
250
171
  getInitData,
251
172
  };
252
173
  }
174
+ /**
175
+ * Stateful entry point that holds shared configuration (auth, provider, bundler,
176
+ * paymaster) and creates accounts from it.
177
+ */
253
178
  class RhinestoneSDK {
254
179
  authProvider;
255
180
  endpointUrl;
@@ -258,6 +183,10 @@ class RhinestoneSDK {
258
183
  paymaster;
259
184
  useDevContracts;
260
185
  headers;
186
+ /**
187
+ * Create a Rhinestone SDK instance.
188
+ * @param options Shared configuration applied to every account created by this instance
189
+ */
261
190
  constructor(options) {
262
191
  this.authProvider = createAuthProvider(options);
263
192
  this.endpointUrl = options.endpointUrl;
@@ -267,6 +196,26 @@ class RhinestoneSDK {
267
196
  this.useDevContracts = options.useDevContracts;
268
197
  this.headers = options.headers;
269
198
  }
199
+ /**
200
+ * Create an account using this instance's shared configuration.
201
+ * @param config Per-account configuration (owners, account type, modules, sessions)
202
+ * @returns The account instance
203
+ * @example
204
+ * ```ts
205
+ * import { RhinestoneSDK } from '@rhinestone/sdk'
206
+ * import { privateKeyToAccount } from 'viem/accounts'
207
+ *
208
+ * const owner = privateKeyToAccount('0x...')
209
+ *
210
+ * const sdk = new RhinestoneSDK({
211
+ * auth: { mode: 'apiKey', apiKey: process.env.RHINESTONE_API_KEY! },
212
+ * })
213
+ *
214
+ * const account = await sdk.createAccount({
215
+ * owners: { type: 'ecdsa', accounts: [owner] },
216
+ * })
217
+ * ```
218
+ */
270
219
  createAccount(config) {
271
220
  const rhinestoneConfig = {
272
221
  ...config,
@@ -278,15 +227,39 @@ class RhinestoneSDK {
278
227
  useDevContracts: this.useDevContracts,
279
228
  headers: this.headers,
280
229
  };
281
- return createRhinestoneAccount(rhinestoneConfig);
230
+ return createAccountInternal(rhinestoneConfig);
282
231
  }
232
+ /**
233
+ * Get the current status of a submitted intent.
234
+ * @param intentId The intent ID returned when the transaction was submitted
235
+ * @returns The intent status
236
+ */
283
237
  getIntentStatus(intentId) {
284
238
  return getIntentStatusInternal(this.authProvider, this.endpointUrl, intentId, this.headers);
285
239
  }
240
+ /**
241
+ * Split a transaction into multiple intents across chains.
242
+ * @param input The intents to split
243
+ * @returns The split-intents result
244
+ */
286
245
  splitIntents(input) {
287
246
  return splitIntentsInternal(this.authProvider, this.endpointUrl, input, this.headers);
288
247
  }
248
+ /**
249
+ * Get the integrator's accrued app-fee balance, as USD totals.
250
+ *
251
+ * App fees are earned by the integrator identified by this instance's API key
252
+ * (project-scoped, not tied to any account) and valued in USD at the moment
253
+ * each fee is collected, so the balance is not affected by later price
254
+ * movements of the collected tokens.
255
+ * @returns The withdrawable and pending app-fee balances in USD
256
+ */
257
+ getAppFeeBalances() {
258
+ return getAppFeeBalancesInternal(this.authProvider, this.endpointUrl, this.headers);
259
+ }
289
260
  }
290
- export { RhinestoneSDK, createRhinestoneAccount,
261
+ export { RhinestoneSDK,
262
+ // Non-viem destination chain descriptors (Solana, Tron, HyperCore)
263
+ hyperCoreMainnet, solanaMainnet, tronMainnet,
291
264
  // Validator addresses
292
265
  OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, };
@@ -2,7 +2,7 @@
2
2
  * RFC 8785 JSON Canonicalization Scheme (JCS).
3
3
  *
4
4
  * Produces a deterministic JSON serialization by:
5
- * 1. Sorting object keys lexicographically (Unicode code-point order)
5
+ * 1. Sorting object keys lexicographically (UTF-16 code-unit order, per RFC 8785 §3.2.3)
6
6
  * 2. Using ES2015+ `JSON.stringify` number serialization (IEEE 754 → shortest round-trip)
7
7
  * 3. No whitespace
8
8
  *
@@ -2,7 +2,7 @@
2
2
  * RFC 8785 JSON Canonicalization Scheme (JCS).
3
3
  *
4
4
  * Produces a deterministic JSON serialization by:
5
- * 1. Sorting object keys lexicographically (Unicode code-point order)
5
+ * 1. Sorting object keys lexicographically (UTF-16 code-unit order, per RFC 8785 §3.2.3)
6
6
  * 2. Using ES2015+ `JSON.stringify` number serialization (IEEE 754 → shortest round-trip)
7
7
  * 3. No whitespace
8
8
  *
@@ -43,7 +43,9 @@ function serialize(value) {
43
43
  const items = value.map((item) => serialize(item));
44
44
  return `[${items.join(',')}]`;
45
45
  }
46
- // Object — sort keys by Unicode code-point order
46
+ // Object — sort keys by UTF-16 code-unit order (RFC 8785 §3.2.3).
47
+ // Native String comparison already orders by UTF-16 code unit, which is
48
+ // exactly what JCS mandates — do not replace with a code-point comparator.
47
49
  const obj = value;
48
50
  const keys = Object.keys(obj).sort();
49
51
  const members = [];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,KAAK,EAAuB,MAAM,MAAM,CAAA;AAcpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAKhD,OAAO,EAQL,KAAK,WAAW,EAChB,KAAK,MAAM,EACZ,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAC/D,OAAO,EACL,iBAAiB,EAEjB,8BAA8B,EAC9B,yBAAyB,EACzB,8BAA8B,EAC9B,0BAA0B,EAC3B,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,EACV,MAAM,6BAA6B,CAAA;AAKpC,iBAAS,QAAQ,CAAC,MAAM,EAAE,gBAAgB,GAAG,WAAW,CA0EvD;AAED,iBAAS,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAY3D;AAED,iBAAS,yBAAyB,CAAC,KAAK,EAAE,KAAK,WAc9C;AAED,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,8BAA8B,EAC9B,8BAA8B,EAC9B,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,yBAAyB,EACzB,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,GACV,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,KAAK,EAAuB,MAAM,MAAM,CAAA;AAcpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAKhD,OAAO,EAQL,KAAK,WAAW,EAChB,KAAK,MAAM,EACZ,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAC/D,OAAO,EACL,iBAAiB,EAEjB,8BAA8B,EAC9B,yBAAyB,EACzB,8BAA8B,EAC9B,0BAA0B,EAC3B,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,EACV,MAAM,6BAA6B,CAAA;AAKpC,iBAAS,QAAQ,CAAC,MAAM,EAAE,gBAAgB,GAAG,WAAW,CAmEvD;AAED,iBAAS,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAY3D;AAED,iBAAS,yBAAyB,CAAC,KAAK,EAAE,KAAK,WAc9C;AAED,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,8BAA8B,EAC9B,8BAA8B,EAC9B,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,yBAAyB,EACzB,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,GACV,CAAA"}
@@ -4,7 +4,6 @@ import { INTENT_EXECUTOR_ADDRESS, INTENT_EXECUTOR_ADDRESS_DEV, } from './chain-a
4
4
  import { getModule, MODULE_TYPE_EXECUTOR, MODULE_TYPE_FALLBACK, MODULE_TYPE_HOOK, MODULE_TYPE_ID_EXECUTOR, MODULE_TYPE_ID_FALLBACK, MODULE_TYPE_VALIDATOR, } from './common.js';
5
5
  import { getExecutors, getOwners, getValidators } from './read.js';
6
6
  import { getOwnerValidator, getSmartSessionValidator, MULTI_FACTOR_VALIDATOR_ADDRESS, OWNABLE_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, } from './validators/index.js';
7
- import { getSocialRecoveryValidator } from './validators/core.js';
8
7
  import { getSessionDetails, signEnableSession, toSession, } from './validators/smart-sessions.js';
9
8
  const SMART_SESSION_COMPATIBILITY_FALLBACK_ADDRESS = '0x000000000052e9685932845660777DF43C2dC496';
10
9
  function getSetup(config) {
@@ -14,10 +13,6 @@ function getSetup(config) {
14
13
  if (smartSessionValidator) {
15
14
  validators.push(smartSessionValidator);
16
15
  }
17
- if (config.recovery) {
18
- const socialRecoveryValidator = getSocialRecoveryValidator(config.recovery.guardians, config.recovery.threshold);
19
- validators.push(socialRecoveryValidator);
20
- }
21
16
  const intentExecutor = getIntentExecutor(config);
22
17
  const executors = [intentExecutor];
23
18
  const fallbacks = [];
@@ -1,10 +1,11 @@
1
1
  import { type Address, type Chain } from 'viem';
2
2
  import type { AccountType, ProviderConfig } from '../types.js';
3
3
  declare function getValidators(accountType: AccountType, account: Address, chain: Chain, provider?: ProviderConfig): Promise<Address[]>;
4
- declare function getOwners(account: Address, chain: Chain, provider?: ProviderConfig): Promise<{
4
+ declare function getOwners(accountType: AccountType, account: Address, chain: Chain, provider?: ProviderConfig, hcaFactory?: Address): Promise<{
5
5
  accounts: Address[];
6
6
  threshold: number;
7
7
  } | null>;
8
8
  declare function getExecutors(accountType: AccountType, account: Address, chain: Chain, provider?: ProviderConfig): Promise<Address[]>;
9
- export { getValidators, getExecutors, getOwners };
9
+ declare function isValidatorInitialized(account: Address, chain: Chain, validatorAddress: Address, provider?: ProviderConfig): Promise<boolean>;
10
+ export { getValidators, getExecutors, getOwners, isValidatorInitialized };
10
11
  //# sourceMappingURL=read.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../modules/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAsB,MAAM,MAAM,CAAA;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG3D,iBAAe,aAAa,CAC1B,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,OAAO,EAAE,CAAC,CAiDpB;AAED,iBAAe,SAAS,CACtB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC;IACT,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB,GAAG,IAAI,CAAC,CAkER;AAED,iBAAe,YAAY,CACzB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,OAAO,EAAE,CAAC,CAiDpB;AAED,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,CAAA"}
1
+ {"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../modules/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAsB,MAAM,MAAM,CAAA;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG3D,iBAAe,aAAa,CAC1B,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,OAAO,EAAE,CAAC,CAkDpB;AAED,iBAAe,SAAS,CACtB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,EACzB,UAAU,CAAC,EAAE,OAAO,GACnB,OAAO,CAAC;IACT,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB,GAAG,IAAI,CAAC,CAuFR;AAED,iBAAe,YAAY,CACzB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,OAAO,EAAE,CAAC,CAkDpB;AAED,iBAAe,sBAAsB,CACnC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,OAAO,EACzB,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,OAAO,CAAC,CAwBlB;AAED,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { createPublicClient } from 'viem';
2
2
  import { createTransport } from '../accounts/utils.js';
3
- import { OWNABLE_VALIDATOR_ADDRESS } from './validators/core.js';
3
+ import { ENS_HCA_MODULE, OWNABLE_VALIDATOR_ADDRESS } from './validators/core.js';
4
4
  async function getValidators(accountType, account, chain, provider) {
5
5
  const publicClient = createPublicClient({
6
6
  chain,
@@ -9,6 +9,7 @@ async function getValidators(accountType, account, chain, provider) {
9
9
  switch (accountType) {
10
10
  case 'safe':
11
11
  case 'startale':
12
+ case 'hca':
12
13
  case 'nexus': {
13
14
  const validators = await publicClient.readContract({
14
15
  abi: [
@@ -51,12 +52,33 @@ async function getValidators(accountType, account, chain, provider) {
51
52
  }
52
53
  }
53
54
  }
54
- async function getOwners(account, chain, provider) {
55
+ async function getOwners(accountType, account, chain, provider, hcaFactory) {
55
56
  const publicClient = createPublicClient({
56
57
  chain,
57
58
  transport: createTransport(chain, provider),
58
59
  });
59
- const moduleAddress = OWNABLE_VALIDATOR_ADDRESS;
60
+ // HCA accounts hold owner state under the HCA module (the factory's init-data
61
+ // parser), which is OwnableValidator-based, so the getOwners/threshold reads
62
+ // are identical. A custom factory defines its own module, so resolve it from
63
+ // the factory; otherwise fall back to the canonical module.
64
+ let moduleAddress = OWNABLE_VALIDATOR_ADDRESS;
65
+ if (accountType === 'hca') {
66
+ moduleAddress = hcaFactory
67
+ ? await publicClient.readContract({
68
+ abi: [
69
+ {
70
+ name: 'initDataParser',
71
+ type: 'function',
72
+ stateMutability: 'view',
73
+ inputs: [],
74
+ outputs: [{ name: '', type: 'address' }],
75
+ },
76
+ ],
77
+ functionName: 'initDataParser',
78
+ address: hcaFactory,
79
+ })
80
+ : ENS_HCA_MODULE;
81
+ }
60
82
  const [ownerResult, thresholdResult] = await publicClient.multicall({
61
83
  contracts: [
62
84
  {
@@ -126,6 +148,7 @@ async function getExecutors(accountType, account, chain, provider) {
126
148
  switch (accountType) {
127
149
  case 'safe':
128
150
  case 'startale':
151
+ case 'hca':
129
152
  case 'nexus': {
130
153
  const executors = await publicClient.readContract({
131
154
  abi: [
@@ -168,4 +191,29 @@ async function getExecutors(accountType, account, chain, provider) {
168
191
  }
169
192
  }
170
193
  }
171
- export { getValidators, getExecutors, getOwners };
194
+ async function isValidatorInitialized(account, chain, validatorAddress, provider) {
195
+ const publicClient = createPublicClient({
196
+ chain,
197
+ transport: createTransport(chain, provider),
198
+ });
199
+ // `isInitialized` is a plain storage read on the validator singleton and
200
+ // returns `false` for an uninitialized (or undeployed) account without
201
+ // reverting. We deliberately let real read failures (provider/ABI errors)
202
+ // propagate rather than coercing them to `false`, which could otherwise
203
+ // produce an `onInstall` call for an already-initialized account.
204
+ return publicClient.readContract({
205
+ abi: [
206
+ {
207
+ name: 'isInitialized',
208
+ type: 'function',
209
+ stateMutability: 'view',
210
+ inputs: [{ name: 'smartAccount', type: 'address' }],
211
+ outputs: [{ name: '', type: 'bool' }],
212
+ },
213
+ ],
214
+ functionName: 'isInitialized',
215
+ address: validatorAddress,
216
+ args: [account],
217
+ });
218
+ }
219
+ export { getValidators, getExecutors, getOwners, isValidatorInitialized };
@@ -1,4 +1,4 @@
1
- import { type Account, type Address, type Hex } from 'viem';
1
+ import { type Address, type Hex } from 'viem';
2
2
  import type { ENSValidatorConfig, OwnableValidatorConfig, OwnerSet, RhinestoneAccountConfig, WebauthnValidatorConfig } from '../../types.js';
3
3
  import { type Module } from '../common.js';
4
4
  declare const SMART_SESSION_EMISSARY_ADDRESS_DEV: Address;
@@ -13,19 +13,19 @@ interface WebauthnCredential {
13
13
  authenticatorId: string;
14
14
  }
15
15
  declare const OWNABLE_VALIDATOR_ADDRESS: Address;
16
- declare const ENS_VALIDATOR_ADDRESS: Address;
16
+ declare const ENS_HCA_MODULE: Address;
17
17
  declare const WEBAUTHN_VALIDATOR_ADDRESS: Address;
18
18
  declare const MULTI_FACTOR_VALIDATOR_ADDRESS: Address;
19
19
  declare const WEBAUTHN_V0_VALIDATOR_ADDRESS: Address;
20
+ declare function ownerSetUsesEns(owners: OwnerSet): boolean;
20
21
  declare function getOwnerValidator(config: RhinestoneAccountConfig): Module;
21
22
  declare function getMockSignature(ownerSet: OwnerSet): Hex;
22
23
  declare function getValidator(owners: OwnerSet): Module;
23
24
  declare function getOwnableValidator(threshold: number, owners: Address[], address?: Address): Module;
24
- declare function getENSValidator(threshold: number, owners: Address[], ownerExpirations: number[], address?: Address): Module;
25
+ declare function getENSValidator(threshold: number, owners: Address[], expirations: (Date | undefined)[]): Module;
25
26
  declare function getWebAuthnValidator(threshold: number, webAuthnCredentials: WebauthnCredential[], address?: Address): Module;
26
- declare function getMultiFactorValidator(threshold: number, validators: (OwnableValidatorConfig | ENSValidatorConfig | WebauthnValidatorConfig | null)[]): Module;
27
- declare function getSocialRecoveryValidator(guardians: Account[], threshold?: number): Module;
27
+ declare function getMultiFactorValidator(threshold: number, validators: (OwnableValidatorConfig | ENSValidatorConfig | WebauthnValidatorConfig | null)[], address?: Address): Module;
28
28
  declare function supportsEip712(validator: Module): boolean;
29
- export { OWNABLE_VALIDATOR_ADDRESS, ENS_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, WEBAUTHN_V0_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS_DEV, getOwnerValidator, getOwnableValidator, getENSValidator, getWebAuthnValidator, getMultiFactorValidator, getSocialRecoveryValidator, getValidator, getMockSignature, supportsEip712, };
29
+ export { OWNABLE_VALIDATOR_ADDRESS, ENS_HCA_MODULE, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, WEBAUTHN_V0_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS_DEV, getOwnerValidator, getOwnableValidator, getENSValidator, getWebAuthnValidator, getMultiFactorValidator, getValidator, getMockSignature, supportsEip712, ownerSetUsesEns, };
30
30
  export type { WebauthnCredential };
31
31
  //# sourceMappingURL=core.d.ts.map
@@ -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,EAKT,MAAM,MAAM,CAAA;AAGb,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,QAAQ,EACR,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAA4B,KAAK,MAAM,EAAE,MAAM,WAAW,CAAA;AAEjE,QAAA,MAAM,kCAAkC,EAAE,OACI,CAAA;AAC9C,QAAA,MAAM,8BAA8B,EAAE,OACQ,CAAA;AAE9C,UAAU,SAAS;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,CAAC,EAAE,MAAM,CAAA;IACT,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