@openzeppelin/miden-multisig-client 0.12.7 → 0.13.0

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 (201) hide show
  1. package/README.md +42 -4
  2. package/dist/account/builder.d.ts +1 -1
  3. package/dist/account/builder.d.ts.map +1 -1
  4. package/dist/account/builder.js +7 -5
  5. package/dist/account/builder.js.map +1 -1
  6. package/dist/account/masm.d.ts +3 -3
  7. package/dist/account/masm.d.ts.map +1 -1
  8. package/dist/account/masm.js +101 -98
  9. package/dist/account/masm.js.map +1 -1
  10. package/dist/account/storage.d.ts +1 -1
  11. package/dist/account/storage.d.ts.map +1 -1
  12. package/dist/account/storage.js +17 -7
  13. package/dist/account/storage.js.map +1 -1
  14. package/dist/client.d.ts +1 -1
  15. package/dist/client.d.ts.map +1 -1
  16. package/dist/client.js +2 -2
  17. package/dist/client.js.map +1 -1
  18. package/dist/client.test.js +4 -4
  19. package/dist/client.test.js.map +1 -1
  20. package/dist/index.d.ts +8 -1
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +6 -1
  23. package/dist/index.js.map +1 -1
  24. package/dist/inspector.d.ts +1 -1
  25. package/dist/inspector.d.ts.map +1 -1
  26. package/dist/inspector.js +16 -10
  27. package/dist/inspector.js.map +1 -1
  28. package/dist/inspector.test.js +33 -22
  29. package/dist/inspector.test.js.map +1 -1
  30. package/dist/multisig/helpers.d.ts +1 -1
  31. package/dist/multisig/helpers.d.ts.map +1 -1
  32. package/dist/multisig/helpers.js +1 -1
  33. package/dist/multisig/helpers.js.map +1 -1
  34. package/dist/multisig/helpers.test.js +2 -2
  35. package/dist/multisig/helpers.test.js.map +1 -1
  36. package/dist/multisig/proposal/execution.d.ts +18 -0
  37. package/dist/multisig/proposal/execution.d.ts.map +1 -0
  38. package/dist/multisig/proposal/execution.js +147 -0
  39. package/dist/multisig/proposal/execution.js.map +1 -0
  40. package/dist/multisig/proposal/parser.d.ts +17 -0
  41. package/dist/multisig/proposal/parser.d.ts.map +1 -0
  42. package/dist/multisig/proposal/parser.js +147 -0
  43. package/dist/multisig/proposal/parser.js.map +1 -0
  44. package/dist/multisig/signing.d.ts +5 -0
  45. package/dist/multisig/signing.d.ts.map +1 -0
  46. package/dist/multisig/signing.js +14 -0
  47. package/dist/multisig/signing.js.map +1 -0
  48. package/dist/multisig.d.ts +9 -13
  49. package/dist/multisig.d.ts.map +1 -1
  50. package/dist/multisig.js +109 -337
  51. package/dist/multisig.js.map +1 -1
  52. package/dist/multisig.test.js +8 -4
  53. package/dist/multisig.test.js.map +1 -1
  54. package/dist/signer.d.ts +2 -20
  55. package/dist/signer.d.ts.map +1 -1
  56. package/dist/signer.js +2 -82
  57. package/dist/signer.js.map +1 -1
  58. package/dist/signer.test.js +24 -24
  59. package/dist/signer.test.js.map +1 -1
  60. package/dist/signers/ecdsa.d.ts +12 -0
  61. package/dist/signers/ecdsa.d.ts.map +1 -0
  62. package/dist/signers/ecdsa.js +30 -0
  63. package/dist/signers/ecdsa.js.map +1 -0
  64. package/dist/signers/falcon.d.ts +12 -0
  65. package/dist/signers/falcon.d.ts.map +1 -0
  66. package/dist/signers/falcon.js +31 -0
  67. package/dist/signers/falcon.js.map +1 -0
  68. package/dist/signers/falcon.test.d.ts +2 -0
  69. package/dist/signers/falcon.test.d.ts.map +1 -0
  70. package/dist/signers/falcon.test.js +113 -0
  71. package/dist/signers/falcon.test.js.map +1 -0
  72. package/dist/signers/index.d.ts +5 -0
  73. package/dist/signers/index.d.ts.map +1 -0
  74. package/dist/signers/index.js +5 -0
  75. package/dist/signers/index.js.map +1 -0
  76. package/dist/signers/miden-wallet.d.ts +16 -0
  77. package/dist/signers/miden-wallet.d.ts.map +1 -0
  78. package/dist/signers/miden-wallet.js +35 -0
  79. package/dist/signers/miden-wallet.js.map +1 -0
  80. package/dist/signers/miden-wallet.test.d.ts +2 -0
  81. package/dist/signers/miden-wallet.test.d.ts.map +1 -0
  82. package/dist/signers/miden-wallet.test.js +107 -0
  83. package/dist/signers/miden-wallet.test.js.map +1 -0
  84. package/dist/signers/para.d.ts +21 -0
  85. package/dist/signers/para.d.ts.map +1 -0
  86. package/dist/signers/para.js +43 -0
  87. package/dist/signers/para.js.map +1 -0
  88. package/dist/signers/para.test.d.ts +2 -0
  89. package/dist/signers/para.test.d.ts.map +1 -0
  90. package/dist/signers/para.test.js +88 -0
  91. package/dist/signers/para.test.js.map +1 -0
  92. package/dist/transaction/consumeNotes.d.ts +3 -3
  93. package/dist/transaction/consumeNotes.d.ts.map +1 -1
  94. package/dist/transaction/consumeNotes.js +11 -7
  95. package/dist/transaction/consumeNotes.js.map +1 -1
  96. package/dist/transaction/options.d.ts +2 -2
  97. package/dist/transaction/options.d.ts.map +1 -1
  98. package/dist/transaction/p2id.d.ts +1 -1
  99. package/dist/transaction/p2id.d.ts.map +1 -1
  100. package/dist/transaction/p2id.js +5 -5
  101. package/dist/transaction/p2id.js.map +1 -1
  102. package/dist/transaction/summary.d.ts +1 -1
  103. package/dist/transaction/summary.d.ts.map +1 -1
  104. package/dist/transaction/summary.js +1 -1
  105. package/dist/transaction/summary.js.map +1 -1
  106. package/dist/transaction/updatePsm.d.ts +1 -1
  107. package/dist/transaction/updatePsm.d.ts.map +1 -1
  108. package/dist/transaction/updatePsm.js +5 -5
  109. package/dist/transaction/updatePsm.js.map +1 -1
  110. package/dist/transaction/updateSigners.d.ts +1 -1
  111. package/dist/transaction/updateSigners.d.ts.map +1 -1
  112. package/dist/transaction/updateSigners.js +5 -5
  113. package/dist/transaction/updateSigners.js.map +1 -1
  114. package/dist/transaction.test.js +1 -1
  115. package/dist/transaction.test.js.map +1 -1
  116. package/dist/types.d.ts +1 -1
  117. package/dist/types.d.ts.map +1 -1
  118. package/dist/utils/digest.d.ts +6 -0
  119. package/dist/utils/digest.d.ts.map +1 -0
  120. package/dist/utils/digest.js +22 -0
  121. package/dist/utils/digest.js.map +1 -0
  122. package/dist/utils/ecdsa.d.ts +8 -0
  123. package/dist/utils/ecdsa.d.ts.map +1 -0
  124. package/dist/utils/ecdsa.js +60 -0
  125. package/dist/utils/ecdsa.js.map +1 -0
  126. package/dist/utils/ecdsa.test.d.ts +2 -0
  127. package/dist/utils/ecdsa.test.d.ts.map +1 -0
  128. package/dist/utils/ecdsa.test.js +85 -0
  129. package/dist/utils/ecdsa.test.js.map +1 -0
  130. package/dist/utils/index.d.ts +1 -0
  131. package/dist/utils/index.d.ts.map +1 -1
  132. package/dist/utils/index.js +1 -0
  133. package/dist/utils/index.js.map +1 -1
  134. package/dist/utils/key.d.ts +10 -0
  135. package/dist/utils/key.d.ts.map +1 -0
  136. package/dist/utils/key.js +38 -0
  137. package/dist/utils/key.js.map +1 -0
  138. package/dist/utils/key.test.d.ts +2 -0
  139. package/dist/utils/key.test.d.ts.map +1 -0
  140. package/dist/utils/key.test.js +80 -0
  141. package/dist/utils/key.test.js.map +1 -0
  142. package/dist/utils/random.d.ts +1 -1
  143. package/dist/utils/random.d.ts.map +1 -1
  144. package/dist/utils/random.js +1 -1
  145. package/dist/utils/random.js.map +1 -1
  146. package/dist/utils/signature.d.ts +2 -1
  147. package/dist/utils/signature.d.ts.map +1 -1
  148. package/dist/utils/signature.js +6 -3
  149. package/dist/utils/signature.js.map +1 -1
  150. package/dist/utils/signature.test.js +11 -11
  151. package/dist/utils/signature.test.js.map +1 -1
  152. package/dist/utils/word.d.ts +6 -1
  153. package/dist/utils/word.d.ts.map +1 -1
  154. package/dist/utils/word.js +11 -0
  155. package/dist/utils/word.js.map +1 -1
  156. package/dist/utils/word.test.js +54 -3
  157. package/dist/utils/word.test.js.map +1 -1
  158. package/package.json +4 -5
  159. package/src/account/builder.ts +7 -5
  160. package/src/account/masm.ts +103 -99
  161. package/src/account/storage.ts +19 -7
  162. package/src/client.test.ts +4 -4
  163. package/src/client.ts +3 -3
  164. package/src/index.ts +8 -1
  165. package/src/inspector.test.ts +38 -25
  166. package/src/inspector.ts +18 -10
  167. package/src/multisig/helpers.test.ts +2 -2
  168. package/src/multisig/helpers.ts +2 -1
  169. package/src/multisig/proposal/execution.ts +320 -0
  170. package/src/multisig/proposal/parser.ts +191 -0
  171. package/src/multisig/signing.ts +24 -0
  172. package/src/multisig.test.ts +8 -4
  173. package/src/multisig.ts +153 -434
  174. package/src/signer.ts +2 -95
  175. package/src/signers/ecdsa.ts +35 -0
  176. package/src/{signer.test.ts → signers/falcon.test.ts} +29 -33
  177. package/src/signers/falcon.ts +36 -0
  178. package/src/signers/index.ts +4 -0
  179. package/src/signers/miden-wallet.test.ts +119 -0
  180. package/src/signers/miden-wallet.ts +49 -0
  181. package/src/signers/para.test.ts +103 -0
  182. package/src/signers/para.ts +60 -0
  183. package/src/transaction/consumeNotes.ts +14 -10
  184. package/src/transaction/options.ts +2 -2
  185. package/src/transaction/p2id.ts +3 -8
  186. package/src/transaction/summary.ts +2 -2
  187. package/src/transaction/updatePsm.ts +5 -6
  188. package/src/transaction/updateSigners.ts +5 -6
  189. package/src/transaction.test.ts +1 -1
  190. package/src/types.ts +1 -1
  191. package/src/utils/digest.ts +25 -0
  192. package/src/utils/ecdsa.test.ts +104 -0
  193. package/src/utils/ecdsa.ts +77 -0
  194. package/src/utils/index.ts +1 -0
  195. package/src/utils/key.test.ts +89 -0
  196. package/src/utils/key.ts +49 -0
  197. package/src/utils/random.ts +1 -1
  198. package/src/utils/signature.test.ts +11 -11
  199. package/src/utils/signature.ts +10 -3
  200. package/src/utils/word.test.ts +57 -3
  201. package/src/utils/word.ts +13 -1
