@laceio/sdk 0.1.0 → 0.1.1-canary.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 (411) hide show
  1. package/README.md +1 -1
  2. package/dist/{Ed25519PublicKey-lvu1s54U.cjs → Address-AMKTo-dA.cjs} +17150 -61
  3. package/dist/{Ed25519PublicKey-CjnuAYRR.js → Address-_c_-9hLC.js} +16955 -264
  4. package/dist/{Bip32Account-r3KAhCgU.js → Bip32Account-CaW1zC9Y.js} +4 -5
  5. package/dist/{Bip32Account-Cz3h0ZUa.cjs → Bip32Account-DOaGmKpv.cjs} +4 -5
  6. package/dist/Cardano-B-gyqBBD.js +311 -0
  7. package/dist/Cardano-BQ_af0Y3.cjs +322 -0
  8. package/dist/Ed25519PublicKey-B3QcR0J2.cjs +88 -0
  9. package/dist/Ed25519PublicKey-DIE19xHg.js +83 -0
  10. package/dist/InMemoryKeyAgent-Bc_xZY-v.cjs +652 -0
  11. package/dist/InMemoryKeyAgent-D8T3vtXy.js +631 -0
  12. package/dist/{PaymentAddress-DhbtuYb7.cjs → PaymentAddress-B4n1KZMx.cjs} +1 -2
  13. package/dist/{PaymentAddress-xSmGUQ-8.js → PaymentAddress-Cml3EA1n.js} +1 -2
  14. package/dist/Percent-Cfuw5YyL.cjs +11 -0
  15. package/dist/Percent-DpvyJ_93.js +5 -0
  16. package/dist/SodiumBip32Ed25519-BaD-kjyx.cjs +380 -0
  17. package/dist/SodiumBip32Ed25519-DCikAMsl.js +363 -0
  18. package/dist/{TransactionBuilder-CeJTNzm-.cjs → TransactionBuilder-BakTJvsJ.cjs} +59 -89
  19. package/dist/{TransactionBuilder-DGNDM4kt.js → TransactionBuilder-D2ErwVWv.js} +5 -71
  20. package/dist/_md-6zV2Cme0.cjs +684 -0
  21. package/dist/_md-gbUqlhqd.js +399 -0
  22. package/dist/_web-crypto-random-bytes-BvzwTYPG.js +197 -0
  23. package/dist/acc-module-NL_8mEHH.cjs +27654 -0
  24. package/dist/acc-module-ur8CkBd1.js +27624 -0
  25. package/dist/account-call-BDdWqMAY.js +267 -0
  26. package/dist/account-call-BExOpZoo.js +3 -0
  27. package/dist/account-call-CYYoAS1E.cjs +314 -0
  28. package/dist/account-call-Cvj7viaq.cjs +4 -0
  29. package/dist/account-guards-BeKbV9D1.cjs +41 -0
  30. package/dist/account-guards-qnFXuXSE.js +36 -0
  31. package/dist/{activity-type.stable-ClO9j_PH.cjs → activity-type-BPXxdHBP.cjs} +2 -1
  32. package/dist/{activity-type.stable-Ml0SOYv9.js → activity-type-C1geyPsH.js} +2 -1
  33. package/dist/address-OxwXIwbF.js +15502 -0
  34. package/dist/address-book-address-validator-BqYM0Uyp.cjs +41 -0
  35. package/dist/{address-book-address-validator-BhqRfmlL.cjs → address-book-address-validator-CGIcqn5W.cjs} +5 -4
  36. package/dist/{address-book-address-validator-VqIOB8PY.js → address-book-address-validator-FkkYim3z.js} +6 -4
  37. package/dist/address-book-address-validator-RSx2Jozy.js +39 -0
  38. package/dist/address-lECYBd9-.cjs +13043 -0
  39. package/dist/{apply-vkey-witnesses-Ctzk7eye.cjs → apply-vkey-witnesses-1jyczTkw.cjs} +1 -1
  40. package/dist/{apply-vkey-witnesses-Dfo7XfhL.js → apply-vkey-witnesses-Byb40-yJ.js} +1 -1
  41. package/dist/artefact-loader-De9WJH1J.cjs +183 -0
  42. package/dist/artefact-loader-nlsYFjxU.js +160 -0
  43. package/dist/auto-dismiss-failure-on-success-BWJceNXd.cjs +37 -0
  44. package/dist/auto-dismiss-failure-on-success-Bpod-v4r.js +31 -0
  45. package/dist/bip32-EPpcFrpH.cjs +3851 -0
  46. package/dist/{bip32ed25519-D2In8WzR.cjs → bip32ed25519-CRiG-Kjg.cjs} +5 -4
  47. package/dist/{bip32ed25519-qsLH_eWO.js → bip32ed25519-E-fCUZNv.js} +6 -4
  48. package/dist/bip39-DZomfqeY.js +9 -0
  49. package/dist/bip39-MAck9iod.cjs +26 -0
  50. package/dist/bitcoin-data-provider-D0OT_Uiu.cjs +26 -0
  51. package/dist/bitcoin-data-provider-LN_8oamW.js +21 -0
  52. package/dist/bitcoin.cjs +48 -0
  53. package/dist/bitcoin.d.ts +29805 -1
  54. package/dist/bitcoin.js +22 -0
  55. package/dist/{blake2b-BGHUWMsV.js → blake2b-BL-eR5G2.js} +6 -4
  56. package/dist/{blake2b-DspUqw68.cjs → blake2b-Iy324FwH.cjs} +5 -4
  57. package/dist/{blockfrost-tx-submit-provider-BUEOmdvc.js → blockfrost-tx-submit-provider-BHDLgOIE.js} +9 -162
  58. package/dist/{blockfrost-tx-submit-provider-B5dWbdrZ.cjs → blockfrost-tx-submit-provider-BxC19smv.cjs} +7 -171
  59. package/dist/{blockingWithLatestFrom-BhaE7pnA.js → blockingWithLatestFrom-FUfZFEUG.js} +1 -1
  60. package/dist/{blockingWithLatestFrom-DkuT3G2a.cjs → blockingWithLatestFrom-bmCPgA3c.cjs} +1 -1
  61. package/dist/bn-BFq5a4dk.cjs +2553 -0
  62. package/dist/{SodiumBip32Ed25519-BEfo1Q9m.js → browser-D5jRKv_L.js} +4 -401
  63. package/dist/bytes.vo-CziaOsba.js +24 -0
  64. package/dist/bytes.vo-hecRu3YZ.cjs +35 -0
  65. package/dist/{cardano-network-id-to-network-type-PXvn1ycQ.cjs → cardano-network-id-to-network-type-BwG_d6QP.cjs} +1 -1
  66. package/dist/{cardano-network-id-to-network-type-DHgKhDAK.js → cardano-network-id-to-network-type-CYJheetp.js} +1 -1
  67. package/dist/{cardano-network-id.vo-CbNNKd-k.cjs → cardano-network-id.vo-C5VuBXT3.cjs} +2 -2
  68. package/dist/{cardano-network-id.vo-CTYe-Oix.js → cardano-network-id.vo-CeLJqmb_.js} +2 -2
  69. package/dist/{cardano-tx-id.vo-BMwemq5x.js → cardano-tx-id.vo-DJ70NC0-.js} +1 -1
  70. package/dist/{cardano-tx-id.vo-NY-gCOWJ.cjs → cardano-tx-id.vo-lnyO9XaW.cjs} +1 -1
  71. package/dist/cardano.cjs +31 -24
  72. package/dist/cardano.d.ts +27612 -8128
  73. package/dist/cardano.js +21 -13
  74. package/dist/client-Bw2foG5E.cjs +808 -0
  75. package/dist/const-BB3MccLt.js +153 -0
  76. package/dist/{const-BErUlcZw.cjs → const-BWBAzOmN.cjs} +1 -1
  77. package/dist/const-CSWmOyzn.cjs +42 -0
  78. package/dist/{const-Dy8Ctnpd.cjs → const-D3mCkwrM.cjs} +5 -5
  79. package/dist/const-DW7z3R5k.js +13 -0
  80. package/dist/{const-DeUA7zYl.js → const-DbuUHSzR.js} +5 -5
  81. package/dist/const-DgBzKfz6.cjs +31995 -0
  82. package/dist/{const-DVW6DGkZ.js → const-xGSNCtwQ.js} +1 -1
  83. package/dist/contract-2KVxlHyu.cjs +189 -0
  84. package/dist/contract-DjQqqZLo.js +171 -0
  85. package/dist/create-add-accounts-2mQA0ST2.js +102 -0
  86. package/dist/create-add-accounts-B6mR2NMn.cjs +114 -0
  87. package/dist/{delegation-tx-builder-CF0VunDW.cjs → delegation-tx-builder-Cp30jtj9.cjs} +9 -8
  88. package/dist/{delegation-tx-builder-C8LQxU2R.js → delegation-tx-builder-DUMikSTg.js} +9 -7
  89. package/dist/{deregistration-tx-builder-DcUXA3Ls.cjs → deregistration-tx-builder-B-ZeY-dR.cjs} +10 -9
  90. package/dist/{deregistration-tx-builder-BOBPP8m_.js → deregistration-tx-builder-CRLrK99U.js} +10 -8
  91. package/dist/device-commitment-hex.vo-BIUYUNz1.cjs +31 -0
  92. package/dist/device-commitment-hex.vo-D9FsYLn7.js +26 -0
  93. package/dist/device-key-BToCoS4D.js +2394 -0
  94. package/dist/device-key-D6euvxFi.cjs +2489 -0
  95. package/dist/device-readers-BPDz2oqa.js +3 -0
  96. package/dist/device-readers-CVqmvmLZ.js +145 -0
  97. package/dist/device-readers-DzkDMjPn.cjs +7 -0
  98. package/dist/device-readers-XMZMfFvZ.cjs +168 -0
  99. package/dist/dist-B00GN41m.js +141 -0
  100. package/dist/dist-BA1xnF9O.cjs +4413 -0
  101. package/dist/dist-BmHOXLe8.cjs +3814 -0
  102. package/dist/dist-Br0OVXKt.cjs +535 -0
  103. package/dist/dist-C1JK9C1I.cjs +3452 -0
  104. package/dist/dist-DKEViNEI.cjs +1306 -0
  105. package/dist/dist-Dwqx184a.cjs +43175 -0
  106. package/dist/dist-MJof_Ky1.cjs +145 -0
  107. package/dist/dist-p84sVVJ9.cjs +1394 -0
  108. package/dist/{earn-rewards-tx-builder-BRlTueHS.js → earn-rewards-tx-builder-8G_rouIk.js} +9 -7
  109. package/dist/{earn-rewards-tx-builder-RgO0QUY8.cjs → earn-rewards-tx-builder-cOUNV58E.cjs} +9 -8
  110. package/dist/enc-key-circuits-0Dud78IB.js +13 -0
  111. package/dist/enc-key-circuits-yjPHbuo_.cjs +24 -0
  112. package/dist/english-BZ_ebp2-.cjs +2057 -0
  113. package/dist/envelopes-BmL7onAK.cjs +1721 -0
  114. package/dist/envelopes-CfWTR2uy.js +1620 -0
  115. package/dist/errors-BA3b8aVu.cjs +584 -0
  116. package/dist/errors-pkQdxW-7.js +392 -0
  117. package/dist/experimental.cjs +6875 -0
  118. package/dist/experimental.d.ts +63670 -0
  119. package/dist/experimental.js +6725 -0
  120. package/dist/fees-6C2uEWFK.js +653 -0
  121. package/dist/fees-DtC71fOx.cjs +820 -0
  122. package/dist/gated-call-DLC5PBlN.cjs +736 -0
  123. package/dist/gated-call-DQhT7v2J.js +695 -0
  124. package/dist/gated-call-DdNOQh_Z.js +3 -0
  125. package/dist/gated-call-wAB15GtN.cjs +4 -0
  126. package/dist/grant-circuits-BKJrMSNo.cjs +49 -0
  127. package/dist/grant-circuits-D53wmGyr.js +26 -0
  128. package/dist/grant-rules-fYt80KB1.cjs +7114 -0
  129. package/dist/grant-rules-rG1kJq6l.js +6833 -0
  130. package/dist/grant-status-CDmZpx32.js +296 -0
  131. package/dist/grant-status-CQtwjLsA.cjs +337 -0
  132. package/dist/grants-C5wpNvZJ.cjs +266 -0
  133. package/dist/grants-DY3sN9We.cjs +16 -0
  134. package/dist/grants-ngFtS52g.js +213 -0
  135. package/dist/grants-qpXC94Rk.js +4 -0
  136. package/dist/{group-cardano-addresses-by-account-C-1GHUu8.cjs → group-cardano-addresses-by-account-BGOtPV-Y.cjs} +4 -40
  137. package/dist/{group-cardano-addresses-by-account-p4dXmCoj.js → group-cardano-addresses-by-account-TqvESg9x.js} +6 -37
  138. package/dist/{guarded-transaction-signer-DZSGHp1K.js → guarded-transaction-signer-BbVDE9Nn.js} +12 -18
  139. package/dist/{guarded-transaction-signer-BLSezbfV.cjs → guarded-transaction-signer-DTLjAkif.cjs} +26 -26
  140. package/dist/hex-BVtOKJki.cjs +263 -0
  141. package/dist/hex-CGYJPK_Z.js +192 -0
  142. package/dist/http-client-B7_kBTYn.js +155 -0
  143. package/dist/http-client-DYQ_7Rdf.cjs +167 -0
  144. package/dist/identity-DxPhxkZs.js +239 -0
  145. package/dist/identity-y41Yle03.cjs +274 -0
  146. package/dist/in-memory-wallet-integration-5BKiAvPT.js +20861 -0
  147. package/dist/{in-memory-wallet-integration-CUTa68ET.js → in-memory-wallet-integration-BCOqDgbt.js} +10 -107
  148. package/dist/in-memory-wallet-integration-Bi8I9Dso.js +128 -0
  149. package/dist/in-memory-wallet-integration-Bsl2ONua.cjs +239 -0
  150. package/dist/in-memory-wallet-integration-DZ0CAyvY.cjs +20865 -0
  151. package/dist/{in-memory-wallet-integration-Dw_S7amX.cjs → in-memory-wallet-integration-DsFm8gLk.cjs} +21 -112
  152. package/dist/{in-memory-wallet-integration-Z4Bp_DTv.cjs → in-memory-wallet-integration-aW_SF-go.cjs} +8 -5
  153. package/dist/{in-memory-wallet-integration-B6cbAlvD.js → in-memory-wallet-integration-mIEc8EfR.js} +9 -5
  154. package/dist/index.cjs +95 -58
  155. package/dist/index.d.ts +45146 -13439
  156. package/dist/index.js +55 -28
  157. package/dist/{init-CVi8J0zk.cjs → init-5SfWgCYD.cjs} +3 -3
  158. package/dist/{init-Ci7aqWCf2.cjs → init-8NVWbo302.cjs} +2 -2
  159. package/dist/init-B-C7n6u6.js +5 -0
  160. package/dist/{init-BFMWRf-L.js → init-B-ppfGO-.js} +1 -1
  161. package/dist/{init-IiR093Jw.cjs → init-B2OUhY5T.cjs} +2 -2
  162. package/dist/{init-DXnus199.cjs → init-B6Eg_o6G.cjs} +5 -5
  163. package/dist/{init-4hDl5bpr.js → init-BAWMHL1k.js} +2 -2
  164. package/dist/init-BC2CZZOu2.cjs +2002 -0
  165. package/dist/{init-a228hXnS.cjs → init-BF-a2p6E.cjs} +65 -73
  166. package/dist/{init-fFirX8OY.cjs → init-BFxlQAD8.cjs} +1 -1
  167. package/dist/init-BJE1ry0O.js +17 -0
  168. package/dist/{init-BVnI4z2J.js → init-BPKBVOHU.js} +2 -2
  169. package/dist/{init-bdqZBd-o.js → init-BSP_xcpB.js} +2 -2
  170. package/dist/{init-CFNOn3lo.js → init-BSd7mznK.js} +3 -3
  171. package/dist/{init-MjR4swi6.js → init-BUJTT0MN.js} +36 -43
  172. package/dist/init-BUpFzYsD.cjs +143 -0
  173. package/dist/{init-BvpYHyLH.cjs → init-BZ-WyAIL.cjs} +3 -3
  174. package/dist/init-BZdfdLX7.js +422 -0
  175. package/dist/{init-CJeOys1w.cjs → init-B_HWNXMD.cjs} +2 -2
  176. package/dist/init-BbIMt6xU.cjs +6 -0
  177. package/dist/{init-BYdN1aqE.cjs → init-BewG6swt.cjs} +2 -2
  178. package/dist/{init-Tpn9VkFu.cjs → init-BpwlQ6wF.cjs} +1 -1
  179. package/dist/{init-D5-P0HXK.js → init-BtQOzUjX.js} +1 -1
  180. package/dist/{init-BvGz3qUd2.js → init-CCTscPaY2.js} +2 -2
  181. package/dist/{init-D4hPipCD.cjs → init-CH0yyBof.cjs} +1 -1
  182. package/dist/{init-BX0AZAVH2.js → init-CS98M3iD.js} +2 -2
  183. package/dist/init-CaIkrXal.cjs +121 -0
  184. package/dist/init-CkZy4IMf.cjs +107 -0
  185. package/dist/{init-Drr2f_Pr.js → init-CmfcY7SV.js} +1 -1
  186. package/dist/{init-Kf3_OLv6.js → init-CnJAlks_.js} +1 -1
  187. package/dist/{init-Cdjt_z-b.cjs → init-CqqmtAIK.cjs} +4 -4
  188. package/dist/{init-Bb0avZeZ.js → init-Cu2znmIc.js} +5 -5
  189. package/dist/{init-lcaUSOOG.js → init-CwLZXfTl.js} +1 -1
  190. package/dist/init-Cz5LAizN.js +2001 -0
  191. package/dist/init-D4WM3-Mn.cjs +18 -0
  192. package/dist/init-DJzEpODO.js +2373 -0
  193. package/dist/init-DMi2FGpf.cjs +424 -0
  194. package/dist/{init-BTYLMF9F2.cjs → init-DexLSprL2.cjs} +258 -61
  195. package/dist/init-DfKPgD21.js +106 -0
  196. package/dist/init-DgzRsI-C.js +141 -0
  197. package/dist/init-Dj4Cn7-P.js +4789 -0
  198. package/dist/{init-DFwhgert.cjs → init-DnELgrhn.cjs} +1 -1
  199. package/dist/init-DypZuehC.cjs +2374 -0
  200. package/dist/{init-CX_zLXc6.js → init-IBnizp1U.js} +5 -5
  201. package/dist/init-MDKB6tGI2.cjs +4790 -0
  202. package/dist/{init-DbZ5byj42.js → init-TbB38KNt2.js} +258 -60
  203. package/dist/{init-BgrY29gW.js → init-dsYkC_0B.js} +4 -4
  204. package/dist/{init-DvVgKCaP2.cjs → init-kVOOiU0-.cjs} +2 -2
  205. package/dist/{init-B5BsI3DR.cjs → init-kvn5FlPS.cjs} +7 -7
  206. package/dist/init-vfy9DW_E.js +119 -0
  207. package/dist/{init-BE_6Jyc4.js → init-w7xl6LsP.js} +3 -3
  208. package/dist/{init-DEsWVyn5.cjs → init-wgiBUmyW.cjs} +1 -1
  209. package/dist/{is-retriable-error-DWv_ob-f.js → is-retriable-error-CmFR20pe.js} +1 -1
  210. package/dist/{is-retriable-error-Dtb4JGjd.cjs → is-retriable-error-D2yo0_lS.cjs} +1 -1
  211. package/dist/jubjub-authoriser-BBJcD2uC.js +85 -0
  212. package/dist/jubjub-authoriser-BlXt4Z-D.cjs +86 -0
  213. package/dist/key-source-CcLTx8HK.js +2761 -0
  214. package/dist/key-source-D2tTAag-.cjs +806 -0
  215. package/dist/{key-value-store-DTX1quRS.js → key-value-store-DZcNDB3n.js} +1 -1
  216. package/dist/{key-value-store-B-XRIwaM.cjs → key-value-store-Htj4RgMe.cjs} +1 -1
  217. package/dist/keyDerivation-DcKRUCVh.cjs +274 -0
  218. package/dist/keyDerivation-QGesIMbS.js +4077 -0
  219. package/dist/{lace-context-FpU3iG3f.cjs → lace-context-BN0b_ury.cjs} +4 -4
  220. package/dist/{lace-context-BQvvxVLm.js → lace-context-DMRJ87Vg.js} +4 -4
  221. package/dist/lib-BC-62Byh.cjs +2359 -0
  222. package/dist/lib-JYqcAX0c.js +2354 -0
  223. package/dist/midnight-account-id.vo--Vcx34Xk.cjs +10 -0
  224. package/dist/midnight-account-id.vo-BuB8fiVO.js +5 -0
  225. package/dist/midnight-engine-B7D2hbHo.js +5 -0
  226. package/dist/midnight-engine-D5ikN_5F.cjs +6 -0
  227. package/dist/midnight-wallet-BOdFD6SX.cjs +24 -0
  228. package/dist/midnight-wallet-CAqZrNVe.js +18 -0
  229. package/dist/midnight.cjs +1412 -0
  230. package/dist/midnight.d.ts +28609 -0
  231. package/dist/midnight.js +1355 -0
  232. package/dist/modules-cardano-4IgYsKeN.js +999 -0
  233. package/dist/modules-cardano-Baqj2GZH.cjs +1112 -0
  234. package/dist/node-relay-BEtqi_vU.cjs +49 -0
  235. package/dist/node-relay-CkgpDObu.js +48 -0
  236. package/dist/outputs-5qdW8s-f.js +196 -0
  237. package/dist/outputs-BEM1GPMf.cjs +339 -0
  238. package/dist/{SodiumBip32Ed25519-BQUcrQWX.cjs → pbkdf2-B1veireP.cjs} +6 -411
  239. package/dist/pending-operation-CfTUNQVD.cjs +26 -0
  240. package/dist/pending-operation-Ljijb1Uh.js +21 -0
  241. package/dist/providers--Hg9iF5v.cjs +366 -0
  242. package/dist/providers-DQ5_3h2l.js +343 -0
  243. package/dist/redacted-4SJPqt-G.js +81 -0
  244. package/dist/redacted-DwxIDdIF.cjs +86 -0
  245. package/dist/{reselect-DPML1uFN.cjs → reselect-kP4DaAII.cjs} +1 -1
  246. package/dist/{retry-config-oNtfdyrG.cjs → retry-config-BGv5q5QM.cjs} +1 -1
  247. package/dist/{retry-config-VdbuqBsI.js → retry-config-Bu5Yn5ua.js} +1 -1
  248. package/dist/safe-buffer-CqGpSFCQ.js +43 -0
  249. package/dist/safe-buffer-DbXbwhUQ.cjs +48 -0
  250. package/dist/sdk-Bm9-P0L-.cjs +1445 -0
  251. package/dist/sdk-Cf__6dDe.js +1249 -0
  252. package/dist/sdk-init-9TG1ZvHF.cjs +3795 -0
  253. package/dist/sdk-init-Ce3mD-8F.js +1047 -0
  254. package/dist/secret-box-CSmRp6Tt.js +3777 -0
  255. package/dist/secret-box-ZfbYwBgS.cjs +6970 -0
  256. package/dist/send-proof-progress-DtAcrMP6.cjs +33 -0
  257. package/dist/send-proof-progress-Dx2cUz1B.js +22 -0
  258. package/dist/sha2-DaRJZOjk.cjs +390 -0
  259. package/dist/sha2-c4sB6peD.js +378 -0
  260. package/dist/side-effects-C3BhLrdP.js +768 -0
  261. package/dist/side-effects-DG0R-KFc.cjs +804 -0
  262. package/dist/sign-bitcoin-transaction-with-seed-C7vq9om8.js +147 -0
  263. package/dist/sign-bitcoin-transaction-with-seed-Ds1dwzan.cjs +158 -0
  264. package/dist/signer--2I6poMD.js +2 -0
  265. package/dist/signer-CX21Ups_.cjs +121 -0
  266. package/dist/signer-Cnn9q9oY.js +92 -0
  267. package/dist/signer-DbSxjk0F.cjs +7 -0
  268. package/dist/signer-factory-B5oFuUZ-.cjs +130 -0
  269. package/dist/signer-factory-BAt8FPNc.cjs +281 -0
  270. package/dist/signer-factory-BGE4nL4k.js +129 -0
  271. package/dist/signer-factory-C4pgsiJi.js +281 -0
  272. package/dist/{signer-factory-DySc1wRX.cjs → signer-factory-D95jQIPV.cjs} +9 -6
  273. package/dist/{signer-factory-D4HrwFPl.js → signer-factory-PrpsGX-8.js} +10 -6
  274. package/dist/{slice-BZTQgYSs.js → slice-B-xJcuT1.js} +4 -4
  275. package/dist/slice-B4QOYaOG.cjs +105 -0
  276. package/dist/{slice-CtIMw2YT.cjs → slice-B9QKuhi0.cjs} +3 -3
  277. package/dist/{slice-Bhwmqn1p.cjs → slice-Bf4enJKZ.cjs} +8 -8
  278. package/dist/{slice-DaNVz7_l.js → slice-ByNWnxKS.js} +8 -8
  279. package/dist/{slice-C2UDQrdt.js → slice-C1zOeseG.js} +449 -355
  280. package/dist/{slice-DFLyKRm5.cjs → slice-C4toRM6A.cjs} +2 -2
  281. package/dist/{slice-Cx4dULDA.cjs → slice-C8YVv4Qn.cjs} +1 -1
  282. package/dist/{slice-jnpOgiSZ.cjs → slice-CaMfviYu.cjs} +3 -3
  283. package/dist/{slice-DFvrwUur.js → slice-CgeRsYRg.js} +6 -6
  284. package/dist/{slice-zNEspZND.js → slice-D0VzpMbY.js} +2 -2
  285. package/dist/slice-D14F78Ca.js +87 -0
  286. package/dist/slice-DJelVt0i.js +9013 -0
  287. package/dist/{slice-F6A1YKOF.cjs → slice-DLflttAu.cjs} +479 -366
  288. package/dist/{slice-C96EdeY1.js → slice-DcO-iNz2.js} +1 -1
  289. package/dist/{slice-C19quNWM.cjs → slice-DimtxfAT.cjs} +2 -2
  290. package/dist/{slice-KiNoGwD9.js → slice-DlTEqIoI.js} +1 -1
  291. package/dist/{slice-ws8PccRX.js → slice-Dn0WojD7.js} +3 -3
  292. package/dist/{slice-BLSxLmie.cjs → slice-Dongunf7.cjs} +4 -4
  293. package/dist/{slice-B6vPum19.js → slice-DpufJAjJ.js} +2 -2
  294. package/dist/{slice-exhhmucR.cjs → slice-DtitVc9L.cjs} +7 -7
  295. package/dist/slice-RQRLciQc.cjs +9031 -0
  296. package/dist/{slice-Bjj2t2ut.cjs → slice-WMMMc1Xv.cjs} +2 -2
  297. package/dist/slice-a8VuIqzS.cjs +378 -0
  298. package/dist/slice-bRASyM-m.js +354 -0
  299. package/dist/{slice-CBFrgHSH.js → slice-hNyKbDry.js} +3 -3
  300. package/dist/{InMemoryKeyAgent-pyB2gA-N.cjs → src-BayYMIjw.cjs} +20 -8228
  301. package/dist/{InMemoryKeyAgent-D-3HejxN.js → src-CgINPlSx.js} +29 -4811
  302. package/dist/store-AUlTfcI_.js +37 -0
  303. package/dist/store-C7AneHEY.cjs +66 -0
  304. package/dist/submit-BuBCVi-l.cjs +87 -0
  305. package/dist/submit-D37lxFrK.js +70 -0
  306. package/dist/submit-bitcoin-tx-CE0AD-xH.js +983 -0
  307. package/dist/submit-bitcoin-tx-CK10OTfQ.cjs +1049 -0
  308. package/dist/{subtractValueQuantities-DfZg6oiG.js → subtractValueQuantities-BuDJVxq6.js} +3 -22
  309. package/dist/{subtractValueQuantities-C8qDTtgH.cjs → subtractValueQuantities-CqR606HV.cjs} +2 -32
  310. package/dist/{sync-operation-utils-BrQyWFS_.cjs → sync-operation-utils--Z_IQfyW.cjs} +0 -66
  311. package/dist/{sync-operation-utils-CAaCGvEN.js → sync-operation-utils-BimBpvI3.js} +1 -37
  312. package/dist/token-id-mapper-BVau2RXa.js +16 -0
  313. package/dist/token-id-mapper-CSeLzM4o.cjs +18 -0
  314. package/dist/{token-id-mapper-pDaTxpw2.js → token-id-mapper-ClBeIdJR.js} +2 -2
  315. package/dist/{token-id-mapper-DYcd8hhQ.cjs → token-id-mapper-D0wFdbOy.cjs} +2 -2
  316. package/dist/types-46lh8O9r.js +33 -0
  317. package/dist/types-BhhNR1_B.cjs +50 -0
  318. package/dist/types-BhzypKMS.cjs +15 -0
  319. package/dist/types-DTE1ctDB.js +10 -0
  320. package/dist/types-DXSxXGz0.js +12 -0
  321. package/dist/types-Dls6Z5gV.cjs +23 -0
  322. package/dist/{util-P4PX2muj.cjs → util-D1YlKzrc.cjs} +2 -2
  323. package/dist/{util-CQSJU0wT.js → util-DHxtzUzY.js} +2 -2
  324. package/dist/{utils-Bv4OHT4S.cjs → utils-DYf4iZKX.cjs} +7 -1
  325. package/dist/{utils-DrtzChYN.js → utils-DcnoETEP.js} +2 -2
  326. package/dist/utils-Du0YXRcU.cjs +112 -0
  327. package/dist/utils-fF_rnZe3.js +65 -0
  328. package/dist/v8Signatures-ClGpA8mS.cjs +71 -0
  329. package/dist/{vote-delegation-tx-builder-69gOEkCB.cjs → vote-delegation-tx-builder-BjZxCOd3.cjs} +9 -8
  330. package/dist/{vote-delegation-tx-builder-BRJ_pf-c.js → vote-delegation-tx-builder-DRJwPXkD.js} +9 -7
  331. package/dist/watch-FGE4B_Ge.js +13056 -0
  332. package/dist/watch-imlsRZDp.cjs +52207 -0
  333. package/package.json +95 -3
  334. package/dist/Address-4KjeDt_x.cjs +0 -17269
  335. package/dist/Address-_VPkf7Xh.js +0 -17101
  336. package/dist/account-guards.stable-BKyYPj4z.cjs +0 -10
  337. package/dist/account-guards.stable-BdmQ43vC.js +0 -5
  338. package/dist/init-BR9ZIbED.cjs +0 -378
  339. package/dist/init-B_k1RUN_.cjs +0 -21
  340. package/dist/init-Bs3b5ZQH.js +0 -378
  341. package/dist/init-ChfcrHgG2.cjs +0 -4354
  342. package/dist/init-D1uUMMpG.js +0 -19
  343. package/dist/init-DV1OSZiK.js +0 -4352
  344. package/dist/modules-cardano-BINzpXpk.js +0 -5454
  345. package/dist/modules-cardano-Dt8OwoQb.cjs +0 -5640
  346. package/dist/slice-Caf98m0d2.js +0 -107
  347. package/dist/slice-PM6llajQ2.cjs +0 -125
  348. /package/dist/{BigIntMath-CoJWXt1h.cjs → BigIntMath-CBciEQn2.cjs} +0 -0
  349. /package/dist/{BigIntMath-BWUJOsOW.js → BigIntMath-X3EniYDo.js} +0 -0
  350. /package/dist/{ChainId-sdLmlIRk.cjs → ChainId-CNPSU9nn.cjs} +0 -0
  351. /package/dist/{ChainId-CKbm87yQ.js → ChainId-CeoG8Sov.js} +0 -0
  352. /package/dist/{_polyfill-node.process-4fnlkbBi.cjs → _polyfill-node.process-5UxyjoHG.cjs} +0 -0
  353. /package/dist/{account-id.vo-Xpgnu-av.cjs → account-id.vo-DYZBZQsz.cjs} +0 -0
  354. /package/dist/{account-id.vo-DP0BtOoF.js → account-id.vo-KDTWJ-W5.js} +0 -0
  355. /package/dist/{actions-BNagEO6m.cjs → actions-BnHFVSr_.cjs} +0 -0
  356. /package/dist/{actions-BWTyAr7B.js → actions-Cwj0ApZf.js} +0 -0
  357. /package/dist/{asyncoption-po7-RiA5.cjs → asyncoption-CYcZNBRM.cjs} +0 -0
  358. /package/dist/{asyncoption-CzIVH5Y1.js → asyncoption-DZQGfznq.js} +0 -0
  359. /package/dist/{bignum.vo-DhhZ9HP1.js → bignum.vo-Co6tMH2q.js} +0 -0
  360. /package/dist/{bignum.vo-CpkrIXjH.cjs → bignum.vo-Du-bpvar.cjs} +0 -0
  361. /package/dist/{blockchain-network-id.vo-CbgrAY_K.js → blockchain-network-id.vo-C6Jowh8t.js} +0 -0
  362. /package/dist/{blockchain-network-id.vo-5iC6Kffo.cjs → blockchain-network-id.vo-DEQ14dYj.cjs} +0 -0
  363. /package/dist/{composite-signer-factory-DABpCe1_.js → composite-signer-factory-D9RWY-1V.js} +0 -0
  364. /package/dist/{composite-signer-factory-BizuNPP7.cjs → composite-signer-factory-v4Pxn8bA.cjs} +0 -0
  365. /package/dist/{error-ggOihIfv.cjs → error-B6wj9nPv.cjs} +0 -0
  366. /package/dist/{error-DHKO2iS4.js → error-CvEYL98P.js} +0 -0
  367. /package/dist/{esm-browser-DnXNvpcn.cjs → esm-browser-CZbMeVod.cjs} +0 -0
  368. /package/dist/{esm-browser-BBVQuyQv.js → esm-browser-DpAD_RKv.js} +0 -0
  369. /package/dist/{feature-flag-key.vo-DoGK5Bfh.js → feature-flag-key.vo-9reURsOQ.js} +0 -0
  370. /package/dist/{feature-flag-key.vo-CP1Z9s8e.cjs → feature-flag-key.vo-KTIdnzYX.cjs} +0 -0
  371. /package/dist/{first-state-of-status-Bx4-QQ5m.cjs → first-state-of-status-9ICeDNSa.cjs} +0 -0
  372. /package/dist/{first-state-of-status-D7XzEuSa.js → first-state-of-status-BscbKj_t.js} +0 -0
  373. /package/dist/{init-ZX90nEJe2.js → init-B0hAl9w6.js} +0 -0
  374. /package/dist/{init-4319psUJ.cjs → init-BT67pd9x.cjs} +0 -0
  375. /package/dist/{init-AFUM1TSg.js → init-CHk1fvJ2.js} +0 -0
  376. /package/dist/{init-Dt1Xifg_2.cjs → init-CSURGyW_.cjs} +0 -0
  377. /package/dist/{init-CTQ2g6Xt.js → init-DtxxFaCx.js} +0 -0
  378. /package/dist/{init-BNewLCqw.cjs → init-xzZPlQwB.cjs} +0 -0
  379. /package/dist/{is-redux-persist-state-DxJSsvxB.cjs → is-redux-persist-state-C5luvPEH.cjs} +0 -0
  380. /package/dist/{is-redux-persist-state-Bl2n4VMr.js → is-redux-persist-state-CjcqyCoh.js} +0 -0
  381. /package/dist/{isNotNil-CZxBMfL5.js → isNotNil-Be7gCY0m.js} +0 -0
  382. /package/dist/{isNotNil-C_SO1tcC.cjs → isNotNil-CrYIUFry.cjs} +0 -0
  383. /package/dist/{logging-BvMDKgl0.js → logging-BAMMfn5j.js} +0 -0
  384. /package/dist/{logging-Bh9ikph3.cjs → logging-CbxgIX9V.cjs} +0 -0
  385. /package/dist/{metadatum-B-sxBnSY.cjs → metadatum-BGvFqGPt.cjs} +0 -0
  386. /package/dist/{metadatum-Ego4jVas.js → metadatum-BVocMYy_.js} +0 -0
  387. /package/dist/{repo-slice-BzZQUTj8.cjs → repo-slice-BB_W-6OL.cjs} +0 -0
  388. /package/dist/{repo-slice-vCcQJotS.js → repo-slice-BQlssw9M.js} +0 -0
  389. /package/dist/{reselect-BPkMzw3k.js → reselect-JIgawvPe.js} +0 -0
  390. /package/dist/{serializable-BxFUShKY.js → serializable-F7OtYl8d.js} +0 -0
  391. /package/dist/{serializable-DWgkHhv_.cjs → serializable-n3UoxbZc.cjs} +0 -0
  392. /package/dist/{slice-DY-DNtSi.js → slice-5dGBAz6w.js} +0 -0
  393. /package/dist/{slice-BEFoeqgr.cjs → slice-BzJgg9FS.cjs} +0 -0
  394. /package/dist/{src-CPmX4KUh.cjs → src-CeBNkonz.cjs} +0 -0
  395. /package/dist/{src-XOZXPKxe.js → src-Cv1ifqbe.js} +0 -0
  396. /package/dist/{time-CQPt4FdU.js → time-ByoKevdZ.js} +0 -0
  397. /package/dist/{time-Blvoyh9G.cjs → time-qD7edGU0.cjs} +0 -0
  398. /package/dist/{time.vo-Xln4yGBU.js → time.vo-C17-tYq3.js} +0 -0
  399. /package/dist/{time.vo-rwWwJzmP.cjs → time.vo-TmYE-_Y2.cjs} +0 -0
  400. /package/dist/{toEmpty-CzmoZVLN.cjs → toEmpty-Db6V94Mf.cjs} +0 -0
  401. /package/dist/{toEmpty-DzLd-ZCi.js → toEmpty-Djj-QbpI.js} +0 -0
  402. /package/dist/{token-id.vo-l8fuSpem.cjs → token-id.vo-CZ622zcZ.cjs} +0 -0
  403. /package/dist/{token-id.vo-DMKSaMlc.js → token-id.vo-IDI9C_Qm.js} +0 -0
  404. /package/dist/{types-B61DQoFW.js → types-By-XeXWg.js} +0 -0
  405. /package/dist/{types-CUC-Kcqh.cjs → types-Cn6WlQV6.cjs} +0 -0
  406. /package/dist/{util-BV3iGOrz.cjs → util-Cp1h58uD.cjs} +0 -0
  407. /package/dist/{util-BsQKLorV.js → util-DHppXj7U.js} +0 -0
  408. /package/dist/{util-selector-CKIyoAOz.js → util-selector-BWmHpo92.js} +0 -0
  409. /package/dist/{util-selector-C9H5RsNw.cjs → util-selector-glXkO-jR.cjs} +0 -0
  410. /package/dist/{while-active-CNXeLxre.js → while-active-CDBnUlQA.js} +0 -0
  411. /package/dist/{while-active-BsDWSNrO.cjs → while-active-I2TlHtm7.cjs} +0 -0
