@openzeppelin/miden-multisig-client 0.16.1 → 0.17.0-rc.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 (207) hide show
  1. package/README.md +192 -11
  2. package/dist/account/builder.d.ts.map +1 -1
  3. package/dist/account/builder.js +32 -25
  4. package/dist/account/builder.js.map +1 -1
  5. package/dist/account/builder.test.js +73 -21
  6. package/dist/account/builder.test.js.map +1 -1
  7. package/dist/account/layout.d.ts +31 -0
  8. package/dist/account/layout.d.ts.map +1 -0
  9. package/dist/account/layout.js +31 -0
  10. package/dist/account/layout.js.map +1 -0
  11. package/dist/account/masm/account-components/auth.d.ts +1 -4
  12. package/dist/account/masm/account-components/auth.d.ts.map +1 -1
  13. package/dist/account/masm/account-components/auth.js +36 -53
  14. package/dist/account/masm/account-components/auth.js.map +1 -1
  15. package/dist/account/masm/index.d.ts +0 -1
  16. package/dist/account/masm/index.d.ts.map +1 -1
  17. package/dist/account/masm/index.js +0 -1
  18. package/dist/account/masm/index.js.map +1 -1
  19. package/dist/account/storage.d.ts +4 -0
  20. package/dist/account/storage.d.ts.map +1 -1
  21. package/dist/account/storage.js +9 -20
  22. package/dist/account/storage.js.map +1 -1
  23. package/dist/client.d.ts +4 -0
  24. package/dist/client.d.ts.map +1 -1
  25. package/dist/client.js +10 -5
  26. package/dist/client.js.map +1 -1
  27. package/dist/client.test.js +74 -16
  28. package/dist/client.test.js.map +1 -1
  29. package/dist/index.d.ts +5 -3
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +3 -3
  32. package/dist/index.js.map +1 -1
  33. package/dist/inspector.d.ts +59 -1
  34. package/dist/inspector.d.ts.map +1 -1
  35. package/dist/inspector.js +157 -29
  36. package/dist/inspector.js.map +1 -1
  37. package/dist/inspector.test.js +246 -37
  38. package/dist/inspector.test.js.map +1 -1
  39. package/dist/multisig.d.ts +109 -33
  40. package/dist/multisig.d.ts.map +1 -1
  41. package/dist/multisig.js +307 -104
  42. package/dist/multisig.js.map +1 -1
  43. package/dist/multisig.test.js +582 -58
  44. package/dist/multisig.test.js.map +1 -1
  45. package/dist/procedures.d.ts +6 -7
  46. package/dist/procedures.d.ts.map +1 -1
  47. package/dist/procedures.js +6 -7
  48. package/dist/procedures.js.map +1 -1
  49. package/dist/proposal/metadata.d.ts.map +1 -1
  50. package/dist/proposal/metadata.js +13 -2
  51. package/dist/proposal/metadata.js.map +1 -1
  52. package/dist/proposal/metadata.test.js +57 -0
  53. package/dist/proposal/metadata.test.js.map +1 -1
  54. package/dist/prover/errors.d.ts +5 -0
  55. package/dist/prover/errors.d.ts.map +1 -1
  56. package/dist/prover/errors.js +7 -155
  57. package/dist/prover/errors.js.map +1 -1
  58. package/dist/prover/errors.test.js +5 -0
  59. package/dist/prover/errors.test.js.map +1 -1
  60. package/dist/prover/retry.d.ts +1 -6
  61. package/dist/prover/retry.d.ts.map +1 -1
  62. package/dist/prover/retry.js +5 -28
  63. package/dist/prover/retry.js.map +1 -1
  64. package/dist/prover/retry.test.js +1 -1
  65. package/dist/prover/retry.test.js.map +1 -1
  66. package/dist/prover/workflow.d.ts +4 -3
  67. package/dist/prover/workflow.d.ts.map +1 -1
  68. package/dist/prover/workflow.js +5 -2
  69. package/dist/prover/workflow.js.map +1 -1
  70. package/dist/prover/workflow.test.js +28 -3
  71. package/dist/prover/workflow.test.js.map +1 -1
  72. package/dist/retry/classify.d.ts +16 -0
  73. package/dist/retry/classify.d.ts.map +1 -0
  74. package/dist/retry/classify.js +187 -0
  75. package/dist/retry/classify.js.map +1 -0
  76. package/dist/retry/runtime.d.ts +13 -0
  77. package/dist/retry/runtime.d.ts.map +1 -0
  78. package/dist/retry/runtime.js +33 -0
  79. package/dist/retry/runtime.js.map +1 -0
  80. package/dist/rpc/config.d.ts +11 -0
  81. package/dist/rpc/config.d.ts.map +1 -0
  82. package/dist/rpc/config.js +17 -0
  83. package/dist/rpc/config.js.map +1 -0
  84. package/dist/rpc/config.test.d.ts +2 -0
  85. package/dist/rpc/config.test.d.ts.map +1 -0
  86. package/dist/rpc/config.test.js +24 -0
  87. package/dist/rpc/config.test.js.map +1 -0
  88. package/dist/rpc/errors.d.ts +2 -0
  89. package/dist/rpc/errors.d.ts.map +1 -0
  90. package/dist/rpc/errors.js +11 -0
  91. package/dist/rpc/errors.js.map +1 -0
  92. package/dist/rpc/errors.test.d.ts +2 -0
  93. package/dist/rpc/errors.test.d.ts.map +1 -0
  94. package/dist/rpc/errors.test.js +34 -0
  95. package/dist/rpc/errors.test.js.map +1 -0
  96. package/dist/rpc/retry.d.ts +4 -0
  97. package/dist/rpc/retry.d.ts.map +1 -0
  98. package/dist/rpc/retry.js +6 -0
  99. package/dist/rpc/retry.js.map +1 -0
  100. package/dist/rpc/retry.test.d.ts +2 -0
  101. package/dist/rpc/retry.test.d.ts.map +1 -0
  102. package/dist/rpc/retry.test.js +98 -0
  103. package/dist/rpc/retry.test.js.map +1 -0
  104. package/dist/transaction/index.d.ts +1 -1
  105. package/dist/transaction/index.d.ts.map +1 -1
  106. package/dist/transaction/index.js +1 -1
  107. package/dist/transaction/index.js.map +1 -1
  108. package/dist/transaction/p2id.d.ts +17 -6
  109. package/dist/transaction/p2id.d.ts.map +1 -1
  110. package/dist/transaction/p2id.js +22 -31
  111. package/dist/transaction/p2id.js.map +1 -1
  112. package/dist/transaction/p2id.test.js +62 -24
  113. package/dist/transaction/p2id.test.js.map +1 -1
  114. package/dist/transaction/summary.d.ts +45 -2
  115. package/dist/transaction/summary.d.ts.map +1 -1
  116. package/dist/transaction/summary.js +42 -2
  117. package/dist/transaction/summary.js.map +1 -1
  118. package/dist/transaction/summary.test.d.ts +2 -0
  119. package/dist/transaction/summary.test.d.ts.map +1 -0
  120. package/dist/transaction/summary.test.js +26 -0
  121. package/dist/transaction/summary.test.js.map +1 -0
  122. package/dist/transaction/updateGuardian.d.ts.map +1 -1
  123. package/dist/transaction/updateGuardian.js +16 -18
  124. package/dist/transaction/updateGuardian.js.map +1 -1
  125. package/dist/transaction/updateProcedureThreshold.d.ts.map +1 -1
  126. package/dist/transaction/updateProcedureThreshold.js +15 -17
  127. package/dist/transaction/updateProcedureThreshold.js.map +1 -1
  128. package/dist/transaction/updateSigners.d.ts +6 -1
  129. package/dist/transaction/updateSigners.d.ts.map +1 -1
  130. package/dist/transaction/updateSigners.js +20 -17
  131. package/dist/transaction/updateSigners.js.map +1 -1
  132. package/dist/transaction.d.ts +2 -2
  133. package/dist/transaction.d.ts.map +1 -1
  134. package/dist/transaction.js +1 -1
  135. package/dist/transaction.js.map +1 -1
  136. package/dist/types/proposal.d.ts +28 -4
  137. package/dist/types/proposal.d.ts.map +1 -1
  138. package/dist/types/proposal.js +18 -0
  139. package/dist/types/proposal.js.map +1 -1
  140. package/dist/types.d.ts +0 -1
  141. package/dist/types.d.ts.map +1 -1
  142. package/dist/utils/signature.d.ts +11 -7
  143. package/dist/utils/signature.d.ts.map +1 -1
  144. package/dist/utils/signature.js +24 -58
  145. package/dist/utils/signature.js.map +1 -1
  146. package/dist/utils/word.d.ts +7 -0
  147. package/dist/utils/word.d.ts.map +1 -1
  148. package/dist/utils/word.js +15 -0
  149. package/dist/utils/word.js.map +1 -1
  150. package/masm/account_components/auth/guarded_multisig.masm +42 -0
  151. package/package.json +7 -4
  152. package/src/account/builder.test.ts +111 -45
  153. package/src/account/builder.ts +45 -33
  154. package/src/account/layout.ts +33 -0
  155. package/src/account/masm/account-components/auth.ts +36 -56
  156. package/src/account/masm/index.ts +0 -1
  157. package/src/account/storage.ts +9 -22
  158. package/src/client.test.ts +87 -16
  159. package/src/client.ts +16 -3
  160. package/src/index.ts +27 -1
  161. package/src/inspector.test.ts +330 -38
  162. package/src/inspector.ts +196 -33
  163. package/src/multisig.test.ts +680 -63
  164. package/src/multisig.ts +400 -115
  165. package/src/procedures.ts +6 -7
  166. package/src/proposal/metadata.test.ts +76 -0
  167. package/src/proposal/metadata.ts +13 -2
  168. package/src/prover/errors.test.ts +8 -0
  169. package/src/prover/errors.ts +7 -175
  170. package/src/prover/retry.test.ts +1 -1
  171. package/src/prover/retry.ts +10 -35
  172. package/src/prover/workflow.test.ts +40 -4
  173. package/src/prover/workflow.ts +16 -4
  174. package/src/retry/classify.ts +220 -0
  175. package/src/retry/runtime.ts +45 -0
  176. package/src/rpc/config.test.ts +45 -0
  177. package/src/rpc/config.ts +30 -0
  178. package/src/rpc/errors.test.ts +69 -0
  179. package/src/rpc/errors.ts +12 -0
  180. package/src/rpc/retry.test.ts +144 -0
  181. package/src/rpc/retry.ts +12 -0
  182. package/src/transaction/index.ts +7 -1
  183. package/src/transaction/p2id.test.ts +112 -31
  184. package/src/transaction/p2id.ts +39 -38
  185. package/src/transaction/summary.test.ts +32 -0
  186. package/src/transaction/summary.ts +83 -4
  187. package/src/transaction/updateGuardian.ts +15 -25
  188. package/src/transaction/updateProcedureThreshold.ts +13 -29
  189. package/src/transaction/updateSigners.ts +38 -30
  190. package/src/transaction.ts +8 -1
  191. package/src/types/proposal.ts +43 -4
  192. package/src/types.ts +0 -1
  193. package/src/utils/signature.ts +32 -65
  194. package/src/utils/word.ts +17 -0
  195. package/dist/account/masm/auth.d.ts +0 -5
  196. package/dist/account/masm/auth.d.ts.map +0 -1
  197. package/dist/account/masm/auth.js +0 -1509
  198. package/dist/account/masm/auth.js.map +0 -1
  199. package/masm/account_components/auth/multisig.masm +0 -12
  200. package/masm/account_components/auth/multisig_ecdsa.masm +0 -12
  201. package/masm/account_components/auth/multisig_guardian.masm +0 -16
  202. package/masm/account_components/auth/multisig_guardian_ecdsa.masm +0 -16
  203. package/masm/auth/guardian.masm +0 -199
  204. package/masm/auth/guardian_ecdsa.masm +0 -195
  205. package/masm/auth/multisig.masm +0 -554
  206. package/masm/auth/multisig_ecdsa.masm +0 -554
  207. package/src/account/masm/auth.ts +0 -1512