@@ -1,14 +1,14 @@
1
+
1
2
  export const MULTISIG_MASM = `# Multi-Signature RPO Falcon 512 Authentication Component
2
3
  #
3
4
  # This component provides multi-signature authentication for accounts.
4
5
  # It integrates with the PSM component for optional PSM signature verification.
5
6
 
6
- use miden::active_account
7
- use miden::native_account
8
- use miden::auth
7
+ use miden::protocol::active_account
8
+ use miden::protocol::native_account
9
+ use miden::standards::auth
9
10
  use openzeppelin::psm
10
11
 
11
- # Type definitions for v0.12 syntax
12
12
  type BeWord = struct @bigendian { a: felt, b: felt, c: felt, d: felt }
13
13
 
14
14
  # CONSTANTS
@@ -17,7 +17,7 @@ type BeWord = struct @bigendian { a: felt, b: felt, c: felt, d: felt }
17
17
  # Auth Request Constants
18
18
 
19
19
  # The event emitted when a signature is not found for a required signer.
20
- const AUTH_UNAUTHORIZED_EVENT = event("miden::auth::unauthorized")
20
+ const AUTH_UNAUTHORIZED_EVENT=event("miden::auth::unauthorized")
21
21
 
22
22
  # Storage Layout Constants
23
23
  #
@@ -32,29 +32,29 @@ const AUTH_UNAUTHORIZED_EVENT = event("miden::auth::unauthorized")
32
32
  # number of approvers are stored as:
33
33
  # [default_threshold, num_approvers, 0, 0].
34
34
  # The threshold is guaranteed to be less than or equal to num_approvers.
35
- const THRESHOLD_CONFIG_SLOT = 0
35
+ const THRESHOLD_CONFIG_SLOT=word("openzeppelin::multisig::threshold_config")
36
36
 
37
37
  # The slot in this component's storage layout where the public keys map is stored.
38
38
  # Map entries: [key_index, 0, 0, 0] => APPROVER_PUBLIC_KEY
39
- const PUBLIC_KEYS_MAP_SLOT = 1
39
+ const PUBLIC_KEYS_MAP_SLOT=word("openzeppelin::multisig::signer_public_keys")
40
40
 
41
41
  # The slot in this component's storage layout where executed transactions are stored.
42
42
  # Map entries: transaction_message => [is_executed, 0, 0, 0]
43
- const EXECUTED_TXS_SLOT = 2
43
+ const EXECUTED_TXS_SLOT=word("openzeppelin::multisig::executed_transactions")
44
44
 
45
45
  # The slot in this component's storage layout where procedure thresholds are stored.
46
46
  # Map entries: PROC_ROOT => [proc_threshold, 0, 0, 0]
47
- const PROC_THRESHOLD_ROOTS_SLOT = 3
47
+ const PROC_THRESHOLD_ROOTS_SLOT=word("openzeppelin::multisig::procedure_thresholds")
48
48
 
49
49
  # Executed Transaction Flag Constant
50
- const IS_EXECUTED_FLAG = [1, 0, 0, 0]
50
+ const IS_EXECUTED_FLAG=[1, 0, 0, 0]
51
51
 
52
52
  # ERRORS
53
- const ERR_TX_ALREADY_EXECUTED = "failed to approve multisig transaction as it was already executed"
53
+ const ERR_TX_ALREADY_EXECUTED="failed to approve multisig transaction as it was already executed"
54
54
 
55
- const ERR_MALFORMED_MULTISIG_CONFIG = "number of approvers must be equal to or greater than threshold"
55
+ const ERR_MALFORMED_MULTISIG_CONFIG="number of approvers must be equal to or greater than threshold"
56
56
 
57
- const ERR_ZERO_IN_MULTISIG_CONFIG = "number of approvers or threshold must not be zero"
57
+ const ERR_ZERO_IN_MULTISIG_CONFIG="number of approvers or threshold must not be zero"
58
58
 
59
59
  # MULTISIG PROCEDURES
60
60
  # =================================================================================================
@@ -73,14 +73,14 @@ proc assert_new_tx(msg: BeWord)
73
73
  swapw
74
74
  # => [MSG, IS_EXECUTED_FLAG]
75
75
 
76
- push.EXECUTED_TXS_SLOT
77
- # => [index, MSG, IS_EXECUTED_FLAG]
76
+ push.EXECUTED_TXS_SLOT[0..2]
77
+ # => [txs_slot_prefix, txs_slot_suffix, MSG, IS_EXECUTED_FLAG]
78
78
 
79
79
  # Set the key value pair in the map to mark transaction as executed
80
80
  exec.native_account::set_map_item
81
- # => [OLD_MAP_ROOT, [0, 0, 0, is_executed]]
81
+ # => [[0, 0, 0, is_executed]]
82
82
 
83
- dropw drop drop drop
83
+ drop drop drop
84
84
  # => [is_executed]
85
85
 
86
86
  assertz.err=ERR_TX_ALREADY_EXECUTED
@@ -119,13 +119,13 @@ proc cleanup_pubkey_mapping(init_num_of_approvers: u32, new_num_of_approvers: u3
119
119
  padw swapw
120
120
  # => [[0, 0, 0, i-1], EMPTY_WORD, i-1, new_num_of_approvers]
121
121
 
122
- push.PUBLIC_KEYS_MAP_SLOT
123
- # => [pub_key_slot_idx, [0, 0, 0, i-1], EMPTY_WORD, i-1, new_num_of_approvers]
122
+ push.PUBLIC_KEYS_MAP_SLOT[0..2]
123
+ # => [pub_key_slot_prefix, pub_key_slot_suffix, [0, 0, 0, i-1], EMPTY_WORD, i-1, new_num_of_approvers]
124
124
 
125
125
  exec.native_account::set_map_item
126
- # => [OLD_MAP_ROOT, OLD_MAP_VALUE, i-1, new_num_of_approvers]
126
+ # => [OLD_MAP_VALUE, i-1, new_num_of_approvers]
127
127
 
128
- dropw dropw
128
+ dropw
129
129
  # => [i-1, new_num_of_approvers]
130
130
 
131
131
  dup.1 dup.1
@@ -155,7 +155,8 @@ end
155
155
  #! Locals:
156
156
  #! 0: new_num_of_approvers
157
157
  #! 1: init_num_of_approvers
158
- pub proc update_signers_and_threshold.2(multisig_config_hash: BeWord)
158
+ @locals(2)
159
+ pub proc update_signers_and_threshold(multisig_config_hash: BeWord)
159
160
  adv.push_mapval
160
161
  # => [MULTISIG_CONFIG_HASH, pad(12)]
161
162
 
@@ -182,8 +183,8 @@ pub proc update_signers_and_threshold.2(multisig_config_hash: BeWord)
182
183
  eq.0 assertz.err=ERR_ZERO_IN_MULTISIG_CONFIG
183
184
  # => [MULTISIG_CONFIG, pad(12)]
184
185
 
185
- push.THRESHOLD_CONFIG_SLOT
186
- # => [slot, MULTISIG_CONFIG, pad(12)]
186
+ push.THRESHOLD_CONFIG_SLOT[0..2]
187
+ # => [config_slot_prefix, config_slot_suffix, MULTISIG_CONFIG, pad(12)]
187
188
 
188
189
  exec.native_account::set_item
189
190
  # => [OLD_THRESHOLD_CONFIG, pad(12)]
@@ -209,13 +210,13 @@ pub proc update_signers_and_threshold.2(multisig_config_hash: BeWord)
209
210
  swapw
210
211
  # => [[0, 0, 0, i-1], PUB_KEY, i-1, pad(12)]
211
212
 
212
- push.PUBLIC_KEYS_MAP_SLOT
213
- # => [pub_key_slot_idx, [0, 0, 0, i-1], PUB_KEY, i-1, pad(12)]
213
+ push.PUBLIC_KEYS_MAP_SLOT[0..2]
214
+ # => [pub_key_slot_prefix, pub_key_slot_suffix, [0, 0, 0, i-1], PUB_KEY, i-1, pad(12)]
214
215
 
215
216
  exec.native_account::set_map_item
216
- # => [OLD_MAP_ROOT, OLD_MAP_VALUE, i-1, pad(12)]
217
+ # => [OLD_VALUE, i-1, pad(12)]
217
218
 
218
- dropw dropw
219
+ dropw
219
220
  # => [i-1, pad(12)]
220
221
 
221
222
  dup neq.0
@@ -242,7 +243,8 @@ end
242
243
  #
243
244
  #! Inputs: [default_threshold]
244
245
  #! Outputs: [transaction_threshold]
245
- proc compute_transaction_threshold.1(default_threshold: u32) -> u32
246
+ @locals(1)
247
+ proc compute_transaction_threshold(default_threshold: u32) -> u32
246
248
  # 1. initialize transaction_threshold = 0
247
249
  # 2. iterate through all account procedures
248
250
  # a. check if the procedure was called during the transaction
@@ -281,8 +283,8 @@ proc compute_transaction_threshold.1(default_threshold: u32) -> u32
281
283
  if.true
282
284
  # => [PROC_ROOT, num_procedures-1, transaction_threshold]
283
285
 
284
- push.PROC_THRESHOLD_ROOTS_SLOT
285
- # => [PROC_THRESHOLD_ROOTS_SLOT, PROC_ROOT, num_procedures-1, transaction_threshold]
286
+ push.PROC_THRESHOLD_ROOTS_SLOT[0..2]
287
+ # => [PROC_THRESHOLD_ROOTS_SLOT_prefix, PROC_THRESHOLD_ROOTS_SLOT_suffix, PROC_ROOT, num_procedures-1, transaction_threshold]
286
288
 
287
289
  # 2b. get the override proc_threshold of that procedure
288
290
  # if the procedure has no override threshold, the returned map item will be [0, 0, 0, 0]
@@ -359,7 +361,8 @@ end
359
361
  #! - PSM signature verification fails (if PSM is enabled).
360
362
  #!
361
363
  #! Invocation: call
362
- pub proc auth_tx_rpo_falcon512_multisig.1(salt: BeWord)
364
+ @locals(1)
365
+ pub proc auth_tx_rpo_falcon512_multisig(salt: BeWord)
363
366
  exec.native_account::incr_nonce drop
364
367
  # => [SALT]
365
368
 
@@ -378,8 +381,8 @@ pub proc auth_tx_rpo_falcon512_multisig.1(salt: BeWord)
378
381
 
379
382
  # ------ Verifying approver signatures ------
380
383
 
381
- push.THRESHOLD_CONFIG_SLOT
382
- # => [index, TX_SUMMARY_COMMITMENT]
384
+ push.THRESHOLD_CONFIG_SLOT[0..2]
385
+ # => [config_slot_prefix, config_slot_suffix, TX_SUMMARY_COMMITMENT]
383
386
 
384
387
  exec.active_account::get_initial_item
385
388
  # => [0, 0, num_of_approvers, default_threshold, TX_SUMMARY_COMMITMENT]
@@ -390,10 +393,10 @@ pub proc auth_tx_rpo_falcon512_multisig.1(salt: BeWord)
390
393
  swap movdn.5
391
394
  # => [num_of_approvers, TX_SUMMARY_COMMITMENT, default_threshold]
392
395
 
393
- push.PUBLIC_KEYS_MAP_SLOT
394
- # => [pub_key_slot_idx, num_of_approvers, TX_SUMMARY_COMMITMENT, default_threshold]
396
+ push.PUBLIC_KEYS_MAP_SLOT[0..2]
397
+ # => [pub_key_slot_prefix, pub_key_slot_suffix, num_of_approvers, TX_SUMMARY_COMMITMENT, default_threshold]
395
398
 
396
- exec.::miden::auth::rpo_falcon512::verify_signatures
399
+ exec.::miden::standards::auth::falcon512_rpo::verify_signatures
397
400
  # => [num_verified_signatures, TX_SUMMARY_COMMITMENT, default_threshold]
398
401
 
399
402
  # ------ Checking threshold is >= num_verified_signatures ------
@@ -429,12 +432,11 @@ export const MULTISIG_ECDSA_MASM = `# Multi-Signature ECDSA secp256k1 Authentica
429
432
  # ECDSA secp256k1 (k256/keccak) signatures instead of RPO Falcon 512.
