@laceio/sdk 0.1.1 → 0.1.2-canary.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 (388) hide show
  1. package/dist/{TransactionBuilder-DrB3NVTi.cjs → TransactionBuilder-CCjOn7NA.cjs} +42 -0
  2. package/dist/{TransactionBuilder-V6aLx4SV.js → TransactionBuilder-CIzdw18M.js} +1 -1
  3. package/dist/{_polyfill-buffer-patch-BnPVerlG.cjs → _polyfill-buffer-patch-CM8X7JiY.cjs} +21 -2
  4. package/dist/_polyfill-buffer-patch-yNxN4d5E.js +1467 -0
  5. package/dist/_web-crypto-random-bytes-Bo-GTcRS.js +197 -0
  6. package/dist/acc-module-4iIUv6My.cjs +27654 -0
  7. package/dist/acc-module-Cmj8EsIb.js +27624 -0
  8. package/dist/account-BOQruszJ.js +6 -0
  9. package/dist/account-BUOj4pYJ.cjs +11 -0
  10. package/dist/account-call-7wnopBq0.cjs +5 -0
  11. package/dist/account-call-B9d_2Xwi.js +4 -0
  12. package/dist/account-call-Bd4Rpbvt.cjs +323 -0
  13. package/dist/account-call-C3CkDqEC.js +276 -0
  14. package/dist/account-guards-BtjTGxDZ.cjs +42 -0
  15. package/dist/account-guards-D9Lu5T3W.js +36 -0
  16. package/dist/account-tokens-DvkOFVON.js +16 -0
  17. package/dist/account-tokens-nwcvwLu4.cjs +21 -0
  18. package/dist/{activity-type.stable-BJEfeLxL.cjs → activity-type-Ch6ljxBy.cjs} +2 -1
  19. package/dist/{activity-type.stable-C76_hWd7.js → activity-type-GsJGWs-3.js} +2 -1
  20. package/dist/address-B9ntKL8K.js +13761 -0
  21. package/dist/address-BXp-mY8H.cjs +11270 -0
  22. package/dist/{address-book-address-validator-DIUolI-s.js → address-book-address-validator-0J9XAADH.js} +2 -2
  23. package/dist/address-book-address-validator-DK0dnsRS.cjs +41 -0
  24. package/dist/address-book-address-validator-Di_ywo8M.js +39 -0
  25. package/dist/{address-book-address-validator-DNwQGlOB.cjs → address-book-address-validator-Dte_YQ2L.cjs} +2 -2
  26. package/dist/artefact-loader-BWWYAD7E.cjs +183 -0
  27. package/dist/artefact-loader-Dik4HIfv.js +160 -0
  28. package/dist/auto-dismiss-failure-on-success-C-qoJuid.cjs +37 -0
  29. package/dist/auto-dismiss-failure-on-success-s8MGDEIu.js +31 -0
  30. package/dist/bip32-D6wd_QMn.cjs +3851 -0
  31. package/dist/bitcoin-data-provider-BYPSmuZS.js +21 -0
  32. package/dist/bitcoin-data-provider-w1oEDSU3.cjs +26 -0
  33. package/dist/bitcoin.cjs +45 -0
  34. package/dist/bitcoin.d.ts +29906 -1
  35. package/dist/bitcoin.js +20 -0
  36. package/dist/{blockfrost-tx-submit-provider-DPTrapz-.js → blockfrost-tx-submit-provider-CBWQ0wK9.js} +5 -157
  37. package/dist/{blockfrost-tx-submit-provider-BAIzV5o3.cjs → blockfrost-tx-submit-provider-CLNQ5ycR.cjs} +3 -167
  38. package/dist/bn-d3nSOIf7.cjs +2553 -0
  39. package/dist/browser-B1eMbDwh.js +7468 -0
  40. package/dist/bytes.vo-BB7_4JK6.js +23 -0
  41. package/dist/bytes.vo-BNRquqaO.cjs +34 -0
  42. package/dist/cardano-DfPwhwm-.js +3 -0
  43. package/dist/{cardano-network-id.vo-DSxrFk9S.cjs → cardano-network-id.vo-BEDPn6Li.cjs} +1 -1
  44. package/dist/{cardano-network-id.vo-CK1tNQDg.js → cardano-network-id.vo-Cfpvbod9.js} +1 -1
  45. package/dist/cardano.cjs +22 -18
  46. package/dist/cardano.d.ts +16956 -1716
  47. package/dist/cardano.js +16 -11
  48. package/dist/client-DXBLHk7K.cjs +808 -0
  49. package/dist/codecs-Cswkg7Tm.cjs +4051 -0
  50. package/dist/codecs-Dc1Krpbt.js +3903 -0
  51. package/dist/{const-C84qHkjp.js → const-BJfIK_G-.js} +4 -4
  52. package/dist/const-BhYOdznB.cjs +42 -0
  53. package/dist/const-BsnjG2_Q.cjs +32071 -0
  54. package/dist/const-CUnCl5U0.js +13 -0
  55. package/dist/{const-DXk2tFyv.js → const-CjmfjBP3.js} +1 -1
  56. package/dist/{const-BDEg2Trq.cjs → const-D-eZIS4n.cjs} +4 -4
  57. package/dist/const-D0CbQlo4.js +154 -0
  58. package/dist/{const-BY8B3_0_.cjs → const-iwzZEE_w.cjs} +1 -1
  59. package/dist/contract-1R86jhSw.js +171 -0
  60. package/dist/contract-MKLzYVkW.cjs +189 -0
  61. package/dist/create-add-accounts-Brqk84vF.js +102 -0
  62. package/dist/create-add-accounts-DzXIh7Ot.cjs +114 -0
  63. package/dist/{delegation-tx-builder-CRpLP6jH.cjs → delegation-tx-builder-CCjiakoy.cjs} +6 -6
  64. package/dist/{delegation-tx-builder-CGVqlaFE.js → delegation-tx-builder-DZFjHDS8.js} +5 -5
  65. package/dist/{deregistration-tx-builder-B-CrUyX6.js → deregistration-tx-builder-Bf6xAYp4.js} +5 -5
  66. package/dist/{deregistration-tx-builder-DZGwB4cz.cjs → deregistration-tx-builder-CQP35yex.cjs} +6 -6
  67. package/dist/device-commitment-hex.vo-5wFtQvDS.js +26 -0
  68. package/dist/device-commitment-hex.vo-CT3RmAug.cjs +31 -0
  69. package/dist/device-readers-CUHYoYOH.js +145 -0
  70. package/dist/device-readers-CdxS2btd.cjs +168 -0
  71. package/dist/device-readers-D_JZeNL2.cjs +8 -0
  72. package/dist/device-readers-DwSNCGPP.js +4 -0
  73. package/dist/dist-BMi5ZjEq.cjs +43175 -0
  74. package/dist/dist-BtIq4XFn.cjs +535 -0
  75. package/dist/dist-C3SHC_Ho.cjs +1394 -0
  76. package/dist/dist-CykEjYEX.cjs +3814 -0
  77. package/dist/dist-Dcsxh3be.cjs +3452 -0
  78. package/dist/dist-DqJfSlTd.cjs +4413 -0
  79. package/dist/dist-nTZ70qj7.cjs +1306 -0
  80. package/dist/{earn-rewards-tx-builder-BDbTDZmD.js → earn-rewards-tx-builder-Bsga3yFb.js} +5 -5
  81. package/dist/{earn-rewards-tx-builder-D5sUT5v8.cjs → earn-rewards-tx-builder-GuxofYns.cjs} +6 -6
  82. package/dist/enc-key-circuits-B7BjgUL9.js +13 -0
  83. package/dist/enc-key-circuits-BLrZrBVI.cjs +24 -0
  84. package/dist/english-Byb9M0E_.cjs +2057 -0
  85. package/dist/envelopes-BGoO_v8m.js +1621 -0
  86. package/dist/envelopes-CH25R-DN.cjs +1722 -0
  87. package/dist/errors-BIftM8ZN.cjs +688 -0
  88. package/dist/errors-DSq5wUwt.js +466 -0
  89. package/dist/esm-HBSUQw3w.js +384 -0
  90. package/dist/esm-LZuaZjMf.cjs +389 -0
  91. package/dist/experimental.cjs +7349 -0
  92. package/dist/experimental.d.ts +86273 -0
  93. package/dist/experimental.js +7184 -0
  94. package/dist/gated-call-CDCVZIK-.cjs +5 -0
  95. package/dist/gated-call-D-tT7P_t.js +722 -0
  96. package/dist/gated-call-D_VT2quk.js +4 -0
  97. package/dist/gated-call-DgJm1Mi_.cjs +787 -0
  98. package/dist/grant-circuits-DswmW3nI.cjs +71 -0
  99. package/dist/grant-circuits-Jxb5y1HW.js +42 -0
  100. package/dist/grant-rules-By07_eDi.js +6824 -0
  101. package/dist/grant-rules-BzVTWXS7.cjs +7099 -0
  102. package/dist/grant-spend-B3Md9L0n.js +215 -0
  103. package/dist/grant-spend-oWmzRsjH.cjs +217 -0
  104. package/dist/grant-status-B2y49iIu.js +2688 -0
  105. package/dist/grant-status-DOr3t_u8.cjs +2820 -0
  106. package/dist/grants-2BZ-qEVQ.js +5 -0
  107. package/dist/grants-BPoLSiMt.cjs +18 -0
  108. package/dist/grants-BoI5uwSF.cjs +272 -0
  109. package/dist/grants-CtofFu-e.js +213 -0
  110. package/dist/{group-cardano-addresses-by-account-B533oVXR.cjs → group-cardano-addresses-by-account-Bp0g4wEY.cjs} +3 -39
  111. package/dist/{group-cardano-addresses-by-account-RHKoEskR.js → group-cardano-addresses-by-account-SR8MMrZf.js} +5 -35
  112. package/dist/{guarded-transaction-signer-Bxl6_XNd.cjs → guarded-transaction-signer-MFpPg98D.cjs} +17 -18
  113. package/dist/{guarded-transaction-signer-CpKLj8Kp.js → guarded-transaction-signer-P6Rp1faj.js} +8 -15
  114. package/dist/hex-D9ITYbwt.cjs +263 -0
  115. package/dist/hex-mkXcV3pN.js +191 -0
  116. package/dist/http-client-B3N-TMxu.cjs +167 -0
  117. package/dist/http-client-TRlhDZGh.js +155 -0
  118. package/dist/identity-BMLuufva.cjs +263 -0
  119. package/dist/identity-DII6f-h7.js +233 -0
  120. package/dist/in-memory-wallet-integration-B2xzxORj.cjs +20741 -0
  121. package/dist/in-memory-wallet-integration-CBRiPjLO.js +130 -0
  122. package/dist/in-memory-wallet-integration-CULUB5Tf.cjs +240 -0
  123. package/dist/{in-memory-wallet-integration-D-qn65Kx.js → in-memory-wallet-integration-ChIOirMW.js} +5 -2
  124. package/dist/{in-memory-wallet-integration-Croiuopx.js → in-memory-wallet-integration-CljprQQV.js} +7 -104
  125. package/dist/{in-memory-wallet-integration-DVh9sRXa.cjs → in-memory-wallet-integration-Cm6P8sk6.cjs} +3 -2
  126. package/dist/in-memory-wallet-integration-TM9bBphA.js +20738 -0
  127. package/dist/{in-memory-wallet-integration-CnLYeX4-.cjs → in-memory-wallet-integration-t9I00R_V.cjs} +17 -108
  128. package/dist/index.cjs +84 -47
  129. package/dist/index.d.ts +37496 -10033
  130. package/dist/index.js +52 -24
  131. package/dist/{init-CLHuAMB-.js → init-0zzs9aqU.js} +4 -4
  132. package/dist/{init-U8c9yHYx.cjs → init-5KcGcBb5.cjs} +1 -1
  133. package/dist/init-8v_n8boO.js +1177 -0
  134. package/dist/{init-CigestoM.js → init-B3-1ghyx.js} +2 -2
  135. package/dist/init-B8U3ABhS.cjs +107 -0
  136. package/dist/init-BJn-8_hf.js +141 -0
  137. package/dist/init-BPU3j8sT.cjs +6 -0
  138. package/dist/init-BRzH6xu-2.cjs +2797 -0
  139. package/dist/init-BmzfDaKL.js +1142 -0
  140. package/dist/{init-C-jErzp5.cjs → init-BopV9ed4.cjs} +2 -2
  141. package/dist/init-BpHTq2R5.js +105 -0
  142. package/dist/init-BpSITBfF.js +39 -0
  143. package/dist/{init-DX4WyB0R.cjs → init-BrdVzxei.cjs} +3 -3
  144. package/dist/{init-LfyMo-sS.cjs → init-BwkU0ruo.cjs} +2 -2
  145. package/dist/{init-CB__aLD7.cjs → init-C-G32J12.cjs} +2 -2
  146. package/dist/init-C00gw1zi.js +422 -0
  147. package/dist/{init-TkPq_Ny_.js → init-C2RgrfZe.js} +1 -1
  148. package/dist/{init-DcYY6zMD.js → init-C8URA2OX.js} +1 -1
  149. package/dist/init-CDkRynJa.js +2796 -0
  150. package/dist/{init-Cg9XdAru.js → init-CNM5m7M2.js} +4 -4
  151. package/dist/init-CR7BfztQ.cjs +18 -0
  152. package/dist/{init-CSHwHnfg.cjs → init-CSDpdu0Q.cjs} +2 -2
  153. package/dist/{init-aJHl-7AO.js → init-CX0AMQUn.js} +2 -2
  154. package/dist/{init-FMGDET-9.js → init-CfTbSEKy.js} +259 -60
  155. package/dist/{init-CR6tpw1B.js → init-Cigr_tKx.js} +47 -43
  156. package/dist/init-CuW7rHNA.js +3584 -0
  157. package/dist/{init-CFYsq82V.js → init-CyAY4Lzl.js} +1 -1
  158. package/dist/init-Cz0rz5fU.cjs +3585 -0
  159. package/dist/{init-BKhH6mVR.cjs → init-D6BxBs7e.cjs} +1 -1
  160. package/dist/init-D8OeObDF.cjs +1141 -0
  161. package/dist/init-D9g1HXYf.cjs +40 -0
  162. package/dist/{init-CNLGJJRx.js → init-DA7zmptx.js} +1 -1
  163. package/dist/{init-DkIc5nqF.cjs → init-DFMiP2ZH.cjs} +1 -1
  164. package/dist/{init-zSzCjoor.js → init-DFjT8YvT.js} +4 -4
  165. package/dist/init-DGjXwWs2.cjs +143 -0
  166. package/dist/init-DHrCbpkW.cjs +121 -0
  167. package/dist/{init-B64zCLxG.cjs → init-DUF4ar8P.cjs} +4 -4
  168. package/dist/init-DlqJuHhl.js +119 -0
  169. package/dist/{init-y2Ra0vZP.js → init-Dnsv155v.js} +3 -3
  170. package/dist/init-DrRdf5sZ.cjs +1176 -0
  171. package/dist/init-DuYENxci.js +17 -0
  172. package/dist/{init-D6DBUsD3.cjs → init-Dv3zKj0r.cjs} +4 -4
  173. package/dist/{init-BtzMZ7Pk.cjs → init-Dy-05ktr.cjs} +1 -1
  174. package/dist/{init-BsCBAGWf.cjs → init-EP0CUWNK.cjs} +2 -2
  175. package/dist/{init-BJVU54pI.cjs → init-EhzD7a8i.cjs} +1 -1
  176. package/dist/{init-w9GEs73W.js → init-Fw89ZmrR.js} +2 -2
  177. package/dist/init-GsT2AEa4.cjs +424 -0
  178. package/dist/{init-Rxohwpmu.js → init-NCjgwCZy.js} +2 -2
  179. package/dist/{init-DxUHsN53.cjs → init-NdhG_VrF.cjs} +6 -6
  180. package/dist/{init-DDdhguVC.js → init-SZ01tARX2.js} +2 -2
  181. package/dist/{init-BAJJzBza.js → init-Y3mkB4XS.js} +2 -2
  182. package/dist/init-c4l6r-o-.js +5 -0
  183. package/dist/{init-Dku4b2lG.js → init-kEfUTuG2.js} +1 -1
  184. package/dist/{init-C7IeJwQR.cjs → init-lzHt4Cli.cjs} +256 -59
  185. package/dist/{init-anYu6XB7.cjs → init-rmt7-fQE.cjs} +2 -2
  186. package/dist/{init-C4Bkib9u.cjs → init-zU-_9Gsp.cjs} +67 -65
  187. package/dist/{is-retriable-error-BU0e3hVI.js → is-retriable-error-BUiVJDwH.js} +1 -1
  188. package/dist/{is-retriable-error-CeeuHqDa.cjs → is-retriable-error-Dpt860if.cjs} +1 -1
  189. package/dist/jubjub-authoriser-D7zDXu3V.js +86 -0
  190. package/dist/jubjub-authoriser-Dgu6o3Sv.cjs +87 -0
  191. package/dist/key-source-5oUBFiC7.cjs +583 -0
  192. package/dist/key-source-B08HukZg.js +2550 -0
  193. package/dist/keyDerivation-D3k9XyHg.js +4077 -0
  194. package/dist/keyDerivation-u0nBA93T.cjs +274 -0
  195. package/dist/{lace-context-CZcNHr4M.js → lace-context-BZciB9c7.js} +4 -4
  196. package/dist/{lace-context-fJTDghdp.cjs → lace-context-DgR6vLli.cjs} +4 -4
  197. package/dist/lib--iqvW4O_.js +2354 -0
  198. package/dist/lib-Yk6Upl5D.cjs +2359 -0
  199. package/dist/{libsodium-wrappers-UH0LaOUE.js → libsodium-wrappers-BhbOA8dQ.js} +3 -1647
  200. package/dist/midnight-account-id.vo-0x9X-r3l.cjs +10 -0
  201. package/dist/midnight-account-id.vo-DjCAGcqc.js +5 -0
  202. package/dist/midnight-engine-DpemplKO.js +5 -0
  203. package/dist/midnight-engine-xU1wotne.cjs +6 -0
  204. package/dist/midnight-wallet-DIsAlSn6.js +18 -0
  205. package/dist/midnight-wallet-XTZc2li7.cjs +24 -0
  206. package/dist/midnight.cjs +1408 -0
  207. package/dist/midnight.d.ts +28934 -0
  208. package/dist/midnight.js +1352 -0
  209. package/dist/modules-cardano-B1nDUWqy.js +995 -0
  210. package/dist/modules-cardano-BYeYHrRm.cjs +1108 -0
  211. package/dist/node-relay-DWe1U0w2.cjs +49 -0
  212. package/dist/node-relay-h4i5IlAQ.js +48 -0
  213. package/dist/outputs-Bd2yZVjx.js +720 -0
  214. package/dist/outputs-CJoQBIA2.cjs +990 -0
  215. package/dist/pbkdf2-CIW-oWrm.cjs +1337 -0
  216. package/dist/pending-operation-B0_P78Jo.cjs +26 -0
  217. package/dist/pending-operation-BIS6mpjB.js +21 -0
  218. package/dist/providers-FjhM47BH.cjs +388 -0
  219. package/dist/providers-WtiSuxFu.js +365 -0
  220. package/dist/redacted-BmE2aXqr.js +81 -0
  221. package/dist/redacted-CRZJLS3w.cjs +86 -0
  222. package/dist/{retry-config-DC5IMaH7.cjs → retry-config-BaCfVC1H.cjs} +1 -1
  223. package/dist/{retry-config-BcUmMS--.js → retry-config-Dmgt28wM.js} +1 -1
  224. package/dist/safe-buffer-B_vMqJWU.js +43 -0
  225. package/dist/safe-buffer-DYOwEfHB.cjs +48 -0
  226. package/dist/sdk-Cb-gZnS9.js +1241 -0
  227. package/dist/sdk-DffwmX8b.cjs +1439 -0
  228. package/dist/sdk-init-Bln9rFtn.js +4138 -0
  229. package/dist/sdk-init-CYViTJY_.cjs +3841 -0
  230. package/dist/{seam-cardano-CATqBEyK.js → seam-cardano-B_etH4F4.js} +1 -1
  231. package/dist/{bytes.vo-TgiwogWF.js → secret-box-DUR0ACYz.js} +3 -25
  232. package/dist/{bytes.vo-Ck5u40RA.cjs → secret-box-DrjLZuS1.cjs} +1 -35
  233. package/dist/send-proof-progress-C-ljq1x5.js +30 -0
  234. package/dist/send-proof-progress-vmsaSfbz.cjs +47 -0
  235. package/dist/side-effects-BnqYz7Nl.js +768 -0
  236. package/dist/side-effects-CngaeXi0.cjs +804 -0
  237. package/dist/sign-bitcoin-transaction-with-seed-D4z62-jV.js +147 -0
  238. package/dist/sign-bitcoin-transaction-with-seed-DsLYXnCY.cjs +158 -0
  239. package/dist/signer-3fk8lZtE.cjs +7 -0
  240. package/dist/signer-CsL28DrK.cjs +121 -0
  241. package/dist/signer-DGluibtn.js +92 -0
  242. package/dist/signer-RqB5pu3K.js +2 -0
  243. package/dist/signer-factory-BA7WFJVZ.js +282 -0
  244. package/dist/signer-factory-Cwd6o-lG.cjs +281 -0
  245. package/dist/{signer-factory-9URFliA5.js → signer-factory-DObB55D4.js} +6 -3
  246. package/dist/signer-factory-DhZiE03y.cjs +149 -0
  247. package/dist/{signer-factory-BWGUmnvm.cjs → signer-factory-Ds6G2AZk.cjs} +4 -3
  248. package/dist/signer-factory-hzSRaIw2.js +148 -0
  249. package/dist/{slice-CuHUaPZx.cjs → slice-7G2xxYKJ.cjs} +3 -3
  250. package/dist/{slice-DZmQJNV8.cjs → slice-B4CdYoPu.cjs} +2 -2
  251. package/dist/slice-BPNuHKfw.js +9091 -0
  252. package/dist/{slice-DGcNrbPR.cjs → slice-Bg6HEr3K.cjs} +4 -4
  253. package/dist/{slice-DtaO72qY.cjs → slice-Bs2aMERu.cjs} +3 -3
  254. package/dist/{slice-HeHCv3bl.cjs → slice-C34iOOUH.cjs} +7 -7
  255. package/dist/{slice-Do2R2CYW.cjs → slice-C9TT5KhY.cjs} +6 -6
  256. package/dist/{slice-eIwcwKHI.js → slice-CK07EBCo.js} +4 -4
  257. package/dist/{slice-CnyWevM9.js → slice-CU80pbiu.js} +3 -3
  258. package/dist/{slice-CobanYgn.js → slice-CwyYrh1H.js} +2 -2
  259. package/dist/slice-Czfp6t84.cjs +436 -0
  260. package/dist/{slice-d0p6-xj5.js → slice-D-9aPKG-.js} +6 -6
  261. package/dist/{slice-maaskdUn.js → slice-DBpJ2QGf.js} +6 -6
  262. package/dist/{slice-mxLQ_FeY.cjs → slice-DTZTiJle.cjs} +352 -39
  263. package/dist/{slice-zJ9XVYjZ.js → slice-Da426sf9.js} +1 -1
  264. package/dist/{slice-D11m2EKl.cjs → slice-DayJvMRD.cjs} +1 -1
  265. package/dist/slice-DnBWfA-k.cjs +9109 -0
  266. package/dist/{slice-oqm_r1cS.cjs → slice-DnG-yvpI.cjs} +2 -2
  267. package/dist/{slice-BNu73oBa.js → slice-DyNs7oWp.js} +2 -2
  268. package/dist/{slice-CB4SnzMm.js → slice-GwiiJRoq.js} +3 -3
  269. package/dist/slice-oWnc7YVD.js +412 -0
  270. package/dist/{slice-B2PhoWAg.js → slice-qt0uBExh.js} +325 -37
  271. package/dist/slice-t8Gzj55G2.cjs +106 -0
  272. package/dist/slice-t8Q1cHm-.js +88 -0
  273. package/dist/src-BDzYIksE.cjs +20637 -0
  274. package/dist/src-BFoefPv_.js +20755 -0
  275. package/dist/store-B1Lq3cEf.cjs +66 -0
  276. package/dist/store-DuBG8qh5.js +37 -0
  277. package/dist/submit-Bs77dPn_.cjs +413 -0
  278. package/dist/submit-DOv8Z0Vf.js +336 -0
  279. package/dist/submit-bitcoin-tx-D6oYgH5S.js +983 -0
  280. package/dist/submit-bitcoin-tx-goFuRL7K.cjs +1049 -0
  281. package/dist/{sync-operation-utils-BYXLO80m.js → sync-operation-utils-31iFLExW.js} +2 -38
  282. package/dist/{sync-operation-utils-SdPbwFoD.cjs → sync-operation-utils-COIZ66-I.cjs} +1 -67
  283. package/dist/token-id-mapper-Bnds3xKH.cjs +18 -0
  284. package/dist/{token-id-mapper-DsPAL6Nh.cjs → token-id-mapper-CVyQJUKY.cjs} +2 -2
  285. package/dist/token-id-mapper-CnKHQ8DV.js +16 -0
  286. package/dist/{token-id-mapper-B2ivlLv3.js → token-id-mapper-D29Ggv8h.js} +2 -2
  287. package/dist/tokens-Cevp7rdU.cjs +62 -0
  288. package/dist/tokens-Diw4MLRM.js +44 -0
  289. package/dist/types-B8uiJn-X.js +12 -0
  290. package/dist/types-BHC12eSa.js +33 -0
  291. package/dist/types-CJT6XF2c.js +10 -0
  292. package/dist/types-CLRUYpfe.cjs +23 -0
  293. package/dist/types-Cc3mC8u0.cjs +50 -0
  294. package/dist/types-DWbVZpnF.cjs +15 -0
  295. package/dist/unwrap-provider-result-BZSiwabU.js +32 -0
  296. package/dist/unwrap-provider-result-ZqfBsTkk.cjs +39 -0
  297. package/dist/{util-CGzqQ8IV.cjs → util-Bu4W5lF4.cjs} +1 -1
  298. package/dist/{util-BaLzwa32.js → util-Cp5cZkfK.js} +1 -1
  299. package/dist/{utils-o8aMjfln.js → utils-BfBEUvWA.js} +2 -2
  300. package/dist/utils-DFwzEvbv.js +65 -0
  301. package/dist/{utils-5JvjbqH3.cjs → utils-DsElZgCI.cjs} +7 -1
  302. package/dist/utils-IXxR-Djh.cjs +112 -0
  303. package/dist/v8Signatures-CO_Uloy7.cjs +71 -0
  304. package/dist/{vote-delegation-tx-builder-BpEMSti4.cjs → vote-delegation-tx-builder-BUg1S2Ep.cjs} +6 -6
  305. package/dist/{vote-delegation-tx-builder-CmKv6GoG.js → vote-delegation-tx-builder-C6FiS7zI.js} +5 -5
  306. package/dist/watch-CUEvcP-V.js +21997 -0
  307. package/dist/watch-DMF2s-II.cjs +52281 -0
  308. package/package.json +96 -4
  309. package/dist/account-guards.stable-B1DSSh9D.cjs +0 -10
  310. package/dist/account-guards.stable-JRQ5qx2V.js +0 -5
  311. package/dist/codecs-B7X9pAsK.cjs +0 -1945
  312. package/dist/codecs-CC1Xjntz.js +0 -1882
  313. package/dist/init-Bv53hpLM.js +0 -19
  314. package/dist/init-CRbjI7p1.js +0 -3494
  315. package/dist/init-DAna1KCg.cjs +0 -3495
  316. package/dist/init-DGe47B22.cjs +0 -364
  317. package/dist/init-DMtyvYfC.cjs +0 -21
  318. package/dist/init-TkPDD750.js +0 -363
  319. package/dist/modules-cardano-BDvuL4Xx.js +0 -5248
  320. package/dist/modules-cardano-D2G3De2P.cjs +0 -5432
  321. package/dist/slice-CGVHXHDt.cjs +0 -125
  322. package/dist/slice-DhvF7L6X.js +0 -107
  323. /package/dist/{account-id.vo-LvCBVn5r.cjs → account-id.vo-DwqFjK5u.cjs} +0 -0
  324. /package/dist/{account-id.vo-MYSI7YFm.js → account-id.vo-OPz2v-JZ.js} +0 -0
  325. /package/dist/{actions-DdGbj7c7.cjs → actions-B2BJ4RTy.cjs} +0 -0
  326. /package/dist/{actions-9QSQR-GB.js → actions-iLXdgL5Y.js} +0 -0
  327. /package/dist/{apply-vkey-witnesses-ClZbpk5w.js → apply-vkey-witnesses-BKx3lcs0.js} +0 -0
  328. /package/dist/{apply-vkey-witnesses-CLzVSWxl.cjs → apply-vkey-witnesses-ZnFS0jnJ.cjs} +0 -0
  329. /package/dist/{asyncoption-Cw07zPH7.js → asyncoption-CruEYOBI.js} +0 -0
  330. /package/dist/{asyncoption-DYoGuQfP.cjs → asyncoption-i0VbqVTq.cjs} +0 -0
  331. /package/dist/{bignum.vo-B0rK_PQ1.js → bignum.vo-CEXOIew0.js} +0 -0
  332. /package/dist/{bignum.vo-DsG3kNiZ.cjs → bignum.vo-hx2kuqlA.cjs} +0 -0
  333. /package/dist/{bip32ed25519-1ApqeAZk.cjs → bip32ed25519-B7Yat217.cjs} +0 -0
  334. /package/dist/{bip32ed25519-DetAdGwD.js → bip32ed25519-FQ8qvdcq.js} +0 -0
  335. /package/dist/{blake2b-DOEVc57D.js → blake2b-BiQTw3GC.js} +0 -0
  336. /package/dist/{blake2b-B9tftbvG.cjs → blake2b-DEeVUdKR.cjs} +0 -0
  337. /package/dist/{blockchain-network-id.vo-BXpZhvvQ.cjs → blockchain-network-id.vo-BAKEwGjG.cjs} +0 -0
  338. /package/dist/{blockchain-network-id.vo-DNRkuT5B.js → blockchain-network-id.vo-CiVykuqG.js} +0 -0
  339. /package/dist/{blockingWithLatestFrom-C5wp_uA-.js → blockingWithLatestFrom-Cd8c8EPG.js} +0 -0
  340. /package/dist/{blockingWithLatestFrom-DY8OPg0w.cjs → blockingWithLatestFrom-D8kBPBMX.cjs} +0 -0
  341. /package/dist/{cardano-network-id-to-network-type-CrZfUcyP.js → cardano-network-id-to-network-type-BWwzeEtM.js} +0 -0
  342. /package/dist/{cardano-network-id-to-network-type-BDTF-HmK.cjs → cardano-network-id-to-network-type-C0ufJOyE.cjs} +0 -0
  343. /package/dist/{cardano-tx-id.vo-BPhV-AmZ.cjs → cardano-tx-id.vo-TLjJZHCI.cjs} +0 -0
  344. /package/dist/{cardano-tx-id.vo-DF9NzZXk.js → cardano-tx-id.vo-eVnKuzlm.js} +0 -0
  345. /package/dist/{composite-signer-factory-_46QsNBz.js → composite-signer-factory-CR8YHA1y.js} +0 -0
  346. /package/dist/{composite-signer-factory-BpF1mIYA.cjs → composite-signer-factory-m5cVs9h_.cjs} +0 -0
  347. /package/dist/{error-CNIquqT5.cjs → error-Cb3EnD0u.cjs} +0 -0
  348. /package/dist/{error-BCp9NkPi.js → error-DIZOY2Lw.js} +0 -0
  349. /package/dist/{esm-browser-C93Q-EOI.js → esm-browser-MG97cre9.js} +0 -0
  350. /package/dist/{esm-browser-DTc9IK3D.cjs → esm-browser-bweqfBlL.cjs} +0 -0
  351. /package/dist/{feature-flag-key.vo-ofrB6ZVQ.js → feature-flag-key.vo-DN_-4-sG.js} +0 -0
  352. /package/dist/{feature-flag-key.vo-BPz-ZAp6.cjs → feature-flag-key.vo-RlfHL3hq.cjs} +0 -0
  353. /package/dist/{first-state-of-status-OROkXcRv.cjs → first-state-of-status-CbT7hPa4.cjs} +0 -0
  354. /package/dist/{first-state-of-status-DQnMT3ya.js → first-state-of-status-unPynOuM.js} +0 -0
  355. /package/dist/{init-Es3wHW7D.js → init-829HRYcz.js} +0 -0
  356. /package/dist/{init-CKipPE_c.js → init-A-VyGSNW2.js} +0 -0
  357. /package/dist/{init-DFQQ9dTW.cjs → init-Atisw4x2.cjs} +0 -0
  358. /package/dist/{init-C5CEZ1m0.cjs → init-BFcvPHL-.cjs} +0 -0
  359. /package/dist/{init-IAk_CkGa.cjs → init-BgNobbNq.cjs} +0 -0
  360. /package/dist/{init-cqN3uX2j.js → init-atCFur0v.js} +0 -0
  361. /package/dist/{is-redux-persist-state-CTn3WZVh.cjs → is-redux-persist-state-BCFnSm36.cjs} +0 -0
  362. /package/dist/{is-redux-persist-state-Cxcd0_bM.js → is-redux-persist-state-yBfq0h_E.js} +0 -0
  363. /package/dist/{key-value-store-8cMzeNyG.js → key-value-store--W3SrMaw.js} +0 -0
  364. /package/dist/{key-value-store-DUAepXQf.cjs → key-value-store-C2Xt5Emp.cjs} +0 -0
  365. /package/dist/{repo-slice-WxetRhMY.cjs → repo-slice-7X4AYYVm.cjs} +0 -0
  366. /package/dist/{repo-slice-DwyMhCR1.js → repo-slice-RxFm0zDZ.js} +0 -0
  367. /package/dist/{reselect-CRDqmQY9.cjs → reselect-Bd94u0K-.cjs} +0 -0
  368. /package/dist/{reselect-C06X06oX.js → reselect-CGoLzEPv.js} +0 -0
  369. /package/dist/{serializable-B8GahgE1.js → serializable-BHdKIgk3.js} +0 -0
  370. /package/dist/{serializable-CRdnFaLZ.cjs → serializable-BxHkoPdk.cjs} +0 -0
  371. /package/dist/{slice-D11FHQuQ.cjs → slice-BiRsDKOK.cjs} +0 -0
  372. /package/dist/{slice-Be7hj4Iy.js → slice-Bk0Sv05J.js} +0 -0
  373. /package/dist/{slice-FioKeHtA.cjs → slice-Dqw1ecum.cjs} +0 -0
  374. /package/dist/{slice-B87b52iM.js → slice-obCSLm1x.js} +0 -0
  375. /package/dist/{src-vq1wS9sZ.js → src-BlxEp6Mm.js} +0 -0
  376. /package/dist/{src-BTPIvlDI.cjs → src-Cqp0B2M_.cjs} +0 -0
  377. /package/dist/{time.vo-CQ8pSXz2.cjs → time.vo-D3wWRw9L.cjs} +0 -0
  378. /package/dist/{time.vo-DkYYGYp6.js → time.vo-tNheinXm.js} +0 -0
  379. /package/dist/{toEmpty-CgAl3097.js → toEmpty-8Zax1MPd.js} +0 -0
  380. /package/dist/{toEmpty-DAMmNB5r.cjs → toEmpty-CYAbupM4.cjs} +0 -0
  381. /package/dist/{token-id.vo-ClsroxHO.js → token-id.vo-Bvwhr3ZE.js} +0 -0
  382. /package/dist/{token-id.vo-BxG9TG0O.cjs → token-id.vo-DXv5uS9n.cjs} +0 -0
  383. /package/dist/{util-DxzlYNS5.js → util-C8a4fA9p.js} +0 -0
  384. /package/dist/{util-CmdAhheh.cjs → util-CzeB3hfa.cjs} +0 -0
  385. /package/dist/{util-selector-CcK-GAdE.js → util-selector-BSTsxgne.js} +0 -0
  386. /package/dist/{util-selector-BcAncU4L.cjs → util-selector-BWPH68_l.cjs} +0 -0
  387. /package/dist/{while-active-BpppWuCs.js → while-active-B0lWy_6l.js} +0 -0
  388. /package/dist/{while-active-Dhc2LwOm.cjs → while-active-Dsowp0Fi.cjs} +0 -0