@@ -2,21 +2,7 @@ import type { MultisigConfig } from '../types.js';
2
2
  import { StorageSlot, StorageMap, Word } from '@miden-sdk/miden-sdk';
3
3
  import { ensureHexPrefix } from '../utils/encoding.js';
4
4
  import { getProcedureRoot } from '../procedures.js';
5
-
6
- // Storage slot names matching the MASM definitions
7
- const MULTISIG_SLOT_NAMES = {
8
- THRESHOLD_CONFIG: 'openzeppelin::multisig::threshold_config',
9
- SIGNER_PUBLIC_KEYS: 'openzeppelin::multisig::signer_public_keys',
10
- SIGNER_SCHEME_IDS: 'openzeppelin::multisig::signer_scheme_ids',
11
- EXECUTED_TRANSACTIONS: 'openzeppelin::multisig::executed_transactions',
12
- PROCEDURE_THRESHOLDS: 'openzeppelin::multisig::procedure_thresholds',
13
- } as const;
14
-
15
- const GUARDIAN_SLOT_NAMES = {
16
- SELECTOR: 'openzeppelin::guardian::selector',
17
- PUBLIC_KEY: 'openzeppelin::guardian::public_key',
18
- SCHEME_ID: 'openzeppelin::guardian::scheme_id',
19
- } as const;
5
+ import { MULTISIG_SLOT_NAMES, GUARDIAN_SLOT_NAMES } from './layout.js';
20
6
 