430
433
  # It integrates with the PSM component for optional PSM signature verification.
431
434
 
432
- use miden::active_account
433
- use miden::native_account
434
- use miden::auth
435
+ use miden::protocol::active_account
436
+ use miden::protocol::native_account
437
+ use miden::standards::auth
435
438
  use openzeppelin::psm_ecdsa
436
439
 
437
- # Type definitions for v0.12 syntax
438
440
  type BeWord = struct @bigendian { a: felt, b: felt, c: felt, d: felt }
439
441
 
440
442
  # CONSTANTS
@@ -443,7 +445,7 @@ type BeWord = struct @bigendian { a: felt, b: felt, c: felt, d: felt }
443
445
  # Auth Request Constants
444
446
 
445
447
  # The event emitted when a signature is not found for a required signer.
446
- const AUTH_UNAUTHORIZED_EVENT = event("miden::auth::unauthorized")
448
+ const AUTH_UNAUTHORIZED_EVENT=event("miden::auth::unauthorized")
447
449
 
448
450
  # Storage Layout Constants
449
451
  #
@@ -458,29 +460,29 @@ const AUTH_UNAUTHORIZED_EVENT = event("miden::auth::unauthorized")
458
460
  # number of approvers are stored as:
459
461
  # [default_threshold, num_approvers, 0, 0].
