@laceio/sdk 0.1.0 → 0.1.1-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.
- package/dist/{Ed25519PublicKey-lvu1s54U.cjs → Address-AMKTo-dA.cjs} +17150 -61
- package/dist/{Ed25519PublicKey-CjnuAYRR.js → Address-_c_-9hLC.js} +16955 -264
- package/dist/{Bip32Account-r3KAhCgU.js → Bip32Account-CaW1zC9Y.js} +4 -5
- package/dist/{Bip32Account-Cz3h0ZUa.cjs → Bip32Account-DOaGmKpv.cjs} +4 -5
- package/dist/Cardano-B-gyqBBD.js +311 -0
- package/dist/Cardano-BQ_af0Y3.cjs +322 -0
- package/dist/Ed25519PublicKey-B3QcR0J2.cjs +88 -0
- package/dist/Ed25519PublicKey-DIE19xHg.js +83 -0
- package/dist/InMemoryKeyAgent-Bc_xZY-v.cjs +652 -0
- package/dist/InMemoryKeyAgent-D8T3vtXy.js +631 -0
- package/dist/{PaymentAddress-DhbtuYb7.cjs → PaymentAddress-B4n1KZMx.cjs} +1 -2
- package/dist/{PaymentAddress-xSmGUQ-8.js → PaymentAddress-Cml3EA1n.js} +1 -2
- package/dist/Percent-Cfuw5YyL.cjs +11 -0
- package/dist/Percent-DpvyJ_93.js +5 -0
- package/dist/SodiumBip32Ed25519-BaD-kjyx.cjs +380 -0
- package/dist/SodiumBip32Ed25519-DCikAMsl.js +363 -0
- package/dist/{TransactionBuilder-CeJTNzm-.cjs → TransactionBuilder-BakTJvsJ.cjs} +59 -89
- package/dist/{TransactionBuilder-DGNDM4kt.js → TransactionBuilder-D2ErwVWv.js} +5 -71
- package/dist/_md-6zV2Cme0.cjs +684 -0
- package/dist/_md-gbUqlhqd.js +399 -0
- package/dist/_web-crypto-random-bytes-BvzwTYPG.js +197 -0
- package/dist/acc-module-NL_8mEHH.cjs +27654 -0
- package/dist/acc-module-ur8CkBd1.js +27624 -0
- package/dist/account-call-B7cF8ly4.cjs +293 -0
- package/dist/account-call-BF4rBcNw.js +3 -0
- package/dist/account-call-CoCq3V55.js +252 -0
- package/dist/account-call-DFcD257E.cjs +4 -0
- package/dist/account-guards-BeKbV9D1.cjs +41 -0
- package/dist/account-guards-qnFXuXSE.js +36 -0
- package/dist/{activity-type.stable-ClO9j_PH.cjs → activity-type-BPXxdHBP.cjs} +2 -1
- package/dist/{activity-type.stable-Ml0SOYv9.js → activity-type-C1geyPsH.js} +2 -1
- package/dist/address-OxwXIwbF.js +15502 -0
- package/dist/address-book-address-validator-BqYM0Uyp.cjs +41 -0
- package/dist/{address-book-address-validator-BhqRfmlL.cjs → address-book-address-validator-CGIcqn5W.cjs} +5 -4
- package/dist/{address-book-address-validator-VqIOB8PY.js → address-book-address-validator-FkkYim3z.js} +6 -4
- package/dist/address-book-address-validator-RSx2Jozy.js +39 -0
- package/dist/address-lECYBd9-.cjs +13043 -0
- package/dist/{apply-vkey-witnesses-Ctzk7eye.cjs → apply-vkey-witnesses-1jyczTkw.cjs} +1 -1
- package/dist/{apply-vkey-witnesses-Dfo7XfhL.js → apply-vkey-witnesses-Byb40-yJ.js} +1 -1
- package/dist/artefact-loader-Cqc9eSkL.cjs +182 -0
- package/dist/artefact-loader-D0T2f6F7.js +159 -0
- package/dist/auto-dismiss-failure-on-success-BWJceNXd.cjs +37 -0
- package/dist/auto-dismiss-failure-on-success-Bpod-v4r.js +31 -0
- package/dist/bip32-EPpcFrpH.cjs +3851 -0
- package/dist/{bip32ed25519-D2In8WzR.cjs → bip32ed25519-CRiG-Kjg.cjs} +5 -4
- package/dist/{bip32ed25519-qsLH_eWO.js → bip32ed25519-E-fCUZNv.js} +6 -4
- package/dist/bip39-DZomfqeY.js +9 -0
- package/dist/bip39-MAck9iod.cjs +26 -0
- package/dist/bitcoin-data-provider-D0OT_Uiu.cjs +26 -0
- package/dist/bitcoin-data-provider-LN_8oamW.js +21 -0
- package/dist/bitcoin.cjs +48 -0
- package/dist/bitcoin.d.ts +29805 -1
- package/dist/bitcoin.js +22 -0
- package/dist/{blake2b-BGHUWMsV.js → blake2b-BL-eR5G2.js} +6 -4
- package/dist/{blake2b-DspUqw68.cjs → blake2b-Iy324FwH.cjs} +5 -4
- package/dist/{blockfrost-tx-submit-provider-BUEOmdvc.js → blockfrost-tx-submit-provider-BHDLgOIE.js} +9 -162
- package/dist/{blockfrost-tx-submit-provider-B5dWbdrZ.cjs → blockfrost-tx-submit-provider-BxC19smv.cjs} +7 -171
- package/dist/{blockingWithLatestFrom-BhaE7pnA.js → blockingWithLatestFrom-FUfZFEUG.js} +1 -1
- package/dist/{blockingWithLatestFrom-DkuT3G2a.cjs → blockingWithLatestFrom-bmCPgA3c.cjs} +1 -1
- package/dist/bn-BFq5a4dk.cjs +2553 -0
- package/dist/{SodiumBip32Ed25519-BEfo1Q9m.js → browser-D5jRKv_L.js} +4 -401
- package/dist/bytes.vo-CziaOsba.js +24 -0
- package/dist/bytes.vo-hecRu3YZ.cjs +35 -0
- package/dist/{cardano-network-id-to-network-type-PXvn1ycQ.cjs → cardano-network-id-to-network-type-BwG_d6QP.cjs} +1 -1
- package/dist/{cardano-network-id-to-network-type-DHgKhDAK.js → cardano-network-id-to-network-type-CYJheetp.js} +1 -1
- package/dist/{cardano-network-id.vo-CbNNKd-k.cjs → cardano-network-id.vo-C5VuBXT3.cjs} +2 -2
- package/dist/{cardano-network-id.vo-CTYe-Oix.js → cardano-network-id.vo-CeLJqmb_.js} +2 -2
- package/dist/{cardano-tx-id.vo-BMwemq5x.js → cardano-tx-id.vo-DJ70NC0-.js} +1 -1
- package/dist/{cardano-tx-id.vo-NY-gCOWJ.cjs → cardano-tx-id.vo-lnyO9XaW.cjs} +1 -1
- package/dist/cardano.cjs +31 -24
- package/dist/cardano.d.ts +27602 -8121
- package/dist/cardano.js +21 -13
- package/dist/client-Bw2foG5E.cjs +808 -0
- package/dist/const-BB3MccLt.js +153 -0
- package/dist/{const-BErUlcZw.cjs → const-BWBAzOmN.cjs} +1 -1
- package/dist/const-CSWmOyzn.cjs +42 -0
- package/dist/{const-Dy8Ctnpd.cjs → const-D3mCkwrM.cjs} +5 -5
- package/dist/const-DW7z3R5k.js +13 -0
- package/dist/{const-DeUA7zYl.js → const-DbuUHSzR.js} +5 -5
- package/dist/const-DgBzKfz6.cjs +31995 -0
- package/dist/{const-DVW6DGkZ.js → const-xGSNCtwQ.js} +1 -1
- package/dist/contract-BsIGhsYa.js +171 -0
- package/dist/contract-DD6CGnpB.cjs +189 -0
- package/dist/create-add-accounts-2mQA0ST2.js +102 -0
- package/dist/create-add-accounts-B6mR2NMn.cjs +114 -0
- package/dist/{delegation-tx-builder-CF0VunDW.cjs → delegation-tx-builder-Cp30jtj9.cjs} +9 -8
- package/dist/{delegation-tx-builder-C8LQxU2R.js → delegation-tx-builder-DUMikSTg.js} +9 -7
- package/dist/{deregistration-tx-builder-DcUXA3Ls.cjs → deregistration-tx-builder-B-ZeY-dR.cjs} +10 -9
- package/dist/{deregistration-tx-builder-BOBPP8m_.js → deregistration-tx-builder-CRLrK99U.js} +10 -8
- package/dist/device-commitment-hex.vo-BIUYUNz1.cjs +31 -0
- package/dist/device-commitment-hex.vo-D9FsYLn7.js +26 -0
- package/dist/device-key-BToCoS4D.js +2394 -0
- package/dist/device-key-D6euvxFi.cjs +2489 -0
- package/dist/device-readers-BHJeNR8I.js +3 -0
- package/dist/device-readers-Dw7uTNM5.cjs +167 -0
- package/dist/device-readers-b4g2j3QL.js +144 -0
- package/dist/device-readers-cxcJcWq5.cjs +7 -0
- package/dist/dist-B00GN41m.js +141 -0
- package/dist/dist-BA1xnF9O.cjs +4413 -0
- package/dist/dist-BmHOXLe8.cjs +3814 -0
- package/dist/dist-Br0OVXKt.cjs +535 -0
- package/dist/dist-C1JK9C1I.cjs +3452 -0
- package/dist/dist-DKEViNEI.cjs +1306 -0
- package/dist/dist-Dwqx184a.cjs +43175 -0
- package/dist/dist-MJof_Ky1.cjs +145 -0
- package/dist/dist-p84sVVJ9.cjs +1394 -0
- package/dist/{earn-rewards-tx-builder-BRlTueHS.js → earn-rewards-tx-builder-8G_rouIk.js} +9 -7
- package/dist/{earn-rewards-tx-builder-RgO0QUY8.cjs → earn-rewards-tx-builder-cOUNV58E.cjs} +9 -8
- package/dist/enc-key-circuits-0Dud78IB.js +13 -0
- package/dist/enc-key-circuits-yjPHbuo_.cjs +24 -0
- package/dist/english-BZ_ebp2-.cjs +2057 -0
- package/dist/envelopes-B3QCzo5p.js +2658 -0
- package/dist/envelopes-BdE1xlgz.cjs +2777 -0
- package/dist/errors-BA3b8aVu.cjs +584 -0
- package/dist/errors-pkQdxW-7.js +392 -0
- package/dist/experimental.cjs +6820 -0
- package/dist/experimental.d.ts +63552 -0
- package/dist/experimental.js +6670 -0
- package/dist/fees-6C2uEWFK.js +653 -0
- package/dist/fees-DtC71fOx.cjs +820 -0
- package/dist/gated-call-BrPjKolT.js +3 -0
- package/dist/gated-call-CcsuW9L5.js +691 -0
- package/dist/gated-call-DdDrxEq5.cjs +732 -0
- package/dist/gated-call-Dk7PazhG.cjs +4 -0
- package/dist/grant-rules-B7eDuD5G.cjs +5468 -0
- package/dist/grant-rules-qLrKUIR3.js +5217 -0
- package/dist/grant-status-CDmZpx32.js +296 -0
- package/dist/grant-status-CQtwjLsA.cjs +337 -0
- package/dist/grants-Bnb-3Hkv.cjs +16 -0
- package/dist/grants-CIb6nOV7.cjs +273 -0
- package/dist/grants-CYY0AquW.js +202 -0
- package/dist/grants-DOsFSotP.js +4 -0
- package/dist/{group-cardano-addresses-by-account-C-1GHUu8.cjs → group-cardano-addresses-by-account-BGOtPV-Y.cjs} +4 -40
- package/dist/{group-cardano-addresses-by-account-p4dXmCoj.js → group-cardano-addresses-by-account-TqvESg9x.js} +6 -37
- package/dist/{guarded-transaction-signer-DZSGHp1K.js → guarded-transaction-signer-BbVDE9Nn.js} +12 -18
- package/dist/{guarded-transaction-signer-BLSezbfV.cjs → guarded-transaction-signer-DTLjAkif.cjs} +26 -26
- package/dist/hex-BVtOKJki.cjs +263 -0
- package/dist/hex-CGYJPK_Z.js +192 -0
- package/dist/http-client-B7_kBTYn.js +155 -0
- package/dist/http-client-DYQ_7Rdf.cjs +167 -0
- package/dist/identity-DxPhxkZs.js +239 -0
- package/dist/identity-y41Yle03.cjs +274 -0
- package/dist/in-memory-wallet-integration-5BKiAvPT.js +20861 -0
- package/dist/{in-memory-wallet-integration-CUTa68ET.js → in-memory-wallet-integration-BCOqDgbt.js} +10 -107
- package/dist/in-memory-wallet-integration-Bi8I9Dso.js +128 -0
- package/dist/in-memory-wallet-integration-Bsl2ONua.cjs +239 -0
- package/dist/in-memory-wallet-integration-DZ0CAyvY.cjs +20865 -0
- package/dist/{in-memory-wallet-integration-Dw_S7amX.cjs → in-memory-wallet-integration-DsFm8gLk.cjs} +21 -112
- package/dist/{in-memory-wallet-integration-Z4Bp_DTv.cjs → in-memory-wallet-integration-aW_SF-go.cjs} +8 -5
- package/dist/{in-memory-wallet-integration-B6cbAlvD.js → in-memory-wallet-integration-mIEc8EfR.js} +9 -5
- package/dist/index.cjs +95 -58
- package/dist/index.d.ts +45152 -13448
- package/dist/index.js +55 -28
- package/dist/{init-CVi8J0zk.cjs → init-5SfWgCYD.cjs} +3 -3
- package/dist/{init-Ci7aqWCf2.cjs → init-8NVWbo302.cjs} +2 -2
- package/dist/init-B-C7n6u6.js +5 -0
- package/dist/{init-BFMWRf-L.js → init-B-ppfGO-.js} +1 -1
- package/dist/{init-IiR093Jw.cjs → init-B2OUhY5T.cjs} +2 -2
- package/dist/{init-DXnus199.cjs → init-B6Eg_o6G.cjs} +5 -5
- package/dist/{init-4hDl5bpr.js → init-BAWMHL1k.js} +2 -2
- package/dist/init-BC2CZZOu2.cjs +2002 -0
- package/dist/{init-a228hXnS.cjs → init-BF-a2p6E.cjs} +65 -73
- package/dist/{init-fFirX8OY.cjs → init-BFxlQAD8.cjs} +1 -1
- package/dist/init-BJE1ry0O.js +17 -0
- package/dist/{init-BVnI4z2J.js → init-BPKBVOHU.js} +2 -2
- package/dist/{init-bdqZBd-o.js → init-BSP_xcpB.js} +2 -2
- package/dist/{init-CFNOn3lo.js → init-BSd7mznK.js} +3 -3
- package/dist/{init-MjR4swi6.js → init-BUJTT0MN.js} +36 -43
- package/dist/init-BUpFzYsD.cjs +143 -0
- package/dist/{init-BvpYHyLH.cjs → init-BZ-WyAIL.cjs} +3 -3
- package/dist/init-BZdfdLX7.js +422 -0
- package/dist/{init-CJeOys1w.cjs → init-B_HWNXMD.cjs} +2 -2
- package/dist/init-BbIMt6xU.cjs +6 -0
- package/dist/{init-BYdN1aqE.cjs → init-BewG6swt.cjs} +2 -2
- package/dist/{init-BX0AZAVH2.js → init-Bilqsbng.js} +2 -2
- package/dist/{init-Tpn9VkFu.cjs → init-BpwlQ6wF.cjs} +1 -1
- package/dist/{init-D5-P0HXK.js → init-BtQOzUjX.js} +1 -1
- package/dist/{init-BvGz3qUd2.js → init-CCTscPaY2.js} +2 -2
- package/dist/{init-D4hPipCD.cjs → init-CH0yyBof.cjs} +1 -1
- package/dist/init-CaIkrXal.cjs +121 -0
- package/dist/init-CkZy4IMf.cjs +107 -0
- package/dist/{init-Drr2f_Pr.js → init-CmfcY7SV.js} +1 -1
- package/dist/{init-Kf3_OLv6.js → init-CnJAlks_.js} +1 -1
- package/dist/{init-Cdjt_z-b.cjs → init-CqqmtAIK.cjs} +4 -4
- package/dist/{init-Bb0avZeZ.js → init-Cu2znmIc.js} +5 -5
- package/dist/init-Cz5LAizN.js +2001 -0
- package/dist/init-D4WM3-Mn.cjs +18 -0
- package/dist/init-DMi2FGpf.cjs +424 -0
- package/dist/{init-lcaUSOOG.js → init-DPTJohPd.js} +1 -1
- package/dist/{init-BTYLMF9F2.cjs → init-DexLSprL2.cjs} +258 -61
- package/dist/init-DfKPgD21.js +106 -0
- package/dist/init-DgzRsI-C.js +141 -0
- package/dist/init-Dj4Cn7-P.js +4789 -0
- package/dist/init-DktAnYI0.cjs +2354 -0
- package/dist/{init-DFwhgert.cjs → init-DmyuM9Lo.cjs} +1 -1
- package/dist/{init-CX_zLXc6.js → init-IBnizp1U.js} +5 -5
- package/dist/init-MDKB6tGI2.cjs +4790 -0
- package/dist/{init-DbZ5byj42.js → init-TbB38KNt2.js} +258 -60
- package/dist/init-X6m_cqDy.js +2353 -0
- package/dist/{init-DvVgKCaP2.cjs → init-bzvl1JhF.cjs} +2 -2
- package/dist/{init-BgrY29gW.js → init-dsYkC_0B.js} +4 -4
- package/dist/{init-B5BsI3DR.cjs → init-kvn5FlPS.cjs} +7 -7
- package/dist/init-vfy9DW_E.js +119 -0
- package/dist/{init-BE_6Jyc4.js → init-w7xl6LsP.js} +3 -3
- package/dist/{init-DEsWVyn5.cjs → init-wgiBUmyW.cjs} +1 -1
- package/dist/{is-retriable-error-DWv_ob-f.js → is-retriable-error-CmFR20pe.js} +1 -1
- package/dist/{is-retriable-error-Dtb4JGjd.cjs → is-retriable-error-D2yo0_lS.cjs} +1 -1
- package/dist/jubjub-authoriser-A2c8vmkN.js +84 -0
- package/dist/jubjub-authoriser-D3ZDgzcF.cjs +85 -0
- package/dist/key-source-CcLTx8HK.js +2761 -0
- package/dist/key-source-D2tTAag-.cjs +806 -0
- package/dist/{key-value-store-DTX1quRS.js → key-value-store-DZcNDB3n.js} +1 -1
- package/dist/{key-value-store-B-XRIwaM.cjs → key-value-store-Htj4RgMe.cjs} +1 -1
- package/dist/keyDerivation-DcKRUCVh.cjs +274 -0
- package/dist/keyDerivation-QGesIMbS.js +4077 -0
- package/dist/{lace-context-FpU3iG3f.cjs → lace-context-BN0b_ury.cjs} +4 -4
- package/dist/{lace-context-BQvvxVLm.js → lace-context-DMRJ87Vg.js} +4 -4
- package/dist/lib-BC-62Byh.cjs +2359 -0
- package/dist/lib-JYqcAX0c.js +2354 -0
- package/dist/midnight-account-id.vo--Vcx34Xk.cjs +10 -0
- package/dist/midnight-account-id.vo-BuB8fiVO.js +5 -0
- package/dist/midnight-engine-B7D2hbHo.js +5 -0
- package/dist/midnight-engine-D5ikN_5F.cjs +6 -0
- package/dist/midnight-wallet-BOdFD6SX.cjs +24 -0
- package/dist/midnight-wallet-CAqZrNVe.js +18 -0
- package/dist/midnight.cjs +1412 -0
- package/dist/midnight.d.ts +28609 -0
- package/dist/midnight.js +1355 -0
- package/dist/modules-cardano-BiL9hoM3.js +996 -0
- package/dist/modules-cardano-UeXks3sd.cjs +1109 -0
- package/dist/node-relay-BOuvdZvC.cjs +49 -0
- package/dist/node-relay-CLtc5n1v.js +48 -0
- package/dist/outputs-5qdW8s-f.js +196 -0
- package/dist/outputs-BEM1GPMf.cjs +339 -0
- package/dist/{SodiumBip32Ed25519-BQUcrQWX.cjs → pbkdf2-B1veireP.cjs} +6 -411
- package/dist/pending-operation-CfTUNQVD.cjs +26 -0
- package/dist/pending-operation-Ljijb1Uh.js +21 -0
- package/dist/providers-1on_fwJO.cjs +364 -0
- package/dist/providers-C1MsxfMA.js +341 -0
- package/dist/redacted-4SJPqt-G.js +81 -0
- package/dist/redacted-DwxIDdIF.cjs +86 -0
- package/dist/{reselect-DPML1uFN.cjs → reselect-kP4DaAII.cjs} +1 -1
- package/dist/{retry-config-oNtfdyrG.cjs → retry-config-BGv5q5QM.cjs} +1 -1
- package/dist/{retry-config-VdbuqBsI.js → retry-config-Bu5Yn5ua.js} +1 -1
- package/dist/safe-buffer-CqGpSFCQ.js +43 -0
- package/dist/safe-buffer-DbXbwhUQ.cjs +48 -0
- package/dist/sdk-1SRu8Ype.cjs +1445 -0
- package/dist/sdk-BneJm7ey.js +1249 -0
- package/dist/sdk-init-9TG1ZvHF.cjs +3795 -0
- package/dist/sdk-init-Ce3mD-8F.js +1047 -0
- package/dist/secret-box-CSmRp6Tt.js +3777 -0
- package/dist/secret-box-ZfbYwBgS.cjs +6970 -0
- package/dist/send-proof-progress-DtAcrMP6.cjs +33 -0
- package/dist/send-proof-progress-Dx2cUz1B.js +22 -0
- package/dist/sha2-DaRJZOjk.cjs +390 -0
- package/dist/sha2-c4sB6peD.js +378 -0
- package/dist/side-effects-C3BhLrdP.js +768 -0
- package/dist/side-effects-DG0R-KFc.cjs +804 -0
- package/dist/sign-bitcoin-transaction-with-seed-C7vq9om8.js +147 -0
- package/dist/sign-bitcoin-transaction-with-seed-Ds1dwzan.cjs +158 -0
- package/dist/signer--2I6poMD.js +2 -0
- package/dist/signer-CX21Ups_.cjs +121 -0
- package/dist/signer-Cnn9q9oY.js +92 -0
- package/dist/signer-DbSxjk0F.cjs +7 -0
- package/dist/signer-factory-B5oFuUZ-.cjs +130 -0
- package/dist/signer-factory-BAt8FPNc.cjs +281 -0
- package/dist/signer-factory-BGE4nL4k.js +129 -0
- package/dist/signer-factory-C4pgsiJi.js +281 -0
- package/dist/{signer-factory-DySc1wRX.cjs → signer-factory-D95jQIPV.cjs} +9 -6
- package/dist/{signer-factory-D4HrwFPl.js → signer-factory-PrpsGX-8.js} +10 -6
- package/dist/{slice-BZTQgYSs.js → slice-B-xJcuT1.js} +4 -4
- package/dist/slice-B4QOYaOG.cjs +105 -0
- package/dist/{slice-CtIMw2YT.cjs → slice-B9QKuhi0.cjs} +3 -3
- package/dist/slice-BKnGkAkd.cjs +9031 -0
- package/dist/{slice-Bhwmqn1p.cjs → slice-Bf4enJKZ.cjs} +8 -8
- package/dist/{slice-DaNVz7_l.js → slice-ByNWnxKS.js} +8 -8
- package/dist/{slice-C2UDQrdt.js → slice-C1zOeseG.js} +449 -355
- package/dist/{slice-DFLyKRm5.cjs → slice-C4toRM6A.cjs} +2 -2
- package/dist/{slice-Cx4dULDA.cjs → slice-C8YVv4Qn.cjs} +1 -1
- package/dist/{slice-jnpOgiSZ.cjs → slice-CaMfviYu.cjs} +3 -3
- package/dist/{slice-DFvrwUur.js → slice-CgeRsYRg.js} +6 -6
- package/dist/slice-Cwt8jShq.js +9013 -0
- package/dist/{slice-zNEspZND.js → slice-D0VzpMbY.js} +2 -2
- package/dist/slice-D14F78Ca.js +87 -0
- package/dist/{slice-F6A1YKOF.cjs → slice-DLflttAu.cjs} +479 -366
- package/dist/{slice-C96EdeY1.js → slice-DcO-iNz2.js} +1 -1
- package/dist/{slice-C19quNWM.cjs → slice-DimtxfAT.cjs} +2 -2
- package/dist/{slice-KiNoGwD9.js → slice-DlTEqIoI.js} +1 -1
- package/dist/{slice-ws8PccRX.js → slice-Dn0WojD7.js} +3 -3
- package/dist/{slice-BLSxLmie.cjs → slice-Dongunf7.cjs} +4 -4
- package/dist/{slice-B6vPum19.js → slice-DpufJAjJ.js} +2 -2
- package/dist/{slice-exhhmucR.cjs → slice-DtitVc9L.cjs} +7 -7
- package/dist/{slice-Bjj2t2ut.cjs → slice-WMMMc1Xv.cjs} +2 -2
- package/dist/slice-a8VuIqzS.cjs +378 -0
- package/dist/slice-bRASyM-m.js +354 -0
- package/dist/{slice-CBFrgHSH.js → slice-hNyKbDry.js} +3 -3
- package/dist/{InMemoryKeyAgent-pyB2gA-N.cjs → src-BayYMIjw.cjs} +20 -8228
- package/dist/{InMemoryKeyAgent-D-3HejxN.js → src-CgINPlSx.js} +29 -4811
- package/dist/store-AUlTfcI_.js +37 -0
- package/dist/store-C7AneHEY.cjs +66 -0
- package/dist/submit-BuBCVi-l.cjs +87 -0
- package/dist/submit-D37lxFrK.js +70 -0
- package/dist/submit-bitcoin-tx-DFLnhidO.js +983 -0
- package/dist/submit-bitcoin-tx-sih2hSfb.cjs +1049 -0
- package/dist/{subtractValueQuantities-DfZg6oiG.js → subtractValueQuantities-BuDJVxq6.js} +3 -22
- package/dist/{subtractValueQuantities-C8qDTtgH.cjs → subtractValueQuantities-CqR606HV.cjs} +2 -32
- package/dist/{sync-operation-utils-BrQyWFS_.cjs → sync-operation-utils--Z_IQfyW.cjs} +0 -66
- package/dist/{sync-operation-utils-CAaCGvEN.js → sync-operation-utils-BimBpvI3.js} +1 -37
- package/dist/token-color.vo-CItgoOjw.js +26 -0
- package/dist/token-color.vo-Ca4hUXfh.cjs +37 -0
- package/dist/token-id-mapper-BVau2RXa.js +16 -0
- package/dist/token-id-mapper-CSeLzM4o.cjs +18 -0
- package/dist/{token-id-mapper-pDaTxpw2.js → token-id-mapper-ClBeIdJR.js} +2 -2
- package/dist/{token-id-mapper-DYcd8hhQ.cjs → token-id-mapper-D0wFdbOy.cjs} +2 -2
- package/dist/types-BhzypKMS.cjs +15 -0
- package/dist/types-DTE1ctDB.js +10 -0
- package/dist/types-DXSxXGz0.js +12 -0
- package/dist/types-Dls6Z5gV.cjs +23 -0
- package/dist/{util-P4PX2muj.cjs → util-D1YlKzrc.cjs} +2 -2
- package/dist/{util-CQSJU0wT.js → util-DHxtzUzY.js} +2 -2
- package/dist/{utils-Bv4OHT4S.cjs → utils-DYf4iZKX.cjs} +7 -1
- package/dist/{utils-DrtzChYN.js → utils-DcnoETEP.js} +2 -2
- package/dist/utils-Du0YXRcU.cjs +112 -0
- package/dist/utils-fF_rnZe3.js +65 -0
- package/dist/v8Signatures-ClGpA8mS.cjs +71 -0
- package/dist/{vote-delegation-tx-builder-69gOEkCB.cjs → vote-delegation-tx-builder-BjZxCOd3.cjs} +9 -8
- package/dist/{vote-delegation-tx-builder-BRJ_pf-c.js → vote-delegation-tx-builder-DRJwPXkD.js} +9 -7
- package/dist/watch-FGE4B_Ge.js +13056 -0
- package/dist/watch-imlsRZDp.cjs +52207 -0
- package/package.json +95 -3
- package/dist/Address-4KjeDt_x.cjs +0 -17269
- package/dist/Address-_VPkf7Xh.js +0 -17101
- package/dist/account-guards.stable-BKyYPj4z.cjs +0 -10
- package/dist/account-guards.stable-BdmQ43vC.js +0 -5
- package/dist/init-BR9ZIbED.cjs +0 -378
- package/dist/init-B_k1RUN_.cjs +0 -21
- package/dist/init-Bs3b5ZQH.js +0 -378
- package/dist/init-ChfcrHgG2.cjs +0 -4354
- package/dist/init-D1uUMMpG.js +0 -19
- package/dist/init-DV1OSZiK.js +0 -4352
- package/dist/modules-cardano-BINzpXpk.js +0 -5454
- package/dist/modules-cardano-Dt8OwoQb.cjs +0 -5640
- package/dist/slice-Caf98m0d2.js +0 -107
- package/dist/slice-PM6llajQ2.cjs +0 -125
- /package/dist/{BigIntMath-CoJWXt1h.cjs → BigIntMath-CBciEQn2.cjs} +0 -0
- /package/dist/{BigIntMath-BWUJOsOW.js → BigIntMath-X3EniYDo.js} +0 -0
- /package/dist/{ChainId-sdLmlIRk.cjs → ChainId-CNPSU9nn.cjs} +0 -0
- /package/dist/{ChainId-CKbm87yQ.js → ChainId-CeoG8Sov.js} +0 -0
- /package/dist/{_polyfill-node.process-4fnlkbBi.cjs → _polyfill-node.process-5UxyjoHG.cjs} +0 -0
- /package/dist/{account-id.vo-Xpgnu-av.cjs → account-id.vo-DYZBZQsz.cjs} +0 -0
- /package/dist/{account-id.vo-DP0BtOoF.js → account-id.vo-KDTWJ-W5.js} +0 -0
- /package/dist/{actions-BNagEO6m.cjs → actions-BnHFVSr_.cjs} +0 -0
- /package/dist/{actions-BWTyAr7B.js → actions-Cwj0ApZf.js} +0 -0
- /package/dist/{asyncoption-po7-RiA5.cjs → asyncoption-CYcZNBRM.cjs} +0 -0
- /package/dist/{asyncoption-CzIVH5Y1.js → asyncoption-DZQGfznq.js} +0 -0
- /package/dist/{bignum.vo-DhhZ9HP1.js → bignum.vo-Co6tMH2q.js} +0 -0
- /package/dist/{bignum.vo-CpkrIXjH.cjs → bignum.vo-Du-bpvar.cjs} +0 -0
- /package/dist/{blockchain-network-id.vo-CbgrAY_K.js → blockchain-network-id.vo-C6Jowh8t.js} +0 -0
- /package/dist/{blockchain-network-id.vo-5iC6Kffo.cjs → blockchain-network-id.vo-DEQ14dYj.cjs} +0 -0
- /package/dist/{composite-signer-factory-DABpCe1_.js → composite-signer-factory-D9RWY-1V.js} +0 -0
- /package/dist/{composite-signer-factory-BizuNPP7.cjs → composite-signer-factory-v4Pxn8bA.cjs} +0 -0
- /package/dist/{error-ggOihIfv.cjs → error-B6wj9nPv.cjs} +0 -0
- /package/dist/{error-DHKO2iS4.js → error-CvEYL98P.js} +0 -0
- /package/dist/{esm-browser-DnXNvpcn.cjs → esm-browser-CZbMeVod.cjs} +0 -0
- /package/dist/{esm-browser-BBVQuyQv.js → esm-browser-DpAD_RKv.js} +0 -0
- /package/dist/{feature-flag-key.vo-DoGK5Bfh.js → feature-flag-key.vo-9reURsOQ.js} +0 -0
- /package/dist/{feature-flag-key.vo-CP1Z9s8e.cjs → feature-flag-key.vo-KTIdnzYX.cjs} +0 -0
- /package/dist/{first-state-of-status-Bx4-QQ5m.cjs → first-state-of-status-9ICeDNSa.cjs} +0 -0
- /package/dist/{first-state-of-status-D7XzEuSa.js → first-state-of-status-BscbKj_t.js} +0 -0
- /package/dist/{init-4319psUJ.cjs → init-BT67pd9x.cjs} +0 -0
- /package/dist/{init-AFUM1TSg.js → init-CHk1fvJ2.js} +0 -0
- /package/dist/{init-ZX90nEJe2.js → init-DIyNx6DZ.js} +0 -0
- /package/dist/{init-CTQ2g6Xt.js → init-DtxxFaCx.js} +0 -0
- /package/dist/{init-Dt1Xifg_2.cjs → init-J8QobR93.cjs} +0 -0
- /package/dist/{init-BNewLCqw.cjs → init-xzZPlQwB.cjs} +0 -0
- /package/dist/{is-redux-persist-state-DxJSsvxB.cjs → is-redux-persist-state-C5luvPEH.cjs} +0 -0
- /package/dist/{is-redux-persist-state-Bl2n4VMr.js → is-redux-persist-state-CjcqyCoh.js} +0 -0
- /package/dist/{isNotNil-CZxBMfL5.js → isNotNil-Be7gCY0m.js} +0 -0
- /package/dist/{isNotNil-C_SO1tcC.cjs → isNotNil-CrYIUFry.cjs} +0 -0
- /package/dist/{logging-BvMDKgl0.js → logging-BAMMfn5j.js} +0 -0
- /package/dist/{logging-Bh9ikph3.cjs → logging-CbxgIX9V.cjs} +0 -0
- /package/dist/{metadatum-B-sxBnSY.cjs → metadatum-BGvFqGPt.cjs} +0 -0
- /package/dist/{metadatum-Ego4jVas.js → metadatum-BVocMYy_.js} +0 -0
- /package/dist/{repo-slice-BzZQUTj8.cjs → repo-slice-BB_W-6OL.cjs} +0 -0
- /package/dist/{repo-slice-vCcQJotS.js → repo-slice-BQlssw9M.js} +0 -0
- /package/dist/{reselect-BPkMzw3k.js → reselect-JIgawvPe.js} +0 -0
- /package/dist/{serializable-BxFUShKY.js → serializable-F7OtYl8d.js} +0 -0
- /package/dist/{serializable-DWgkHhv_.cjs → serializable-n3UoxbZc.cjs} +0 -0
- /package/dist/{slice-DY-DNtSi.js → slice-5dGBAz6w.js} +0 -0
- /package/dist/{slice-BEFoeqgr.cjs → slice-BzJgg9FS.cjs} +0 -0
- /package/dist/{src-CPmX4KUh.cjs → src-CeBNkonz.cjs} +0 -0
- /package/dist/{src-XOZXPKxe.js → src-Cv1ifqbe.js} +0 -0
- /package/dist/{time-CQPt4FdU.js → time-ByoKevdZ.js} +0 -0
- /package/dist/{time-Blvoyh9G.cjs → time-qD7edGU0.cjs} +0 -0
- /package/dist/{time.vo-Xln4yGBU.js → time.vo-C17-tYq3.js} +0 -0
- /package/dist/{time.vo-rwWwJzmP.cjs → time.vo-TmYE-_Y2.cjs} +0 -0
- /package/dist/{toEmpty-CzmoZVLN.cjs → toEmpty-Db6V94Mf.cjs} +0 -0
- /package/dist/{toEmpty-DzLd-ZCi.js → toEmpty-Djj-QbpI.js} +0 -0
- /package/dist/{token-id.vo-l8fuSpem.cjs → token-id.vo-CZ622zcZ.cjs} +0 -0
- /package/dist/{token-id.vo-DMKSaMlc.js → token-id.vo-IDI9C_Qm.js} +0 -0
- /package/dist/{types-B61DQoFW.js → types-By-XeXWg.js} +0 -0
- /package/dist/{types-CUC-Kcqh.cjs → types-Cn6WlQV6.cjs} +0 -0
- /package/dist/{util-BV3iGOrz.cjs → util-Cp1h58uD.cjs} +0 -0
- /package/dist/{util-BsQKLorV.js → util-DHppXj7U.js} +0 -0
- /package/dist/{util-selector-CKIyoAOz.js → util-selector-BWmHpo92.js} +0 -0
- /package/dist/{util-selector-C9H5RsNw.cjs → util-selector-glXkO-jR.cjs} +0 -0
- /package/dist/{while-active-CNXeLxre.js → while-active-CDBnUlQA.js} +0 -0
- /package/dist/{while-active-BsDWSNrO.cjs → while-active-I2TlHtm7.cjs} +0 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { u as InvalidStringError } from "./errors-CAOTqN4_.js";
|
|
2
|
+
import { Dt as PlutusLanguageVersion, Ot as ScriptType } from "./Address-_c_-9hLC.js";
|
|
3
|
+
import { r as NetworkMagics } from "./ChainId-CeoG8Sov.js";
|
|
4
|
+
//#region ../../packages/lib/cardano-custody/src/blueprint/account-validator.ts
|
|
5
|
+
/**
|
|
6
|
+
* Compiled code of the account proxy (`account.account`) as the blueprint
|
|
7
|
+
* carries it: the flat program in one CBOR byte string wrap. Its mint, spend
|
|
8
|
+
* and else handlers share this code. It takes no parameter, so it is the
|
|
9
|
+
* same on every network, and it holds no account rule of its own: it runs
|
|
10
|
+
* the logic script the control datum names.
|
|
11
|
+
*/
|
|
12
|
+
const ACCOUNT_VALIDATOR_COMPILED_CODE = "590aac01010029800aba4aba2aba1aba0aab9faab9eaab9dab9a48888888966003300130033754013223232330010010042259800800c00e26464b30013372200c00315980099b8f00600189bab300a002802a0108998020021807001a010375c60100026016002804852f5bded8c1230073008001911919800800801912cc00400629462b30013003300a0018998010011805800c528200a4021374a90004dd2a4005370e90014cdc624000901c48c01cc020c020c0200066e1d2000911919800800801912cc004006297ae0899912cc004c01400a26601600466008008003133004004001401c60140026016002804244646600200200644b30010018a508acc004c00cc02800629462660040046016002802900848c01cc020c020006444653001001802400d0011112cc00400a200319800801cc03400a660086018004002801900a4dc3a4009230073008300830083008300830080019192cc0040062d1375c60100028030c010dd5000cdc3a400c9111111111111111114c004c06404a603002522301033019301a30173754602066032601e660326ea40092f5c06603298103d87a80004bd701980c98081980c98081980c98079980c9ba90014bd7025eb812f5c097ae091119912cc00400a29422653001301e301f001992cc004c040c06cdd5000c4dd6980e180f9bab301f301c375400314800101a180f000cdd5801a444b30010018acc004cdd780180344cc01400920008a5040711325980099baf4c01014000301e0018acc004cc01800cdd6980f98111bab301f001899baf004374c604600514a080ea2b30013300600348002266ebc01001e294101d203a3021001407c329800800c01a446603e0046603e6e980052f5c08008889660020051330014c0103d87a80004bd6f7b63044c8cc896600266e452201000028acc004cdc7a44100002899802180c998111810001a5eb80006266008980103d87a80000054079198008034006446600c0046604800a002803101e1bae301d00130220033020002407914a114a114a080f8dd31980d19bb037520046e98cc068cdd81ba90014c010101004bd6f7b63025eb7bdb1808928c888c03cc8cc88cc0080080048966002003003899192cc004cdc8803000c56600266e3c01800626eb4c07400a00a80da266008008604200680d8dd7180d800980f000a038330150040031480024464646600200200844b30010018a508acc004cdd7801980c980e800c528c4cc008008c0780050182036300f33019375200297ae09192cc004c018c058dd5000c4c068c05cdd5000c590151803980b1baa0014888888a6002603e00f301f3020007911919800800801912cc00400629462b3001323301b3301d3756603860426ea800401096600260326eb4c088006266ebcc094c088dd500119805802980c1bae30210018a504080604600313300200230240018a504078810a4444b3001300f301f3754602260406ea80122b300198009bab301b30203754009002800a00e899baf30233020375400800714a080f2294101e244446644b3001301600289919912cc004c0640062b3001302537540130028b204c8acc004c0700062b3001302537540130028b204c8acc004c0500062b3001302537540130028b204c8b2046408c8118660026603e6eacc098c09cc09cc09cc09cc08cdd5006800c888966002005168992cc004cc08800c8c96600266e1cdd69815001002456600266e1cdc6800a408113371e604000200714a0814229410281bae30280018cc004016009001401d14a08130c074dd718131815001205098111baa00748896600260340031325980080240062b3001302b0048992cc004c07cdd69814000c4c8c966002603c60526ea800626464b30013370e901c1b8d0048acc004cc078dd5981798181818181818181818181818181818181818161baa01623259800980d18169baa00189919912cc004c09400a266ebcc0d0c0c4dd5001800c566002603a00513375e606860626ea800c006294102f205e302e3754002604e660626ea401d2f5c060626064605c6ea8006294102c1816000c56600330013756604e60586ea800a015004405115980099baf4c0103d87a80003021302c3754005159800998071bac301d302c375402c01515980099b87480e0dc6800c4cc048dd5980d18161baa0160018a5040a914a08152294102a452820548a5040a914a08150c060c040004c0b4c0a8dd5000c590281919912cc00400a003159800981800144c094cc0b8c0bc0092f5c100140b48168cc074dd6180d98151baa01429800800c00a0130034030298103d87a800033012007001375c604e0030024098605400900140a081405284566002603a003159800cc004042009003a400480122660106eb0c05cc098dd5008002452820488cc004042009003a40028011024204818111baa007375c604a60446ea80162b30013019002899199119912cc004c06c0062b3001302737540170028b20508acc004c0780062b3001302737540170028b20508acc004c0580062b3001302737540170028b20508acc004c04c0062b3001302737540170028b20508b204a409481290250994c004c966002603c604c6ea800626eb8c0a8c09cdd5000c59025181498131baa3029302637546042604c6ea800664b3001301b3026375400313259800980e18139baa0018992cc004c080c0a0dd5000c4dd7181618149baa0018b204e302b302837540031640986054604e6ea80062c8128c084c098dd5181498131baa302130263754003223375e980101a000374c660480040029112cc004c054c0a0dd5006c566002660026eacc090c0a4dd5181218149baa0040038992cc004c084c0a4dd500344cc004dd6181698151baa014232598009980f198141bab3027302c375400200c466e3cc08cdd7181600080344cdd7981798161baa001330150060058a5040a8604c60566ea80062660026eb0c0b4c0a8dd500a14c004c098c0acdd5000ccc05001401200b0044030814088c8cc00400400c896600200314a115980098019818000c528c4cc008008c0c400502b205c8a50409d159800cc00404e0070024021159800acc004cc004dd5981218149baa30243029375400800714a313300b3758603460526ea804c00d0274566003300198009bab302430293754604860526ea801200700240414a14a2813a294626644b30010018014566002605e0031325980099baf302f302c37540026602a00c00b159800cc004dd5981398161baa00180340150144566002b3001301b302b3754603a60586ea80062946294102a44cdd7a60103d87a80003021302c375400314a08152294102a45282054302e001801205840b02940cc070dd6180d18149baa013298009bab3025302a3754003004801a022409d14a0813a2941027204e192cc004c068c094dd5000c4c0a4c098dd5000c5902419198008009bac30293026375402044b30010018a60103d87a80008992cc004cdd7981598141baa0010058981099815000a5eb8226600600660580048130c0a800502818121baa0093026001302630270013022375400b1640808100c07cdd5001911192cc004c060c08cdd5000c4cc028dd5980918121baa0043011300930273024375400314a08110c8c8cc89660020050018acc004c0ac00a2604066052605400497ae0800a05040a1300137586040604a6ea8017300137586050604a6ea801697ae0800a02a800a02a14c103d87a80002259800cc004c084c098dd5001400e00b004401d1330283021302637540040031001409066018004002229344d95900101";
|
|
13
|
+
/**
|
|
14
|
+
* Hash of the account proxy: the payment credential of every custody account
|
|
15
|
+
* address, the policy id of every account token, and the parameter the stake
|
|
16
|
+
* and logic scripts are applied to.
|
|
17
|
+
*/
|
|
18
|
+
const ACCOUNT_VALIDATOR_HASH = "ed61963ac94d12c0b320be5a336c36af66bc02c380e0aa3001899253";
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region ../../packages/lib/cardano-custody/src/blueprint/logic-v1.ts
|
|
21
|
+
/**
|
|
22
|
+
* Compiled code of logic version 1 (`logic_v1.logic_v1`) applied to the
|
|
23
|
+
* account proxy hash, its only parameter. The proxy takes no parameter, so
|
|
24
|
+
* this script is the same on every network. Its withdraw, publish and else
|
|
25
|
+
* handlers share this code.
|
|
26
|
+
*/
|
|
27
|
+
const LOGIC_V1_COMPILED_CODE = "5923ad0101003229800aba4aba2aba1aba0aab9faab9eaab9dab9a9bae002488888888966003300130043754015370e90004dc3a400d370e90014dc3a40089111119194c004c028dd5000c8966002601060186ea800a2b3001300d37540050018b201c8b20169807003cc038009222259800980380244c8cc0100085660026012601e6ea800633001375c602660206ea80064464646600200200844b3001001801c4c8c96600266e440180062b30013371e00c00313756602e0050054055133004004301b00340546eb8c054004c0600050160a5eb7bdb182460226ea800646028602a602a003230143015001911919800800801912cc004006297ae0899912cc004c01400a266030004660080080031330040040014050602e002603000280aa29426e952000911919800800801912cc00400629462b300130033017001899801001180c000c52820244055230143015301530153015301530153015301530150019119198008008019119801800980100148c050c054c054c054c054c054c054c054c05400644646600200200644b30010018a518acc004c00cc05c006266004004603000314a080910154dd2a4005337189000240712232330010010032259800800c52f5c1133016300330170013300200230180014055371e9101009119b8a0029800a51a40110015e4a46028602a602a602a602a602a602a602a0032232598009807000c4c8c96600260320050048b202c375c602e00260266ea800e2b3001300c001899192cc004c06400a0091640586eb8c05c004c04cdd5001c59011202230113754005230143015301530150019b804800a44b30010018a5eb822646602a6ea4004cc00c00cc8cc004004c06000c896600200314bd7044cc896600330013371e00400b4a14a280aa2660326ea4008cc01001000626600800800280a8dd7180c000980c800a02c375c602a002809a46028602a602a602a602a602a0032301430153015301530150019b894800244646600200200644b30010018a508acc004cdc39bad30170010038a51899801001180c000a02440552232330010010032259800800c528456600266e3cdd7180b800801c528c4cc008008c060005012202a9180a180a980a980a980a980a980a800a444444444444444444444444444453001222323322330020020012259800800c00e26464b30013372200c00315980099b8f00600189bad3035002802a066899802002181c801a066375c6066002606c00281a0cc08001000c520009192cc0040062d1375c60640028180c070006464b3001302a302e375400313259800981598179baa0018992cc004c0a8c0c0dd5000c4dd7181a18189baa0018b205e3033303037540031640b86064605e6ea80062c8168c068c0b8dd5000c88c8cc00400400c896600200314c103d87a80008992cc004c010006260366606800297ae0899801801981b0012060303400140c923259800981398171baa0018981918179baa0018b205a301b302e37540032259800981518171baa00289919191919194c004dd6981c000cdd7181c0034dd6981c0024dd6981c001cdd6181c001244444b3001303e0068998101bac303d00a225980080144cc08800c8966002005010899180118218019bad304100240fd13230023041003375c607e00481ea2c81d86070002606e002606c002606a0026068002605e6ea800a2c816a446030660626064605e6ea8c060cc0c4c048cc0c4dd480125eb80cc0c530103d87a80004bd7019818980c19818980c198189809198189ba90014bd7025eb812f5c097ae091119912cc00400a2942265300130363037001992cc004c0bcc0ccdd5000c4dd6981a181b9bab303730343754003148001032181b000cdd5801a444b30010018acc004cdd780180344cc01400920008a5040d11325980099baf4c0101400030360018acc004cc01800cdd6981b981d1bab3037001899baf004374c607600514a081aa2b30013300600348002266ebc01001e2941035206a303900140dc329800800c01a446606e0046606e6e980052f5c08008889660020051330014c0103d87a80004bd6f7b63044c8cc896600266e452201000028acc004c06000a266008604266074607000697ae000189980226103d87a800000540d9198008034006446600c0046607800a00280310361bae3035001303a003303800240d914a114a114a081b8dd31981919bb037520046e98cc0c8cdd81ba90014c010101004bd6f7b63025eb7bdb1808928c89660026054605c6ea800a26464653001375a606a00330360019bad30350039bae303500248889660026074007132598009819181b1baa00189919191919194c004dd69820000cc1040066eb4c1000166eb4c1000126eb4c10000e6eb4c100009222222598009823802c4c966002607e60866ea8006264646644b3001304c0038998171bac304b00a2259800801407226644b30013047304b3754005132323259800982980144cc0b0c14800c4c966002609600313259800982a800c4c8c966002609c00313259800982c000c4cc0c4c15c0040262c82a8c14cdd500145660026098003132323298009bad30590019bad30590039bad305900248896600260ba00900e8b20b4182c800982c00098299baa0028b20a2414460a26ea8004c1500062c8290c140dd50014566002609200315980098281baa002802c5905145904e209c304e375400316414060a200260a200260986ea800a2c8250c1340084c004c13800904b4590491bae3049001375c6092004609200260886ea80062c8210c1180322c82206080002607e002607c002607a0026078002606e6ea80062c81a8c0e400e2c81b8606a0026068002605e6ea800a2c816a466ebd300103d87a8000300a302e3754003223375e980101a000374c6603c0040032259800800c5200089805198010011819800a0609803803c89660020031480022601466004004606600281824464646600200200844b30010018a508acc004cdd78019818981a800c528c4cc008008c0d80050302066301233031375200297ae092cc004c038dd7181898171baa001898071bae301a302e375400314a0816122222222222222229800911181ccc00400e005001404d222330283756604e60806ea800c8cc8966002607860846ea8006264b30013375e006980103d87c80008a518992cc00401226644b300130420018acc004c11cdd5003400a00682422b300130400018acc004c11cdd5003400a00682422b3001303f0018acc004c11cdd5003400a00682422b300130410018acc004c11cdd5003400a00682420068229045208a41142b3001303f3044375400914a313259800982098229baa0018992cc006600266ebcc128c11cdd5181998239baa001009a50a51411514a31330080063033304737540028228c124c118dd5000c528a0883301537586090608a6ea80208cdd7982498231baa001003410c60886ea8012003001800c00504a0a514108608c60866ea8006294504118208009820000c8c8cc0340044004c03400644660460044660506605e6eacc0b0c100dd500080112cc004c0e8dd69820800c4cdd7982218209baa0023300e0033023375c608000314a081fa44453001004801ccc08000800500d48c8cc0280044004c0340064446644b30010018014566002608c0031302b3304430450014bd704009043208614c103d87a80003302b0032303a98009bab302d3041375400300380120289114c00400e005001403130050059801801a444444444464646530013758609a003222259800982318269baa303b304e3754009159800cc004dd5981d18271baa004801400501144cdd7982898271baa0040038a50413114a08262464b3001337129001000c56600266e2400520108acc004cdc3980398099bac3038304c375400400315980098119bad3039304c375400515980098119bad3028304c375400515980098119bad3025304c375400515980099b89375a604a60986ea80092020899b8930063758604860986ea800920408a50412914a08252294104a452820948a50412914a08252294104a18031bac3037304b37540029112cc00400e264b30010018992cc004c14c0062646644b300198009bab303e3052375400704f801201c8acc004c018006264b3001304e30523754003132598009980c9bab30283054375408e604c00315980099b883259800800c5a26eb4c160005056182c182c18210009bad30413054375400715980099baf3040305437540066e9cc966002003168991981e000912cc00400a20071323002305d003375c60b600482c8dd6182c000a0ac3058304200189980e9bab302c3054375408e0a314a082922941052452820a43022303f3053375460ac60a66ea80062b30013375e6e98cc108dd5981598299baa046050374c660aa66ec0dd4801a610101004bd6f7b6304566002609c6eb4c0bcc14cdd5001456600266ebd301018000302b305337540051304e375a605860a66ea800a2941051452820a28a5041448288cc088dd6182a98291baa04529800981f98299baa00199810028001c14200680422941050452820a03021305330503754002602200260a4003164140660726eb0c0ecc138dd502094c00400609903f40211598009829000c660024530010029bae305330503754003375c607860a06ea80050234a600200348900a441004089225980099b8800100288014400504e4889660026466002002660826eacc0f8c148dd5002001912cc00400629422b30013371e606a6eb8c148c15800400e294626600400460ae002828905444cdd7982a18289baa0033301e0020018a50413d22329800800c00e004800888966002005100189919914c00401a60b400b32330010010052259800800c4cc168cdd81ba9004374c00697adef6c6089919912cc004cdc8803801456600266e3c01c00a264b30013375e98101a000374c003100289982f19bb037520106e9800400905a194c0040066eacc17001200e800888966002005100189919914c00401a60ca00b32330010010052259800800c4cc194cdd81ba9004375000697adef6c6089919912cc004cdc8803801456600266e3c01c00a264b30013370e00266e052000007880144cc1a4cdd81ba9008375066e0000401c0090651bad306600389983419bb0375200e6ea001801106444cc1a000ccc0140140050641bae30630013068002306600141908030dd7182f0009bad305f0013061002417d13305d337606ea401cdd300300220b289982e80199802802800a0b2375c60b000260ba00460b600282c90061bae3053001375660a800260ac00482a2444653001001802400d0011112cc00400a200319800801cc16000a6600860ae00400280190554c0e8c138dd51828800a4444444646644b3001330213756606060b06ea812c1562b3001980099198008009bac30463059375409844b30010018a508acc006600260ba00305782520268a51899801001182f000a0b0416d4a14a282b23300104b801c896600260a660b26ea800a266446644b30013059305d375400313259800cc004dd59825982f9baa00682e40266eb4c188c17cdd5002a03c8acc004c160c8cc004004dd6183198301baa0532259800800c52000899912cc0066002609e60c66ea800a0c100d40491303e0018800a0c230640013300200230650014189159800acc004cdc39bad304c305f375400a6eb4c130c17cdd50044660026606a6eb0c0dcc17cdd50041bad3062305f375400b4a14a282ea294105d4566002660686eb0c110c17cdd50291bae304b305f375400b159800992cc004c164c17cdd5000c4cdc49bad3063306037540026eb4c0e4c180dd5181e18301baa0068a50417860c460be6ea8c12cc17cdd5181e982f9baa0528acc004c8cc896600266e24008dd6982718311baa0038acc004cdc48011bad304f30623754007159800acc004c098c194c188dd5001c528c56600266e24004dd6981f18311baa003899b89001375a607460c46ea800e294106020c08991919800800804112cc0040062946264664466446600400400244b30010018801c4c8c9660026600800860e000715980099baf00100a8a518acc004c0c00062946266e24dd6983600124000835106a452820d430543306d375200a660da60d400297ae0306d00141ac6eacc1a000cdd718328009980180198350011834000a0cc30653062375400714a083022941060452820c0330120043063306037540026022008607660be6ea80162b300133225980099baf4c1018000374e00314a313304500225980099baf30653062375400200f14a313232330010010042259800800c528456600266ebcc1a000400e294626600400460d20028319066183298311baa001418082f8dd61826182f9baa0523758606660be6ea8c0ecc17cdd5002c566002660866eb0c130c17cdd502912cc006600266ebcc18cc180dd5000802d28528a0bc8a518acc006600200305d805201e8a518acc004cdd7a6103d8798000304d3060375400313375e98103d87a8000303c3060375400314a082f105e20bc8acc004cc07ccc100dd61831182f9baa0522304c306037540020b91598009980f9bac304c305f37540a40b915980099baf3062305f375400200915980099baf304b305f3754002609660be6ea801a2b3001332259800982c98301baa001899198168008acc004cdd799191826998331833801198331833800998331833983400099833191919182819834983500199834983500119834982a18339baa304330673754010660d260d4002660d2607e60ce6ea8c10cc19cdd50041835983580098351835000983480098321baa30403064375400697ae0306700130623754002007159800981c9bad304f30623754607c60c46ea80062b3001337126eb4c13cc188dd5181f18311baa001375a609e60c46ea8c0f8c188dd5001c56600260726eb4c0e8c188dd5181f18311baa001899b89375a607460c46ea8c0f8c188dd50009bad303a30623754607c60c46ea800e2941060452820c08a50418114a08300c190c184dd5000c52820be3232304a33063306400233063306400133063306430650013306332323232304e33067306800333067306800233067375066e04dd6982918329baa0043301548000cc05c024c1a0c194dd5002198339834000998339ba8598009814983418329baa00489bad303d306537540091337026eb4c0f4c194dd50021980aa4000602c0128318c1a4c1a4004c1a0c1a0004c19c004c188dd5000981e98309baa0074bd701832000982f9baa005304c305f37540031598009814800c4cc0a0dd5981b982f9baa05205c8a50417514a082ea294105d452820ba8a50417514a082ea294105d452820ba8a50417514a082ea294105d452820ba8a50417514a082e8c184c178dd5000c5905c198054c004dd6182f982e1baa04fa5eb7bdb18244b30013375e60c260bc6ea8c128c178dd5001001c4cc030004dd59825182f1baa304a305e3754005100141708048c8cc00400660026eb0c128c174dd502852f5bded8c1225980099baf3062305f375400400913300d0013756609660be6ea800a200282e900a112cc004006297adef6c608991983099bb0305e001374c64660020026eacc180008896600200314bd6f7b63044c8cc190cdd818308009ba83370290001bad3062001330030033066002306400141886600600660c600460c200282fa60026eb0c124c170dd5027c1666607600c6eb4c17cc170dd500120323018001305d305a375400314a082c101a452820ac8a504158604e002602e00460b060aa6ea8005038413c8278dd618281828802456600260a20071598009bac305030510048cc004c14000e44464b3001304c0018992cc00400600713259800800c01200900480244c96600260b0007006802a0aa375c00282c0c15400505318289baa0048acc004c128006264b3001001801c4c966002003004802401200913259800982c001c01a00a82a8dd7000a0b03055001414c60a26ea8012004827904f18279baa003912cc0040062900044c0a8cc008008c14c00505048cdc39b8d00148102464b30010018b44dd69829000a0a0303c001911919800800801912cc004006298103d87a80008992cc004cdd78021828800c4c0eccc150c1480052f5c11330030033056002414060a80028292444646644b3001002800c56600260ae0051303c3305530560024bd70400505420a83303c00429800800c00a009003401c298103d87a80003301d0020019119198008009bac303c3050375400644b30010018a508acc004cc09800cdd7182a000c528c4cc008008c15400504f20a4488888888ca6002604e0033017304230563754013300700748896600266ebd30103d87980003259800982a982c9baa00189919912cc004c1600062b3001305d37540070028b20bc8acc004c1580062b3001305d37540070028b20bc8acc004c1540062b3001305d37540070028b20bc8acc004c15c0062b3001305d37540070028b20bc8b20b6416c82d905b0800982d1baa001305d305a37540031641606600e6eacc100c164dd5026181e1982d982e182c9baa00c4bd7045660026607a6eb0c118c164dd502612cc004cdd7982e982d1baa0010058a518cc00660020030578252026a50a51416082c2264b30013259800800c528c4c96600260aa00313259800982c182e1baa0018992cc004cc02801cdd61821982f1baa0518994c004006900040150011112cc0040062946264b300198008024c0f400e60cc00480222646644b3001306030643754005132325980098301bad30670068acc004cdc780299823008801c56600266ebcc1a8c19cdd50011981a032008c5660033001375660a660ce6ea800a0c900540cd1598009818801456600266e1cdd6983518339baa0010038acc004cdc39bad3054306737540026eb4c150c19cdd500544c966002b3001303f375a60a860d06ea80062b3001303f375a60aa60d06ea80062b3001303f375a608860d06ea80062607e6eb4c100c1a0dd5000c52820cc8a50419914a083322b30013371090001bad30413068375400315980099b8930103758607860d06ea800520108acc004c0b0c1acc1a0dd5000c56600260c66eb4c110c1a0dd5000c4c18cdd6982018341baa0018a50419914a283322941066452820cc8a504198608660ce6ea80062941065452820ca8a50419514a0832a2941065452820ca8a504194604800260d060ca6ea800a2c831a60026eb0c140c18cdd502b41820028100cdc01bad303f306337540180086eb8c18400629410601832000a0c48a504170603c60c060ba6ea80062c82da60026eb0c124c170dd5027c16600c804a2b300130540018acc004cc020014dd61820982e1baa04f8998220011192cc004c014dd6982f0014566002601c00313371e608000201114a082e2294105c1bae305c0018a50416914a082d105a182d1baa3259800982b982d9baa00189919912cc004c1680062b3001305f37540070028b20c08acc004c1600062b3001305f37540070028b20c08acc004c15c0062b3001305f37540070028b20c08b20ba417482e84004c170dd5000982f982e1baa0018b20b4330093756608460b66ea8138c110cc174dd482c25eb8105c198249bab3032305a375409a0af19800826c0164464b300130580018acc00660026eacc124c174dd5001416a00e81022b3001330090063758608460ba6ea81422b30013301d3303e375860c060ba6ea81408c128c178dd500082d45660026603a6eb0c128c174dd502802d44c96600260b260ba6ea80062646464b30013371e0020a313302f0021323259800cc004dd5982798319baa005830403501f4566002602e00915980099b89375a60a060c66ea8030dd6982818319baa0048acc004cdc39bad303f3063375400866e00dd6981f98319baa00c001899b87375a607860c66ea8010cdc099b80375a607860c66ea8030004dd698331833801452820c28a50418514a0830a29410611bad3065001329800800ccc144dd5981d18311baa05505fa5eb8501000081010000200222259800801440063300100398340014c8cc8966002b30013017002899b8f30490020118a50419513322598009831001c4cc1acdd41822001198359ba80014bd704566002602000713306b3750004660d66ea0c1100052f5c116419c8338dd698350021bad306a306b0048b20ca375c60c80026eb4c194004c19c00900320ca8acc004cc098dd5981a98309baa0540018998151bab3039306137540a80bd14a082f905f181900098170009830982f1baa0018b20b898009bac304a305d37540a105a803a0148a50416d14a082da294105b452820b68acc004c15400626464b300198009bab304b305f375400905c804c00501e4566002660160106eb0c110c17cdd5029456600264b30013371064b30010018b44dd69832000a0c430643064304e003375a609a60c06ea802629462b3001330363758607060c06ea8024c03c00e2946264b30010048acc004c170c180dd500244c9660020030028992cc004006007003801c4cc89660020030058992cc00400600d006803401a26644b300100180444c966002003009804c02626644b3001001805c4c9660020031598009838001456600260ce60d66ea8006264b3001001806c4c96600200313259800800c03e264b300100180840420211332259800800c04a264b3001001809c04e0271332259800800c056264b300100180b405a02d1332259800800c062264b300100180cc0660331332259800800c06e264b300100180e40720391332259800800c07a264b300100180fc07e264b30013084010038acc004c1ecc1fcdd5009c4c9660020030218992cc004006045022811408a26644b300100181244c966002003025812c09604b13259800984500801c4cc1b001c8966002005132598009841009844009baa001899b88375a60c46112026ea8c194c22404dd50161bad308c01308901375400314a0843808c22c04c22004dd51845809844009baa0298992cc004006264b3001308501308901375400513259800800c0ae264b30010018992cc00400605b13259800800c56600261240200519800801c4c96600261140200313259800800c0c2264b30010018acc004c2540400a264b3001308d010018992cc00400606713259800800c56600261300200519800800c02e068823206884a80a06903481a40d109901184b00800a128023092013754005159800984580800c4c9660020030338992cc00400606903481a44cc89660020030368992cc00400606f03781bc4cc89660020030398992cc00400607503a81d44c966002613e0200701281da13802375a00303a427c0461380200284d008dd6800984d8080140dd09c01184c80800a12e02375a002613002005034426404612c0200284a008c24804dd500140c9090012120023090013754003031424805031818c0c606284b008c24c04005091011847809baa0028acc004c220040062b3001308f013754005006817a12002817a11a02423404611a026ea800605c820205c84780a05d02e81740b909301184800800a11c0230900100281640b205902c424404611c02002846008c22804dd500140a90880109801184680801c0a6053029814a11c02308b01002422405026421c046eb800508a01184380800a10a02375c002610c02004843808c21004005082011840009baa01381020fc810210202375800301f80fa1080230810100141fc6eb4004c2000400a038840808c1f800507c1bad001307d00280ca0fc307b00141e46eb4004c1e800a02c83d8c1e00050761bad0013077002809a0f0307500141cc6eb4004c1d000a02083a8c1c80050701839001403a01d00e80720e6307000141b860d86ea80060188352018836a01900c80640310711837000a0d8375a00260da00500941b860d60028348dd7000983500120d6306800141986eb4004c19c00a0068340c19400506318309baa004800a0be800c0060030014198294105e20bc303d305f37540a51300698009bab3037305f37540a505c9981f004800a0648a50417514a082ea294105d18068009816001452820b6416c60b66ea800901c452820b0370e9000c52820ae8a50415c305830553754608260aa6ea8021037413903741388270660966e9ccc0d0dd6182618249baa03c0013304b374e660686eb0c0d4c124dd501e000a5eb80a6002606a60926ea800608d039400844464b30013043304a375400313298009827800c5284c13cc130dd50012444b30013048304e375400713259800982598279baa0018992cc004c130c140dd5000c4c966002609660a26ea80062b30013371e6eb8c154c148dd5003005456600330013756607c60a46ea802e015375c60aa60a46ea800501544cdc79812002004c52820a08a504141005414060a860a26ea80060088278c14cc140dd5000c00d04e18291829802400904d0cc134c138c12cdd5182718259baa0043304d3037304b3754609c60966ea80112f5c114a08248c0dcc128dd500188b201c3012300f375400b159800980480244c8cc88cc0180104c966002601c60246ea800a2b3001300c30123754602c60266ea800a2946002808a00280885281bad301300130133014001300f375400b1640348068601a601c002601a00a8a4d1365640084c011e581ced61963ac94d12c0b320be5a336c36af66bc02c380e0aa30018992530001";
|
|
28
|
+
/**
|
|
29
|
+
* Hash of logic version 1 applied to the account proxy hash: what a control
|
|
30
|
+
* datum names in its first field, and the script stake credential the proxy
|
|
31
|
+
* requires a withdrawal from to run the logic.
|
|
32
|
+
*/
|
|
33
|
+
const LOGIC_V1_HASH = "2cd68e398bdf9fbc8d257614b54403451ee722520ec785fe14f8df5a";
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region ../../packages/lib/cardano-custody/src/blueprint/provenance.ts
|
|
36
|
+
/** Upstream revision of the vendored blueprint. */
|
|
37
|
+
const CUSTODY_CONTRACT_REVISION = "b48545f4be850c1044de2dbeb51751718b4b8e70";
|
|
38
|
+
/** Compiler the blueprint names in its preamble. */
|
|
39
|
+
const CUSTODY_CONTRACT_COMPILER = "Aiken v1.1.24+bacbeb3";
|
|
40
|
+
/**
|
|
41
|
+
* SHA-256 of the vendored `plutus.json`, byte for byte as upstream committed
|
|
42
|
+
* it. Re-pinning the blueprint changes this value; a script hash changes only
|
|
43
|
+
* when that validator's code changes.
|
|
44
|
+
*/
|
|
45
|
+
const CUSTODY_BLUEPRINT_SHA256 = "8b48096f70a5d0cb207659fcc7875b5f0639f7822604c6e7db439212b5374dde";
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region ../../packages/lib/cardano-custody/src/blueprint/stake-validator.ts
|
|
48
|
+
/**
|
|
49
|
+
* Compiled code of the account stake validator (`account_stake.account_stake`)
|
|
50
|
+
* before parameter application, as the blueprint carries it. Its parameters
|
|
51
|
+
* are, in order, `owner: VerificationKeyHash` and `proxy_hash: ScriptHash`.
|
|
52
|
+
*/
|
|
53
|
+
const UNAPPLIED_STAKE_VALIDATOR_COMPILED_CODE = "5904bb0101002229800aba2aba1aba0aab9faab9eaab9dab9a9bae0039bae002488888888966003300130053754015222323322330020020012259800800c00e26464b30013372200c00315980099b8f00600189bad300d002802a0168998020021808801a016375c6016002601c0028060c8c8cc0040040188966002003003899192cc004cdc8804000c56600266e3c02000626eacc03800a00a806226600800860240068060dd718060009807800a01a14bd6f7b6300a400123009300a0019180498051805000cdd2a4001370e90024dc3a40052232330010010032259800800c528456600266e3cdd71806000801c528c4cc008008c03400500720149192cc0040062d13232330010010022259800800c400e26466006006601e0046eb8c03400500b1bac300a00140206014600c6ea80064601260146014601460146014601460146014003370e90002444444444453001301400b9809805c88c024cc050c054c048dd518049980a19ba548008cc050dd480125eb80cc051300103d87a80004bd701980a18049980a18049980a19ba548008cc050dd4800a5eb812f5c097ae04bd704888966002601460266ea8c030c050dd50024566002601330013756601a60286ea8012005001403913375e602e60286ea801000e2941012452820249192cc004c020c044dd5000c4c054c048dd5000c59010180498089baa001912cc004c00cc044dd5001456600260246ea800a00316404d164040911111194c004c058dd5000c888cc88cc8966002601e603a6ea800a26466002002602460166030603e6ea8c088c07cdd5001912cc00400629422b300133014003375c604600314a313300200230240014078810a2c80e0c8cc004004c8cc00400400c896600200310058998109811000998010011811800a0402259800800c530103d87a80008992cc00660026030603e6ea80066601a00e00d00780320188980b19810800a5eb82266006006604600480e8c08400501f1bac300e301c375400a6eb0c074c068dd50019bac3013301a3754007301a0074889660026020007132330060021598009808180d1baa0018cc00402a02f375c603c60366ea8005003459019180e980d1baa0048acc004cdc3a400c007132332233008004198008a50980e1baa00191112cc004cc054dd6180998109baa0040038acc004c05a60026eacc090c094c094c094c094c084dd5002400a00280da264b30013013302137540031330163015300e302530223754002009164080646644b3001002800c56600260500051301b3302630270024bd704005025204a32330010013758603660466ea8018896600200314bd7044cc89660033001002802c01e00c809a266050004660080080031330040040014090604e00260500028128530103d87a80003300f0020018a50407d14a080f922259800980880144c966002602c60406ea80063300101080f40766eb8c090c084dd5000a004802203e30233020375400915980099b874801800a264b300130163020375400319800808407a03b375c604860426ea8005002401101f181198101baa0048acc004c05800a264b30013016302037540031980080840766eb8c090c084dd5000a012802203e302330203754009003407880f101e0dd6980f000980f180f800980d1baa0048b203040603019301a006229344d95900301";
|
|
54
|
+
/** Hash of the stake validator before parameter application. */
|
|
55
|
+
const UNAPPLIED_STAKE_VALIDATOR_HASH = "edcfa41389b7b924916ad7408cd2d0f75a7a3dae8717f9bbf1a668c6";
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region ../../packages/lib/cardano-custody/src/blueprint/reference-scripts.ts
|
|
58
|
+
/** The account proxy and logic version 1, parked on Preprod. */
|
|
59
|
+
const PREPROD_REFERENCE_SCRIPTS = [{
|
|
60
|
+
scriptHash: "ed61963ac94d12c0b320be5a336c36af66bc02c380e0aa3001899253",
|
|
61
|
+
txIn: {
|
|
62
|
+
txId: "574e6c3d2e64303015f4db89930848b47fef501c65c448a59d843a383a63fc7e",
|
|
63
|
+
index: 0
|
|
64
|
+
},
|
|
65
|
+
address: "addr_test1wqkddr3e300el0ydy4mpfd2yqdz3aeez2g8v0p07znud7ksuhmmkz",
|
|
66
|
+
coins: 12692950n
|
|
67
|
+
}, {
|
|
68
|
+
scriptHash: "2cd68e398bdf9fbc8d257614b54403451ee722520ec785fe14f8df5a",
|
|
69
|
+
txIn: {
|
|
70
|
+
txId: "000b0715bb8613761555becc9b50105dd3e23b93f91bce01dea72c3bbd0228f8",
|
|
71
|
+
index: 0
|
|
72
|
+
},
|
|
73
|
+
address: "addr_test1wqkddr3e300el0ydy4mpfd2yqdz3aeez2g8v0p07znud7ksuhmmkz",
|
|
74
|
+
coins: 40281260n
|
|
75
|
+
}];
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region ../../packages/lib/cardano-custody/src/result.ts
|
|
78
|
+
const ok = (value) => ({
|
|
79
|
+
ok: true,
|
|
80
|
+
value
|
|
81
|
+
});
|
|
82
|
+
const fail = (error) => ({
|
|
83
|
+
ok: false,
|
|
84
|
+
error
|
|
85
|
+
});
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region ../../packages/lib/cardano-custody/src/contract-version.ts
|
|
88
|
+
const LOGIC_V1 = {
|
|
89
|
+
hash: LOGIC_V1_HASH,
|
|
90
|
+
title: "logic_v1",
|
|
91
|
+
script: {
|
|
92
|
+
__type: ScriptType.Plutus,
|
|
93
|
+
bytes: LOGIC_V1_COMPILED_CODE,
|
|
94
|
+
version: PlutusLanguageVersion.V3
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const CUSTODY_CONTRACT_B48545F = {
|
|
98
|
+
accountValidatorHash: ACCOUNT_VALIDATOR_HASH,
|
|
99
|
+
accountValidator: {
|
|
100
|
+
__type: ScriptType.Plutus,
|
|
101
|
+
bytes: ACCOUNT_VALIDATOR_COMPILED_CODE,
|
|
102
|
+
version: PlutusLanguageVersion.V3
|
|
103
|
+
},
|
|
104
|
+
logics: [LOGIC_V1],
|
|
105
|
+
currentLogicHash: LOGIC_V1.hash,
|
|
106
|
+
unappliedStakeValidator: {
|
|
107
|
+
compiledCode: UNAPPLIED_STAKE_VALIDATOR_COMPILED_CODE,
|
|
108
|
+
hash: UNAPPLIED_STAKE_VALIDATOR_HASH,
|
|
109
|
+
bodyBitLength: 9658
|
|
110
|
+
},
|
|
111
|
+
referenceScripts: { [NetworkMagics.Preprod]: PREPROD_REFERENCE_SCRIPTS },
|
|
112
|
+
blueprintSha256: CUSTODY_BLUEPRINT_SHA256,
|
|
113
|
+
compiler: CUSTODY_CONTRACT_COMPILER,
|
|
114
|
+
revision: CUSTODY_CONTRACT_REVISION,
|
|
115
|
+
deviceAccountIndex: {
|
|
116
|
+
default: 1,
|
|
117
|
+
byNetworkMagic: { [NetworkMagics.Mainnet]: 0 }
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
/** Every supported contract version, oldest first. */
|
|
121
|
+
const SUPPORTED_CUSTODY_CONTRACT_VERSIONS = [CUSTODY_CONTRACT_B48545F];
|
|
122
|
+
/** The version Lace creates new custody accounts with. */
|
|
123
|
+
const CURRENT_CUSTODY_CONTRACT_VERSION = CUSTODY_CONTRACT_B48545F;
|
|
124
|
+
/**
|
|
125
|
+
* The supported contract version an account validator hash names. Any other
|
|
126
|
+
* hash is refused: Lace cannot derive or verify identities, nor sign for
|
|
127
|
+
* accounts, of a build it has not pinned.
|
|
128
|
+
*/
|
|
129
|
+
const findCustodyContractVersion = (accountValidatorHash) => {
|
|
130
|
+
const version = SUPPORTED_CUSTODY_CONTRACT_VERSIONS.find((candidate) => candidate.accountValidatorHash === accountValidatorHash);
|
|
131
|
+
return version ? ok(version) : fail({
|
|
132
|
+
code: "unsupported-contract-version",
|
|
133
|
+
accountValidatorHash
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* The logic of a version's catalogue that a control datum names. Any other
|
|
138
|
+
* hash is refused: Lace cannot judge what an account under unreviewed rules
|
|
139
|
+
* allows, so it neither operates nor signs for one.
|
|
140
|
+
*/
|
|
141
|
+
const findCustodyLogic = (version, logicHash) => {
|
|
142
|
+
const logic = version.logics.find((candidate) => candidate.hash === logicHash);
|
|
143
|
+
return logic ? ok(logic) : fail({
|
|
144
|
+
code: "unknown-logic",
|
|
145
|
+
logic: logicHash
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* The UTxOs that park a version's proxy and logic scripts on a network, as
|
|
150
|
+
* the chain holds them: each at its pinned outref and address, with its
|
|
151
|
+
* pinned lovelace and the vendored script as its reference script. None on
|
|
152
|
+
* a network without parked scripts.
|
|
153
|
+
*/
|
|
154
|
+
const custodyReferenceScriptUtxos = (version, networkMagic) => (version.referenceScripts[networkMagic] ?? []).flatMap(({ scriptHash, txIn, address, coins }) => {
|
|
155
|
+
const logic = findCustodyLogic(version, scriptHash);
|
|
156
|
+
const script = scriptHash === version.accountValidatorHash ? version.accountValidator : logic.ok ? logic.value.script : void 0;
|
|
157
|
+
return script ? [[{
|
|
158
|
+
...txIn,
|
|
159
|
+
address
|
|
160
|
+
}, {
|
|
161
|
+
address,
|
|
162
|
+
value: { coins },
|
|
163
|
+
scriptReference: script
|
|
164
|
+
}]] : [];
|
|
165
|
+
});
|
|
166
|
+
/**
|
|
167
|
+
* The CIP-1854 account index `a` of `m/1854'/1815'/a'` that holds the
|
|
168
|
+
* creator and device keys of a version's accounts on a network. A later
|
|
169
|
+
* contract version may give networks separate index ranges, so callers
|
|
170
|
+
* always take the index from here and never assume one.
|
|
171
|
+
*/
|
|
172
|
+
const custodyDeviceAccountIndex = (version, networkMagic) => version.deviceAccountIndex.byNetworkMagic[networkMagic] ?? version.deviceAccountIndex.default;
|
|
173
|
+
const LOWER_CASE_HEX = /^(?:[\da-f]{2})*$/;
|
|
174
|
+
const WHOLE_BYTES_HEX = /^(?:[\da-f]{2})*$/i;
|
|
175
|
+
/** Whether a value is lower-case hex of whole bytes, optionally of a given byte length. */
|
|
176
|
+
const isLowerCaseHex = (value, byteLength) => typeof value === "string" && LOWER_CASE_HEX.test(value) && (byteLength === void 0 || value.length === byteLength * 2);
|
|
177
|
+
/** Whether a value is the lower-case hex of a 28-byte hash. */
|
|
178
|
+
const isHash28Hex = (value) => isLowerCaseHex(value, 28);
|
|
179
|
+
/**
|
|
180
|
+
* The bytes of a hex string. Throws for an odd length or a non-hex character
|
|
181
|
+
* rather than silently dropping or zeroing them: `HexBlob` admits an odd
|
|
182
|
+
* length, and an encoder must never write bytes other than the ones it holds.
|
|
183
|
+
*/
|
|
184
|
+
const hexToBytes = (hex) => {
|
|
185
|
+
if (!WHOLE_BYTES_HEX.test(hex)) throw new InvalidStringError(`expected hex of whole bytes, got '${hex}'`);
|
|
186
|
+
const bytes = new Uint8Array(hex.length / 2);
|
|
187
|
+
for (let index = 0; index < bytes.length; index++) bytes[index] = Number.parseInt(hex.slice(index * 2, index * 2 + 2), 16);
|
|
188
|
+
return bytes;
|
|
189
|
+
};
|
|
190
|
+
const bytesToHex = (bytes) => Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
191
|
+
//#endregion
|
|
192
|
+
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,155 @@
|
|
|
1
|
+
import { t as getObservability } from "./src-Cv1ifqbe.js";
|
|
2
|
+
import { t as HttpClientError } from "./error-CvEYL98P.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 };
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
require("./chunk-9hOWP6kD.cjs");
|
|
2
|
+
const require_src = require("./src-CeBNkonz.cjs");
|
|
3
|
+
const require_error = require("./error-B6wj9nPv.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
|
+
});
|