@@ -0,0 +1,266 @@
1
+ const require_bytes_vo = require("./bytes.vo-hecRu3YZ.cjs");
2
+ const require_grant_rules = require("./grant-rules-fYt80KB1.cjs");
3
+ const require_errors = require("./errors-BA3b8aVu.cjs");
4
+ const require_grant_circuits = require("./grant-circuits-BKJrMSNo.cjs");
5
+ const require_acc_module = require("./acc-module-NL_8mEHH.cjs");
6
+ //#region ../../packages/module/passport-account/src/acc/grants.ts
7
+ /** Domain tag of the origin hash; it fills its 32-byte pad exactly. */
8
+ const GRANT_ORIGIN_TAG = "midnight:account:grant:origin:v1";
9
+ const ORIGIN_TAG_LENGTH = 32;
10
+ const SCOPE_SALT_LENGTH = 32;
11
+ const GRANT_SLOT_COUNT = 256;
12
+ const SCOPE_ARG_COUNT = 16;
13
+ /**
14
+ * The signature envelope a secp256k1 grant is bound to: plain ECDSA over
15
+ * the SHA-256 digest of the challenge, the only envelope the contract
16
+ * admits for a spend grant.
17
+ */
18
+ const K256_GRANT_ENVELOPE = 0n;
19
+ /** Lays the scope out in the circuit's declaration order. */
20
+ const scopeArgs = (scope) => [
21
+ scope.opWithdrawUnshielded,
22
+ scope.opWithdrawShielded,
23
+ scope.opWithdrawShieldedToContract,
24
+ scope.read,
25
+ scope.color,
26
+ scope.recipientKind,
27
+ scope.recipient,
28
+ scope.maxCoinValue,
29
+ scope.perCallCap,
30
+ scope.cap,
31
+ scope.expiresAt,
32
+ scope.rpIdHash,
33
+ scope.readPkHash,
34
+ scope.windowLen,
35
+ scope.windowCap,
36
+ {
37
+ is_some: scope.caller !== void 0,
38
+ value: { bytes: scope.caller ?? require_grant_rules.zero32() }
39
+ }
40
+ ];
41
+ /**
42
+ * The salted digest of the plaintext scope, the single element through
43
+ * which the issue challenge binds the whole scope, produced by the
44
+ * contract's own pure circuit.
45
+ */
46
+ const scopeDigest = (scopeSalt, args) => require_acc_module.pureCircuits.derive_grant_scope_digest(scopeSalt, ...args);
47
+ /**
48
+ * The commitment the contract stores for a grant's object: the colour,
49
+ * recipient kind and value, and coin bound of its circuit scope, hidden
50
+ * under the scope salt, as lowercase hex, produced by the contract's own
51
+ * pure circuit.
52
+ */
53
+ const grantObjectCommit = (scopeSalt, scope) => require_bytes_vo.HexBytes.fromByteArray(require_acc_module.pureCircuits.derive_grant_object_commit(scopeSalt, scope.color, scope.recipientKind, scope.recipient, scope.maxCoinValue));
54
+ /**
55
+ * The origin hash that enters a grant id: SHA-256 of the origin tag padded
56
+ * to 32 bytes followed by the raw UTF-8 bytes of the client id. Computed
57
+ * off chain only, so no circuit exports it. For this module the client id
58
+ * is the relying party id of the consumer issuing the grant.
59
+ */
60
+ const originHash = async (clientId) => {
61
+ const encoder = new TextEncoder();
62
+ const tag = new Uint8Array(ORIGIN_TAG_LENGTH);
63
+ tag.set(encoder.encode(GRANT_ORIGIN_TAG));
64
+ const client = encoder.encode(clientId);
65
+ const preimage = new Uint8Array(tag.length + client.length);
66
+ preimage.set(tag);
67
+ preimage.set(client, tag.length);
68
+ return new Uint8Array(await crypto.subtle.digest("SHA-256", preimage));
69
+ };
70
+ /** A grant id from the bytes a derivation circuit returns. */
71
+ const grantIdOf = (id) => require_grant_rules.GrantId(require_bytes_vo.HexBytes.fromByteArray(id));
72
+ /**
73
+ * The identity of a grant: the contract's own commitment to the account,
74
+ * the grantee key, the origin hash and the slot, which keys the record in
75
+ * the grants map. Each grantee scheme has its own derivation, and a
76
+ * secp256k1 grant also binds its signature envelope, so the same key
77
+ * bytes never name the same grant under two schemes or two envelopes.
78
+ */
79
+ const deriveGrantId = ({ contractAddress, granteePublicKey, originHash: origin, slot }) => {
80
+ const self = { bytes: contractAddress };
81
+ switch (granteePublicKey.scheme) {
82
+ case "jubjub-schnorr": return grantIdOf(require_acc_module.pureCircuits.derive_grant_id_with_jubjub(self, granteePublicKey.point, origin, BigInt(slot)));
83
+ case "secp256k1-ecdsa": return grantIdOf(require_acc_module.pureCircuits.derive_grant_id_with_k256(self, granteePublicKey.point, K256_GRANT_ENVELOPE, origin, BigInt(slot)));
84
+ default: {
85
+ const unhandled = granteePublicKey;
86
+ throw new require_errors.GrantScopeInvalidError(`unsupported grantee scheme "${String(unhandled.scheme)}"`);
87
+ }
88
+ }
89
+ };
90
+ /**
91
+ * The first slot under which this grantee and origin have no active grant,
92
+ * with the id derived for it. The contract stores neither grantee nor
93
+ * slot, so the slot is found by deriving the id of each candidate and
94
+ * checking it against the roster. A revoked grant leaves a tombstone the
95
+ * contract lets a new grant overwrite, so its slot counts as free.
96
+ *
97
+ * @throws {@link GrantLimitReachedError} when every slot is taken.
98
+ */
99
+ const findFreeSlot = ({ contractAddress, grantee, originHash: origin, roster }) => {
100
+ const taken = new Set(roster.filter((record) => record.active).map((record) => record.id));
101
+ const granteePublicKey = require_grant_rules.granteePoint(grantee);
102
+ for (let candidate = 0; candidate < GRANT_SLOT_COUNT; candidate++) {
103
+ const slot = require_grant_rules.GrantSlot(candidate);
104
+ const grantId = deriveGrantId({
105
+ contractAddress,
106
+ granteePublicKey,
107
+ originHash: origin,
108
+ slot
109
+ });
110
+ if (!taken.has(grantId)) return {
111
+ slot,
112
+ grantId
113
+ };
114
+ }
115
+ throw new require_errors.GrantLimitReachedError("Every grant slot of this grantee under this origin is taken.");
116
+ };
117
+ /**
118
+ * Prepares `issue_grant_with_jubjub`: encodes and checks the scope,
119
+ * allocates the grantee's slot, derives the grant id and draws the scope
120
+ * salt. The call's arguments are the grant id, the scope in declaration
121
+ * order and the salt; the authoriser derives the scope digest it signs
122
+ * from those same arguments, and the preparation carries that digest for
123
+ * an authoriser that presents it ahead of the ceremony.
124
+ *
125
+ * @throws {@link GrantScopeInvalidError} when the scope is malformed or
126
+ * breaks an issue rule.
127
+ * @throws {@link GrantLimitReachedError} when the grantee has no free slot.
128
+ */
129
+ const prepareIssueGrant = ({ contractAddress, scope, originHash: origin, roster, randomBytes = (length) => crypto.getRandomValues(new Uint8Array(length)) }) => {
130
+ const encoded = require_grant_rules.circuitScope(scope);
131
+ require_grant_rules.assertIssueRules(encoded);
132
+ const { slot, grantId } = findFreeSlot({
133
+ contractAddress,
134
+ grantee: scope.grantee,
135
+ originHash: origin,
136
+ roster
137
+ });
138
+ const salt = randomBytes(SCOPE_SALT_LENGTH);
139
+ const args = scopeArgs(encoded);
140
+ return {
141
+ grantId,
142
+ slot,
143
+ scopeSalt: require_grant_rules.GrantScopeSalt(require_bytes_vo.HexBytes.fromByteArray(salt)),
144
+ scopeDigest: require_bytes_vo.HexBytes.fromByteArray(scopeDigest(salt, args)),
145
+ call: {
146
+ circuit: require_grant_circuits.ISSUE_GRANT_CIRCUIT,
147
+ args: [
148
+ require_bytes_vo.ByteArray.fromHex(require_bytes_vo.HexBytes(grantId)),
149
+ ...args,
150
+ salt
151
+ ]
152
+ }
153
+ };
154
+ };
155
+ /** Prepares `revoke_grant_with_jubjub` over one grant id. */
156
+ const prepareRevokeGrant = (grantId) => ({
157
+ circuit: require_grant_circuits.REVOKE_GRANT_CIRCUIT,
158
+ args: [require_bytes_vo.ByteArray.fromHex(require_bytes_vo.HexBytes(grantId))]
159
+ });
160
+ /** Prepares `revoke_all_grants_with_jubjub`, which takes no argument. */
161
+ const prepareRevokeAllGrants = () => ({
162
+ circuit: require_grant_circuits.REVOKE_ALL_GRANTS_CIRCUIT,
163
+ args: []
164
+ });
165
+ const SCOPE_ARG_KINDS = [
166
+ "boolean",
167
+ "boolean",
168
+ "boolean",
169
+ "boolean",
170
+ "bytes",
171
+ "bigint",
172
+ "bytes",
173
+ "bigint",
174
+ "bigint",
175
+ "bigint",
176
+ "bigint",
177
+ "bytes",
178
+ "bytes",
179
+ "bigint",
180
+ "bigint",
181
+ "caller"
182
+ ];
183
+ const isCaller = (value) => typeof value === "object" && value !== null && typeof value.is_some === "boolean" && value.value?.bytes instanceof Uint8Array;
184
+ const isScopeArgument = (value, kind) => {
185
+ switch (kind) {
186
+ case "boolean": return typeof value === "boolean";
187
+ case "bigint": return typeof value === "bigint";
188
+ case "bytes": return value instanceof Uint8Array;
189
+ case "caller": return isCaller(value);
190
+ }
191
+ };
192
+ const isScopeArgs = (values) => values.length === SCOPE_ARG_COUNT && values.every((value, index) => isScopeArgument(value, SCOPE_ARG_KINDS[index]));
193
+ /**
194
+ * Reads what the issue challenge binds out of the circuit's argument list
195
+ * as it reaches an authoriser: the grant id and the digest of the scope,
196
+ * derived here from the plaintext arguments and the salt so the signer
197
+ * binds the scope it was shown and nothing else.
198
+ *
199
+ * @throws an Error when the arguments are not a grant id, sixteen scope
200
+ * arguments and a scope salt.
201
+ */
202
+ const issueGrantBinding = (args) => {
203
+ const [grantId, ...rest] = args;
204
+ const scopeSalt = rest.at(-1);
205
+ const scope = rest.slice(0, -1);
206
+ if (!(grantId instanceof Uint8Array) || !(scopeSalt instanceof Uint8Array) || !isScopeArgs(scope)) throw new Error(`Circuit ${require_grant_circuits.ISSUE_GRANT_CIRCUIT} expects a grant id, ${SCOPE_ARG_COUNT} scope arguments and a scope salt`);
207
+ return {
208
+ grantId,
209
+ scopeDigest: scopeDigest(scopeSalt, scope)
210
+ };
211
+ };
212
+ //#endregion
213
+ Object.defineProperty(exports, "deriveGrantId", {
214
+ enumerable: true,
215
+ get: function() {
216
+ return deriveGrantId;
217
+ }
218
+ });
219
+ Object.defineProperty(exports, "grantObjectCommit", {
220
+ enumerable: true,
221
+ get: function() {
222
+ return grantObjectCommit;
223
+ }
224
+ });
225
+ Object.defineProperty(exports, "issueGrantBinding", {
226
+ enumerable: true,
227
+ get: function() {
228
+ return issueGrantBinding;
229
+ }
230
+ });
231
+ Object.defineProperty(exports, "originHash", {
232
+ enumerable: true,
233
+ get: function() {
234
+ return originHash;
235
+ }
236
+ });
237
+ Object.defineProperty(exports, "prepareIssueGrant", {
238
+ enumerable: true,
239
+ get: function() {
240
+ return prepareIssueGrant;
241
+ }
242
+ });
243
+ Object.defineProperty(exports, "prepareRevokeAllGrants", {
244
+ enumerable: true,
245
+ get: function() {
246
+ return prepareRevokeAllGrants;
247
+ }
248
+ });
249
+ Object.defineProperty(exports, "prepareRevokeGrant", {
250
+ enumerable: true,
251
+ get: function() {
252
+ return prepareRevokeGrant;
253
+ }
254
+ });
255
+ Object.defineProperty(exports, "scopeArgs", {
256
+ enumerable: true,
257
+ get: function() {
258
+ return scopeArgs;
259
+ }
260
+ });
261
+ Object.defineProperty(exports, "scopeDigest", {
262
+ enumerable: true,
263
+ get: function() {
264
+ return scopeDigest;
265
+ }
266
+ });
@@ -0,0 +1,16 @@
1
+ require("./chunk-9hOWP6kD.cjs");
2
+ require("./_polyfill-buffer-patch-BycQkEkK.cjs");
3
+ const require_grant_rules = require("./grant-rules-fYt80KB1.cjs");
4
+ const require_grants = require("./grants-C5wpNvZJ.cjs");
5
+ exports.assertIssueRules = require_grant_rules.assertIssueRules;
6
+ exports.circuitScope = require_grant_rules.circuitScope;
7
+ exports.deriveGrantId = require_grants.deriveGrantId;
8
+ exports.grantObjectCommit = require_grants.grantObjectCommit;
9
+ exports.granteePoint = require_grant_rules.granteePoint;
10
+ exports.issueGrantBinding = require_grants.issueGrantBinding;
11
+ exports.originHash = require_grants.originHash;
12
+ exports.prepareIssueGrant = require_grants.prepareIssueGrant;
13
+ exports.prepareRevokeAllGrants = require_grants.prepareRevokeAllGrants;
14
+ exports.prepareRevokeGrant = require_grants.prepareRevokeGrant;
15
+ exports.scopeArgs = require_grants.scopeArgs;
16
+ exports.scopeDigest = require_grants.scopeDigest;
@@ -0,0 +1,213 @@
1
+ import { n as HexBytes, t as ByteArray } from "./bytes.vo-CziaOsba.js";
2
+ import { G as GrantScopeSalt, K as GrantId, W as GrantSlot, a as zero32, i as granteePoint, n as assertIssueRules, r as circuitScope } from "./grant-rules-rG1kJq6l.js";
3
+ import { C as GrantScopeInvalidError, g as GrantLimitReachedError } from "./errors-pkQdxW-7.js";
4
+ import { i as REVOKE_GRANT_CIRCUIT, n as ISSUE_GRANT_CIRCUIT, r as REVOKE_ALL_GRANTS_CIRCUIT } from "./grant-circuits-D53wmGyr.js";
5
+ import { a as pureCircuits } from "./acc-module-ur8CkBd1.js";
6
+ //#region ../../packages/module/passport-account/src/acc/grants.ts
7
+ /** Domain tag of the origin hash; it fills its 32-byte pad exactly. */
8
+ const GRANT_ORIGIN_TAG = "midnight:account:grant:origin:v1";
9
+ const ORIGIN_TAG_LENGTH = 32;
10
+ const SCOPE_SALT_LENGTH = 32;
11
+ const GRANT_SLOT_COUNT = 256;
12
+ const SCOPE_ARG_COUNT = 16;
13
+ /**
14
+ * The signature envelope a secp256k1 grant is bound to: plain ECDSA over
15
+ * the SHA-256 digest of the challenge, the only envelope the contract
16
+ * admits for a spend grant.
17
+ */
18
+ const K256_GRANT_ENVELOPE = 0n;
19
+ /** Lays the scope out in the circuit's declaration order. */
20
+ const scopeArgs = (scope) => [
21
+ scope.opWithdrawUnshielded,
22
+ scope.opWithdrawShielded,
23
+ scope.opWithdrawShieldedToContract,
24
+ scope.read,
25
+ scope.color,
26
+ scope.recipientKind,
27
+ scope.recipient,
28
+ scope.maxCoinValue,
29
+ scope.perCallCap,
30
+ scope.cap,
31
+ scope.expiresAt,
32
+ scope.rpIdHash,
33
+ scope.readPkHash,
34
+ scope.windowLen,
35
+ scope.windowCap,
36
+ {
37
+ is_some: scope.caller !== void 0,
38
+ value: { bytes: scope.caller ?? zero32() }
39
+ }
40
+ ];
41
+ /**
42
+ * The salted digest of the plaintext scope, the single element through
43
+ * which the issue challenge binds the whole scope, produced by the
44
+ * contract's own pure circuit.
45
+ */
46
+ const scopeDigest = (scopeSalt, args) => pureCircuits.derive_grant_scope_digest(scopeSalt, ...args);
47
+ /**
48
+ * The commitment the contract stores for a grant's object: the colour,
49
+ * recipient kind and value, and coin bound of its circuit scope, hidden
50
+ * under the scope salt, as lowercase hex, produced by the contract's own
51
+ * pure circuit.
52
+ */
53
+ const grantObjectCommit = (scopeSalt, scope) => HexBytes.fromByteArray(pureCircuits.derive_grant_object_commit(scopeSalt, scope.color, scope.recipientKind, scope.recipient, scope.maxCoinValue));
54
+ /**
55
+ * The origin hash that enters a grant id: SHA-256 of the origin tag padded
56
+ * to 32 bytes followed by the raw UTF-8 bytes of the client id. Computed
57
+ * off chain only, so no circuit exports it. For this module the client id
58
+ * is the relying party id of the consumer issuing the grant.
59
+ */
60
+ const originHash = async (clientId) => {
61
+ const encoder = new TextEncoder();
62
+ const tag = new Uint8Array(ORIGIN_TAG_LENGTH);
63
+ tag.set(encoder.encode(GRANT_ORIGIN_TAG));
64
+ const client = encoder.encode(clientId);
65
+ const preimage = new Uint8Array(tag.length + client.length);
66
+ preimage.set(tag);
67
+ preimage.set(client, tag.length);
68
+ return new Uint8Array(await crypto.subtle.digest("SHA-256", preimage));
69
+ };
70
+ /** A grant id from the bytes a derivation circuit returns. */
71
+ const grantIdOf = (id) => GrantId(HexBytes.fromByteArray(id));
72
+ /**
73
+ * The identity of a grant: the contract's own commitment to the account,
74
+ * the grantee key, the origin hash and the slot, which keys the record in
75
+ * the grants map. Each grantee scheme has its own derivation, and a
76
+ * secp256k1 grant also binds its signature envelope, so the same key
77
+ * bytes never name the same grant under two schemes or two envelopes.
78
+ */
79
+ const deriveGrantId = ({ contractAddress, granteePublicKey, originHash: origin, slot }) => {
80
+ const self = { bytes: contractAddress };
81
+ switch (granteePublicKey.scheme) {
82
+ case "jubjub-schnorr": return grantIdOf(pureCircuits.derive_grant_id_with_jubjub(self, granteePublicKey.point, origin, BigInt(slot)));
83
+ case "secp256k1-ecdsa": return grantIdOf(pureCircuits.derive_grant_id_with_k256(self, granteePublicKey.point, K256_GRANT_ENVELOPE, origin, BigInt(slot)));
84
+ default: {
85
+ const unhandled = granteePublicKey;
86
+ throw new GrantScopeInvalidError(`unsupported grantee scheme "${String(unhandled.scheme)}"`);
87
+ }
88
+ }
89
+ };
90
+ /**
91
+ * The first slot under which this grantee and origin have no active grant,
92
+ * with the id derived for it. The contract stores neither grantee nor
93
+ * slot, so the slot is found by deriving the id of each candidate and
94
+ * checking it against the roster. A revoked grant leaves a tombstone the
95
+ * contract lets a new grant overwrite, so its slot counts as free.
96
+ *
97
+ * @throws {@link GrantLimitReachedError} when every slot is taken.
98
+ */
99
+ const findFreeSlot = ({ contractAddress, grantee, originHash: origin, roster }) => {
100
+ const taken = new Set(roster.filter((record) => record.active).map((record) => record.id));
101
+ const granteePublicKey = granteePoint(grantee);
102
+ for (let candidate = 0; candidate < GRANT_SLOT_COUNT; candidate++) {
103
+ const slot = GrantSlot(candidate);
104
+ const grantId = deriveGrantId({
105
+ contractAddress,
106
+ granteePublicKey,
107
+ originHash: origin,
108
+ slot
109
+ });
110
+ if (!taken.has(grantId)) return {
111
+ slot,
112
+ grantId
113
+ };
114
+ }
115
+ throw new GrantLimitReachedError("Every grant slot of this grantee under this origin is taken.");
116
+ };
117
+ /**
118
+ * Prepares `issue_grant_with_jubjub`: encodes and checks the scope,
119
+ * allocates the grantee's slot, derives the grant id and draws the scope
120
+ * salt. The call's arguments are the grant id, the scope in declaration
121
+ * order and the salt; the authoriser derives the scope digest it signs
122
+ * from those same arguments, and the preparation carries that digest for
123
+ * an authoriser that presents it ahead of the ceremony.
124
+ *
125
+ * @throws {@link GrantScopeInvalidError} when the scope is malformed or
126
+ * breaks an issue rule.
127
+ * @throws {@link GrantLimitReachedError} when the grantee has no free slot.
128
+ */
129
+ const prepareIssueGrant = ({ contractAddress, scope, originHash: origin, roster, randomBytes = (length) => crypto.getRandomValues(new Uint8Array(length)) }) => {
130
+ const encoded = circuitScope(scope);
131
+ assertIssueRules(encoded);
132
+ const { slot, grantId } = findFreeSlot({
133
+ contractAddress,
134
+ grantee: scope.grantee,
135
+ originHash: origin,
136
+ roster
137
+ });
138
+ const salt = randomBytes(SCOPE_SALT_LENGTH);
139
+ const args = scopeArgs(encoded);
140
+ return {
141
+ grantId,
142
+ slot,
143
+ scopeSalt: GrantScopeSalt(HexBytes.fromByteArray(salt)),
144
+ scopeDigest: HexBytes.fromByteArray(scopeDigest(salt, args)),
145
+ call: {
146
+ circuit: ISSUE_GRANT_CIRCUIT,
147
+ args: [
148
+ ByteArray.fromHex(HexBytes(grantId)),
149
+ ...args,
150
+ salt
151
+ ]
152
+ }
153
+ };
154
+ };
155
+ /** Prepares `revoke_grant_with_jubjub` over one grant id. */
156
+ const prepareRevokeGrant = (grantId) => ({
157
+ circuit: REVOKE_GRANT_CIRCUIT,
158
+ args: [ByteArray.fromHex(HexBytes(grantId))]
159
+ });
160
+ /** Prepares `revoke_all_grants_with_jubjub`, which takes no argument. */
161
+ const prepareRevokeAllGrants = () => ({
162
+ circuit: REVOKE_ALL_GRANTS_CIRCUIT,
163
+ args: []
164
+ });
165
+ const SCOPE_ARG_KINDS = [
166
+ "boolean",
167
+ "boolean",
168
+ "boolean",
169
+ "boolean",
170
+ "bytes",
171
+ "bigint",
172
+ "bytes",
173
+ "bigint",
174
+ "bigint",
175
+ "bigint",
176
+ "bigint",
177
+ "bytes",
178
+ "bytes",
179
+ "bigint",
180
+ "bigint",
181
+ "caller"
182
+ ];
183
+ const isCaller = (value) => typeof value === "object" && value !== null && typeof value.is_some === "boolean" && value.value?.bytes instanceof Uint8Array;
184
+ const isScopeArgument = (value, kind) => {
185
+ switch (kind) {
186
+ case "boolean": return typeof value === "boolean";
187
+ case "bigint": return typeof value === "bigint";
188
+ case "bytes": return value instanceof Uint8Array;
189
+ case "caller": return isCaller(value);
190
+ }
191
+ };
192
+ const isScopeArgs = (values) => values.length === SCOPE_ARG_COUNT && values.every((value, index) => isScopeArgument(value, SCOPE_ARG_KINDS[index]));
193
+ /**
194
+ * Reads what the issue challenge binds out of the circuit's argument list
195
+ * as it reaches an authoriser: the grant id and the digest of the scope,
196
+ * derived here from the plaintext arguments and the salt so the signer
197
+ * binds the scope it was shown and nothing else.
198
+ *
199
+ * @throws an Error when the arguments are not a grant id, sixteen scope
200
+ * arguments and a scope salt.
201
+ */
202
+ const issueGrantBinding = (args) => {
203
+ const [grantId, ...rest] = args;
204
+ const scopeSalt = rest.at(-1);
205
+ const scope = rest.slice(0, -1);
206
+ if (!(grantId instanceof Uint8Array) || !(scopeSalt instanceof Uint8Array) || !isScopeArgs(scope)) throw new Error(`Circuit ${ISSUE_GRANT_CIRCUIT} expects a grant id, ${SCOPE_ARG_COUNT} scope arguments and a scope salt`);
207
+ return {
208
+ grantId,
209
+ scopeDigest: scopeDigest(scopeSalt, scope)
210
+ };
211
+ };
212
+ //#endregion
213
+ export { prepareIssueGrant as a, scopeArgs as c, originHash as i, scopeDigest as l, grantObjectCommit as n, prepareRevokeAllGrants as o, issueGrantBinding as r, prepareRevokeGrant as s, deriveGrantId as t };
@@ -0,0 +1,4 @@
1
+ import "./_polyfill-buffer-patch-JcrfT1gU.js";
2
+ import { i as granteePoint, n as assertIssueRules, r as circuitScope } from "./grant-rules-rG1kJq6l.js";
3
+ import { a as prepareIssueGrant, c as scopeArgs, i as originHash, l as scopeDigest, n as grantObjectCommit, o as prepareRevokeAllGrants, r as issueGrantBinding, s as prepareRevokeGrant, t as deriveGrantId } from "./grants-ngFtS52g.js";
4
+ export { assertIssueRules, circuitScope, deriveGrantId, grantObjectCommit, granteePoint, issueGrantBinding, originHash, prepareIssueGrant, prepareRevokeAllGrants, prepareRevokeGrant, scopeArgs, scopeDigest };
@@ -1,42 +1,12 @@
1
1
  const require_chunk = require("./chunk-9hOWP6kD.cjs");