460
462
  # The threshold is guaranteed to be less than or equal to num_approvers.
461
- const THRESHOLD_CONFIG_SLOT = 0
463
+ const THRESHOLD_CONFIG_SLOT=word("openzeppelin::multisig::threshold_config")
462
464
 
463
465
  # The slot in this component's storage layout where the public keys map is stored.
464
466
  # Map entries: [key_index, 0, 0, 0] => APPROVER_PUBLIC_KEY
465
- const PUBLIC_KEYS_MAP_SLOT = 1
467
+ const PUBLIC_KEYS_MAP_SLOT=word("openzeppelin::multisig::signer_public_keys")
466
468
 
467
469
  # The slot in this component's storage layout where executed transactions are stored.
468
470
  # Map entries: transaction_message => [is_executed, 0, 0, 0]
469
- const EXECUTED_TXS_SLOT = 2
471
+ const EXECUTED_TXS_SLOT=word("openzeppelin::multisig::executed_transactions")
470
472
 
471
473
  # The slot in this component's storage layout where procedure thresholds are stored.
472
474
  # Map entries: PROC_ROOT => [proc_threshold, 0, 0, 0]
473
- const PROC_THRESHOLD_ROOTS_SLOT = 3
475
+ const PROC_THRESHOLD_ROOTS_SLOT=word("openzeppelin::multisig::procedure_thresholds")
474
476
 