21
7
  function signerMapKey(index: bigint): Word {
22
8
  return new Word(new BigUint64Array([index, 0n, 0n, 0n]));
@@ -70,24 +56,25 @@ export class StorageLayoutBuilder {
70
56
  return [slot0, slot1, slot2, slot3, slot4];
71
57
  }
72
58
 
59
+ /**
60
+ * The guarded-multisig has no enable/disable selector; the guardian is always present, so this
61
+ * returns just two slots: the guardian public-key map and its scheme map.
62
+ */
73
63
  buildGuardianSlots(config: MultisigConfig): StorageSlot[] {
74
- const selector = config.guardianEnabled !== false ? 1n : 0n;
75
64
  const schemeId = config.signatureScheme === 'ecdsa' ? 1n : 2n;
76
- const selectorWord = new Word(new BigUint64Array([selector, 0n, 0n, 0n]));
77
- const slot0 = StorageSlot.fromValue(GUARDIAN_SLOT_NAMES.SELECTOR, selectorWord);
65
+ const zeroKey = signerMapKey(0n);
78
66
 
79
67
  const guardianKeyMap = new StorageMap();
80
- const zeroKey = signerMapKey(0n);
81
68
  const guardianKey = Word.fromHex(ensureHexPrefix(config.guardianCommitment));
82
69
  guardianKeyMap.insert(zeroKey, guardianKey);
83
- const slot1 = StorageSlot.map(GUARDIAN_SLOT_NAMES.PUBLIC_KEY, guardianKeyMap);
70
+ const slot0 = StorageSlot.map(GUARDIAN_SLOT_NAMES.PUBLIC_KEY, guardianKeyMap);
84
71
 
85
72
  const guardianSchemeMap = new StorageMap();
86
73
  const guardianScheme = new Word(new BigUint64Array([schemeId, 0n, 0n, 0n]));
87
74
  guardianSchemeMap.insert(zeroKey, guardianScheme);
88
- const slot2 = StorageSlot.map(GUARDIAN_SLOT_NAMES.SCHEME_ID, guardianSchemeMap);
75
+ const slot1 = StorageSlot.map(GUARDIAN_SLOT_NAMES.SCHEME_ID, guardianSchemeMap);
89
76
 
90
- return [slot0, slot1, slot2];
77
+ return [slot0, slot1];
91
78
  }
92
79
  }
