mainnet-js 0.5.9 → 1.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.html +9 -1
- package/dist/mainnet-1.0.0-rc.3.js +2928 -0
- package/dist/module/chain.d.ts +1 -0
- package/dist/module/chain.d.ts.map +1 -0
- package/dist/module/cli.d.ts +1 -0
- package/dist/module/cli.d.ts.map +1 -0
- package/dist/module/cli.js +2 -2
- package/dist/module/cli.js.map +1 -1
- package/dist/module/constant.d.ts +1 -0
- package/dist/module/constant.d.ts.map +1 -0
- package/dist/module/db/ExchangeRateProvider.d.ts +2 -1
- package/dist/module/db/ExchangeRateProvider.d.ts.map +1 -0
- package/dist/module/db/IndexedDBProvider.d.ts +3 -2
- package/dist/module/db/IndexedDBProvider.d.ts.map +1 -0
- package/dist/module/db/SqlProvider.d.ts +7 -8
- package/dist/module/db/SqlProvider.d.ts.map +1 -0
- package/dist/module/db/SqlProvider.js +10 -8
- package/dist/module/db/SqlProvider.js.map +1 -1
- package/dist/module/db/StorageProvider.d.ts +2 -1
- package/dist/module/db/StorageProvider.d.ts.map +1 -0
- package/dist/module/db/getStorageProvider.d.ts +3 -0
- package/dist/module/db/getStorageProvider.d.ts.map +1 -0
- package/dist/module/db/getStorageProvider.js +19 -0
- package/dist/module/db/getStorageProvider.js.map +1 -0
- package/dist/module/db/index.d.ts +4 -3
- package/dist/module/db/index.d.ts.map +1 -0
- package/dist/module/db/index.js +2 -2
- package/dist/module/db/index.js.map +1 -1
- package/dist/module/db/interface.d.ts +1 -0
- package/dist/module/db/interface.d.ts.map +1 -0
- package/dist/module/db/util.d.ts +2 -3
- package/dist/module/db/util.d.ts.map +1 -0
- package/dist/module/db/util.js +0 -17
- package/dist/module/db/util.js.map +1 -1
- package/dist/module/enum.d.ts +1 -0
- package/dist/module/enum.d.ts.map +1 -0
- package/dist/module/history/electrumTransformer.d.ts +3 -2
- package/dist/module/history/electrumTransformer.d.ts.map +1 -0
- package/dist/module/history/electrumTransformer.js +11 -11
- package/dist/module/history/electrumTransformer.js.map +1 -1
- package/dist/module/history/interface.d.ts +2 -1
- package/dist/module/history/interface.d.ts.map +1 -0
- package/dist/module/index.d.ts +26 -21
- package/dist/module/index.d.ts.map +1 -0
- package/dist/module/index.js +25 -17
- package/dist/module/index.js.map +1 -1
- package/dist/module/interface.d.ts +14 -0
- package/dist/module/interface.d.ts.map +1 -0
- package/dist/module/interface.js +5 -0
- package/dist/module/interface.js.map +1 -1
- package/dist/module/message/index.d.ts +3 -2
- package/dist/module/message/index.d.ts.map +1 -0
- package/dist/module/message/index.js +2 -2
- package/dist/module/message/index.js.map +1 -1
- package/dist/module/message/interface.d.ts +1 -0
- package/dist/module/message/interface.d.ts.map +1 -0
- package/dist/module/message/signed.d.ts +2 -1
- package/dist/module/message/signed.d.ts.map +1 -0
- package/dist/module/message/signed.js +10 -4
- package/dist/module/message/signed.js.map +1 -1
- package/dist/module/mine/index.d.ts +2 -1
- package/dist/module/mine/index.d.ts.map +1 -0
- package/dist/module/mine/index.js +1 -1
- package/dist/module/mine/index.js.map +1 -1
- package/dist/module/mine/mine.d.ts +1 -0
- package/dist/module/mine/mine.d.ts.map +1 -0
- package/dist/module/mine/mine.js +3 -3
- package/dist/module/mine/mine.js.map +1 -1
- package/dist/module/network/Connection.d.ts +3 -2
- package/dist/module/network/Connection.d.ts.map +1 -0
- package/dist/module/network/Connection.js +3 -3
- package/dist/module/network/Connection.js.map +1 -1
- package/dist/module/network/ElectrumNetworkProvider.d.ts +8 -5
- package/dist/module/network/ElectrumNetworkProvider.d.ts.map +1 -0
- package/dist/module/network/ElectrumNetworkProvider.js +59 -13
- package/dist/module/network/ElectrumNetworkProvider.js.map +1 -1
- package/dist/module/network/NetworkProvider.d.ts +2 -1
- package/dist/module/network/NetworkProvider.d.ts.map +1 -0
- package/dist/module/network/configuration.d.ts +8 -10
- package/dist/module/network/configuration.d.ts.map +1 -0
- package/dist/module/network/configuration.js +29 -17
- package/dist/module/network/configuration.js.map +1 -1
- package/dist/module/network/constant.d.ts +1 -0
- package/dist/module/network/constant.d.ts.map +1 -0
- package/dist/module/network/constant.js +8 -4
- package/dist/module/network/constant.js.map +1 -1
- package/dist/module/network/default.d.ts +4 -3
- package/dist/module/network/default.d.ts.map +1 -0
- package/dist/module/network/default.js +7 -7
- package/dist/module/network/default.js.map +1 -1
- package/dist/module/network/getRelayFeeCache.d.ts +2 -1
- package/dist/module/network/getRelayFeeCache.d.ts.map +1 -0
- package/dist/module/network/getRelayFeeCache.js +2 -2
- package/dist/module/network/getRelayFeeCache.js.map +1 -1
- package/dist/module/network/index.d.ts +3 -2
- package/dist/module/network/index.d.ts.map +1 -0
- package/dist/module/network/index.js +2 -2
- package/dist/module/network/index.js.map +1 -1
- package/dist/module/network/interface.d.ts +1 -0
- package/dist/module/network/interface.d.ts.map +1 -0
- package/dist/module/network/util.d.ts +2 -1
- package/dist/module/network/util.d.ts.map +1 -0
- package/dist/module/qr/Qr.d.ts +2 -1
- package/dist/module/qr/Qr.d.ts.map +1 -0
- package/dist/module/qr/Qr.js +2 -2
- package/dist/module/qr/Qr.js.map +1 -1
- package/dist/module/qr/interface.d.ts +1 -0
- package/dist/module/qr/interface.d.ts.map +1 -0
- package/dist/module/rate/ExchangeRate.d.ts +1 -0
- package/dist/module/rate/ExchangeRate.d.ts.map +1 -0
- package/dist/module/rate/ExchangeRate.js +5 -5
- package/dist/module/rate/ExchangeRate.js.map +1 -1
- package/dist/module/slp/GsppProvider.d.ts +4 -3
- package/dist/module/slp/GsppProvider.d.ts.map +1 -0
- package/dist/module/slp/GsppProvider.js +7 -7
- package/dist/module/slp/GsppProvider.js.map +1 -1
- package/dist/module/slp/SlpDbProvider.d.ts +4 -3
- package/dist/module/slp/SlpDbProvider.d.ts.map +1 -0
- package/dist/module/slp/SlpDbProvider.js +8 -8
- package/dist/module/slp/SlpDbProvider.js.map +1 -1
- package/dist/module/slp/SlpDbTemplates.d.ts +1 -0
- package/dist/module/slp/SlpDbTemplates.d.ts.map +1 -0
- package/dist/module/slp/SlpLibAuth.d.ts +7 -14
- package/dist/module/slp/SlpLibAuth.d.ts.map +1 -0
- package/dist/module/slp/SlpLibAuth.js +48 -39
- package/dist/module/slp/SlpLibAuth.js.map +1 -1
- package/dist/module/slp/SlpProvider.d.ts +2 -1
- package/dist/module/slp/SlpProvider.d.ts.map +1 -0
- package/dist/module/slp/SlpProvider.js.map +1 -1
- package/dist/module/slp/index.d.ts +5 -4
- package/dist/module/slp/index.d.ts.map +1 -0
- package/dist/module/slp/index.js +3 -3
- package/dist/module/slp/index.js.map +1 -1
- package/dist/module/slp/interface.d.ts +2 -1
- package/dist/module/slp/interface.d.ts.map +1 -0
- package/dist/module/test/axios.d.ts +3 -0
- package/dist/module/test/axios.d.ts.map +1 -0
- package/dist/module/test/axios.js +35 -0
- package/dist/module/test/axios.js.map +1 -0
- package/dist/module/test/expect.d.ts +6 -1
- package/dist/module/test/expect.d.ts.map +1 -0
- package/dist/module/test/expect.js +22 -1
- package/dist/module/test/expect.js.map +1 -1
- package/dist/module/transaction/Wif.d.ts +19 -16
- package/dist/module/transaction/Wif.d.ts.map +1 -0
- package/dist/module/transaction/Wif.js +152 -55
- package/dist/module/transaction/Wif.js.map +1 -1
- package/dist/module/transaction/allocateFee.d.ts +5 -4
- package/dist/module/transaction/allocateFee.d.ts.map +1 -0
- package/dist/module/transaction/allocateFee.js +11 -8
- package/dist/module/transaction/allocateFee.js.map +1 -1
- package/dist/module/util/amountInSatoshi.d.ts +1 -0
- package/dist/module/util/amountInSatoshi.d.ts.map +1 -0
- package/dist/module/util/amountInSatoshi.js +4 -4
- package/dist/module/util/amountInSatoshi.js.map +1 -1
- package/dist/module/util/asSendRequestObject.d.ts +3 -2
- package/dist/module/util/asSendRequestObject.d.ts.map +1 -0
- package/dist/module/util/asSendRequestObject.js +6 -3
- package/dist/module/util/asSendRequestObject.js.map +1 -1
- package/dist/module/util/balanceObjectFromSatoshi.d.ts +1 -0
- package/dist/module/util/balanceObjectFromSatoshi.d.ts.map +1 -0
- package/dist/module/util/balanceObjectFromSatoshi.js +5 -5
- package/dist/module/util/balanceObjectFromSatoshi.js.map +1 -1
- package/dist/module/util/base64.d.ts +2 -1
- package/dist/module/util/base64.d.ts.map +1 -0
- package/dist/module/util/base64.js +5 -25
- package/dist/module/util/base64.js.map +1 -1
- package/dist/module/util/bchaddr.d.ts +1 -0
- package/dist/module/util/bchaddr.d.ts.map +1 -0
- package/dist/module/util/browserNotSupported.d.ts +1 -0
- package/dist/module/util/browserNotSupported.d.ts.map +1 -0
- package/dist/module/util/browserNotSupported.js +1 -1
- package/dist/module/util/browserNotSupported.js.map +1 -1
- package/dist/module/util/checkForEmptySeed.d.ts +1 -0
- package/dist/module/util/checkForEmptySeed.d.ts.map +1 -0
- package/dist/module/util/checkWifNetwork.d.ts +2 -1
- package/dist/module/util/checkWifNetwork.d.ts.map +1 -0
- package/dist/module/util/checkWifNetwork.js +1 -1
- package/dist/module/util/checkWifNetwork.js.map +1 -1
- package/dist/module/util/convert.d.ts +1 -0
- package/dist/module/util/convert.d.ts.map +1 -0
- package/dist/module/util/convert.js +2 -2
- package/dist/module/util/convert.js.map +1 -1
- package/dist/module/util/delay.d.ts +1 -0
- package/dist/module/util/delay.d.ts.map +1 -0
- package/dist/module/util/deriveCashaddr.d.ts +6 -1
- package/dist/module/util/deriveCashaddr.d.ts.map +1 -0
- package/dist/module/util/deriveCashaddr.js +85 -6
- package/dist/module/util/deriveCashaddr.js.map +1 -1
- package/dist/module/util/deriveLockscript.d.ts +1 -0
- package/dist/module/util/deriveLockscript.d.ts.map +1 -0
- package/dist/module/util/deriveNetwork.d.ts +1 -0
- package/dist/module/util/deriveNetwork.d.ts.map +1 -0
- package/dist/module/util/deriveNetwork.js +2 -2
- package/dist/module/util/deriveNetwork.js.map +1 -1
- package/dist/module/util/derivePublicKeyHash.d.ts +3 -1
- package/dist/module/util/derivePublicKeyHash.d.ts.map +1 -0
- package/dist/module/util/derivePublicKeyHash.js +1 -1
- package/dist/module/util/derivePublicKeyHash.js.map +1 -1
- package/dist/module/util/eventsource.d.ts +1 -0
- package/dist/module/util/eventsource.d.ts.map +1 -0
- package/dist/module/util/eventsource.js +3 -2
- package/dist/module/util/eventsource.js.map +1 -1
- package/dist/module/util/floor.d.ts +1 -0
- package/dist/module/util/floor.d.ts.map +1 -0
- package/dist/module/util/getAddrsByXpubKey.d.ts +8 -8
- package/dist/module/util/getAddrsByXpubKey.d.ts.map +1 -0
- package/dist/module/util/getAddrsByXpubKey.js +17 -21
- package/dist/module/util/getAddrsByXpubKey.js.map +1 -1
- package/dist/module/util/getRuntimePlatform.d.ts +1 -0
- package/dist/module/util/getRuntimePlatform.d.ts.map +1 -0
- package/dist/module/util/getUsdRate.d.ts +1 -0
- package/dist/module/util/getUsdRate.d.ts.map +1 -0
- package/dist/module/util/getUsdRate.js +1 -1
- package/dist/module/util/getUsdRate.js.map +1 -1
- package/dist/module/util/getXPubKey.d.ts +2 -1
- package/dist/module/util/getXPubKey.d.ts.map +1 -0
- package/dist/module/util/getXPubKey.js +6 -7
- package/dist/module/util/getXPubKey.js.map +1 -1
- package/dist/module/util/hash160.d.ts +2 -1
- package/dist/module/util/hash160.d.ts.map +1 -0
- package/dist/module/util/hash160.js +2 -4
- package/dist/module/util/hash160.js.map +1 -1
- package/dist/module/util/index.d.ts +21 -20
- package/dist/module/util/index.d.ts.map +1 -0
- package/dist/module/util/index.js +20 -20
- package/dist/module/util/index.js.map +1 -1
- package/dist/module/util/randomBytes.d.ts +3 -1
- package/dist/module/util/randomBytes.d.ts.map +1 -0
- package/dist/module/util/randomBytes.js +2 -3
- package/dist/module/util/randomBytes.js.map +1 -1
- package/dist/module/util/randomInt.d.ts +1 -0
- package/dist/module/util/randomInt.d.ts.map +1 -0
- package/dist/module/util/randomValues.d.ts +1 -0
- package/dist/module/util/randomValues.d.ts.map +1 -0
- package/dist/module/util/randomValues.js +7 -7
- package/dist/module/util/randomValues.js.map +1 -1
- package/dist/module/util/sanitizeAddress.d.ts +1 -0
- package/dist/module/util/sanitizeAddress.d.ts.map +1 -0
- package/dist/module/util/sanitizeAddress.js +1 -1
- package/dist/module/util/sanitizeAddress.js.map +1 -1
- package/dist/module/util/sanitizeUnit.d.ts +2 -1
- package/dist/module/util/sanitizeUnit.d.ts.map +1 -0
- package/dist/module/util/satoshiToAmount.d.ts +1 -0
- package/dist/module/util/satoshiToAmount.d.ts.map +1 -0
- package/dist/module/util/satoshiToAmount.js +4 -4
- package/dist/module/util/satoshiToAmount.js.map +1 -1
- package/dist/module/util/sumSendRequestAmounts.d.ts +3 -2
- package/dist/module/util/sumSendRequestAmounts.d.ts.map +1 -0
- package/dist/module/util/sumSendRequestAmounts.js +5 -2
- package/dist/module/util/sumSendRequestAmounts.js.map +1 -1
- package/dist/module/util/sumUtxoValue.d.ts +4 -2
- package/dist/module/util/sumUtxoValue.d.ts.map +1 -0
- package/dist/module/util/sumUtxoValue.js +17 -3
- package/dist/module/util/sumUtxoValue.js.map +1 -1
- package/dist/module/util/transaction.d.ts +2 -0
- package/dist/module/util/transaction.d.ts.map +1 -0
- package/dist/module/util/transaction.js +7 -0
- package/dist/module/util/transaction.js.map +1 -0
- package/dist/module/wallet/Base.d.ts +8 -7
- package/dist/module/wallet/Base.d.ts.map +1 -0
- package/dist/module/wallet/Base.js +7 -7
- package/dist/module/wallet/Base.js.map +1 -1
- package/dist/module/wallet/Bcmr.d.ts +88 -0
- package/dist/module/wallet/Bcmr.d.ts.map +1 -0
- package/dist/module/wallet/Bcmr.js +281 -0
- package/dist/module/wallet/Bcmr.js.map +1 -0
- package/dist/module/wallet/Slp.d.ts +6 -5
- package/dist/module/wallet/Slp.d.ts.map +1 -0
- package/dist/module/wallet/Slp.js +15 -15
- package/dist/module/wallet/Slp.js.map +1 -1
- package/dist/module/wallet/Util.d.ts +3 -2
- package/dist/module/wallet/Util.d.ts.map +1 -0
- package/dist/module/wallet/Util.js +9 -14
- package/dist/module/wallet/Util.js.map +1 -1
- package/dist/module/wallet/Wif.d.ts +124 -20
- package/dist/module/wallet/Wif.d.ts.map +1 -0
- package/dist/module/wallet/Wif.js +406 -74
- package/dist/module/wallet/Wif.js.map +1 -1
- package/dist/module/wallet/bcmr-v1.schema.d.ts +623 -0
- package/dist/module/wallet/bcmr-v1.schema.d.ts.map +1 -0
- package/dist/module/wallet/bcmr-v1.schema.js +2 -0
- package/dist/module/wallet/bcmr-v1.schema.js.map +1 -0
- package/dist/module/wallet/createWallet.d.ts +3 -2
- package/dist/module/wallet/createWallet.d.ts.map +1 -0
- package/dist/module/wallet/createWallet.js +3 -3
- package/dist/module/wallet/createWallet.js.map +1 -1
- package/dist/module/wallet/enum.d.ts +1 -0
- package/dist/module/wallet/enum.d.ts.map +1 -0
- package/dist/module/wallet/interface.d.ts +10 -6
- package/dist/module/wallet/interface.d.ts.map +1 -0
- package/dist/module/wallet/model.d.ts +81 -5
- package/dist/module/wallet/model.d.ts.map +1 -0
- package/dist/module/wallet/model.js +102 -17
- package/dist/module/wallet/model.js.map +1 -1
- package/dist/module/webhook/Webhook.d.ts +3 -2
- package/dist/module/webhook/Webhook.d.ts.map +1 -0
- package/dist/module/webhook/Webhook.js +4 -1
- package/dist/module/webhook/Webhook.js.map +1 -1
- package/dist/module/webhook/WebhookBch.d.ts +4 -3
- package/dist/module/webhook/WebhookBch.d.ts.map +1 -0
- package/dist/module/webhook/WebhookBch.js +4 -4
- package/dist/module/webhook/WebhookBch.js.map +1 -1
- package/dist/module/webhook/WebhookSlp.d.ts +5 -4
- package/dist/module/webhook/WebhookSlp.d.ts.map +1 -0
- package/dist/module/webhook/WebhookSlp.js +4 -4
- package/dist/module/webhook/WebhookSlp.js.map +1 -1
- package/dist/module/webhook/WebhookWorker.d.ts +3 -2
- package/dist/module/webhook/WebhookWorker.d.ts.map +1 -0
- package/dist/module/webhook/WebhookWorker.js +1 -1
- package/dist/module/webhook/WebhookWorker.js.map +1 -1
- package/dist/module/webhook/index.d.ts +6 -5
- package/dist/module/webhook/index.d.ts.map +1 -0
- package/dist/module/webhook/index.js +5 -5
- package/dist/module/webhook/index.js.map +1 -1
- package/dist/module/webhook/interface.d.ts +1 -0
- package/dist/module/webhook/interface.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/polyfill/{bip39.browser.js → bip39.browser.cjs} +1 -0
- package/polyfill/{util.js → util.cjs} +0 -0
- package/src/Wallet.test.headless.js +6 -6
- package/src/cli.ts +3 -3
- package/src/db/ExchangeRateProvider.ts +1 -1
- package/src/db/IndexedDBProvider.test.ts +0 -1
- package/src/db/IndexedDBProvider.ts +2 -2
- package/src/db/SqlProvider.ts +14 -12
- package/src/db/StorageProvider.ts +1 -1
- package/src/db/getStorageProvider.ts +20 -0
- package/src/db/index.ts +3 -3
- package/src/db/util.ts +1 -20
- package/src/history/electrumTransformer.ts +13 -14
- package/src/history/interface.ts +1 -1
- package/src/index.ts +29 -21
- package/src/interface.ts +15 -0
- package/src/message/index.ts +2 -2
- package/src/message/signed.test.ts +4 -4
- package/src/message/signed.ts +23 -6
- package/src/mine/index.ts +1 -1
- package/src/mine/mine.ts +3 -3
- package/src/network/Connection.ts +5 -5
- package/src/network/ElectrumNetworkProvider.ts +85 -20
- package/src/network/NetworkProvider.ts +1 -1
- package/src/network/configuration.test.ts +33 -8
- package/src/network/configuration.ts +33 -18
- package/src/network/constant.ts +9 -4
- package/src/network/default.ts +13 -10
- package/src/network/getRelayFeeCache.ts +3 -3
- package/src/network/index.ts +6 -2
- package/src/network/util.ts +1 -1
- package/src/qr/Qr.ts +3 -3
- package/src/rate/ExchangeRate.ts +14 -15
- package/src/slp/GsppProvider.test.ts +2 -2
- package/src/slp/GsppProvider.ts +11 -8
- package/src/slp/SlpDbProvider.test.ts +1 -1
- package/src/slp/SlpDbProvider.ts +12 -9
- package/src/slp/SlpLibAuth.test.ts +1 -1
- package/src/slp/SlpLibAuth.ts +52 -42
- package/src/slp/SlpProvider.ts +6 -1
- package/src/slp/index.ts +4 -4
- package/src/slp/interface.ts +1 -1
- package/src/test/axios.ts +47 -0
- package/src/test/expect.ts +27 -2
- package/src/transaction/Wif.ts +203 -77
- package/src/transaction/allocateFee.ts +32 -14
- package/src/util/amountInSatoshi.ts +4 -4
- package/src/util/asSendRequestObject.ts +42 -30
- package/src/util/balanceObjectFromSatoshi.ts +5 -5
- package/src/util/base64.ts +5 -24
- package/src/util/browserNotSupported.ts +1 -1
- package/src/util/checkWifNetwork.ts +1 -1
- package/src/util/convert.ts +2 -2
- package/src/util/deriveCashaddr.test.ts +43 -0
- package/src/util/deriveCashaddr.ts +123 -7
- package/src/util/deriveNetwork.ts +2 -2
- package/src/util/derivePublicKeyHash.test.ts +3 -0
- package/src/util/derivePublicKeyHash.ts +18 -5
- package/src/util/eventsource.ts +4 -2
- package/src/util/getAddrsByXpubKey.test.ts +5 -5
- package/src/util/getAddrsByXpubKey.ts +23 -28
- package/src/util/getUsdRate.ts +1 -1
- package/src/util/getXPubKey.ts +5 -7
- package/src/util/hash160.test.ts +2 -2
- package/src/util/hash160.ts +2 -4
- package/src/util/index.ts +26 -20
- package/src/util/randomBytes.ts +2 -3
- package/src/util/randomValues.ts +8 -8
- package/src/util/sanitizeAddress.ts +1 -1
- package/src/util/sanitizeUnit.ts +1 -1
- package/src/util/satoshiToAmount.ts +4 -4
- package/src/util/sumSendRequestAmounts.ts +10 -4
- package/src/util/sumUtxoValue.ts +19 -7
- package/src/util/transaction.ts +10 -0
- package/src/wallet/Base.ts +11 -11
- package/src/wallet/Bcmr.test.headless.js +353 -0
- package/src/wallet/Bcmr.test.ts +610 -0
- package/src/wallet/Bcmr.ts +390 -0
- package/src/wallet/Cashtokens.test.headless.js +467 -0
- package/src/wallet/Cashtokens.test.ts +475 -0
- package/src/wallet/Slp.test.headless.js +6 -8
- package/src/wallet/Slp.test.ts +2 -2
- package/src/wallet/Slp.ts +26 -22
- package/src/wallet/Util.ts +9 -20
- package/src/wallet/Wif.test.ts +20 -21
- package/src/wallet/Wif.ts +534 -99
- package/src/wallet/bcmr-v1.schema.ts +639 -0
- package/src/wallet/createWallet.test.ts +1 -0
- package/src/wallet/createWallet.ts +4 -4
- package/src/wallet/interface.ts +9 -6
- package/src/wallet/model.ts +190 -19
- package/src/webhook/Webhook.ts +7 -3
- package/src/webhook/WebhookBch.ts +7 -7
- package/src/webhook/WebhookSlp.test.ts +2 -2
- package/src/webhook/WebhookSlp.ts +6 -6
- package/src/webhook/WebhookWorker.ts +2 -2
- package/src/webhook/index.ts +5 -5
- package/tsconfig.browser.json +0 -3
- package/tsconfig.json +17 -5
- package/{webpack.config.js → webpack.config.cjs} +46 -14
- package/dist/main/chain.d.ts +0 -3
- package/dist/main/chain.js +0 -7
- package/dist/main/chain.js.map +0 -1
- package/dist/main/cli.d.ts +0 -1
- package/dist/main/cli.js +0 -35
- package/dist/main/cli.js.map +0 -1
- package/dist/main/constant.d.ts +0 -5
- package/dist/main/constant.js +0 -27
- package/dist/main/constant.js.map +0 -1
- package/dist/main/db/ExchangeRateProvider.d.ts +0 -11
- package/dist/main/db/ExchangeRateProvider.js +0 -47
- package/dist/main/db/ExchangeRateProvider.js.map +0 -1
- package/dist/main/db/IndexedDBProvider.d.ts +0 -15
- package/dist/main/db/IndexedDBProvider.js +0 -86
- package/dist/main/db/IndexedDBProvider.js.map +0 -1
- package/dist/main/db/SqlProvider.d.ts +0 -41
- package/dist/main/db/SqlProvider.js +0 -217
- package/dist/main/db/SqlProvider.js.map +0 -1
- package/dist/main/db/StorageProvider.d.ts +0 -52
- package/dist/main/db/StorageProvider.js +0 -3
- package/dist/main/db/StorageProvider.js.map +0 -1
- package/dist/main/db/index.d.ts +0 -3
- package/dist/main/db/index.js +0 -11
- package/dist/main/db/index.js.map +0 -1
- package/dist/main/db/interface.d.ts +0 -22
- package/dist/main/db/interface.js +0 -3
- package/dist/main/db/interface.js.map +0 -1
- package/dist/main/db/util.d.ts +0 -5
- package/dist/main/db/util.js +0 -53
- package/dist/main/db/util.js.map +0 -1
- package/dist/main/enum.d.ts +0 -33
- package/dist/main/enum.js +0 -39
- package/dist/main/enum.js.map +0 -1
- package/dist/main/history/electrumTransformer.d.ts +0 -4
- package/dist/main/history/electrumTransformer.js +0 -216
- package/dist/main/history/electrumTransformer.js.map +0 -1
- package/dist/main/history/interface.d.ts +0 -16
- package/dist/main/history/interface.js +0 -3
- package/dist/main/history/interface.js.map +0 -1
- package/dist/main/index.d.ts +0 -24
- package/dist/main/index.js +0 -62
- package/dist/main/index.js.map +0 -1
- package/dist/main/interface.d.ts +0 -31
- package/dist/main/interface.js +0 -12
- package/dist/main/interface.js.map +0 -1
- package/dist/main/message/index.d.ts +0 -2
- package/dist/main/message/index.js +0 -15
- package/dist/main/message/index.js.map +0 -1
- package/dist/main/message/interface.d.ts +0 -29
- package/dist/main/message/interface.js +0 -6
- package/dist/main/message/interface.js.map +0 -1
- package/dist/main/message/signed.d.ts +0 -33
- package/dist/main/message/signed.js +0 -141
- package/dist/main/message/signed.js.map +0 -1
- package/dist/main/mine/index.d.ts +0 -1
- package/dist/main/mine/index.js +0 -14
- package/dist/main/mine/index.js.map +0 -1
- package/dist/main/mine/mine.d.ts +0 -13
- package/dist/main/mine/mine.js +0 -37
- package/dist/main/mine/mine.js.map +0 -1
- package/dist/main/network/Connection.d.ts +0 -14
- package/dist/main/network/Connection.js +0 -71
- package/dist/main/network/Connection.js.map +0 -1
- package/dist/main/network/ElectrumNetworkProvider.d.ts +0 -49
- package/dist/main/network/ElectrumNetworkProvider.js +0 -338
- package/dist/main/network/ElectrumNetworkProvider.js.map +0 -1
- package/dist/main/network/NetworkProvider.d.ts +0 -107
- package/dist/main/network/NetworkProvider.js +0 -3
- package/dist/main/network/NetworkProvider.js.map +0 -1
- package/dist/main/network/configuration.d.ts +0 -12
- package/dist/main/network/configuration.js +0 -79
- package/dist/main/network/configuration.js.map +0 -1
- package/dist/main/network/constant.d.ts +0 -35
- package/dist/main/network/constant.js +0 -55
- package/dist/main/network/constant.js.map +0 -1
- package/dist/main/network/default.d.ts +0 -7
- package/dist/main/network/default.js +0 -107
- package/dist/main/network/default.js.map +0 -1
- package/dist/main/network/getRelayFeeCache.d.ts +0 -2
- package/dist/main/network/getRelayFeeCache.js +0 -27
- package/dist/main/network/getRelayFeeCache.js.map +0 -1
- package/dist/main/network/index.d.ts +0 -2
- package/dist/main/network/index.js +0 -10
- package/dist/main/network/index.js.map +0 -1
- package/dist/main/network/interface.d.ts +0 -60
- package/dist/main/network/interface.js +0 -3
- package/dist/main/network/interface.js.map +0 -1
- package/dist/main/network/util.d.ts +0 -2
- package/dist/main/network/util.js +0 -32
- package/dist/main/network/util.js.map +0 -1
- package/dist/main/qr/Qr.d.ts +0 -8
- package/dist/main/qr/Qr.js +0 -26
- package/dist/main/qr/Qr.js.map +0 -1
- package/dist/main/qr/interface.d.ts +0 -5
- package/dist/main/qr/interface.js +0 -3
- package/dist/main/qr/interface.js.map +0 -1
- package/dist/main/rate/ExchangeRate.d.ts +0 -19
- package/dist/main/rate/ExchangeRate.js +0 -147
- package/dist/main/rate/ExchangeRate.js.map +0 -1
- package/dist/main/slp/GsppProvider.d.ts +0 -54
- package/dist/main/slp/GsppProvider.js +0 -214
- package/dist/main/slp/GsppProvider.js.map +0 -1
- package/dist/main/slp/SlpDbProvider.d.ts +0 -51
- package/dist/main/slp/SlpDbProvider.js +0 -182
- package/dist/main/slp/SlpDbProvider.js.map +0 -1
- package/dist/main/slp/SlpDbTemplates.d.ts +0 -312
- package/dist/main/slp/SlpDbTemplates.js +0 -387
- package/dist/main/slp/SlpDbTemplates.js.map +0 -1
- package/dist/main/slp/SlpLibAuth.d.ts +0 -217
- package/dist/main/slp/SlpLibAuth.js +0 -452
- package/dist/main/slp/SlpLibAuth.js.map +0 -1
- package/dist/main/slp/SlpProvider.d.ts +0 -23
- package/dist/main/slp/SlpProvider.js +0 -39
- package/dist/main/slp/SlpProvider.js.map +0 -1
- package/dist/main/slp/index.d.ts +0 -5
- package/dist/main/slp/index.js +0 -24
- package/dist/main/slp/index.js.map +0 -1
- package/dist/main/slp/interface.d.ts +0 -113
- package/dist/main/slp/interface.js +0 -10
- package/dist/main/slp/interface.js.map +0 -1
- package/dist/main/test/expect.d.ts +0 -7
- package/dist/main/test/expect.js +0 -31
- package/dist/main/test/expect.js.map +0 -1
- package/dist/main/transaction/Wif.d.ts +0 -42
- package/dist/main/transaction/Wif.js +0 -214
- package/dist/main/transaction/Wif.js.map +0 -1
- package/dist/main/transaction/allocateFee.d.ts +0 -7
- package/dist/main/transaction/allocateFee.js +0 -118
- package/dist/main/transaction/allocateFee.js.map +0 -1
- package/dist/main/util/amountInSatoshi.d.ts +0 -9
- package/dist/main/util/amountInSatoshi.js +0 -38
- package/dist/main/util/amountInSatoshi.js.map +0 -1
- package/dist/main/util/asSendRequestObject.d.ts +0 -2
- package/dist/main/util/asSendRequestObject.js +0 -57
- package/dist/main/util/asSendRequestObject.js.map +0 -1
- package/dist/main/util/balanceObjectFromSatoshi.d.ts +0 -8
- package/dist/main/util/balanceObjectFromSatoshi.js +0 -62
- package/dist/main/util/balanceObjectFromSatoshi.js.map +0 -1
- package/dist/main/util/base64.d.ts +0 -2
- package/dist/main/util/base64.js +0 -36
- package/dist/main/util/base64.js.map +0 -1
- package/dist/main/util/bchaddr.d.ts +0 -1
- package/dist/main/util/bchaddr.js +0 -24
- package/dist/main/util/bchaddr.js.map +0 -1
- package/dist/main/util/browserNotSupported.d.ts +0 -1
- package/dist/main/util/browserNotSupported.js +0 -11
- package/dist/main/util/browserNotSupported.js.map +0 -1
- package/dist/main/util/checkForEmptySeed.d.ts +0 -2
- package/dist/main/util/checkForEmptySeed.js +0 -12
- package/dist/main/util/checkForEmptySeed.js.map +0 -1
- package/dist/main/util/checkWifNetwork.d.ts +0 -2
- package/dist/main/util/checkWifNetwork.js +0 -16
- package/dist/main/util/checkWifNetwork.js.map +0 -1
- package/dist/main/util/convert.d.ts +0 -15
- package/dist/main/util/convert.js +0 -24
- package/dist/main/util/convert.js.map +0 -1
- package/dist/main/util/delay.d.ts +0 -1
- package/dist/main/util/delay.js +0 -8
- package/dist/main/util/delay.js.map +0 -1
- package/dist/main/util/deriveCashaddr.d.ts +0 -2
- package/dist/main/util/deriveCashaddr.js +0 -13
- package/dist/main/util/deriveCashaddr.js.map +0 -1
- package/dist/main/util/deriveLockscript.d.ts +0 -8
- package/dist/main/util/deriveLockscript.js +0 -19
- package/dist/main/util/deriveLockscript.js.map +0 -1
- package/dist/main/util/deriveNetwork.d.ts +0 -1
- package/dist/main/util/deriveNetwork.js +0 -23
- package/dist/main/util/deriveNetwork.js.map +0 -1
- package/dist/main/util/derivePublicKeyHash.d.ts +0 -16
- package/dist/main/util/derivePublicKeyHash.js +0 -49
- package/dist/main/util/derivePublicKeyHash.js.map +0 -1
- package/dist/main/util/eventsource.d.ts +0 -2
- package/dist/main/util/eventsource.js +0 -12
- package/dist/main/util/eventsource.js.map +0 -1
- package/dist/main/util/floor.d.ts +0 -1
- package/dist/main/util/floor.js +0 -9
- package/dist/main/util/floor.js.map +0 -1
- package/dist/main/util/getAddrsByXpubKey.d.ts +0 -22
- package/dist/main/util/getAddrsByXpubKey.js +0 -79
- package/dist/main/util/getAddrsByXpubKey.js.map +0 -1
- package/dist/main/util/getRuntimePlatform.d.ts +0 -6
- package/dist/main/util/getRuntimePlatform.js +0 -34
- package/dist/main/util/getRuntimePlatform.js.map +0 -1
- package/dist/main/util/getUsdRate.d.ts +0 -1
- package/dist/main/util/getUsdRate.js +0 -9
- package/dist/main/util/getUsdRate.js.map +0 -1
- package/dist/main/util/getXPubKey.d.ts +0 -1
- package/dist/main/util/getXPubKey.js +0 -26
- package/dist/main/util/getXPubKey.js.map +0 -1
- package/dist/main/util/hash160.d.ts +0 -8
- package/dist/main/util/hash160.js +0 -18
- package/dist/main/util/hash160.js.map +0 -1
- package/dist/main/util/index.d.ts +0 -21
- package/dist/main/util/index.js +0 -72
- package/dist/main/util/index.js.map +0 -1
- package/dist/main/util/randomBytes.d.ts +0 -1
- package/dist/main/util/randomBytes.js +0 -18
- package/dist/main/util/randomBytes.js.map +0 -1
- package/dist/main/util/randomInt.d.ts +0 -1
- package/dist/main/util/randomInt.js +0 -9
- package/dist/main/util/randomInt.js.map +0 -1
- package/dist/main/util/randomValues.d.ts +0 -1
- package/dist/main/util/randomValues.js +0 -15
- package/dist/main/util/randomValues.js.map +0 -1
- package/dist/main/util/sanitizeAddress.d.ts +0 -1
- package/dist/main/util/sanitizeAddress.js +0 -15
- package/dist/main/util/sanitizeAddress.js.map +0 -1
- package/dist/main/util/sanitizeUnit.d.ts +0 -2
- package/dist/main/util/sanitizeUnit.js +0 -13
- package/dist/main/util/sanitizeUnit.js.map +0 -1
- package/dist/main/util/satoshiToAmount.d.ts +0 -9
- package/dist/main/util/satoshiToAmount.js +0 -41
- package/dist/main/util/satoshiToAmount.js.map +0 -1
- package/dist/main/util/sumSendRequestAmounts.d.ts +0 -2
- package/dist/main/util/sumSendRequestAmounts.js +0 -31
- package/dist/main/util/sumSendRequestAmounts.js.map +0 -1
- package/dist/main/util/sumUtxoValue.d.ts +0 -2
- package/dist/main/util/sumUtxoValue.js +0 -17
- package/dist/main/util/sumUtxoValue.js.map +0 -1
- package/dist/main/wallet/Base.d.ts +0 -202
- package/dist/main/wallet/Base.js +0 -438
- package/dist/main/wallet/Base.js.map +0 -1
- package/dist/main/wallet/Slp.d.ts +0 -430
- package/dist/main/wallet/Slp.js +0 -775
- package/dist/main/wallet/Slp.js.map +0 -1
- package/dist/main/wallet/Util.d.ts +0 -69
- package/dist/main/wallet/Util.js +0 -182
- package/dist/main/wallet/Util.js.map +0 -1
- package/dist/main/wallet/Wif.d.ts +0 -255
- package/dist/main/wallet/Wif.js +0 -1067
- package/dist/main/wallet/Wif.js.map +0 -1
- package/dist/main/wallet/createWallet.d.ts +0 -69
- package/dist/main/wallet/createWallet.js +0 -244
- package/dist/main/wallet/createWallet.js.map +0 -1
- package/dist/main/wallet/enum.d.ts +0 -16
- package/dist/main/wallet/enum.js +0 -22
- package/dist/main/wallet/enum.js.map +0 -1
- package/dist/main/wallet/interface.d.ts +0 -76
- package/dist/main/wallet/interface.js +0 -3
- package/dist/main/wallet/interface.js.map +0 -1
- package/dist/main/wallet/model.d.ts +0 -88
- package/dist/main/wallet/model.js +0 -129
- package/dist/main/wallet/model.js.map +0 -1
- package/dist/main/webhook/Webhook.d.ts +0 -40
- package/dist/main/webhook/Webhook.js +0 -82
- package/dist/main/webhook/Webhook.js.map +0 -1
- package/dist/main/webhook/WebhookBch.d.ts +0 -13
- package/dist/main/webhook/WebhookBch.js +0 -148
- package/dist/main/webhook/WebhookBch.js.map +0 -1
- package/dist/main/webhook/WebhookSlp.d.ts +0 -14
- package/dist/main/webhook/WebhookSlp.js +0 -107
- package/dist/main/webhook/WebhookSlp.js.map +0 -1
- package/dist/main/webhook/WebhookWorker.d.ts +0 -22
- package/dist/main/webhook/WebhookWorker.js +0 -100
- package/dist/main/webhook/WebhookWorker.js.map +0 -1
- package/dist/main/webhook/index.d.ts +0 -5
- package/dist/main/webhook/index.js +0 -23
- package/dist/main/webhook/index.js.map +0 -1
- package/dist/main/webhook/interface.d.ts +0 -8
- package/dist/main/webhook/interface.js +0 -3
- package/dist/main/webhook/interface.js.map +0 -1
- package/dist/mainnet-0.5.9.js +0 -2
- package/dist/mainnet-0.5.9.js.LICENSE.txt +0 -48
- package/dist/tsconfig.browser.tsbuildinfo +0 -1
- package/jest.config.js +0 -23
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
export declare const SlpAllUtxosTemplate: (slpaddr: string) => {
|
|
2
|
-
v: number;
|
|
3
|
-
q: {
|
|
4
|
-
db: string[];
|
|
5
|
-
aggregate: ({
|
|
6
|
-
$match: {
|
|
7
|
-
"graphTxn.outputs.address": string;
|
|
8
|
-
"graphTxn.outputs.status": {
|
|
9
|
-
$in: string[];
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
$unwind?: undefined;
|
|
13
|
-
} | {
|
|
14
|
-
$unwind: string;
|
|
15
|
-
$match?: undefined;
|
|
16
|
-
})[];
|
|
17
|
-
limit: number;
|
|
18
|
-
};
|
|
19
|
-
r: {
|
|
20
|
-
f: string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export declare const SlpAllOutpointsTemplate: (slpaddr: string) => {
|
|
24
|
-
v: number;
|
|
25
|
-
q: {
|
|
26
|
-
db: string[];
|
|
27
|
-
aggregate: ({
|
|
28
|
-
$match: {
|
|
29
|
-
"graphTxn.outputs.address": string;
|
|
30
|
-
"graphTxn.outputs.status": {
|
|
31
|
-
$in: string[];
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
$unwind?: undefined;
|
|
35
|
-
$project?: undefined;
|
|
36
|
-
} | {
|
|
37
|
-
$unwind: string;
|
|
38
|
-
$match?: undefined;
|
|
39
|
-
$project?: undefined;
|
|
40
|
-
} | {
|
|
41
|
-
$project: {
|
|
42
|
-
graphTxn: number;
|
|
43
|
-
};
|
|
44
|
-
$match?: undefined;
|
|
45
|
-
$unwind?: undefined;
|
|
46
|
-
})[];
|
|
47
|
-
limit: number;
|
|
48
|
-
};
|
|
49
|
-
r: {
|
|
50
|
-
f: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
export declare const SlpSpendableUtxosTemplate: (slpaddr: string, tokenId?: string | undefined) => {
|
|
54
|
-
v: number;
|
|
55
|
-
q: {
|
|
56
|
-
db: string[];
|
|
57
|
-
aggregate: ({
|
|
58
|
-
$match: {
|
|
59
|
-
"graphTxn.outputs.address": string;
|
|
60
|
-
"graphTxn.outputs.status": string;
|
|
61
|
-
};
|
|
62
|
-
$unwind?: undefined;
|
|
63
|
-
$lookup?: undefined;
|
|
64
|
-
} | {
|
|
65
|
-
$unwind: string;
|
|
66
|
-
$match?: undefined;
|
|
67
|
-
$lookup?: undefined;
|
|
68
|
-
} | {
|
|
69
|
-
$lookup: {
|
|
70
|
-
from: string;
|
|
71
|
-
localField: string;
|
|
72
|
-
foreignField: string;
|
|
73
|
-
as: string;
|
|
74
|
-
};
|
|
75
|
-
$match?: undefined;
|
|
76
|
-
$unwind?: undefined;
|
|
77
|
-
})[];
|
|
78
|
-
};
|
|
79
|
-
r: {
|
|
80
|
-
f: string;
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
export declare const SlpAllTokenBalancesTemplate: (slpaddr: string) => {
|
|
84
|
-
v: number;
|
|
85
|
-
q: {
|
|
86
|
-
db: string[];
|
|
87
|
-
aggregate: ({
|
|
88
|
-
$match: {
|
|
89
|
-
"graphTxn.outputs.status": string;
|
|
90
|
-
"graphTxn.outputs.address": string;
|
|
91
|
-
slpAmount?: undefined;
|
|
92
|
-
};
|
|
93
|
-
$unwind?: undefined;
|
|
94
|
-
$group?: undefined;
|
|
95
|
-
$sort?: undefined;
|
|
96
|
-
$lookup?: undefined;
|
|
97
|
-
} | {
|
|
98
|
-
$unwind: string;
|
|
99
|
-
$match?: undefined;
|
|
100
|
-
$group?: undefined;
|
|
101
|
-
$sort?: undefined;
|
|
102
|
-
$lookup?: undefined;
|
|
103
|
-
} | {
|
|
104
|
-
$group: {
|
|
105
|
-
_id: string;
|
|
106
|
-
slpAmount: {
|
|
107
|
-
$sum: string;
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
$match?: undefined;
|
|
111
|
-
$unwind?: undefined;
|
|
112
|
-
$sort?: undefined;
|
|
113
|
-
$lookup?: undefined;
|
|
114
|
-
} | {
|
|
115
|
-
$sort: {
|
|
116
|
-
slpAmount: number;
|
|
117
|
-
};
|
|
118
|
-
$match?: undefined;
|
|
119
|
-
$unwind?: undefined;
|
|
120
|
-
$group?: undefined;
|
|
121
|
-
$lookup?: undefined;
|
|
122
|
-
} | {
|
|
123
|
-
$lookup: {
|
|
124
|
-
from: string;
|
|
125
|
-
localField: string;
|
|
126
|
-
foreignField: string;
|
|
127
|
-
as: string;
|
|
128
|
-
};
|
|
129
|
-
$match?: undefined;
|
|
130
|
-
$unwind?: undefined;
|
|
131
|
-
$group?: undefined;
|
|
132
|
-
$sort?: undefined;
|
|
133
|
-
} | {
|
|
134
|
-
$match: {
|
|
135
|
-
slpAmount: {
|
|
136
|
-
$gt: number;
|
|
137
|
-
};
|
|
138
|
-
"graphTxn.outputs.status"?: undefined;
|
|
139
|
-
"graphTxn.outputs.address"?: undefined;
|
|
140
|
-
};
|
|
141
|
-
$unwind?: undefined;
|
|
142
|
-
$group?: undefined;
|
|
143
|
-
$sort?: undefined;
|
|
144
|
-
$lookup?: undefined;
|
|
145
|
-
})[];
|
|
146
|
-
sort: {
|
|
147
|
-
slpAmount: number;
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
|
-
r: {
|
|
151
|
-
f: string;
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
export declare const SlpTokenBalanceTemplate: (slpaddr: string, tokenId: string) => {
|
|
155
|
-
v: number;
|
|
156
|
-
q: {
|
|
157
|
-
db: string[];
|
|
158
|
-
aggregate: ({
|
|
159
|
-
$match: {
|
|
160
|
-
"tokenDetails.tokenIdHex": string;
|
|
161
|
-
"graphTxn.outputs.status"?: undefined;
|
|
162
|
-
"graphTxn.outputs.address"?: undefined;
|
|
163
|
-
};
|
|
164
|
-
$unwind?: undefined;
|
|
165
|
-
$group?: undefined;
|
|
166
|
-
$sort?: undefined;
|
|
167
|
-
$lookup?: undefined;
|
|
168
|
-
} | {
|
|
169
|
-
$match: {
|
|
170
|
-
"graphTxn.outputs.status": string;
|
|
171
|
-
"graphTxn.outputs.address": string;
|
|
172
|
-
"tokenDetails.tokenIdHex"?: undefined;
|
|
173
|
-
};
|
|
174
|
-
$unwind?: undefined;
|
|
175
|
-
$group?: undefined;
|
|
176
|
-
$sort?: undefined;
|
|
177
|
-
$lookup?: undefined;
|
|
178
|
-
} | {
|
|
179
|
-
$unwind: string;
|
|
180
|
-
$match?: undefined;
|
|
181
|
-
$group?: undefined;
|
|
182
|
-
$sort?: undefined;
|
|
183
|
-
$lookup?: undefined;
|
|
184
|
-
} | {
|
|
185
|
-
$group: {
|
|
186
|
-
_id: string;
|
|
187
|
-
slpAmount: {
|
|
188
|
-
$sum: string;
|
|
189
|
-
};
|
|
190
|
-
};
|
|
191
|
-
$match?: undefined;
|
|
192
|
-
$unwind?: undefined;
|
|
193
|
-
$sort?: undefined;
|
|
194
|
-
$lookup?: undefined;
|
|
195
|
-
} | {
|
|
196
|
-
$sort: {
|
|
197
|
-
slpAmount: number;
|
|
198
|
-
};
|
|
199
|
-
$match?: undefined;
|
|
200
|
-
$unwind?: undefined;
|
|
201
|
-
$group?: undefined;
|
|
202
|
-
$lookup?: undefined;
|
|
203
|
-
} | {
|
|
204
|
-
$lookup: {
|
|
205
|
-
from: string;
|
|
206
|
-
localField: string;
|
|
207
|
-
foreignField: string;
|
|
208
|
-
as: string;
|
|
209
|
-
};
|
|
210
|
-
$match?: undefined;
|
|
211
|
-
$unwind?: undefined;
|
|
212
|
-
$group?: undefined;
|
|
213
|
-
$sort?: undefined;
|
|
214
|
-
})[];
|
|
215
|
-
sort: {
|
|
216
|
-
slpAmount: number;
|
|
217
|
-
};
|
|
218
|
-
};
|
|
219
|
-
r: {
|
|
220
|
-
f: string;
|
|
221
|
-
};
|
|
222
|
-
};
|
|
223
|
-
export declare const SlpAddressTransactionHistoryTemplate: (address: string, tokenId?: string | undefined, limit?: number, skip?: number) => {
|
|
224
|
-
v: number;
|
|
225
|
-
q: {
|
|
226
|
-
db: string[];
|
|
227
|
-
find: {
|
|
228
|
-
$query: {
|
|
229
|
-
$or: ({
|
|
230
|
-
"in.e.a": string;
|
|
231
|
-
"out.e.a"?: undefined;
|
|
232
|
-
} | {
|
|
233
|
-
"out.e.a": string;
|
|
234
|
-
"in.e.a"?: undefined;
|
|
235
|
-
})[];
|
|
236
|
-
$and: {
|
|
237
|
-
"slp.valid": boolean;
|
|
238
|
-
}[];
|
|
239
|
-
};
|
|
240
|
-
};
|
|
241
|
-
sort: {
|
|
242
|
-
"blk.i": number;
|
|
243
|
-
};
|
|
244
|
-
limit: number;
|
|
245
|
-
skip: number;
|
|
246
|
-
};
|
|
247
|
-
r: {
|
|
248
|
-
f: string;
|
|
249
|
-
};
|
|
250
|
-
};
|
|
251
|
-
export declare const SlpWaitForTransactionTemplate: (slpaddr?: string | undefined, tokenId?: string | undefined) => {
|
|
252
|
-
v: number;
|
|
253
|
-
q: {
|
|
254
|
-
db: string[];
|
|
255
|
-
find: {};
|
|
256
|
-
};
|
|
257
|
-
};
|
|
258
|
-
export declare const SlpTokenInfoTemplate: (tokenId?: string | undefined, limit?: number, skip?: number) => {
|
|
259
|
-
v: number;
|
|
260
|
-
q: {
|
|
261
|
-
db: string[];
|
|
262
|
-
find: {};
|
|
263
|
-
sort: {
|
|
264
|
-
"tokenStats.approx_txns_since_genesis": number;
|
|
265
|
-
};
|
|
266
|
-
limit: number;
|
|
267
|
-
skip: number;
|
|
268
|
-
};
|
|
269
|
-
r: {
|
|
270
|
-
f: string;
|
|
271
|
-
};
|
|
272
|
-
};
|
|
273
|
-
export declare const SlpBatonUtxosTemplate: (slpaddr: string, tokenId?: string | undefined) => {
|
|
274
|
-
v: number;
|
|
275
|
-
q: {
|
|
276
|
-
db: string[];
|
|
277
|
-
aggregate: ({
|
|
278
|
-
$match: {
|
|
279
|
-
"graphTxn.outputs.address": string;
|
|
280
|
-
"graphTxn.outputs.status": string;
|
|
281
|
-
};
|
|
282
|
-
$unwind?: undefined;
|
|
283
|
-
$project?: undefined;
|
|
284
|
-
$lookup?: undefined;
|
|
285
|
-
} | {
|
|
286
|
-
$unwind: string;
|
|
287
|
-
$match?: undefined;
|
|
288
|
-
$project?: undefined;
|
|
289
|
-
$lookup?: undefined;
|
|
290
|
-
} | {
|
|
291
|
-
$project: {
|
|
292
|
-
graphTxn: number;
|
|
293
|
-
};
|
|
294
|
-
$match?: undefined;
|
|
295
|
-
$unwind?: undefined;
|
|
296
|
-
$lookup?: undefined;
|
|
297
|
-
} | {
|
|
298
|
-
$lookup: {
|
|
299
|
-
from: string;
|
|
300
|
-
localField: string;
|
|
301
|
-
foreignField: string;
|
|
302
|
-
as: string;
|
|
303
|
-
};
|
|
304
|
-
$match?: undefined;
|
|
305
|
-
$unwind?: undefined;
|
|
306
|
-
$project?: undefined;
|
|
307
|
-
})[];
|
|
308
|
-
};
|
|
309
|
-
r: {
|
|
310
|
-
f: string;
|
|
311
|
-
};
|
|
312
|
-
};
|
|
@@ -1,387 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SlpBatonUtxosTemplate = exports.SlpTokenInfoTemplate = exports.SlpWaitForTransactionTemplate = exports.SlpAddressTransactionHistoryTemplate = exports.SlpTokenBalanceTemplate = exports.SlpAllTokenBalancesTemplate = exports.SlpSpendableUtxosTemplate = exports.SlpAllOutpointsTemplate = exports.SlpAllUtxosTemplate = void 0;
|
|
4
|
-
// Slp Utxos for bch operation, to prevent accident burning of tokens and baton
|
|
5
|
-
// prettier-ignore
|
|
6
|
-
const SlpAllUtxosTemplate = (slpaddr) => ({
|
|
7
|
-
"v": 3,
|
|
8
|
-
"q": {
|
|
9
|
-
"db": ["g"],
|
|
10
|
-
"aggregate": [
|
|
11
|
-
{
|
|
12
|
-
"$match": {
|
|
13
|
-
"graphTxn.outputs.address": slpaddr,
|
|
14
|
-
"graphTxn.outputs.status": {
|
|
15
|
-
"$in": [
|
|
16
|
-
"UNSPENT",
|
|
17
|
-
"BATON_UNSPENT"
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"$unwind": "$graphTxn.outputs"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"$match": {
|
|
27
|
-
"graphTxn.outputs.address": slpaddr,
|
|
28
|
-
"graphTxn.outputs.status": {
|
|
29
|
-
"$in": [
|
|
30
|
-
"UNSPENT",
|
|
31
|
-
"BATON_UNSPENT"
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
"limit": 1e6,
|
|
38
|
-
},
|
|
39
|
-
"r": {
|
|
40
|
-
"f": "[ .[] | { txid: .graphTxn.txid, vout: .graphTxn.outputs.vout, satoshis: .graphTxn.outputs.bchSatoshis, value: .graphTxn.outputs.slpAmount, decimals: .graphTxn.details.decimals, ticker: .graphTxn.details.symbol, tokenId: .graphTxn.details.tokenIdHex, type: .graphTxn.details.versionType, parentTokenId: .tokenDetails.nftGroupIdHex } ]"
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
exports.SlpAllUtxosTemplate = SlpAllUtxosTemplate;
|
|
44
|
-
// Slp outpoints for bch operation, to prevent accident burning of tokens and baton
|
|
45
|
-
// prettier-ignore
|
|
46
|
-
const SlpAllOutpointsTemplate = (slpaddr) => ({
|
|
47
|
-
"v": 3,
|
|
48
|
-
"q": {
|
|
49
|
-
"db": ["g"],
|
|
50
|
-
"aggregate": [
|
|
51
|
-
{
|
|
52
|
-
"$match": {
|
|
53
|
-
"graphTxn.outputs.address": slpaddr,
|
|
54
|
-
"graphTxn.outputs.status": {
|
|
55
|
-
"$in": [
|
|
56
|
-
"UNSPENT",
|
|
57
|
-
"BATON_UNSPENT"
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"$unwind": "$graphTxn.outputs"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"$match": {
|
|
67
|
-
"graphTxn.outputs.address": slpaddr,
|
|
68
|
-
"graphTxn.outputs.status": {
|
|
69
|
-
"$in": [
|
|
70
|
-
"UNSPENT",
|
|
71
|
-
"BATON_UNSPENT"
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"$project": {
|
|
78
|
-
"graphTxn": 1
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
],
|
|
82
|
-
"limit": 1e6,
|
|
83
|
-
},
|
|
84
|
-
"r": {
|
|
85
|
-
"f": "[ .[] | [.graphTxn.txid, .graphTxn.outputs.vout | tostring] | join(\":\") ]"
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
exports.SlpAllOutpointsTemplate = SlpAllOutpointsTemplate;
|
|
89
|
-
// Slp Utxos for spending
|
|
90
|
-
// prettier-ignore
|
|
91
|
-
const SlpSpendableUtxosTemplate = (slpaddr, tokenId) => {
|
|
92
|
-
let q = {
|
|
93
|
-
"v": 3,
|
|
94
|
-
"q": {
|
|
95
|
-
"db": ["g"],
|
|
96
|
-
"aggregate": [
|
|
97
|
-
{
|
|
98
|
-
"$match": {
|
|
99
|
-
"graphTxn.outputs.address": slpaddr,
|
|
100
|
-
"graphTxn.outputs.status": "UNSPENT"
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"$unwind": "$graphTxn.outputs"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"$match": {
|
|
108
|
-
"graphTxn.outputs.address": slpaddr,
|
|
109
|
-
"graphTxn.outputs.status": "UNSPENT"
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"$lookup": {
|
|
114
|
-
"from": "tokens",
|
|
115
|
-
"localField": "graphTxn.details.tokenIdHex",
|
|
116
|
-
"foreignField": "tokenDetails.tokenIdHex",
|
|
117
|
-
"as": "token"
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
]
|
|
121
|
-
},
|
|
122
|
-
"r": {
|
|
123
|
-
"f": "[ .[] | { txid: .graphTxn.txid, vout: .graphTxn.outputs.vout, satoshis: .graphTxn.outputs.bchSatoshis, value: .graphTxn.outputs.slpAmount, decimals: .token[0].tokenDetails.decimals, ticker: .token[0].tokenDetails.symbol, tokenId: .graphTxn.details.tokenIdHex, type: .graphTxn.details.versionType, parentTokenId: .token[0].nftParentId } ]"
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
if (tokenId) {
|
|
127
|
-
q["q"]["aggregate"][0]["$match"]["graphTxn.details.tokenIdHex"] = tokenId;
|
|
128
|
-
}
|
|
129
|
-
// console.log(JSON.stringify(q, null, 2));
|
|
130
|
-
return q;
|
|
131
|
-
};
|
|
132
|
-
exports.SlpSpendableUtxosTemplate = SlpSpendableUtxosTemplate;
|
|
133
|
-
// prettier-ignore
|
|
134
|
-
const SlpAllTokenBalancesTemplate = (slpaddr) => {
|
|
135
|
-
let q = {
|
|
136
|
-
"v": 3,
|
|
137
|
-
"q": {
|
|
138
|
-
"db": ["g"],
|
|
139
|
-
"aggregate": [
|
|
140
|
-
{
|
|
141
|
-
"$match": {
|
|
142
|
-
"graphTxn.outputs.status": "UNSPENT",
|
|
143
|
-
"graphTxn.outputs.address": slpaddr
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
"$unwind": "$graphTxn.outputs"
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
"$match": {
|
|
151
|
-
"graphTxn.outputs.status": "UNSPENT",
|
|
152
|
-
"graphTxn.outputs.address": slpaddr
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"$group": {
|
|
157
|
-
"_id": "$tokenDetails.tokenIdHex",
|
|
158
|
-
"slpAmount": {
|
|
159
|
-
"$sum": "$graphTxn.outputs.slpAmount"
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"$sort": {
|
|
165
|
-
"slpAmount": -1
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"$lookup": {
|
|
170
|
-
"from": "tokens",
|
|
171
|
-
"localField": "_id",
|
|
172
|
-
"foreignField": "tokenDetails.tokenIdHex",
|
|
173
|
-
"as": "token"
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
"$match": {
|
|
178
|
-
"slpAmount": {
|
|
179
|
-
"$gt": 0
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
],
|
|
184
|
-
"sort": {
|
|
185
|
-
"slpAmount": -1
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
"r": {
|
|
189
|
-
"f": "[ .[] | { value: .slpAmount, ticker: .token[0].tokenDetails.symbol, name: .token[0].tokenDetails.name, tokenId: ._id, type: .token[0].tokenDetails.versionType, parentTokenId: .token[0].nftParentId } ]"
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
return q;
|
|
193
|
-
};
|
|
194
|
-
exports.SlpAllTokenBalancesTemplate = SlpAllTokenBalancesTemplate;
|
|
195
|
-
// prettier-ignore
|
|
196
|
-
const SlpTokenBalanceTemplate = (slpaddr, tokenId) => {
|
|
197
|
-
let q = {
|
|
198
|
-
"v": 3,
|
|
199
|
-
"q": {
|
|
200
|
-
"db": ["g"],
|
|
201
|
-
"aggregate": [
|
|
202
|
-
{
|
|
203
|
-
"$match": {
|
|
204
|
-
"tokenDetails.tokenIdHex": tokenId
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"$match": {
|
|
209
|
-
"graphTxn.outputs.status": "UNSPENT",
|
|
210
|
-
"graphTxn.outputs.address": slpaddr
|
|
211
|
-
}
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"$unwind": "$graphTxn.outputs"
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
"$match": {
|
|
218
|
-
"graphTxn.outputs.status": "UNSPENT",
|
|
219
|
-
"graphTxn.outputs.address": slpaddr
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
"$group": {
|
|
224
|
-
"_id": "$tokenDetails.tokenIdHex",
|
|
225
|
-
"slpAmount": {
|
|
226
|
-
"$sum": "$graphTxn.outputs.slpAmount"
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"$sort": {
|
|
232
|
-
"slpAmount": -1
|
|
233
|
-
}
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
"$lookup": {
|
|
237
|
-
"from": "tokens",
|
|
238
|
-
"localField": "_id",
|
|
239
|
-
"foreignField": "tokenDetails.tokenIdHex",
|
|
240
|
-
"as": "token"
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
],
|
|
244
|
-
"sort": {
|
|
245
|
-
"slpAmount": -1
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
"r": {
|
|
249
|
-
"f": "[ .[] | { value: .slpAmount, ticker: .token[0].tokenDetails.symbol, name: .token[0].tokenDetails.name, tokenId: ._id, type: .token[0].tokenDetails.versionType, parentTokenId: .token[0].nftParentId } ]"
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
// console.log(JSON.stringify(q, null, 2));
|
|
253
|
-
return q;
|
|
254
|
-
};
|
|
255
|
-
exports.SlpTokenBalanceTemplate = SlpTokenBalanceTemplate;
|
|
256
|
-
// prettier-ignore
|
|
257
|
-
const SlpAddressTransactionHistoryTemplate = (address, tokenId, limit = 100, skip = 0) => {
|
|
258
|
-
const q = {
|
|
259
|
-
"v": 3,
|
|
260
|
-
"q": {
|
|
261
|
-
"db": ["c", "u"],
|
|
262
|
-
"find": {
|
|
263
|
-
"$query": {
|
|
264
|
-
"$or": [
|
|
265
|
-
{ "in.e.a": address },
|
|
266
|
-
{ "out.e.a": address },
|
|
267
|
-
],
|
|
268
|
-
"$and": [
|
|
269
|
-
{ "slp.valid": true },
|
|
270
|
-
]
|
|
271
|
-
},
|
|
272
|
-
},
|
|
273
|
-
"sort": { "blk.i": 1 },
|
|
274
|
-
"limit": limit,
|
|
275
|
-
"skip": skip,
|
|
276
|
-
},
|
|
277
|
-
"r": {
|
|
278
|
-
"f": "[ .[] | { tx_hash: .tx.h, height: .blk.i, details: . } ]"
|
|
279
|
-
}
|
|
280
|
-
};
|
|
281
|
-
if (tokenId) {
|
|
282
|
-
q["q"]["find"]["$query"]["$and"].push({ "slp.detail.tokenIdHex": tokenId });
|
|
283
|
-
}
|
|
284
|
-
// console.log(JSON.stringify(q, null, 2));
|
|
285
|
-
return q;
|
|
286
|
-
};
|
|
287
|
-
exports.SlpAddressTransactionHistoryTemplate = SlpAddressTransactionHistoryTemplate;
|
|
288
|
-
// prettier-ignore
|
|
289
|
-
const SlpWaitForTransactionTemplate = (slpaddr, tokenId) => {
|
|
290
|
-
let q = {
|
|
291
|
-
"v": 3,
|
|
292
|
-
"q": {
|
|
293
|
-
"db": ["c", "u"],
|
|
294
|
-
"find": {}
|
|
295
|
-
}
|
|
296
|
-
};
|
|
297
|
-
if (slpaddr) {
|
|
298
|
-
q["q"]["find"]["$or"] = [
|
|
299
|
-
{
|
|
300
|
-
"in.e.a": slpaddr
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
"out.e.a": slpaddr
|
|
304
|
-
}
|
|
305
|
-
];
|
|
306
|
-
}
|
|
307
|
-
if (tokenId) {
|
|
308
|
-
q["q"]["find"]["slp.detail.tokenIdHex"] = tokenId;
|
|
309
|
-
}
|
|
310
|
-
return q;
|
|
311
|
-
};
|
|
312
|
-
exports.SlpWaitForTransactionTemplate = SlpWaitForTransactionTemplate;
|
|
313
|
-
// Lookup SLP token information
|
|
314
|
-
// prettier-ignore
|
|
315
|
-
const SlpTokenInfoTemplate = (tokenId, limit = 100, skip = 0) => {
|
|
316
|
-
let q = {
|
|
317
|
-
"v": 3,
|
|
318
|
-
"q": {
|
|
319
|
-
"db": ["t"],
|
|
320
|
-
"find": {},
|
|
321
|
-
"sort": {
|
|
322
|
-
"tokenStats.approx_txns_since_genesis": -1
|
|
323
|
-
},
|
|
324
|
-
"limit": limit,
|
|
325
|
-
"skip": skip,
|
|
326
|
-
},
|
|
327
|
-
"r": {
|
|
328
|
-
"f": "[ .[] | { ticker: .tokenDetails.symbol, name: .tokenDetails.name, tokenId: .tokenDetails.tokenIdHex, decimals: .tokenDetails.decimals, documentUrl: .tokenDetails.documentUri, documentHash: .tokenDetails.documentSha256Hex, initialAmount: .tokenDetails.genesisOrMintQuantity, type: .tokenDetails.versionType, parentTokenId: .nftParentId } ]"
|
|
329
|
-
}
|
|
330
|
-
};
|
|
331
|
-
if (tokenId) {
|
|
332
|
-
q["q"]["find"]["tokenDetails.tokenIdHex"] = tokenId;
|
|
333
|
-
}
|
|
334
|
-
// console.log(q);
|
|
335
|
-
return q;
|
|
336
|
-
};
|
|
337
|
-
exports.SlpTokenInfoTemplate = SlpTokenInfoTemplate;
|
|
338
|
-
// Slp Utxos for bch operation, to prevent accident burning of tokens and baton
|
|
339
|
-
// prettier-ignore
|
|
340
|
-
const SlpBatonUtxosTemplate = (slpaddr, tokenId) => {
|
|
341
|
-
let q = {
|
|
342
|
-
"v": 3,
|
|
343
|
-
"q": {
|
|
344
|
-
"db": ["g"],
|
|
345
|
-
"aggregate": [
|
|
346
|
-
{
|
|
347
|
-
"$match": {
|
|
348
|
-
"graphTxn.outputs.address": slpaddr,
|
|
349
|
-
"graphTxn.outputs.status": "BATON_UNSPENT"
|
|
350
|
-
}
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
"$unwind": "$graphTxn.outputs"
|
|
354
|
-
},
|
|
355
|
-
{
|
|
356
|
-
"$match": {
|
|
357
|
-
"graphTxn.outputs.address": slpaddr,
|
|
358
|
-
"graphTxn.outputs.status": "BATON_UNSPENT"
|
|
359
|
-
}
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
"$project": {
|
|
363
|
-
"graphTxn": 1
|
|
364
|
-
}
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
"$lookup": {
|
|
368
|
-
"from": "tokens",
|
|
369
|
-
"localField": "graphTxn.details.tokenIdHex",
|
|
370
|
-
"foreignField": "tokenDetails.tokenIdHex",
|
|
371
|
-
"as": "token"
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
]
|
|
375
|
-
},
|
|
376
|
-
"r": {
|
|
377
|
-
"f": "[ .[] | { txid: .graphTxn.txid, vout: .graphTxn.outputs.vout, satoshis: .graphTxn.outputs.bchSatoshis, value: .graphTxn.outputs.slpAmount, decimals: .token[0].tokenDetails.decimals, ticker: .token[0].tokenDetails.symbol, tokenId: .graphTxn.details.tokenIdHex, type: .graphTxn.details.versionType } ]"
|
|
378
|
-
}
|
|
379
|
-
};
|
|
380
|
-
if (tokenId) {
|
|
381
|
-
q["q"]["aggregate"][0]["$match"]["graphTxn.details.tokenIdHex"] = tokenId;
|
|
382
|
-
}
|
|
383
|
-
// console.log(JSON.stringify(q, null, 2));
|
|
384
|
-
return q;
|
|
385
|
-
};
|
|
386
|
-
exports.SlpBatonUtxosTemplate = SlpBatonUtxosTemplate;
|
|
387
|
-
//# sourceMappingURL=SlpDbTemplates.js.map
|