475
477
  # Executed Transaction Flag Constant
476
- const IS_EXECUTED_FLAG = [1, 0, 0, 0]
478
+ const IS_EXECUTED_FLAG=[1, 0, 0, 0]
477
479
 
478
480
  # ERRORS
479
- const ERR_TX_ALREADY_EXECUTED = "failed to approve multisig transaction as it was already executed"
481
+ const ERR_TX_ALREADY_EXECUTED="failed to approve multisig transaction as it was already executed"
480
482
 
481
- const ERR_MALFORMED_MULTISIG_CONFIG = "number of approvers must be equal to or greater than threshold"
483
+ const ERR_MALFORMED_MULTISIG_CONFIG="number of approvers must be equal to or greater than threshold"
482
484
 
483
- const ERR_ZERO_IN_MULTISIG_CONFIG = "number of approvers or threshold must not be zero"
485
+ const ERR_ZERO_IN_MULTISIG_CONFIG="number of approvers or threshold must not be zero"
484
486
 
485
487
  # MULTISIG PROCEDURES
486
488
  # =================================================================================================
@@ -499,14 +501,14 @@ proc assert_new_tx(msg: BeWord)
499
501
  swapw
500
502
  # => [MSG, IS_EXECUTED_FLAG]
501
503
 
502
- push.EXECUTED_TXS_SLOT
503
- # => [index, MSG, IS_EXECUTED_FLAG]
504
+ push.EXECUTED_TXS_SLOT[0..2]
505
+ # => [txs_slot_prefix, txs_slot_suffix, MSG, IS_EXECUTED_FLAG]
504
506
 
505
507
  # Set the key value pair in the map to mark transaction as executed
506
508
  exec.native_account::set_map_item
507
- # => [OLD_MAP_ROOT, [0, 0, 0, is_executed]]
509
+ # => [[0, 0, 0, is_executed]]
508
510
 
509
- dropw drop drop drop
511
+ drop drop drop
510
512
  # => [is_executed]
511
513
 
512
514
  assertz.err=ERR_TX_ALREADY_EXECUTED
