@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
package/dist/init-DV1OSZiK.js
DELETED
|
@@ -1,4352 +0,0 @@
|
|
|
1
|
-
import { a as __toESM, t as __commonJSMin } from "./chunk-D6g4UhsZ.js";
|
|
2
|
-
import { n as ProviderError, r as ProviderFailure, u as InvalidStringError } from "./errors-CAOTqN4_.js";
|
|
3
|
-
import "./_polyfill-buffer-patch-JcrfT1gU.js";
|
|
4
|
-
import { F as RewardAddress, Ft as PolicyId, Ht as Ed25519PublicKeyHex, Kt as blake2b, Mt as AssetFingerprint, N as RewardAccount, Nt as AssetId, Wt as Hash28ByteBase16, b as TransactionId, dt as BlockId, f as Transaction, ft as BlockNo, gt as Slot, kt as BaseAddress, mt as EpochNo, p as TxCBOR, r as CredentialType, s as TxIndex, v as InputSource, y as RedeemerPurpose, yt as PoolId } from "./Address-_VPkf7Xh.js";
|
|
5
|
-
import { t as isNotNil } from "./isNotNil-CZxBMfL5.js";
|
|
6
|
-
import "./Ed25519PublicKey-CjnuAYRR.js";
|
|
7
|
-
import { t as SodiumBip32Ed25519 } from "./SodiumBip32Ed25519-BEfo1Q9m.js";
|
|
8
|
-
import { o as DRepID, t as PaymentAddress } from "./PaymentAddress-xSmGUQ-8.js";
|
|
9
|
-
import { a as KeyRole$1, c as MULTISIG_CIP_ID, s as HD_WALLET_CIP_ID, t as AddressType$1 } from "./types-B61DQoFW.js";
|
|
10
|
-
import { a as BlockfrostToCardanoSDK, c as buildUrl, i as BlockfrostNetworkInfoProvider, n as BlockfrostUtxoProvider, o as BlockfrostProvider, r as BlockfrostTxProvider, s as HttpClient, t as BlockfrostTxSubmitProvider } from "./blockfrost-tx-submit-provider-BUEOmdvc.js";
|
|
11
|
-
import { _ as CardanoRewardAccount, u as toContractAddress } from "./util-CQSJU0wT.js";
|
|
12
|
-
import { s as Timestamp } from "./time.vo-Xln4yGBU.js";
|
|
13
|
-
import { t as BigNumber } from "./bignum.vo-DhhZ9HP1.js";
|
|
14
|
-
import { n as Ok, t as Err } from "./asyncoption-CzIVH5Y1.js";
|
|
15
|
-
import { t as TokenId } from "./token-id.vo-DMKSaMlc.js";
|
|
16
|
-
import { r as LOVELACE_TOKEN_ID } from "./const-DeUA7zYl.js";
|
|
17
|
-
import { n as getAdaTokenTickerByNetwork, t as cardanoNetworkMagicToNetworkType } from "./cardano-network-id-to-network-type-DHgKhDAK.js";
|
|
18
|
-
import { i as toProviderError, r as isNotFoundError } from "./error-DHKO2iS4.js";
|
|
19
|
-
import { EMPTY, Observable, catchError, defer, distinct, expand, forkJoin, from, map, mergeMap, of, reduce, toArray } from "rxjs";
|
|
20
|
-
import omit from "lodash/omit.js";
|
|
21
|
-
import memoize from "lodash/memoize.js";
|
|
22
|
-
//#region ../../node_modules/@biglup/is-cid/dist/esm/index.js
|
|
23
|
-
var __defProp = Object.defineProperty;
|
|
24
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
configurable: true,
|
|
27
|
-
writable: true,
|
|
28
|
-
value
|
|
29
|
-
}) : obj[key] = value;
|
|
30
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
31
|
-
new Uint8Array(0);
|
|
32
|
-
function equals(aa, bb) {
|
|
33
|
-
if (aa === bb) return true;
|
|
34
|
-
if (aa.byteLength !== bb.byteLength) return false;
|
|
35
|
-
for (let ii = 0; ii < aa.byteLength; ii++) if (aa[ii] !== bb[ii]) return false;
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
function coerce(o) {
|
|
39
|
-
if (o instanceof Uint8Array && o.constructor.name === "Uint8Array") return o;
|
|
40
|
-
if (o instanceof ArrayBuffer) return new Uint8Array(o);
|
|
41
|
-
if (ArrayBuffer.isView(o)) return new Uint8Array(o.buffer, o.byteOffset, o.byteLength);
|
|
42
|
-
throw new Error("Unknown type, must be binary type");
|
|
43
|
-
}
|
|
44
|
-
function base(ALPHABET, name) {
|
|
45
|
-
if (ALPHABET.length >= 255) throw new TypeError("Alphabet too long");
|
|
46
|
-
var BASE_MAP = new Uint8Array(256);
|
|
47
|
-
for (var j = 0; j < BASE_MAP.length; j++) BASE_MAP[j] = 255;
|
|
48
|
-
for (var i = 0; i < ALPHABET.length; i++) {
|
|
49
|
-
var x = ALPHABET.charAt(i);
|
|
50
|
-
var xc = x.charCodeAt(0);
|
|
51
|
-
if (BASE_MAP[xc] !== 255) throw new TypeError(x + " is ambiguous");
|
|
52
|
-
BASE_MAP[xc] = i;
|
|
53
|
-
}
|
|
54
|
-
var BASE = ALPHABET.length;
|
|
55
|
-
var LEADER = ALPHABET.charAt(0);
|
|
56
|
-
var FACTOR = Math.log(BASE) / Math.log(256);
|
|
57
|
-
var iFACTOR = Math.log(256) / Math.log(BASE);
|
|
58
|
-
function encode3(source) {
|
|
59
|
-
if (source instanceof Uint8Array);
|
|
60
|
-
else if (ArrayBuffer.isView(source)) source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
|
|
61
|
-
else if (Array.isArray(source)) source = Uint8Array.from(source);
|
|
62
|
-
if (!(source instanceof Uint8Array)) throw new TypeError("Expected Uint8Array");
|
|
63
|
-
if (source.length === 0) return "";
|
|
64
|
-
var zeroes = 0;
|
|
65
|
-
var length2 = 0;
|
|
66
|
-
var pbegin = 0;
|
|
67
|
-
var pend = source.length;
|
|
68
|
-
while (pbegin !== pend && source[pbegin] === 0) {
|
|
69
|
-
pbegin++;
|
|
70
|
-
zeroes++;
|
|
71
|
-
}
|
|
72
|
-
var size = (pend - pbegin) * iFACTOR + 1 >>> 0;
|
|
73
|
-
var b58 = new Uint8Array(size);
|
|
74
|
-
while (pbegin !== pend) {
|
|
75
|
-
var carry = source[pbegin];
|
|
76
|
-
var i2 = 0;
|
|
77
|
-
for (var it1 = size - 1; (carry !== 0 || i2 < length2) && it1 !== -1; it1--, i2++) {
|
|
78
|
-
carry += 256 * b58[it1] >>> 0;
|
|
79
|
-
b58[it1] = carry % BASE >>> 0;
|
|
80
|
-
carry = carry / BASE >>> 0;
|
|
81
|
-
}
|
|
82
|
-
if (carry !== 0) throw new Error("Non-zero carry");
|
|
83
|
-
length2 = i2;
|
|
84
|
-
pbegin++;
|
|
85
|
-
}
|
|
86
|
-
var it2 = size - length2;
|
|
87
|
-
while (it2 !== size && b58[it2] === 0) it2++;
|
|
88
|
-
var str = LEADER.repeat(zeroes);
|
|
89
|
-
for (; it2 < size; ++it2) str += ALPHABET.charAt(b58[it2]);
|
|
90
|
-
return str;
|
|
91
|
-
}
|
|
92
|
-
function decodeUnsafe(source) {
|
|
93
|
-
if (typeof source !== "string") throw new TypeError("Expected String");
|
|
94
|
-
if (source.length === 0) return new Uint8Array();
|
|
95
|
-
var psz = 0;
|
|
96
|
-
if (source[psz] === " ") return;
|
|
97
|
-
var zeroes = 0;
|
|
98
|
-
var length2 = 0;
|
|
99
|
-
while (source[psz] === LEADER) {
|
|
100
|
-
zeroes++;
|
|
101
|
-
psz++;
|
|
102
|
-
}
|
|
103
|
-
var size = (source.length - psz) * FACTOR + 1 >>> 0;
|
|
104
|
-
var b256 = new Uint8Array(size);
|
|
105
|
-
while (source[psz]) {
|
|
106
|
-
var carry = BASE_MAP[source.charCodeAt(psz)];
|
|
107
|
-
if (carry === 255) return;
|
|
108
|
-
var i2 = 0;
|
|
109
|
-
for (var it3 = size - 1; (carry !== 0 || i2 < length2) && it3 !== -1; it3--, i2++) {
|
|
110
|
-
carry += BASE * b256[it3] >>> 0;
|
|
111
|
-
b256[it3] = carry % 256 >>> 0;
|
|
112
|
-
carry = carry / 256 >>> 0;
|
|
113
|
-
}
|
|
114
|
-
if (carry !== 0) throw new Error("Non-zero carry");
|
|
115
|
-
length2 = i2;
|
|
116
|
-
psz++;
|
|
117
|
-
}
|
|
118
|
-
if (source[psz] === " ") return;
|
|
119
|
-
var it4 = size - length2;
|
|
120
|
-
while (it4 !== size && b256[it4] === 0) it4++;
|
|
121
|
-
var vch = new Uint8Array(zeroes + (size - it4));
|
|
122
|
-
var j2 = zeroes;
|
|
123
|
-
while (it4 !== size) vch[j2++] = b256[it4++];
|
|
124
|
-
return vch;
|
|
125
|
-
}
|
|
126
|
-
function decode5(string) {
|
|
127
|
-
var buffer = decodeUnsafe(string);
|
|
128
|
-
if (buffer) return buffer;
|
|
129
|
-
throw new Error(`Non-${name} character`);
|
|
130
|
-
}
|
|
131
|
-
return {
|
|
132
|
-
encode: encode3,
|
|
133
|
-
decodeUnsafe,
|
|
134
|
-
decode: decode5
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
var base_x_default = base;
|
|
138
|
-
var Encoder = class {
|
|
139
|
-
constructor(name, prefix, baseEncode) {
|
|
140
|
-
__publicField(this, "name");
|
|
141
|
-
__publicField(this, "prefix");
|
|
142
|
-
__publicField(this, "baseEncode");
|
|
143
|
-
this.name = name;
|
|
144
|
-
this.prefix = prefix;
|
|
145
|
-
this.baseEncode = baseEncode;
|
|
146
|
-
}
|
|
147
|
-
encode(bytes) {
|
|
148
|
-
if (bytes instanceof Uint8Array) return `${this.prefix}${this.baseEncode(bytes)}`;
|
|
149
|
-
else throw Error("Unknown type, must be binary type");
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
var Decoder = class {
|
|
153
|
-
constructor(name, prefix, baseDecode) {
|
|
154
|
-
__publicField(this, "name");
|
|
155
|
-
__publicField(this, "prefix");
|
|
156
|
-
__publicField(this, "baseDecode");
|
|
157
|
-
__publicField(this, "prefixCodePoint");
|
|
158
|
-
this.name = name;
|
|
159
|
-
this.prefix = prefix;
|
|
160
|
-
if (prefix.codePointAt(0) === void 0) throw new Error("Invalid prefix character");
|
|
161
|
-
this.prefixCodePoint = prefix.codePointAt(0);
|
|
162
|
-
this.baseDecode = baseDecode;
|
|
163
|
-
}
|
|
164
|
-
decode(text) {
|
|
165
|
-
if (typeof text === "string") {
|
|
166
|
-
if (text.codePointAt(0) !== this.prefixCodePoint) throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);
|
|
167
|
-
return this.baseDecode(text.slice(this.prefix.length));
|
|
168
|
-
} else throw Error("Can only multibase decode strings");
|
|
169
|
-
}
|
|
170
|
-
or(decoder) {
|
|
171
|
-
return or(this, decoder);
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
var ComposedDecoder = class {
|
|
175
|
-
constructor(decoders) {
|
|
176
|
-
__publicField(this, "decoders");
|
|
177
|
-
this.decoders = decoders;
|
|
178
|
-
}
|
|
179
|
-
or(decoder) {
|
|
180
|
-
return or(this, decoder);
|
|
181
|
-
}
|
|
182
|
-
decode(input) {
|
|
183
|
-
const prefix = input[0];
|
|
184
|
-
const decoder = this.decoders[prefix];
|
|
185
|
-
if (decoder != null) return decoder.decode(input);
|
|
186
|
-
else throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`);
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
function or(left, right) {
|
|
190
|
-
return new ComposedDecoder({
|
|
191
|
-
...left.decoders ?? { [left.prefix]: left },
|
|
192
|
-
...right.decoders ?? { [right.prefix]: right }
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
var Codec = class {
|
|
196
|
-
constructor(name, prefix, baseEncode, baseDecode) {
|
|
197
|
-
__publicField(this, "name");
|
|
198
|
-
__publicField(this, "prefix");
|
|
199
|
-
__publicField(this, "baseEncode");
|
|
200
|
-
__publicField(this, "baseDecode");
|
|
201
|
-
__publicField(this, "encoder");
|
|
202
|
-
__publicField(this, "decoder");
|
|
203
|
-
this.name = name;
|
|
204
|
-
this.prefix = prefix;
|
|
205
|
-
this.baseEncode = baseEncode;
|
|
206
|
-
this.baseDecode = baseDecode;
|
|
207
|
-
this.encoder = new Encoder(name, prefix, baseEncode);
|
|
208
|
-
this.decoder = new Decoder(name, prefix, baseDecode);
|
|
209
|
-
}
|
|
210
|
-
encode(input) {
|
|
211
|
-
return this.encoder.encode(input);
|
|
212
|
-
}
|
|
213
|
-
decode(input) {
|
|
214
|
-
return this.decoder.decode(input);
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
function from$1({ name, prefix, encode: encode3, decode: decode5 }) {
|
|
218
|
-
return new Codec(name, prefix, encode3, decode5);
|
|
219
|
-
}
|
|
220
|
-
function baseX({ name, prefix, alphabet }) {
|
|
221
|
-
const { encode: encode3, decode: decode5 } = base_x_default(alphabet, name);
|
|
222
|
-
return from$1({
|
|
223
|
-
prefix,
|
|
224
|
-
name,
|
|
225
|
-
encode: encode3,
|
|
226
|
-
decode: (text) => coerce(decode5(text))
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
function decode(string, alphabet, bitsPerChar, name) {
|
|
230
|
-
const codes = {};
|
|
231
|
-
for (let i = 0; i < alphabet.length; ++i) codes[alphabet[i]] = i;
|
|
232
|
-
let end = string.length;
|
|
233
|
-
while (string[end - 1] === "=") --end;
|
|
234
|
-
const out = new Uint8Array(end * bitsPerChar / 8 | 0);
|
|
235
|
-
let bits = 0;
|
|
236
|
-
let buffer = 0;
|
|
237
|
-
let written = 0;
|
|
238
|
-
for (let i = 0; i < end; ++i) {
|
|
239
|
-
const value = codes[string[i]];
|
|
240
|
-
if (value === void 0) throw new SyntaxError(`Non-${name} character`);
|
|
241
|
-
buffer = buffer << bitsPerChar | value;
|
|
242
|
-
bits += bitsPerChar;
|
|
243
|
-
if (bits >= 8) {
|
|
244
|
-
bits -= 8;
|
|
245
|
-
out[written++] = 255 & buffer >> bits;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
if (bits >= bitsPerChar || (255 & buffer << 8 - bits) !== 0) throw new SyntaxError("Unexpected end of data");
|
|
249
|
-
return out;
|
|
250
|
-
}
|
|
251
|
-
function encode(data, alphabet, bitsPerChar) {
|
|
252
|
-
const pad = alphabet[alphabet.length - 1] === "=";
|
|
253
|
-
const mask = (1 << bitsPerChar) - 1;
|
|
254
|
-
let out = "";
|
|
255
|
-
let bits = 0;
|
|
256
|
-
let buffer = 0;
|
|
257
|
-
for (let i = 0; i < data.length; ++i) {
|
|
258
|
-
buffer = buffer << 8 | data[i];
|
|
259
|
-
bits += 8;
|
|
260
|
-
while (bits > bitsPerChar) {
|
|
261
|
-
bits -= bitsPerChar;
|
|
262
|
-
out += alphabet[mask & buffer >> bits];
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
if (bits !== 0) out += alphabet[mask & buffer << bitsPerChar - bits];
|
|
266
|
-
if (pad) while ((out.length * bitsPerChar & 7) !== 0) out += "=";
|
|
267
|
-
return out;
|
|
268
|
-
}
|
|
269
|
-
function rfc4648({ name, prefix, bitsPerChar, alphabet }) {
|
|
270
|
-
return from$1({
|
|
271
|
-
prefix,
|
|
272
|
-
name,
|
|
273
|
-
encode(input) {
|
|
274
|
-
return encode(input, alphabet, bitsPerChar);
|
|
275
|
-
},
|
|
276
|
-
decode(input) {
|
|
277
|
-
return decode(input, alphabet, bitsPerChar, name);
|
|
278
|
-
}
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
var base32 = rfc4648({
|
|
282
|
-
prefix: "b",
|
|
283
|
-
name: "base32",
|
|
284
|
-
alphabet: "abcdefghijklmnopqrstuvwxyz234567",
|
|
285
|
-
bitsPerChar: 5
|
|
286
|
-
});
|
|
287
|
-
rfc4648({
|
|
288
|
-
prefix: "B",
|
|
289
|
-
name: "base32upper",
|
|
290
|
-
alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",
|
|
291
|
-
bitsPerChar: 5
|
|
292
|
-
});
|
|
293
|
-
rfc4648({
|
|
294
|
-
prefix: "c",
|
|
295
|
-
name: "base32pad",
|
|
296
|
-
alphabet: "abcdefghijklmnopqrstuvwxyz234567=",
|
|
297
|
-
bitsPerChar: 5
|
|
298
|
-
});
|
|
299
|
-
rfc4648({
|
|
300
|
-
prefix: "C",
|
|
301
|
-
name: "base32padupper",
|
|
302
|
-
alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",
|
|
303
|
-
bitsPerChar: 5
|
|
304
|
-
});
|
|
305
|
-
rfc4648({
|
|
306
|
-
prefix: "v",
|
|
307
|
-
name: "base32hex",
|
|
308
|
-
alphabet: "0123456789abcdefghijklmnopqrstuv",
|
|
309
|
-
bitsPerChar: 5
|
|
310
|
-
});
|
|
311
|
-
rfc4648({
|
|
312
|
-
prefix: "V",
|
|
313
|
-
name: "base32hexupper",
|
|
314
|
-
alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV",
|
|
315
|
-
bitsPerChar: 5
|
|
316
|
-
});
|
|
317
|
-
rfc4648({
|
|
318
|
-
prefix: "t",
|
|
319
|
-
name: "base32hexpad",
|
|
320
|
-
alphabet: "0123456789abcdefghijklmnopqrstuv=",
|
|
321
|
-
bitsPerChar: 5
|
|
322
|
-
});
|
|
323
|
-
rfc4648({
|
|
324
|
-
prefix: "T",
|
|
325
|
-
name: "base32hexpadupper",
|
|
326
|
-
alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV=",
|
|
327
|
-
bitsPerChar: 5
|
|
328
|
-
});
|
|
329
|
-
rfc4648({
|
|
330
|
-
prefix: "h",
|
|
331
|
-
name: "base32z",
|
|
332
|
-
alphabet: "ybndrfg8ejkmcpqxot1uwisza345h769",
|
|
333
|
-
bitsPerChar: 5
|
|
334
|
-
});
|
|
335
|
-
var base58btc = baseX({
|
|
336
|
-
name: "base58btc",
|
|
337
|
-
prefix: "z",
|
|
338
|
-
alphabet: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
|
|
339
|
-
});
|
|
340
|
-
baseX({
|
|
341
|
-
name: "base58flickr",
|
|
342
|
-
prefix: "Z",
|
|
343
|
-
alphabet: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"
|
|
344
|
-
});
|
|
345
|
-
var encode_1 = encode2;
|
|
346
|
-
var MSB = 128;
|
|
347
|
-
var MSBALL = -128;
|
|
348
|
-
var INT = Math.pow(2, 31);
|
|
349
|
-
function encode2(num, out, offset) {
|
|
350
|
-
out = out || [];
|
|
351
|
-
offset = offset || 0;
|
|
352
|
-
var oldOffset = offset;
|
|
353
|
-
while (num >= INT) {
|
|
354
|
-
out[offset++] = num & 255 | MSB;
|
|
355
|
-
num /= 128;
|
|
356
|
-
}
|
|
357
|
-
while (num & MSBALL) {
|
|
358
|
-
out[offset++] = num & 255 | MSB;
|
|
359
|
-
num >>>= 7;
|
|
360
|
-
}
|
|
361
|
-
out[offset] = num | 0;
|
|
362
|
-
encode2.bytes = offset - oldOffset + 1;
|
|
363
|
-
return out;
|
|
364
|
-
}
|
|
365
|
-
var decode2 = read;
|
|
366
|
-
var MSB$1 = 128;
|
|
367
|
-
var REST$1 = 127;
|
|
368
|
-
function read(buf, offset) {
|
|
369
|
-
var res = 0, offset = offset || 0, shift = 0, counter = offset, b, l = buf.length;
|
|
370
|
-
do {
|
|
371
|
-
if (counter >= l) {
|
|
372
|
-
read.bytes = 0;
|
|
373
|
-
throw new RangeError("Could not decode varint");
|
|
374
|
-
}
|
|
375
|
-
b = buf[counter++];
|
|
376
|
-
res += shift < 28 ? (b & REST$1) << shift : (b & REST$1) * Math.pow(2, shift);
|
|
377
|
-
shift += 7;
|
|
378
|
-
} while (b >= MSB$1);
|
|
379
|
-
read.bytes = counter - offset;
|
|
380
|
-
return res;
|
|
381
|
-
}
|
|
382
|
-
var N1 = Math.pow(2, 7);
|
|
383
|
-
var N2 = Math.pow(2, 14);
|
|
384
|
-
var N3 = Math.pow(2, 21);
|
|
385
|
-
var N4 = Math.pow(2, 28);
|
|
386
|
-
var N5 = Math.pow(2, 35);
|
|
387
|
-
var N6 = Math.pow(2, 42);
|
|
388
|
-
var N7 = Math.pow(2, 49);
|
|
389
|
-
var N8 = Math.pow(2, 56);
|
|
390
|
-
var N9 = Math.pow(2, 63);
|
|
391
|
-
var length = function(value) {
|
|
392
|
-
return value < N1 ? 1 : value < N2 ? 2 : value < N3 ? 3 : value < N4 ? 4 : value < N5 ? 5 : value < N6 ? 6 : value < N7 ? 7 : value < N8 ? 8 : value < N9 ? 9 : 10;
|
|
393
|
-
};
|
|
394
|
-
var varint_default = {
|
|
395
|
-
encode: encode_1,
|
|
396
|
-
decode: decode2,
|
|
397
|
-
encodingLength: length
|
|
398
|
-
};
|
|
399
|
-
function decode3(data, offset = 0) {
|
|
400
|
-
return [varint_default.decode(data, offset), varint_default.decode.bytes];
|
|
401
|
-
}
|
|
402
|
-
function encodeTo(int, target, offset = 0) {
|
|
403
|
-
varint_default.encode(int, target, offset);
|
|
404
|
-
return target;
|
|
405
|
-
}
|
|
406
|
-
function encodingLength(int) {
|
|
407
|
-
return varint_default.encodingLength(int);
|
|
408
|
-
}
|
|
409
|
-
function create(code, digest) {
|
|
410
|
-
const size = digest.byteLength;
|
|
411
|
-
const sizeOffset = encodingLength(code);
|
|
412
|
-
const digestOffset = sizeOffset + encodingLength(size);
|
|
413
|
-
const bytes = new Uint8Array(digestOffset + size);
|
|
414
|
-
encodeTo(code, bytes, 0);
|
|
415
|
-
encodeTo(size, bytes, sizeOffset);
|
|
416
|
-
bytes.set(digest, digestOffset);
|
|
417
|
-
return new Digest(code, size, digest, bytes);
|
|
418
|
-
}
|
|
419
|
-
function decode4(multihash) {
|
|
420
|
-
const bytes = coerce(multihash);
|
|
421
|
-
const [code, sizeOffset] = decode3(bytes);
|
|
422
|
-
const [size, digestOffset] = decode3(bytes.subarray(sizeOffset));
|
|
423
|
-
const digest = bytes.subarray(sizeOffset + digestOffset);
|
|
424
|
-
if (digest.byteLength !== size) throw new Error("Incorrect length");
|
|
425
|
-
return new Digest(code, size, digest, bytes);
|
|
426
|
-
}
|
|
427
|
-
function equals2(a, b) {
|
|
428
|
-
if (a === b) return true;
|
|
429
|
-
else {
|
|
430
|
-
const data = b;
|
|
431
|
-
return a.code === data.code && a.size === data.size && data.bytes instanceof Uint8Array && equals(a.bytes, data.bytes);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
var Digest = class {
|
|
435
|
-
/**
|
|
436
|
-
* Creates a multihash digest.
|
|
437
|
-
*/
|
|
438
|
-
constructor(code, size, digest, bytes) {
|
|
439
|
-
__publicField(this, "code");
|
|
440
|
-
__publicField(this, "size");
|
|
441
|
-
__publicField(this, "digest");
|
|
442
|
-
__publicField(this, "bytes");
|
|
443
|
-
this.code = code;
|
|
444
|
-
this.size = size;
|
|
445
|
-
this.digest = digest;
|
|
446
|
-
this.bytes = bytes;
|
|
447
|
-
}
|
|
448
|
-
};
|
|
449
|
-
function format(link, base2) {
|
|
450
|
-
const { bytes, version } = link;
|
|
451
|
-
switch (version) {
|
|
452
|
-
case 0: return toStringV0(bytes, baseCache(link), base2 ?? base58btc.encoder);
|
|
453
|
-
default: return toStringV1(bytes, baseCache(link), base2 ?? base32.encoder);
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
var cache = /* @__PURE__ */ new WeakMap();
|
|
457
|
-
function baseCache(cid) {
|
|
458
|
-
const baseCache2 = cache.get(cid);
|
|
459
|
-
if (baseCache2 == null) {
|
|
460
|
-
const baseCache3 = /* @__PURE__ */ new Map();
|
|
461
|
-
cache.set(cid, baseCache3);
|
|
462
|
-
return baseCache3;
|
|
463
|
-
}
|
|
464
|
-
return baseCache2;
|
|
465
|
-
}
|
|
466
|
-
var _a;
|
|
467
|
-
var CID = class _CID {
|
|
468
|
-
/**
|
|
469
|
-
* @param version - Version of the CID
|
|
470
|
-
* @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv
|
|
471
|
-
* @param multihash - (Multi)hash of the of the content.
|
|
472
|
-
*/
|
|
473
|
-
constructor(version, code, multihash, bytes) {
|
|
474
|
-
__publicField(this, "code");
|
|
475
|
-
__publicField(this, "version");
|
|
476
|
-
__publicField(this, "multihash");
|
|
477
|
-
__publicField(this, "bytes");
|
|
478
|
-
__publicField(this, "/");
|
|
479
|
-
__publicField(this, _a, "CID");
|
|
480
|
-
this.code = code;
|
|
481
|
-
this.version = version;
|
|
482
|
-
this.multihash = multihash;
|
|
483
|
-
this.bytes = bytes;
|
|
484
|
-
this["/"] = bytes;
|
|
485
|
-
}
|
|
486
|
-
/**
|
|
487
|
-
* Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes`
|
|
488
|
-
* please either use `CID.asCID(cid)` or switch to new signalling mechanism
|
|
489
|
-
*
|
|
490
|
-
* @deprecated
|
|
491
|
-
*/
|
|
492
|
-
get asCID() {
|
|
493
|
-
return this;
|
|
494
|
-
}
|
|
495
|
-
get byteOffset() {
|
|
496
|
-
return this.bytes.byteOffset;
|
|
497
|
-
}
|
|
498
|
-
get byteLength() {
|
|
499
|
-
return this.bytes.byteLength;
|
|
500
|
-
}
|
|
501
|
-
toV0() {
|
|
502
|
-
switch (this.version) {
|
|
503
|
-
case 0: return this;
|
|
504
|
-
case 1: {
|
|
505
|
-
const { code, multihash } = this;
|
|
506
|
-
if (code !== DAG_PB_CODE) throw new Error("Cannot convert a non dag-pb CID to CIDv0");
|
|
507
|
-
if (multihash.code !== SHA_256_CODE) throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");
|
|
508
|
-
return _CID.createV0(multihash);
|
|
509
|
-
}
|
|
510
|
-
default: throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`);
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
toV1() {
|
|
514
|
-
switch (this.version) {
|
|
515
|
-
case 0: {
|
|
516
|
-
const { code, digest } = this.multihash;
|
|
517
|
-
const multihash = create(code, digest);
|
|
518
|
-
return _CID.createV1(this.code, multihash);
|
|
519
|
-
}
|
|
520
|
-
case 1: return this;
|
|
521
|
-
default: throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`);
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
equals(other) {
|
|
525
|
-
return _CID.equals(this, other);
|
|
526
|
-
}
|
|
527
|
-
static equals(self, other) {
|
|
528
|
-
const unknown = other;
|
|
529
|
-
return unknown != null && self.code === unknown.code && self.version === unknown.version && equals2(self.multihash, unknown.multihash);
|
|
530
|
-
}
|
|
531
|
-
toString(base2) {
|
|
532
|
-
return format(this, base2);
|
|
533
|
-
}
|
|
534
|
-
toJSON() {
|
|
535
|
-
return { "/": format(this) };
|
|
536
|
-
}
|
|
537
|
-
link() {
|
|
538
|
-
return this;
|
|
539
|
-
}
|
|
540
|
-
[(_a = Symbol.toStringTag, Symbol.for("nodejs.util.inspect.custom"))]() {
|
|
541
|
-
return `CID(${this.toString()})`;
|
|
542
|
-
}
|
|
543
|
-
/**
|
|
544
|
-
* Takes any input `value` and returns a `CID` instance if it was
|
|
545
|
-
* a `CID` otherwise returns `null`. If `value` is instanceof `CID`
|
|
546
|
-
* it will return value back. If `value` is not instance of this CID
|
|
547
|
-
* class, but is compatible CID it will return new instance of this
|
|
548
|
-
* `CID` class. Otherwise returns null.
|
|
549
|
-
*
|
|
550
|
-
* This allows two different incompatible versions of CID library to
|
|
551
|
-
* co-exist and interop as long as binary interface is compatible.
|
|
552
|
-
*/
|
|
553
|
-
static asCID(input) {
|
|
554
|
-
if (input == null) return null;
|
|
555
|
-
const value = input;
|
|
556
|
-
if (value instanceof _CID) return value;
|
|
557
|
-
else if (value["/"] != null && value["/"] === value.bytes || value.asCID === value) {
|
|
558
|
-
const { version, code, multihash, bytes } = value;
|
|
559
|
-
return new _CID(version, code, multihash, bytes ?? encodeCID(version, code, multihash.bytes));
|
|
560
|
-
} else if (value[cidSymbol] === true) {
|
|
561
|
-
const { version, multihash, code } = value;
|
|
562
|
-
const digest = decode4(multihash);
|
|
563
|
-
return _CID.create(version, code, digest);
|
|
564
|
-
} else return null;
|
|
565
|
-
}
|
|
566
|
-
/**
|
|
567
|
-
* @param version - Version of the CID
|
|
568
|
-
* @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv
|
|
569
|
-
* @param digest - (Multi)hash of the of the content.
|
|
570
|
-
*/
|
|
571
|
-
static create(version, code, digest) {
|
|
572
|
-
if (typeof code !== "number") throw new Error("String codecs are no longer supported");
|
|
573
|
-
if (!(digest.bytes instanceof Uint8Array)) throw new Error("Invalid digest");
|
|
574
|
-
switch (version) {
|
|
575
|
-
case 0: if (code !== DAG_PB_CODE) throw new Error(`Version 0 CID must use dag-pb (code: ${DAG_PB_CODE}) block encoding`);
|
|
576
|
-
else return new _CID(version, code, digest, digest.bytes);
|
|
577
|
-
case 1: return new _CID(version, code, digest, encodeCID(version, code, digest.bytes));
|
|
578
|
-
default: throw new Error("Invalid version");
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
/**
|
|
582
|
-
* Simplified version of `create` for CIDv0.
|
|
583
|
-
*/
|
|
584
|
-
static createV0(digest) {
|
|
585
|
-
return _CID.create(0, DAG_PB_CODE, digest);
|
|
586
|
-
}
|
|
587
|
-
/**
|
|
588
|
-
* Simplified version of `create` for CIDv1.
|
|
589
|
-
*
|
|
590
|
-
* @param code - Content encoding format code.
|
|
591
|
-
* @param digest - Multihash of the content.
|
|
592
|
-
*/
|
|
593
|
-
static createV1(code, digest) {
|
|
594
|
-
return _CID.create(1, code, digest);
|
|
595
|
-
}
|
|
596
|
-
/**
|
|
597
|
-
* Decoded a CID from its binary representation. The byte array must contain
|
|
598
|
-
* only the CID with no additional bytes.
|
|
599
|
-
*
|
|
600
|
-
* An error will be thrown if the bytes provided do not contain a valid
|
|
601
|
-
* binary representation of a CID.
|
|
602
|
-
*/
|
|
603
|
-
static decode(bytes) {
|
|
604
|
-
const [cid, remainder] = _CID.decodeFirst(bytes);
|
|
605
|
-
if (remainder.length !== 0) throw new Error("Incorrect length");
|
|
606
|
-
return cid;
|
|
607
|
-
}
|
|
608
|
-
/**
|
|
609
|
-
* Decoded a CID from its binary representation at the beginning of a byte
|
|
610
|
-
* array.
|
|
611
|
-
*
|
|
612
|
-
* Returns an array with the first element containing the CID and the second
|
|
613
|
-
* element containing the remainder of the original byte array. The remainder
|
|
614
|
-
* will be a zero-length byte array if the provided bytes only contained a
|
|
615
|
-
* binary CID representation.
|
|
616
|
-
*/
|
|
617
|
-
static decodeFirst(bytes) {
|
|
618
|
-
const specs = _CID.inspectBytes(bytes);
|
|
619
|
-
const prefixSize = specs.size - specs.multihashSize;
|
|
620
|
-
const multihashBytes = coerce(bytes.subarray(prefixSize, prefixSize + specs.multihashSize));
|
|
621
|
-
if (multihashBytes.byteLength !== specs.multihashSize) throw new Error("Incorrect length");
|
|
622
|
-
const digestBytes = multihashBytes.subarray(specs.multihashSize - specs.digestSize);
|
|
623
|
-
const digest = new Digest(specs.multihashCode, specs.digestSize, digestBytes, multihashBytes);
|
|
624
|
-
return [specs.version === 0 ? _CID.createV0(digest) : _CID.createV1(specs.codec, digest), bytes.subarray(specs.size)];
|
|
625
|
-
}
|
|
626
|
-
/**
|
|
627
|
-
* Inspect the initial bytes of a CID to determine its properties.
|
|
628
|
-
*
|
|
629
|
-
* Involves decoding up to 4 varints. Typically this will require only 4 to 6
|
|
630
|
-
* bytes but for larger multicodec code values and larger multihash digest
|
|
631
|
-
* lengths these varints can be quite large. It is recommended that at least
|
|
632
|
-
* 10 bytes be made available in the `initialBytes` argument for a complete
|
|
633
|
-
* inspection.
|
|
634
|
-
*/
|
|
635
|
-
static inspectBytes(initialBytes) {
|
|
636
|
-
let offset = 0;
|
|
637
|
-
const next = () => {
|
|
638
|
-
const [i, length2] = decode3(initialBytes.subarray(offset));
|
|
639
|
-
offset += length2;
|
|
640
|
-
return i;
|
|
641
|
-
};
|
|
642
|
-
let version = next();
|
|
643
|
-
let codec = DAG_PB_CODE;
|
|
644
|
-
if (version === 18) {
|
|
645
|
-
version = 0;
|
|
646
|
-
offset = 0;
|
|
647
|
-
} else codec = next();
|
|
648
|
-
if (version !== 0 && version !== 1) throw new RangeError(`Invalid CID version ${version}`);
|
|
649
|
-
const prefixSize = offset;
|
|
650
|
-
const multihashCode = next();
|
|
651
|
-
const digestSize = next();
|
|
652
|
-
const size = offset + digestSize;
|
|
653
|
-
const multihashSize = size - prefixSize;
|
|
654
|
-
return {
|
|
655
|
-
version,
|
|
656
|
-
codec,
|
|
657
|
-
multihashCode,
|
|
658
|
-
digestSize,
|
|
659
|
-
multihashSize,
|
|
660
|
-
size
|
|
661
|
-
};
|
|
662
|
-
}
|
|
663
|
-
/**
|
|
664
|
-
* Takes cid in a string representation and creates an instance. If `base`
|
|
665
|
-
* decoder is not provided will use a default from the configuration. It will
|
|
666
|
-
* throw an error if encoding of the CID is not compatible with supplied (or
|
|
667
|
-
* a default decoder).
|
|
668
|
-
*/
|
|
669
|
-
static parse(source, base2) {
|
|
670
|
-
const [prefix, bytes] = parseCIDtoBytes(source, base2);
|
|
671
|
-
const cid = _CID.decode(bytes);
|
|
672
|
-
if (cid.version === 0 && source[0] !== "Q") throw Error("Version 0 CID string must not include multibase prefix");
|
|
673
|
-
baseCache(cid).set(prefix, source);
|
|
674
|
-
return cid;
|
|
675
|
-
}
|
|
676
|
-
};
|
|
677
|
-
function parseCIDtoBytes(source, base2) {
|
|
678
|
-
switch (source[0]) {
|
|
679
|
-
case "Q": {
|
|
680
|
-
const decoder = base2 ?? base58btc;
|
|
681
|
-
return [base58btc.prefix, decoder.decode(`${base58btc.prefix}${source}`)];
|
|
682
|
-
}
|
|
683
|
-
case base58btc.prefix: {
|
|
684
|
-
const decoder = base2 ?? base58btc;
|
|
685
|
-
return [base58btc.prefix, decoder.decode(source)];
|
|
686
|
-
}
|
|
687
|
-
case base32.prefix: {
|
|
688
|
-
const decoder = base2 ?? base32;
|
|
689
|
-
return [base32.prefix, decoder.decode(source)];
|
|
690
|
-
}
|
|
691
|
-
default:
|
|
692
|
-
if (base2 == null) throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");
|
|
693
|
-
return [source[0], base2.decode(source)];
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
function toStringV0(bytes, cache2, base2) {
|
|
697
|
-
const { prefix } = base2;
|
|
698
|
-
if (prefix !== base58btc.prefix) throw Error(`Cannot string encode V0 in ${base2.name} encoding`);
|
|
699
|
-
const cid = cache2.get(prefix);
|
|
700
|
-
if (cid == null) {
|
|
701
|
-
const cid2 = base2.encode(bytes).slice(1);
|
|
702
|
-
cache2.set(prefix, cid2);
|
|
703
|
-
return cid2;
|
|
704
|
-
} else return cid;
|
|
705
|
-
}
|
|
706
|
-
function toStringV1(bytes, cache2, base2) {
|
|
707
|
-
const { prefix } = base2;
|
|
708
|
-
const cid = cache2.get(prefix);
|
|
709
|
-
if (cid == null) {
|
|
710
|
-
const cid2 = base2.encode(bytes);
|
|
711
|
-
cache2.set(prefix, cid2);
|
|
712
|
-
return cid2;
|
|
713
|
-
} else return cid;
|
|
714
|
-
}
|
|
715
|
-
var DAG_PB_CODE = 112;
|
|
716
|
-
var SHA_256_CODE = 18;
|
|
717
|
-
function encodeCID(version, code, multihash) {
|
|
718
|
-
const codeOffset = encodingLength(version);
|
|
719
|
-
const hashOffset = codeOffset + encodingLength(code);
|
|
720
|
-
const bytes = new Uint8Array(hashOffset + multihash.byteLength);
|
|
721
|
-
encodeTo(version, bytes, 0);
|
|
722
|
-
encodeTo(code, bytes, codeOffset);
|
|
723
|
-
bytes.set(multihash, hashOffset);
|
|
724
|
-
return bytes;
|
|
725
|
-
}
|
|
726
|
-
var cidSymbol = Symbol.for("@ipld/js-cid/CID");
|
|
727
|
-
var isString = (input) => typeof input === "string";
|
|
728
|
-
var isValid = (hash) => {
|
|
729
|
-
try {
|
|
730
|
-
if (isString(hash)) return Boolean(CID.parse(hash));
|
|
731
|
-
return Boolean(CID.asCID(hash));
|
|
732
|
-
} catch {
|
|
733
|
-
return false;
|
|
734
|
-
}
|
|
735
|
-
};
|
|
736
|
-
//#endregion
|
|
737
|
-
//#region ../../node_modules/@cardano-sdk/core/dist/esm/Asset/NftMetadata/types.js
|
|
738
|
-
const looksLikeIpfsUrlWithoutProtocol = (uri) => {
|
|
739
|
-
const [cid] = uri.split("/");
|
|
740
|
-
if (!cid) return false;
|
|
741
|
-
return isValid(cid);
|
|
742
|
-
};
|
|
743
|
-
const Uri = (uri) => {
|
|
744
|
-
if (/^[a-z]+:\/\/.+/.test(uri)) return uri;
|
|
745
|
-
if (uri.startsWith("data:")) return uri;
|
|
746
|
-
if (looksLikeIpfsUrlWithoutProtocol(uri)) return `ipfs://${uri}`;
|
|
747
|
-
throw new InvalidStringError("Expected Uri to start with \"[protocol]:\", where protocol is usually \"https\", \"ipfs\" or \"data\"");
|
|
748
|
-
};
|
|
749
|
-
const ImageMediaType = (mediaType) => {
|
|
750
|
-
if (/^image\/.+$/.test(mediaType)) return mediaType;
|
|
751
|
-
throw new InvalidStringError("Expected media type to be \"image/*\"");
|
|
752
|
-
};
|
|
753
|
-
const MediaType = (mediaType) => {
|
|
754
|
-
if (/^[a-z]+\/.+$/.test(mediaType)) return mediaType;
|
|
755
|
-
throw new InvalidStringError("Expected media type to be \"*/*\"");
|
|
756
|
-
};
|
|
757
|
-
//#endregion
|
|
758
|
-
//#region ../../packages/lib/vendor/node_modules/@cardano-sdk/key-management/dist/esm/types.js
|
|
759
|
-
var CardanoKeyConst;
|
|
760
|
-
(function(CardanoKeyConst) {
|
|
761
|
-
CardanoKeyConst[CardanoKeyConst["PURPOSE"] = 1852] = "PURPOSE";
|
|
762
|
-
CardanoKeyConst[CardanoKeyConst["COIN_TYPE"] = 1815] = "COIN_TYPE";
|
|
763
|
-
})(CardanoKeyConst || (CardanoKeyConst = {}));
|
|
764
|
-
var Cip1852PathLevelIndexes;
|
|
765
|
-
(function(Cip1852PathLevelIndexes) {
|
|
766
|
-
Cip1852PathLevelIndexes[Cip1852PathLevelIndexes["PURPOSE"] = 0] = "PURPOSE";
|
|
767
|
-
Cip1852PathLevelIndexes[Cip1852PathLevelIndexes["COIN_TYPE"] = 1] = "COIN_TYPE";
|
|
768
|
-
Cip1852PathLevelIndexes[Cip1852PathLevelIndexes["ACCOUNT"] = 2] = "ACCOUNT";
|
|
769
|
-
Cip1852PathLevelIndexes[Cip1852PathLevelIndexes["ROLE"] = 3] = "ROLE";
|
|
770
|
-
Cip1852PathLevelIndexes[Cip1852PathLevelIndexes["INDEX"] = 4] = "INDEX";
|
|
771
|
-
})(Cip1852PathLevelIndexes || (Cip1852PathLevelIndexes = {}));
|
|
772
|
-
var KeyAgentType;
|
|
773
|
-
(function(KeyAgentType) {
|
|
774
|
-
KeyAgentType["InMemory"] = "InMemory";
|
|
775
|
-
KeyAgentType["Ledger"] = "Ledger";
|
|
776
|
-
KeyAgentType["Trezor"] = "Trezor";
|
|
777
|
-
})(KeyAgentType || (KeyAgentType = {}));
|
|
778
|
-
var KeyRole;
|
|
779
|
-
(function(KeyRole) {
|
|
780
|
-
KeyRole[KeyRole["External"] = 0] = "External";
|
|
781
|
-
KeyRole[KeyRole["Internal"] = 1] = "Internal";
|
|
782
|
-
KeyRole[KeyRole["Stake"] = 2] = "Stake";
|
|
783
|
-
KeyRole[KeyRole["DRep"] = 3] = "DRep";
|
|
784
|
-
})(KeyRole || (KeyRole = {}));
|
|
785
|
-
var KeyPurpose;
|
|
786
|
-
(function(KeyPurpose) {
|
|
787
|
-
KeyPurpose[KeyPurpose["STANDARD"] = HD_WALLET_CIP_ID] = "STANDARD";
|
|
788
|
-
KeyPurpose[KeyPurpose["MULTI_SIG"] = MULTISIG_CIP_ID] = "MULTI_SIG";
|
|
789
|
-
})(KeyPurpose || (KeyPurpose = {}));
|
|
790
|
-
var AddressType;
|
|
791
|
-
(function(AddressType) {
|
|
792
|
-
AddressType[AddressType["Internal"] = 1] = "Internal";
|
|
793
|
-
AddressType[AddressType["External"] = 0] = "External";
|
|
794
|
-
})(AddressType || (AddressType = {}));
|
|
795
|
-
var DeviceType;
|
|
796
|
-
(function(DeviceType) {
|
|
797
|
-
DeviceType["Ledger"] = "Ledger";
|
|
798
|
-
})(DeviceType || (DeviceType = {}));
|
|
799
|
-
var CommunicationType;
|
|
800
|
-
(function(CommunicationType) {
|
|
801
|
-
CommunicationType["Web"] = "web";
|
|
802
|
-
CommunicationType["Node"] = "node";
|
|
803
|
-
})(CommunicationType || (CommunicationType = {}));
|
|
804
|
-
//#endregion
|
|
805
|
-
//#region ../../packages/lib/vendor/node_modules/@cardano-sdk/key-management/dist/esm/Bip32Account.js
|
|
806
|
-
var __classPrivateFieldSet = function(receiver, state, value, kind, f) {
|
|
807
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
808
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
809
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
810
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
811
|
-
};
|
|
812
|
-
var __classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
813
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
814
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
815
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
816
|
-
};
|
|
817
|
-
var _Bip32Account_bip32Ed25519, _Bip32Account_blake2b;
|
|
818
|
-
var Bip32Account = class Bip32Account {
|
|
819
|
-
constructor({ extendedAccountPublicKey, chainId, accountIndex }, dependencies) {
|
|
820
|
-
_Bip32Account_bip32Ed25519.set(this, void 0);
|
|
821
|
-
_Bip32Account_blake2b.set(this, void 0);
|
|
822
|
-
this.extendedAccountPublicKeyHex = extendedAccountPublicKey;
|
|
823
|
-
__classPrivateFieldSet(this, _Bip32Account_bip32Ed25519, dependencies.bip32Ed25519, "f");
|
|
824
|
-
__classPrivateFieldSet(this, _Bip32Account_blake2b, dependencies.blake2b, "f");
|
|
825
|
-
this.chainId = chainId;
|
|
826
|
-
this.accountIndex = accountIndex;
|
|
827
|
-
}
|
|
828
|
-
async derivePublicKey(derivationPath) {
|
|
829
|
-
const extendedKey = await __classPrivateFieldGet(this, _Bip32Account_bip32Ed25519, "f").derivePublicKeyAsync(this.extendedAccountPublicKeyHex, [derivationPath.role, derivationPath.index]);
|
|
830
|
-
return Ed25519PublicKeyHex.fromBip32PublicKey(extendedKey);
|
|
831
|
-
}
|
|
832
|
-
async deriveAddress(paymentKeyDerivationPath, stakeKeyDerivationIndex) {
|
|
833
|
-
const stakeKeyDerivationPath = {
|
|
834
|
-
index: stakeKeyDerivationIndex,
|
|
835
|
-
role: KeyRole.Stake
|
|
836
|
-
};
|
|
837
|
-
const derivedPublicPaymentKey = await this.derivePublicKey({
|
|
838
|
-
index: paymentKeyDerivationPath.index,
|
|
839
|
-
role: Number(paymentKeyDerivationPath.type)
|
|
840
|
-
});
|
|
841
|
-
const derivedPublicPaymentKeyHash = await __classPrivateFieldGet(this, _Bip32Account_blake2b, "f").hashAsync(derivedPublicPaymentKey, 28);
|
|
842
|
-
const publicStakeKey = await this.derivePublicKey(stakeKeyDerivationPath);
|
|
843
|
-
const stakeCredential = {
|
|
844
|
-
hash: await __classPrivateFieldGet(this, _Bip32Account_blake2b, "f").hashAsync(publicStakeKey, 28),
|
|
845
|
-
type: CredentialType.KeyHash
|
|
846
|
-
};
|
|
847
|
-
const address = BaseAddress.fromCredentials(this.chainId.networkId, {
|
|
848
|
-
hash: derivedPublicPaymentKeyHash,
|
|
849
|
-
type: CredentialType.KeyHash
|
|
850
|
-
}, stakeCredential).toAddress();
|
|
851
|
-
const rewardAccount = RewardAddress.fromCredentials(this.chainId.networkId, stakeCredential).toAddress();
|
|
852
|
-
return {
|
|
853
|
-
accountIndex: this.accountIndex,
|
|
854
|
-
address: PaymentAddress(address.toBech32()),
|
|
855
|
-
networkId: this.chainId.networkId,
|
|
856
|
-
rewardAccount: RewardAccount(rewardAccount.toBech32()),
|
|
857
|
-
stakeKeyDerivationPath,
|
|
858
|
-
...paymentKeyDerivationPath
|
|
859
|
-
};
|
|
860
|
-
}
|
|
861
|
-
static async createDefaultDependencies() {
|
|
862
|
-
return {
|
|
863
|
-
bip32Ed25519: await SodiumBip32Ed25519.create(),
|
|
864
|
-
blake2b
|
|
865
|
-
};
|
|
866
|
-
}
|
|
867
|
-
static async fromAsyncKeyAgent(keyAgent, dependencies) {
|
|
868
|
-
dependencies ||= await Bip32Account.createDefaultDependencies();
|
|
869
|
-
return new Bip32Account({
|
|
870
|
-
accountIndex: await keyAgent.getAccountIndex(),
|
|
871
|
-
chainId: await keyAgent.getChainId(),
|
|
872
|
-
extendedAccountPublicKey: await keyAgent.getExtendedAccountPublicKey()
|
|
873
|
-
}, dependencies);
|
|
874
|
-
}
|
|
875
|
-
};
|
|
876
|
-
_Bip32Account_bip32Ed25519 = /* @__PURE__ */ new WeakMap(), _Bip32Account_blake2b = /* @__PURE__ */ new WeakMap();
|
|
877
|
-
//#endregion
|
|
878
|
-
//#region ../../packages/lib/cardano-provider-core/src/provider/blockfrost-asset-provider.ts
|
|
879
|
-
var BlockfrostAssetProvider = class extends BlockfrostProvider {
|
|
880
|
-
constructor(client, logger) {
|
|
881
|
-
super(client, logger);
|
|
882
|
-
}
|
|
883
|
-
async getAsset({ assetId, extraData }) {
|
|
884
|
-
try {
|
|
885
|
-
const response = await this.request(`assets/${assetId.toString()}`);
|
|
886
|
-
const name = AssetId.getAssetName(assetId);
|
|
887
|
-
const policyId = PolicyId(response.policy_id);
|
|
888
|
-
const quantity = BigInt(response.quantity);
|
|
889
|
-
return {
|
|
890
|
-
assetId,
|
|
891
|
-
fingerprint: AssetFingerprint(response.fingerprint),
|
|
892
|
-
name,
|
|
893
|
-
nftMetadata: extraData?.nftMetadata ? this.mapNftMetadata(response) : null,
|
|
894
|
-
policyId,
|
|
895
|
-
quantity,
|
|
896
|
-
supply: quantity,
|
|
897
|
-
tokenMetadata: extraData?.tokenMetadata ? this.mapTokenMetadata(assetId, response) : null
|
|
898
|
-
};
|
|
899
|
-
} catch (error) {
|
|
900
|
-
this.logger.error("getAsset failed", assetId, extraData);
|
|
901
|
-
throw toProviderError(error);
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
mapNftMetadata(asset) {
|
|
905
|
-
const image = this.metadatumToString(asset.onchain_metadata?.image || asset.metadata?.logo);
|
|
906
|
-
const name = asset.onchain_metadata?.name || asset.metadata?.name;
|
|
907
|
-
if (!image || !name) return null;
|
|
908
|
-
try {
|
|
909
|
-
return {
|
|
910
|
-
description: this.metadatumToString(asset.onchain_metadata?.description || asset.metadata?.description),
|
|
911
|
-
files: Array.isArray(asset.onchain_metadata?.files) ? asset.onchain_metadata.files.map((file) => {
|
|
912
|
-
const mediaType = file.mediaType;
|
|
913
|
-
const fileName = file.name;
|
|
914
|
-
const source = this.metadatumToString(file.src);
|
|
915
|
-
if (!source || !mediaType) return null;
|
|
916
|
-
try {
|
|
917
|
-
return {
|
|
918
|
-
mediaType: MediaType(mediaType),
|
|
919
|
-
name: fileName,
|
|
920
|
-
otherProperties: this.mapFileMetadataOtherProperties(file),
|
|
921
|
-
src: Uri(source)
|
|
922
|
-
};
|
|
923
|
-
} catch (error) {
|
|
924
|
-
this.logger.warn("Failed to parse onchain_metadata file", file, error);
|
|
925
|
-
return null;
|
|
926
|
-
}
|
|
927
|
-
}).filter(isNotNil) : void 0,
|
|
928
|
-
image: Uri(image),
|
|
929
|
-
mediaType: asset.onchain_metadata?.mediaType ? ImageMediaType(asset.onchain_metadata.mediaType) : void 0,
|
|
930
|
-
name,
|
|
931
|
-
otherProperties: this.mapNftMetadataOtherProperties(asset.onchain_metadata),
|
|
932
|
-
version: this.mapNftMetadataVersion(asset.onchain_metadata)
|
|
933
|
-
};
|
|
934
|
-
} catch (error) {
|
|
935
|
-
this.logger.warn("Failed to parse nft metadata", asset, error);
|
|
936
|
-
return null;
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
asString = (metadatum) => typeof metadatum === "string" ? metadatum : void 0;
|
|
940
|
-
metadatumToString(metadatum) {
|
|
941
|
-
let stringMetadatum;
|
|
942
|
-
if (Array.isArray(metadatum)) stringMetadatum = metadatum.map((metadata) => this.asString(metadata)).filter(isNotNil).join("");
|
|
943
|
-
else stringMetadatum = this.asString(metadatum);
|
|
944
|
-
return stringMetadatum;
|
|
945
|
-
}
|
|
946
|
-
objToMetadatum(object) {
|
|
947
|
-
if (typeof object === "string") return object;
|
|
948
|
-
if (typeof object === "number") return BigInt(object);
|
|
949
|
-
if (typeof object === "object") {
|
|
950
|
-
if (object === null) return "";
|
|
951
|
-
if (Array.isArray(object)) return object.map((item) => this.objToMetadatum(item));
|
|
952
|
-
return new Map(Object.entries(object).map(([key, value]) => [key, this.objToMetadatum(value)]));
|
|
953
|
-
}
|
|
954
|
-
return "";
|
|
955
|
-
}
|
|
956
|
-
mapNftMetadataVersion(metadata) {
|
|
957
|
-
return typeof metadata?.version === "string" ? metadata.version : "1.0";
|
|
958
|
-
}
|
|
959
|
-
mapFileMetadataOtherProperties(metadata) {
|
|
960
|
-
return this.mapOtherProperties(metadata, [
|
|
961
|
-
"name",
|
|
962
|
-
"mediaType",
|
|
963
|
-
"src"
|
|
964
|
-
]);
|
|
965
|
-
}
|
|
966
|
-
mapNftMetadataOtherProperties(metadata) {
|
|
967
|
-
return this.mapOtherProperties(metadata, [
|
|
968
|
-
"name",
|
|
969
|
-
"image",
|
|
970
|
-
"description",
|
|
971
|
-
"mediaType",
|
|
972
|
-
"files",
|
|
973
|
-
"version"
|
|
974
|
-
]);
|
|
975
|
-
}
|
|
976
|
-
mapOtherProperties(metadata, mainProperties) {
|
|
977
|
-
if (!metadata) return;
|
|
978
|
-
const otherProperties = Object.entries(omit(metadata, mainProperties));
|
|
979
|
-
if (otherProperties.length === 0) return;
|
|
980
|
-
return new Map(otherProperties.map(([key, value]) => [key, this.objToMetadatum(value)]));
|
|
981
|
-
}
|
|
982
|
-
mapTokenMetadata(assetId, asset) {
|
|
983
|
-
return {
|
|
984
|
-
assetId,
|
|
985
|
-
decimals: asset.metadata?.decimals || void 0,
|
|
986
|
-
desc: this.metadatumToString(asset.metadata?.description || asset.onchain_metadata?.description),
|
|
987
|
-
icon: this.metadatumToString(asset.metadata?.logo || asset.onchain_metadata?.image),
|
|
988
|
-
name: asset.metadata?.name || asset.onchain_metadata?.name,
|
|
989
|
-
ticker: asset.metadata?.ticker || void 0,
|
|
990
|
-
url: asset.metadata?.url || void 0,
|
|
991
|
-
version: "1.0"
|
|
992
|
-
};
|
|
993
|
-
}
|
|
994
|
-
};
|
|
995
|
-
//#endregion
|
|
996
|
-
//#region ../../packages/lib/cardano-provider-core/src/provider/blockfrost-address-discovery.ts
|
|
997
|
-
/**
|
|
998
|
-
* How far we search for stake keys before concluding there are no more stake credentials.
|
|
999
|
-
*/
|
|
1000
|
-
const STAKE_KEY_GAP = 5;
|
|
1001
|
-
/**
|
|
1002
|
-
* How far we search for payment addresses under a single stake key
|
|
1003
|
-
* before concluding that no more addresses exist (or that they are “franken”).
|
|
1004
|
-
*/
|
|
1005
|
-
const PAYMENT_CREDENTIAL_GAP = 100;
|
|
1006
|
-
/**
|
|
1007
|
-
* Safety cap for thorough discovery. The thorough predicate continues past
|
|
1008
|
-
* the gap when the Blockfrost-returned address set still has unmatched
|
|
1009
|
-
* entries; this bound ensures the loop cannot run forever when an unmatched
|
|
1010
|
-
* entry is structurally undiscoverable (true "franken" cases).
|
|
1011
|
-
*/
|
|
1012
|
-
const HARD_UPPER_BOUND = 1e4;
|
|
1013
|
-
/**
|
|
1014
|
-
* Fetch size for Blockfrost addresses per page.
|
|
1015
|
-
*/
|
|
1016
|
-
const BLOCKFROST_PAGE_SIZE = 100;
|
|
1017
|
-
/**
|
|
1018
|
-
* Derive the reward account (stake address) at a given stakeIndex.
|
|
1019
|
-
*/
|
|
1020
|
-
const deriveRewardAccount = async (account, stakeIndex) => {
|
|
1021
|
-
return CardanoRewardAccount((await account.deriveAddress({
|
|
1022
|
-
type: AddressType$1.External,
|
|
1023
|
-
index: 0
|
|
1024
|
-
}, stakeIndex)).rewardAccount);
|
|
1025
|
-
};
|
|
1026
|
-
/**
|
|
1027
|
-
* Derive a payment address at a given (payment) index + address type (internal/external).
|
|
1028
|
-
*/
|
|
1029
|
-
const derivePaymentAddress = async (account, paymentIndex, stakeIndex, isInternal) => {
|
|
1030
|
-
const type = isInternal ? AddressType$1.Internal : AddressType$1.External;
|
|
1031
|
-
return account.deriveAddress({
|
|
1032
|
-
type,
|
|
1033
|
-
index: paymentIndex
|
|
1034
|
-
}, stakeIndex);
|
|
1035
|
-
};
|
|
1036
|
-
const compareAddresses = (a, b) => {
|
|
1037
|
-
const indexDiff = a.index - b.index;
|
|
1038
|
-
if (indexDiff !== 0) return indexDiff;
|
|
1039
|
-
if (a.stakeKeyDerivationPath && b.stakeKeyDerivationPath) return a.stakeKeyDerivationPath.index - b.stakeKeyDerivationPath.index;
|
|
1040
|
-
return 0;
|
|
1041
|
-
};
|
|
1042
|
-
/**
|
|
1043
|
-
* Example BlockfrostAddressDiscovery class that:
|
|
1044
|
-
* - Paginates all addresses from each reward account
|
|
1045
|
-
* - Derives addresses sequentially and checks if they match
|
|
1046
|
-
* - Uses a gap-based approach for both stake keys AND payment addresses
|
|
1047
|
-
* - Logs leftover addresses as unknown
|
|
1048
|
-
*/
|
|
1049
|
-
var BlockfrostAddressDiscovery = class extends BlockfrostProvider {
|
|
1050
|
-
constructor(client, logger) {
|
|
1051
|
-
super(client, logger);
|
|
1052
|
-
}
|
|
1053
|
-
/**
|
|
1054
|
-
* @returns Observable that emits all discovered addresses one by one. Completes on first error.
|
|
1055
|
-
*/
|
|
1056
|
-
discover(manager, options = {}) {
|
|
1057
|
-
const isThorough = options.thorough ?? false;
|
|
1058
|
-
this.logger.debug(`Discovering addresses using Blockfrost (thorough=${isThorough})...`);
|
|
1059
|
-
return forkJoin({
|
|
1060
|
-
firstAddress: from(manager.deriveAddress({
|
|
1061
|
-
index: 0,
|
|
1062
|
-
type: AddressType$1.External
|
|
1063
|
-
}, 0)),
|
|
1064
|
-
discovered: this.#discoverAddresses(manager, isThorough).pipe(toArray())
|
|
1065
|
-
}).pipe(mergeMap(({ firstAddress, discovered }) => from([firstAddress, ...discovered])), distinct(({ address }) => address), map(Ok), catchError((error) => of(Err(error instanceof ProviderError ? error : new ProviderError(ProviderFailure.Unknown, error)))));
|
|
1066
|
-
}
|
|
1067
|
-
/**
|
|
1068
|
-
* Main discovery logic:
|
|
1069
|
-
* 1. Stake key gap: we keep deriving stake keys until we have
|
|
1070
|
-
* STAKE_KEY_GAP consecutive stake keys that yield zero discovered addresses.
|
|
1071
|
-
* 2. Payment credential gap: for each stake key, we stop deriving
|
|
1072
|
-
* payment addresses once we have PAYMENT_CREDENTIAL_GAP consecutive misses.
|
|
1073
|
-
* In thorough mode, termination additionally requires the Blockfrost
|
|
1074
|
-
* address set to be drained (bounded by HARD_UPPER_BOUND).
|
|
1075
|
-
*/
|
|
1076
|
-
#discoverAddresses(account, thorough) {
|
|
1077
|
-
return new Observable((subscriber) => {
|
|
1078
|
-
let isUnsubscribed = false;
|
|
1079
|
-
(async () => {
|
|
1080
|
-
let stakeIndex = 0;
|
|
1081
|
-
let stakeGapCount = 0;
|
|
1082
|
-
try {
|
|
1083
|
-
while (stakeGapCount < STAKE_KEY_GAP) {
|
|
1084
|
-
if (isUnsubscribed) break;
|
|
1085
|
-
this.logger.debug(`Deriving reward account for stake index ${stakeIndex}...`);
|
|
1086
|
-
const rewardAccount = await deriveRewardAccount(account, stakeIndex);
|
|
1087
|
-
this.logger.debug(`Fetching addresses for stake credential ${rewardAccount}...`);
|
|
1088
|
-
const allAddressesForStake = await this.#fetchAllAddressesForAccount(rewardAccount);
|
|
1089
|
-
if (allAddressesForStake.length === 0) {
|
|
1090
|
-
stakeGapCount++;
|
|
1091
|
-
stakeIndex++;
|
|
1092
|
-
continue;
|
|
1093
|
-
}
|
|
1094
|
-
stakeGapCount = 0;
|
|
1095
|
-
const { discovered, unknown } = await this.#discoverAddressesForStakeKey(account, stakeIndex, allAddressesForStake, thorough);
|
|
1096
|
-
for (const address of discovered.sort(compareAddresses)) subscriber.next(address);
|
|
1097
|
-
if (unknown.length > 0) this.logger.warn(`The following addresses under stakeIndex ${stakeIndex} were not matched:`, unknown);
|
|
1098
|
-
++stakeIndex;
|
|
1099
|
-
}
|
|
1100
|
-
subscriber.complete();
|
|
1101
|
-
} catch (error) {
|
|
1102
|
-
subscriber.error(error);
|
|
1103
|
-
}
|
|
1104
|
-
})();
|
|
1105
|
-
return () => {
|
|
1106
|
-
isUnsubscribed = true;
|
|
1107
|
-
};
|
|
1108
|
-
});
|
|
1109
|
-
}
|
|
1110
|
-
/**
|
|
1111
|
-
* Discover addresses under a single stake key.
|
|
1112
|
-
*
|
|
1113
|
-
* Standard mode (thorough=false): stop once we hit PAYMENT_CREDENTIAL_GAP
|
|
1114
|
-
* consecutive misses. Matches the BIP-44 gap-limit convention.
|
|
1115
|
-
*
|
|
1116
|
-
* Thorough mode (thorough=true): also require the Blockfrost address set to
|
|
1117
|
-
* be drained before stopping, so high-index entries past the gap can still
|
|
1118
|
-
* be discovered. Bounded by HARD_UPPER_BOUND to guarantee termination when
|
|
1119
|
-
* an entry is structurally undiscoverable.
|
|
1120
|
-
*
|
|
1121
|
-
* @returns Array of discovered (matched) addresses + leftover “unknown/franken” addresses
|
|
1122
|
-
*/
|
|
1123
|
-
async #discoverAddressesForStakeKey(account, stakeIndex, allAddressesForStake, thorough) {
|
|
1124
|
-
const discovered = [];
|
|
1125
|
-
const uniqueAddressesForStake = new Set(allAddressesForStake);
|
|
1126
|
-
let gapCount = 0;
|
|
1127
|
-
let paymentIndex = 0;
|
|
1128
|
-
while (true) {
|
|
1129
|
-
const hasHitGap = gapCount >= PAYMENT_CREDENTIAL_GAP;
|
|
1130
|
-
if (thorough ? hasHitGap && uniqueAddressesForStake.size === 0 || paymentIndex >= HARD_UPPER_BOUND : hasHitGap) {
|
|
1131
|
-
this.logger.debug(`Stopping payment discovery for stakeIndex ${stakeIndex} at paymentIndex ${paymentIndex} (gap=${gapCount}, remaining=${uniqueAddressesForStake.size}, thorough=${thorough}).`);
|
|
1132
|
-
break;
|
|
1133
|
-
}
|
|
1134
|
-
const externalAddr = await derivePaymentAddress(account, paymentIndex, stakeIndex, false);
|
|
1135
|
-
const hasExternalInSet = uniqueAddressesForStake.has(externalAddr.address);
|
|
1136
|
-
const internalAddr = await derivePaymentAddress(account, paymentIndex, stakeIndex, true);
|
|
1137
|
-
const hasInternalInSet = uniqueAddressesForStake.has(internalAddr.address);
|
|
1138
|
-
if (hasExternalInSet) {
|
|
1139
|
-
discovered.push({
|
|
1140
|
-
...externalAddr,
|
|
1141
|
-
stakeKeyDerivationPath: {
|
|
1142
|
-
index: stakeIndex,
|
|
1143
|
-
role: KeyRole$1.Stake
|
|
1144
|
-
}
|
|
1145
|
-
});
|
|
1146
|
-
uniqueAddressesForStake.delete(externalAddr.address);
|
|
1147
|
-
}
|
|
1148
|
-
if (hasInternalInSet) {
|
|
1149
|
-
discovered.push({
|
|
1150
|
-
...internalAddr,
|
|
1151
|
-
stakeKeyDerivationPath: {
|
|
1152
|
-
index: stakeIndex,
|
|
1153
|
-
role: KeyRole$1.Stake
|
|
1154
|
-
}
|
|
1155
|
-
});
|
|
1156
|
-
uniqueAddressesForStake.delete(internalAddr.address);
|
|
1157
|
-
}
|
|
1158
|
-
if (!hasExternalInSet && !hasInternalInSet) gapCount++;
|
|
1159
|
-
else gapCount = 0;
|
|
1160
|
-
++paymentIndex;
|
|
1161
|
-
}
|
|
1162
|
-
return {
|
|
1163
|
-
discovered,
|
|
1164
|
-
unknown: [...uniqueAddressesForStake]
|
|
1165
|
-
};
|
|
1166
|
-
}
|
|
1167
|
-
/**
|
|
1168
|
-
* Fetch all addresses associated with a reward account from Blockfrost,
|
|
1169
|
-
* handling pagination until the response has fewer than BLOCKFROST_PAGE_SIZE items.
|
|
1170
|
-
*/
|
|
1171
|
-
async #fetchAllAddressesForAccount(rewardAccount) {
|
|
1172
|
-
const allAddresses = [];
|
|
1173
|
-
let page = 1;
|
|
1174
|
-
this.logger.debug(`Fetching addresses for stake ${rewardAccount} (paginated)...`);
|
|
1175
|
-
while (true) try {
|
|
1176
|
-
const response = await this.request(`accounts/${rewardAccount}/addresses?count=${BLOCKFROST_PAGE_SIZE}&page=${page}`);
|
|
1177
|
-
if (!response || response.length === 0) break;
|
|
1178
|
-
for (const entry of response) allAddresses.push(entry.address);
|
|
1179
|
-
if (response.length < BLOCKFROST_PAGE_SIZE) break;
|
|
1180
|
-
++page;
|
|
1181
|
-
} catch (error) {
|
|
1182
|
-
if (isNotFoundError(error)) {
|
|
1183
|
-
this.logger.debug(`No addresses found for stake ${rewardAccount}. 404 from Blockfrost.`);
|
|
1184
|
-
break;
|
|
1185
|
-
}
|
|
1186
|
-
this.logger.error(`Error fetching addresses for stake ${rewardAccount}:`, error);
|
|
1187
|
-
throw error;
|
|
1188
|
-
}
|
|
1189
|
-
this.logger.debug(`Fetched ${allAddresses.length} addresses for stake ${rewardAccount}`);
|
|
1190
|
-
return allAddresses;
|
|
1191
|
-
}
|
|
1192
|
-
};
|
|
1193
|
-
//#endregion
|
|
1194
|
-
//#region ../../packages/lib/cardano-provider-core/src/provider/blockfrost-tokens-provider.ts
|
|
1195
|
-
const amountToRawToken = (amount) => ({
|
|
1196
|
-
available: BigNumber(BigInt(amount.quantity)),
|
|
1197
|
-
pending: BigNumber(0n),
|
|
1198
|
-
tokenId: TokenId(amount.unit)
|
|
1199
|
-
});
|
|
1200
|
-
var BlockfrostTokensProvider = class extends BlockfrostProvider {
|
|
1201
|
-
getTokens(props) {
|
|
1202
|
-
return from(this.request(`addresses/${props.address}`).then(({ amount }) => Ok(amount.map(amountToRawToken))).catch((error) => {
|
|
1203
|
-
if (isNotFoundError(error)) return Ok([]);
|
|
1204
|
-
return Err(error);
|
|
1205
|
-
}));
|
|
1206
|
-
}
|
|
1207
|
-
};
|
|
1208
|
-
//#endregion
|
|
1209
|
-
//#region ../../packages/lib/cardano-provider-core/src/provider/blockfrost-activity-provider.ts
|
|
1210
|
-
/**
|
|
1211
|
-
* Provider responsible for fetching transaction history and details.
|
|
1212
|
-
*/
|
|
1213
|
-
var BlockfrostActivityProvider = class extends BlockfrostProvider {
|
|
1214
|
-
#txProvider;
|
|
1215
|
-
constructor(client, logger, txProvider = new BlockfrostTxProvider(client, logger)) {
|
|
1216
|
-
super(client, logger);
|
|
1217
|
-
this.#txProvider = txProvider;
|
|
1218
|
-
}
|
|
1219
|
-
/**
|
|
1220
|
-
* Fetches the transaction history for a Cardano address.
|
|
1221
|
-
*
|
|
1222
|
-
* @param address - Cardano payment address to fetch transaction history for
|
|
1223
|
-
* @param numberOfItems - How many history items should be fetched (order: newer → older)
|
|
1224
|
-
* @param startAtBlock - At which block (inclusive) should it start
|
|
1225
|
-
* @param startAtIndex - At which index (inclusive) should it start
|
|
1226
|
-
* @returns Observable with Result containing the history items or an error
|
|
1227
|
-
*/
|
|
1228
|
-
getAddressTransactionHistory({ address, numberOfItems, startAtBlock, startAtIndex, endAtBlock, endAtIndex, order = "desc" }) {
|
|
1229
|
-
const fromIndexParameter = startAtIndex !== void 0 ? `:${startAtIndex}` : "";
|
|
1230
|
-
const toIndexParameter = endAtIndex !== void 0 ? `:${endAtIndex}` : "";
|
|
1231
|
-
const optionalFromParameter = startAtBlock !== void 0 ? `&to=${startAtBlock}${fromIndexParameter}` : "";
|
|
1232
|
-
const optionalToParameter = endAtBlock !== void 0 ? `&from=${endAtBlock}${toIndexParameter}` : "";
|
|
1233
|
-
return from(this.request(`addresses/${address}/transactions?count=${numberOfItems}&order=${order}${optionalFromParameter}${optionalToParameter}`)).pipe(map((addressTxHistory) => Ok(addressTxHistory.map((item) => ({
|
|
1234
|
-
txId: TransactionId(item.tx_hash),
|
|
1235
|
-
txIndex: TxIndex(item.tx_index),
|
|
1236
|
-
blockNumber: BlockNo(item.block_height),
|
|
1237
|
-
blockTime: Timestamp(item.block_time * 1e3)
|
|
1238
|
-
})))), catchError((error) => {
|
|
1239
|
-
if (isNotFoundError(error)) return of(Ok([]));
|
|
1240
|
-
return of(Err(error));
|
|
1241
|
-
}));
|
|
1242
|
-
}
|
|
1243
|
-
/**
|
|
1244
|
-
* Fetches transaction details, cbor and utxos to build a Cardano.HydratedTx
|
|
1245
|
-
* which is returned inside a tuple together with the tx details which holds
|
|
1246
|
-
* additional info not stored in the HydratedTx.
|
|
1247
|
-
*
|
|
1248
|
-
* @param txId - Cardano.TransactionId
|
|
1249
|
-
*/
|
|
1250
|
-
getTransactionDetails(txId) {
|
|
1251
|
-
return forkJoin([
|
|
1252
|
-
from(this.#txProvider.getTransaction(txId)),
|
|
1253
|
-
this.#fetchTxFromCbor(txId),
|
|
1254
|
-
this.#fetchUtxos(txId)
|
|
1255
|
-
]).pipe(map(([txDetails, blockfrostTxCBOR, blockFrostUtxos]) => {
|
|
1256
|
-
const { inputs, outputs, collaterals } = BlockfrostToCardanoSDK.transactionUtxos(blockFrostUtxos, blockfrostTxCBOR);
|
|
1257
|
-
const inputSource = txDetails.valid_contract ? InputSource.inputs : InputSource.collaterals;
|
|
1258
|
-
const body = {
|
|
1259
|
-
...inputSource === InputSource.collaterals ? {
|
|
1260
|
-
collateralReturn: outputs.length > 0 ? outputs[0] : void 0,
|
|
1261
|
-
collaterals: inputs,
|
|
1262
|
-
fee: BigInt(0),
|
|
1263
|
-
inputs: [],
|
|
1264
|
-
outputs: [],
|
|
1265
|
-
totalCollateral: blockfrostTxCBOR.body.fee
|
|
1266
|
-
} : {
|
|
1267
|
-
collateralReturn: blockfrostTxCBOR.body.collateralReturn ?? void 0,
|
|
1268
|
-
collaterals,
|
|
1269
|
-
fee: blockfrostTxCBOR.body.fee,
|
|
1270
|
-
inputs,
|
|
1271
|
-
outputs
|
|
1272
|
-
},
|
|
1273
|
-
certificates: blockfrostTxCBOR.body.certificates ?? [],
|
|
1274
|
-
donation: blockfrostTxCBOR.body.donation,
|
|
1275
|
-
mint: blockfrostTxCBOR.body.mint ? new Map([...blockfrostTxCBOR.body.mint].sort()) : void 0,
|
|
1276
|
-
proposalProcedures: blockfrostTxCBOR.body.proposalProcedures,
|
|
1277
|
-
validityInterval: blockfrostTxCBOR.body.validityInterval ? blockfrostTxCBOR.body.validityInterval : {
|
|
1278
|
-
invalidBefore: void 0,
|
|
1279
|
-
invalidHereafter: void 0
|
|
1280
|
-
},
|
|
1281
|
-
votingProcedures: blockfrostTxCBOR.body.votingProcedures,
|
|
1282
|
-
withdrawals: blockfrostTxCBOR.body.withdrawals
|
|
1283
|
-
};
|
|
1284
|
-
return Ok({
|
|
1285
|
-
auxiliaryData: blockfrostTxCBOR.auxiliaryData,
|
|
1286
|
-
blockHeader: {
|
|
1287
|
-
blockNo: BlockNo(txDetails.block_height),
|
|
1288
|
-
hash: BlockId(txDetails.block),
|
|
1289
|
-
slot: Slot(txDetails.slot)
|
|
1290
|
-
},
|
|
1291
|
-
body,
|
|
1292
|
-
id: txId,
|
|
1293
|
-
index: txDetails.index,
|
|
1294
|
-
inputSource,
|
|
1295
|
-
txSize: 0,
|
|
1296
|
-
witness: blockfrostTxCBOR.witness,
|
|
1297
|
-
blockTime: txDetails.block_time
|
|
1298
|
-
});
|
|
1299
|
-
}), catchError((error) => of(Err(error))));
|
|
1300
|
-
}
|
|
1301
|
-
#fetchTxFromCbor(txId) {
|
|
1302
|
-
return from(this.request(`txs/${txId}/cbor`)).pipe(map(({ cbor }) => Transaction.fromCbor(TxCBOR(cbor)).toCore()));
|
|
1303
|
-
}
|
|
1304
|
-
#fetchUtxos(txId) {
|
|
1305
|
-
return from(this.request(`txs/${txId}/utxos`));
|
|
1306
|
-
}
|
|
1307
|
-
};
|
|
1308
|
-
//#endregion
|
|
1309
|
-
//#region ../../packages/lib/cardano-provider-core/src/provider/blockfrost-input-resolver-provider.ts
|
|
1310
|
-
/**
|
|
1311
|
-
* A resolver class to fetch and resolve transaction inputs using Blockfrost API.
|
|
1312
|
-
*/
|
|
1313
|
-
var BlockfrostInputResolverProvider = class extends BlockfrostProvider {
|
|
1314
|
-
/**
|
|
1315
|
-
* Constructs a new BlockfrostInputResolverProvider.
|
|
1316
|
-
*
|
|
1317
|
-
* @param client - The Blockfrost client instance to interact with the Blockfrost API.
|
|
1318
|
-
* @param logger - The logger instance to log messages to.
|
|
1319
|
-
*/
|
|
1320
|
-
constructor(client, logger) {
|
|
1321
|
-
super(client, logger);
|
|
1322
|
-
}
|
|
1323
|
-
/**
|
|
1324
|
-
* Resolves a transaction input (`Cardano.TxIn`) to its corresponding output (`Cardano.TxOut`).
|
|
1325
|
-
*
|
|
1326
|
-
* @param input - The transaction input to resolve, including its transaction ID and index.
|
|
1327
|
-
* @returns A promise that resolves to the corresponding `Cardano.TxOut` if found, or `null` if not.
|
|
1328
|
-
*/
|
|
1329
|
-
async resolveInput(input) {
|
|
1330
|
-
this.logger.debug(`Resolving input ${input.txId}#${input.index}`);
|
|
1331
|
-
const out = await this.fetchTxOut(input);
|
|
1332
|
-
if (!out) return null;
|
|
1333
|
-
return out;
|
|
1334
|
-
}
|
|
1335
|
-
/**
|
|
1336
|
-
* Fetches and caches the transaction output (`Cardano.TxOut`) for a given transaction input (`Cardano.TxIn`).
|
|
1337
|
-
*
|
|
1338
|
-
* @param txIn - The transaction input to fetch and cache the output for.
|
|
1339
|
-
* @returns A promise that resolves to the corresponding `Cardano.TxOut` if found, or `null` if not.
|
|
1340
|
-
*/
|
|
1341
|
-
async fetchTxOut(txIn) {
|
|
1342
|
-
let response;
|
|
1343
|
-
try {
|
|
1344
|
-
response = await this.request(`txs/${txIn.txId}/utxos`);
|
|
1345
|
-
} catch (error) {
|
|
1346
|
-
this.logger.error(`Failed to fetch transaction ${txIn.txId}`, error);
|
|
1347
|
-
if (isNotFoundError(error)) return null;
|
|
1348
|
-
throw error;
|
|
1349
|
-
}
|
|
1350
|
-
for (const blockfrostUTxO of response.outputs) {
|
|
1351
|
-
if (blockfrostUTxO.output_index !== txIn.index) continue;
|
|
1352
|
-
const coreTxOut = BlockfrostToCardanoSDK.txOut(blockfrostUTxO);
|
|
1353
|
-
this.logger.debug(`Resolved input ${txIn.txId}#${txIn.index} from Blockfrost`);
|
|
1354
|
-
return coreTxOut;
|
|
1355
|
-
}
|
|
1356
|
-
this.logger.error(`Failed to resolve input ${txIn.txId}#${txIn.index}`);
|
|
1357
|
-
return null;
|
|
1358
|
-
}
|
|
1359
|
-
};
|
|
1360
|
-
//#endregion
|
|
1361
|
-
//#region ../../packages/lib/cardano-provider-core/src/provider/blockfrost-stake-pool-provider.ts
|
|
1362
|
-
var BlockfrostStakePoolProvider = class extends BlockfrostProvider {
|
|
1363
|
-
constructor(client, logger) {
|
|
1364
|
-
super(client, logger);
|
|
1365
|
-
}
|
|
1366
|
-
async getMetadata(poolId) {
|
|
1367
|
-
try {
|
|
1368
|
-
const metadata = await this.request(`pools/${poolId}/metadata`);
|
|
1369
|
-
return Object.keys(metadata).length ? metadata : null;
|
|
1370
|
-
} catch (error) {
|
|
1371
|
-
if (error instanceof ProviderError) {
|
|
1372
|
-
if (error.reason === ProviderFailure.NotFound) return null;
|
|
1373
|
-
throw error;
|
|
1374
|
-
}
|
|
1375
|
-
throw toProviderError(error);
|
|
1376
|
-
}
|
|
1377
|
-
}
|
|
1378
|
-
async getNetworkData() {
|
|
1379
|
-
try {
|
|
1380
|
-
const [genesis, params, network, retiring] = await Promise.all([
|
|
1381
|
-
this.request("genesis"),
|
|
1382
|
-
this.request("epochs/latest/parameters"),
|
|
1383
|
-
this.request("network"),
|
|
1384
|
-
this.paginatedRequests({
|
|
1385
|
-
endpoint: "pools/retiring",
|
|
1386
|
-
pageSize: 100
|
|
1387
|
-
})
|
|
1388
|
-
]);
|
|
1389
|
-
return {
|
|
1390
|
-
activeSlotsCoefficient: genesis.active_slots_coefficient,
|
|
1391
|
-
desiredNumberOfPools: params.n_opt,
|
|
1392
|
-
epochLength: genesis.epoch_length,
|
|
1393
|
-
liveStake: Number(network.stake.live),
|
|
1394
|
-
maxLovelaceSupply: Number(network.supply.max),
|
|
1395
|
-
monetaryExpansion: params.rho,
|
|
1396
|
-
poolInfluence: params.a0,
|
|
1397
|
-
reserves: Number(network.supply.reserves),
|
|
1398
|
-
retiringPools: retiring.map((pool) => pool.pool_id),
|
|
1399
|
-
slotLength: genesis.slot_length,
|
|
1400
|
-
timestamp: 0,
|
|
1401
|
-
treasuryCut: params.tau
|
|
1402
|
-
};
|
|
1403
|
-
} catch (error) {
|
|
1404
|
-
throw toProviderError(error);
|
|
1405
|
-
}
|
|
1406
|
-
}
|
|
1407
|
-
async getStakePool(poolId) {
|
|
1408
|
-
try {
|
|
1409
|
-
return await this.request(`pools/${poolId}`);
|
|
1410
|
-
} catch (error) {
|
|
1411
|
-
if (error instanceof ProviderError) {
|
|
1412
|
-
if (error.reason === ProviderFailure.NotFound) return null;
|
|
1413
|
-
throw error;
|
|
1414
|
-
}
|
|
1415
|
-
throw toProviderError(error);
|
|
1416
|
-
}
|
|
1417
|
-
}
|
|
1418
|
-
async getStakePools() {
|
|
1419
|
-
try {
|
|
1420
|
-
return await this.paginatedRequests({
|
|
1421
|
-
endpoint: "pools/extended",
|
|
1422
|
-
pageSize: 100
|
|
1423
|
-
});
|
|
1424
|
-
} catch (error) {
|
|
1425
|
-
throw toProviderError(error);
|
|
1426
|
-
}
|
|
1427
|
-
}
|
|
1428
|
-
};
|
|
1429
|
-
//#endregion
|
|
1430
|
-
//#region ../../packages/lib/cardano-provider-core/src/provider/blockfrost-rewards-provider.ts
|
|
1431
|
-
/**
|
|
1432
|
-
* Blockfrost returns 404 from the `accounts/*` endpoints for a stake address
|
|
1433
|
-
* that has never appeared on-chain. That is a normal state for a fresh
|
|
1434
|
-
* account, not an error: it means "never registered, nothing staked, no
|
|
1435
|
-
* rewards".
|
|
1436
|
-
*/
|
|
1437
|
-
const NEVER_ACTIVE_REWARD_ACCOUNT_INFO = {
|
|
1438
|
-
isActive: false,
|
|
1439
|
-
isRegistered: false,
|
|
1440
|
-
rewardsSum: BigNumber(0n),
|
|
1441
|
-
withdrawableAmount: BigNumber(0n),
|
|
1442
|
-
controlledAmount: BigNumber(0n)
|
|
1443
|
-
};
|
|
1444
|
-
var BlockfrostRewardsProvider = class extends BlockfrostProvider {
|
|
1445
|
-
constructor(client, logger) {
|
|
1446
|
-
super(client, logger);
|
|
1447
|
-
}
|
|
1448
|
-
/**
|
|
1449
|
-
* Fetches the total rewards balance for a given reward account.
|
|
1450
|
-
*
|
|
1451
|
-
* @param rewardAccount - CardanoRewardAccount to fetch the balance for
|
|
1452
|
-
* @param epochs - Optional range of epochs to filter the rewards
|
|
1453
|
-
* @returns Observable with Result containing the rewards or an error
|
|
1454
|
-
*/
|
|
1455
|
-
getAccountRewards({ rewardAccount }) {
|
|
1456
|
-
return defer(async () => this.paginatedRequests({
|
|
1457
|
-
endpoint: `accounts/${rewardAccount}/rewards?order=desc`,
|
|
1458
|
-
pageSize: 100
|
|
1459
|
-
})).pipe(map((rewards) => Ok(rewards.map((reward) => ({
|
|
1460
|
-
epoch: EpochNo(reward.epoch),
|
|
1461
|
-
rewards: BigNumber(BigInt(reward.amount)),
|
|
1462
|
-
poolId: PoolId(reward.pool_id)
|
|
1463
|
-
})))), catchError((error) => {
|
|
1464
|
-
if (isNotFoundError(error)) return of(Ok([]));
|
|
1465
|
-
return of(Err(error));
|
|
1466
|
-
}));
|
|
1467
|
-
}
|
|
1468
|
-
/**
|
|
1469
|
-
* Fetches stake account information for a given reward account.
|
|
1470
|
-
*
|
|
1471
|
-
* @param rewardAccount - CardanoRewardAccount to fetch info for
|
|
1472
|
-
* @returns Observable with Result containing RewardAccountInfo or an error
|
|
1473
|
-
*/
|
|
1474
|
-
getRewardAccountInfo({ rewardAccount }) {
|
|
1475
|
-
return from(this.request(`accounts/${rewardAccount}`).then((account) => Ok({
|
|
1476
|
-
isActive: account.active,
|
|
1477
|
-
isRegistered: account.registered ?? account.active,
|
|
1478
|
-
...account.pool_id && { poolId: PoolId(account.pool_id) },
|
|
1479
|
-
...account.drep_id && { drepId: account.drep_id },
|
|
1480
|
-
rewardsSum: BigNumber(BigInt(account.rewards_sum)),
|
|
1481
|
-
withdrawableAmount: BigNumber(BigInt(account.withdrawable_amount)),
|
|
1482
|
-
controlledAmount: BigNumber(BigInt(account.controlled_amount))
|
|
1483
|
-
})).catch((error) => {
|
|
1484
|
-
if (isNotFoundError(error)) return Ok(NEVER_ACTIVE_REWARD_ACCOUNT_INFO);
|
|
1485
|
-
return Err(error);
|
|
1486
|
-
}));
|
|
1487
|
-
}
|
|
1488
|
-
};
|
|
1489
|
-
//#endregion
|
|
1490
|
-
//#region ../../packages/lib/cardano-provider-core/src/provider/blockfrost-delegations-provider.ts
|
|
1491
|
-
var BlockfrostDelegationsProvider = class extends BlockfrostProvider {
|
|
1492
|
-
constructor(client, logger) {
|
|
1493
|
-
super(client, logger);
|
|
1494
|
-
}
|
|
1495
|
-
/**
|
|
1496
|
-
* Fetches all delegation history for a given reward account.
|
|
1497
|
-
*
|
|
1498
|
-
* @param rewardAccount - CardanoRewardAccount to fetch the delegations for
|
|
1499
|
-
* @returns Observable with Result containing all delegations or an error
|
|
1500
|
-
*/
|
|
1501
|
-
getAccountDelegations({ rewardAccount }) {
|
|
1502
|
-
return from(this.paginatedRequests({
|
|
1503
|
-
endpoint: `accounts/${rewardAccount}/delegations?order=desc`,
|
|
1504
|
-
pageSize: 100
|
|
1505
|
-
})).pipe(map((delegations) => Ok(delegations.map((delegation) => ({
|
|
1506
|
-
activeEpoch: EpochNo(delegation.active_epoch),
|
|
1507
|
-
txHash: TransactionId(delegation.tx_hash),
|
|
1508
|
-
amount: BigNumber(BigInt(delegation.amount)),
|
|
1509
|
-
poolId: PoolId(delegation.pool_id)
|
|
1510
|
-
})))), catchError((error) => of(Err(error))));
|
|
1511
|
-
}
|
|
1512
|
-
};
|
|
1513
|
-
//#endregion
|
|
1514
|
-
//#region ../../packages/lib/cardano-provider-core/src/provider/blockfrost-governance-provider.ts
|
|
1515
|
-
const PAGE_SIZE = 100;
|
|
1516
|
-
const jsonLdString = (value) => {
|
|
1517
|
-
if (typeof value === "string") return value;
|
|
1518
|
-
if (typeof value === "object" && value !== null && "@value" in value) {
|
|
1519
|
-
const inner = value["@value"];
|
|
1520
|
-
return typeof inner === "string" ? inner : void 0;
|
|
1521
|
-
}
|
|
1522
|
-
};
|
|
1523
|
-
const getMetadataBody = (jsonMetadata) => {
|
|
1524
|
-
if (typeof jsonMetadata !== "object" || jsonMetadata === null) return void 0;
|
|
1525
|
-
const body = jsonMetadata.body;
|
|
1526
|
-
if (typeof body !== "object" || body === null) return void 0;
|
|
1527
|
-
return body;
|
|
1528
|
-
};
|
|
1529
|
-
const extractReferences = (references) => {
|
|
1530
|
-
if (!Array.isArray(references)) return void 0;
|
|
1531
|
-
const parsed = references.flatMap((reference) => {
|
|
1532
|
-
if (typeof reference !== "object" || reference === null) return [];
|
|
1533
|
-
const { uri, label } = reference;
|
|
1534
|
-
const uriValue = jsonLdString(uri);
|
|
1535
|
-
if (uriValue === void 0) return [];
|
|
1536
|
-
const labelValue = jsonLdString(label);
|
|
1537
|
-
return [{
|
|
1538
|
-
uri: uriValue,
|
|
1539
|
-
...labelValue !== void 0 && { label: labelValue }
|
|
1540
|
-
}];
|
|
1541
|
-
});
|
|
1542
|
-
return parsed.length > 0 ? parsed : void 0;
|
|
1543
|
-
};
|
|
1544
|
-
const extractMetadata = (envelope, body) => {
|
|
1545
|
-
const metadata = {};
|
|
1546
|
-
if (typeof envelope?.url === "string") metadata.metadataUrl = envelope.url;
|
|
1547
|
-
if (typeof envelope?.hash === "string") metadata.metadataHash = envelope.hash;
|
|
1548
|
-
const assign = (key, value) => {
|
|
1549
|
-
const parsed = jsonLdString(value);
|
|
1550
|
-
if (parsed !== void 0) metadata[key] = parsed;
|
|
1551
|
-
};
|
|
1552
|
-
if (body) {
|
|
1553
|
-
assign("imageUrl", (typeof body.image === "object" && body.image !== null ? body.image : void 0)?.contentUrl);
|
|
1554
|
-
assign("bio", body.bio);
|
|
1555
|
-
assign("email", body.email);
|
|
1556
|
-
assign("objectives", body.objectives);
|
|
1557
|
-
assign("motivations", body.motivations);
|
|
1558
|
-
assign("qualifications", body.qualifications);
|
|
1559
|
-
assign("paymentAddress", body.paymentAddress);
|
|
1560
|
-
const references = extractReferences(body.references);
|
|
1561
|
-
if (references) metadata.references = references;
|
|
1562
|
-
}
|
|
1563
|
-
return Object.keys(metadata).length > 0 ? metadata : void 0;
|
|
1564
|
-
};
|
|
1565
|
-
const toDRepSummary = (item) => {
|
|
1566
|
-
const credential = {
|
|
1567
|
-
hash: Hash28ByteBase16(item.hex.length === 58 ? item.hex.slice(2) : item.hex),
|
|
1568
|
-
type: item.has_script ? CredentialType.ScriptHash : CredentialType.KeyHash
|
|
1569
|
-
};
|
|
1570
|
-
const body = getMetadataBody(item.metadata?.json_metadata);
|
|
1571
|
-
return {
|
|
1572
|
-
drepId: DRepID(item.drep_id),
|
|
1573
|
-
cip105DrepId: DRepID.cip105FromCredential(credential),
|
|
1574
|
-
hex: item.hex,
|
|
1575
|
-
isActive: !item.retired && !item.expired,
|
|
1576
|
-
retired: item.retired,
|
|
1577
|
-
expired: item.expired,
|
|
1578
|
-
amount: item.amount,
|
|
1579
|
-
hasScript: item.has_script,
|
|
1580
|
-
name: jsonLdString(body?.givenName),
|
|
1581
|
-
metadata: extractMetadata(item.metadata, body)
|
|
1582
|
-
};
|
|
1583
|
-
};
|
|
1584
|
-
var BlockfrostGovernanceProvider = class extends BlockfrostProvider {
|
|
1585
|
-
constructor(client, logger) {
|
|
1586
|
-
super(client, logger);
|
|
1587
|
-
}
|
|
1588
|
-
getDReps() {
|
|
1589
|
-
const fetchPage = (page) => from(this.request(`governance/dreps?page=${page}&count=${PAGE_SIZE}`));
|
|
1590
|
-
return fetchPage(1).pipe(expand((items, index) => items.length === PAGE_SIZE ? fetchPage(index + 2) : EMPTY), reduce((accumulated, items) => [...accumulated, ...items], []), map((all) => Ok(all.filter((d) => d.drep_id.startsWith("drep1")).map((item) => toDRepSummary(item)))), catchError((error) => of(Err(error))));
|
|
1591
|
-
}
|
|
1592
|
-
};
|
|
1593
|
-
//#endregion
|
|
1594
|
-
//#region ../../packages/lib/cardano-provider-core/src/provider/blockfrost-registrations-provider.ts
|
|
1595
|
-
var BlockfrostRegistrationsProvider = class extends BlockfrostProvider {
|
|
1596
|
-
constructor(client, logger) {
|
|
1597
|
-
super(client, logger);
|
|
1598
|
-
}
|
|
1599
|
-
/**
|
|
1600
|
-
* Fetches all registration history for a given reward account.
|
|
1601
|
-
*
|
|
1602
|
-
* @param rewardAccount - CardanoRewardAccount to fetch the registrations for
|
|
1603
|
-
* @returns Observable with Result containing all registrations or an error
|
|
1604
|
-
*/
|
|
1605
|
-
getAccountRegistrations({ rewardAccount }) {
|
|
1606
|
-
return from(this.paginatedRequests({
|
|
1607
|
-
endpoint: `accounts/${rewardAccount}/registrations?order=desc`,
|
|
1608
|
-
pageSize: 100
|
|
1609
|
-
})).pipe(map((registrations) => Ok(registrations.map((registration) => ({
|
|
1610
|
-
txHash: TransactionId(registration.tx_hash),
|
|
1611
|
-
action: registration.action
|
|
1612
|
-
})))), catchError((error) => of(Err(error))));
|
|
1613
|
-
}
|
|
1614
|
-
};
|
|
1615
|
-
//#endregion
|
|
1616
|
-
//#region ../../packages/lib/cardano-provider-core/src/provider/blockfrost-withdrawals-provider.ts
|
|
1617
|
-
var BlockfrostWithdrawalsProvider = class extends BlockfrostProvider {
|
|
1618
|
-
constructor(client, logger) {
|
|
1619
|
-
super(client, logger);
|
|
1620
|
-
}
|
|
1621
|
-
/**
|
|
1622
|
-
* Fetches all withdrawal history for a given reward account.
|
|
1623
|
-
*
|
|
1624
|
-
* @param rewardAccount - CardanoRewardAccount to fetch the withdrawals for
|
|
1625
|
-
* @returns Observable with Result containing all withdrawals or an error
|
|
1626
|
-
*/
|
|
1627
|
-
getAccountWithdrawals({ rewardAccount }) {
|
|
1628
|
-
return from(this.paginatedRequests({
|
|
1629
|
-
endpoint: `accounts/${rewardAccount}/withdrawals?order=desc`,
|
|
1630
|
-
pageSize: 100
|
|
1631
|
-
})).pipe(map((withdrawals) => Ok(withdrawals.map((withdrawal) => ({
|
|
1632
|
-
txHash: TransactionId(withdrawal.tx_hash),
|
|
1633
|
-
amount: BigNumber(BigInt(withdrawal.amount))
|
|
1634
|
-
})))), catchError((error) => of(Err(error))));
|
|
1635
|
-
}
|
|
1636
|
-
};
|
|
1637
|
-
//#endregion
|
|
1638
|
-
//#region ../../packages/lib/cardano-provider-core/src/provider/blockfrost-tx-evaluation-provider.ts
|
|
1639
|
-
const REDEEMER_PURPOSE_BY_NAME = {
|
|
1640
|
-
spend: RedeemerPurpose.spend,
|
|
1641
|
-
mint: RedeemerPurpose.mint,
|
|
1642
|
-
certificate: RedeemerPurpose.certificate,
|
|
1643
|
-
publish: RedeemerPurpose.certificate,
|
|
1644
|
-
withdrawal: RedeemerPurpose.withdrawal,
|
|
1645
|
-
withdraw: RedeemerPurpose.withdrawal,
|
|
1646
|
-
vote: RedeemerPurpose.vote,
|
|
1647
|
-
propose: RedeemerPurpose.propose
|
|
1648
|
-
};
|
|
1649
|
-
const toExUnits = (budget) => {
|
|
1650
|
-
if (typeof budget !== "object" || budget === null) return void 0;
|
|
1651
|
-
const { memory, steps, cpu } = budget;
|
|
1652
|
-
const stepsValue = typeof steps === "number" ? steps : typeof cpu === "number" ? cpu : void 0;
|
|
1653
|
-
if (typeof memory !== "number" || stepsValue === void 0) return void 0;
|
|
1654
|
-
return {
|
|
1655
|
-
memory,
|
|
1656
|
-
steps: stepsValue
|
|
1657
|
-
};
|
|
1658
|
-
};
|
|
1659
|
-
/** `"<purpose>:<index>"` (v5) or a `{ purpose, index }` object (v6). */
|
|
1660
|
-
const toRedeemerRef = (validator) => {
|
|
1661
|
-
const { name, index } = typeof validator === "string" ? {
|
|
1662
|
-
name: validator.split(":")[0],
|
|
1663
|
-
index: Number(validator.split(":")[1] ?? "0")
|
|
1664
|
-
} : {
|
|
1665
|
-
name: validator?.purpose,
|
|
1666
|
-
index: validator?.index ?? 0
|
|
1667
|
-
};
|
|
1668
|
-
const purpose = REDEEMER_PURPOSE_BY_NAME[name?.toLowerCase() ?? ""];
|
|
1669
|
-
if (!purpose || !Number.isInteger(index)) return void 0;
|
|
1670
|
-
return {
|
|
1671
|
-
purpose,
|
|
1672
|
-
index
|
|
1673
|
-
};
|
|
1674
|
-
};
|
|
1675
|
-
const fromEvaluationResult = (evaluationResult) => Object.entries(evaluationResult).flatMap(([key, value]) => {
|
|
1676
|
-
const ref = toRedeemerRef(key);
|
|
1677
|
-
const budget = toExUnits(value);
|
|
1678
|
-
return ref && budget ? [{
|
|
1679
|
-
...ref,
|
|
1680
|
-
budget
|
|
1681
|
-
}] : [];
|
|
1682
|
-
});
|
|
1683
|
-
const fromEvaluationEntries = (entries) => entries.flatMap((entry) => {
|
|
1684
|
-
const ref = toRedeemerRef(entry.validator);
|
|
1685
|
-
const budget = toExUnits(entry.budget ?? entry.ex_units);
|
|
1686
|
-
return ref && budget ? [{
|
|
1687
|
-
...ref,
|
|
1688
|
-
budget
|
|
1689
|
-
}] : [];
|
|
1690
|
-
});
|
|
1691
|
-
/**
|
|
1692
|
-
* An empty list only for a collection that was itself empty. A NON-EMPTY
|
|
1693
|
-
* collection none of whose entries parsed is a dialect this parser does not
|
|
1694
|
-
* know, not a transaction without redeemers — reporting it as `[]` would spend
|
|
1695
|
-
* the contract's "no redeemers" answer on the drift this dual parser exists to
|
|
1696
|
-
* surface.
|
|
1697
|
-
*/
|
|
1698
|
-
const parsedOrUnrecognised = (sourceCount, parsed) => sourceCount > 0 && parsed.length === 0 ? void 0 : parsed;
|
|
1699
|
-
/**
|
|
1700
|
-
* Both dialects, unwrapped from the optional `result` envelope. `undefined`
|
|
1701
|
-
* distinguishes "this is not an evaluation" (a fault, an `EvaluationFailure`,
|
|
1702
|
-
* an unknown shape, a known envelope carrying only unreadable entries) from a
|
|
1703
|
-
* transaction that carries no redeemers, which legitimately evaluates to an
|
|
1704
|
-
* empty list.
|
|
1705
|
-
*/
|
|
1706
|
-
const parseEvaluation = (data) => {
|
|
1707
|
-
const body = typeof data === "object" && data !== null && "result" in data ? data.result : data;
|
|
1708
|
-
if (Array.isArray(body)) {
|
|
1709
|
-
const entries = body;
|
|
1710
|
-
return parsedOrUnrecognised(entries.length, fromEvaluationEntries(entries));
|
|
1711
|
-
}
|
|
1712
|
-
if (typeof body === "object" && body !== null) {
|
|
1713
|
-
const { EvaluationResult: evaluationResult } = body;
|
|
1714
|
-
if (typeof evaluationResult === "object" && evaluationResult !== null) {
|
|
1715
|
-
const result = evaluationResult;
|
|
1716
|
-
return parsedOrUnrecognised(Object.keys(result).length, fromEvaluationResult(result));
|
|
1717
|
-
}
|
|
1718
|
-
}
|
|
1719
|
-
};
|
|
1720
|
-
/** Truncated so a multi-kilobyte script trace cannot flood the log or the error. */
|
|
1721
|
-
const describeUnusableResponse = (data) => {
|
|
1722
|
-
try {
|
|
1723
|
-
return JSON.stringify(data)?.slice(0, 500) ?? "undefined";
|
|
1724
|
-
} catch {
|
|
1725
|
-
return String(data);
|
|
1726
|
-
}
|
|
1727
|
-
};
|
|
1728
|
-
var BlockfrostTxEvaluationProvider = class extends BlockfrostProvider {
|
|
1729
|
-
constructor(client, logger) {
|
|
1730
|
-
super(client, logger);
|
|
1731
|
-
}
|
|
1732
|
-
/**
|
|
1733
|
-
* Evaluate a transaction's per-redeemer execution units.
|
|
1734
|
-
*
|
|
1735
|
-
* @param tx - transaction CBOR (unsigned is fine)
|
|
1736
|
-
* @returns Observable with the per-redeemer budgets, or an error when the
|
|
1737
|
-
* network declined to evaluate (script failure, provider fault, HTTP error).
|
|
1738
|
-
*/
|
|
1739
|
-
evaluateTx({ tx }) {
|
|
1740
|
-
return from(this.request("utils/txs/evaluate", {
|
|
1741
|
-
body: tx,
|
|
1742
|
-
headers: { "Content-Type": "application/cbor" },
|
|
1743
|
-
method: "POST"
|
|
1744
|
-
}).then((data) => {
|
|
1745
|
-
const evaluated = parseEvaluation(data);
|
|
1746
|
-
if (evaluated) return Ok(evaluated);
|
|
1747
|
-
const detail = describeUnusableResponse(data);
|
|
1748
|
-
this.logger.warn("evaluateTx: no evaluation in response", detail);
|
|
1749
|
-
return Err(new ProviderError(ProviderFailure.InvalidResponse, void 0, detail));
|
|
1750
|
-
}).catch((error) => Err(error)));
|
|
1751
|
-
}
|
|
1752
|
-
};
|
|
1753
|
-
//#endregion
|
|
1754
|
-
//#region ../../packages/lib/cardano-provider-core/src/util.ts
|
|
1755
|
-
const serializeMetadatum = ((value, stringifyComposite = false) => {
|
|
1756
|
-
if (typeof value === "string") return value;
|
|
1757
|
-
if (typeof value === "bigint") return value.toString();
|
|
1758
|
-
if (Array.isArray(value)) {
|
|
1759
|
-
const serializedItems = value.map((item) => serializeMetadatum(item));
|
|
1760
|
-
return stringifyComposite ? JSON.stringify(serializedItems) : serializedItems;
|
|
1761
|
-
}
|
|
1762
|
-
if (value instanceof Map) {
|
|
1763
|
-
const serializedEntries = Object.fromEntries([...value.entries()].map(([key, nestedValue]) => [metadatumKeyToString(key), serializeMetadatum(nestedValue)]));
|
|
1764
|
-
return stringifyComposite ? JSON.stringify(serializedEntries) : serializedEntries;
|
|
1765
|
-
}
|
|
1766
|
-
if (value instanceof Uint8Array) try {
|
|
1767
|
-
return new TextDecoder("utf-8", { fatal: true }).decode(value);
|
|
1768
|
-
} catch {
|
|
1769
|
-
return `[Invalid UTF-8: ${value.length} bytes]`;
|
|
1770
|
-
}
|
|
1771
|
-
return String(value);
|
|
1772
|
-
});
|
|
1773
|
-
const metadatumKeyToString = (value) => serializeMetadatum(value, true);
|
|
1774
|
-
const metadatumToSerializableValue = (value) => serializeMetadatum(value);
|
|
1775
|
-
const mapToRecord = (map) => [...map?.entries() || []].map(([key, value]) => [key, metadatumToSerializableValue(value)]).reduce((result, [key, value]) => {
|
|
1776
|
-
result[key] = value;
|
|
1777
|
-
return result;
|
|
1778
|
-
}, {});
|
|
1779
|
-
const mergeDefinedProperties = (properties) => {
|
|
1780
|
-
const definedProperties = properties.filter((property) => property[1] !== void 0);
|
|
1781
|
-
if (definedProperties.length === 0) return;
|
|
1782
|
-
return Object.fromEntries(definedProperties);
|
|
1783
|
-
};
|
|
1784
|
-
const toContractTokenMetadata = (assetInfo) => ({
|
|
1785
|
-
blockchainSpecific: {
|
|
1786
|
-
metadataSchemaVersion: 1,
|
|
1787
|
-
updatedAt: Timestamp.now(),
|
|
1788
|
-
policyId: assetInfo.policyId.toString(),
|
|
1789
|
-
files: assetInfo.nftMetadata?.files?.map((file) => ({
|
|
1790
|
-
mediaType: file.mediaType,
|
|
1791
|
-
src: file.src,
|
|
1792
|
-
name: file.name,
|
|
1793
|
-
additionalProperties: mapToRecord(file.otherProperties)
|
|
1794
|
-
}))
|
|
1795
|
-
},
|
|
1796
|
-
decimals: assetInfo.tokenMetadata?.decimals || 0,
|
|
1797
|
-
additionalProperties: mergeDefinedProperties([["description", assetInfo.nftMetadata?.description], ...Object.entries(mapToRecord(assetInfo.nftMetadata?.otherProperties) ?? {})]),
|
|
1798
|
-
image: assetInfo.nftMetadata?.image || assetInfo.tokenMetadata?.icon,
|
|
1799
|
-
isNft: assetInfo.supply === 1n,
|
|
1800
|
-
name: assetInfo.nftMetadata?.name || assetInfo.tokenMetadata?.name || assetInfo.fingerprint,
|
|
1801
|
-
ticker: assetInfo.tokenMetadata?.ticker
|
|
1802
|
-
});
|
|
1803
|
-
/** Base lovelace metadata; ticker and image are set per-network in Blockfrost dependencies. */
|
|
1804
|
-
const LOVELACE_METADATA = {
|
|
1805
|
-
decimals: 6,
|
|
1806
|
-
name: "Cardano",
|
|
1807
|
-
ticker: "ADA",
|
|
1808
|
-
blockchainSpecific: {
|
|
1809
|
-
metadataSchemaVersion: 1,
|
|
1810
|
-
updatedAt: Timestamp.now()
|
|
1811
|
-
}
|
|
1812
|
-
};
|
|
1813
|
-
//#endregion
|
|
1814
|
-
//#region ../../node_modules/bottleneck/lib/parser.js
|
|
1815
|
-
var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1816
|
-
exports.load = function(received, defaults, onto = {}) {
|
|
1817
|
-
var k, ref, v;
|
|
1818
|
-
for (k in defaults) {
|
|
1819
|
-
v = defaults[k];
|
|
1820
|
-
onto[k] = (ref = received[k]) != null ? ref : v;
|
|
1821
|
-
}
|
|
1822
|
-
return onto;
|
|
1823
|
-
};
|
|
1824
|
-
exports.overwrite = function(received, defaults, onto = {}) {
|
|
1825
|
-
var k, v;
|
|
1826
|
-
for (k in received) {
|
|
1827
|
-
v = received[k];
|
|
1828
|
-
if (defaults[k] !== void 0) onto[k] = v;
|
|
1829
|
-
}
|
|
1830
|
-
return onto;
|
|
1831
|
-
};
|
|
1832
|
-
}));
|
|
1833
|
-
//#endregion
|
|
1834
|
-
//#region ../../node_modules/bottleneck/lib/DLList.js
|
|
1835
|
-
var require_DLList = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1836
|
-
module.exports = class DLList {
|
|
1837
|
-
constructor(incr, decr) {
|
|
1838
|
-
this.incr = incr;
|
|
1839
|
-
this.decr = decr;
|
|
1840
|
-
this._first = null;
|
|
1841
|
-
this._last = null;
|
|
1842
|
-
this.length = 0;
|
|
1843
|
-
}
|
|
1844
|
-
push(value) {
|
|
1845
|
-
var node;
|
|
1846
|
-
this.length++;
|
|
1847
|
-
if (typeof this.incr === "function") this.incr();
|
|
1848
|
-
node = {
|
|
1849
|
-
value,
|
|
1850
|
-
prev: this._last,
|
|
1851
|
-
next: null
|
|
1852
|
-
};
|
|
1853
|
-
if (this._last != null) {
|
|
1854
|
-
this._last.next = node;
|
|
1855
|
-
this._last = node;
|
|
1856
|
-
} else this._first = this._last = node;
|
|
1857
|
-
}
|
|
1858
|
-
shift() {
|
|
1859
|
-
var value;
|
|
1860
|
-
if (this._first == null) return;
|
|
1861
|
-
else {
|
|
1862
|
-
this.length--;
|
|
1863
|
-
if (typeof this.decr === "function") this.decr();
|
|
1864
|
-
}
|
|
1865
|
-
value = this._first.value;
|
|
1866
|
-
if ((this._first = this._first.next) != null) this._first.prev = null;
|
|
1867
|
-
else this._last = null;
|
|
1868
|
-
return value;
|
|
1869
|
-
}
|
|
1870
|
-
first() {
|
|
1871
|
-
if (this._first != null) return this._first.value;
|
|
1872
|
-
}
|
|
1873
|
-
getArray() {
|
|
1874
|
-
var node = this._first, ref, results = [];
|
|
1875
|
-
while (node != null) results.push((ref = node, node = node.next, ref.value));
|
|
1876
|
-
return results;
|
|
1877
|
-
}
|
|
1878
|
-
forEachShift(cb) {
|
|
1879
|
-
var node = this.shift();
|
|
1880
|
-
while (node != null) cb(node), node = this.shift();
|
|
1881
|
-
}
|
|
1882
|
-
debug() {
|
|
1883
|
-
var node = this._first, ref, ref1, ref2, results = [];
|
|
1884
|
-
while (node != null) results.push((ref = node, node = node.next, {
|
|
1885
|
-
value: ref.value,
|
|
1886
|
-
prev: (ref1 = ref.prev) != null ? ref1.value : void 0,
|
|
1887
|
-
next: (ref2 = ref.next) != null ? ref2.value : void 0
|
|
1888
|
-
}));
|
|
1889
|
-
return results;
|
|
1890
|
-
}
|
|
1891
|
-
};
|
|
1892
|
-
}));
|
|
1893
|
-
//#endregion
|
|
1894
|
-
//#region ../../node_modules/bottleneck/lib/Events.js
|
|
1895
|
-
var require_Events = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1896
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
1897
|
-
try {
|
|
1898
|
-
var info = gen[key](arg);
|
|
1899
|
-
var value = info.value;
|
|
1900
|
-
} catch (error) {
|
|
1901
|
-
reject(error);
|
|
1902
|
-
return;
|
|
1903
|
-
}
|
|
1904
|
-
if (info.done) resolve(value);
|
|
1905
|
-
else Promise.resolve(value).then(_next, _throw);
|
|
1906
|
-
}
|
|
1907
|
-
function _asyncToGenerator(fn) {
|
|
1908
|
-
return function() {
|
|
1909
|
-
var self = this, args = arguments;
|
|
1910
|
-
return new Promise(function(resolve, reject) {
|
|
1911
|
-
var gen = fn.apply(self, args);
|
|
1912
|
-
function _next(value) {
|
|
1913
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
1914
|
-
}
|
|
1915
|
-
function _throw(err) {
|
|
1916
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
1917
|
-
}
|
|
1918
|
-
_next(void 0);
|
|
1919
|
-
});
|
|
1920
|
-
};
|
|
1921
|
-
}
|
|
1922
|
-
module.exports = class Events {
|
|
1923
|
-
constructor(instance) {
|
|
1924
|
-
this.instance = instance;
|
|
1925
|
-
this._events = {};
|
|
1926
|
-
if (this.instance.on != null || this.instance.once != null || this.instance.removeAllListeners != null) throw new Error("An Emitter already exists for this object");
|
|
1927
|
-
this.instance.on = (name, cb) => {
|
|
1928
|
-
return this._addListener(name, "many", cb);
|
|
1929
|
-
};
|
|
1930
|
-
this.instance.once = (name, cb) => {
|
|
1931
|
-
return this._addListener(name, "once", cb);
|
|
1932
|
-
};
|
|
1933
|
-
this.instance.removeAllListeners = (name = null) => {
|
|
1934
|
-
if (name != null) return delete this._events[name];
|
|
1935
|
-
else return this._events = {};
|
|
1936
|
-
};
|
|
1937
|
-
}
|
|
1938
|
-
_addListener(name, status, cb) {
|
|
1939
|
-
var base;
|
|
1940
|
-
if ((base = this._events)[name] == null) base[name] = [];
|
|
1941
|
-
this._events[name].push({
|
|
1942
|
-
cb,
|
|
1943
|
-
status
|
|
1944
|
-
});
|
|
1945
|
-
return this.instance;
|
|
1946
|
-
}
|
|
1947
|
-
listenerCount(name) {
|
|
1948
|
-
if (this._events[name] != null) return this._events[name].length;
|
|
1949
|
-
else return 0;
|
|
1950
|
-
}
|
|
1951
|
-
trigger(name, ...args) {
|
|
1952
|
-
var _this = this;
|
|
1953
|
-
return _asyncToGenerator(function* () {
|
|
1954
|
-
var e, promises;
|
|
1955
|
-
try {
|
|
1956
|
-
if (name !== "debug") _this.trigger("debug", `Event triggered: ${name}`, args);
|
|
1957
|
-
if (_this._events[name] == null) return;
|
|
1958
|
-
_this._events[name] = _this._events[name].filter(function(listener) {
|
|
1959
|
-
return listener.status !== "none";
|
|
1960
|
-
});
|
|
1961
|
-
promises = _this._events[name].map(/* @__PURE__ */ function() {
|
|
1962
|
-
var _ref = _asyncToGenerator(function* (listener) {
|
|
1963
|
-
var e, returned;
|
|
1964
|
-
if (listener.status === "none") return;
|
|
1965
|
-
if (listener.status === "once") listener.status = "none";
|
|
1966
|
-
try {
|
|
1967
|
-
returned = typeof listener.cb === "function" ? listener.cb(...args) : void 0;
|
|
1968
|
-
if (typeof (returned != null ? returned.then : void 0) === "function") return yield returned;
|
|
1969
|
-
else return returned;
|
|
1970
|
-
} catch (error) {
|
|
1971
|
-
e = error;
|
|
1972
|
-
_this.trigger("error", e);
|
|
1973
|
-
return null;
|
|
1974
|
-
}
|
|
1975
|
-
});
|
|
1976
|
-
return function(_x) {
|
|
1977
|
-
return _ref.apply(this, arguments);
|
|
1978
|
-
};
|
|
1979
|
-
}());
|
|
1980
|
-
return (yield Promise.all(promises)).find(function(x) {
|
|
1981
|
-
return x != null;
|
|
1982
|
-
});
|
|
1983
|
-
} catch (error) {
|
|
1984
|
-
e = error;
|
|
1985
|
-
_this.trigger("error", e);
|
|
1986
|
-
return null;
|
|
1987
|
-
}
|
|
1988
|
-
})();
|
|
1989
|
-
}
|
|
1990
|
-
};
|
|
1991
|
-
}));
|
|
1992
|
-
//#endregion
|
|
1993
|
-
//#region ../../node_modules/bottleneck/lib/Queues.js
|
|
1994
|
-
var require_Queues = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1995
|
-
var DLList = require_DLList(), Events = require_Events();
|
|
1996
|
-
module.exports = class Queues {
|
|
1997
|
-
constructor(num_priorities) {
|
|
1998
|
-
this.Events = new Events(this);
|
|
1999
|
-
this._length = 0;
|
|
2000
|
-
this._lists = function() {
|
|
2001
|
-
var j, ref, results = [];
|
|
2002
|
-
for (j = 1, ref = num_priorities; 1 <= ref ? j <= ref : j >= ref; 1 <= ref ? ++j : --j) results.push(new DLList(() => {
|
|
2003
|
-
return this.incr();
|
|
2004
|
-
}, () => {
|
|
2005
|
-
return this.decr();
|
|
2006
|
-
}));
|
|
2007
|
-
return results;
|
|
2008
|
-
}.call(this);
|
|
2009
|
-
}
|
|
2010
|
-
incr() {
|
|
2011
|
-
if (this._length++ === 0) return this.Events.trigger("leftzero");
|
|
2012
|
-
}
|
|
2013
|
-
decr() {
|
|
2014
|
-
if (--this._length === 0) return this.Events.trigger("zero");
|
|
2015
|
-
}
|
|
2016
|
-
push(job) {
|
|
2017
|
-
return this._lists[job.options.priority].push(job);
|
|
2018
|
-
}
|
|
2019
|
-
queued(priority) {
|
|
2020
|
-
if (priority != null) return this._lists[priority].length;
|
|
2021
|
-
else return this._length;
|
|
2022
|
-
}
|
|
2023
|
-
shiftAll(fn) {
|
|
2024
|
-
return this._lists.forEach(function(list) {
|
|
2025
|
-
return list.forEachShift(fn);
|
|
2026
|
-
});
|
|
2027
|
-
}
|
|
2028
|
-
getFirst(arr = this._lists) {
|
|
2029
|
-
var j, len, list;
|
|
2030
|
-
for (j = 0, len = arr.length; j < len; j++) {
|
|
2031
|
-
list = arr[j];
|
|
2032
|
-
if (list.length > 0) return list;
|
|
2033
|
-
}
|
|
2034
|
-
return [];
|
|
2035
|
-
}
|
|
2036
|
-
shiftLastFrom(priority) {
|
|
2037
|
-
return this.getFirst(this._lists.slice(priority).reverse()).shift();
|
|
2038
|
-
}
|
|
2039
|
-
};
|
|
2040
|
-
}));
|
|
2041
|
-
//#endregion
|
|
2042
|
-
//#region ../../node_modules/bottleneck/lib/BottleneckError.js
|
|
2043
|
-
var require_BottleneckError = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2044
|
-
module.exports = class BottleneckError extends Error {};
|
|
2045
|
-
}));
|
|
2046
|
-
//#endregion
|
|
2047
|
-
//#region ../../node_modules/bottleneck/lib/Job.js
|
|
2048
|
-
var require_Job = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2049
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
2050
|
-
try {
|
|
2051
|
-
var info = gen[key](arg);
|
|
2052
|
-
var value = info.value;
|
|
2053
|
-
} catch (error) {
|
|
2054
|
-
reject(error);
|
|
2055
|
-
return;
|
|
2056
|
-
}
|
|
2057
|
-
if (info.done) resolve(value);
|
|
2058
|
-
else Promise.resolve(value).then(_next, _throw);
|
|
2059
|
-
}
|
|
2060
|
-
function _asyncToGenerator(fn) {
|
|
2061
|
-
return function() {
|
|
2062
|
-
var self = this, args = arguments;
|
|
2063
|
-
return new Promise(function(resolve, reject) {
|
|
2064
|
-
var gen = fn.apply(self, args);
|
|
2065
|
-
function _next(value) {
|
|
2066
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
2067
|
-
}
|
|
2068
|
-
function _throw(err) {
|
|
2069
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
2070
|
-
}
|
|
2071
|
-
_next(void 0);
|
|
2072
|
-
});
|
|
2073
|
-
};
|
|
2074
|
-
}
|
|
2075
|
-
var BottleneckError, DEFAULT_PRIORITY, Job, NUM_PRIORITIES = 10, parser;
|
|
2076
|
-
DEFAULT_PRIORITY = 5;
|
|
2077
|
-
parser = require_parser();
|
|
2078
|
-
BottleneckError = require_BottleneckError();
|
|
2079
|
-
Job = class Job {
|
|
2080
|
-
constructor(task, args, options, jobDefaults, rejectOnDrop, Events, _states, Promise) {
|
|
2081
|
-
this.task = task;
|
|
2082
|
-
this.args = args;
|
|
2083
|
-
this.rejectOnDrop = rejectOnDrop;
|
|
2084
|
-
this.Events = Events;
|
|
2085
|
-
this._states = _states;
|
|
2086
|
-
this.Promise = Promise;
|
|
2087
|
-
this.options = parser.load(options, jobDefaults);
|
|
2088
|
-
this.options.priority = this._sanitizePriority(this.options.priority);
|
|
2089
|
-
if (this.options.id === jobDefaults.id) this.options.id = `${this.options.id}-${this._randomIndex()}`;
|
|
2090
|
-
this.promise = new this.Promise((_resolve, _reject) => {
|
|
2091
|
-
this._resolve = _resolve;
|
|
2092
|
-
this._reject = _reject;
|
|
2093
|
-
});
|
|
2094
|
-
this.retryCount = 0;
|
|
2095
|
-
}
|
|
2096
|
-
_sanitizePriority(priority) {
|
|
2097
|
-
var sProperty = ~~priority !== priority ? DEFAULT_PRIORITY : priority;
|
|
2098
|
-
if (sProperty < 0) return 0;
|
|
2099
|
-
else if (sProperty > NUM_PRIORITIES - 1) return NUM_PRIORITIES - 1;
|
|
2100
|
-
else return sProperty;
|
|
2101
|
-
}
|
|
2102
|
-
_randomIndex() {
|
|
2103
|
-
return Math.random().toString(36).slice(2);
|
|
2104
|
-
}
|
|
2105
|
-
doDrop({ error, message = "This job has been dropped by Bottleneck" } = {}) {
|
|
2106
|
-
if (this._states.remove(this.options.id)) {
|
|
2107
|
-
if (this.rejectOnDrop) this._reject(error != null ? error : new BottleneckError(message));
|
|
2108
|
-
this.Events.trigger("dropped", {
|
|
2109
|
-
args: this.args,
|
|
2110
|
-
options: this.options,
|
|
2111
|
-
task: this.task,
|
|
2112
|
-
promise: this.promise
|
|
2113
|
-
});
|
|
2114
|
-
return true;
|
|
2115
|
-
} else return false;
|
|
2116
|
-
}
|
|
2117
|
-
_assertStatus(expected) {
|
|
2118
|
-
var status = this._states.jobStatus(this.options.id);
|
|
2119
|
-
if (!(status === expected || expected === "DONE" && status === null)) throw new BottleneckError(`Invalid job status ${status}, expected ${expected}. Please open an issue at https://github.com/SGrondin/bottleneck/issues`);
|
|
2120
|
-
}
|
|
2121
|
-
doReceive() {
|
|
2122
|
-
this._states.start(this.options.id);
|
|
2123
|
-
return this.Events.trigger("received", {
|
|
2124
|
-
args: this.args,
|
|
2125
|
-
options: this.options
|
|
2126
|
-
});
|
|
2127
|
-
}
|
|
2128
|
-
doQueue(reachedHWM, blocked) {
|
|
2129
|
-
this._assertStatus("RECEIVED");
|
|
2130
|
-
this._states.next(this.options.id);
|
|
2131
|
-
return this.Events.trigger("queued", {
|
|
2132
|
-
args: this.args,
|
|
2133
|
-
options: this.options,
|
|
2134
|
-
reachedHWM,
|
|
2135
|
-
blocked
|
|
2136
|
-
});
|
|
2137
|
-
}
|
|
2138
|
-
doRun() {
|
|
2139
|
-
if (this.retryCount === 0) {
|
|
2140
|
-
this._assertStatus("QUEUED");
|
|
2141
|
-
this._states.next(this.options.id);
|
|
2142
|
-
} else this._assertStatus("EXECUTING");
|
|
2143
|
-
return this.Events.trigger("scheduled", {
|
|
2144
|
-
args: this.args,
|
|
2145
|
-
options: this.options
|
|
2146
|
-
});
|
|
2147
|
-
}
|
|
2148
|
-
doExecute(chained, clearGlobalState, run, free) {
|
|
2149
|
-
var _this = this;
|
|
2150
|
-
return _asyncToGenerator(function* () {
|
|
2151
|
-
var error, eventInfo, passed;
|
|
2152
|
-
if (_this.retryCount === 0) {
|
|
2153
|
-
_this._assertStatus("RUNNING");
|
|
2154
|
-
_this._states.next(_this.options.id);
|
|
2155
|
-
} else _this._assertStatus("EXECUTING");
|
|
2156
|
-
eventInfo = {
|
|
2157
|
-
args: _this.args,
|
|
2158
|
-
options: _this.options,
|
|
2159
|
-
retryCount: _this.retryCount
|
|
2160
|
-
};
|
|
2161
|
-
_this.Events.trigger("executing", eventInfo);
|
|
2162
|
-
try {
|
|
2163
|
-
passed = yield chained != null ? chained.schedule(_this.options, _this.task, ..._this.args) : _this.task(..._this.args);
|
|
2164
|
-
if (clearGlobalState()) {
|
|
2165
|
-
_this.doDone(eventInfo);
|
|
2166
|
-
yield free(_this.options, eventInfo);
|
|
2167
|
-
_this._assertStatus("DONE");
|
|
2168
|
-
return _this._resolve(passed);
|
|
2169
|
-
}
|
|
2170
|
-
} catch (error1) {
|
|
2171
|
-
error = error1;
|
|
2172
|
-
return _this._onFailure(error, eventInfo, clearGlobalState, run, free);
|
|
2173
|
-
}
|
|
2174
|
-
})();
|
|
2175
|
-
}
|
|
2176
|
-
doExpire(clearGlobalState, run, free) {
|
|
2177
|
-
var error, eventInfo;
|
|
2178
|
-
if (this._states.jobStatus(this.options.id === "RUNNING")) this._states.next(this.options.id);
|
|
2179
|
-
this._assertStatus("EXECUTING");
|
|
2180
|
-
eventInfo = {
|
|
2181
|
-
args: this.args,
|
|
2182
|
-
options: this.options,
|
|
2183
|
-
retryCount: this.retryCount
|
|
2184
|
-
};
|
|
2185
|
-
error = new BottleneckError(`This job timed out after ${this.options.expiration} ms.`);
|
|
2186
|
-
return this._onFailure(error, eventInfo, clearGlobalState, run, free);
|
|
2187
|
-
}
|
|
2188
|
-
_onFailure(error, eventInfo, clearGlobalState, run, free) {
|
|
2189
|
-
var _this2 = this;
|
|
2190
|
-
return _asyncToGenerator(function* () {
|
|
2191
|
-
var retry, retryAfter;
|
|
2192
|
-
if (clearGlobalState()) {
|
|
2193
|
-
retry = yield _this2.Events.trigger("failed", error, eventInfo);
|
|
2194
|
-
if (retry != null) {
|
|
2195
|
-
retryAfter = ~~retry;
|
|
2196
|
-
_this2.Events.trigger("retry", `Retrying ${_this2.options.id} after ${retryAfter} ms`, eventInfo);
|
|
2197
|
-
_this2.retryCount++;
|
|
2198
|
-
return run(retryAfter);
|
|
2199
|
-
} else {
|
|
2200
|
-
_this2.doDone(eventInfo);
|
|
2201
|
-
yield free(_this2.options, eventInfo);
|
|
2202
|
-
_this2._assertStatus("DONE");
|
|
2203
|
-
return _this2._reject(error);
|
|
2204
|
-
}
|
|
2205
|
-
}
|
|
2206
|
-
})();
|
|
2207
|
-
}
|
|
2208
|
-
doDone(eventInfo) {
|
|
2209
|
-
this._assertStatus("EXECUTING");
|
|
2210
|
-
this._states.next(this.options.id);
|
|
2211
|
-
return this.Events.trigger("done", eventInfo);
|
|
2212
|
-
}
|
|
2213
|
-
};
|
|
2214
|
-
module.exports = Job;
|
|
2215
|
-
}));
|
|
2216
|
-
//#endregion
|
|
2217
|
-
//#region ../../node_modules/bottleneck/lib/LocalDatastore.js
|
|
2218
|
-
var require_LocalDatastore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2219
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
2220
|
-
try {
|
|
2221
|
-
var info = gen[key](arg);
|
|
2222
|
-
var value = info.value;
|
|
2223
|
-
} catch (error) {
|
|
2224
|
-
reject(error);
|
|
2225
|
-
return;
|
|
2226
|
-
}
|
|
2227
|
-
if (info.done) resolve(value);
|
|
2228
|
-
else Promise.resolve(value).then(_next, _throw);
|
|
2229
|
-
}
|
|
2230
|
-
function _asyncToGenerator(fn) {
|
|
2231
|
-
return function() {
|
|
2232
|
-
var self = this, args = arguments;
|
|
2233
|
-
return new Promise(function(resolve, reject) {
|
|
2234
|
-
var gen = fn.apply(self, args);
|
|
2235
|
-
function _next(value) {
|
|
2236
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
2237
|
-
}
|
|
2238
|
-
function _throw(err) {
|
|
2239
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
2240
|
-
}
|
|
2241
|
-
_next(void 0);
|
|
2242
|
-
});
|
|
2243
|
-
};
|
|
2244
|
-
}
|
|
2245
|
-
var BottleneckError, LocalDatastore, parser = require_parser();
|
|
2246
|
-
BottleneckError = require_BottleneckError();
|
|
2247
|
-
LocalDatastore = class LocalDatastore {
|
|
2248
|
-
constructor(instance, storeOptions, storeInstanceOptions) {
|
|
2249
|
-
this.instance = instance;
|
|
2250
|
-
this.storeOptions = storeOptions;
|
|
2251
|
-
this.clientId = this.instance._randomIndex();
|
|
2252
|
-
parser.load(storeInstanceOptions, storeInstanceOptions, this);
|
|
2253
|
-
this._nextRequest = this._lastReservoirRefresh = this._lastReservoirIncrease = Date.now();
|
|
2254
|
-
this._running = 0;
|
|
2255
|
-
this._done = 0;
|
|
2256
|
-
this._unblockTime = 0;
|
|
2257
|
-
this.ready = this.Promise.resolve();
|
|
2258
|
-
this.clients = {};
|
|
2259
|
-
this._startHeartbeat();
|
|
2260
|
-
}
|
|
2261
|
-
_startHeartbeat() {
|
|
2262
|
-
var base;
|
|
2263
|
-
if (this.heartbeat == null && (this.storeOptions.reservoirRefreshInterval != null && this.storeOptions.reservoirRefreshAmount != null || this.storeOptions.reservoirIncreaseInterval != null && this.storeOptions.reservoirIncreaseAmount != null)) return typeof (base = this.heartbeat = setInterval(() => {
|
|
2264
|
-
var amount, incr, maximum, now = Date.now(), reservoir;
|
|
2265
|
-
if (this.storeOptions.reservoirRefreshInterval != null && now >= this._lastReservoirRefresh + this.storeOptions.reservoirRefreshInterval) {
|
|
2266
|
-
this._lastReservoirRefresh = now;
|
|
2267
|
-
this.storeOptions.reservoir = this.storeOptions.reservoirRefreshAmount;
|
|
2268
|
-
this.instance._drainAll(this.computeCapacity());
|
|
2269
|
-
}
|
|
2270
|
-
if (this.storeOptions.reservoirIncreaseInterval != null && now >= this._lastReservoirIncrease + this.storeOptions.reservoirIncreaseInterval) {
|
|
2271
|
-
var _this$storeOptions = this.storeOptions;
|
|
2272
|
-
amount = _this$storeOptions.reservoirIncreaseAmount;
|
|
2273
|
-
maximum = _this$storeOptions.reservoirIncreaseMaximum;
|
|
2274
|
-
reservoir = _this$storeOptions.reservoir;
|
|
2275
|
-
this._lastReservoirIncrease = now;
|
|
2276
|
-
incr = maximum != null ? Math.min(amount, maximum - reservoir) : amount;
|
|
2277
|
-
if (incr > 0) {
|
|
2278
|
-
this.storeOptions.reservoir += incr;
|
|
2279
|
-
return this.instance._drainAll(this.computeCapacity());
|
|
2280
|
-
}
|
|
2281
|
-
}
|
|
2282
|
-
}, this.heartbeatInterval)).unref === "function" ? base.unref() : void 0;
|
|
2283
|
-
else return clearInterval(this.heartbeat);
|
|
2284
|
-
}
|
|
2285
|
-
__publish__(message) {
|
|
2286
|
-
var _this = this;
|
|
2287
|
-
return _asyncToGenerator(function* () {
|
|
2288
|
-
yield _this.yieldLoop();
|
|
2289
|
-
return _this.instance.Events.trigger("message", message.toString());
|
|
2290
|
-
})();
|
|
2291
|
-
}
|
|
2292
|
-
__disconnect__(flush) {
|
|
2293
|
-
var _this2 = this;
|
|
2294
|
-
return _asyncToGenerator(function* () {
|
|
2295
|
-
yield _this2.yieldLoop();
|
|
2296
|
-
clearInterval(_this2.heartbeat);
|
|
2297
|
-
return _this2.Promise.resolve();
|
|
2298
|
-
})();
|
|
2299
|
-
}
|
|
2300
|
-
yieldLoop(t = 0) {
|
|
2301
|
-
return new this.Promise(function(resolve, reject) {
|
|
2302
|
-
return setTimeout(resolve, t);
|
|
2303
|
-
});
|
|
2304
|
-
}
|
|
2305
|
-
computePenalty() {
|
|
2306
|
-
var ref;
|
|
2307
|
-
return (ref = this.storeOptions.penalty) != null ? ref : 15 * this.storeOptions.minTime || 5e3;
|
|
2308
|
-
}
|
|
2309
|
-
__updateSettings__(options) {
|
|
2310
|
-
var _this3 = this;
|
|
2311
|
-
return _asyncToGenerator(function* () {
|
|
2312
|
-
yield _this3.yieldLoop();
|
|
2313
|
-
parser.overwrite(options, options, _this3.storeOptions);
|
|
2314
|
-
_this3._startHeartbeat();
|
|
2315
|
-
_this3.instance._drainAll(_this3.computeCapacity());
|
|
2316
|
-
return true;
|
|
2317
|
-
})();
|
|
2318
|
-
}
|
|
2319
|
-
__running__() {
|
|
2320
|
-
var _this4 = this;
|
|
2321
|
-
return _asyncToGenerator(function* () {
|
|
2322
|
-
yield _this4.yieldLoop();
|
|
2323
|
-
return _this4._running;
|
|
2324
|
-
})();
|
|
2325
|
-
}
|
|
2326
|
-
__queued__() {
|
|
2327
|
-
var _this5 = this;
|
|
2328
|
-
return _asyncToGenerator(function* () {
|
|
2329
|
-
yield _this5.yieldLoop();
|
|
2330
|
-
return _this5.instance.queued();
|
|
2331
|
-
})();
|
|
2332
|
-
}
|
|
2333
|
-
__done__() {
|
|
2334
|
-
var _this6 = this;
|
|
2335
|
-
return _asyncToGenerator(function* () {
|
|
2336
|
-
yield _this6.yieldLoop();
|
|
2337
|
-
return _this6._done;
|
|
2338
|
-
})();
|
|
2339
|
-
}
|
|
2340
|
-
__groupCheck__(time) {
|
|
2341
|
-
var _this7 = this;
|
|
2342
|
-
return _asyncToGenerator(function* () {
|
|
2343
|
-
yield _this7.yieldLoop();
|
|
2344
|
-
return _this7._nextRequest + _this7.timeout < time;
|
|
2345
|
-
})();
|
|
2346
|
-
}
|
|
2347
|
-
computeCapacity() {
|
|
2348
|
-
var maxConcurrent, reservoir;
|
|
2349
|
-
var _this$storeOptions2 = this.storeOptions;
|
|
2350
|
-
maxConcurrent = _this$storeOptions2.maxConcurrent;
|
|
2351
|
-
reservoir = _this$storeOptions2.reservoir;
|
|
2352
|
-
if (maxConcurrent != null && reservoir != null) return Math.min(maxConcurrent - this._running, reservoir);
|
|
2353
|
-
else if (maxConcurrent != null) return maxConcurrent - this._running;
|
|
2354
|
-
else if (reservoir != null) return reservoir;
|
|
2355
|
-
else return null;
|
|
2356
|
-
}
|
|
2357
|
-
conditionsCheck(weight) {
|
|
2358
|
-
var capacity = this.computeCapacity();
|
|
2359
|
-
return capacity == null || weight <= capacity;
|
|
2360
|
-
}
|
|
2361
|
-
__incrementReservoir__(incr) {
|
|
2362
|
-
var _this8 = this;
|
|
2363
|
-
return _asyncToGenerator(function* () {
|
|
2364
|
-
var reservoir;
|
|
2365
|
-
yield _this8.yieldLoop();
|
|
2366
|
-
reservoir = _this8.storeOptions.reservoir += incr;
|
|
2367
|
-
_this8.instance._drainAll(_this8.computeCapacity());
|
|
2368
|
-
return reservoir;
|
|
2369
|
-
})();
|
|
2370
|
-
}
|
|
2371
|
-
__currentReservoir__() {
|
|
2372
|
-
var _this9 = this;
|
|
2373
|
-
return _asyncToGenerator(function* () {
|
|
2374
|
-
yield _this9.yieldLoop();
|
|
2375
|
-
return _this9.storeOptions.reservoir;
|
|
2376
|
-
})();
|
|
2377
|
-
}
|
|
2378
|
-
isBlocked(now) {
|
|
2379
|
-
return this._unblockTime >= now;
|
|
2380
|
-
}
|
|
2381
|
-
check(weight, now) {
|
|
2382
|
-
return this.conditionsCheck(weight) && this._nextRequest - now <= 0;
|
|
2383
|
-
}
|
|
2384
|
-
__check__(weight) {
|
|
2385
|
-
var _this10 = this;
|
|
2386
|
-
return _asyncToGenerator(function* () {
|
|
2387
|
-
var now;
|
|
2388
|
-
yield _this10.yieldLoop();
|
|
2389
|
-
now = Date.now();
|
|
2390
|
-
return _this10.check(weight, now);
|
|
2391
|
-
})();
|
|
2392
|
-
}
|
|
2393
|
-
__register__(index, weight, expiration) {
|
|
2394
|
-
var _this11 = this;
|
|
2395
|
-
return _asyncToGenerator(function* () {
|
|
2396
|
-
var now, wait;
|
|
2397
|
-
yield _this11.yieldLoop();
|
|
2398
|
-
now = Date.now();
|
|
2399
|
-
if (_this11.conditionsCheck(weight)) {
|
|
2400
|
-
_this11._running += weight;
|
|
2401
|
-
if (_this11.storeOptions.reservoir != null) _this11.storeOptions.reservoir -= weight;
|
|
2402
|
-
wait = Math.max(_this11._nextRequest - now, 0);
|
|
2403
|
-
_this11._nextRequest = now + wait + _this11.storeOptions.minTime;
|
|
2404
|
-
return {
|
|
2405
|
-
success: true,
|
|
2406
|
-
wait,
|
|
2407
|
-
reservoir: _this11.storeOptions.reservoir
|
|
2408
|
-
};
|
|
2409
|
-
} else return { success: false };
|
|
2410
|
-
})();
|
|
2411
|
-
}
|
|
2412
|
-
strategyIsBlock() {
|
|
2413
|
-
return this.storeOptions.strategy === 3;
|
|
2414
|
-
}
|
|
2415
|
-
__submit__(queueLength, weight) {
|
|
2416
|
-
var _this12 = this;
|
|
2417
|
-
return _asyncToGenerator(function* () {
|
|
2418
|
-
var blocked, now, reachedHWM;
|
|
2419
|
-
yield _this12.yieldLoop();
|
|
2420
|
-
if (_this12.storeOptions.maxConcurrent != null && weight > _this12.storeOptions.maxConcurrent) throw new BottleneckError(`Impossible to add a job having a weight of ${weight} to a limiter having a maxConcurrent setting of ${_this12.storeOptions.maxConcurrent}`);
|
|
2421
|
-
now = Date.now();
|
|
2422
|
-
reachedHWM = _this12.storeOptions.highWater != null && queueLength === _this12.storeOptions.highWater && !_this12.check(weight, now);
|
|
2423
|
-
blocked = _this12.strategyIsBlock() && (reachedHWM || _this12.isBlocked(now));
|
|
2424
|
-
if (blocked) {
|
|
2425
|
-
_this12._unblockTime = now + _this12.computePenalty();
|
|
2426
|
-
_this12._nextRequest = _this12._unblockTime + _this12.storeOptions.minTime;
|
|
2427
|
-
_this12.instance._dropAllQueued();
|
|
2428
|
-
}
|
|
2429
|
-
return {
|
|
2430
|
-
reachedHWM,
|
|
2431
|
-
blocked,
|
|
2432
|
-
strategy: _this12.storeOptions.strategy
|
|
2433
|
-
};
|
|
2434
|
-
})();
|
|
2435
|
-
}
|
|
2436
|
-
__free__(index, weight) {
|
|
2437
|
-
var _this13 = this;
|
|
2438
|
-
return _asyncToGenerator(function* () {
|
|
2439
|
-
yield _this13.yieldLoop();
|
|
2440
|
-
_this13._running -= weight;
|
|
2441
|
-
_this13._done += weight;
|
|
2442
|
-
_this13.instance._drainAll(_this13.computeCapacity());
|
|
2443
|
-
return { running: _this13._running };
|
|
2444
|
-
})();
|
|
2445
|
-
}
|
|
2446
|
-
};
|
|
2447
|
-
module.exports = LocalDatastore;
|
|
2448
|
-
}));
|
|
2449
|
-
//#endregion
|
|
2450
|
-
//#region ../../node_modules/bottleneck/lib/lua.json
|
|
2451
|
-
var require_lua = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2452
|
-
module.exports = {
|
|
2453
|
-
"blacklist_client.lua": "local blacklist = ARGV[num_static_argv + 1]\n\nif redis.call('zscore', client_last_seen_key, blacklist) then\n redis.call('zadd', client_last_seen_key, 0, blacklist)\nend\n\n\nreturn {}\n",
|
|
2454
|
-
"check.lua": "local weight = tonumber(ARGV[num_static_argv + 1])\n\nlocal capacity = process_tick(now, false)['capacity']\nlocal nextRequest = tonumber(redis.call('hget', settings_key, 'nextRequest'))\n\nreturn conditions_check(capacity, weight) and nextRequest - now <= 0\n",
|
|
2455
|
-
"conditions_check.lua": "local conditions_check = function (capacity, weight)\n return capacity == nil or weight <= capacity\nend\n",
|
|
2456
|
-
"current_reservoir.lua": "return process_tick(now, false)['reservoir']\n",
|
|
2457
|
-
"done.lua": "process_tick(now, false)\n\nreturn tonumber(redis.call('hget', settings_key, 'done'))\n",
|
|
2458
|
-
"free.lua": "local index = ARGV[num_static_argv + 1]\n\nredis.call('zadd', job_expirations_key, 0, index)\n\nreturn process_tick(now, false)['running']\n",
|
|
2459
|
-
"get_time.lua": "redis.replicate_commands()\n\nlocal get_time = function ()\n local time = redis.call('time')\n\n return tonumber(time[1]..string.sub(time[2], 1, 3))\nend\n",
|
|
2460
|
-
"group_check.lua": "return not (redis.call('exists', settings_key) == 1)\n",
|
|
2461
|
-
"heartbeat.lua": "process_tick(now, true)\n",
|
|
2462
|
-
"increment_reservoir.lua": "local incr = tonumber(ARGV[num_static_argv + 1])\n\nredis.call('hincrby', settings_key, 'reservoir', incr)\n\nlocal reservoir = process_tick(now, true)['reservoir']\n\nlocal groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout'))\nrefresh_expiration(0, 0, groupTimeout)\n\nreturn reservoir\n",
|
|
2463
|
-
"init.lua": "local clear = tonumber(ARGV[num_static_argv + 1])\nlocal limiter_version = ARGV[num_static_argv + 2]\nlocal num_local_argv = num_static_argv + 2\n\nif clear == 1 then\n redis.call('del', unpack(KEYS))\nend\n\nif redis.call('exists', settings_key) == 0 then\n -- Create\n local args = {'hmset', settings_key}\n\n for i = num_local_argv + 1, #ARGV do\n table.insert(args, ARGV[i])\n end\n\n redis.call(unpack(args))\n redis.call('hmset', settings_key,\n 'nextRequest', now,\n 'lastReservoirRefresh', now,\n 'lastReservoirIncrease', now,\n 'running', 0,\n 'done', 0,\n 'unblockTime', 0,\n 'capacityPriorityCounter', 0\n )\n\nelse\n -- Apply migrations\n local settings = redis.call('hmget', settings_key,\n 'id',\n 'version'\n )\n local id = settings[1]\n local current_version = settings[2]\n\n if current_version ~= limiter_version then\n local version_digits = {}\n for k, v in string.gmatch(current_version, \"([^.]+)\") do\n table.insert(version_digits, tonumber(k))\n end\n\n -- 2.10.0\n if version_digits[2] < 10 then\n redis.call('hsetnx', settings_key, 'reservoirRefreshInterval', '')\n redis.call('hsetnx', settings_key, 'reservoirRefreshAmount', '')\n redis.call('hsetnx', settings_key, 'lastReservoirRefresh', '')\n redis.call('hsetnx', settings_key, 'done', 0)\n redis.call('hset', settings_key, 'version', '2.10.0')\n end\n\n -- 2.11.1\n if version_digits[2] < 11 or (version_digits[2] == 11 and version_digits[3] < 1) then\n if redis.call('hstrlen', settings_key, 'lastReservoirRefresh') == 0 then\n redis.call('hmset', settings_key,\n 'lastReservoirRefresh', now,\n 'version', '2.11.1'\n )\n end\n end\n\n -- 2.14.0\n if version_digits[2] < 14 then\n local old_running_key = 'b_'..id..'_running'\n local old_executing_key = 'b_'..id..'_executing'\n\n if redis.call('exists', old_running_key) == 1 then\n redis.call('rename', old_running_key, job_weights_key)\n end\n if redis.call('exists', old_executing_key) == 1 then\n redis.call('rename', old_executing_key, job_expirations_key)\n end\n redis.call('hset', settings_key, 'version', '2.14.0')\n end\n\n -- 2.15.2\n if version_digits[2] < 15 or (version_digits[2] == 15 and version_digits[3] < 2) then\n redis.call('hsetnx', settings_key, 'capacityPriorityCounter', 0)\n redis.call('hset', settings_key, 'version', '2.15.2')\n end\n\n -- 2.17.0\n if version_digits[2] < 17 then\n redis.call('hsetnx', settings_key, 'clientTimeout', 10000)\n redis.call('hset', settings_key, 'version', '2.17.0')\n end\n\n -- 2.18.0\n if version_digits[2] < 18 then\n redis.call('hsetnx', settings_key, 'reservoirIncreaseInterval', '')\n redis.call('hsetnx', settings_key, 'reservoirIncreaseAmount', '')\n redis.call('hsetnx', settings_key, 'reservoirIncreaseMaximum', '')\n redis.call('hsetnx', settings_key, 'lastReservoirIncrease', now)\n redis.call('hset', settings_key, 'version', '2.18.0')\n end\n\n end\n\n process_tick(now, false)\nend\n\nlocal groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout'))\nrefresh_expiration(0, 0, groupTimeout)\n\nreturn {}\n",
|
|
2464
|
-
"process_tick.lua": "local process_tick = function (now, always_publish)\n\n local compute_capacity = function (maxConcurrent, running, reservoir)\n if maxConcurrent ~= nil and reservoir ~= nil then\n return math.min((maxConcurrent - running), reservoir)\n elseif maxConcurrent ~= nil then\n return maxConcurrent - running\n elseif reservoir ~= nil then\n return reservoir\n else\n return nil\n end\n end\n\n local settings = redis.call('hmget', settings_key,\n 'id',\n 'maxConcurrent',\n 'running',\n 'reservoir',\n 'reservoirRefreshInterval',\n 'reservoirRefreshAmount',\n 'lastReservoirRefresh',\n 'reservoirIncreaseInterval',\n 'reservoirIncreaseAmount',\n 'reservoirIncreaseMaximum',\n 'lastReservoirIncrease',\n 'capacityPriorityCounter',\n 'clientTimeout'\n )\n local id = settings[1]\n local maxConcurrent = tonumber(settings[2])\n local running = tonumber(settings[3])\n local reservoir = tonumber(settings[4])\n local reservoirRefreshInterval = tonumber(settings[5])\n local reservoirRefreshAmount = tonumber(settings[6])\n local lastReservoirRefresh = tonumber(settings[7])\n local reservoirIncreaseInterval = tonumber(settings[8])\n local reservoirIncreaseAmount = tonumber(settings[9])\n local reservoirIncreaseMaximum = tonumber(settings[10])\n local lastReservoirIncrease = tonumber(settings[11])\n local capacityPriorityCounter = tonumber(settings[12])\n local clientTimeout = tonumber(settings[13])\n\n local initial_capacity = compute_capacity(maxConcurrent, running, reservoir)\n\n --\n -- Process 'running' changes\n --\n local expired = redis.call('zrangebyscore', job_expirations_key, '-inf', '('..now)\n\n if #expired > 0 then\n redis.call('zremrangebyscore', job_expirations_key, '-inf', '('..now)\n\n local flush_batch = function (batch, acc)\n local weights = redis.call('hmget', job_weights_key, unpack(batch))\n redis.call('hdel', job_weights_key, unpack(batch))\n local clients = redis.call('hmget', job_clients_key, unpack(batch))\n redis.call('hdel', job_clients_key, unpack(batch))\n\n -- Calculate sum of removed weights\n for i = 1, #weights do\n acc['total'] = acc['total'] + (tonumber(weights[i]) or 0)\n end\n\n -- Calculate sum of removed weights by client\n local client_weights = {}\n for i = 1, #clients do\n local removed = tonumber(weights[i]) or 0\n if removed > 0 then\n acc['client_weights'][clients[i]] = (acc['client_weights'][clients[i]] or 0) + removed\n end\n end\n end\n\n local acc = {\n ['total'] = 0,\n ['client_weights'] = {}\n }\n local batch_size = 1000\n\n -- Compute changes to Zsets and apply changes to Hashes\n for i = 1, #expired, batch_size do\n local batch = {}\n for j = i, math.min(i + batch_size - 1, #expired) do\n table.insert(batch, expired[j])\n end\n\n flush_batch(batch, acc)\n end\n\n -- Apply changes to Zsets\n if acc['total'] > 0 then\n redis.call('hincrby', settings_key, 'done', acc['total'])\n running = tonumber(redis.call('hincrby', settings_key, 'running', -acc['total']))\n end\n\n for client, weight in pairs(acc['client_weights']) do\n redis.call('zincrby', client_running_key, -weight, client)\n end\n end\n\n --\n -- Process 'reservoir' changes\n --\n local reservoirRefreshActive = reservoirRefreshInterval ~= nil and reservoirRefreshAmount ~= nil\n if reservoirRefreshActive and now >= lastReservoirRefresh + reservoirRefreshInterval then\n reservoir = reservoirRefreshAmount\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'lastReservoirRefresh', now\n )\n end\n\n local reservoirIncreaseActive = reservoirIncreaseInterval ~= nil and reservoirIncreaseAmount ~= nil\n if reservoirIncreaseActive and now >= lastReservoirIncrease + reservoirIncreaseInterval then\n local num_intervals = math.floor((now - lastReservoirIncrease) / reservoirIncreaseInterval)\n local incr = reservoirIncreaseAmount * num_intervals\n if reservoirIncreaseMaximum ~= nil then\n incr = math.min(incr, reservoirIncreaseMaximum - (reservoir or 0))\n end\n if incr > 0 then\n reservoir = (reservoir or 0) + incr\n end\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'lastReservoirIncrease', lastReservoirIncrease + (num_intervals * reservoirIncreaseInterval)\n )\n end\n\n --\n -- Clear unresponsive clients\n --\n local unresponsive = redis.call('zrangebyscore', client_last_seen_key, '-inf', (now - clientTimeout))\n local unresponsive_lookup = {}\n local terminated_clients = {}\n for i = 1, #unresponsive do\n unresponsive_lookup[unresponsive[i]] = true\n if tonumber(redis.call('zscore', client_running_key, unresponsive[i])) == 0 then\n table.insert(terminated_clients, unresponsive[i])\n end\n end\n if #terminated_clients > 0 then\n redis.call('zrem', client_running_key, unpack(terminated_clients))\n redis.call('hdel', client_num_queued_key, unpack(terminated_clients))\n redis.call('zrem', client_last_registered_key, unpack(terminated_clients))\n redis.call('zrem', client_last_seen_key, unpack(terminated_clients))\n end\n\n --\n -- Broadcast capacity changes\n --\n local final_capacity = compute_capacity(maxConcurrent, running, reservoir)\n\n if always_publish or (initial_capacity ~= nil and final_capacity == nil) then\n -- always_publish or was not unlimited, now unlimited\n redis.call('publish', 'b_'..id, 'capacity:'..(final_capacity or ''))\n\n elseif initial_capacity ~= nil and final_capacity ~= nil and final_capacity > initial_capacity then\n -- capacity was increased\n -- send the capacity message to the limiter having the lowest number of running jobs\n -- the tiebreaker is the limiter having not registered a job in the longest time\n\n local lowest_concurrency_value = nil\n local lowest_concurrency_clients = {}\n local lowest_concurrency_last_registered = {}\n local client_concurrencies = redis.call('zrange', client_running_key, 0, -1, 'withscores')\n\n for i = 1, #client_concurrencies, 2 do\n local client = client_concurrencies[i]\n local concurrency = tonumber(client_concurrencies[i+1])\n\n if (\n lowest_concurrency_value == nil or lowest_concurrency_value == concurrency\n ) and (\n not unresponsive_lookup[client]\n ) and (\n tonumber(redis.call('hget', client_num_queued_key, client)) > 0\n ) then\n lowest_concurrency_value = concurrency\n table.insert(lowest_concurrency_clients, client)\n local last_registered = tonumber(redis.call('zscore', client_last_registered_key, client))\n table.insert(lowest_concurrency_last_registered, last_registered)\n end\n end\n\n if #lowest_concurrency_clients > 0 then\n local position = 1\n local earliest = lowest_concurrency_last_registered[1]\n\n for i,v in ipairs(lowest_concurrency_last_registered) do\n if v < earliest then\n position = i\n earliest = v\n end\n end\n\n local next_client = lowest_concurrency_clients[position]\n redis.call('publish', 'b_'..id,\n 'capacity-priority:'..(final_capacity or '')..\n ':'..next_client..\n ':'..capacityPriorityCounter\n )\n redis.call('hincrby', settings_key, 'capacityPriorityCounter', '1')\n else\n redis.call('publish', 'b_'..id, 'capacity:'..(final_capacity or ''))\n end\n end\n\n return {\n ['capacity'] = final_capacity,\n ['running'] = running,\n ['reservoir'] = reservoir\n }\nend\n",
|
|
2465
|
-
"queued.lua": "local clientTimeout = tonumber(redis.call('hget', settings_key, 'clientTimeout'))\nlocal valid_clients = redis.call('zrangebyscore', client_last_seen_key, (now - clientTimeout), 'inf')\nlocal client_queued = redis.call('hmget', client_num_queued_key, unpack(valid_clients))\n\nlocal sum = 0\nfor i = 1, #client_queued do\n sum = sum + tonumber(client_queued[i])\nend\n\nreturn sum\n",
|
|
2466
|
-
"refresh_expiration.lua": "local refresh_expiration = function (now, nextRequest, groupTimeout)\n\n if groupTimeout ~= nil then\n local ttl = (nextRequest + groupTimeout) - now\n\n for i = 1, #KEYS do\n redis.call('pexpire', KEYS[i], ttl)\n end\n end\n\nend\n",
|
|
2467
|
-
"refs.lua": "local settings_key = KEYS[1]\nlocal job_weights_key = KEYS[2]\nlocal job_expirations_key = KEYS[3]\nlocal job_clients_key = KEYS[4]\nlocal client_running_key = KEYS[5]\nlocal client_num_queued_key = KEYS[6]\nlocal client_last_registered_key = KEYS[7]\nlocal client_last_seen_key = KEYS[8]\n\nlocal now = tonumber(ARGV[1])\nlocal client = ARGV[2]\n\nlocal num_static_argv = 2\n",
|
|
2468
|
-
"register.lua": "local index = ARGV[num_static_argv + 1]\nlocal weight = tonumber(ARGV[num_static_argv + 2])\nlocal expiration = tonumber(ARGV[num_static_argv + 3])\n\nlocal state = process_tick(now, false)\nlocal capacity = state['capacity']\nlocal reservoir = state['reservoir']\n\nlocal settings = redis.call('hmget', settings_key,\n 'nextRequest',\n 'minTime',\n 'groupTimeout'\n)\nlocal nextRequest = tonumber(settings[1])\nlocal minTime = tonumber(settings[2])\nlocal groupTimeout = tonumber(settings[3])\n\nif conditions_check(capacity, weight) then\n\n redis.call('hincrby', settings_key, 'running', weight)\n redis.call('hset', job_weights_key, index, weight)\n if expiration ~= nil then\n redis.call('zadd', job_expirations_key, now + expiration, index)\n end\n redis.call('hset', job_clients_key, index, client)\n redis.call('zincrby', client_running_key, weight, client)\n redis.call('hincrby', client_num_queued_key, client, -1)\n redis.call('zadd', client_last_registered_key, now, client)\n\n local wait = math.max(nextRequest - now, 0)\n local newNextRequest = now + wait + minTime\n\n if reservoir == nil then\n redis.call('hset', settings_key,\n 'nextRequest', newNextRequest\n )\n else\n reservoir = reservoir - weight\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'nextRequest', newNextRequest\n )\n end\n\n refresh_expiration(now, newNextRequest, groupTimeout)\n\n return {true, wait, reservoir}\n\nelse\n return {false}\nend\n",
|
|
2469
|
-
"register_client.lua": "local queued = tonumber(ARGV[num_static_argv + 1])\n\n-- Could have been re-registered concurrently\nif not redis.call('zscore', client_last_seen_key, client) then\n redis.call('zadd', client_running_key, 0, client)\n redis.call('hset', client_num_queued_key, client, queued)\n redis.call('zadd', client_last_registered_key, 0, client)\nend\n\nredis.call('zadd', client_last_seen_key, now, client)\n\nreturn {}\n",
|
|
2470
|
-
"running.lua": "return process_tick(now, false)['running']\n",
|
|
2471
|
-
"submit.lua": "local queueLength = tonumber(ARGV[num_static_argv + 1])\nlocal weight = tonumber(ARGV[num_static_argv + 2])\n\nlocal capacity = process_tick(now, false)['capacity']\n\nlocal settings = redis.call('hmget', settings_key,\n 'id',\n 'maxConcurrent',\n 'highWater',\n 'nextRequest',\n 'strategy',\n 'unblockTime',\n 'penalty',\n 'minTime',\n 'groupTimeout'\n)\nlocal id = settings[1]\nlocal maxConcurrent = tonumber(settings[2])\nlocal highWater = tonumber(settings[3])\nlocal nextRequest = tonumber(settings[4])\nlocal strategy = tonumber(settings[5])\nlocal unblockTime = tonumber(settings[6])\nlocal penalty = tonumber(settings[7])\nlocal minTime = tonumber(settings[8])\nlocal groupTimeout = tonumber(settings[9])\n\nif maxConcurrent ~= nil and weight > maxConcurrent then\n return redis.error_reply('OVERWEIGHT:'..weight..':'..maxConcurrent)\nend\n\nlocal reachedHWM = (highWater ~= nil and queueLength == highWater\n and not (\n conditions_check(capacity, weight)\n and nextRequest - now <= 0\n )\n)\n\nlocal blocked = strategy == 3 and (reachedHWM or unblockTime >= now)\n\nif blocked then\n local computedPenalty = penalty\n if computedPenalty == nil then\n if minTime == 0 then\n computedPenalty = 5000\n else\n computedPenalty = 15 * minTime\n end\n end\n\n local newNextRequest = now + computedPenalty + minTime\n\n redis.call('hmset', settings_key,\n 'unblockTime', now + computedPenalty,\n 'nextRequest', newNextRequest\n )\n\n local clients_queued_reset = redis.call('hkeys', client_num_queued_key)\n local queued_reset = {}\n for i = 1, #clients_queued_reset do\n table.insert(queued_reset, clients_queued_reset[i])\n table.insert(queued_reset, 0)\n end\n redis.call('hmset', client_num_queued_key, unpack(queued_reset))\n\n redis.call('publish', 'b_'..id, 'blocked:')\n\n refresh_expiration(now, newNextRequest, groupTimeout)\nend\n\nif not blocked and not reachedHWM then\n redis.call('hincrby', client_num_queued_key, client, 1)\nend\n\nreturn {reachedHWM, blocked, strategy}\n",
|
|
2472
|
-
"update_settings.lua": "local args = {'hmset', settings_key}\n\nfor i = num_static_argv + 1, #ARGV do\n table.insert(args, ARGV[i])\nend\n\nredis.call(unpack(args))\n\nprocess_tick(now, true)\n\nlocal groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout'))\nrefresh_expiration(0, 0, groupTimeout)\n\nreturn {}\n",
|
|
2473
|
-
"validate_client.lua": "if not redis.call('zscore', client_last_seen_key, client) then\n return redis.error_reply('UNKNOWN_CLIENT')\nend\n\nredis.call('zadd', client_last_seen_key, now, client)\n",
|
|
2474
|
-
"validate_keys.lua": "if not (redis.call('exists', settings_key) == 1) then\n return redis.error_reply('SETTINGS_KEY_NOT_FOUND')\nend\n"
|
|
2475
|
-
};
|
|
2476
|
-
}));
|
|
2477
|
-
//#endregion
|
|
2478
|
-
//#region ../../node_modules/bottleneck/lib/Scripts.js
|
|
2479
|
-
var require_Scripts = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2480
|
-
var headers, lua = require_lua(), templates;
|
|
2481
|
-
headers = {
|
|
2482
|
-
refs: lua["refs.lua"],
|
|
2483
|
-
validate_keys: lua["validate_keys.lua"],
|
|
2484
|
-
validate_client: lua["validate_client.lua"],
|
|
2485
|
-
refresh_expiration: lua["refresh_expiration.lua"],
|
|
2486
|
-
process_tick: lua["process_tick.lua"],
|
|
2487
|
-
conditions_check: lua["conditions_check.lua"],
|
|
2488
|
-
get_time: lua["get_time.lua"]
|
|
2489
|
-
};
|
|
2490
|
-
exports.allKeys = function(id) {
|
|
2491
|
-
return [
|
|
2492
|
-
`b_${id}_settings`,
|
|
2493
|
-
`b_${id}_job_weights`,
|
|
2494
|
-
`b_${id}_job_expirations`,
|
|
2495
|
-
`b_${id}_job_clients`,
|
|
2496
|
-
`b_${id}_client_running`,
|
|
2497
|
-
`b_${id}_client_num_queued`,
|
|
2498
|
-
`b_${id}_client_last_registered`,
|
|
2499
|
-
`b_${id}_client_last_seen`
|
|
2500
|
-
];
|
|
2501
|
-
};
|
|
2502
|
-
templates = {
|
|
2503
|
-
init: {
|
|
2504
|
-
keys: exports.allKeys,
|
|
2505
|
-
headers: ["process_tick"],
|
|
2506
|
-
refresh_expiration: true,
|
|
2507
|
-
code: lua["init.lua"]
|
|
2508
|
-
},
|
|
2509
|
-
group_check: {
|
|
2510
|
-
keys: exports.allKeys,
|
|
2511
|
-
headers: [],
|
|
2512
|
-
refresh_expiration: false,
|
|
2513
|
-
code: lua["group_check.lua"]
|
|
2514
|
-
},
|
|
2515
|
-
register_client: {
|
|
2516
|
-
keys: exports.allKeys,
|
|
2517
|
-
headers: ["validate_keys"],
|
|
2518
|
-
refresh_expiration: false,
|
|
2519
|
-
code: lua["register_client.lua"]
|
|
2520
|
-
},
|
|
2521
|
-
blacklist_client: {
|
|
2522
|
-
keys: exports.allKeys,
|
|
2523
|
-
headers: ["validate_keys", "validate_client"],
|
|
2524
|
-
refresh_expiration: false,
|
|
2525
|
-
code: lua["blacklist_client.lua"]
|
|
2526
|
-
},
|
|
2527
|
-
heartbeat: {
|
|
2528
|
-
keys: exports.allKeys,
|
|
2529
|
-
headers: [
|
|
2530
|
-
"validate_keys",
|
|
2531
|
-
"validate_client",
|
|
2532
|
-
"process_tick"
|
|
2533
|
-
],
|
|
2534
|
-
refresh_expiration: false,
|
|
2535
|
-
code: lua["heartbeat.lua"]
|
|
2536
|
-
},
|
|
2537
|
-
update_settings: {
|
|
2538
|
-
keys: exports.allKeys,
|
|
2539
|
-
headers: [
|
|
2540
|
-
"validate_keys",
|
|
2541
|
-
"validate_client",
|
|
2542
|
-
"process_tick"
|
|
2543
|
-
],
|
|
2544
|
-
refresh_expiration: true,
|
|
2545
|
-
code: lua["update_settings.lua"]
|
|
2546
|
-
},
|
|
2547
|
-
running: {
|
|
2548
|
-
keys: exports.allKeys,
|
|
2549
|
-
headers: [
|
|
2550
|
-
"validate_keys",
|
|
2551
|
-
"validate_client",
|
|
2552
|
-
"process_tick"
|
|
2553
|
-
],
|
|
2554
|
-
refresh_expiration: false,
|
|
2555
|
-
code: lua["running.lua"]
|
|
2556
|
-
},
|
|
2557
|
-
queued: {
|
|
2558
|
-
keys: exports.allKeys,
|
|
2559
|
-
headers: ["validate_keys", "validate_client"],
|
|
2560
|
-
refresh_expiration: false,
|
|
2561
|
-
code: lua["queued.lua"]
|
|
2562
|
-
},
|
|
2563
|
-
done: {
|
|
2564
|
-
keys: exports.allKeys,
|
|
2565
|
-
headers: [
|
|
2566
|
-
"validate_keys",
|
|
2567
|
-
"validate_client",
|
|
2568
|
-
"process_tick"
|
|
2569
|
-
],
|
|
2570
|
-
refresh_expiration: false,
|
|
2571
|
-
code: lua["done.lua"]
|
|
2572
|
-
},
|
|
2573
|
-
check: {
|
|
2574
|
-
keys: exports.allKeys,
|
|
2575
|
-
headers: [
|
|
2576
|
-
"validate_keys",
|
|
2577
|
-
"validate_client",
|
|
2578
|
-
"process_tick",
|
|
2579
|
-
"conditions_check"
|
|
2580
|
-
],
|
|
2581
|
-
refresh_expiration: false,
|
|
2582
|
-
code: lua["check.lua"]
|
|
2583
|
-
},
|
|
2584
|
-
submit: {
|
|
2585
|
-
keys: exports.allKeys,
|
|
2586
|
-
headers: [
|
|
2587
|
-
"validate_keys",
|
|
2588
|
-
"validate_client",
|
|
2589
|
-
"process_tick",
|
|
2590
|
-
"conditions_check"
|
|
2591
|
-
],
|
|
2592
|
-
refresh_expiration: true,
|
|
2593
|
-
code: lua["submit.lua"]
|
|
2594
|
-
},
|
|
2595
|
-
register: {
|
|
2596
|
-
keys: exports.allKeys,
|
|
2597
|
-
headers: [
|
|
2598
|
-
"validate_keys",
|
|
2599
|
-
"validate_client",
|
|
2600
|
-
"process_tick",
|
|
2601
|
-
"conditions_check"
|
|
2602
|
-
],
|
|
2603
|
-
refresh_expiration: true,
|
|
2604
|
-
code: lua["register.lua"]
|
|
2605
|
-
},
|
|
2606
|
-
free: {
|
|
2607
|
-
keys: exports.allKeys,
|
|
2608
|
-
headers: [
|
|
2609
|
-
"validate_keys",
|
|
2610
|
-
"validate_client",
|
|
2611
|
-
"process_tick"
|
|
2612
|
-
],
|
|
2613
|
-
refresh_expiration: true,
|
|
2614
|
-
code: lua["free.lua"]
|
|
2615
|
-
},
|
|
2616
|
-
current_reservoir: {
|
|
2617
|
-
keys: exports.allKeys,
|
|
2618
|
-
headers: [
|
|
2619
|
-
"validate_keys",
|
|
2620
|
-
"validate_client",
|
|
2621
|
-
"process_tick"
|
|
2622
|
-
],
|
|
2623
|
-
refresh_expiration: false,
|
|
2624
|
-
code: lua["current_reservoir.lua"]
|
|
2625
|
-
},
|
|
2626
|
-
increment_reservoir: {
|
|
2627
|
-
keys: exports.allKeys,
|
|
2628
|
-
headers: [
|
|
2629
|
-
"validate_keys",
|
|
2630
|
-
"validate_client",
|
|
2631
|
-
"process_tick"
|
|
2632
|
-
],
|
|
2633
|
-
refresh_expiration: true,
|
|
2634
|
-
code: lua["increment_reservoir.lua"]
|
|
2635
|
-
}
|
|
2636
|
-
};
|
|
2637
|
-
exports.names = Object.keys(templates);
|
|
2638
|
-
exports.keys = function(name, id) {
|
|
2639
|
-
return templates[name].keys(id);
|
|
2640
|
-
};
|
|
2641
|
-
exports.payload = function(name) {
|
|
2642
|
-
var template = templates[name];
|
|
2643
|
-
return Array.prototype.concat(headers.refs, template.headers.map(function(h) {
|
|
2644
|
-
return headers[h];
|
|
2645
|
-
}), template.refresh_expiration ? headers.refresh_expiration : "", template.code).join("\n");
|
|
2646
|
-
};
|
|
2647
|
-
}));
|
|
2648
|
-
//#endregion
|
|
2649
|
-
//#region ../../node_modules/bottleneck/lib/RedisConnection.js
|
|
2650
|
-
var require_RedisConnection = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2651
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
2652
|
-
try {
|
|
2653
|
-
var info = gen[key](arg);
|
|
2654
|
-
var value = info.value;
|
|
2655
|
-
} catch (error) {
|
|
2656
|
-
reject(error);
|
|
2657
|
-
return;
|
|
2658
|
-
}
|
|
2659
|
-
if (info.done) resolve(value);
|
|
2660
|
-
else Promise.resolve(value).then(_next, _throw);
|
|
2661
|
-
}
|
|
2662
|
-
function _asyncToGenerator(fn) {
|
|
2663
|
-
return function() {
|
|
2664
|
-
var self = this, args = arguments;
|
|
2665
|
-
return new Promise(function(resolve, reject) {
|
|
2666
|
-
var gen = fn.apply(self, args);
|
|
2667
|
-
function _next(value) {
|
|
2668
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
2669
|
-
}
|
|
2670
|
-
function _throw(err) {
|
|
2671
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
2672
|
-
}
|
|
2673
|
-
_next(void 0);
|
|
2674
|
-
});
|
|
2675
|
-
};
|
|
2676
|
-
}
|
|
2677
|
-
var Events, RedisConnection, Scripts, parser = require_parser();
|
|
2678
|
-
Events = require_Events();
|
|
2679
|
-
Scripts = require_Scripts();
|
|
2680
|
-
RedisConnection = function() {
|
|
2681
|
-
class RedisConnection {
|
|
2682
|
-
constructor(options = {}) {
|
|
2683
|
-
parser.load(options, this.defaults, this);
|
|
2684
|
-
if (this.Redis == null) this.Redis = eval("require")("redis");
|
|
2685
|
-
if (this.Events == null) this.Events = new Events(this);
|
|
2686
|
-
this.terminated = false;
|
|
2687
|
-
if (this.client == null) this.client = this.Redis.createClient(this.clientOptions);
|
|
2688
|
-
this.subscriber = this.client.duplicate();
|
|
2689
|
-
this.limiters = {};
|
|
2690
|
-
this.shas = {};
|
|
2691
|
-
this.ready = this.Promise.all([this._setup(this.client, false), this._setup(this.subscriber, true)]).then(() => {
|
|
2692
|
-
return this._loadScripts();
|
|
2693
|
-
}).then(() => {
|
|
2694
|
-
return {
|
|
2695
|
-
client: this.client,
|
|
2696
|
-
subscriber: this.subscriber
|
|
2697
|
-
};
|
|
2698
|
-
});
|
|
2699
|
-
}
|
|
2700
|
-
_setup(client, sub) {
|
|
2701
|
-
client.setMaxListeners(0);
|
|
2702
|
-
return new this.Promise((resolve, reject) => {
|
|
2703
|
-
client.on("error", (e) => {
|
|
2704
|
-
return this.Events.trigger("error", e);
|
|
2705
|
-
});
|
|
2706
|
-
if (sub) client.on("message", (channel, message) => {
|
|
2707
|
-
var ref;
|
|
2708
|
-
return (ref = this.limiters[channel]) != null ? ref._store.onMessage(channel, message) : void 0;
|
|
2709
|
-
});
|
|
2710
|
-
if (client.ready) return resolve();
|
|
2711
|
-
else return client.once("ready", resolve);
|
|
2712
|
-
});
|
|
2713
|
-
}
|
|
2714
|
-
_loadScript(name) {
|
|
2715
|
-
return new this.Promise((resolve, reject) => {
|
|
2716
|
-
var payload = Scripts.payload(name);
|
|
2717
|
-
return this.client.multi([[
|
|
2718
|
-
"script",
|
|
2719
|
-
"load",
|
|
2720
|
-
payload
|
|
2721
|
-
]]).exec((err, replies) => {
|
|
2722
|
-
if (err != null) return reject(err);
|
|
2723
|
-
this.shas[name] = replies[0];
|
|
2724
|
-
return resolve(replies[0]);
|
|
2725
|
-
});
|
|
2726
|
-
});
|
|
2727
|
-
}
|
|
2728
|
-
_loadScripts() {
|
|
2729
|
-
return this.Promise.all(Scripts.names.map((k) => {
|
|
2730
|
-
return this._loadScript(k);
|
|
2731
|
-
}));
|
|
2732
|
-
}
|
|
2733
|
-
__runCommand__(cmd) {
|
|
2734
|
-
var _this = this;
|
|
2735
|
-
return _asyncToGenerator(function* () {
|
|
2736
|
-
yield _this.ready;
|
|
2737
|
-
return new _this.Promise((resolve, reject) => {
|
|
2738
|
-
return _this.client.multi([cmd]).exec_atomic(function(err, replies) {
|
|
2739
|
-
if (err != null) return reject(err);
|
|
2740
|
-
else return resolve(replies[0]);
|
|
2741
|
-
});
|
|
2742
|
-
});
|
|
2743
|
-
})();
|
|
2744
|
-
}
|
|
2745
|
-
__addLimiter__(instance) {
|
|
2746
|
-
return this.Promise.all([instance.channel(), instance.channel_client()].map((channel) => {
|
|
2747
|
-
return new this.Promise((resolve, reject) => {
|
|
2748
|
-
var handler = (chan) => {
|
|
2749
|
-
if (chan === channel) {
|
|
2750
|
-
this.subscriber.removeListener("subscribe", handler);
|
|
2751
|
-
this.limiters[channel] = instance;
|
|
2752
|
-
return resolve();
|
|
2753
|
-
}
|
|
2754
|
-
};
|
|
2755
|
-
this.subscriber.on("subscribe", handler);
|
|
2756
|
-
return this.subscriber.subscribe(channel);
|
|
2757
|
-
});
|
|
2758
|
-
}));
|
|
2759
|
-
}
|
|
2760
|
-
__removeLimiter__(instance) {
|
|
2761
|
-
var _this2 = this;
|
|
2762
|
-
return this.Promise.all([instance.channel(), instance.channel_client()].map(/* @__PURE__ */ function() {
|
|
2763
|
-
var _ref = _asyncToGenerator(function* (channel) {
|
|
2764
|
-
if (!_this2.terminated) yield new _this2.Promise((resolve, reject) => {
|
|
2765
|
-
return _this2.subscriber.unsubscribe(channel, function(err, chan) {
|
|
2766
|
-
if (err != null) return reject(err);
|
|
2767
|
-
if (chan === channel) return resolve();
|
|
2768
|
-
});
|
|
2769
|
-
});
|
|
2770
|
-
return delete _this2.limiters[channel];
|
|
2771
|
-
});
|
|
2772
|
-
return function(_x) {
|
|
2773
|
-
return _ref.apply(this, arguments);
|
|
2774
|
-
};
|
|
2775
|
-
}()));
|
|
2776
|
-
}
|
|
2777
|
-
__scriptArgs__(name, id, args, cb) {
|
|
2778
|
-
var keys = Scripts.keys(name, id);
|
|
2779
|
-
return [this.shas[name], keys.length].concat(keys, args, cb);
|
|
2780
|
-
}
|
|
2781
|
-
__scriptFn__(name) {
|
|
2782
|
-
return this.client.evalsha.bind(this.client);
|
|
2783
|
-
}
|
|
2784
|
-
disconnect(flush = true) {
|
|
2785
|
-
var i, k, len, ref = Object.keys(this.limiters);
|
|
2786
|
-
for (i = 0, len = ref.length; i < len; i++) {
|
|
2787
|
-
k = ref[i];
|
|
2788
|
-
clearInterval(this.limiters[k]._store.heartbeat);
|
|
2789
|
-
}
|
|
2790
|
-
this.limiters = {};
|
|
2791
|
-
this.terminated = true;
|
|
2792
|
-
this.client.end(flush);
|
|
2793
|
-
this.subscriber.end(flush);
|
|
2794
|
-
return this.Promise.resolve();
|
|
2795
|
-
}
|
|
2796
|
-
}
|
|
2797
|
-
RedisConnection.prototype.datastore = "redis";
|
|
2798
|
-
RedisConnection.prototype.defaults = {
|
|
2799
|
-
Redis: null,
|
|
2800
|
-
clientOptions: {},
|
|
2801
|
-
client: null,
|
|
2802
|
-
Promise,
|
|
2803
|
-
Events: null
|
|
2804
|
-
};
|
|
2805
|
-
return RedisConnection;
|
|
2806
|
-
}.call(void 0);
|
|
2807
|
-
module.exports = RedisConnection;
|
|
2808
|
-
}));
|
|
2809
|
-
//#endregion
|
|
2810
|
-
//#region ../../node_modules/bottleneck/lib/IORedisConnection.js
|
|
2811
|
-
var require_IORedisConnection = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2812
|
-
function _slicedToArray(arr, i) {
|
|
2813
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
|
2814
|
-
}
|
|
2815
|
-
function _nonIterableRest() {
|
|
2816
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
2817
|
-
}
|
|
2818
|
-
function _iterableToArrayLimit(arr, i) {
|
|
2819
|
-
var _arr = [];
|
|
2820
|
-
var _n = true;
|
|
2821
|
-
var _d = false;
|
|
2822
|
-
var _e = void 0;
|
|
2823
|
-
try {
|
|
2824
|
-
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
2825
|
-
_arr.push(_s.value);
|
|
2826
|
-
if (i && _arr.length === i) break;
|
|
2827
|
-
}
|
|
2828
|
-
} catch (err) {
|
|
2829
|
-
_d = true;
|
|
2830
|
-
_e = err;
|
|
2831
|
-
} finally {
|
|
2832
|
-
try {
|
|
2833
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
2834
|
-
} finally {
|
|
2835
|
-
if (_d) throw _e;
|
|
2836
|
-
}
|
|
2837
|
-
}
|
|
2838
|
-
return _arr;
|
|
2839
|
-
}
|
|
2840
|
-
function _arrayWithHoles(arr) {
|
|
2841
|
-
if (Array.isArray(arr)) return arr;
|
|
2842
|
-
}
|
|
2843
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
2844
|
-
try {
|
|
2845
|
-
var info = gen[key](arg);
|
|
2846
|
-
var value = info.value;
|
|
2847
|
-
} catch (error) {
|
|
2848
|
-
reject(error);
|
|
2849
|
-
return;
|
|
2850
|
-
}
|
|
2851
|
-
if (info.done) resolve(value);
|
|
2852
|
-
else Promise.resolve(value).then(_next, _throw);
|
|
2853
|
-
}
|
|
2854
|
-
function _asyncToGenerator(fn) {
|
|
2855
|
-
return function() {
|
|
2856
|
-
var self = this, args = arguments;
|
|
2857
|
-
return new Promise(function(resolve, reject) {
|
|
2858
|
-
var gen = fn.apply(self, args);
|
|
2859
|
-
function _next(value) {
|
|
2860
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
2861
|
-
}
|
|
2862
|
-
function _throw(err) {
|
|
2863
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
2864
|
-
}
|
|
2865
|
-
_next(void 0);
|
|
2866
|
-
});
|
|
2867
|
-
};
|
|
2868
|
-
}
|
|
2869
|
-
var Events, IORedisConnection, Scripts, parser = require_parser();
|
|
2870
|
-
Events = require_Events();
|
|
2871
|
-
Scripts = require_Scripts();
|
|
2872
|
-
IORedisConnection = function() {
|
|
2873
|
-
class IORedisConnection {
|
|
2874
|
-
constructor(options = {}) {
|
|
2875
|
-
parser.load(options, this.defaults, this);
|
|
2876
|
-
if (this.Redis == null) this.Redis = eval("require")("ioredis");
|
|
2877
|
-
if (this.Events == null) this.Events = new Events(this);
|
|
2878
|
-
this.terminated = false;
|
|
2879
|
-
if (this.clusterNodes != null) {
|
|
2880
|
-
this.client = new this.Redis.Cluster(this.clusterNodes, this.clientOptions);
|
|
2881
|
-
this.subscriber = new this.Redis.Cluster(this.clusterNodes, this.clientOptions);
|
|
2882
|
-
} else if (this.client != null && this.client.duplicate == null) this.subscriber = new this.Redis.Cluster(this.client.startupNodes, this.client.options);
|
|
2883
|
-
else {
|
|
2884
|
-
if (this.client == null) this.client = new this.Redis(this.clientOptions);
|
|
2885
|
-
this.subscriber = this.client.duplicate();
|
|
2886
|
-
}
|
|
2887
|
-
this.limiters = {};
|
|
2888
|
-
this.ready = this.Promise.all([this._setup(this.client, false), this._setup(this.subscriber, true)]).then(() => {
|
|
2889
|
-
this._loadScripts();
|
|
2890
|
-
return {
|
|
2891
|
-
client: this.client,
|
|
2892
|
-
subscriber: this.subscriber
|
|
2893
|
-
};
|
|
2894
|
-
});
|
|
2895
|
-
}
|
|
2896
|
-
_setup(client, sub) {
|
|
2897
|
-
client.setMaxListeners(0);
|
|
2898
|
-
return new this.Promise((resolve, reject) => {
|
|
2899
|
-
client.on("error", (e) => {
|
|
2900
|
-
return this.Events.trigger("error", e);
|
|
2901
|
-
});
|
|
2902
|
-
if (sub) client.on("message", (channel, message) => {
|
|
2903
|
-
var ref;
|
|
2904
|
-
return (ref = this.limiters[channel]) != null ? ref._store.onMessage(channel, message) : void 0;
|
|
2905
|
-
});
|
|
2906
|
-
if (client.status === "ready") return resolve();
|
|
2907
|
-
else return client.once("ready", resolve);
|
|
2908
|
-
});
|
|
2909
|
-
}
|
|
2910
|
-
_loadScripts() {
|
|
2911
|
-
return Scripts.names.forEach((name) => {
|
|
2912
|
-
return this.client.defineCommand(name, { lua: Scripts.payload(name) });
|
|
2913
|
-
});
|
|
2914
|
-
}
|
|
2915
|
-
__runCommand__(cmd) {
|
|
2916
|
-
var _this = this;
|
|
2917
|
-
return _asyncToGenerator(function* () {
|
|
2918
|
-
var _, deleted;
|
|
2919
|
-
yield _this.ready;
|
|
2920
|
-
var _ref2$ = _slicedToArray(_slicedToArray(yield _this.client.pipeline([cmd]).exec(), 1)[0], 2);
|
|
2921
|
-
_ref2$[0];
|
|
2922
|
-
deleted = _ref2$[1];
|
|
2923
|
-
return deleted;
|
|
2924
|
-
})();
|
|
2925
|
-
}
|
|
2926
|
-
__addLimiter__(instance) {
|
|
2927
|
-
return this.Promise.all([instance.channel(), instance.channel_client()].map((channel) => {
|
|
2928
|
-
return new this.Promise((resolve, reject) => {
|
|
2929
|
-
return this.subscriber.subscribe(channel, () => {
|
|
2930
|
-
this.limiters[channel] = instance;
|
|
2931
|
-
return resolve();
|
|
2932
|
-
});
|
|
2933
|
-
});
|
|
2934
|
-
}));
|
|
2935
|
-
}
|
|
2936
|
-
__removeLimiter__(instance) {
|
|
2937
|
-
var _this2 = this;
|
|
2938
|
-
return [instance.channel(), instance.channel_client()].forEach(/* @__PURE__ */ function() {
|
|
2939
|
-
var _ref3 = _asyncToGenerator(function* (channel) {
|
|
2940
|
-
if (!_this2.terminated) yield _this2.subscriber.unsubscribe(channel);
|
|
2941
|
-
return delete _this2.limiters[channel];
|
|
2942
|
-
});
|
|
2943
|
-
return function(_x) {
|
|
2944
|
-
return _ref3.apply(this, arguments);
|
|
2945
|
-
};
|
|
2946
|
-
}());
|
|
2947
|
-
}
|
|
2948
|
-
__scriptArgs__(name, id, args, cb) {
|
|
2949
|
-
var keys = Scripts.keys(name, id);
|
|
2950
|
-
return [keys.length].concat(keys, args, cb);
|
|
2951
|
-
}
|
|
2952
|
-
__scriptFn__(name) {
|
|
2953
|
-
return this.client[name].bind(this.client);
|
|
2954
|
-
}
|
|
2955
|
-
disconnect(flush = true) {
|
|
2956
|
-
var i, k, len, ref = Object.keys(this.limiters);
|
|
2957
|
-
for (i = 0, len = ref.length; i < len; i++) {
|
|
2958
|
-
k = ref[i];
|
|
2959
|
-
clearInterval(this.limiters[k]._store.heartbeat);
|
|
2960
|
-
}
|
|
2961
|
-
this.limiters = {};
|
|
2962
|
-
this.terminated = true;
|
|
2963
|
-
if (flush) return this.Promise.all([this.client.quit(), this.subscriber.quit()]);
|
|
2964
|
-
else {
|
|
2965
|
-
this.client.disconnect();
|
|
2966
|
-
this.subscriber.disconnect();
|
|
2967
|
-
return this.Promise.resolve();
|
|
2968
|
-
}
|
|
2969
|
-
}
|
|
2970
|
-
}
|
|
2971
|
-
IORedisConnection.prototype.datastore = "ioredis";
|
|
2972
|
-
IORedisConnection.prototype.defaults = {
|
|
2973
|
-
Redis: null,
|
|
2974
|
-
clientOptions: {},
|
|
2975
|
-
clusterNodes: null,
|
|
2976
|
-
client: null,
|
|
2977
|
-
Promise,
|
|
2978
|
-
Events: null
|
|
2979
|
-
};
|
|
2980
|
-
return IORedisConnection;
|
|
2981
|
-
}.call(void 0);
|
|
2982
|
-
module.exports = IORedisConnection;
|
|
2983
|
-
}));
|
|
2984
|
-
//#endregion
|
|
2985
|
-
//#region ../../node_modules/bottleneck/lib/RedisDatastore.js
|
|
2986
|
-
var require_RedisDatastore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2987
|
-
function _slicedToArray(arr, i) {
|
|
2988
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
|
2989
|
-
}
|
|
2990
|
-
function _nonIterableRest() {
|
|
2991
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
2992
|
-
}
|
|
2993
|
-
function _iterableToArrayLimit(arr, i) {
|
|
2994
|
-
var _arr = [];
|
|
2995
|
-
var _n = true;
|
|
2996
|
-
var _d = false;
|
|
2997
|
-
var _e = void 0;
|
|
2998
|
-
try {
|
|
2999
|
-
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
3000
|
-
_arr.push(_s.value);
|
|
3001
|
-
if (i && _arr.length === i) break;
|
|
3002
|
-
}
|
|
3003
|
-
} catch (err) {
|
|
3004
|
-
_d = true;
|
|
3005
|
-
_e = err;
|
|
3006
|
-
} finally {
|
|
3007
|
-
try {
|
|
3008
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
3009
|
-
} finally {
|
|
3010
|
-
if (_d) throw _e;
|
|
3011
|
-
}
|
|
3012
|
-
}
|
|
3013
|
-
return _arr;
|
|
3014
|
-
}
|
|
3015
|
-
function _arrayWithHoles(arr) {
|
|
3016
|
-
if (Array.isArray(arr)) return arr;
|
|
3017
|
-
}
|
|
3018
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
3019
|
-
try {
|
|
3020
|
-
var info = gen[key](arg);
|
|
3021
|
-
var value = info.value;
|
|
3022
|
-
} catch (error) {
|
|
3023
|
-
reject(error);
|
|
3024
|
-
return;
|
|
3025
|
-
}
|
|
3026
|
-
if (info.done) resolve(value);
|
|
3027
|
-
else Promise.resolve(value).then(_next, _throw);
|
|
3028
|
-
}
|
|
3029
|
-
function _asyncToGenerator(fn) {
|
|
3030
|
-
return function() {
|
|
3031
|
-
var self = this, args = arguments;
|
|
3032
|
-
return new Promise(function(resolve, reject) {
|
|
3033
|
-
var gen = fn.apply(self, args);
|
|
3034
|
-
function _next(value) {
|
|
3035
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
3036
|
-
}
|
|
3037
|
-
function _throw(err) {
|
|
3038
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
3039
|
-
}
|
|
3040
|
-
_next(void 0);
|
|
3041
|
-
});
|
|
3042
|
-
};
|
|
3043
|
-
}
|
|
3044
|
-
var BottleneckError, IORedisConnection, RedisConnection, RedisDatastore, parser = require_parser();
|
|
3045
|
-
BottleneckError = require_BottleneckError();
|
|
3046
|
-
RedisConnection = require_RedisConnection();
|
|
3047
|
-
IORedisConnection = require_IORedisConnection();
|
|
3048
|
-
RedisDatastore = class RedisDatastore {
|
|
3049
|
-
constructor(instance, storeOptions, storeInstanceOptions) {
|
|
3050
|
-
this.instance = instance;
|
|
3051
|
-
this.storeOptions = storeOptions;
|
|
3052
|
-
this.originalId = this.instance.id;
|
|
3053
|
-
this.clientId = this.instance._randomIndex();
|
|
3054
|
-
parser.load(storeInstanceOptions, storeInstanceOptions, this);
|
|
3055
|
-
this.clients = {};
|
|
3056
|
-
this.capacityPriorityCounters = {};
|
|
3057
|
-
this.sharedConnection = this.connection != null;
|
|
3058
|
-
if (this.connection == null) this.connection = this.instance.datastore === "redis" ? new RedisConnection({
|
|
3059
|
-
Redis: this.Redis,
|
|
3060
|
-
clientOptions: this.clientOptions,
|
|
3061
|
-
Promise: this.Promise,
|
|
3062
|
-
Events: this.instance.Events
|
|
3063
|
-
}) : this.instance.datastore === "ioredis" ? new IORedisConnection({
|
|
3064
|
-
Redis: this.Redis,
|
|
3065
|
-
clientOptions: this.clientOptions,
|
|
3066
|
-
clusterNodes: this.clusterNodes,
|
|
3067
|
-
Promise: this.Promise,
|
|
3068
|
-
Events: this.instance.Events
|
|
3069
|
-
}) : void 0;
|
|
3070
|
-
this.instance.connection = this.connection;
|
|
3071
|
-
this.instance.datastore = this.connection.datastore;
|
|
3072
|
-
this.ready = this.connection.ready.then((clients) => {
|
|
3073
|
-
this.clients = clients;
|
|
3074
|
-
return this.runScript("init", this.prepareInitSettings(this.clearDatastore));
|
|
3075
|
-
}).then(() => {
|
|
3076
|
-
return this.connection.__addLimiter__(this.instance);
|
|
3077
|
-
}).then(() => {
|
|
3078
|
-
return this.runScript("register_client", [this.instance.queued()]);
|
|
3079
|
-
}).then(() => {
|
|
3080
|
-
var base;
|
|
3081
|
-
if (typeof (base = this.heartbeat = setInterval(() => {
|
|
3082
|
-
return this.runScript("heartbeat", []).catch((e) => {
|
|
3083
|
-
return this.instance.Events.trigger("error", e);
|
|
3084
|
-
});
|
|
3085
|
-
}, this.heartbeatInterval)).unref === "function") base.unref();
|
|
3086
|
-
return this.clients;
|
|
3087
|
-
});
|
|
3088
|
-
}
|
|
3089
|
-
__publish__(message) {
|
|
3090
|
-
var _this = this;
|
|
3091
|
-
return _asyncToGenerator(function* () {
|
|
3092
|
-
return (yield _this.ready).client.publish(_this.instance.channel(), `message:${message.toString()}`);
|
|
3093
|
-
})();
|
|
3094
|
-
}
|
|
3095
|
-
onMessage(channel, message) {
|
|
3096
|
-
var _this2 = this;
|
|
3097
|
-
return _asyncToGenerator(function* () {
|
|
3098
|
-
var capacity, counter, data, drained, e, newCapacity, pos, priorityClient, rawCapacity, type;
|
|
3099
|
-
try {
|
|
3100
|
-
pos = message.indexOf(":");
|
|
3101
|
-
var _ref2 = [message.slice(0, pos), message.slice(pos + 1)];
|
|
3102
|
-
type = _ref2[0];
|
|
3103
|
-
data = _ref2[1];
|
|
3104
|
-
if (type === "capacity") return yield _this2.instance._drainAll(data.length > 0 ? ~~data : void 0);
|
|
3105
|
-
else if (type === "capacity-priority") {
|
|
3106
|
-
var _data$split2 = _slicedToArray(data.split(":"), 3);
|
|
3107
|
-
rawCapacity = _data$split2[0];
|
|
3108
|
-
priorityClient = _data$split2[1];
|
|
3109
|
-
counter = _data$split2[2];
|
|
3110
|
-
capacity = rawCapacity.length > 0 ? ~~rawCapacity : void 0;
|
|
3111
|
-
if (priorityClient === _this2.clientId) {
|
|
3112
|
-
drained = yield _this2.instance._drainAll(capacity);
|
|
3113
|
-
newCapacity = capacity != null ? capacity - (drained || 0) : "";
|
|
3114
|
-
return yield _this2.clients.client.publish(_this2.instance.channel(), `capacity-priority:${newCapacity}::${counter}`);
|
|
3115
|
-
} else if (priorityClient === "") {
|
|
3116
|
-
clearTimeout(_this2.capacityPriorityCounters[counter]);
|
|
3117
|
-
delete _this2.capacityPriorityCounters[counter];
|
|
3118
|
-
return _this2.instance._drainAll(capacity);
|
|
3119
|
-
} else return _this2.capacityPriorityCounters[counter] = setTimeout(/* @__PURE__ */ _asyncToGenerator(function* () {
|
|
3120
|
-
var e;
|
|
3121
|
-
try {
|
|
3122
|
-
delete _this2.capacityPriorityCounters[counter];
|
|
3123
|
-
yield _this2.runScript("blacklist_client", [priorityClient]);
|
|
3124
|
-
return yield _this2.instance._drainAll(capacity);
|
|
3125
|
-
} catch (error) {
|
|
3126
|
-
e = error;
|
|
3127
|
-
return _this2.instance.Events.trigger("error", e);
|
|
3128
|
-
}
|
|
3129
|
-
}), 1e3);
|
|
3130
|
-
} else if (type === "message") return _this2.instance.Events.trigger("message", data);
|
|
3131
|
-
else if (type === "blocked") return yield _this2.instance._dropAllQueued();
|
|
3132
|
-
} catch (error) {
|
|
3133
|
-
e = error;
|
|
3134
|
-
return _this2.instance.Events.trigger("error", e);
|
|
3135
|
-
}
|
|
3136
|
-
})();
|
|
3137
|
-
}
|
|
3138
|
-
__disconnect__(flush) {
|
|
3139
|
-
clearInterval(this.heartbeat);
|
|
3140
|
-
if (this.sharedConnection) return this.connection.__removeLimiter__(this.instance);
|
|
3141
|
-
else return this.connection.disconnect(flush);
|
|
3142
|
-
}
|
|
3143
|
-
runScript(name, args) {
|
|
3144
|
-
var _this3 = this;
|
|
3145
|
-
return _asyncToGenerator(function* () {
|
|
3146
|
-
if (!(name === "init" || name === "register_client")) yield _this3.ready;
|
|
3147
|
-
return new _this3.Promise((resolve, reject) => {
|
|
3148
|
-
var all_args = [Date.now(), _this3.clientId].concat(args), arr;
|
|
3149
|
-
_this3.instance.Events.trigger("debug", `Calling Redis script: ${name}.lua`, all_args);
|
|
3150
|
-
arr = _this3.connection.__scriptArgs__(name, _this3.originalId, all_args, function(err, replies) {
|
|
3151
|
-
if (err != null) return reject(err);
|
|
3152
|
-
return resolve(replies);
|
|
3153
|
-
});
|
|
3154
|
-
return _this3.connection.__scriptFn__(name)(...arr);
|
|
3155
|
-
}).catch((e) => {
|
|
3156
|
-
if (e.message === "SETTINGS_KEY_NOT_FOUND") if (name === "heartbeat") return _this3.Promise.resolve();
|
|
3157
|
-
else return _this3.runScript("init", _this3.prepareInitSettings(false)).then(() => {
|
|
3158
|
-
return _this3.runScript(name, args);
|
|
3159
|
-
});
|
|
3160
|
-
else if (e.message === "UNKNOWN_CLIENT") return _this3.runScript("register_client", [_this3.instance.queued()]).then(() => {
|
|
3161
|
-
return _this3.runScript(name, args);
|
|
3162
|
-
});
|
|
3163
|
-
else return _this3.Promise.reject(e);
|
|
3164
|
-
});
|
|
3165
|
-
})();
|
|
3166
|
-
}
|
|
3167
|
-
prepareArray(arr) {
|
|
3168
|
-
var i, len, results = [], x;
|
|
3169
|
-
for (i = 0, len = arr.length; i < len; i++) {
|
|
3170
|
-
x = arr[i];
|
|
3171
|
-
results.push(x != null ? x.toString() : "");
|
|
3172
|
-
}
|
|
3173
|
-
return results;
|
|
3174
|
-
}
|
|
3175
|
-
prepareObject(obj) {
|
|
3176
|
-
var arr = [], k, v;
|
|
3177
|
-
for (k in obj) {
|
|
3178
|
-
v = obj[k];
|
|
3179
|
-
arr.push(k, v != null ? v.toString() : "");
|
|
3180
|
-
}
|
|
3181
|
-
return arr;
|
|
3182
|
-
}
|
|
3183
|
-
prepareInitSettings(clear) {
|
|
3184
|
-
var args = this.prepareObject(Object.assign({}, this.storeOptions, {
|
|
3185
|
-
id: this.originalId,
|
|
3186
|
-
version: this.instance.version,
|
|
3187
|
-
groupTimeout: this.timeout,
|
|
3188
|
-
clientTimeout: this.clientTimeout
|
|
3189
|
-
}));
|
|
3190
|
-
args.unshift(clear ? 1 : 0, this.instance.version);
|
|
3191
|
-
return args;
|
|
3192
|
-
}
|
|
3193
|
-
convertBool(b) {
|
|
3194
|
-
return !!b;
|
|
3195
|
-
}
|
|
3196
|
-
__updateSettings__(options) {
|
|
3197
|
-
var _this4 = this;
|
|
3198
|
-
return _asyncToGenerator(function* () {
|
|
3199
|
-
yield _this4.runScript("update_settings", _this4.prepareObject(options));
|
|
3200
|
-
return parser.overwrite(options, options, _this4.storeOptions);
|
|
3201
|
-
})();
|
|
3202
|
-
}
|
|
3203
|
-
__running__() {
|
|
3204
|
-
return this.runScript("running", []);
|
|
3205
|
-
}
|
|
3206
|
-
__queued__() {
|
|
3207
|
-
return this.runScript("queued", []);
|
|
3208
|
-
}
|
|
3209
|
-
__done__() {
|
|
3210
|
-
return this.runScript("done", []);
|
|
3211
|
-
}
|
|
3212
|
-
__groupCheck__() {
|
|
3213
|
-
var _this5 = this;
|
|
3214
|
-
return _asyncToGenerator(function* () {
|
|
3215
|
-
return _this5.convertBool(yield _this5.runScript("group_check", []));
|
|
3216
|
-
})();
|
|
3217
|
-
}
|
|
3218
|
-
__incrementReservoir__(incr) {
|
|
3219
|
-
return this.runScript("increment_reservoir", [incr]);
|
|
3220
|
-
}
|
|
3221
|
-
__currentReservoir__() {
|
|
3222
|
-
return this.runScript("current_reservoir", []);
|
|
3223
|
-
}
|
|
3224
|
-
__check__(weight) {
|
|
3225
|
-
var _this6 = this;
|
|
3226
|
-
return _asyncToGenerator(function* () {
|
|
3227
|
-
return _this6.convertBool(yield _this6.runScript("check", _this6.prepareArray([weight])));
|
|
3228
|
-
})();
|
|
3229
|
-
}
|
|
3230
|
-
__register__(index, weight, expiration) {
|
|
3231
|
-
var _this7 = this;
|
|
3232
|
-
return _asyncToGenerator(function* () {
|
|
3233
|
-
var reservoir, success, wait;
|
|
3234
|
-
var _ref5 = _slicedToArray(yield _this7.runScript("register", _this7.prepareArray([
|
|
3235
|
-
index,
|
|
3236
|
-
weight,
|
|
3237
|
-
expiration
|
|
3238
|
-
])), 3);
|
|
3239
|
-
success = _ref5[0];
|
|
3240
|
-
wait = _ref5[1];
|
|
3241
|
-
reservoir = _ref5[2];
|
|
3242
|
-
return {
|
|
3243
|
-
success: _this7.convertBool(success),
|
|
3244
|
-
wait,
|
|
3245
|
-
reservoir
|
|
3246
|
-
};
|
|
3247
|
-
})();
|
|
3248
|
-
}
|
|
3249
|
-
__submit__(queueLength, weight) {
|
|
3250
|
-
var _this8 = this;
|
|
3251
|
-
return _asyncToGenerator(function* () {
|
|
3252
|
-
var blocked, e, maxConcurrent, reachedHWM, strategy;
|
|
3253
|
-
try {
|
|
3254
|
-
var _ref7 = _slicedToArray(yield _this8.runScript("submit", _this8.prepareArray([queueLength, weight])), 3);
|
|
3255
|
-
reachedHWM = _ref7[0];
|
|
3256
|
-
blocked = _ref7[1];
|
|
3257
|
-
strategy = _ref7[2];
|
|
3258
|
-
return {
|
|
3259
|
-
reachedHWM: _this8.convertBool(reachedHWM),
|
|
3260
|
-
blocked: _this8.convertBool(blocked),
|
|
3261
|
-
strategy
|
|
3262
|
-
};
|
|
3263
|
-
} catch (error) {
|
|
3264
|
-
e = error;
|
|
3265
|
-
if (e.message.indexOf("OVERWEIGHT") === 0) {
|
|
3266
|
-
var _e$message$split2 = _slicedToArray(e.message.split(":"), 3);
|
|
3267
|
-
_e$message$split2[0];
|
|
3268
|
-
weight = _e$message$split2[1];
|
|
3269
|
-
maxConcurrent = _e$message$split2[2];
|
|
3270
|
-
throw new BottleneckError(`Impossible to add a job having a weight of ${weight} to a limiter having a maxConcurrent setting of ${maxConcurrent}`);
|
|
3271
|
-
} else throw e;
|
|
3272
|
-
}
|
|
3273
|
-
})();
|
|
3274
|
-
}
|
|
3275
|
-
__free__(index, weight) {
|
|
3276
|
-
var _this9 = this;
|
|
3277
|
-
return _asyncToGenerator(function* () {
|
|
3278
|
-
return { running: yield _this9.runScript("free", _this9.prepareArray([index])) };
|
|
3279
|
-
})();
|
|
3280
|
-
}
|
|
3281
|
-
};
|
|
3282
|
-
module.exports = RedisDatastore;
|
|
3283
|
-
}));
|
|
3284
|
-
//#endregion
|
|
3285
|
-
//#region ../../node_modules/bottleneck/lib/States.js
|
|
3286
|
-
var require_States = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3287
|
-
var BottleneckError = require_BottleneckError();
|
|
3288
|
-
module.exports = class States {
|
|
3289
|
-
constructor(status1) {
|
|
3290
|
-
this.status = status1;
|
|
3291
|
-
this._jobs = {};
|
|
3292
|
-
this.counts = this.status.map(function() {
|
|
3293
|
-
return 0;
|
|
3294
|
-
});
|
|
3295
|
-
}
|
|
3296
|
-
next(id) {
|
|
3297
|
-
var current = this._jobs[id], next = current + 1;
|
|
3298
|
-
if (current != null && next < this.status.length) {
|
|
3299
|
-
this.counts[current]--;
|
|
3300
|
-
this.counts[next]++;
|
|
3301
|
-
return this._jobs[id]++;
|
|
3302
|
-
} else if (current != null) {
|
|
3303
|
-
this.counts[current]--;
|
|
3304
|
-
return delete this._jobs[id];
|
|
3305
|
-
}
|
|
3306
|
-
}
|
|
3307
|
-
start(id) {
|
|
3308
|
-
var initial = 0;
|
|
3309
|
-
this._jobs[id] = initial;
|
|
3310
|
-
return this.counts[initial]++;
|
|
3311
|
-
}
|
|
3312
|
-
remove(id) {
|
|
3313
|
-
var current = this._jobs[id];
|
|
3314
|
-
if (current != null) {
|
|
3315
|
-
this.counts[current]--;
|
|
3316
|
-
delete this._jobs[id];
|
|
3317
|
-
}
|
|
3318
|
-
return current != null;
|
|
3319
|
-
}
|
|
3320
|
-
jobStatus(id) {
|
|
3321
|
-
var ref;
|
|
3322
|
-
return (ref = this.status[this._jobs[id]]) != null ? ref : null;
|
|
3323
|
-
}
|
|
3324
|
-
statusJobs(status) {
|
|
3325
|
-
var k, pos, ref, results, v;
|
|
3326
|
-
if (status != null) {
|
|
3327
|
-
pos = this.status.indexOf(status);
|
|
3328
|
-
if (pos < 0) throw new BottleneckError(`status must be one of ${this.status.join(", ")}`);
|
|
3329
|
-
ref = this._jobs;
|
|
3330
|
-
results = [];
|
|
3331
|
-
for (k in ref) {
|
|
3332
|
-
v = ref[k];
|
|
3333
|
-
if (v === pos) results.push(k);
|
|
3334
|
-
}
|
|
3335
|
-
return results;
|
|
3336
|
-
} else return Object.keys(this._jobs);
|
|
3337
|
-
}
|
|
3338
|
-
statusCounts() {
|
|
3339
|
-
return this.counts.reduce((acc, v, i) => {
|
|
3340
|
-
acc[this.status[i]] = v;
|
|
3341
|
-
return acc;
|
|
3342
|
-
}, {});
|
|
3343
|
-
}
|
|
3344
|
-
};
|
|
3345
|
-
}));
|
|
3346
|
-
//#endregion
|
|
3347
|
-
//#region ../../node_modules/bottleneck/lib/Sync.js
|
|
3348
|
-
var require_Sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3349
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
3350
|
-
try {
|
|
3351
|
-
var info = gen[key](arg);
|
|
3352
|
-
var value = info.value;
|
|
3353
|
-
} catch (error) {
|
|
3354
|
-
reject(error);
|
|
3355
|
-
return;
|
|
3356
|
-
}
|
|
3357
|
-
if (info.done) resolve(value);
|
|
3358
|
-
else Promise.resolve(value).then(_next, _throw);
|
|
3359
|
-
}
|
|
3360
|
-
function _asyncToGenerator(fn) {
|
|
3361
|
-
return function() {
|
|
3362
|
-
var self = this, args = arguments;
|
|
3363
|
-
return new Promise(function(resolve, reject) {
|
|
3364
|
-
var gen = fn.apply(self, args);
|
|
3365
|
-
function _next(value) {
|
|
3366
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
3367
|
-
}
|
|
3368
|
-
function _throw(err) {
|
|
3369
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
3370
|
-
}
|
|
3371
|
-
_next(void 0);
|
|
3372
|
-
});
|
|
3373
|
-
};
|
|
3374
|
-
}
|
|
3375
|
-
var DLList = require_DLList();
|
|
3376
|
-
module.exports = class Sync {
|
|
3377
|
-
constructor(name, Promise) {
|
|
3378
|
-
this.schedule = this.schedule.bind(this);
|
|
3379
|
-
this.name = name;
|
|
3380
|
-
this.Promise = Promise;
|
|
3381
|
-
this._running = 0;
|
|
3382
|
-
this._queue = new DLList();
|
|
3383
|
-
}
|
|
3384
|
-
isEmpty() {
|
|
3385
|
-
return this._queue.length === 0;
|
|
3386
|
-
}
|
|
3387
|
-
_tryToRun() {
|
|
3388
|
-
var _this = this;
|
|
3389
|
-
return _asyncToGenerator(function* () {
|
|
3390
|
-
var args, cb, error, reject, resolve, returned, task;
|
|
3391
|
-
if (_this._running < 1 && _this._queue.length > 0) {
|
|
3392
|
-
_this._running++;
|
|
3393
|
-
var _this$_queue$shift = _this._queue.shift();
|
|
3394
|
-
task = _this$_queue$shift.task;
|
|
3395
|
-
args = _this$_queue$shift.args;
|
|
3396
|
-
resolve = _this$_queue$shift.resolve;
|
|
3397
|
-
reject = _this$_queue$shift.reject;
|
|
3398
|
-
cb = yield _asyncToGenerator(function* () {
|
|
3399
|
-
try {
|
|
3400
|
-
returned = yield task(...args);
|
|
3401
|
-
return function() {
|
|
3402
|
-
return resolve(returned);
|
|
3403
|
-
};
|
|
3404
|
-
} catch (error1) {
|
|
3405
|
-
error = error1;
|
|
3406
|
-
return function() {
|
|
3407
|
-
return reject(error);
|
|
3408
|
-
};
|
|
3409
|
-
}
|
|
3410
|
-
})();
|
|
3411
|
-
_this._running--;
|
|
3412
|
-
_this._tryToRun();
|
|
3413
|
-
return cb();
|
|
3414
|
-
}
|
|
3415
|
-
})();
|
|
3416
|
-
}
|
|
3417
|
-
schedule(task, ...args) {
|
|
3418
|
-
var promise, reject, resolve = reject = null;
|
|
3419
|
-
promise = new this.Promise(function(_resolve, _reject) {
|
|
3420
|
-
resolve = _resolve;
|
|
3421
|
-
return reject = _reject;
|
|
3422
|
-
});
|
|
3423
|
-
this._queue.push({
|
|
3424
|
-
task,
|
|
3425
|
-
args,
|
|
3426
|
-
resolve,
|
|
3427
|
-
reject
|
|
3428
|
-
});
|
|
3429
|
-
this._tryToRun();
|
|
3430
|
-
return promise;
|
|
3431
|
-
}
|
|
3432
|
-
};
|
|
3433
|
-
}));
|
|
3434
|
-
//#endregion
|
|
3435
|
-
//#region ../../node_modules/bottleneck/lib/version.json
|
|
3436
|
-
var require_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3437
|
-
module.exports = { "version": "2.19.5" };
|
|
3438
|
-
}));
|
|
3439
|
-
//#endregion
|
|
3440
|
-
//#region ../../node_modules/bottleneck/lib/Group.js
|
|
3441
|
-
var require_Group = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3442
|
-
function _slicedToArray(arr, i) {
|
|
3443
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
|
3444
|
-
}
|
|
3445
|
-
function _nonIterableRest() {
|
|
3446
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
3447
|
-
}
|
|
3448
|
-
function _iterableToArrayLimit(arr, i) {
|
|
3449
|
-
var _arr = [];
|
|
3450
|
-
var _n = true;
|
|
3451
|
-
var _d = false;
|
|
3452
|
-
var _e = void 0;
|
|
3453
|
-
try {
|
|
3454
|
-
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
3455
|
-
_arr.push(_s.value);
|
|
3456
|
-
if (i && _arr.length === i) break;
|
|
3457
|
-
}
|
|
3458
|
-
} catch (err) {
|
|
3459
|
-
_d = true;
|
|
3460
|
-
_e = err;
|
|
3461
|
-
} finally {
|
|
3462
|
-
try {
|
|
3463
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
3464
|
-
} finally {
|
|
3465
|
-
if (_d) throw _e;
|
|
3466
|
-
}
|
|
3467
|
-
}
|
|
3468
|
-
return _arr;
|
|
3469
|
-
}
|
|
3470
|
-
function _arrayWithHoles(arr) {
|
|
3471
|
-
if (Array.isArray(arr)) return arr;
|
|
3472
|
-
}
|
|
3473
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
3474
|
-
try {
|
|
3475
|
-
var info = gen[key](arg);
|
|
3476
|
-
var value = info.value;
|
|
3477
|
-
} catch (error) {
|
|
3478
|
-
reject(error);
|
|
3479
|
-
return;
|
|
3480
|
-
}
|
|
3481
|
-
if (info.done) resolve(value);
|
|
3482
|
-
else Promise.resolve(value).then(_next, _throw);
|
|
3483
|
-
}
|
|
3484
|
-
function _asyncToGenerator(fn) {
|
|
3485
|
-
return function() {
|
|
3486
|
-
var self = this, args = arguments;
|
|
3487
|
-
return new Promise(function(resolve, reject) {
|
|
3488
|
-
var gen = fn.apply(self, args);
|
|
3489
|
-
function _next(value) {
|
|
3490
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
3491
|
-
}
|
|
3492
|
-
function _throw(err) {
|
|
3493
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
3494
|
-
}
|
|
3495
|
-
_next(void 0);
|
|
3496
|
-
});
|
|
3497
|
-
};
|
|
3498
|
-
}
|
|
3499
|
-
var Events, Group, IORedisConnection, RedisConnection, Scripts, parser = require_parser();
|
|
3500
|
-
Events = require_Events();
|
|
3501
|
-
RedisConnection = require_RedisConnection();
|
|
3502
|
-
IORedisConnection = require_IORedisConnection();
|
|
3503
|
-
Scripts = require_Scripts();
|
|
3504
|
-
Group = function() {
|
|
3505
|
-
class Group {
|
|
3506
|
-
constructor(limiterOptions = {}) {
|
|
3507
|
-
this.deleteKey = this.deleteKey.bind(this);
|
|
3508
|
-
this.limiterOptions = limiterOptions;
|
|
3509
|
-
parser.load(this.limiterOptions, this.defaults, this);
|
|
3510
|
-
this.Events = new Events(this);
|
|
3511
|
-
this.instances = {};
|
|
3512
|
-
this.Bottleneck = require_Bottleneck();
|
|
3513
|
-
this._startAutoCleanup();
|
|
3514
|
-
this.sharedConnection = this.connection != null;
|
|
3515
|
-
if (this.connection == null) {
|
|
3516
|
-
if (this.limiterOptions.datastore === "redis") this.connection = new RedisConnection(Object.assign({}, this.limiterOptions, { Events: this.Events }));
|
|
3517
|
-
else if (this.limiterOptions.datastore === "ioredis") this.connection = new IORedisConnection(Object.assign({}, this.limiterOptions, { Events: this.Events }));
|
|
3518
|
-
}
|
|
3519
|
-
}
|
|
3520
|
-
key(key = "") {
|
|
3521
|
-
var ref;
|
|
3522
|
-
return (ref = this.instances[key]) != null ? ref : (() => {
|
|
3523
|
-
var limiter = this.instances[key] = new this.Bottleneck(Object.assign(this.limiterOptions, {
|
|
3524
|
-
id: `${this.id}-${key}`,
|
|
3525
|
-
timeout: this.timeout,
|
|
3526
|
-
connection: this.connection
|
|
3527
|
-
}));
|
|
3528
|
-
this.Events.trigger("created", limiter, key);
|
|
3529
|
-
return limiter;
|
|
3530
|
-
})();
|
|
3531
|
-
}
|
|
3532
|
-
deleteKey(key = "") {
|
|
3533
|
-
var _this = this;
|
|
3534
|
-
return _asyncToGenerator(function* () {
|
|
3535
|
-
var deleted, instance = _this.instances[key];
|
|
3536
|
-
if (_this.connection) deleted = yield _this.connection.__runCommand__(["del", ...Scripts.allKeys(`${_this.id}-${key}`)]);
|
|
3537
|
-
if (instance != null) {
|
|
3538
|
-
delete _this.instances[key];
|
|
3539
|
-
yield instance.disconnect();
|
|
3540
|
-
}
|
|
3541
|
-
return instance != null || deleted > 0;
|
|
3542
|
-
})();
|
|
3543
|
-
}
|
|
3544
|
-
limiters() {
|
|
3545
|
-
var k, ref = this.instances, results = [], v;
|
|
3546
|
-
for (k in ref) {
|
|
3547
|
-
v = ref[k];
|
|
3548
|
-
results.push({
|
|
3549
|
-
key: k,
|
|
3550
|
-
limiter: v
|
|
3551
|
-
});
|
|
3552
|
-
}
|
|
3553
|
-
return results;
|
|
3554
|
-
}
|
|
3555
|
-
keys() {
|
|
3556
|
-
return Object.keys(this.instances);
|
|
3557
|
-
}
|
|
3558
|
-
clusterKeys() {
|
|
3559
|
-
var _this2 = this;
|
|
3560
|
-
return _asyncToGenerator(function* () {
|
|
3561
|
-
var cursor, end, found, i, k, keys, len, next, start;
|
|
3562
|
-
if (_this2.connection == null) return _this2.Promise.resolve(_this2.keys());
|
|
3563
|
-
keys = [];
|
|
3564
|
-
cursor = null;
|
|
3565
|
-
start = `b_${_this2.id}-`.length;
|
|
3566
|
-
end = 9;
|
|
3567
|
-
while (cursor !== 0) {
|
|
3568
|
-
var _ref2 = _slicedToArray(yield _this2.connection.__runCommand__([
|
|
3569
|
-
"scan",
|
|
3570
|
-
cursor != null ? cursor : 0,
|
|
3571
|
-
"match",
|
|
3572
|
-
`b_${_this2.id}-*_settings`,
|
|
3573
|
-
"count",
|
|
3574
|
-
1e4
|
|
3575
|
-
]), 2);
|
|
3576
|
-
next = _ref2[0];
|
|
3577
|
-
found = _ref2[1];
|
|
3578
|
-
cursor = ~~next;
|
|
3579
|
-
for (i = 0, len = found.length; i < len; i++) {
|
|
3580
|
-
k = found[i];
|
|
3581
|
-
keys.push(k.slice(start, -end));
|
|
3582
|
-
}
|
|
3583
|
-
}
|
|
3584
|
-
return keys;
|
|
3585
|
-
})();
|
|
3586
|
-
}
|
|
3587
|
-
_startAutoCleanup() {
|
|
3588
|
-
var _this3 = this;
|
|
3589
|
-
var base;
|
|
3590
|
-
clearInterval(this.interval);
|
|
3591
|
-
return typeof (base = this.interval = setInterval(/* @__PURE__ */ _asyncToGenerator(function* () {
|
|
3592
|
-
var e, k, ref, results, time = Date.now(), v;
|
|
3593
|
-
ref = _this3.instances;
|
|
3594
|
-
results = [];
|
|
3595
|
-
for (k in ref) {
|
|
3596
|
-
v = ref[k];
|
|
3597
|
-
try {
|
|
3598
|
-
if (yield v._store.__groupCheck__(time)) results.push(_this3.deleteKey(k));
|
|
3599
|
-
else results.push(void 0);
|
|
3600
|
-
} catch (error) {
|
|
3601
|
-
e = error;
|
|
3602
|
-
results.push(v.Events.trigger("error", e));
|
|
3603
|
-
}
|
|
3604
|
-
}
|
|
3605
|
-
return results;
|
|
3606
|
-
}), this.timeout / 2)).unref === "function" ? base.unref() : void 0;
|
|
3607
|
-
}
|
|
3608
|
-
updateSettings(options = {}) {
|
|
3609
|
-
parser.overwrite(options, this.defaults, this);
|
|
3610
|
-
parser.overwrite(options, options, this.limiterOptions);
|
|
3611
|
-
if (options.timeout != null) return this._startAutoCleanup();
|
|
3612
|
-
}
|
|
3613
|
-
disconnect(flush = true) {
|
|
3614
|
-
var ref;
|
|
3615
|
-
if (!this.sharedConnection) return (ref = this.connection) != null ? ref.disconnect(flush) : void 0;
|
|
3616
|
-
}
|
|
3617
|
-
}
|
|
3618
|
-
Group.prototype.defaults = {
|
|
3619
|
-
timeout: 1e3 * 60 * 5,
|
|
3620
|
-
connection: null,
|
|
3621
|
-
Promise,
|
|
3622
|
-
id: "group-key"
|
|
3623
|
-
};
|
|
3624
|
-
return Group;
|
|
3625
|
-
}.call(void 0);
|
|
3626
|
-
module.exports = Group;
|
|
3627
|
-
}));
|
|
3628
|
-
//#endregion
|
|
3629
|
-
//#region ../../node_modules/bottleneck/lib/Batcher.js
|
|
3630
|
-
var require_Batcher = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3631
|
-
var Batcher, Events, parser = require_parser();
|
|
3632
|
-
Events = require_Events();
|
|
3633
|
-
Batcher = function() {
|
|
3634
|
-
class Batcher {
|
|
3635
|
-
constructor(options = {}) {
|
|
3636
|
-
this.options = options;
|
|
3637
|
-
parser.load(this.options, this.defaults, this);
|
|
3638
|
-
this.Events = new Events(this);
|
|
3639
|
-
this._arr = [];
|
|
3640
|
-
this._resetPromise();
|
|
3641
|
-
this._lastFlush = Date.now();
|
|
3642
|
-
}
|
|
3643
|
-
_resetPromise() {
|
|
3644
|
-
return this._promise = new this.Promise((res, rej) => {
|
|
3645
|
-
return this._resolve = res;
|
|
3646
|
-
});
|
|
3647
|
-
}
|
|
3648
|
-
_flush() {
|
|
3649
|
-
clearTimeout(this._timeout);
|
|
3650
|
-
this._lastFlush = Date.now();
|
|
3651
|
-
this._resolve();
|
|
3652
|
-
this.Events.trigger("batch", this._arr);
|
|
3653
|
-
this._arr = [];
|
|
3654
|
-
return this._resetPromise();
|
|
3655
|
-
}
|
|
3656
|
-
add(data) {
|
|
3657
|
-
var ret;
|
|
3658
|
-
this._arr.push(data);
|
|
3659
|
-
ret = this._promise;
|
|
3660
|
-
if (this._arr.length === this.maxSize) this._flush();
|
|
3661
|
-
else if (this.maxTime != null && this._arr.length === 1) this._timeout = setTimeout(() => {
|
|
3662
|
-
return this._flush();
|
|
3663
|
-
}, this.maxTime);
|
|
3664
|
-
return ret;
|
|
3665
|
-
}
|
|
3666
|
-
}
|
|
3667
|
-
Batcher.prototype.defaults = {
|
|
3668
|
-
maxTime: null,
|
|
3669
|
-
maxSize: null,
|
|
3670
|
-
Promise
|
|
3671
|
-
};
|
|
3672
|
-
return Batcher;
|
|
3673
|
-
}.call(void 0);
|
|
3674
|
-
module.exports = Batcher;
|
|
3675
|
-
}));
|
|
3676
|
-
//#endregion
|
|
3677
|
-
//#region ../../node_modules/bottleneck/lib/Bottleneck.js
|
|
3678
|
-
var require_Bottleneck = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3679
|
-
function _slicedToArray(arr, i) {
|
|
3680
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
|
3681
|
-
}
|
|
3682
|
-
function _iterableToArrayLimit(arr, i) {
|
|
3683
|
-
var _arr = [];
|
|
3684
|
-
var _n = true;
|
|
3685
|
-
var _d = false;
|
|
3686
|
-
var _e = void 0;
|
|
3687
|
-
try {
|
|
3688
|
-
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
3689
|
-
_arr.push(_s.value);
|
|
3690
|
-
if (i && _arr.length === i) break;
|
|
3691
|
-
}
|
|
3692
|
-
} catch (err) {
|
|
3693
|
-
_d = true;
|
|
3694
|
-
_e = err;
|
|
3695
|
-
} finally {
|
|
3696
|
-
try {
|
|
3697
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
3698
|
-
} finally {
|
|
3699
|
-
if (_d) throw _e;
|
|
3700
|
-
}
|
|
3701
|
-
}
|
|
3702
|
-
return _arr;
|
|
3703
|
-
}
|
|
3704
|
-
function _toArray(arr) {
|
|
3705
|
-
return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest();
|
|
3706
|
-
}
|
|
3707
|
-
function _nonIterableRest() {
|
|
3708
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
3709
|
-
}
|
|
3710
|
-
function _iterableToArray(iter) {
|
|
3711
|
-
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
|
|
3712
|
-
}
|
|
3713
|
-
function _arrayWithHoles(arr) {
|
|
3714
|
-
if (Array.isArray(arr)) return arr;
|
|
3715
|
-
}
|
|
3716
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
3717
|
-
try {
|
|
3718
|
-
var info = gen[key](arg);
|
|
3719
|
-
var value = info.value;
|
|
3720
|
-
} catch (error) {
|
|
3721
|
-
reject(error);
|
|
3722
|
-
return;
|
|
3723
|
-
}
|
|
3724
|
-
if (info.done) resolve(value);
|
|
3725
|
-
else Promise.resolve(value).then(_next, _throw);
|
|
3726
|
-
}
|
|
3727
|
-
function _asyncToGenerator(fn) {
|
|
3728
|
-
return function() {
|
|
3729
|
-
var self = this, args = arguments;
|
|
3730
|
-
return new Promise(function(resolve, reject) {
|
|
3731
|
-
var gen = fn.apply(self, args);
|
|
3732
|
-
function _next(value) {
|
|
3733
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
3734
|
-
}
|
|
3735
|
-
function _throw(err) {
|
|
3736
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
3737
|
-
}
|
|
3738
|
-
_next(void 0);
|
|
3739
|
-
});
|
|
3740
|
-
};
|
|
3741
|
-
}
|
|
3742
|
-
var Bottleneck, DEFAULT_PRIORITY, Events, Job, LocalDatastore, NUM_PRIORITIES, Queues, RedisDatastore, States, Sync, parser, splice = [].splice;
|
|
3743
|
-
NUM_PRIORITIES = 10;
|
|
3744
|
-
DEFAULT_PRIORITY = 5;
|
|
3745
|
-
parser = require_parser();
|
|
3746
|
-
Queues = require_Queues();
|
|
3747
|
-
Job = require_Job();
|
|
3748
|
-
LocalDatastore = require_LocalDatastore();
|
|
3749
|
-
RedisDatastore = require_RedisDatastore();
|
|
3750
|
-
Events = require_Events();
|
|
3751
|
-
States = require_States();
|
|
3752
|
-
Sync = require_Sync();
|
|
3753
|
-
Bottleneck = function() {
|
|
3754
|
-
class Bottleneck {
|
|
3755
|
-
constructor(options = {}, ...invalid) {
|
|
3756
|
-
var storeInstanceOptions, storeOptions;
|
|
3757
|
-
this._addToQueue = this._addToQueue.bind(this);
|
|
3758
|
-
this._validateOptions(options, invalid);
|
|
3759
|
-
parser.load(options, this.instanceDefaults, this);
|
|
3760
|
-
this._queues = new Queues(NUM_PRIORITIES);
|
|
3761
|
-
this._scheduled = {};
|
|
3762
|
-
this._states = new States([
|
|
3763
|
-
"RECEIVED",
|
|
3764
|
-
"QUEUED",
|
|
3765
|
-
"RUNNING",
|
|
3766
|
-
"EXECUTING"
|
|
3767
|
-
].concat(this.trackDoneStatus ? ["DONE"] : []));
|
|
3768
|
-
this._limiter = null;
|
|
3769
|
-
this.Events = new Events(this);
|
|
3770
|
-
this._submitLock = new Sync("submit", this.Promise);
|
|
3771
|
-
this._registerLock = new Sync("register", this.Promise);
|
|
3772
|
-
storeOptions = parser.load(options, this.storeDefaults, {});
|
|
3773
|
-
this._store = function() {
|
|
3774
|
-
if (this.datastore === "redis" || this.datastore === "ioredis" || this.connection != null) {
|
|
3775
|
-
storeInstanceOptions = parser.load(options, this.redisStoreDefaults, {});
|
|
3776
|
-
return new RedisDatastore(this, storeOptions, storeInstanceOptions);
|
|
3777
|
-
} else if (this.datastore === "local") {
|
|
3778
|
-
storeInstanceOptions = parser.load(options, this.localStoreDefaults, {});
|
|
3779
|
-
return new LocalDatastore(this, storeOptions, storeInstanceOptions);
|
|
3780
|
-
} else throw new Bottleneck.prototype.BottleneckError(`Invalid datastore type: ${this.datastore}`);
|
|
3781
|
-
}.call(this);
|
|
3782
|
-
this._queues.on("leftzero", () => {
|
|
3783
|
-
var ref;
|
|
3784
|
-
return (ref = this._store.heartbeat) != null ? typeof ref.ref === "function" ? ref.ref() : void 0 : void 0;
|
|
3785
|
-
});
|
|
3786
|
-
this._queues.on("zero", () => {
|
|
3787
|
-
var ref;
|
|
3788
|
-
return (ref = this._store.heartbeat) != null ? typeof ref.unref === "function" ? ref.unref() : void 0 : void 0;
|
|
3789
|
-
});
|
|
3790
|
-
}
|
|
3791
|
-
_validateOptions(options, invalid) {
|
|
3792
|
-
if (!(options != null && typeof options === "object" && invalid.length === 0)) throw new Bottleneck.prototype.BottleneckError("Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1.");
|
|
3793
|
-
}
|
|
3794
|
-
ready() {
|
|
3795
|
-
return this._store.ready;
|
|
3796
|
-
}
|
|
3797
|
-
clients() {
|
|
3798
|
-
return this._store.clients;
|
|
3799
|
-
}
|
|
3800
|
-
channel() {
|
|
3801
|
-
return `b_${this.id}`;
|
|
3802
|
-
}
|
|
3803
|
-
channel_client() {
|
|
3804
|
-
return `b_${this.id}_${this._store.clientId}`;
|
|
3805
|
-
}
|
|
3806
|
-
publish(message) {
|
|
3807
|
-
return this._store.__publish__(message);
|
|
3808
|
-
}
|
|
3809
|
-
disconnect(flush = true) {
|
|
3810
|
-
return this._store.__disconnect__(flush);
|
|
3811
|
-
}
|
|
3812
|
-
chain(_limiter) {
|
|
3813
|
-
this._limiter = _limiter;
|
|
3814
|
-
return this;
|
|
3815
|
-
}
|
|
3816
|
-
queued(priority) {
|
|
3817
|
-
return this._queues.queued(priority);
|
|
3818
|
-
}
|
|
3819
|
-
clusterQueued() {
|
|
3820
|
-
return this._store.__queued__();
|
|
3821
|
-
}
|
|
3822
|
-
empty() {
|
|
3823
|
-
return this.queued() === 0 && this._submitLock.isEmpty();
|
|
3824
|
-
}
|
|
3825
|
-
running() {
|
|
3826
|
-
return this._store.__running__();
|
|
3827
|
-
}
|
|
3828
|
-
done() {
|
|
3829
|
-
return this._store.__done__();
|
|
3830
|
-
}
|
|
3831
|
-
jobStatus(id) {
|
|
3832
|
-
return this._states.jobStatus(id);
|
|
3833
|
-
}
|
|
3834
|
-
jobs(status) {
|
|
3835
|
-
return this._states.statusJobs(status);
|
|
3836
|
-
}
|
|
3837
|
-
counts() {
|
|
3838
|
-
return this._states.statusCounts();
|
|
3839
|
-
}
|
|
3840
|
-
_randomIndex() {
|
|
3841
|
-
return Math.random().toString(36).slice(2);
|
|
3842
|
-
}
|
|
3843
|
-
check(weight = 1) {
|
|
3844
|
-
return this._store.__check__(weight);
|
|
3845
|
-
}
|
|
3846
|
-
_clearGlobalState(index) {
|
|
3847
|
-
if (this._scheduled[index] != null) {
|
|
3848
|
-
clearTimeout(this._scheduled[index].expiration);
|
|
3849
|
-
delete this._scheduled[index];
|
|
3850
|
-
return true;
|
|
3851
|
-
} else return false;
|
|
3852
|
-
}
|
|
3853
|
-
_free(index, job, options, eventInfo) {
|
|
3854
|
-
var _this = this;
|
|
3855
|
-
return _asyncToGenerator(function* () {
|
|
3856
|
-
var e, running;
|
|
3857
|
-
try {
|
|
3858
|
-
running = (yield _this._store.__free__(index, options.weight)).running;
|
|
3859
|
-
_this.Events.trigger("debug", `Freed ${options.id}`, eventInfo);
|
|
3860
|
-
if (running === 0 && _this.empty()) return _this.Events.trigger("idle");
|
|
3861
|
-
} catch (error1) {
|
|
3862
|
-
e = error1;
|
|
3863
|
-
return _this.Events.trigger("error", e);
|
|
3864
|
-
}
|
|
3865
|
-
})();
|
|
3866
|
-
}
|
|
3867
|
-
_run(index, job, wait) {
|
|
3868
|
-
var clearGlobalState, free, run;
|
|
3869
|
-
job.doRun();
|
|
3870
|
-
clearGlobalState = this._clearGlobalState.bind(this, index);
|
|
3871
|
-
run = this._run.bind(this, index, job);
|
|
3872
|
-
free = this._free.bind(this, index, job);
|
|
3873
|
-
return this._scheduled[index] = {
|
|
3874
|
-
timeout: setTimeout(() => {
|
|
3875
|
-
return job.doExecute(this._limiter, clearGlobalState, run, free);
|
|
3876
|
-
}, wait),
|
|
3877
|
-
expiration: job.options.expiration != null ? setTimeout(function() {
|
|
3878
|
-
return job.doExpire(clearGlobalState, run, free);
|
|
3879
|
-
}, wait + job.options.expiration) : void 0,
|
|
3880
|
-
job
|
|
3881
|
-
};
|
|
3882
|
-
}
|
|
3883
|
-
_drainOne(capacity) {
|
|
3884
|
-
return this._registerLock.schedule(() => {
|
|
3885
|
-
var args, index, next, options, queue;
|
|
3886
|
-
if (this.queued() === 0) return this.Promise.resolve(null);
|
|
3887
|
-
queue = this._queues.getFirst();
|
|
3888
|
-
var _next2 = next = queue.first();
|
|
3889
|
-
options = _next2.options;
|
|
3890
|
-
args = _next2.args;
|
|
3891
|
-
if (capacity != null && options.weight > capacity) return this.Promise.resolve(null);
|
|
3892
|
-
this.Events.trigger("debug", `Draining ${options.id}`, {
|
|
3893
|
-
args,
|
|
3894
|
-
options
|
|
3895
|
-
});
|
|
3896
|
-
index = this._randomIndex();
|
|
3897
|
-
return this._store.__register__(index, options.weight, options.expiration).then(({ success, wait, reservoir }) => {
|
|
3898
|
-
var empty;
|
|
3899
|
-
this.Events.trigger("debug", `Drained ${options.id}`, {
|
|
3900
|
-
success,
|
|
3901
|
-
args,
|
|
3902
|
-
options
|
|
3903
|
-
});
|
|
3904
|
-
if (success) {
|
|
3905
|
-
queue.shift();
|
|
3906
|
-
empty = this.empty();
|
|
3907
|
-
if (empty) this.Events.trigger("empty");
|
|
3908
|
-
if (reservoir === 0) this.Events.trigger("depleted", empty);
|
|
3909
|
-
this._run(index, next, wait);
|
|
3910
|
-
return this.Promise.resolve(options.weight);
|
|
3911
|
-
} else return this.Promise.resolve(null);
|
|
3912
|
-
});
|
|
3913
|
-
});
|
|
3914
|
-
}
|
|
3915
|
-
_drainAll(capacity, total = 0) {
|
|
3916
|
-
return this._drainOne(capacity).then((drained) => {
|
|
3917
|
-
var newCapacity;
|
|
3918
|
-
if (drained != null) {
|
|
3919
|
-
newCapacity = capacity != null ? capacity - drained : capacity;
|
|
3920
|
-
return this._drainAll(newCapacity, total + drained);
|
|
3921
|
-
} else return this.Promise.resolve(total);
|
|
3922
|
-
}).catch((e) => {
|
|
3923
|
-
return this.Events.trigger("error", e);
|
|
3924
|
-
});
|
|
3925
|
-
}
|
|
3926
|
-
_dropAllQueued(message) {
|
|
3927
|
-
return this._queues.shiftAll(function(job) {
|
|
3928
|
-
return job.doDrop({ message });
|
|
3929
|
-
});
|
|
3930
|
-
}
|
|
3931
|
-
stop(options = {}) {
|
|
3932
|
-
var done, waitForExecuting;
|
|
3933
|
-
options = parser.load(options, this.stopDefaults);
|
|
3934
|
-
waitForExecuting = (at) => {
|
|
3935
|
-
var finished = () => {
|
|
3936
|
-
var counts = this._states.counts;
|
|
3937
|
-
return counts[0] + counts[1] + counts[2] + counts[3] === at;
|
|
3938
|
-
};
|
|
3939
|
-
return new this.Promise((resolve, reject) => {
|
|
3940
|
-
if (finished()) return resolve();
|
|
3941
|
-
else return this.on("done", () => {
|
|
3942
|
-
if (finished()) {
|
|
3943
|
-
this.removeAllListeners("done");
|
|
3944
|
-
return resolve();
|
|
3945
|
-
}
|
|
3946
|
-
});
|
|
3947
|
-
});
|
|
3948
|
-
};
|
|
3949
|
-
done = options.dropWaitingJobs ? (this._run = function(index, next) {
|
|
3950
|
-
return next.doDrop({ message: options.dropErrorMessage });
|
|
3951
|
-
}, this._drainOne = () => {
|
|
3952
|
-
return this.Promise.resolve(null);
|
|
3953
|
-
}, this._registerLock.schedule(() => {
|
|
3954
|
-
return this._submitLock.schedule(() => {
|
|
3955
|
-
var k, ref = this._scheduled, v;
|
|
3956
|
-
for (k in ref) {
|
|
3957
|
-
v = ref[k];
|
|
3958
|
-
if (this.jobStatus(v.job.options.id) === "RUNNING") {
|
|
3959
|
-
clearTimeout(v.timeout);
|
|
3960
|
-
clearTimeout(v.expiration);
|
|
3961
|
-
v.job.doDrop({ message: options.dropErrorMessage });
|
|
3962
|
-
}
|
|
3963
|
-
}
|
|
3964
|
-
this._dropAllQueued(options.dropErrorMessage);
|
|
3965
|
-
return waitForExecuting(0);
|
|
3966
|
-
});
|
|
3967
|
-
})) : this.schedule({
|
|
3968
|
-
priority: NUM_PRIORITIES - 1,
|
|
3969
|
-
weight: 0
|
|
3970
|
-
}, () => {
|
|
3971
|
-
return waitForExecuting(1);
|
|
3972
|
-
});
|
|
3973
|
-
this._receive = function(job) {
|
|
3974
|
-
return job._reject(new Bottleneck.prototype.BottleneckError(options.enqueueErrorMessage));
|
|
3975
|
-
};
|
|
3976
|
-
this.stop = () => {
|
|
3977
|
-
return this.Promise.reject(new Bottleneck.prototype.BottleneckError("stop() has already been called"));
|
|
3978
|
-
};
|
|
3979
|
-
return done;
|
|
3980
|
-
}
|
|
3981
|
-
_addToQueue(job) {
|
|
3982
|
-
var _this2 = this;
|
|
3983
|
-
return _asyncToGenerator(function* () {
|
|
3984
|
-
var args = job.args, blocked, error, options = job.options, reachedHWM, shifted, strategy;
|
|
3985
|
-
try {
|
|
3986
|
-
var _ref2 = yield _this2._store.__submit__(_this2.queued(), options.weight);
|
|
3987
|
-
reachedHWM = _ref2.reachedHWM;
|
|
3988
|
-
blocked = _ref2.blocked;
|
|
3989
|
-
strategy = _ref2.strategy;
|
|
3990
|
-
} catch (error1) {
|
|
3991
|
-
error = error1;
|
|
3992
|
-
_this2.Events.trigger("debug", `Could not queue ${options.id}`, {
|
|
3993
|
-
args,
|
|
3994
|
-
options,
|
|
3995
|
-
error
|
|
3996
|
-
});
|
|
3997
|
-
job.doDrop({ error });
|
|
3998
|
-
return false;
|
|
3999
|
-
}
|
|
4000
|
-
if (blocked) {
|
|
4001
|
-
job.doDrop();
|
|
4002
|
-
return true;
|
|
4003
|
-
} else if (reachedHWM) {
|
|
4004
|
-
shifted = strategy === Bottleneck.prototype.strategy.LEAK ? _this2._queues.shiftLastFrom(options.priority) : strategy === Bottleneck.prototype.strategy.OVERFLOW_PRIORITY ? _this2._queues.shiftLastFrom(options.priority + 1) : strategy === Bottleneck.prototype.strategy.OVERFLOW ? job : void 0;
|
|
4005
|
-
if (shifted != null) shifted.doDrop();
|
|
4006
|
-
if (shifted == null || strategy === Bottleneck.prototype.strategy.OVERFLOW) {
|
|
4007
|
-
if (shifted == null) job.doDrop();
|
|
4008
|
-
return reachedHWM;
|
|
4009
|
-
}
|
|
4010
|
-
}
|
|
4011
|
-
job.doQueue(reachedHWM, blocked);
|
|
4012
|
-
_this2._queues.push(job);
|
|
4013
|
-
yield _this2._drainAll();
|
|
4014
|
-
return reachedHWM;
|
|
4015
|
-
})();
|
|
4016
|
-
}
|
|
4017
|
-
_receive(job) {
|
|
4018
|
-
if (this._states.jobStatus(job.options.id) != null) {
|
|
4019
|
-
job._reject(new Bottleneck.prototype.BottleneckError(`A job with the same id already exists (id=${job.options.id})`));
|
|
4020
|
-
return false;
|
|
4021
|
-
} else {
|
|
4022
|
-
job.doReceive();
|
|
4023
|
-
return this._submitLock.schedule(this._addToQueue, job);
|
|
4024
|
-
}
|
|
4025
|
-
}
|
|
4026
|
-
submit(...args) {
|
|
4027
|
-
var cb, fn, job, options, ref, ref1, task;
|
|
4028
|
-
if (typeof args[0] === "function") {
|
|
4029
|
-
var _ref3, _ref4, _splice$call, _splice$call2;
|
|
4030
|
-
ref = args, _ref3 = ref, _ref4 = _toArray(_ref3), fn = _ref4[0], args = _ref4.slice(1), _splice$call = splice.call(args, -1), _splice$call2 = _slicedToArray(_splice$call, 1), cb = _splice$call2[0];
|
|
4031
|
-
options = parser.load({}, this.jobDefaults);
|
|
4032
|
-
} else {
|
|
4033
|
-
var _ref5, _ref6, _splice$call3, _splice$call4;
|
|
4034
|
-
ref1 = args, _ref5 = ref1, _ref6 = _toArray(_ref5), options = _ref6[0], fn = _ref6[1], args = _ref6.slice(2), _splice$call3 = splice.call(args, -1), _splice$call4 = _slicedToArray(_splice$call3, 1), cb = _splice$call4[0];
|
|
4035
|
-
options = parser.load(options, this.jobDefaults);
|
|
4036
|
-
}
|
|
4037
|
-
task = (...args) => {
|
|
4038
|
-
return new this.Promise(function(resolve, reject) {
|
|
4039
|
-
return fn(...args, function(...args) {
|
|
4040
|
-
return (args[0] != null ? reject : resolve)(args);
|
|
4041
|
-
});
|
|
4042
|
-
});
|
|
4043
|
-
};
|
|
4044
|
-
job = new Job(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise);
|
|
4045
|
-
job.promise.then(function(args) {
|
|
4046
|
-
return typeof cb === "function" ? cb(...args) : void 0;
|
|
4047
|
-
}).catch(function(args) {
|
|
4048
|
-
if (Array.isArray(args)) return typeof cb === "function" ? cb(...args) : void 0;
|
|
4049
|
-
else return typeof cb === "function" ? cb(args) : void 0;
|
|
4050
|
-
});
|
|
4051
|
-
return this._receive(job);
|
|
4052
|
-
}
|
|
4053
|
-
schedule(...args) {
|
|
4054
|
-
var job, options, task;
|
|
4055
|
-
if (typeof args[0] === "function") {
|
|
4056
|
-
var _args2 = _toArray(args);
|
|
4057
|
-
task = _args2[0];
|
|
4058
|
-
args = _args2.slice(1);
|
|
4059
|
-
options = {};
|
|
4060
|
-
} else {
|
|
4061
|
-
var _args4 = _toArray(args);
|
|
4062
|
-
options = _args4[0];
|
|
4063
|
-
task = _args4[1];
|
|
4064
|
-
args = _args4.slice(2);
|
|
4065
|
-
}
|
|
4066
|
-
job = new Job(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise);
|
|
4067
|
-
this._receive(job);
|
|
4068
|
-
return job.promise;
|
|
4069
|
-
}
|
|
4070
|
-
wrap(fn) {
|
|
4071
|
-
var schedule = this.schedule.bind(this), wrapped = function wrapped(...args) {
|
|
4072
|
-
return schedule(fn.bind(this), ...args);
|
|
4073
|
-
};
|
|
4074
|
-
wrapped.withOptions = function(options, ...args) {
|
|
4075
|
-
return schedule(options, fn, ...args);
|
|
4076
|
-
};
|
|
4077
|
-
return wrapped;
|
|
4078
|
-
}
|
|
4079
|
-
updateSettings(options = {}) {
|
|
4080
|
-
var _this3 = this;
|
|
4081
|
-
return _asyncToGenerator(function* () {
|
|
4082
|
-
yield _this3._store.__updateSettings__(parser.overwrite(options, _this3.storeDefaults));
|
|
4083
|
-
parser.overwrite(options, _this3.instanceDefaults, _this3);
|
|
4084
|
-
return _this3;
|
|
4085
|
-
})();
|
|
4086
|
-
}
|
|
4087
|
-
currentReservoir() {
|
|
4088
|
-
return this._store.__currentReservoir__();
|
|
4089
|
-
}
|
|
4090
|
-
incrementReservoir(incr = 0) {
|
|
4091
|
-
return this._store.__incrementReservoir__(incr);
|
|
4092
|
-
}
|
|
4093
|
-
}
|
|
4094
|
-
Bottleneck.default = Bottleneck;
|
|
4095
|
-
Bottleneck.Events = Events;
|
|
4096
|
-
Bottleneck.version = Bottleneck.prototype.version = require_version().version;
|
|
4097
|
-
Bottleneck.strategy = Bottleneck.prototype.strategy = {
|
|
4098
|
-
LEAK: 1,
|
|
4099
|
-
OVERFLOW: 2,
|
|
4100
|
-
OVERFLOW_PRIORITY: 4,
|
|
4101
|
-
BLOCK: 3
|
|
4102
|
-
};
|
|
4103
|
-
Bottleneck.BottleneckError = Bottleneck.prototype.BottleneckError = require_BottleneckError();
|
|
4104
|
-
Bottleneck.Group = Bottleneck.prototype.Group = require_Group();
|
|
4105
|
-
Bottleneck.RedisConnection = Bottleneck.prototype.RedisConnection = require_RedisConnection();
|
|
4106
|
-
Bottleneck.IORedisConnection = Bottleneck.prototype.IORedisConnection = require_IORedisConnection();
|
|
4107
|
-
Bottleneck.Batcher = Bottleneck.prototype.Batcher = require_Batcher();
|
|
4108
|
-
Bottleneck.prototype.jobDefaults = {
|
|
4109
|
-
priority: DEFAULT_PRIORITY,
|
|
4110
|
-
weight: 1,
|
|
4111
|
-
expiration: null,
|
|
4112
|
-
id: "<no-id>"
|
|
4113
|
-
};
|
|
4114
|
-
Bottleneck.prototype.storeDefaults = {
|
|
4115
|
-
maxConcurrent: null,
|
|
4116
|
-
minTime: 0,
|
|
4117
|
-
highWater: null,
|
|
4118
|
-
strategy: Bottleneck.prototype.strategy.LEAK,
|
|
4119
|
-
penalty: null,
|
|
4120
|
-
reservoir: null,
|
|
4121
|
-
reservoirRefreshInterval: null,
|
|
4122
|
-
reservoirRefreshAmount: null,
|
|
4123
|
-
reservoirIncreaseInterval: null,
|
|
4124
|
-
reservoirIncreaseAmount: null,
|
|
4125
|
-
reservoirIncreaseMaximum: null
|
|
4126
|
-
};
|
|
4127
|
-
Bottleneck.prototype.localStoreDefaults = {
|
|
4128
|
-
Promise,
|
|
4129
|
-
timeout: null,
|
|
4130
|
-
heartbeatInterval: 250
|
|
4131
|
-
};
|
|
4132
|
-
Bottleneck.prototype.redisStoreDefaults = {
|
|
4133
|
-
Promise,
|
|
4134
|
-
timeout: null,
|
|
4135
|
-
heartbeatInterval: 5e3,
|
|
4136
|
-
clientTimeout: 1e4,
|
|
4137
|
-
Redis: null,
|
|
4138
|
-
clientOptions: {},
|
|
4139
|
-
clusterNodes: null,
|
|
4140
|
-
clearDatastore: false,
|
|
4141
|
-
connection: null
|
|
4142
|
-
};
|
|
4143
|
-
Bottleneck.prototype.instanceDefaults = {
|
|
4144
|
-
datastore: "local",
|
|
4145
|
-
connection: null,
|
|
4146
|
-
id: "<no-id>",
|
|
4147
|
-
rejectOnDrop: true,
|
|
4148
|
-
trackDoneStatus: false,
|
|
4149
|
-
Promise
|
|
4150
|
-
};
|
|
4151
|
-
Bottleneck.prototype.stopDefaults = {
|
|
4152
|
-
enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs.",
|
|
4153
|
-
dropWaitingJobs: true,
|
|
4154
|
-
dropErrorMessage: "This limiter has been stopped."
|
|
4155
|
-
};
|
|
4156
|
-
return Bottleneck;
|
|
4157
|
-
}.call(void 0);
|
|
4158
|
-
module.exports = Bottleneck;
|
|
4159
|
-
}));
|
|
4160
|
-
//#endregion
|
|
4161
|
-
//#region ../../node_modules/bottleneck/lib/index.js
|
|
4162
|
-
var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4163
|
-
module.exports = require_Bottleneck();
|
|
4164
|
-
}));
|
|
4165
|
-
//#endregion
|
|
4166
|
-
//#region ../../packages/lib/cardano-provider-core/src/blockfrost-config.ts
|
|
4167
|
-
var import_lib = /* @__PURE__ */ __toESM(require_lib());
|
|
4168
|
-
const computeBlockfrostConfigIdentifier = ({ clientConfig: { baseUrl, projectId } }) => `${baseUrl}-${projectId}`;
|
|
4169
|
-
const getBlockfrostClient = memoize(({ clientConfig, rateLimiterConfig }) => {
|
|
4170
|
-
const rateLimiter = new import_lib.default({
|
|
4171
|
-
reservoir: rateLimiterConfig.size,
|
|
4172
|
-
reservoirIncreaseAmount: rateLimiterConfig.increaseAmount,
|
|
4173
|
-
reservoirIncreaseInterval: rateLimiterConfig.increaseInterval,
|
|
4174
|
-
reservoirIncreaseMaximum: rateLimiterConfig.size
|
|
4175
|
-
});
|
|
4176
|
-
return new HttpClient({
|
|
4177
|
-
baseUrl: buildUrl(["api", clientConfig.apiVersion], clientConfig.baseUrl),
|
|
4178
|
-
requestInit: { headers: { ...clientConfig.projectId && { project_id: clientConfig.projectId } } }
|
|
4179
|
-
}, { rateLimiter });
|
|
4180
|
-
}, computeBlockfrostConfigIdentifier);
|
|
4181
|
-
//#endregion
|
|
4182
|
-
//#region ../../packages/lib/ui-toolkit/src/design-system/atoms/icons/urls.ts
|
|
4183
|
-
const cardanoIconDataUrl = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA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g8N73WV7x9YVAADUsGQwY9qHe6svnes98DMOFVZnURLGYjAmVk73pvWSMFbcywcAgJGQr126TzghHg4WDnoQDG4aiI89GTZhK3/uhP4Z4QxHKN1ssboUmQMAQDTCQbLprh7hjDxnrnzwKWfk55wpWOxELxcFHwZfOqvPHvyy57AeAADUhTBpzUyOHdYz8lRn9A3OyGnO6Jec1UvmTqM399e80YsHvjCyIfim35WnhP4NTPQAAJB898LwRnwoJ7iOPNcZebMz0nVWzgo3EryRy+pYWpj7my8NJ+/Dt8x9U7h2+XeDb52UlXTVAwAAmMeZg77Vu4fJs2/1yc7q8/tWXuOMrvFGJwYH4Kx8MvQ1CDcXwh13Z/Sn4Rd2eKlutof9rDkr/dv+Gpf+zf8/c6/bhV/nPx3clw+3IQb/7cG/cfrg3zS6ZvZvaB83+JuMPDT8jeFvZUABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACyefP/AW+JrlkghFKpAAAAAElFTkSuQmCC";
|
|
4185
|
-
const Blockchains = {
|
|
4186
|
-
Cardano: cardanoIconDataUrl,
|
|
4187
|
-
Bitcoin: bitcoinIconDataUrl
|
|
4188
|
-
};
|
|
4189
|
-
//#endregion
|
|
4190
|
-
//#region ../../packages/module/cardano-provider-blockfrost/src/store/dependencies.ts
|
|
4191
|
-
const getNetworkInfoProvider = memoize((config, logger) => {
|
|
4192
|
-
return new BlockfrostNetworkInfoProvider(getBlockfrostClient(config), logger);
|
|
4193
|
-
}, computeBlockfrostConfigIdentifier);
|
|
4194
|
-
const getAssetProvider = memoize((config, logger) => {
|
|
4195
|
-
return new BlockfrostAssetProvider(getBlockfrostClient(config), logger);
|
|
4196
|
-
}, computeBlockfrostConfigIdentifier);
|
|
4197
|
-
const getAddressDiscoveryProvider = memoize((config, logger) => {
|
|
4198
|
-
return new BlockfrostAddressDiscovery(getBlockfrostClient(config), logger);
|
|
4199
|
-
}, computeBlockfrostConfigIdentifier);
|
|
4200
|
-
const getInputResolverProvider = memoize((config, logger) => {
|
|
4201
|
-
return new BlockfrostInputResolverProvider(getBlockfrostClient(config), logger);
|
|
4202
|
-
}, computeBlockfrostConfigIdentifier);
|
|
4203
|
-
const getTokensProvider = memoize((config, logger) => {
|
|
4204
|
-
return new BlockfrostTokensProvider(getBlockfrostClient(config), logger);
|
|
4205
|
-
}, computeBlockfrostConfigIdentifier);
|
|
4206
|
-
const getAccountActivityProvider = memoize((config, logger) => {
|
|
4207
|
-
return new BlockfrostActivityProvider(getBlockfrostClient(config), logger);
|
|
4208
|
-
}, computeBlockfrostConfigIdentifier);
|
|
4209
|
-
const getAccountRewardsProvider = memoize((config, logger) => {
|
|
4210
|
-
return new BlockfrostRewardsProvider(getBlockfrostClient(config), logger);
|
|
4211
|
-
}, computeBlockfrostConfigIdentifier);
|
|
4212
|
-
const getAccountDelegationsProvider = memoize((config, logger) => {
|
|
4213
|
-
return new BlockfrostDelegationsProvider(getBlockfrostClient(config), logger);
|
|
4214
|
-
}, computeBlockfrostConfigIdentifier);
|
|
4215
|
-
const getAccountRegistrationsProvider = memoize((config, logger) => {
|
|
4216
|
-
return new BlockfrostRegistrationsProvider(getBlockfrostClient(config), logger);
|
|
4217
|
-
}, computeBlockfrostConfigIdentifier);
|
|
4218
|
-
const getAccountWithdrawalsProvider = memoize((config, logger) => {
|
|
4219
|
-
return new BlockfrostWithdrawalsProvider(getBlockfrostClient(config), logger);
|
|
4220
|
-
}, computeBlockfrostConfigIdentifier);
|
|
4221
|
-
const getStakePoolProvider = memoize((config, logger) => {
|
|
4222
|
-
return new BlockfrostStakePoolProvider(getBlockfrostClient(config), logger);
|
|
4223
|
-
}, computeBlockfrostConfigIdentifier);
|
|
4224
|
-
const getUtxoProvider = memoize((config, logger) => {
|
|
4225
|
-
return new BlockfrostUtxoProvider(getBlockfrostClient(config), logger);
|
|
4226
|
-
}, computeBlockfrostConfigIdentifier);
|
|
4227
|
-
const getTxSubmitProvider = memoize((config, logger) => {
|
|
4228
|
-
return new BlockfrostTxSubmitProvider(getBlockfrostClient(config), logger);
|
|
4229
|
-
}, computeBlockfrostConfigIdentifier);
|
|
4230
|
-
const getTxEvaluationProvider = memoize((config, logger) => {
|
|
4231
|
-
return new BlockfrostTxEvaluationProvider(getBlockfrostClient(config), logger);
|
|
4232
|
-
}, computeBlockfrostConfigIdentifier);
|
|
4233
|
-
const getGovernanceProvider = memoize((config, logger) => {
|
|
4234
|
-
return new BlockfrostGovernanceProvider(getBlockfrostClient(config), logger);
|
|
4235
|
-
}, computeBlockfrostConfigIdentifier);
|
|
4236
|
-
const getBlockfrostConfig = (context, configs) => {
|
|
4237
|
-
const config = configs[context.chainId.networkMagic];
|
|
4238
|
-
if (!config) throw new Error(`Assertion failed: no blockfrost config found (${context.chainId.networkMagic}`);
|
|
4239
|
-
return config;
|
|
4240
|
-
};
|
|
4241
|
-
const initializeDependencies = async ({ runtime: { config: { cardanoProvider: { blockfrostConfigs } } }, loadModules }, { logger }) => {
|
|
4242
|
-
const bip32Ed25519 = (await loadModules("addons.bip32Ed25519"))[0];
|
|
4243
|
-
const dependencies = {
|
|
4244
|
-
blake2b: (await loadModules("addons.blake2b"))[0],
|
|
4245
|
-
bip32Ed25519
|
|
4246
|
-
};
|
|
4247
|
-
return {
|
|
4248
|
-
cardanoProvider: {
|
|
4249
|
-
getTip: (context) => {
|
|
4250
|
-
return from(getNetworkInfoProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).ledgerTip().then(Ok).catch(Err));
|
|
4251
|
-
},
|
|
4252
|
-
getProtocolParameters: (context) => {
|
|
4253
|
-
const provider = getNetworkInfoProvider(getBlockfrostConfig(context, blockfrostConfigs), logger);
|
|
4254
|
-
return defer(async () => provider.protocolParameters().then(Ok).catch(Err));
|
|
4255
|
-
},
|
|
4256
|
-
getEraSummaries: (context) => {
|
|
4257
|
-
const provider = getNetworkInfoProvider(getBlockfrostConfig(context, blockfrostConfigs), logger);
|
|
4258
|
-
return defer(async () => provider.eraSummaries().then(Ok).catch(Err));
|
|
4259
|
-
},
|
|
4260
|
-
discoverAddresses: ({ xpub, accountIndex, thorough }, context) => {
|
|
4261
|
-
const provider = getAddressDiscoveryProvider(getBlockfrostConfig(context, blockfrostConfigs), logger);
|
|
4262
|
-
const account = new Bip32Account({
|
|
4263
|
-
extendedAccountPublicKey: xpub,
|
|
4264
|
-
chainId: context.chainId,
|
|
4265
|
-
accountIndex
|
|
4266
|
-
}, dependencies);
|
|
4267
|
-
return provider.discover(account, { thorough }).pipe(map((result) => result.map((address) => toContractAddress(address, context.chainId.networkMagic))));
|
|
4268
|
-
},
|
|
4269
|
-
getTokenMetadata: ({ tokenId }, context) => {
|
|
4270
|
-
if (tokenId === LOVELACE_TOKEN_ID) {
|
|
4271
|
-
const ticker = getAdaTokenTickerByNetwork(cardanoNetworkMagicToNetworkType(context.chainId.networkMagic));
|
|
4272
|
-
return of(Ok({
|
|
4273
|
-
...LOVELACE_METADATA,
|
|
4274
|
-
ticker,
|
|
4275
|
-
image: Blockchains.Cardano
|
|
4276
|
-
}));
|
|
4277
|
-
}
|
|
4278
|
-
const provider = getAssetProvider(getBlockfrostConfig(context, blockfrostConfigs), logger);
|
|
4279
|
-
const assetId = AssetId(tokenId);
|
|
4280
|
-
return defer(async () => provider.getAsset({
|
|
4281
|
-
assetId,
|
|
4282
|
-
extraData: {
|
|
4283
|
-
nftMetadata: true,
|
|
4284
|
-
tokenMetadata: true
|
|
4285
|
-
}
|
|
4286
|
-
}).then((assetInfo) => Ok(toContractTokenMetadata(assetInfo))).catch(Err));
|
|
4287
|
-
},
|
|
4288
|
-
getTokens: (props, context) => {
|
|
4289
|
-
return getTokensProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).getTokens(props);
|
|
4290
|
-
},
|
|
4291
|
-
getAccountRewards: (props, context) => {
|
|
4292
|
-
return getAccountRewardsProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).getAccountRewards(props);
|
|
4293
|
-
},
|
|
4294
|
-
getAccountDelegations: (props, context) => {
|
|
4295
|
-
return getAccountDelegationsProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).getAccountDelegations(props);
|
|
4296
|
-
},
|
|
4297
|
-
getAccountRegistrations: (props, context) => {
|
|
4298
|
-
return getAccountRegistrationsProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).getAccountRegistrations(props);
|
|
4299
|
-
},
|
|
4300
|
-
getAccountWithdrawals: (props, context) => {
|
|
4301
|
-
return getAccountWithdrawalsProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).getAccountWithdrawals(props);
|
|
4302
|
-
},
|
|
4303
|
-
getRewardAccountInfo: (props, context) => {
|
|
4304
|
-
return getAccountRewardsProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).getRewardAccountInfo(props);
|
|
4305
|
-
},
|
|
4306
|
-
getAccountUtxos: (props, context) => {
|
|
4307
|
-
return getUtxoProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).getAccountUtxos(props);
|
|
4308
|
-
},
|
|
4309
|
-
getUtxosAtAddress: (props, context) => {
|
|
4310
|
-
return getUtxoProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).getUtxosAtAddress(props);
|
|
4311
|
-
},
|
|
4312
|
-
getAddressTransactionHistory: (props, context) => {
|
|
4313
|
-
return getAccountActivityProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).getAddressTransactionHistory(props);
|
|
4314
|
-
},
|
|
4315
|
-
getTransactionDetails: (txId, context) => {
|
|
4316
|
-
return getAccountActivityProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).getTransactionDetails(txId);
|
|
4317
|
-
},
|
|
4318
|
-
resolveInput: (txIn, context) => {
|
|
4319
|
-
const provider = getInputResolverProvider(getBlockfrostConfig(context, blockfrostConfigs), logger);
|
|
4320
|
-
return defer(async () => provider.resolveInput(txIn).then(Ok).catch(Err));
|
|
4321
|
-
},
|
|
4322
|
-
submitTx: (props, context) => {
|
|
4323
|
-
return from(getTxSubmitProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).submitTx(props).then((id) => Ok(TransactionId(id))).catch(Err));
|
|
4324
|
-
},
|
|
4325
|
-
evaluateTx: (props, context) => {
|
|
4326
|
-
return getTxEvaluationProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).evaluateTx(props);
|
|
4327
|
-
},
|
|
4328
|
-
getDReps: (context) => {
|
|
4329
|
-
return getGovernanceProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).getDReps();
|
|
4330
|
-
}
|
|
4331
|
-
},
|
|
4332
|
-
cardanoStakePoolsProvider: {
|
|
4333
|
-
getMetadata: (poolId, context) => {
|
|
4334
|
-
return from(getStakePoolProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).getMetadata(poolId).then(Ok).catch(Err));
|
|
4335
|
-
},
|
|
4336
|
-
getNetworkData: (context) => {
|
|
4337
|
-
return from(getStakePoolProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).getNetworkData().then(Ok).catch(Err));
|
|
4338
|
-
},
|
|
4339
|
-
getStakePool: (poolId, context) => {
|
|
4340
|
-
return from(getStakePoolProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).getStakePool(poolId).then(Ok).catch(Err));
|
|
4341
|
-
},
|
|
4342
|
-
getStakePools: (context) => {
|
|
4343
|
-
return from(getStakePoolProvider(getBlockfrostConfig(context, blockfrostConfigs), logger).getStakePools().then(Ok).catch(Err));
|
|
4344
|
-
}
|
|
4345
|
-
}
|
|
4346
|
-
};
|
|
4347
|
-
};
|
|
4348
|
-
//#endregion
|
|
4349
|
-
//#region ../../packages/module/cardano-provider-blockfrost/src/store/init.ts
|
|
4350
|
-
const redux = async (props, dependencies) => ({ sideEffectDependencies: await initializeDependencies(props, dependencies) });
|
|
4351
|
-
//#endregion
|
|
4352
|
-
export { redux as default };
|