93
80
 
@@ -19,22 +19,27 @@ vi.mock('@miden-sdk/miden-sdk', () => ({
19
19
  vault: vi.fn(),
20
20
  })),
21
21
  },
22
+ Word: vi.fn(),
22
23
  }));
23
24
 
24
- // Mock the AccountInspector
25
- vi.mock('./inspector.js', () => ({
26
- AccountInspector: {
27
- fromAccount: vi.fn(() => ({
28
- threshold: 2,
29
- numSigners: 2,
30
- signerCommitments: ['0x' + 'a'.repeat(64), '0x' + 'b'.repeat(64)],
31
- guardianEnabled: true,
32
- guardianCommitment: '0x' + 'c'.repeat(64),
33
- vaultBalances: [],
34
- procedureThresholds: new Map(),
35
- })),
36
- },
37
- }));
25
+ // Mock the AccountInspector, keeping the real assertCompleteDetectedConfig
26
+ // so load()'s fail-closed validation is exercised.
27
+ vi.mock('./inspector.js', async (importOriginal) => {
28
+ const actual = await importOriginal<typeof import('./inspector.js')>();
29
+ return {
30
+ ...actual,
31
+ AccountInspector: {
32
+ fromAccount: vi.fn(() => ({
33
+ threshold: 2,
34
+ numSigners: 2,
35
+ signerCommitments: ['0x' + 'a'.repeat(64), '0x' + 'b'.repeat(64)],
36
+ guardianCommitment: '0x' + 'c'.repeat(64),
37
+ vaultBalances: [],
38
+ procedureThresholds: new Map(),
39
+ })),
40
+ },
41
+ };
42
+ });
38
43
 