2
- const require_Address = require("./Address-4KjeDt_x.cjs");
3
- const require_util = require("./util-P4PX2muj.cjs");
4
- const require_slice = require("./slice-Bjj2t2ut.cjs");
5
- const require_activity_type_stable = require("./activity-type.stable-ClO9j_PH.cjs");
6
- let rxjs = require("rxjs");
2
+ const require_Address = require("./Address-AMKTo-dA.cjs");
3
+ const require_util = require("./util-D1YlKzrc.cjs");
4
+ const require_activity_type = require("./activity-type-BPXxdHBP.cjs");
7
5
  let lodash_groupBy = require("lodash/groupBy.js");
8
6
  lodash_groupBy = require_chunk.__toESM(lodash_groupBy);
9
7
  //#region ../../node_modules/@cardano-sdk/core/dist/esm/util/nativeScript.js
10
8
  const nativeScriptPolicyId = (script) => require_Address.PolicyId(require_Address.NativeScript.fromCore(script).hash());
11
9
  //#endregion
12
- //#region ../../packages/contract/failures/src/utils/auto-dismiss-failure-on-success.ts
13
- /**
14
- * RxJS operator that auto-dismisses a failure when an operation succeeds.
15
- *
16
- * This operator:
17
- * 1. Takes a failureId observable
18
- * 2. Checks if the failure exists in the store
19
- * 3. Only emits dismissFailure action if the failure actually exists
20
- *
21
- * This prevents unnecessary action dispatches when a failure has already been dismissed.
22
- *
23
- * @param selectFailureById$ - Observable of the selector function to check failure existence
24
- * @returns RxJS operator that emits dismissFailure actions only when failures exist
25
- *
26
- * @example
27
- * ```typescript
28
- * // In a side effect:
29
- * return operation$.pipe(
30
- * // ... operation logic ...
31
- * map(() => CardanoSyncFailureId('account-123')),
32
- * autoDismissFailureOnSuccess(selectFailureById$),
33
- * );
34
- * ```
35
- */
36
- const autoDismissFailureOnSuccess = (selectFailureById$) => (source) => source.pipe((0, rxjs.withLatestFrom)(selectFailureById$), (0, rxjs.filter)(([failureId, selectFailureById]) => {
37
- return selectFailureById(failureId) !== void 0;
38
- }), (0, rxjs.map)(([failureId]) => require_slice.failuresActions.failures.dismissFailure(failureId)));
39
- //#endregion
40
10
  //#region ../../packages/contract/cardano-context/src/value-objects/utxo-cache-key.vo.ts
