@laceio/sdk 0.1.0 → 0.1.1-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- 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-BDdWqMAY.js +267 -0
- package/dist/account-call-BExOpZoo.js +3 -0
- package/dist/account-call-CYYoAS1E.cjs +314 -0
- package/dist/account-call-Cvj7viaq.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-De9WJH1J.cjs +183 -0
- package/dist/artefact-loader-nlsYFjxU.js +160 -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 +27612 -8128
- 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-2KVxlHyu.cjs +189 -0
- package/dist/contract-DjQqqZLo.js +171 -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-BPDz2oqa.js +3 -0
- package/dist/device-readers-CVqmvmLZ.js +145 -0
- package/dist/device-readers-DzkDMjPn.cjs +7 -0
- package/dist/device-readers-XMZMfFvZ.cjs +168 -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-BmL7onAK.cjs +1721 -0
- package/dist/envelopes-CfWTR2uy.js +1620 -0
- package/dist/errors-BA3b8aVu.cjs +584 -0
- package/dist/errors-pkQdxW-7.js +392 -0
- package/dist/experimental.cjs +6875 -0
- package/dist/experimental.d.ts +63670 -0
- package/dist/experimental.js +6725 -0
- package/dist/fees-6C2uEWFK.js +653 -0
- package/dist/fees-DtC71fOx.cjs +820 -0
- package/dist/gated-call-DLC5PBlN.cjs +736 -0
- package/dist/gated-call-DQhT7v2J.js +695 -0
- package/dist/gated-call-DdNOQh_Z.js +3 -0
- package/dist/gated-call-wAB15GtN.cjs +4 -0
- package/dist/grant-circuits-BKJrMSNo.cjs +49 -0
- package/dist/grant-circuits-D53wmGyr.js +26 -0
- package/dist/grant-rules-fYt80KB1.cjs +7114 -0
- package/dist/grant-rules-rG1kJq6l.js +6833 -0
- package/dist/grant-status-CDmZpx32.js +296 -0
- package/dist/grant-status-CQtwjLsA.cjs +337 -0
- package/dist/grants-C5wpNvZJ.cjs +266 -0
- package/dist/grants-DY3sN9We.cjs +16 -0
- package/dist/grants-ngFtS52g.js +213 -0
- package/dist/grants-qpXC94Rk.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 +45146 -13439
- 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-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-BX0AZAVH2.js → init-CS98M3iD.js} +2 -2
- 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-lcaUSOOG.js → init-CwLZXfTl.js} +1 -1
- package/dist/init-Cz5LAizN.js +2001 -0
- package/dist/init-D4WM3-Mn.cjs +18 -0
- package/dist/init-DJzEpODO.js +2373 -0
- package/dist/init-DMi2FGpf.cjs +424 -0
- 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-DFwhgert.cjs → init-DnELgrhn.cjs} +1 -1
- package/dist/init-DypZuehC.cjs +2374 -0
- 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-BgrY29gW.js → init-dsYkC_0B.js} +4 -4
- package/dist/{init-DvVgKCaP2.cjs → init-kVOOiU0-.cjs} +2 -2
- 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-BBJcD2uC.js +85 -0
- package/dist/jubjub-authoriser-BlXt4Z-D.cjs +86 -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-4IgYsKeN.js +999 -0
- package/dist/modules-cardano-Baqj2GZH.cjs +1112 -0
- package/dist/node-relay-BEtqi_vU.cjs +49 -0
- package/dist/node-relay-CkgpDObu.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--Hg9iF5v.cjs +366 -0
- package/dist/providers-DQ5_3h2l.js +343 -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-Bm9-P0L-.cjs +1445 -0
- package/dist/sdk-Cf__6dDe.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-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-zNEspZND.js → slice-D0VzpMbY.js} +2 -2
- package/dist/slice-D14F78Ca.js +87 -0
- package/dist/slice-DJelVt0i.js +9013 -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-RQRLciQc.cjs +9031 -0
- 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-CE0AD-xH.js +983 -0
- package/dist/submit-bitcoin-tx-CK10OTfQ.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-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-46lh8O9r.js +33 -0
- package/dist/types-BhhNR1_B.cjs +50 -0
- 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-ZX90nEJe2.js → init-B0hAl9w6.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-Dt1Xifg_2.cjs → init-CSURGyW_.cjs} +0 -0
- /package/dist/{init-CTQ2g6Xt.js → init-DtxxFaCx.js} +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,281 @@
|
|
|
1
|
+
const require_chunk = require("./chunk-9hOWP6kD.cjs");
|
|
2
|
+
const require__polyfill_buffer_patch = require("./_polyfill-buffer-patch-BycQkEkK.cjs");
|
|
3
|
+
require("./dist-MJof_Ky1.cjs");
|
|
4
|
+
require("./pbkdf2-B1veireP.cjs");
|
|
5
|
+
require("./safe-buffer-DbXbwhUQ.cjs");
|
|
6
|
+
const require_secret_box = require("./secret-box-ZfbYwBgS.cjs");
|
|
7
|
+
const require_address = require("./address-lECYBd9-.cjs");
|
|
8
|
+
const require_bytes_vo = require("./bytes.vo-hecRu3YZ.cjs");
|
|
9
|
+
const require_redacted = require("./redacted-DwxIDdIF.cjs");
|
|
10
|
+
const require_types = require("./types-BhzypKMS.cjs");
|
|
11
|
+
const require_types$1 = require("./types-Dls6Z5gV.cjs");
|
|
12
|
+
const require_keyDerivation = require("./keyDerivation-DcKRUCVh.cjs");
|
|
13
|
+
require("./bn-BFq5a4dk.cjs");
|
|
14
|
+
const require_sign_bitcoin_transaction_with_seed = require("./sign-bitcoin-transaction-with-seed-Ds1dwzan.cjs");
|
|
15
|
+
let rxjs = require("rxjs");
|
|
16
|
+
//#region ../../packages/module/blockchain-bitcoin/src/signing/varint.ts
|
|
17
|
+
var import_dist = /* @__PURE__ */ require_chunk.__toESM(require_address.require_dist());
|
|
18
|
+
var import_src = /* @__PURE__ */ require_chunk.__toESM(require_address.require_src());
|
|
19
|
+
require__polyfill_buffer_patch.init__polyfill_buffer_patch();
|
|
20
|
+
/** Encodes a length as a Bitcoin varint. */
|
|
21
|
+
const varint = (length) => {
|
|
22
|
+
if (length < 253) return require__polyfill_buffer_patch.import_buffer.Buffer.from([length]);
|
|
23
|
+
if (length <= 65535) {
|
|
24
|
+
const buffer = require__polyfill_buffer_patch.import_buffer.Buffer.alloc(3);
|
|
25
|
+
buffer[0] = 253;
|
|
26
|
+
buffer.writeUInt16LE(length, 1);
|
|
27
|
+
return buffer;
|
|
28
|
+
}
|
|
29
|
+
const buffer = require__polyfill_buffer_patch.import_buffer.Buffer.alloc(5);
|
|
30
|
+
buffer[0] = 254;
|
|
31
|
+
buffer.writeUInt32LE(length, 1);
|
|
32
|
+
return buffer;
|
|
33
|
+
};
|
|
34
|
+
/** Encodes a string as its varint byte length followed by its UTF-8 bytes. */
|
|
35
|
+
const varstr = (text) => {
|
|
36
|
+
const bytes = require__polyfill_buffer_patch.import_buffer.Buffer.from(text, "utf8");
|
|
37
|
+
return require__polyfill_buffer_patch.import_buffer.Buffer.concat([varint(bytes.length), bytes]);
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region ../../packages/module/blockchain-bitcoin/src/signing/bip137-sign-message.ts
|
|
41
|
+
require__polyfill_buffer_patch.init__polyfill_buffer_patch();
|
|
42
|
+
const MESSAGE_MAGIC = "Bitcoin Signed Message:\n";
|
|
43
|
+
/**
|
|
44
|
+
* Header base for the compact signature: 27 + 4. The +4 marks a compressed
|
|
45
|
+
* public key, giving the 31-34 header range that Unisat and Electrum emit
|
|
46
|
+
* for segwit addresses. BIP-137's bech32 range (39-42) is deliberately not
|
|
47
|
+
* used because many verifiers reject it.
|
|
48
|
+
*/
|
|
49
|
+
const COMPRESSED_HEADER_BASE = 31;
|
|
50
|
+
/**
|
|
51
|
+
* Computes the Bitcoin signed-message digest:
|
|
52
|
+
* `sha256d(varstr("Bitcoin Signed Message:\n") || varstr(message))`.
|
|
53
|
+
*/
|
|
54
|
+
const magicHash = (message) => import_src.crypto.hash256(require__polyfill_buffer_patch.import_buffer.Buffer.concat([varstr(MESSAGE_MAGIC), varstr(message)]));
|
|
55
|
+
/**
|
|
56
|
+
* Signs a message using the BIP-137 compact recoverable ECDSA scheme.
|
|
57
|
+
*
|
|
58
|
+
* Signs the magic hash of the message with RFC 6979 deterministic ECDSA and
|
|
59
|
+
* returns the hex-encoded 65-byte compact signature header || r || s, where
|
|
60
|
+
* header = 27 + recoveryId + 4 (compressed public key).
|
|
61
|
+
*/
|
|
62
|
+
const bip137SignMessage = (params, request) => {
|
|
63
|
+
const digest = magicHash(request.message);
|
|
64
|
+
const { signature, recoveryId } = import_dist.signRecoverable(new Uint8Array(digest), new Uint8Array(params.privateKey));
|
|
65
|
+
return { signature: require_bytes_vo.HexBytes(require__polyfill_buffer_patch.import_buffer.Buffer.concat([require__polyfill_buffer_patch.import_buffer.Buffer.from([COMPRESSED_HEADER_BASE + recoveryId]), require__polyfill_buffer_patch.import_buffer.Buffer.from(signature)]).toString("hex")) };
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region ../../packages/module/blockchain-bitcoin/src/signing/bip322-sign-data.ts
|
|
69
|
+
require__polyfill_buffer_patch.init__polyfill_buffer_patch();
|
|
70
|
+
import_src.initEccLib(import_dist);
|
|
71
|
+
const BIP322_TAG = "BIP0322-signed-message";
|
|
72
|
+
/**
|
|
73
|
+
* Computes the BIP-322 tagged message hash.
|
|
74
|
+
*
|
|
75
|
+
* Uses BIP-340 tagged hashing: SHA256(SHA256(tag) || SHA256(tag) || message).
|
|
76
|
+
*/
|
|
77
|
+
const bip322MessageHash = (message) => {
|
|
78
|
+
const tagHash = import_src.crypto.sha256(require__polyfill_buffer_patch.import_buffer.Buffer.from(BIP322_TAG, "utf8"));
|
|
79
|
+
const prefix = require__polyfill_buffer_patch.import_buffer.Buffer.concat([tagHash, tagHash]);
|
|
80
|
+
return import_src.crypto.sha256(require__polyfill_buffer_patch.import_buffer.Buffer.concat([prefix, require__polyfill_buffer_patch.import_buffer.Buffer.from(message, "utf8")]));
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Builds the BIP-322 virtual "to_spend" transaction.
|
|
84
|
+
*
|
|
85
|
+
* This transaction embeds the message hash in its scriptSig and the
|
|
86
|
+
* signing address's scriptPubKey as its output. It is never broadcast —
|
|
87
|
+
* it exists only to create a spendable output for the "to_sign" transaction.
|
|
88
|
+
*/
|
|
89
|
+
const buildToSpend = (messageHash, outputScript) => {
|
|
90
|
+
const tx = new import_src.Transaction();
|
|
91
|
+
tx.version = 0;
|
|
92
|
+
tx.locktime = 0;
|
|
93
|
+
tx.addInput(require__polyfill_buffer_patch.import_buffer.Buffer.alloc(32, 0), 4294967295, 0, require__polyfill_buffer_patch.import_buffer.Buffer.concat([require__polyfill_buffer_patch.import_buffer.Buffer.from([0, 32]), messageHash]));
|
|
94
|
+
tx.addOutput(outputScript, 0);
|
|
95
|
+
return tx;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Serializes a witness stack into the BIP-322 Simple proof format.
|
|
99
|
+
*
|
|
100
|
+
* Format: varint(item_count) (varint(item_length) item_bytes)*
|
|
101
|
+
* For P2WPKH: 2 items, an ECDSA signature with SIGHASH_ALL and the compressed
|
|
102
|
+
* public key.
|
|
103
|
+
*/
|
|
104
|
+
const serializeWitness = (witness) => {
|
|
105
|
+
const parts = [varint(witness.length)];
|
|
106
|
+
for (const item of witness) parts.push(varint(item.length), item);
|
|
107
|
+
return require__polyfill_buffer_patch.import_buffer.Buffer.concat(parts);
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Signs a message using BIP-322 Generic Signed Message Format (P2WPKH Simple proof).
|
|
111
|
+
*
|
|
112
|
+
* Constructs the virtual to_spend/to_sign transaction pair per BIP-322,
|
|
113
|
+
* signs with the provided key using BIP-143 segwit v0 digest, and returns
|
|
114
|
+
* the serialized witness stack as a hex-encoded string.
|
|
115
|
+
*/
|
|
116
|
+
const bip322SignData = (params, request) => {
|
|
117
|
+
const { privateKey, publicKey, network } = params;
|
|
118
|
+
const messageHash = bip322MessageHash(request.message);
|
|
119
|
+
const outputScript = import_src.address.toOutputScript(request.address, network);
|
|
120
|
+
const toSpend = buildToSpend(messageHash, outputScript);
|
|
121
|
+
const psbt = new import_src.Psbt({ network });
|
|
122
|
+
psbt.setVersion(0);
|
|
123
|
+
psbt.setLocktime(0);
|
|
124
|
+
psbt.addInput({
|
|
125
|
+
hash: toSpend.getHash(),
|
|
126
|
+
index: 0,
|
|
127
|
+
sequence: 0,
|
|
128
|
+
witnessUtxo: {
|
|
129
|
+
script: outputScript,
|
|
130
|
+
value: 0
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
psbt.addOutput({
|
|
134
|
+
script: require__polyfill_buffer_patch.import_buffer.Buffer.from([106]),
|
|
135
|
+
value: 0
|
|
136
|
+
});
|
|
137
|
+
const signer = {
|
|
138
|
+
publicKey,
|
|
139
|
+
sign: (hash) => require__polyfill_buffer_patch.import_buffer.Buffer.from(import_dist.sign(new Uint8Array(hash), new Uint8Array(privateKey)))
|
|
140
|
+
};
|
|
141
|
+
psbt.signInput(0, signer);
|
|
142
|
+
psbt.finalizeInput(0);
|
|
143
|
+
const witness = psbt.extractTransaction().ins[0].witness;
|
|
144
|
+
return { signature: require_bytes_vo.HexBytes(serializeWitness(witness).toString("hex")) };
|
|
145
|
+
};
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region ../../packages/module/blockchain-bitcoin/src/signing/bitcoin-in-memory-data-signer.ts
|
|
148
|
+
require__polyfill_buffer_patch.init__polyfill_buffer_patch();
|
|
149
|
+
/**
|
|
150
|
+
* Signs arbitrary messages using BIP-137 compact recoverable ECDSA (the
|
|
151
|
+
* default) or BIP-322 Generic Signed Message Format, selected by the
|
|
152
|
+
* request's signatureType.
|
|
153
|
+
*
|
|
154
|
+
* Follows the same authentication and key derivation pattern as
|
|
155
|
+
* BitcoinInMemoryTransactionSigner: triggers user authentication,
|
|
156
|
+
* decrypts the root private key, derives the P2WPKH signing key,
|
|
157
|
+
* and produces the requested proof.
|
|
158
|
+
*/
|
|
159
|
+
var BitcoinInMemoryDataSigner = class {
|
|
160
|
+
#encryptedRootPrivateKey;
|
|
161
|
+
#auth;
|
|
162
|
+
#network;
|
|
163
|
+
#accountIndex;
|
|
164
|
+
constructor(props) {
|
|
165
|
+
this.#encryptedRootPrivateKey = props.encryptedRootPrivateKey;
|
|
166
|
+
this.#auth = props.auth;
|
|
167
|
+
this.#network = props.network;
|
|
168
|
+
this.#accountIndex = props.accountIndex;
|
|
169
|
+
}
|
|
170
|
+
signData(request) {
|
|
171
|
+
return this.#auth.authenticate().pipe((0, rxjs.switchMap)((confirmed) => {
|
|
172
|
+
if (!confirmed) return (0, rxjs.throwError)(() => new require_types.AuthenticationCancelledError());
|
|
173
|
+
return this.#auth.accessAuthSecret((authSecret) => (0, rxjs.from)(this.#signData(authSecret, request)));
|
|
174
|
+
}));
|
|
175
|
+
}
|
|
176
|
+
async #signData(authSecret, request) {
|
|
177
|
+
let rootPrivateKey = null;
|
|
178
|
+
try {
|
|
179
|
+
const encryptedSeed = require__polyfill_buffer_patch.import_buffer.Buffer.from(this.#encryptedRootPrivateKey, "hex");
|
|
180
|
+
const decryptedBytes = await require_secret_box.SecretBox.open(encryptedSeed, authSecret);
|
|
181
|
+
rootPrivateKey = require_redacted.Redacted.make(require__polyfill_buffer_patch.import_buffer.Buffer.from(decryptedBytes));
|
|
182
|
+
const childKeyPair = require_keyDerivation.deriveChildKeyPair(require_keyDerivation.deriveAccountRootKeyPair({
|
|
183
|
+
seed: require_redacted.Redacted.value(rootPrivateKey),
|
|
184
|
+
addressType: require_address.AddressType.NativeSegWit,
|
|
185
|
+
network: this.#network,
|
|
186
|
+
account: this.#accountIndex
|
|
187
|
+
}).pair.privateKey, require_keyDerivation.ChainType.External, 0);
|
|
188
|
+
const bitcoinJsNetwork = this.#network === require_types$1.BitcoinNetwork.Mainnet ? import_src.networks.bitcoin : import_src.networks.testnet;
|
|
189
|
+
const derivedAddress = import_src.payments.p2wpkh({
|
|
190
|
+
pubkey: require__polyfill_buffer_patch.import_buffer.Buffer.from(childKeyPair.pair.publicKey, "hex"),
|
|
191
|
+
network: bitcoinJsNetwork
|
|
192
|
+
}).address;
|
|
193
|
+
if (derivedAddress !== request.address) throw new Error(`Address mismatch: requested ${request.address} but derived key produces ${derivedAddress}`);
|
|
194
|
+
const childPrivateKey = require__polyfill_buffer_patch.import_buffer.Buffer.from(childKeyPair.pair.privateKey, "hex");
|
|
195
|
+
try {
|
|
196
|
+
if (request.signatureType === "bip322-simple") return bip322SignData({
|
|
197
|
+
privateKey: childPrivateKey,
|
|
198
|
+
publicKey: require__polyfill_buffer_patch.import_buffer.Buffer.from(childKeyPair.pair.publicKey, "hex"),
|
|
199
|
+
network: bitcoinJsNetwork
|
|
200
|
+
}, request);
|
|
201
|
+
return bip137SignMessage({ privateKey: childPrivateKey }, request);
|
|
202
|
+
} finally {
|
|
203
|
+
childPrivateKey.fill(0);
|
|
204
|
+
}
|
|
205
|
+
} finally {
|
|
206
|
+
if (rootPrivateKey) require_redacted.Redacted.unsafeWipe(rootPrivateKey);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region ../../packages/module/blockchain-bitcoin/src/signing/bitcoin-in-memory-transaction-signer.ts
|
|
212
|
+
require__polyfill_buffer_patch.init__polyfill_buffer_patch();
|
|
213
|
+
/** Signs Bitcoin transactions using an in-memory wallet. */
|
|
214
|
+
var BitcoinInMemoryTransactionSigner = class {
|
|
215
|
+
#encryptedRootPrivateKey;
|
|
216
|
+
#auth;
|
|
217
|
+
constructor(params) {
|
|
218
|
+
this.#encryptedRootPrivateKey = params.encryptedRootPrivateKey;
|
|
219
|
+
this.#auth = params.auth;
|
|
220
|
+
}
|
|
221
|
+
sign(request) {
|
|
222
|
+
return this.#auth.authenticate().pipe((0, rxjs.switchMap)((confirmed) => {
|
|
223
|
+
if (!confirmed) return (0, rxjs.throwError)(() => new require_types.AuthenticationCancelledError());
|
|
224
|
+
return this.#auth.accessAuthSecret((authSecret) => (0, rxjs.from)(this.#signTransaction(request.serializedTx, this.#encryptedRootPrivateKey, authSecret)));
|
|
225
|
+
}));
|
|
226
|
+
}
|
|
227
|
+
async #signTransaction(serializedTx, encryptedRootPrivateKey, authSecret) {
|
|
228
|
+
let rootPrivateKey = null;
|
|
229
|
+
try {
|
|
230
|
+
const encryptedSeed = require__polyfill_buffer_patch.import_buffer.Buffer.from(encryptedRootPrivateKey, "hex");
|
|
231
|
+
const decryptedBytes = await require_secret_box.SecretBox.open(encryptedSeed, authSecret);
|
|
232
|
+
rootPrivateKey = require_redacted.Redacted.make(require__polyfill_buffer_patch.import_buffer.Buffer.from(decryptedBytes));
|
|
233
|
+
return require_sign_bitcoin_transaction_with_seed.signBitcoinTransactionWithSeed(serializedTx, require_redacted.Redacted.value(rootPrivateKey));
|
|
234
|
+
} finally {
|
|
235
|
+
if (rootPrivateKey) require_redacted.Redacted.unsafeWipe(rootPrivateKey);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
//#endregion
|
|
240
|
+
//#region ../../packages/module/blockchain-bitcoin/src/signing/bitcoin-in-memory-signer-factory.ts
|
|
241
|
+
var BitcoinInMemorySignerFactory = class {
|
|
242
|
+
canSign(account) {
|
|
243
|
+
return account.accountType === "InMemory" && account.blockchainName === "Bitcoin";
|
|
244
|
+
}
|
|
245
|
+
createTransactionSigner(context) {
|
|
246
|
+
this.#assertSupported(context);
|
|
247
|
+
return new BitcoinInMemoryTransactionSigner({
|
|
248
|
+
encryptedRootPrivateKey: this.#extractEncryptedRootPrivateKey(context),
|
|
249
|
+
auth: context.auth
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
createDataSigner(context) {
|
|
253
|
+
const account = this.#assertSupported(context);
|
|
254
|
+
const encryptedRootPrivateKey = this.#extractEncryptedRootPrivateKey(context);
|
|
255
|
+
const networkId = account.blockchainSpecific.networkId;
|
|
256
|
+
const network = networkId ? require_address.BitcoinNetworkId.getBitcoinNetwork(networkId) : void 0;
|
|
257
|
+
if (!network) throw new Error(`Cannot resolve Bitcoin network from networkId: ${String(networkId)}`);
|
|
258
|
+
return new BitcoinInMemoryDataSigner({
|
|
259
|
+
encryptedRootPrivateKey,
|
|
260
|
+
auth: context.auth,
|
|
261
|
+
network,
|
|
262
|
+
accountIndex: account.blockchainSpecific.accountIndex
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
#assertSupported(context) {
|
|
266
|
+
const account = context.wallet.accounts.find((a) => a.accountId === context.accountId);
|
|
267
|
+
if (!account || !this.canSign(account)) throw new Error(`BitcoinInMemorySignerFactory does not support account type: ${account?.accountType ?? "unknown"}`);
|
|
268
|
+
return account;
|
|
269
|
+
}
|
|
270
|
+
#extractEncryptedRootPrivateKey(context) {
|
|
271
|
+
const { wallet } = context;
|
|
272
|
+
const encryptedRootPrivateKey = wallet.blockchainSpecific.Bitcoin?.encryptedRootPrivateKey;
|
|
273
|
+
if (!encryptedRootPrivateKey) throw new Error("Wallet is missing Bitcoin encrypted root private key");
|
|
274
|
+
return encryptedRootPrivateKey;
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region ../../packages/module/blockchain-bitcoin/src/exposed-modules/signer-factory.ts
|
|
279
|
+
const initSignerFactory = () => new BitcoinInMemorySignerFactory();
|
|
280
|
+
//#endregion
|
|
281
|
+
exports.default = initSignerFactory;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import "./_polyfill-buffer-patch-JcrfT1gU.js";
|
|
2
|
+
import { n as HexBytes } from "./bytes.vo-CziaOsba.js";
|
|
3
|
+
import { t as BigNumber } from "./bignum.vo-Co6tMH2q.js";
|
|
4
|
+
import { t as AuthenticationCancelledError } from "./types-DTE1ctDB.js";
|
|
5
|
+
import { m as defaultTxTtlLength } from "./const-BB3MccLt.js";
|
|
6
|
+
import { i as fromUnshieldedTokenType } from "./utils-fF_rnZe3.js";
|
|
7
|
+
import { t as midnightWalletsForRuntime } from "./midnight-wallet-CAqZrNVe.js";
|
|
8
|
+
import { t as beginSendProofProgress } from "./send-proof-progress-Dx2cUz1B.js";
|
|
9
|
+
import { defer, map, switchMap, take, throwError } from "rxjs";
|
|
10
|
+
import { DustAddress, MidnightBech32m, ShieldedAddress, UnshieldedAddress } from "@midnightntwrk/wallet-sdk-address-format";
|
|
11
|
+
import { nativeToken } from "@midnight-ntwrk/ledger-v8";
|
|
12
|
+
//#region ../../packages/module/midnight-sync/src/signing/midnight-in-memory-data-signer.ts
|
|
13
|
+
/** Signs arbitrary data using the Midnight unshielded key. No per-request auth needed —
|
|
14
|
+
* the wallet SDK manages key lifecycle via AccountKeyManager idle timeout. */
|
|
15
|
+
var MidnightInMemoryDataSigner = class {
|
|
16
|
+
#accountId;
|
|
17
|
+
#wallets$;
|
|
18
|
+
constructor(accountId, wallets$) {
|
|
19
|
+
this.#accountId = accountId;
|
|
20
|
+
this.#wallets$ = wallets$;
|
|
21
|
+
}
|
|
22
|
+
signData(request) {
|
|
23
|
+
return this.#wallets$.pipe(take(1), switchMap((wallets) => {
|
|
24
|
+
const wallet = wallets[this.#accountId];
|
|
25
|
+
if (!wallet) throw new Error(`Could not load midnight wallet for account ${this.#accountId}`);
|
|
26
|
+
return wallet.signData(request.data).pipe(map(({ signature, verifyingKey }) => ({
|
|
27
|
+
signature: HexBytes(signature),
|
|
28
|
+
verifyingKey: HexBytes(verifyingKey)
|
|
29
|
+
})));
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region ../../packages/module/midnight-sync/src/signing/midnight-in-memory-transaction-signer.ts
|
|
35
|
+
/**
|
|
36
|
+
* Maps the serialized transfers into the facade's combined-transfer shape.
|
|
37
|
+
* Every transfer shares one kind — mixed selections are rejected at build
|
|
38
|
+
* time by flattenTransfers — so exactly one CombinedTokenTransfer entry is
|
|
39
|
+
* built, holding all outputs; the SDK covers them in a single transaction.
|
|
40
|
+
*/
|
|
41
|
+
const toOutputs = ({ transfers }, networkId) => {
|
|
42
|
+
if (transfers[0].tokenKind === "unshielded") return [{
|
|
43
|
+
type: "unshielded",
|
|
44
|
+
outputs: transfers.map(({ amount, receiverAddress, type }) => ({
|
|
45
|
+
type: fromUnshieldedTokenType(type, networkId),
|
|
46
|
+
receiverAddress: UnshieldedAddress.codec.decode(networkId, MidnightBech32m.parse(receiverAddress)),
|
|
47
|
+
amount: BigNumber.valueOf(amount)
|
|
48
|
+
}))
|
|
49
|
+
}];
|
|
50
|
+
return [{
|
|
51
|
+
type: "shielded",
|
|
52
|
+
outputs: transfers.map(({ amount, receiverAddress, type }) => ({
|
|
53
|
+
type,
|
|
54
|
+
receiverAddress: ShieldedAddress.codec.decode(networkId, MidnightBech32m.parse(receiverAddress)),
|
|
55
|
+
amount: BigNumber.valueOf(amount)
|
|
56
|
+
}))
|
|
57
|
+
}];
|
|
58
|
+
};
|
|
59
|
+
const signWithWallet = (midnightWallet, request, onProgress) => {
|
|
60
|
+
const txParams = JSON.parse(HexBytes.toUTF8(request.serializedTx));
|
|
61
|
+
const outputs = request.flowType === "dust-designation" ? [] : toOutputs(txParams, midnightWallet.networkId);
|
|
62
|
+
const hasUnshieldedTransfer = txParams.transfers[0].tokenKind === "unshielded";
|
|
63
|
+
const ttl = new Date(Date.now() + defaultTxTtlLength);
|
|
64
|
+
if (request.flowType === "dust-designation") {
|
|
65
|
+
const dustAddress = DustAddress.codec.decode(midnightWallet.networkId, MidnightBech32m.parse(txParams.transfers[0].receiverAddress));
|
|
66
|
+
return midnightWallet.state().pipe(take(1), map(({ unshielded: { availableCoins } }) => availableCoins.filter(({ utxo: { type } }) => type === nativeToken().raw)), switchMap((availableNightCoins) => {
|
|
67
|
+
if (availableNightCoins.some((coin) => coin.meta.registeredForDustGeneration)) return midnightWallet.registerNightUtxosForDustGeneration(availableNightCoins, dustAddress).pipe(switchMap((unprovenTxRecipe) => midnightWallet.balanceUnprovenTransaction(unprovenTxRecipe.transaction, {
|
|
68
|
+
ttl,
|
|
69
|
+
tokenKindsToBalance: ["dust"]
|
|
70
|
+
})));
|
|
71
|
+
return midnightWallet.registerNightUtxosForDustGeneration(availableNightCoins, dustAddress);
|
|
72
|
+
}), switchMap((signedRecipe) => midnightWallet.finalizeRecipe(signedRecipe, onProgress)), map((transaction) => ({ serializedTx: HexBytes.fromByteArray(transaction.serialize()) })));
|
|
73
|
+
}
|
|
74
|
+
if (hasUnshieldedTransfer) return midnightWallet.transferTransaction(outputs, { ttl }).pipe(switchMap((recipe) => midnightWallet.signRecipe(recipe)), switchMap((signedRecipe) => midnightWallet.finalizeRecipe(signedRecipe, onProgress)), map((transaction) => ({ serializedTx: HexBytes.fromByteArray(transaction.serialize()) })));
|
|
75
|
+
return midnightWallet.transferTransaction(outputs, { ttl }).pipe(switchMap((signedRecipe) => midnightWallet.finalizeRecipe(signedRecipe, onProgress)), map((transaction) => ({ serializedTx: HexBytes.fromByteArray(transaction.serialize()) })));
|
|
76
|
+
};
|
|
77
|
+
/** Signs Midnight transactions using the wallet SDK after user authentication. */
|
|
78
|
+
var MidnightInMemoryTransactionSigner = class {
|
|
79
|
+
#accountId;
|
|
80
|
+
#auth;
|
|
81
|
+
#wallets$;
|
|
82
|
+
constructor(params) {
|
|
83
|
+
this.#accountId = params.accountId;
|
|
84
|
+
this.#auth = params.auth;
|
|
85
|
+
this.#wallets$ = params.wallets$;
|
|
86
|
+
}
|
|
87
|
+
sign(request) {
|
|
88
|
+
return defer(() => {
|
|
89
|
+
const onProgress = beginSendProofProgress(this.#accountId);
|
|
90
|
+
return this.#auth.authenticate().pipe(switchMap((confirmed) => {
|
|
91
|
+
if (!confirmed) return throwError(() => new AuthenticationCancelledError());
|
|
92
|
+
return this.#wallets$.pipe(take(1), switchMap((wallets) => {
|
|
93
|
+
const midnightWallet = wallets[this.#accountId];
|
|
94
|
+
if (!midnightWallet) throw new Error(`Could not load midnight wallet for account ${this.#accountId}`);
|
|
95
|
+
return signWithWallet(midnightWallet, request, onProgress);
|
|
96
|
+
}));
|
|
97
|
+
}));
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region ../../packages/module/midnight-sync/src/signing/midnight-in-memory-signer-factory.ts
|
|
103
|
+
var MidnightInMemorySignerFactory = class {
|
|
104
|
+
constructor(wallets$) {
|
|
105
|
+
this.wallets$ = wallets$;
|
|
106
|
+
}
|
|
107
|
+
canSign(account) {
|
|
108
|
+
return account.accountType === "InMemory" && account.blockchainName === "Midnight";
|
|
109
|
+
}
|
|
110
|
+
createTransactionSigner(context) {
|
|
111
|
+
const account = context.wallet.accounts.find((a) => a.accountId === context.accountId);
|
|
112
|
+
if (!account || !this.canSign(account)) throw new Error(`MidnightInMemorySignerFactory does not support account type: ${account?.accountType ?? "unknown"}`);
|
|
113
|
+
return new MidnightInMemoryTransactionSigner({
|
|
114
|
+
accountId: context.accountId,
|
|
115
|
+
auth: context.auth,
|
|
116
|
+
wallets$: this.wallets$
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
createDataSigner(context) {
|
|
120
|
+
const account = context.wallet.accounts.find((a) => a.accountId === context.accountId);
|
|
121
|
+
if (!account || !this.canSign(account)) throw new Error(`MidnightInMemorySignerFactory does not support account type: ${account?.accountType ?? "unknown"}`);
|
|
122
|
+
return new MidnightInMemoryDataSigner(context.accountId, this.wallets$);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region ../../packages/module/midnight-sync/src/exported-modules/signer-factory.ts
|
|
127
|
+
const initSignerFactory = ({ runtime }) => new MidnightInMemorySignerFactory(midnightWalletsForRuntime(runtime));
|
|
128
|
+
//#endregion
|
|
129
|
+
export { initSignerFactory as default };
|