@@ -545,13 +547,13 @@ proc cleanup_pubkey_mapping(init_num_of_approvers: u32, new_num_of_approvers: u3
545
547
  padw swapw
546
548
  # => [[0, 0, 0, i-1], EMPTY_WORD, i-1, new_num_of_approvers]
547
549
 
548
- push.PUBLIC_KEYS_MAP_SLOT
549
- # => [pub_key_slot_idx, [0, 0, 0, i-1], EMPTY_WORD, i-1, new_num_of_approvers]
550
+ push.PUBLIC_KEYS_MAP_SLOT[0..2]
551
+ # => [pub_key_slot_prefix, pub_key_slot_suffix, [0, 0, 0, i-1], EMPTY_WORD, i-1, new_num_of_approvers]
550
552
 
551
553
  exec.native_account::set_map_item
552
- # => [OLD_MAP_ROOT, OLD_MAP_VALUE, i-1, new_num_of_approvers]
554
+ # => [OLD_MAP_VALUE, i-1, new_num_of_approvers]
553
555
 
554
- dropw dropw
556
+ dropw
555
557
  # => [i-1, new_num_of_approvers]
556
558
 
557
559
  dup.1 dup.1
@@ -581,7 +583,8 @@ end
581
583
  #! Locals:
582
584
  #! 0: new_num_of_approvers
583
585
  #! 1: init_num_of_approvers
584
- pub proc update_signers_and_threshold.2(multisig_config_hash: BeWord)
586
+ @locals(2)
587
+ pub proc update_signers_and_threshold(multisig_config_hash: BeWord)
585
588
  adv.push_mapval
586
589
  # => [MULTISIG_CONFIG_HASH, pad(12)]
587
590
 
@@ -608,8 +611,8 @@ pub proc update_signers_and_threshold.2(multisig_config_hash: BeWord)
608
611
  eq.0 assertz.err=ERR_ZERO_IN_MULTISIG_CONFIG
609
612
  # => [MULTISIG_CONFIG, pad(12)]
610
613
 
611
- push.THRESHOLD_CONFIG_SLOT
612
- # => [slot, MULTISIG_CONFIG, pad(12)]
614
+ push.THRESHOLD_CONFIG_SLOT[0..2]
615
+ # => [config_slot_prefix, config_slot_suffix, MULTISIG_CONFIG, pad(12)]
613
616
 
614
617
  exec.native_account::set_item
615
618
  # => [OLD_THRESHOLD_CONFIG, pad(12)]
@@ -635,13 +638,13 @@ pub proc update_signers_and_threshold.2(multisig_config_hash: BeWord)
635
638
  swapw
636
639
  # => [[0, 0, 0, i-1], PUB_KEY, i-1, pad(12)]
637
640
 
638
- push.PUBLIC_KEYS_MAP_SLOT
639
- # => [pub_key_slot_idx, [0, 0, 0, i-1], PUB_KEY, i-1, pad(12)]
641
+ push.PUBLIC_KEYS_MAP_SLOT[0..2]
642
+ # => [pub_key_slot_prefix, pub_key_slot_suffix, [0, 0, 0, i-1], PUB_KEY, i-1, pad(12)]
640
643
 
641
644
  exec.native_account::set_map_item
642
- # => [OLD_MAP_ROOT, OLD_MAP_VALUE, i-1, pad(12)]
645
+ # => [OLD_VALUE, i-1, pad(12)]
643
646
 
644
- dropw dropw
647
+ dropw
645
648
  # => [i-1, pad(12)]
646
649
 
647
650
  dup neq.0
@@ -668,7 +671,8 @@ end
668
671
  #
669
672
  #! Inputs: [default_threshold]
670
673
  #! Outputs: [transaction_threshold]
671
- proc compute_transaction_threshold.1(default_threshold: u32) -> u32
674
+ @locals(1)
675
+ proc compute_transaction_threshold(default_threshold: u32) -> u32
672
676
  # 1. initialize transaction_threshold = 0
673
677
  # 2. iterate through all account procedures
674
678
  # a. check if the procedure was called during the transaction
@@ -707,8 +711,8 @@ proc compute_transaction_threshold.1(default_threshold: u32) -> u32
707
711
  if.true
708
712
  # => [PROC_ROOT, num_procedures-1, transaction_threshold]
709
713
 
710
- push.PROC_THRESHOLD_ROOTS_SLOT
711
- # => [PROC_THRESHOLD_ROOTS_SLOT, PROC_ROOT, num_procedures-1, transaction_threshold]
714
+ push.PROC_THRESHOLD_ROOTS_SLOT[0..2]
715
+ # => [PROC_THRESHOLD_ROOTS_SLOT_prefix, PROC_THRESHOLD_ROOTS_SLOT_suffix, PROC_ROOT, num_procedures-1, transaction_threshold]
712
716
 
713
717
  # 2b. get the override proc_threshold of that procedure
714
718
  # if the procedure has no override threshold, the returned map item will be [0, 0, 0, 0]
@@ -785,7 +789,8 @@ end
785
789
  #! - PSM signature verification fails (if PSM is enabled).
786
790
  #!
787
791
  #! Invocation: call
788
- pub proc auth_tx_ecdsa_multisig.1(salt: BeWord)
792
+ @locals(1)
793
+ pub proc auth_tx_ecdsa_multisig(salt: BeWord)
789
794
  exec.native_account::incr_nonce drop
790
795
  # => [SALT]
791
796
 
@@ -804,8 +809,8 @@ pub proc auth_tx_ecdsa_multisig.1(salt: BeWord)
804
809
 
805
810
  # ------ Verifying approver signatures ------
806
811
 
807
- push.THRESHOLD_CONFIG_SLOT
808
- # => [index, TX_SUMMARY_COMMITMENT]
812
+ push.THRESHOLD_CONFIG_SLOT[0..2]
813
+ # => [config_slot_prefix, config_slot_suffix, TX_SUMMARY_COMMITMENT]
809
814
 
810
815
  exec.active_account::get_initial_item
811
816
  # => [0, 0, num_of_approvers, default_threshold, TX_SUMMARY_COMMITMENT]
@@ -816,10 +821,10 @@ pub proc auth_tx_ecdsa_multisig.1(salt: BeWord)
816
821
  swap movdn.5
817
822
  # => [num_of_approvers, TX_SUMMARY_COMMITMENT, default_threshold]
818
823
 
819
- push.PUBLIC_KEYS_MAP_SLOT
820
- # => [pub_key_slot_idx, num_of_approvers, TX_SUMMARY_COMMITMENT, default_threshold]
824
+ push.PUBLIC_KEYS_MAP_SLOT[0..2]
825
+ # => [pub_key_slot_prefix, pub_key_slot_suffix, num_of_approvers, TX_SUMMARY_COMMITMENT, default_threshold]
821
826
 
822
- exec.::miden::auth::ecdsa_k256_keccak::verify_signatures
827
+ exec.::miden::standards::auth::ecdsa_k256_keccak::verify_signatures
823
828
  # => [num_verified_signatures, TX_SUMMARY_COMMITMENT, default_threshold]
824
829
 
825
830
  # ------ Checking threshold is >= num_verified_signatures ------
@@ -854,10 +859,9 @@ export const PSM_MASM = `# Private State Manager (PSM) Authentication Component
854
859
  # This component provides PSM signature verification for accounts.
855
860
  # It can be used standalone or in conjunction with other auth components like multisig.
856
861
 
857
- use miden::active_account
858
- use miden::native_account
862
+ use miden::protocol::active_account
863
+ use miden::protocol::native_account
859
864
 
860
- # Type definitions for v0.12 syntax
861
865
  type BeWord = struct @bigendian { a: felt, b: felt, c: felt, d: felt }
862
866
 
863
867
  # IMPORTANT SECURITY NOTES
@@ -899,22 +903,22 @@ type BeWord = struct @bigendian { a: felt, b: felt, c: felt, d: felt }
899
903
  # CONSTANTS
900
904
  # =================================================================================================
901
905
 
902
- # Slot where the PSM selector flag is stored:
906
+ # Slot where the PSM selector flag is stored (using word() for named slot access):
903
907
  # - PSM_ON => PSM signature required
904
908
  # - PSM_OFF => PSM signature skipped
905
- const PSM_SELECTOR_SLOT = 0
909
+ const PSM_SELECTOR_SLOT=word("openzeppelin::psm::selector")
906
910
 
907
911
  # Map slot for PSM public key
908
912
  # Uses exactly one PSM public key at index [0, 0, 0, 0]
909
913
  # [0, 0, 0, 0] => PSM_PUBLIC_KEY
910
- const PSM_PUBLIC_KEY_MAP_SLOT = 1
914
+ const PSM_PUBLIC_KEY_MAP_SLOT=word("openzeppelin::psm::public_key")
911
915
 
912
916
  # Selector flag values
913
- const PSM_ON = [1, 0, 0, 0]
914
- const PSM_OFF = [0, 0, 0, 0]
917
+ const PSM_ON=[1, 0, 0, 0]
918
+ const PSM_OFF=[0, 0, 0, 0]
915
919
 
916
920
  # The event emitted when a signature is not found for a required signer.
917
- const AUTH_UNAUTHORIZED_EVENT = event("miden::auth::unauthorized")
921
+ const AUTH_UNAUTHORIZED_EVENT=event("miden::auth::unauthorized")
918
922
 
919
923
  # PSM PROCEDURES
920
924
  # =================================================================================================
@@ -927,12 +931,12 @@ const AUTH_UNAUTHORIZED_EVENT = event("miden::auth::unauthorized")
927
931
  #! Notes:
928
932
  #! - Sets PSM_SELECTOR_SLOT to PSM_ON (1)
929
933
  #! - After this, transactions will require PSM signature verification
930
- proc.enable_psm
934
+ proc enable_psm
931
935
  push.PSM_ON
932
936
  # => [PSM_ON]
933
937
 
934
- push.PSM_SELECTOR_SLOT
935
- # => [PSM_SELECTOR_SLOT, PSM_ON]
938
+ push.PSM_SELECTOR_SLOT[0..2]
939
+ # => [selector_slot_prefix, selector_slot_suffix, PSM_ON]
936
940
 
937
941
  exec.native_account::set_item
938
942
  # => [OLD_ROOT]
@@ -949,12 +953,12 @@ end
949
953
  #! Notes:
950
954
  #! - Sets PSM_SELECTOR_SLOT to PSM_OFF (0)
951
955
  #! - After this, transactions will NOT require PSM signature verification
952
- proc.disable_psm
956
+ proc disable_psm
953
957
  push.PSM_OFF
954
958
  # => [PSM_OFF]
955
959
 
956
- push.PSM_SELECTOR_SLOT
957
- # => [PSM_SELECTOR_SLOT, PSM_OFF]
960
+ push.PSM_SELECTOR_SLOT[0..2]
961
+ # => [selector_slot_prefix, selector_slot_suffix, PSM_OFF]
958
962
 
959
963
  exec.native_account::set_item
960
964
  # => [OLD_ROOT]
@@ -984,13 +988,13 @@ pub proc update_psm_public_key
984
988
  # => [MAP_KEY, PUB_KEY]
985
989
  # Note that MAP_KEY is [0, 0, 0, 0] for a single PSM_KEY
986
990
 
987
- push.PSM_PUBLIC_KEY_MAP_SLOT
988
- # => [index, MAP_KEY, PUB_KEY]
991
+ push.PSM_PUBLIC_KEY_MAP_SLOT[0..2]
992
+ # => [pub_key_slot_prefix, pub_key_slot_suffix, MAP_KEY, PUB_KEY]
989
993
 
990
994
  exec.native_account::set_map_item
991
- # => [OLD_MAP_ROOT, OLD_MAP_VALUE]
995
+ # => [OLD_MAP_VALUE]
992
996
 
993
- dropw dropw
997
+ dropw
994
998
  # => []
995
999
  end
996
1000
 
@@ -1007,8 +1011,8 @@ end
1007
1011
  #! - MSG is TX_SUMMARY_COMMITMENT provided by auth procedure
1008
1012
  #! - If selector is OFF (0), PSM verification is skipped
1009
1013
  #! - Selector value is read from initial storage state
1010
- pub proc verify_psm_signature(msg: BeWord)
1011
- push.PSM_SELECTOR_SLOT
1014
+ pub proc verify_psm_signature(msg: BeWord) -> BeWord
1015
+ push.PSM_SELECTOR_SLOT[0..2]
1012
1016
  exec.active_account::get_item
1013
1017
  drop drop drop
1014
1018
  # => [selector, MSG]
@@ -1016,8 +1020,8 @@ pub proc verify_psm_signature(msg: BeWord)
1016
1020
  push.1 eq
1017
1021
  if.true
1018
1022
  push.1
1019
- push.PSM_PUBLIC_KEY_MAP_SLOT
1020
- exec.::miden::auth::rpo_falcon512::verify_signatures
1023
+ push.PSM_PUBLIC_KEY_MAP_SLOT[0..2]
1024
+ exec.::miden::standards::auth::falcon512_rpo::verify_signatures
1021
1025
  push.1 neq
1022
1026
  if.true
1023
1027
  emit.AUTH_UNAUTHORIZED_EVENT
@@ -1032,6 +1036,6 @@ end
1032
1036
  export const PSM_ECDSA_MASM = PSM_MASM
1033
1037
  .replaceAll('RPO Falcon 512', 'ECDSA secp256k1')
1034
1038
  .replace(
1035
- 'exec.::miden::auth::rpo_falcon512::verify_signatures',
1036
- 'exec.::miden::auth::ecdsa_k256_keccak::verify_signatures',
1039
+ 'exec.::miden::standards::auth::falcon512_rpo::verify_signatures',
1040
+ 'exec.::miden::standards::auth::ecdsa_k256_keccak::verify_signatures',
1037
1041
  );
@@ -1,8 +1,20 @@
1
1
  import type { MultisigConfig } from '../types.js';
2
- import { StorageSlot, StorageMap, Word } from '@demox-labs/miden-sdk';
2
+ import { StorageSlot, StorageMap, Word } from '@miden-sdk/miden-sdk';
3
3
  import { normalizeHexWord } from '../utils/encoding.js';
4
4
  import { getProcedureRoot } from '../procedures.js';
5
5
 
6
+ const MULTISIG_SLOT_NAMES = {
7
+ THRESHOLD_CONFIG: 'openzeppelin::multisig::threshold_config',
8
+ SIGNER_PUBLIC_KEYS: 'openzeppelin::multisig::signer_public_keys',
9
+ EXECUTED_TRANSACTIONS: 'openzeppelin::multisig::executed_transactions',
10
+ PROCEDURE_THRESHOLDS: 'openzeppelin::multisig::procedure_thresholds',
11
+ } as const;
12
+
13
+ const PSM_SLOT_NAMES = {
14
+ SELECTOR: 'openzeppelin::psm::selector',
15
+ PUBLIC_KEY: 'openzeppelin::psm::public_key',
16
+ } as const;
17
+
6
18
  export class StorageLayoutBuilder {
7
19
  buildMultisigSlots(config: MultisigConfig): StorageSlot[] {
8
20
  const numSigners = config.signerCommitments.length;
@@ -14,7 +26,7 @@ export class StorageLayoutBuilder {
14
26
  0n,
15
27
  ])
16
28
  );
17
- const slot0 = StorageSlot.fromValue(slot0Word);
29
+ const slot0 = StorageSlot.fromValue(MULTISIG_SLOT_NAMES.THRESHOLD_CONFIG, slot0Word);
18
30
 
19
31
  const signersMap = new StorageMap();
20
32
  config.signerCommitments.forEach((commitment, index) => {
@@ -22,9 +34,9 @@ export class StorageLayoutBuilder {
22
34
  const value = Word.fromHex(normalizeHexWord(commitment));
23
35
  signersMap.insert(key, value);
24
36
  });
25
- const slot1 = StorageSlot.map(signersMap);
37
+ const slot1 = StorageSlot.map(MULTISIG_SLOT_NAMES.SIGNER_PUBLIC_KEYS, signersMap);
26
38
 
27
- const slot2 = StorageSlot.map(new StorageMap());
39
+ const slot2 = StorageSlot.map(MULTISIG_SLOT_NAMES.EXECUTED_TRANSACTIONS, new StorageMap());
28
40
 
29
41
  const procThresholdMap = new StorageMap();
30
42
  if (config.procedureThresholds) {
@@ -36,7 +48,7 @@ export class StorageLayoutBuilder {
36
48
  procThresholdMap.insert(key, value);
37
49
  }
38
50
  }
39
- const slot3 = StorageSlot.map(procThresholdMap);
51
+ const slot3 = StorageSlot.map(MULTISIG_SLOT_NAMES.PROCEDURE_THRESHOLDS, procThresholdMap);
40
52
 
41
53
  return [slot0, slot1, slot2, slot3];
42
54
  }
@@ -44,13 +56,13 @@ export class StorageLayoutBuilder {
44
56
  buildPsmSlots(config: MultisigConfig): StorageSlot[] {
45
57
  const selector = config.psmEnabled !== false ? 1n : 0n;
46
58
  const selectorWord = new Word(new BigUint64Array([selector, 0n, 0n, 0n]));
47
- const slot0 = StorageSlot.fromValue(selectorWord);
59
+ const slot0 = StorageSlot.fromValue(PSM_SLOT_NAMES.SELECTOR, selectorWord);
48
60
 
49
61
  const psmKeyMap = new StorageMap();
50
62
  const zeroKey = new Word(new BigUint64Array([0n, 0n, 0n, 0n]));
51
63
  const psmKey = Word.fromHex(normalizeHexWord(config.psmCommitment));
52
64
  psmKeyMap.insert(zeroKey, psmKey);
53
- const slot1 = StorageSlot.map(psmKeyMap);
65
+ const slot1 = StorageSlot.map(PSM_SLOT_NAMES.PUBLIC_KEY, psmKeyMap);
54
66
 
55
67
  return [slot0, slot1];
56
68
  }
@@ -3,7 +3,7 @@ import { MultisigClient } from './client.js';
3
3
  import type { Signer } from './types.js';
4
4
 
5
5
  // Mock the Miden SDK
6
- vi.mock('@demox-labs/miden-sdk', () => ({
6
+ vi.mock('@miden-sdk/miden-sdk', () => ({
7
7
  AccountId: {
8
8
  fromHex: vi.fn((hex: string) => ({ toString: () => hex })),
9
9
  },
@@ -76,8 +76,8 @@ describe('MultisigClient', () => {
76
76
  scheme: 'falcon',
77
77
  commitment: '0x' + '1'.repeat(64),
78
78
  publicKey: '0x' + '2'.repeat(64),
79
- signAccountIdWithTimestamp: vi.fn().mockReturnValue('0x' + 'a'.repeat(128)),
80
- signCommitment: vi.fn().mockReturnValue('0x' + 'b'.repeat(128)),
79
+ signAccountIdWithTimestamp: vi.fn().mockResolvedValue('0x' + 'a'.repeat(128)),
80
+ signCommitment: vi.fn().mockResolvedValue('0x' + 'b'.repeat(128)),
81
81
  };
82
82
  });
83
83
 
@@ -157,7 +157,7 @@ describe('MultisigClient', () => {
157
157
  expect(multisig.threshold).toBe(2);
158
158
  expect(multisig.signerCommitments).toEqual(['0x' + 'a'.repeat(64), '0x' + 'b'.repeat(64)]);
159
159
  expect(multisig.psmCommitment).toBe('0x' + 'c'.repeat(64));
160
- expect(multisig.account).toBeNull(); // Loaded accounts don't have the SDK Account
160
+ expect(multisig.account).not.toBeNull();
161
161
  });
162
162
 
163
163
  it('should throw if account not found on PSM', async () => {
package/src/client.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type WebClient, Account, AccountId } from '@demox-labs/miden-sdk';
1
+ import { type WebClient, Account, AccountId } from '@miden-sdk/miden-sdk';
2
2
  import { PsmHttpClient, type SignatureScheme } from '@openzeppelin/psm-client';
3
3
  import { Multisig } from './multisig.js';
4
4
  import { createMultisigAccount } from './account/index.js';
@@ -72,9 +72,9 @@ export class MultisigClient {
72
72
 
73
73
  const existingAccount = await this.webClient.getAccount(AccountId.fromHex(accountId));
74
74
  if (!existingAccount) {
75
- await this.webClient.newAccount(account, true);
75
+ await this.webClient.newAccount(account, true);
76
76
  }
77
77
 
78
- return new Multisig(null, config, this._psmClient, signer, this.webClient, accountId);
78
+ return new Multisig(account, config, this._psmClient, signer, this.webClient, accountId);
79
79
  }
80
80
  }
package/src/index.ts CHANGED
@@ -11,7 +11,14 @@ export {
11
11
 
12
12
  export { PsmHttpClient, PsmHttpError } from '@openzeppelin/psm-client';
13
13
 
14
- export { FalconSigner, EcdsaSigner } from './signer.js';
14
+ export { FalconSigner, EcdsaSigner, ParaSigner, MidenWalletSigner } from './signers/index.js';
15
+ export type { ParaSigningContext } from './signers/para.js';
16
+ export type { WalletSigningContext } from './signers/miden-wallet.js';
17
+ export { AuthDigest } from './utils/digest.js';
18
+ export { EcdsaFormat } from './utils/ecdsa.js';
19
+ export { PublicKeyFormat } from './utils/key.js';
20
+ export { wordToBytes } from './utils/word.js';
21
+ export { tryComputeEcdsaCommitmentHex, tryComputeCommitmentHex } from './utils/signature.js';
15
22
 
16
23
  export {
17
24
  createMultisigAccount,