39
44
  // Mock the account creation module
40
45
  vi.mock('./account/index.js', () => ({
@@ -232,6 +237,66 @@ describe('MultisigClient', () => {
232
237
  expect(webClient.accounts.insert).toHaveBeenCalledTimes(1);
233
238
  });
234
239
 
240
+ it('fails closed when the detected signer set is incomplete (issue #306 review)', async () => {
241
+ const client = new MultisigClient(webClient, CLIENT_CONFIG);
242
+
243
+ const { AccountInspector } = await import('./inspector.js');
244
+ // Storage reports 3 signers but only 2 entries were readable — adopting
245
+ // this config would let membership proposals drop the missing key.
246
+ vi.mocked(AccountInspector.fromAccount).mockReturnValueOnce({
247
+ threshold: 2,
248
+ numSigners: 3,
249
+ signerCommitments: ['0x' + 'a'.repeat(64), '0x' + 'b'.repeat(64)],
250
+ guardianCommitment: '0x' + 'c'.repeat(64),
251
+ vaultBalances: [],
252
+ procedureThresholds: new Map(),
253
+ });
254
+
255
+ mockFetch.mockResolvedValueOnce({
256
+ ok: true,
257
+ json: async () => ({
258
+ account_id: '0x' + 'd'.repeat(30),
259
+ commitment: '0x' + 'e'.repeat(64),
260
+ state_json: { data: 'base64state' },
261
+ created_at: '2024-01-01T00:00:00Z',
262
+ updated_at: '2024-01-02T00:00:00Z',
263
+ }),
264
+ });
265
+
266
+ await expect(client.load('0x' + 'd'.repeat(30), mockSigner)).rejects.toThrow(
267
+ /incomplete signer set: storage reports 3 signers, read 2/,
268
+ );
269
+ });
270
+
271
+ it('fails closed when the guardian commitment is missing', async () => {
272
+ const client = new MultisigClient(webClient, CLIENT_CONFIG);
273
+
274
+ const { AccountInspector } = await import('./inspector.js');
275
+ vi.mocked(AccountInspector.fromAccount).mockReturnValueOnce({
276
+ threshold: 1,
277
+ numSigners: 1,
278
+ signerCommitments: ['0x' + 'a'.repeat(64)],
279
+ guardianCommitment: null,
280
+ vaultBalances: [],
281
+ procedureThresholds: new Map(),
282
+ });
283
+
284
+ mockFetch.mockResolvedValueOnce({
285
+ ok: true,
286
+ json: async () => ({
287
+ account_id: '0x' + 'd'.repeat(30),
288
+ commitment: '0x' + 'e'.repeat(64),
289
+ state_json: { data: 'base64state' },
290
+ created_at: '2024-01-01T00:00:00Z',
291
+ updated_at: '2024-01-02T00:00:00Z',
292
+ }),
293
+ });
294
+
295
+ await expect(client.load('0x' + 'd'.repeat(30), mockSigner)).rejects.toThrow(
296
+ /missing guardian commitment/,
297
+ );
298
+ });
299
+
235
300
  it('should throw if account not found on GUARDIAN', async () => {
236
301
  const client = new MultisigClient(webClient, CLIENT_CONFIG);
237
302
 
@@ -239,12 +304,18 @@ describe('MultisigClient', () => {
239
304
  ok: false,
240
305
  status: 404,
241
306
  statusText: 'Not Found',
242
- text: async () => 'Account not found',
307
+ headers: new Headers(),
308
+ text: async () =>
309
+ JSON.stringify({
310
+ code: 'account_not_found',
311
+ message: 'Account not found',
312
+ meta: { retryable: false },
313
+ }),
243
314
  });
244
315
 
245
316
  await expect(
246
317
  client.load('0xnonexistent', mockSigner)
247
- ).rejects.toThrow();
318
+ ).rejects.toThrow('Account not found');
248
319
  });
249
320
 
250
321
  it('should allow registerOnGuardian after load without explicit initial state', async () => {
package/src/client.ts CHANGED
@@ -10,7 +10,7 @@ import { GuardianHttpClient } from '@openzeppelin/guardian-client';
10
10
  import type { StateObject } from '@openzeppelin/guardian-client';
11
11
  import { Multisig } from './multisig.js';
12
12
  import { createMultisigAccount } from './account/index.js';
13
- import { AccountInspector } from './inspector.js';
13
+ import { AccountInspector, assertCompleteDetectedConfig } from './inspector.js';
14
14
  import { getRawMidenClient, requireConfigValue, requireMidenRpcEndpoint } from './raw-client.js';
15
15
  import type { MultisigConfig, Signer } from './types.js';
16
16
  import {
@@ -18,6 +18,11 @@ import {
18
18
  type ProverConfig,
19
19
  type ResolvedProverConfig,
20
20
  } from './prover/config.js';
21
+ import {
22
+ resolveRpcConfig,
23
+ type RpcConfig,
24
+ type ResolvedRpcConfig,
25
+ } from './rpc/config.js';
21
26
 
22
27
  interface AccountKeyBindingSigner {
23
28
  bindAccountKey?(midenClient: MidenClient, accountId: string): Promise<void>;
@@ -48,6 +53,8 @@ export interface MultisigClientConfig {
48
53
  midenRpcEndpoint: string;
49
54
  /** Multisig-owned remote prover override and proof retry policy. */
50
55
  prover?: ProverConfig;
56
+ /** Retry policy for idempotent Miden node reads; submission is never retried. */
57
+ rpc?: RpcConfig;
51
58
  }
52
59
 
53
60
  /**
@@ -95,12 +102,14 @@ export class MultisigClient {
95
102
  private readonly midenClient: MidenClient;
96
103
  private readonly midenRpcEndpoint: string;
97
104
  private readonly proverConfig: ResolvedProverConfig;
105
+ private readonly rpcConfig: ResolvedRpcConfig;
98
106
  private _guardianClient: GuardianHttpClient;
99
107
 
100
108
  constructor(midenClient: MidenClient, config: MultisigClientConfig) {
101
109
  this.midenClient = midenClient;
102
110
  this.midenRpcEndpoint = requireMidenRpcEndpoint(config?.midenRpcEndpoint);
103
111
  this.proverConfig = resolveProverConfig(config?.prover, midenClient.defaultProver);
112
+ this.rpcConfig = resolveRpcConfig(config?.rpc);
104
113
  this._guardianClient = new GuardianHttpClient(
105
114
  requireConfigValue('guardianEndpoint', config?.guardianEndpoint),
106
115
  );
@@ -176,6 +185,7 @@ export class MultisigClient {
176
185
  undefined,
177
186
  this.midenRpcEndpoint,
178
187
  this.proverConfig,
188
+ this.rpcConfig,
179
189
  );
180
190
  }
181
191
 
@@ -204,11 +214,13 @@ export class MultisigClient {
204
214
  const account = Account.deserialize(accountBytes);
205
215
 
206
216
  const detected = AccountInspector.fromAccount(account);
217
+ // Fail closed on a partial read: the detected signer set becomes the
218
+ // authoritative config that membership proposals rewrite on-chain.
219
+ assertCompleteDetectedConfig(detected);
207
220
  const config: MultisigConfig = {
208
221
  threshold: detected.threshold,
209
222
  signerCommitments: detected.signerCommitments,
210
- guardianCommitment: detected.guardianCommitment ?? '',
211
- guardianEnabled: detected.guardianEnabled,
223
+ guardianCommitment: detected.guardianCommitment,
212
224
  procedureThresholds: Array.from(detected.procedureThresholds.entries()).map(
213
225
  ([procedure, threshold]) => ({ procedure, threshold })
214
226
  ),
@@ -229,6 +241,7 @@ export class MultisigClient {
229
241
  accountId,
230
242
  this.midenRpcEndpoint,
231
243
  this.proverConfig,
244
+ this.rpcConfig,
232
245
  );
233
246
  }
234
247
  }
package/src/index.ts CHANGED
@@ -50,11 +50,22 @@ export {
50
50
  type RecoveredAccount,
51
51
  } from './client.js';
52
52
  export type { ProverConfig, ProverRetryPolicy } from './prover/config.js';
53
+ export type { RpcConfig, RpcRetryPolicy } from './rpc/config.js';
53
54
  export { lookupAuthDigest } from './lookupAuth.js';
54
- export { Multisig, type AccountState } from './multisig.js';
55
+ export {
56
+ Multisig,
57
+ type AccountState,
58
+ type CreateProposalOptions,
59
+ type CreateSignerProposalOptions,
60
+ type CreateP2idProposalOptions,
61
+ } from './multisig.js';
55
62
  export { AccountInspector, type DetectedMultisigConfig, type VaultBalance } from './inspector.js';
56
63
  export {
64
+ chainAnchorFromBase64,
65
+ chainAnchorToBase64,
57
66
  executeForSummary,
67
+ executeForSummaryAt,
68
+ summarySalt,
58
69
  buildUpdateSignersTransactionRequest,
59
70
  buildUpdateProcedureThresholdTransactionRequest,
60
71
  buildUpdateGuardianTransactionRequest,
@@ -63,6 +74,7 @@ export {
63
74
  parseP2idNoteType,
64
75
  p2idNoteTypeToMetadata,
65
76
  type P2idTransactionOptions,
77
+ type P2ideHeightOptions,
66
78
  } from './transaction.js';
67
79
 
68
80
  export { GuardianHttpClient, GuardianHttpError } from '@openzeppelin/guardian-client';
@@ -75,6 +87,18 @@ export {
75
87
  normalizeGuardianErrorCode,
76
88
  } from '@openzeppelin/guardian-client';
77
89
  export type { GuardianErrorCode } from '@openzeppelin/guardian-client';
90
+ export type {
91
+ HistoryDecodeSection,
92
+ HistoryDecodeWarning,
93
+ HistoryEntry,
94
+ HistoryEntryStatus,
95
+ HistoryNote,
96
+ HistoryNoteAsset,
97
+ HistoryNoteTag,
98
+ HistoryNoteVisibility,
99
+ HistoryOptions,
100
+ HistoryPage,
101
+ } from '@openzeppelin/guardian-client';
78
102
 
79
103
  // Codeless transport-failure classification (feature 009, User Story 3).
80
104
  export { isLikelyNetworkError, toUserFacingError } from './connectivity.js';
@@ -108,6 +132,8 @@ export {
108
132
  isConsumeNotesV2,
109
133
  isP2idNoteVisibility,
110
134
  type P2idNoteVisibility,
135
+ MAX_P2IDE_BLOCK_HEIGHT,
136
+ parseP2ideHeight,
111
137
  } from './types/proposal.js';
112
138
 
113
139
  export {