41
11
  const compareRewardAccounts = (a, b) => a < b ? -1 : a > b ? 1 : 0;
42
12
  const UtxoCacheKey = (params) => `${params.topOnChainActivityId}:${[...params.stakeKeys].sort(compareRewardAccounts).join(",")}:n${params.accountAddressCount}`;
@@ -97,7 +67,7 @@ const extractUniqueStakeKeys = (accountAddresses) => {
97
67
  * for consumers that need to refresh on reward arrival (e.g. `rewardsSum`).
98
68
  */
99
69
  const getTopOnChainActivity = (activitiesByAccount, accountId, includeRewardActivities = false) => {
100
- const top = activitiesByAccount[accountId]?.find((activity) => activity.type !== require_activity_type_stable.ActivityType.Pending && (includeRewardActivities || activity.type !== require_activity_type_stable.ActivityType.Rewards));
70
+ const top = activitiesByAccount[accountId]?.find((activity) => activity.type !== require_activity_type.ActivityType.Pending && (includeRewardActivities || activity.type !== require_activity_type.ActivityType.Rewards));
101
71
  if (!top) return void 0;
102
72
  const cardano = top.blockchainSpecific?.Cardano;
103
73
  return {
@@ -151,12 +121,6 @@ Object.defineProperty(exports, "UtxoCacheKey", {
151
121
  return UtxoCacheKey;
152
122
  }
153
123
  });
154
- Object.defineProperty(exports, "autoDismissFailureOnSuccess", {
155
- enumerable: true,
156
- get: function() {
157
- return autoDismissFailureOnSuccess;
158
- }
159
- });
160
124
  Object.defineProperty(exports, "extractUniqueStakeKeys", {
161
125
  enumerable: true,
162
126
  get: function() {
@@ -1,41 +1,10 @@
1
- import "./chunk-D6g4UhsZ.js";
2
- import { Ft as PolicyId, ut as NativeScript } from "./Address-_VPkf7Xh.js";
3
- import { _ as CardanoRewardAccount, s as isCardanoAddressOfSupportedNetwork } from "./util-CQSJU0wT.js";
4
- import { t as failuresActions } from "./slice-B6vPum19.js";
5
- import { t as ActivityType } from "./activity-type.stable-Ml0SOYv9.js";
6
- import { filter, map, withLatestFrom } from "rxjs";
7
- import groupBy$1 from "lodash/groupBy.js";
1
+ import { Vt as PolicyId, mt as NativeScript } from "./Address-_c_-9hLC.js";
2
+ import { _ as CardanoRewardAccount, s as isCardanoAddressOfSupportedNetwork } from "./util-DHxtzUzY.js";
3
+ import { t as ActivityType } from "./activity-type-C1geyPsH.js";
4
+ import groupBy from "lodash/groupBy.js";
8
5
  //#region ../../node_modules/@cardano-sdk/core/dist/esm/util/nativeScript.js
9
6
  const nativeScriptPolicyId = (script) => PolicyId(NativeScript.fromCore(script).hash());
10
7
  //#endregion
11
- //#region ../../packages/contract/failures/src/utils/auto-dismiss-failure-on-success.ts
12
- /**
13
- * RxJS operator that auto-dismisses a failure when an operation succeeds.
14
- *
15
- * This operator:
16
- * 1. Takes a failureId observable
17
- * 2. Checks if the failure exists in the store
18
- * 3. Only emits dismissFailure action if the failure actually exists
19
- *
20
- * This prevents unnecessary action dispatches when a failure has already been dismissed.
21
- *
22
- * @param selectFailureById$ - Observable of the selector function to check failure existence
23
- * @returns RxJS operator that emits dismissFailure actions only when failures exist
24
- *
25
- * @example
26
- * ```typescript
27
- * // In a side effect:
28
- * return operation$.pipe(
29
- * // ... operation logic ...
30
- * map(() => CardanoSyncFailureId('account-123')),
31
- * autoDismissFailureOnSuccess(selectFailureById$),
32
- * );
33
- * ```
34
- */
35
- const autoDismissFailureOnSuccess = (selectFailureById$) => (source) => source.pipe(withLatestFrom(selectFailureById$), filter(([failureId, selectFailureById]) => {
36
- return selectFailureById(failureId) !== void 0;
37
- }), map(([failureId]) => failuresActions.failures.dismissFailure(failureId)));
38
- //#endregion
39
8
  //#region ../../packages/contract/cardano-context/src/value-objects/utxo-cache-key.vo.ts
40
9
  const compareRewardAccounts = (a, b) => a < b ? -1 : a > b ? 1 : 0;
41
10
  const UtxoCacheKey = (params) => `${params.topOnChainActivityId}:${[...params.stakeKeys].sort(compareRewardAccounts).join(",")}:n${params.accountAddressCount}`;
@@ -141,7 +110,7 @@ const getAccountAddresses = (addresses, accountId, chainId) => filterCardanoAddr
141
110
  * associated with those accounts.
142
111
  */
143
112
  const groupCardanoAddressesByAccount = (addresses, chainId) => {
144
- return groupBy$1(filterCardanoAddressesForNetwork(addresses, chainId), (addr) => addr.accountId);
113
+ return groupBy(filterCardanoAddressesForNetwork(addresses, chainId), (addr) => addr.accountId);
145
114
  };
146
115
  //#endregion
147
- export { extractUniqueStakeKeys as a, nativeScriptPolicyId as c, getTopOnChainActivity as i, getAccountAddresses as n, UtxoCacheKey as o, groupCardanoAddressesByAccount as r, autoDismissFailureOnSuccess as s, filterCardanoAddressesForNetwork as t };
116
+ export { extractUniqueStakeKeys as a, getTopOnChainActivity as i, getAccountAddresses as n, UtxoCacheKey as o, groupCardanoAddressesByAccount as r, nativeScriptPolicyId as s, filterCardanoAddressesForNetwork as t };
@@ -1,13 +1,16 @@
1
1
  import "./chunk-D6g4UhsZ.js";
2
2
  import { n as import_buffer, r as init__polyfill_buffer_patch } from "./_polyfill-buffer-patch-JcrfT1gU.js";
3
- import { Ot as CborWriter, f as Transaction, n as AddressType, p as TxCBOR, qt as HexBlob, r as CredentialType, t as Address } from "./Address-_VPkf7Xh.js";
4
- import { t as Ed25519PublicKey } from "./Ed25519PublicKey-CjnuAYRR.js";
5
- import { t as SodiumBip32Ed25519 } from "./SodiumBip32Ed25519-BEfo1Q9m.js";
6
- import { a as isRewardAccount } from "./PaymentAddress-xSmGUQ-8.js";
7
- import { a as KeyRole, i as KeyPurpose } from "./types-B61DQoFW.js";
8
- import { a as HexBytes, i as ByteArray, n as createTxInKeyPathMap, o as SecretBox, t as InMemoryKeyAgent } from "./InMemoryKeyAgent-D-3HejxN.js";
9
- import { i as getPaymentCredential, l as outpointKey, t as createInputResolver } from "./util-CQSJU0wT.js";
10
- import { t as applyVkeyWitnesses } from "./apply-vkey-witnesses-Dfo7XfhL.js";
3
+ import { Mt as CborWriter, m as TxCBOR, n as AddressType, p as Transaction, r as CredentialType, t as Address, tn as HexBlob } from "./Address-_c_-9hLC.js";
4
+ import { t as SodiumBip32Ed25519 } from "./SodiumBip32Ed25519-DCikAMsl.js";
5
+ import { t as Ed25519PublicKey } from "./Ed25519PublicKey-DIE19xHg.js";
6
+ import { a as isRewardAccount } from "./PaymentAddress-Cml3EA1n.js";
7
+ import { a as KeyRole, i as KeyPurpose } from "./types-By-XeXWg.js";
8
+ import { n as createTxInKeyPathMap, t as InMemoryKeyAgent } from "./InMemoryKeyAgent-D8T3vtXy.js";
9
+ import { t as SecretBox } from "./secret-box-CSmRp6Tt.js";
10
+ import { i as getPaymentCredential, l as outpointKey, t as createInputResolver } from "./util-DHxtzUzY.js";
11
+ import { n as HexBytes, t as ByteArray } from "./bytes.vo-CziaOsba.js";
12
+ import { t as applyVkeyWitnesses } from "./apply-vkey-witnesses-Byb40-yJ.js";
13
+ import { t as AuthenticationCancelledError } from "./types-DTE1ctDB.js";
11
14
  import { catchError, from, switchMap, throwError } from "rxjs";
12
15
  import { dummyLogger } from "ts-log";
13
16
  //#region ../../packages/lib/core/src/key-hash.ts
@@ -64,15 +67,6 @@ var CollateralOwnershipError = class extends Error {
64
67
  }
65
68
  };
66
69
  //#endregion
67
- //#region ../../packages/contract/signer/src/types.ts
68
- /** Thrown when the user cancels the authentication prompt during signing. */
69
- var AuthenticationCancelledError = class extends Error {
70
- constructor() {
71
- super("Authentication cancelled by user");
72
- this.name = "AuthenticationCancelledError";
73
- }
74
- };
75
- //#endregion
76
70
  //#region ../../packages/contract/cardano-context/src/signing/cip8-sign-data.ts
77
71
  init__polyfill_buffer_patch();
78
72
  /**
@@ -431,4 +425,4 @@ const withCollateralOwnershipGuard = (signer, context) => ({ sign: (request) =>
431
425
  })()).pipe(catchError(() => throwError(() => new CollateralOwnershipError(REFUSE_ON_FAILURE)))).pipe(switchMap((refusal) => refusal ? throwError(() => new CollateralOwnershipError(refusal)) : signer.sign(request)));
432
426
  } });
433
427
  //#endregion
434
- export { CardanoInMemoryTransactionSigner as a, deriveDRepKeyHash as i, createCardanoKeyAgentFromEncryptedRoot as n, CardanoInMemoryDataSigner as o, createCardanoKeyAgentFromMnemonic as r, withCollateralOwnershipGuard as t };
428
+ export { CardanoInMemoryTransactionSigner as a, deriveDRepKeyHash as i, createCardanoKeyAgentFromEncryptedRoot as n, CardanoInMemoryDataSigner as o, createCardanoKeyAgentFromMnemonic as r, hashEd25519PublicKey as s, withCollateralOwnershipGuard as t };