@@ -0,0 +1,191 @@
1
+ import { Cardano } from "@laceio/cardano/core";
2
+ import { InvalidStringError } from "@laceio/cardano/util";
3
+ //#region ../../packages/lib/cardano-custody/src/blueprint/account-validator.ts
4
+ /**
5
+ * Compiled code of the account proxy (`account.account`) as the blueprint
6
+ * carries it: the flat program in one CBOR byte string wrap. Its mint, spend
7
+ * and else handlers share this code. It takes no parameter, so it is the
8
+ * same on every network, and it holds no account rule of its own: it runs
9
+ * the logic script the control datum names.
10
+ */
11
+ const ACCOUNT_VALIDATOR_COMPILED_CODE = "590aac01010029800aba4aba2aba1aba0aab9faab9eaab9dab9a48888888966003300130033754013223232330010010042259800800c00e26464b30013372200c00315980099b8f00600189bab300a002802a0108998020021807001a010375c60100026016002804852f5bded8c1230073008001911919800800801912cc00400629462b30013003300a0018998010011805800c528200a4021374a90004dd2a4005370e90014cdc624000901c48c01cc020c020c0200066e1d2000911919800800801912cc004006297ae0899912cc004c01400a26601600466008008003133004004001401c60140026016002804244646600200200644b30010018a508acc004c00cc02800629462660040046016002802900848c01cc020c020006444653001001802400d0011112cc00400a200319800801cc03400a660086018004002801900a4dc3a4009230073008300830083008300830080019192cc0040062d1375c60100028030c010dd5000cdc3a400c9111111111111111114c004c06404a603002522301033019301a30173754602066032601e660326ea40092f5c06603298103d87a80004bd701980c98081980c98081980c98079980c9ba90014bd7025eb812f5c097ae091119912cc00400a29422653001301e301f001992cc004c040c06cdd5000c4dd6980e180f9bab301f301c375400314800101a180f000cdd5801a444b30010018acc004cdd780180344cc01400920008a5040711325980099baf4c01014000301e0018acc004cc01800cdd6980f98111bab301f001899baf004374c604600514a080ea2b30013300600348002266ebc01001e294101d203a3021001407c329800800c01a446603e0046603e6e980052f5c08008889660020051330014c0103d87a80004bd6f7b63044c8cc896600266e452201000028acc004cdc7a44100002899802180c998111810001a5eb80006266008980103d87a80000054079198008034006446600c0046604800a002803101e1bae301d00130220033020002407914a114a114a080f8dd31980d19bb037520046e98cc068cdd81ba90014c010101004bd6f7b63025eb7bdb1808928c888c03cc8cc88cc0080080048966002003003899192cc004cdc8803000c56600266e3c01800626eb4c07400a00a80da266008008604200680d8dd7180d800980f000a038330150040031480024464646600200200844b30010018a508acc004cdd7801980c980e800c528c4cc008008c0780050182036300f33019375200297ae09192cc004c018c058dd5000c4c068c05cdd5000c590151803980b1baa0014888888a6002603e00f301f3020007911919800800801912cc00400629462b3001323301b3301d3756603860426ea800401096600260326eb4c088006266ebcc094c088dd500119805802980c1bae30210018a504080604600313300200230240018a504078810a4444b3001300f301f3754602260406ea80122b300198009bab301b30203754009002800a00e899baf30233020375400800714a080f2294101e244446644b3001301600289919912cc004c0640062b3001302537540130028b204c8acc004c0700062b3001302537540130028b204c8acc004c0500062b3001302537540130028b204c8b2046408c8118660026603e6eacc098c09cc09cc09cc09cc08cdd5006800c888966002005168992cc004cc08800c8c96600266e1cdd69815001002456600266e1cdc6800a408113371e604000200714a0814229410281bae30280018cc004016009001401d14a08130c074dd718131815001205098111baa00748896600260340031325980080240062b3001302b0048992cc004c07cdd69814000c4c8c966002603c60526ea800626464b30013370e901c1b8d0048acc004cc078dd5981798181818181818181818181818181818181818161baa01623259800980d18169baa00189919912cc004c09400a266ebcc0d0c0c4dd5001800c566002603a00513375e606860626ea800c006294102f205e302e3754002604e660626ea401d2f5c060626064605c6ea8006294102c1816000c56600330013756604e60586ea800a015004405115980099baf4c0103d87a80003021302c3754005159800998071bac301d302c375402c01515980099b87480e0dc6800c4cc048dd5980d18161baa0160018a5040a914a08152294102a452820548a5040a914a08150c060c040004c0b4c0a8dd5000c590281919912cc00400a003159800981800144c094cc0b8c0bc0092f5c100140b48168cc074dd6180d98151baa01429800800c00a0130034030298103d87a800033012007001375c604e0030024098605400900140a081405284566002603a003159800cc004042009003a400480122660106eb0c05cc098dd5008002452820488cc004042009003a40028011024204818111baa007375c604a60446ea80162b30013019002899199119912cc004c06c0062b3001302737540170028b20508acc004c0780062b3001302737540170028b20508acc004c0580062b3001302737540170028b20508acc004c04c0062b3001302737540170028b20508b204a409481290250994c004c966002603c604c6ea800626eb8c0a8c09cdd5000c59025181498131baa3029302637546042604c6ea800664b3001301b3026375400313259800980e18139baa0018992cc004c080c0a0dd5000c4dd7181618149baa0018b204e302b302837540031640986054604e6ea80062c8128c084c098dd5181498131baa302130263754003223375e980101a000374c660480040029112cc004c054c0a0dd5006c566002660026eacc090c0a4dd5181218149baa0040038992cc004c084c0a4dd500344cc004dd6181698151baa014232598009980f198141bab3027302c375400200c466e3cc08cdd7181600080344cdd7981798161baa001330150060058a5040a8604c60566ea80062660026eb0c0b4c0a8dd500a14c004c098c0acdd5000ccc05001401200b0044030814088c8cc00400400c896600200314a115980098019818000c528c4cc008008c0c400502b205c8a50409d159800cc00404e0070024021159800acc004cc004dd5981218149baa30243029375400800714a313300b3758603460526ea804c00d0274566003300198009bab302430293754604860526ea801200700240414a14a2813a294626644b30010018014566002605e0031325980099baf302f302c37540026602a00c00b159800cc004dd5981398161baa00180340150144566002b3001301b302b3754603a60586ea80062946294102a44cdd7a60103d87a80003021302c375400314a08152294102a45282054302e001801205840b02940cc070dd6180d18149baa013298009bab3025302a3754003004801a022409d14a0813a2941027204e192cc004c068c094dd5000c4c0a4c098dd5000c5902419198008009bac30293026375402044b30010018a60103d87a80008992cc004cdd7981598141baa0010058981099815000a5eb8226600600660580048130c0a800502818121baa0093026001302630270013022375400b1640808100c07cdd5001911192cc004c060c08cdd5000c4cc028dd5980918121baa0043011300930273024375400314a08110c8c8cc89660020050018acc004c0ac00a2604066052605400497ae0800a05040a1300137586040604a6ea8017300137586050604a6ea801697ae0800a02a800a02a14c103d87a80002259800cc004c084c098dd5001400e00b004401d1330283021302637540040031001409066018004002229344d95900101";
12
+ /**
13
+ * Hash of the account proxy: the payment credential of every custody account
14
+ * address, the policy id of every account token, and the parameter the stake
15
+ * and logic scripts are applied to.
16
+ */
17
+ const ACCOUNT_VALIDATOR_HASH = "ed61963ac94d12c0b320be5a336c36af66bc02c380e0aa3001899253";
18
+ //#endregion
19
+ //#region ../../packages/lib/cardano-custody/src/blueprint/logic-v1.ts
20
+ /**
21
+ * Compiled code of logic version 1 (`logic_v1.logic_v1`) applied to the
22
+ * account proxy hash, its only parameter. The proxy takes no parameter, so
23
+ * this script is the same on every network. Its withdraw, publish and else
24
+ * handlers share this code.
25
+ */
26
+ const LOGIC_V1_COMPILED_CODE = "5923ad0101003229800aba4aba2aba1aba0aab9faab9eaab9dab9a9bae002488888888966003300130043754015370e90004dc3a400d370e90014dc3a40089111119194c004c028dd5000c8966002601060186ea800a2b3001300d37540050018b201c8b20169807003cc038009222259800980380244c8cc0100085660026012601e6ea800633001375c602660206ea80064464646600200200844b3001001801c4c8c96600266e440180062b30013371e00c00313756602e0050054055133004004301b00340546eb8c054004c0600050160a5eb7bdb182460226ea800646028602a602a003230143015001911919800800801912cc004006297ae0899912cc004c01400a266030004660080080031330040040014050602e002603000280aa29426e952000911919800800801912cc00400629462b300130033017001899801001180c000c52820244055230143015301530153015301530153015301530150019119198008008019119801800980100148c050c054c054c054c054c054c054c054c05400644646600200200644b30010018a518acc004c00cc05c006266004004603000314a080910154dd2a4005337189000240712232330010010032259800800c52f5c1133016300330170013300200230180014055371e9101009119b8a0029800a51a40110015e4a46028602a602a602a602a602a602a602a0032232598009807000c4c8c96600260320050048b202c375c602e00260266ea800e2b3001300c001899192cc004c06400a0091640586eb8c05c004c04cdd5001c59011202230113754005230143015301530150019b804800a44b30010018a5eb822646602a6ea4004cc00c00cc8cc004004c06000c896600200314bd7044cc896600330013371e00400b4a14a280aa2660326ea4008cc01001000626600800800280a8dd7180c000980c800a02c375c602a002809a46028602a602a602a602a602a0032301430153015301530150019b894800244646600200200644b30010018a508acc004cdc39bad30170010038a51899801001180c000a02440552232330010010032259800800c528456600266e3cdd7180b800801c528c4cc008008c060005012202a9180a180a980a980a980a980a980a800a444444444444444444444444444453001222323322330020020012259800800c00e26464b30013372200c00315980099b8f00600189bad3035002802a066899802002181c801a066375c6066002606c00281a0cc08001000c520009192cc0040062d1375c60640028180c070006464b3001302a302e375400313259800981598179baa0018992cc004c0a8c0c0dd5000c4dd7181a18189baa0018b205e3033303037540031640b86064605e6ea80062c8168c068c0b8dd5000c88c8cc00400400c896600200314c103d87a80008992cc004c010006260366606800297ae0899801801981b0012060303400140c923259800981398171baa0018981918179baa0018b205a301b302e37540032259800981518171baa00289919191919194c004dd6981c000cdd7181c0034dd6981c0024dd6981c001cdd6181c001244444b3001303e0068998101bac303d00a225980080144cc08800c8966002005010899180118218019bad304100240fd13230023041003375c607e00481ea2c81d86070002606e002606c002606a0026068002605e6ea800a2c816a446030660626064605e6ea8c060cc0c4c048cc0c4dd480125eb80cc0c530103d87a80004bd7019818980c19818980c198189809198189ba90014bd7025eb812f5c097ae091119912cc00400a2942265300130363037001992cc004c0bcc0ccdd5000c4dd6981a181b9bab303730343754003148001032181b000cdd5801a444b30010018acc004cdd780180344cc01400920008a5040d11325980099baf4c0101400030360018acc004cc01800cdd6981b981d1bab3037001899baf004374c607600514a081aa2b30013300600348002266ebc01001e2941035206a303900140dc329800800c01a446606e0046606e6e980052f5c08008889660020051330014c0103d87a80004bd6f7b63044c8cc896600266e452201000028acc004c06000a266008604266074607000697ae000189980226103d87a800000540d9198008034006446600c0046607800a00280310361bae3035001303a003303800240d914a114a114a081b8dd31981919bb037520046e98cc0c8cdd81ba90014c010101004bd6f7b63025eb7bdb1808928c89660026054605c6ea800a26464653001375a606a00330360019bad30350039bae303500248889660026074007132598009819181b1baa00189919191919194c004dd69820000cc1040066eb4c1000166eb4c1000126eb4c10000e6eb4c100009222222598009823802c4c966002607e60866ea8006264646644b3001304c0038998171bac304b00a2259800801407226644b30013047304b3754005132323259800982980144cc0b0c14800c4c966002609600313259800982a800c4c8c966002609c00313259800982c000c4cc0c4c15c0040262c82a8c14cdd500145660026098003132323298009bad30590019bad30590039bad305900248896600260ba00900e8b20b4182c800982c00098299baa0028b20a2414460a26ea8004c1500062c8290c140dd50014566002609200315980098281baa002802c5905145904e209c304e375400316414060a200260a200260986ea800a2c8250c1340084c004c13800904b4590491bae3049001375c6092004609200260886ea80062c8210c1180322c82206080002607e002607c002607a0026078002606e6ea80062c81a8c0e400e2c81b8606a0026068002605e6ea800a2c816a466ebd300103d87a8000300a302e3754003223375e980101a000374c6603c0040032259800800c5200089805198010011819800a0609803803c89660020031480022601466004004606600281824464646600200200844b30010018a508acc004cdd78019818981a800c528c4cc008008c0d80050302066301233031375200297ae092cc004c038dd7181898171baa001898071bae301a302e375400314a0816122222222222222229800911181ccc00400e005001404d222330283756604e60806ea800c8cc8966002607860846ea8006264b30013375e006980103d87c80008a518992cc00401226644b300130420018acc004c11cdd5003400a00682422b300130400018acc004c11cdd5003400a00682422b3001303f0018acc004c11cdd5003400a00682422b300130410018acc004c11cdd5003400a00682420068229045208a41142b3001303f3044375400914a313259800982098229baa0018992cc006600266ebcc128c11cdd5181998239baa001009a50a51411514a31330080063033304737540028228c124c118dd5000c528a0883301537586090608a6ea80208cdd7982498231baa001003410c60886ea8012003001800c00504a0a514108608c60866ea8006294504118208009820000c8c8cc0340044004c03400644660460044660506605e6eacc0b0c100dd500080112cc004c0e8dd69820800c4cdd7982218209baa0023300e0033023375c608000314a081fa44453001004801ccc08000800500d48c8cc0280044004c0340064446644b30010018014566002608c0031302b3304430450014bd704009043208614c103d87a80003302b0032303a98009bab302d3041375400300380120289114c00400e005001403130050059801801a444444444464646530013758609a003222259800982318269baa303b304e3754009159800cc004dd5981d18271baa004801400501144cdd7982898271baa0040038a50413114a08262464b3001337129001000c56600266e2400520108acc004cdc3980398099bac3038304c375400400315980098119bad3039304c375400515980098119bad3028304c375400515980098119bad3025304c375400515980099b89375a604a60986ea80092020899b8930063758604860986ea800920408a50412914a08252294104a452820948a50412914a08252294104a18031bac3037304b37540029112cc00400e264b30010018992cc004c14c0062646644b300198009bab303e3052375400704f801201c8acc004c018006264b3001304e30523754003132598009980c9bab30283054375408e604c00315980099b883259800800c5a26eb4c160005056182c182c18210009bad30413054375400715980099baf3040305437540066e9cc966002003168991981e000912cc00400a20071323002305d003375c60b600482c8dd6182c000a0ac3058304200189980e9bab302c3054375408e0a314a082922941052452820a43022303f3053375460ac60a66ea80062b30013375e6e98cc108dd5981598299baa046050374c660aa66ec0dd4801a610101004bd6f7b6304566002609c6eb4c0bcc14cdd5001456600266ebd301018000302b305337540051304e375a605860a66ea800a2941051452820a28a5041448288cc088dd6182a98291baa04529800981f98299baa00199810028001c14200680422941050452820a03021305330503754002602200260a4003164140660726eb0c0ecc138dd502094c00400609903f40211598009829000c660024530010029bae305330503754003375c607860a06ea80050234a600200348900a441004089225980099b8800100288014400504e4889660026466002002660826eacc0f8c148dd5002001912cc00400629422b30013371e606a6eb8c148c15800400e294626600400460ae002828905444cdd7982a18289baa0033301e0020018a50413d22329800800c00e004800888966002005100189919914c00401a60b400b32330010010052259800800c4cc168cdd81ba9004374c00697adef6c6089919912cc004cdc8803801456600266e3c01c00a264b30013375e98101a000374c003100289982f19bb037520106e9800400905a194c0040066eacc17001200e800888966002005100189919914c00401a60ca00b32330010010052259800800c4cc194cdd81ba9004375000697adef6c6089919912cc004cdc8803801456600266e3c01c00a264b30013370e00266e052000007880144cc1a4cdd81ba9008375066e0000401c0090651bad306600389983419bb0375200e6ea001801106444cc1a000ccc0140140050641bae30630013068002306600141908030dd7182f0009bad305f0013061002417d13305d337606ea401cdd300300220b289982e80199802802800a0b2375c60b000260ba00460b600282c90061bae3053001375660a800260ac00482a2444653001001802400d0011112cc00400a200319800801cc16000a6600860ae00400280190554c0e8c138dd51828800a4444444646644b3001330213756606060b06ea812c1562b3001980099198008009bac30463059375409844b30010018a508acc006600260ba00305782520268a51899801001182f000a0b0416d4a14a282b23300104b801c896600260a660b26ea800a266446644b30013059305d375400313259800cc004dd59825982f9baa00682e40266eb4c188c17cdd5002a03c8acc004c160c8cc004004dd6183198301baa0532259800800c52000899912cc0066002609e60c66ea800a0c100d40491303e0018800a0c230640013300200230650014189159800acc004cdc39bad304c305f375400a6eb4c130c17cdd50044660026606a6eb0c0dcc17cdd50041bad3062305f375400b4a14a282ea294105d4566002660686eb0c110c17cdd50291bae304b305f375400b159800992cc004c164c17cdd5000c4cdc49bad3063306037540026eb4c0e4c180dd5181e18301baa0068a50417860c460be6ea8c12cc17cdd5181e982f9baa0528acc004c8cc896600266e24008dd6982718311baa0038acc004cdc48011bad304f30623754007159800acc004c098c194c188dd5001c528c56600266e24004dd6981f18311baa003899b89001375a607460c46ea800e294106020c08991919800800804112cc0040062946264664466446600400400244b30010018801c4c8c9660026600800860e000715980099baf00100a8a518acc004c0c00062946266e24dd6983600124000835106a452820d430543306d375200a660da60d400297ae0306d00141ac6eacc1a000cdd718328009980180198350011834000a0cc30653062375400714a083022941060452820c0330120043063306037540026022008607660be6ea80162b300133225980099baf4c1018000374e00314a313304500225980099baf30653062375400200f14a313232330010010042259800800c528456600266ebcc1a000400e294626600400460d20028319066183298311baa001418082f8dd61826182f9baa0523758606660be6ea8c0ecc17cdd5002c566002660866eb0c130c17cdd502912cc006600266ebcc18cc180dd5000802d28528a0bc8a518acc006600200305d805201e8a518acc004cdd7a6103d8798000304d3060375400313375e98103d87a8000303c3060375400314a082f105e20bc8acc004cc07ccc100dd61831182f9baa0522304c306037540020b91598009980f9bac304c305f37540a40b915980099baf3062305f375400200915980099baf304b305f3754002609660be6ea801a2b3001332259800982c98301baa001899198168008acc004cdd799191826998331833801198331833800998331833983400099833191919182819834983500199834983500119834982a18339baa304330673754010660d260d4002660d2607e60ce6ea8c10cc19cdd50041835983580098351835000983480098321baa30403064375400697ae0306700130623754002007159800981c9bad304f30623754607c60c46ea80062b3001337126eb4c13cc188dd5181f18311baa001375a609e60c46ea8c0f8c188dd5001c56600260726eb4c0e8c188dd5181f18311baa001899b89375a607460c46ea8c0f8c188dd50009bad303a30623754607c60c46ea800e2941060452820c08a50418114a08300c190c184dd5000c52820be3232304a33063306400233063306400133063306430650013306332323232304e33067306800333067306800233067375066e04dd6982918329baa0043301548000cc05c024c1a0c194dd5002198339834000998339ba8598009814983418329baa00489bad303d306537540091337026eb4c0f4c194dd50021980aa4000602c0128318c1a4c1a4004c1a0c1a0004c19c004c188dd5000981e98309baa0074bd701832000982f9baa005304c305f37540031598009814800c4cc0a0dd5981b982f9baa05205c8a50417514a082ea294105d452820ba8a50417514a082ea294105d452820ba8a50417514a082ea294105d452820ba8a50417514a082e8c184c178dd5000c5905c198054c004dd6182f982e1baa04fa5eb7bdb18244b30013375e60c260bc6ea8c128c178dd5001001c4cc030004dd59825182f1baa304a305e3754005100141708048c8cc00400660026eb0c128c174dd502852f5bded8c1225980099baf3062305f375400400913300d0013756609660be6ea800a200282e900a112cc004006297adef6c608991983099bb0305e001374c64660020026eacc180008896600200314bd6f7b63044c8cc190cdd818308009ba83370290001bad3062001330030033066002306400141886600600660c600460c200282fa60026eb0c124c170dd5027c1666607600c6eb4c17cc170dd500120323018001305d305a375400314a082c101a452820ac8a504158604e002602e00460b060aa6ea8005038413c8278dd618281828802456600260a20071598009bac305030510048cc004c14000e44464b3001304c0018992cc00400600713259800800c01200900480244c96600260b0007006802a0aa375c00282c0c15400505318289baa0048acc004c128006264b3001001801c4c966002003004802401200913259800982c001c01a00a82a8dd7000a0b03055001414c60a26ea8012004827904f18279baa003912cc0040062900044c0a8cc008008c14c00505048cdc39b8d00148102464b30010018b44dd69829000a0a0303c001911919800800801912cc004006298103d87a80008992cc004cdd78021828800c4c0eccc150c1480052f5c11330030033056002414060a80028292444646644b3001002800c56600260ae0051303c3305530560024bd70400505420a83303c00429800800c00a009003401c298103d87a80003301d0020019119198008009bac303c3050375400644b30010018a508acc004cc09800cdd7182a000c528c4cc008008c15400504f20a4488888888ca6002604e0033017304230563754013300700748896600266ebd30103d87980003259800982a982c9baa00189919912cc004c1600062b3001305d37540070028b20bc8acc004c1580062b3001305d37540070028b20bc8acc004c1540062b3001305d37540070028b20bc8acc004c15c0062b3001305d37540070028b20bc8b20b6416c82d905b0800982d1baa001305d305a37540031641606600e6eacc100c164dd5026181e1982d982e182c9baa00c4bd7045660026607a6eb0c118c164dd502612cc004cdd7982e982d1baa0010058a518cc00660020030578252026a50a51416082c2264b30013259800800c528c4c96600260aa00313259800982c182e1baa0018992cc004cc02801cdd61821982f1baa0518994c004006900040150011112cc0040062946264b300198008024c0f400e60cc00480222646644b3001306030643754005132325980098301bad30670068acc004cdc780299823008801c56600266ebcc1a8c19cdd50011981a032008c5660033001375660a660ce6ea800a0c900540cd1598009818801456600266e1cdd6983518339baa0010038acc004cdc39bad3054306737540026eb4c150c19cdd500544c966002b3001303f375a60a860d06ea80062b3001303f375a60aa60d06ea80062b3001303f375a608860d06ea80062607e6eb4c100c1a0dd5000c52820cc8a50419914a083322b30013371090001bad30413068375400315980099b8930103758607860d06ea800520108acc004c0b0c1acc1a0dd5000c56600260c66eb4c110c1a0dd5000c4c18cdd6982018341baa0018a50419914a283322941066452820cc8a504198608660ce6ea80062941065452820ca8a50419514a0832a2941065452820ca8a504194604800260d060ca6ea800a2c831a60026eb0c140c18cdd502b41820028100cdc01bad303f306337540180086eb8c18400629410601832000a0c48a504170603c60c060ba6ea80062c82da60026eb0c124c170dd5027c16600c804a2b300130540018acc004cc020014dd61820982e1baa04f8998220011192cc004c014dd6982f0014566002601c00313371e608000201114a082e2294105c1bae305c0018a50416914a082d105a182d1baa3259800982b982d9baa00189919912cc004c1680062b3001305f37540070028b20c08acc004c1600062b3001305f37540070028b20c08acc004c15c0062b3001305f37540070028b20c08b20ba417482e84004c170dd5000982f982e1baa0018b20b4330093756608460b66ea8138c110cc174dd482c25eb8105c198249bab3032305a375409a0af19800826c0164464b300130580018acc00660026eacc124c174dd5001416a00e81022b3001330090063758608460ba6ea81422b30013301d3303e375860c060ba6ea81408c128c178dd500082d45660026603a6eb0c128c174dd502802d44c96600260b260ba6ea80062646464b30013371e0020a313302f0021323259800cc004dd5982798319baa005830403501f4566002602e00915980099b89375a60a060c66ea8030dd6982818319baa0048acc004cdc39bad303f3063375400866e00dd6981f98319baa00c001899b87375a607860c66ea8010cdc099b80375a607860c66ea8030004dd698331833801452820c28a50418514a0830a29410611bad3065001329800800ccc144dd5981d18311baa05505fa5eb8501000081010000200222259800801440063300100398340014c8cc8966002b30013017002899b8f30490020118a50419513322598009831001c4cc1acdd41822001198359ba80014bd704566002602000713306b3750004660d66ea0c1100052f5c116419c8338dd698350021bad306a306b0048b20ca375c60c80026eb4c194004c19c00900320ca8acc004cc098dd5981a98309baa0540018998151bab3039306137540a80bd14a082f905f181900098170009830982f1baa0018b20b898009bac304a305d37540a105a803a0148a50416d14a082da294105b452820b68acc004c15400626464b300198009bab304b305f375400905c804c00501e4566002660160106eb0c110c17cdd5029456600264b30013371064b30010018b44dd69832000a0c430643064304e003375a609a60c06ea802629462b3001330363758607060c06ea8024c03c00e2946264b30010048acc004c170c180dd500244c9660020030028992cc004006007003801c4cc89660020030058992cc00400600d006803401a26644b300100180444c966002003009804c02626644b3001001805c4c9660020031598009838001456600260ce60d66ea8006264b3001001806c4c96600200313259800800c03e264b300100180840420211332259800800c04a264b3001001809c04e0271332259800800c056264b300100180b405a02d1332259800800c062264b300100180cc0660331332259800800c06e264b300100180e40720391332259800800c07a264b300100180fc07e264b30013084010038acc004c1ecc1fcdd5009c4c9660020030218992cc004006045022811408a26644b300100181244c966002003025812c09604b13259800984500801c4cc1b001c8966002005132598009841009844009baa001899b88375a60c46112026ea8c194c22404dd50161bad308c01308901375400314a0843808c22c04c22004dd51845809844009baa0298992cc004006264b3001308501308901375400513259800800c0ae264b30010018992cc00400605b13259800800c56600261240200519800801c4c96600261140200313259800800c0c2264b30010018acc004c2540400a264b3001308d010018992cc00400606713259800800c56600261300200519800800c02e068823206884a80a06903481a40d109901184b00800a128023092013754005159800984580800c4c9660020030338992cc00400606903481a44cc89660020030368992cc00400606f03781bc4cc89660020030398992cc00400607503a81d44c966002613e0200701281da13802375a00303a427c0461380200284d008dd6800984d8080140dd09c01184c80800a12e02375a002613002005034426404612c0200284a008c24804dd500140c9090012120023090013754003031424805031818c0c606284b008c24c04005091011847809baa0028acc004c220040062b3001308f013754005006817a12002817a11a02423404611a026ea800605c820205c84780a05d02e81740b909301184800800a11c0230900100281640b205902c424404611c02002846008c22804dd500140a90880109801184680801c0a6053029814a11c02308b01002422405026421c046eb800508a01184380800a10a02375c002610c02004843808c21004005082011840009baa01381020fc810210202375800301f80fa1080230810100141fc6eb4004c2000400a038840808c1f800507c1bad001307d00280ca0fc307b00141e46eb4004c1e800a02c83d8c1e00050761bad0013077002809a0f0307500141cc6eb4004c1d000a02083a8c1c80050701839001403a01d00e80720e6307000141b860d86ea80060188352018836a01900c80640310711837000a0d8375a00260da00500941b860d60028348dd7000983500120d6306800141986eb4004c19c00a0068340c19400506318309baa004800a0be800c0060030014198294105e20bc303d305f37540a51300698009bab3037305f37540a505c9981f004800a0648a50417514a082ea294105d18068009816001452820b6416c60b66ea800901c452820b0370e9000c52820ae8a50415c305830553754608260aa6ea8021037413903741388270660966e9ccc0d0dd6182618249baa03c0013304b374e660686eb0c0d4c124dd501e000a5eb80a6002606a60926ea800608d039400844464b30013043304a375400313298009827800c5284c13cc130dd50012444b30013048304e375400713259800982598279baa0018992cc004c130c140dd5000c4c966002609660a26ea80062b30013371e6eb8c154c148dd5003005456600330013756607c60a46ea802e015375c60aa60a46ea800501544cdc79812002004c52820a08a504141005414060a860a26ea80060088278c14cc140dd5000c00d04e18291829802400904d0cc134c138c12cdd5182718259baa0043304d3037304b3754609c60966ea80112f5c114a08248c0dcc128dd500188b201c3012300f375400b159800980480244c8cc88cc0180104c966002601c60246ea800a2b3001300c30123754602c60266ea800a2946002808a00280885281bad301300130133014001300f375400b1640348068601a601c002601a00a8a4d1365640084c011e581ced61963ac94d12c0b320be5a336c36af66bc02c380e0aa30018992530001";
27
+ /**
28
+ * Hash of logic version 1 applied to the account proxy hash: what a control
29
+ * datum names in its first field, and the script stake credential the proxy
30
+ * requires a withdrawal from to run the logic.
31
+ */
32
+ const LOGIC_V1_HASH = "2cd68e398bdf9fbc8d257614b54403451ee722520ec785fe14f8df5a";
33
+ //#endregion
34
+ //#region ../../packages/lib/cardano-custody/src/blueprint/provenance.ts
35
+ /** Upstream revision of the vendored blueprint. */
36
+ const CUSTODY_CONTRACT_REVISION = "b48545f4be850c1044de2dbeb51751718b4b8e70";
37
+ /** Compiler the blueprint names in its preamble. */
38
+ const CUSTODY_CONTRACT_COMPILER = "Aiken v1.1.24+bacbeb3";
39
+ /**
40
+ * SHA-256 of the vendored `plutus.json`, byte for byte as upstream committed
41
+ * it. Re-pinning the blueprint changes this value; a script hash changes only
42
+ * when that validator's code changes.
43
+ */
44
+ const CUSTODY_BLUEPRINT_SHA256 = "8b48096f70a5d0cb207659fcc7875b5f0639f7822604c6e7db439212b5374dde";
45
+ //#endregion
46
+ //#region ../../packages/lib/cardano-custody/src/blueprint/stake-validator.ts
47
+ /**
48
+ * Compiled code of the account stake validator (`account_stake.account_stake`)
49
+ * before parameter application, as the blueprint carries it. Its parameters
50
+ * are, in order, `owner: VerificationKeyHash` and `proxy_hash: ScriptHash`.
51
+ */
52
+ const UNAPPLIED_STAKE_VALIDATOR_COMPILED_CODE = "5904bb0101002229800aba2aba1aba0aab9faab9eaab9dab9a9bae0039bae002488888888966003300130053754015222323322330020020012259800800c00e26464b30013372200c00315980099b8f00600189bad300d002802a0168998020021808801a016375c6016002601c0028060c8c8cc0040040188966002003003899192cc004cdc8804000c56600266e3c02000626eacc03800a00a806226600800860240068060dd718060009807800a01a14bd6f7b6300a400123009300a0019180498051805000cdd2a4001370e90024dc3a40052232330010010032259800800c528456600266e3cdd71806000801c528c4cc008008c03400500720149192cc0040062d13232330010010022259800800c400e26466006006601e0046eb8c03400500b1bac300a00140206014600c6ea80064601260146014601460146014601460146014003370e90002444444444453001301400b9809805c88c024cc050c054c048dd518049980a19ba548008cc050dd480125eb80cc051300103d87a80004bd701980a18049980a18049980a19ba548008cc050dd4800a5eb812f5c097ae04bd704888966002601460266ea8c030c050dd50024566002601330013756601a60286ea8012005001403913375e602e60286ea801000e2941012452820249192cc004c020c044dd5000c4c054c048dd5000c59010180498089baa001912cc004c00cc044dd5001456600260246ea800a00316404d164040911111194c004c058dd5000c888cc88cc8966002601e603a6ea800a26466002002602460166030603e6ea8c088c07cdd5001912cc00400629422b300133014003375c604600314a313300200230240014078810a2c80e0c8cc004004c8cc00400400c896600200310058998109811000998010011811800a0402259800800c530103d87a80008992cc00660026030603e6ea80066601a00e00d00780320188980b19810800a5eb82266006006604600480e8c08400501f1bac300e301c375400a6eb0c074c068dd50019bac3013301a3754007301a0074889660026020007132330060021598009808180d1baa0018cc00402a02f375c603c60366ea8005003459019180e980d1baa0048acc004cdc3a400c007132332233008004198008a50980e1baa00191112cc004cc054dd6180998109baa0040038acc004c05a60026eacc090c094c094c094c094c084dd5002400a00280da264b30013013302137540031330163015300e302530223754002009164080646644b3001002800c56600260500051301b3302630270024bd704005025204a32330010013758603660466ea8018896600200314bd7044cc89660033001002802c01e00c809a266050004660080080031330040040014090604e00260500028128530103d87a80003300f0020018a50407d14a080f922259800980880144c966002602c60406ea80063300101080f40766eb8c090c084dd5000a004802203e30233020375400915980099b874801800a264b300130163020375400319800808407a03b375c604860426ea8005002401101f181198101baa0048acc004c05800a264b30013016302037540031980080840766eb8c090c084dd5000a012802203e302330203754009003407880f101e0dd6980f000980f180f800980d1baa0048b203040603019301a006229344d95900301";
53
+ /** Hash of the stake validator before parameter application. */
54
+ const UNAPPLIED_STAKE_VALIDATOR_HASH = "edcfa41389b7b924916ad7408cd2d0f75a7a3dae8717f9bbf1a668c6";
55
+ //#endregion
56
+ //#region ../../packages/lib/cardano-custody/src/blueprint/reference-scripts.ts
57
+ /** The account proxy and logic version 1, parked on Preprod. */
58
+ const PREPROD_REFERENCE_SCRIPTS = [{
59
+ scriptHash: "ed61963ac94d12c0b320be5a336c36af66bc02c380e0aa3001899253",
60
+ txIn: {
61
+ txId: "574e6c3d2e64303015f4db89930848b47fef501c65c448a59d843a383a63fc7e",
62
+ index: 0
63
+ },
64
+ address: "addr_test1wqkddr3e300el0ydy4mpfd2yqdz3aeez2g8v0p07znud7ksuhmmkz",
65
+ coins: 12692950n
66
+ }, {
67
+ scriptHash: "2cd68e398bdf9fbc8d257614b54403451ee722520ec785fe14f8df5a",
68
+ txIn: {
69
+ txId: "000b0715bb8613761555becc9b50105dd3e23b93f91bce01dea72c3bbd0228f8",
70
+ index: 0
71
+ },
72
+ address: "addr_test1wqkddr3e300el0ydy4mpfd2yqdz3aeez2g8v0p07znud7ksuhmmkz",
73
+ coins: 40281260n
74
+ }];
75
+ //#endregion
76
+ //#region ../../packages/lib/cardano-custody/src/result.ts
77
+ const ok = (value) => ({
78
+ ok: true,
79
+ value
80
+ });
81
+ const fail = (error) => ({
82
+ ok: false,
83
+ error
84
+ });
85
+ //#endregion
86
+ //#region ../../packages/lib/cardano-custody/src/contract-version.ts
87
+ const LOGIC_V1 = {
88
+ hash: LOGIC_V1_HASH,
89
+ title: "logic_v1",
90
+ script: {
91
+ __type: Cardano.ScriptType.Plutus,
92
+ bytes: LOGIC_V1_COMPILED_CODE,
93
+ version: Cardano.PlutusLanguageVersion.V3
94
+ }
95
+ };
96
+ const CUSTODY_CONTRACT_B48545F = {
97
+ accountValidatorHash: ACCOUNT_VALIDATOR_HASH,
98
+ accountValidator: {
99
+ __type: Cardano.ScriptType.Plutus,
100
+ bytes: ACCOUNT_VALIDATOR_COMPILED_CODE,
101
+ version: Cardano.PlutusLanguageVersion.V3
102
+ },
103
+ logics: [LOGIC_V1],
104
+ currentLogicHash: LOGIC_V1.hash,
105
+ unappliedStakeValidator: {
106
+ compiledCode: UNAPPLIED_STAKE_VALIDATOR_COMPILED_CODE,
107
+ hash: UNAPPLIED_STAKE_VALIDATOR_HASH,
108
+ bodyBitLength: 9658
109
+ },
110
+ referenceScripts: { [Cardano.NetworkMagics.Preprod]: PREPROD_REFERENCE_SCRIPTS },
111
+ blueprintSha256: CUSTODY_BLUEPRINT_SHA256,
112
+ compiler: CUSTODY_CONTRACT_COMPILER,
113
+ revision: CUSTODY_CONTRACT_REVISION,
114
+ deviceAccountIndex: {
115
+ default: 1,
116
+ byNetworkMagic: { [Cardano.NetworkMagics.Mainnet]: 0 }
117
+ }
118
+ };
119
+ /** Every supported contract version, oldest first. */
120
+ const SUPPORTED_CUSTODY_CONTRACT_VERSIONS = [CUSTODY_CONTRACT_B48545F];
121
+ /** The version Lace creates new custody accounts with. */
122
+ const CURRENT_CUSTODY_CONTRACT_VERSION = CUSTODY_CONTRACT_B48545F;
123
+ /**
124
+ * The supported contract version an account validator hash names. Any other
125
+ * hash is refused: Lace cannot derive or verify identities, nor sign for
126
+ * accounts, of a build it has not pinned.
127
+ */
128
+ const findCustodyContractVersion = (accountValidatorHash) => {
129
+ const version = SUPPORTED_CUSTODY_CONTRACT_VERSIONS.find((candidate) => candidate.accountValidatorHash === accountValidatorHash);
130
+ return version ? ok(version) : fail({
131
+ code: "unsupported-contract-version",
132
+ accountValidatorHash
133
+ });
134
+ };
135
+ /**
136
+ * The logic of a version's catalogue that a control datum names. Any other
137
+ * hash is refused: Lace cannot judge what an account under unreviewed rules
138
+ * allows, so it neither operates nor signs for one.
139
+ */
140
+ const findCustodyLogic = (version, logicHash) => {
141
+ const logic = version.logics.find((candidate) => candidate.hash === logicHash);
142
+ return logic ? ok(logic) : fail({
143
+ code: "unknown-logic",
144
+ logic: logicHash
145
+ });
146
+ };
147
+ /**
148
+ * The UTxOs that park a version's proxy and logic scripts on a network, as
149
+ * the chain holds them: each at its pinned outref and address, with its
150
+ * pinned lovelace and the vendored script as its reference script. None on
151
+ * a network without parked scripts.
152
+ */
153
+ const custodyReferenceScriptUtxos = (version, networkMagic) => (version.referenceScripts[networkMagic] ?? []).flatMap(({ scriptHash, txIn, address, coins }) => {
154
+ const logic = findCustodyLogic(version, scriptHash);
155
+ const script = scriptHash === version.accountValidatorHash ? version.accountValidator : logic.ok ? logic.value.script : void 0;
156
+ return script ? [[{
157
+ ...txIn,
158
+ address
159
+ }, {
160
+ address,
161
+ value: { coins },
162
+ scriptReference: script
163
+ }]] : [];
164
+ });
165
+ /**
166
+ * The CIP-1854 account index `a` of `m/1854'/1815'/a'` that holds the
167
+ * creator and device keys of a version's accounts on a network. A later
168
+ * contract version may give networks separate index ranges, so callers
169
+ * always take the index from here and never assume one.
170
+ */
171
+ const custodyDeviceAccountIndex = (version, networkMagic) => version.deviceAccountIndex.byNetworkMagic[networkMagic] ?? version.deviceAccountIndex.default;
172
+ const LOWER_CASE_HEX = /^(?:[\da-f]{2})*$/;
173
+ const WHOLE_BYTES_HEX = /^(?:[\da-f]{2})*$/i;
174
+ /** Whether a value is lower-case hex of whole bytes, optionally of a given byte length. */
175
+ const isLowerCaseHex = (value, byteLength) => typeof value === "string" && LOWER_CASE_HEX.test(value) && (byteLength === void 0 || value.length === byteLength * 2);
176
+ /** Whether a value is the lower-case hex of a 28-byte hash. */
177
+ const isHash28Hex = (value) => isLowerCaseHex(value, 28);
178
+ /**
179
+ * The bytes of a hex string. Throws for an odd length or a non-hex character
180
+ * rather than silently dropping or zeroing them: `HexBlob` admits an odd
181
+ * length, and an encoder must never write bytes other than the ones it holds.
182
+ */
183
+ const hexToBytes = (hex) => {
184
+ if (!WHOLE_BYTES_HEX.test(hex)) throw new InvalidStringError(`expected hex of whole bytes, got '${hex}'`);
185
+ const bytes = new Uint8Array(hex.length / 2);
186
+ for (let index = 0; index < bytes.length; index++) bytes[index] = Number.parseInt(hex.slice(index * 2, index * 2 + 2), 16);
187
+ return bytes;
188
+ };
189
+ const bytesToHex = (bytes) => Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
190
+ //#endregion
191
+ export { CURRENT_CUSTODY_CONTRACT_VERSION as a, custodyReferenceScriptUtxos as c, fail as d, ok as f, isLowerCaseHex as i, findCustodyContractVersion as l, hexToBytes as n, SUPPORTED_CUSTODY_CONTRACT_VERSIONS as o, isHash28Hex as r, custodyDeviceAccountIndex as s, bytesToHex as t, findCustodyLogic as u };
@@ -0,0 +1,167 @@
1
+ require("./rolldown-runtime-Br2OG8yv.cjs");
2
+ const require_src = require("./src-Cqp0B2M_.cjs");
3
+ const require_error = require("./error-Cb3EnD0u.cjs");
4
+ let rxjs = require("rxjs");
5
+ let rxjs_fetch = require("rxjs/fetch");
6
+ //#region ../../packages/lib/util-provider/src/http-client.ts
7
+ const REPORTED_OPERATIONS = new Set([
8
+ "accounts",
9
+ "addresses",
10
+ "assets",
11
+ "blocks",
12
+ "epochs",
13
+ "genesis",
14
+ "governance",
15
+ "health",
16
+ "metadata",
17
+ "network",
18
+ "pools",
19
+ "rpc",
20
+ "scripts",
21
+ "tx",
22
+ "txs"
23
+ ]);
24
+ /**
25
+ * Provides a default no-op `RateLimiter` implementation that executes tasks immediately
26
+ * without applying any rate limiting. It is used as a default dependency in clients
27
+ * when no functional rate limiter is provided.
28
+ */
29
+ const NULL_RATE_LIMITER = { schedule: async (task) => {
30
+ return task();
31
+ } };
32
+ /**
33
+ * Best‑effort helper that attempts to read the `Response` body as text.
34
+ * Returns undefined if the stream has already been consumed or an error
35
+ * occurs.
36
+ */
37
+ const tryReadResponseText = async (response) => {
38
+ try {
39
+ return await response.text();
40
+ } catch {
41
+ return;
42
+ }
43
+ };
44
+ /**
45
+ * Safely constructs a new `URL` by appending path segments to a base URL.
46
+ *
47
+ * This utility provides a robust way to build URLs programmatically. It handles
48
+ * common formatting issues, such as missing or extra slashes in the base URL
49
+ * and segments, preventing errors that can arise from simple string concatenation.
50
+ *
51
+ * @param segments - An array of path segments to append. Each segment is sanitized
52
+ * to remove leading/trailing slashes, and empty segments are ignored.
53
+ * @param baseUrl - The base URL string. The function ensures it's treated as a
54
+ * directory path for correct resolution.
55
+ * @returns A new `URL` object representing the final, correctly formatted URL.
56
+ */
57
+ const buildUrl = (segments, baseUrl) => {
58
+ const baseWithSlash = baseUrl.endsWith("/") ? baseUrl : `${baseUrl}/`;
59
+ const relativePath = segments.map((s) => {
60
+ if (!s) return s;
61
+ let cleanedSegment = s;
62
+ while (cleanedSegment.startsWith("/")) cleanedSegment = cleanedSegment.slice(1);
63
+ while (cleanedSegment.endsWith("/")) cleanedSegment = cleanedSegment.slice(0, -1);
64
+ return cleanedSegment;
65
+ }).filter(Boolean).join("/");
66
+ return new URL(relativePath, baseWithSlash);
67
+ };
68
+ /**
69
+ * A client for making HTTP requests to a remote server.
70
+ *
71
+ * This client is built upon the `fetch` API and RxJS for handling asynchronous
72
+ * operations. It provides a structured way to interact with a JSON-based API,
73
+ * featuring configurable request options, pluggable rate limiting, and robust,
74
+ * consistent error handling.
75
+ */
76
+ var HttpClient = class {
77
+ rateLimiter;
78
+ baseUrl;
79
+ requestInit;
80
+ /**
81
+ * Initializes a new instance of the `HttpClient`.
82
+ *
83
+ * @param config - The configuration object that defines the client's base URL
84
+ * and default request options. See {@link HttpClientConfig}.
85
+ * @param dependencies - An object containing external services the client relies
86
+ * on, such as a rate limiter. See {@link HttpClientDependencies}.
87
+ */
88
+ constructor({ baseUrl, requestInit }, { rateLimiter = NULL_RATE_LIMITER } = {}) {
89
+ this.rateLimiter = rateLimiter;
90
+ this.requestInit = requestInit;
91
+ this.baseUrl = new URL(baseUrl);
92
+ if (!this.baseUrl.pathname.endsWith("/")) this.baseUrl.pathname += "/";
93
+ }
94
+ /**
95
+ * Performs an HTTP request to a specified endpoint.
96
+ *
97
+ * @typeParam T - The expected type of the data in the response body.
98
+ *
99
+ * @param endpoint - The relative path of the API endpoint, which is resolved
100
+ * against the `baseUrl`. For example, `'users/latest'`.
101
+ * @param options - Optional settings for this specific request, including URL
102
+ * query parameters (`params`) and `fetch` options. These settings are merged
103
+ * with any defaults provided in the constructor. See {@link HttpRequestOptions}.
104
+ *
105
+ * @returns A `Promise` that resolves with an {@link HttpRequestResponse} object,
106
+ * containing the parsed response data and the HTTP status code.
107
+ *
108
+ * @throws `HttpClientError` The promise will reject with an `HttpClientError` if
109
+ * the request fails due to a network issue, if the server returns a non-OK
110
+ * (4xx/5xx) status code, or if the response body cannot be parsed as JSON.
111
+ */
112
+ async request(endpoint, options = {}) {
113
+ const { params, ...requestInit } = options;
114
+ const url = new URL(endpoint.replace(/^\/+/, ""), this.baseUrl);
115
+ if (params) {
116
+ for (const [k, v] of Object.entries(params)) if (v !== void 0) url.searchParams.append(k, String(v));
117
+ }
118
+ return this.rateLimiter.schedule(async () => (0, rxjs.firstValueFrom)((0, rxjs_fetch.fromFetch)(url.toString(), {
119
+ ...this.requestInit,
120
+ ...requestInit,
121
+ headers: {
122
+ ...this.requestInit?.headers,
123
+ ...requestInit?.headers
124
+ }
125
+ }).pipe((0, rxjs.switchMap)(async (response) => {
126
+ if (response.ok) {
127
+ let body;
128
+ try {
129
+ body = await response.json();
130
+ } catch {
131
+ throw new require_error.HttpClientError(response.status, "Failed to parse json");
132
+ }
133
+ return {
134
+ data: body,
135
+ status: response.status
136
+ };
137
+ }
138
+ throw new require_error.HttpClientError(response.status, await tryReadResponseText(response));
139
+ }), (0, rxjs.catchError)((error) => {
140
+ if (error instanceof require_error.HttpClientError) return (0, rxjs.throwError)(() => error);
141
+ if (error instanceof TypeError && error.message === "Failed to fetch") try {
142
+ const operation = endpoint.replace(/^\/+/, "").split(/[/?]/)[0] ?? "";
143
+ require_src.getObservability().captureException(new require_error.HttpClientError(void 0, "Failed to fetch"), { tags: {
144
+ component: "HttpClient",
145
+ failure: "UNKNOWN",
146
+ method: (requestInit.method ?? this.requestInit?.method ?? "GET").toUpperCase(),
147
+ origin: url.origin,
148
+ ...REPORTED_OPERATIONS.has(operation) && { operation }
149
+ } });
150
+ } catch {}
151
+ return (0, rxjs.throwError)(() => new require_error.HttpClientError(void 0, void 0, error));
152
+ }))));
153
+ }
154
+ };
155
+ //#endregion
156
+ Object.defineProperty(exports, "HttpClient", {
157
+ enumerable: true,
158
+ get: function() {
159
+ return HttpClient;
160
+ }
161
+ });
162
+ Object.defineProperty(exports, "buildUrl", {
163
+ enumerable: true,
164
+ get: function() {
165
+ return buildUrl;
166
+ }
167
+ });
@@ -0,0 +1,155 @@
1
+ import { t as getObservability } from "./src-BlxEp6Mm.js";
2
+ import { t as HttpClientError } from "./error-DIZOY2Lw.js";
3
+ import { catchError, firstValueFrom, switchMap, throwError } from "rxjs";
4
+ import { fromFetch } from "rxjs/fetch";
5
+ //#region ../../packages/lib/util-provider/src/http-client.ts
6
+ const REPORTED_OPERATIONS = new Set([
7
+ "accounts",
8
+ "addresses",
9
+ "assets",
10
+ "blocks",
11
+ "epochs",
12
+ "genesis",
13
+ "governance",
14
+ "health",
15
+ "metadata",
16
+ "network",
17
+ "pools",
18
+ "rpc",
19
+ "scripts",
20
+ "tx",
21
+ "txs"
22
+ ]);
23
+ /**
24
+ * Provides a default no-op `RateLimiter` implementation that executes tasks immediately
25
+ * without applying any rate limiting. It is used as a default dependency in clients
26
+ * when no functional rate limiter is provided.
27
+ */
28
+ const NULL_RATE_LIMITER = { schedule: async (task) => {
29
+ return task();
30
+ } };
31
+ /**
32
+ * Best‑effort helper that attempts to read the `Response` body as text.
33
+ * Returns undefined if the stream has already been consumed or an error
34
+ * occurs.
35
+ */
36
+ const tryReadResponseText = async (response) => {
37
+ try {
38
+ return await response.text();
39
+ } catch {
40
+ return;
41
+ }
42
+ };
43
+ /**
44
+ * Safely constructs a new `URL` by appending path segments to a base URL.
45
+ *
46
+ * This utility provides a robust way to build URLs programmatically. It handles
47
+ * common formatting issues, such as missing or extra slashes in the base URL
48
+ * and segments, preventing errors that can arise from simple string concatenation.
49
+ *
50
+ * @param segments - An array of path segments to append. Each segment is sanitized
51
+ * to remove leading/trailing slashes, and empty segments are ignored.
52
+ * @param baseUrl - The base URL string. The function ensures it's treated as a
53
+ * directory path for correct resolution.
54
+ * @returns A new `URL` object representing the final, correctly formatted URL.
55
+ */
56
+ const buildUrl = (segments, baseUrl) => {
57
+ const baseWithSlash = baseUrl.endsWith("/") ? baseUrl : `${baseUrl}/`;
58
+ const relativePath = segments.map((s) => {
59
+ if (!s) return s;
60
+ let cleanedSegment = s;
61
+ while (cleanedSegment.startsWith("/")) cleanedSegment = cleanedSegment.slice(1);
62
+ while (cleanedSegment.endsWith("/")) cleanedSegment = cleanedSegment.slice(0, -1);
63
+ return cleanedSegment;
64
+ }).filter(Boolean).join("/");
65
+ return new URL(relativePath, baseWithSlash);
66
+ };
67
+ /**
68
+ * A client for making HTTP requests to a remote server.
69
+ *
70
+ * This client is built upon the `fetch` API and RxJS for handling asynchronous
71
+ * operations. It provides a structured way to interact with a JSON-based API,
72
+ * featuring configurable request options, pluggable rate limiting, and robust,
73
+ * consistent error handling.
74
+ */
75
+ var HttpClient = class {
76
+ rateLimiter;
77
+ baseUrl;
78
+ requestInit;
79
+ /**
80
+ * Initializes a new instance of the `HttpClient`.
81
+ *
82
+ * @param config - The configuration object that defines the client's base URL
83
+ * and default request options. See {@link HttpClientConfig}.
84
+ * @param dependencies - An object containing external services the client relies
85
+ * on, such as a rate limiter. See {@link HttpClientDependencies}.
86
+ */
87
+ constructor({ baseUrl, requestInit }, { rateLimiter = NULL_RATE_LIMITER } = {}) {
88
+ this.rateLimiter = rateLimiter;
89
+ this.requestInit = requestInit;
90
+ this.baseUrl = new URL(baseUrl);
91
+ if (!this.baseUrl.pathname.endsWith("/")) this.baseUrl.pathname += "/";
92
+ }
93
+ /**
94
+ * Performs an HTTP request to a specified endpoint.
95
+ *
96
+ * @typeParam T - The expected type of the data in the response body.
97
+ *
98
+ * @param endpoint - The relative path of the API endpoint, which is resolved
99
+ * against the `baseUrl`. For example, `'users/latest'`.
100
+ * @param options - Optional settings for this specific request, including URL
101
+ * query parameters (`params`) and `fetch` options. These settings are merged
102
+ * with any defaults provided in the constructor. See {@link HttpRequestOptions}.
103
+ *
104
+ * @returns A `Promise` that resolves with an {@link HttpRequestResponse} object,
105
+ * containing the parsed response data and the HTTP status code.
106
+ *
107
+ * @throws `HttpClientError` The promise will reject with an `HttpClientError` if
108
+ * the request fails due to a network issue, if the server returns a non-OK
109
+ * (4xx/5xx) status code, or if the response body cannot be parsed as JSON.
110
+ */
111
+ async request(endpoint, options = {}) {
112
+ const { params, ...requestInit } = options;
113
+ const url = new URL(endpoint.replace(/^\/+/, ""), this.baseUrl);
114
+ if (params) {
115
+ for (const [k, v] of Object.entries(params)) if (v !== void 0) url.searchParams.append(k, String(v));
116
+ }
117
+ return this.rateLimiter.schedule(async () => firstValueFrom(fromFetch(url.toString(), {
118
+ ...this.requestInit,
119
+ ...requestInit,
120
+ headers: {
121
+ ...this.requestInit?.headers,
122
+ ...requestInit?.headers
123
+ }
124
+ }).pipe(switchMap(async (response) => {
125
+ if (response.ok) {
126
+ let body;
127
+ try {
128
+ body = await response.json();
129
+ } catch {
130
+ throw new HttpClientError(response.status, "Failed to parse json");
131
+ }
132
+ return {
133
+ data: body,
134
+ status: response.status
135
+ };
136
+ }
137
+ throw new HttpClientError(response.status, await tryReadResponseText(response));
138
+ }), catchError((error) => {
139
+ if (error instanceof HttpClientError) return throwError(() => error);
140
+ if (error instanceof TypeError && error.message === "Failed to fetch") try {
141
+ const operation = endpoint.replace(/^\/+/, "").split(/[/?]/)[0] ?? "";
142
+ getObservability().captureException(new HttpClientError(void 0, "Failed to fetch"), { tags: {
143
+ component: "HttpClient",
144
+ failure: "UNKNOWN",
145
+ method: (requestInit.method ?? this.requestInit?.method ?? "GET").toUpperCase(),
146
+ origin: url.origin,
147
+ ...REPORTED_OPERATIONS.has(operation) && { operation }
148
+ } });
149
+ } catch {}
150
+ return throwError(() => new HttpClientError(void 0, void 0, error));
151
+ }))));
152
+ }
153
+ };
154
+ //#endregion
155
+ export { buildUrl as n, HttpClient as t };