@bigmi/core 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +2 -2
- package/dist/cjs/actions/getBalance.d.ts +2 -2
- package/dist/cjs/actions/getBalance.js.map +1 -1
- package/dist/cjs/actions/getBlock.d.ts +1 -5
- package/dist/cjs/actions/getBlock.js +0 -1
- package/dist/cjs/actions/getBlock.js.map +1 -1
- package/dist/cjs/actions/getBlockCount.d.ts +0 -1
- package/dist/cjs/actions/getBlockCount.js.map +1 -1
- package/dist/cjs/actions/getBlockStats.d.ts +1 -6
- package/dist/cjs/actions/getBlockStats.js.map +1 -1
- package/dist/cjs/actions/getTransactionFee.d.ts +1 -4
- package/dist/cjs/actions/getTransactionFee.js.map +1 -1
- package/dist/cjs/actions/getTransactions.d.ts +1 -7
- package/dist/cjs/actions/getTransactions.js.map +1 -1
- package/dist/cjs/actions/getUTXOTransaction.d.ts +4 -6
- package/dist/cjs/actions/getUTXOTransaction.js.map +1 -1
- package/dist/cjs/actions/getUTXOs.d.ts +1 -5
- package/dist/cjs/actions/getUTXOs.js.map +1 -1
- package/dist/cjs/actions/getXPubAddresses.d.ts +22 -22
- package/dist/cjs/actions/getXPubAddresses.js.map +1 -1
- package/dist/cjs/actions/sendUTXOTransaction.d.ts +4 -6
- package/dist/cjs/actions/sendUTXOTransaction.js.map +1 -1
- package/dist/cjs/actions/signPsbt.d.ts +0 -1
- package/dist/cjs/actions/signPsbt.js.map +1 -1
- package/dist/cjs/actions/waitForTransaction.d.ts +43 -49
- package/dist/cjs/actions/waitForTransaction.js +0 -1
- package/dist/cjs/actions/waitForTransaction.js.map +1 -1
- package/dist/cjs/actions/watchBlockNumber.d.ts +14 -16
- package/dist/cjs/actions/watchBlockNumber.js.map +1 -1
- package/dist/cjs/chains/bitcoin.d.ts +0 -1
- package/dist/cjs/chains/bitcoin.js +3 -3
- package/dist/cjs/chains/bitcoin.js.map +1 -1
- package/dist/cjs/chains/defineChain.d.ts +0 -1
- package/dist/cjs/chains/defineChain.js.map +1 -1
- package/dist/cjs/chains/signet.d.ts +0 -1
- package/dist/cjs/chains/signet.js +3 -3
- package/dist/cjs/chains/signet.js.map +1 -1
- package/dist/cjs/clients/decorators/public.d.ts +0 -1
- package/dist/cjs/clients/decorators/public.js.map +1 -1
- package/dist/cjs/clients/decorators/wallet.d.ts +2 -3
- package/dist/cjs/clients/decorators/wallet.js.map +1 -1
- package/dist/cjs/errors/address.d.ts +1 -4
- package/dist/cjs/errors/address.js.map +1 -1
- package/dist/cjs/errors/base.js.map +1 -1
- package/dist/cjs/errors/block.d.ts +1 -5
- package/dist/cjs/errors/block.js.map +1 -1
- package/dist/cjs/errors/provider.d.ts +0 -1
- package/dist/cjs/errors/provider.js.map +1 -1
- package/dist/cjs/errors/request.d.ts +5 -28
- package/dist/cjs/errors/request.js.map +1 -1
- package/dist/cjs/errors/rpc.d.ts +23 -24
- package/dist/cjs/errors/rpc.js +3 -3
- package/dist/cjs/errors/rpc.js.map +1 -1
- package/dist/cjs/errors/transaction.d.ts +3 -14
- package/dist/cjs/errors/transaction.js.map +1 -1
- package/dist/cjs/errors/transport.d.ts +2 -10
- package/dist/cjs/errors/transport.js.map +1 -1
- package/dist/cjs/errors/utils.d.ts +0 -1
- package/dist/cjs/errors/utxo.d.ts +1 -6
- package/dist/cjs/errors/utxo.js.map +1 -1
- package/dist/cjs/factories/createClient.d.ts +49 -30
- package/dist/cjs/factories/createClient.js.map +1 -1
- package/dist/cjs/factories/createTransport.d.ts +3 -13
- package/dist/cjs/factories/createTransport.js.map +1 -1
- package/dist/cjs/test/utils.js.map +1 -1
- package/dist/cjs/transports/ankr/ankr.d.ts +0 -1
- package/dist/cjs/transports/ankr/ankr.js.map +1 -1
- package/dist/cjs/transports/ankr/getBalance.d.ts +0 -1
- package/dist/cjs/transports/ankr/getBalance.js +2 -2
- package/dist/cjs/transports/ankr/getBalance.js.map +1 -1
- package/dist/cjs/transports/ankr/getTransactionFee.d.ts +0 -1
- package/dist/cjs/transports/ankr/getTransactionFee.js.map +1 -1
- package/dist/cjs/transports/ankr/getTransactions.d.ts +0 -1
- package/dist/cjs/transports/ankr/getTransactions.js.map +1 -1
- package/dist/cjs/transports/ankr/methods.d.ts +0 -1
- package/dist/cjs/transports/ankr/methods.js.map +1 -1
- package/dist/cjs/transports/ankr/utils.d.ts +0 -1
- package/dist/cjs/transports/ankr/utils.js.map +1 -1
- package/dist/cjs/transports/blockchair/blockchair.d.ts +0 -1
- package/dist/cjs/transports/blockchair/blockchair.js.map +1 -1
- package/dist/cjs/transports/blockchair/getBalance.d.ts +0 -1
- package/dist/cjs/transports/blockchair/getBalance.js +2 -2
- package/dist/cjs/transports/blockchair/getBalance.js.map +1 -1
- package/dist/cjs/transports/blockchair/getTransactionFee.d.ts +0 -1
- package/dist/cjs/transports/blockchair/getTransactionFee.js +2 -2
- package/dist/cjs/transports/blockchair/getTransactionFee.js.map +1 -1
- package/dist/cjs/transports/blockchair/getUTXOs.d.ts +0 -1
- package/dist/cjs/transports/blockchair/getUTXOs.js +2 -2
- package/dist/cjs/transports/blockchair/getUTXOs.js.map +1 -1
- package/dist/cjs/transports/blockchair/getXPubAddresses.d.ts +0 -1
- package/dist/cjs/transports/blockchair/getXPubAddresses.js +2 -2
- package/dist/cjs/transports/blockchair/getXPubAddresses.js.map +1 -1
- package/dist/cjs/transports/blockchair/methods.d.ts +0 -1
- package/dist/cjs/transports/blockchair/methods.js.map +1 -1
- package/dist/cjs/transports/blockcypher/blockcypher.d.ts +0 -1
- package/dist/cjs/transports/blockcypher/blockcypher.js.map +1 -1
- package/dist/cjs/transports/blockcypher/getBalance.d.ts +0 -1
- package/dist/cjs/transports/blockcypher/getBalance.js.map +1 -1
- package/dist/cjs/transports/blockcypher/getTransactionFee.d.ts +0 -1
- package/dist/cjs/transports/blockcypher/getTransactionFee.js.map +1 -1
- package/dist/cjs/transports/blockcypher/getUTXOs.d.ts +0 -1
- package/dist/cjs/transports/blockcypher/getUTXOs.js.map +1 -1
- package/dist/cjs/transports/blockcypher/methods.d.ts +0 -1
- package/dist/cjs/transports/blockcypher/methods.js.map +1 -1
- package/dist/cjs/transports/blockcypher/utils.d.ts +0 -1
- package/dist/cjs/transports/blockcypher/utils.js +3 -3
- package/dist/cjs/transports/blockcypher/utils.js.map +1 -1
- package/dist/cjs/transports/custom.d.ts +11 -7
- package/dist/cjs/transports/custom.js.map +1 -1
- package/dist/cjs/transports/fallback.d.ts +32 -36
- package/dist/cjs/transports/fallback.js +2 -2
- package/dist/cjs/transports/fallback.js.map +1 -1
- package/dist/cjs/transports/getHttpRpcClient.d.ts +17 -9
- package/dist/cjs/transports/getHttpRpcClient.js.map +1 -1
- package/dist/cjs/transports/getRpcProviderMethods.d.ts +0 -1
- package/dist/cjs/transports/getRpcProviderMethods.js.map +1 -1
- package/dist/cjs/transports/http.d.ts +31 -20
- package/dist/cjs/transports/http.js.map +1 -1
- package/dist/cjs/transports/mempool/getBalance.d.ts +0 -1
- package/dist/cjs/transports/mempool/getBalance.js.map +1 -1
- package/dist/cjs/transports/mempool/getTransactionFee.d.ts +0 -1
- package/dist/cjs/transports/mempool/getTransactionFee.js.map +1 -1
- package/dist/cjs/transports/mempool/getTransactions.d.ts +0 -1
- package/dist/cjs/transports/mempool/getTransactions.js.map +1 -1
- package/dist/cjs/transports/mempool/mempool.d.ts +0 -1
- package/dist/cjs/transports/mempool/mempool.js.map +1 -1
- package/dist/cjs/transports/mempool/methods.d.ts +0 -1
- package/dist/cjs/transports/mempool/methods.js.map +1 -1
- package/dist/cjs/transports/mempool/utils.d.ts +0 -1
- package/dist/cjs/transports/mempool/utils.js.map +1 -1
- package/dist/cjs/transports/types.d.ts +17 -15
- package/dist/cjs/transports/types.js.map +1 -1
- package/dist/cjs/transports/utxo.d.ts +0 -1
- package/dist/cjs/transports/utxo.js.map +1 -1
- package/dist/cjs/types/account.d.ts +0 -1
- package/dist/cjs/types/address.d.ts +0 -1
- package/dist/cjs/types/address.js.map +1 -1
- package/dist/cjs/types/block.d.ts +17 -17
- package/dist/cjs/types/chain.d.ts +20 -9
- package/dist/cjs/types/chain.js.map +1 -1
- package/dist/cjs/types/client.d.ts +40 -25
- package/dist/cjs/types/request.d.ts +12 -8
- package/dist/cjs/types/transport.d.ts +16 -11
- package/dist/cjs/types/utils.d.ts +31 -31
- package/dist/cjs/types/xpub.d.ts +0 -1
- package/dist/cjs/utils/buildRequest.d.ts +0 -1
- package/dist/cjs/utils/buildRequest.js +3 -3
- package/dist/cjs/utils/buildRequest.js.map +1 -1
- package/dist/cjs/utils/cancelTransaction.d.ts +0 -1
- package/dist/cjs/utils/cancelTransaction.js +0 -1
- package/dist/cjs/utils/cancelTransaction.js.map +1 -1
- package/dist/cjs/utils/converter.js.map +1 -1
- package/dist/cjs/utils/createBatchScheduler.d.ts +1 -8
- package/dist/cjs/utils/createBatchScheduler.js +1 -1
- package/dist/cjs/utils/createBatchScheduler.js.map +1 -1
- package/dist/cjs/utils/deepEqual.js.map +1 -1
- package/dist/cjs/utils/getAction.d.ts +6 -7
- package/dist/cjs/utils/getAction.js.map +1 -1
- package/dist/cjs/utils/getAddressInfo.d.ts +0 -1
- package/dist/cjs/utils/getAddressInfo.js +26 -26
- package/dist/cjs/utils/getAddressInfo.js.map +1 -1
- package/dist/cjs/utils/idCache.js.map +1 -1
- package/dist/cjs/utils/isAddress.d.ts +0 -1
- package/dist/cjs/utils/isAddress.js.map +1 -1
- package/dist/cjs/utils/lru.d.ts +4 -4
- package/dist/cjs/utils/lru.js.map +1 -1
- package/dist/cjs/utils/modifyFee.d.ts +0 -1
- package/dist/cjs/utils/modifyFee.js +0 -1
- package/dist/cjs/utils/modifyFee.js.map +1 -1
- package/dist/cjs/utils/observe.d.ts +4 -5
- package/dist/cjs/utils/observe.js +2 -2
- package/dist/cjs/utils/observe.js.map +1 -1
- package/dist/cjs/utils/parseAccount.d.ts +0 -1
- package/dist/cjs/utils/parseAccount.js.map +1 -1
- package/dist/cjs/utils/poll.d.ts +4 -10
- package/dist/cjs/utils/poll.js.map +1 -1
- package/dist/cjs/utils/retryUntil.d.ts +17 -15
- package/dist/cjs/utils/retryUntil.js.map +1 -1
- package/dist/cjs/utils/sleep.js.map +1 -1
- package/dist/cjs/utils/stringify.d.ts +0 -1
- package/dist/cjs/utils/stringify.js.map +1 -1
- package/dist/cjs/utils/uid.js.map +1 -1
- package/dist/cjs/utils/url.js.map +1 -1
- package/dist/cjs/utils/wait.js.map +1 -1
- package/dist/cjs/utils/withDedupe.d.ts +1 -5
- package/dist/cjs/utils/withDedupe.js +1 -1
- package/dist/cjs/utils/withDedupe.js.map +1 -1
- package/dist/cjs/utils/withResolvers.js.map +1 -1
- package/dist/cjs/utils/withRetry.d.ts +2 -10
- package/dist/cjs/utils/withRetry.js.map +1 -1
- package/dist/cjs/utils/withTimeout.d.ts +2 -9
- package/dist/cjs/utils/withTimeout.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/actions/getBalance.d.ts +2 -2
- package/dist/esm/actions/getBalance.d.ts.map +1 -1
- package/dist/esm/actions/getBalance.js.map +1 -1
- package/dist/esm/actions/getBlock.d.ts +1 -5
- package/dist/esm/actions/getBlock.d.ts.map +1 -1
- package/dist/esm/actions/getBlock.js.map +1 -1
- package/dist/esm/actions/getBlockCount.d.ts +0 -1
- package/dist/esm/actions/getBlockCount.d.ts.map +1 -1
- package/dist/esm/actions/getBlockCount.js.map +1 -1
- package/dist/esm/actions/getBlockStats.d.ts +1 -6
- package/dist/esm/actions/getBlockStats.d.ts.map +1 -1
- package/dist/esm/actions/getBlockStats.js.map +1 -1
- package/dist/esm/actions/getTransactionFee.d.ts +1 -4
- package/dist/esm/actions/getTransactionFee.d.ts.map +1 -1
- package/dist/esm/actions/getTransactionFee.js.map +1 -1
- package/dist/esm/actions/getTransactions.d.ts +1 -7
- package/dist/esm/actions/getTransactions.d.ts.map +1 -1
- package/dist/esm/actions/getTransactions.js.map +1 -1
- package/dist/esm/actions/getUTXOTransaction.d.ts +4 -6
- package/dist/esm/actions/getUTXOTransaction.d.ts.map +1 -1
- package/dist/esm/actions/getUTXOTransaction.js.map +1 -1
- package/dist/esm/actions/getUTXOs.d.ts +1 -5
- package/dist/esm/actions/getUTXOs.d.ts.map +1 -1
- package/dist/esm/actions/getUTXOs.js.map +1 -1
- package/dist/esm/actions/getXPubAddresses.d.ts +22 -22
- package/dist/esm/actions/getXPubAddresses.d.ts.map +1 -1
- package/dist/esm/actions/getXPubAddresses.js.map +1 -1
- package/dist/esm/actions/sendUTXOTransaction.d.ts +4 -6
- package/dist/esm/actions/sendUTXOTransaction.d.ts.map +1 -1
- package/dist/esm/actions/sendUTXOTransaction.js.map +1 -1
- package/dist/esm/actions/signPsbt.d.ts +0 -1
- package/dist/esm/actions/signPsbt.d.ts.map +1 -1
- package/dist/esm/actions/signPsbt.js.map +1 -1
- package/dist/esm/actions/waitForTransaction.d.ts +43 -49
- package/dist/esm/actions/waitForTransaction.d.ts.map +1 -1
- package/dist/esm/actions/waitForTransaction.js.map +1 -1
- package/dist/esm/actions/watchBlockNumber.d.ts +14 -16
- package/dist/esm/actions/watchBlockNumber.d.ts.map +1 -1
- package/dist/esm/actions/watchBlockNumber.js.map +1 -1
- package/dist/esm/chains/bitcoin.d.ts +0 -1
- package/dist/esm/chains/bitcoin.d.ts.map +1 -1
- package/dist/esm/chains/bitcoin.js +3 -3
- package/dist/esm/chains/bitcoin.js.map +1 -1
- package/dist/esm/chains/defineChain.d.ts +0 -1
- package/dist/esm/chains/defineChain.d.ts.map +1 -1
- package/dist/esm/chains/defineChain.js.map +1 -1
- package/dist/esm/chains/signet.d.ts +0 -1
- package/dist/esm/chains/signet.d.ts.map +1 -1
- package/dist/esm/chains/signet.js +3 -3
- package/dist/esm/chains/signet.js.map +1 -1
- package/dist/esm/clients/decorators/public.d.ts +0 -1
- package/dist/esm/clients/decorators/public.d.ts.map +1 -1
- package/dist/esm/clients/decorators/public.js.map +1 -1
- package/dist/esm/clients/decorators/wallet.d.ts +2 -3
- package/dist/esm/clients/decorators/wallet.d.ts.map +1 -1
- package/dist/esm/clients/decorators/wallet.js.map +1 -1
- package/dist/esm/errors/address.d.ts +1 -4
- package/dist/esm/errors/address.d.ts.map +1 -1
- package/dist/esm/errors/address.js.map +1 -1
- package/dist/esm/errors/base.d.ts.map +1 -1
- package/dist/esm/errors/base.js.map +1 -1
- package/dist/esm/errors/block.d.ts +1 -5
- package/dist/esm/errors/block.d.ts.map +1 -1
- package/dist/esm/errors/block.js.map +1 -1
- package/dist/esm/errors/provider.d.ts +0 -1
- package/dist/esm/errors/provider.d.ts.map +1 -1
- package/dist/esm/errors/provider.js.map +1 -1
- package/dist/esm/errors/request.d.ts +5 -28
- package/dist/esm/errors/request.d.ts.map +1 -1
- package/dist/esm/errors/request.js.map +1 -1
- package/dist/esm/errors/rpc.d.ts +23 -24
- package/dist/esm/errors/rpc.d.ts.map +1 -1
- package/dist/esm/errors/rpc.js +3 -3
- package/dist/esm/errors/rpc.js.map +1 -1
- package/dist/esm/errors/transaction.d.ts +3 -14
- package/dist/esm/errors/transaction.d.ts.map +1 -1
- package/dist/esm/errors/transaction.js.map +1 -1
- package/dist/esm/errors/transport.d.ts +2 -10
- package/dist/esm/errors/transport.d.ts.map +1 -1
- package/dist/esm/errors/transport.js.map +1 -1
- package/dist/esm/errors/utils.d.ts +0 -1
- package/dist/esm/errors/utils.d.ts.map +1 -1
- package/dist/esm/errors/utxo.d.ts +1 -6
- package/dist/esm/errors/utxo.d.ts.map +1 -1
- package/dist/esm/errors/utxo.js.map +1 -1
- package/dist/esm/factories/createClient.d.ts +49 -30
- package/dist/esm/factories/createClient.d.ts.map +1 -1
- package/dist/esm/factories/createClient.js.map +1 -1
- package/dist/esm/factories/createTransport.d.ts +3 -13
- package/dist/esm/factories/createTransport.d.ts.map +1 -1
- package/dist/esm/factories/createTransport.js.map +1 -1
- package/dist/esm/test/utils.d.ts.map +1 -1
- package/dist/esm/test/utils.js.map +1 -1
- package/dist/esm/transports/ankr/ankr.d.ts +0 -1
- package/dist/esm/transports/ankr/ankr.d.ts.map +1 -1
- package/dist/esm/transports/ankr/ankr.js.map +1 -1
- package/dist/esm/transports/ankr/ankr.types.d.ts.map +1 -1
- package/dist/esm/transports/ankr/getBalance.d.ts +0 -1
- package/dist/esm/transports/ankr/getBalance.d.ts.map +1 -1
- package/dist/esm/transports/ankr/getBalance.js +2 -2
- package/dist/esm/transports/ankr/getBalance.js.map +1 -1
- package/dist/esm/transports/ankr/getTransactionFee.d.ts +0 -1
- package/dist/esm/transports/ankr/getTransactionFee.d.ts.map +1 -1
- package/dist/esm/transports/ankr/getTransactionFee.js.map +1 -1
- package/dist/esm/transports/ankr/getTransactions.d.ts +0 -1
- package/dist/esm/transports/ankr/getTransactions.d.ts.map +1 -1
- package/dist/esm/transports/ankr/getTransactions.js.map +1 -1
- package/dist/esm/transports/ankr/methods.d.ts +0 -1
- package/dist/esm/transports/ankr/methods.d.ts.map +1 -1
- package/dist/esm/transports/ankr/methods.js.map +1 -1
- package/dist/esm/transports/ankr/utils.d.ts +0 -1
- package/dist/esm/transports/ankr/utils.d.ts.map +1 -1
- package/dist/esm/transports/ankr/utils.js.map +1 -1
- package/dist/esm/transports/blockchair/blockchair.d.ts +0 -1
- package/dist/esm/transports/blockchair/blockchair.d.ts.map +1 -1
- package/dist/esm/transports/blockchair/blockchair.js.map +1 -1
- package/dist/esm/transports/blockchair/blockchair.types.d.ts.map +1 -1
- package/dist/esm/transports/blockchair/getBalance.d.ts +0 -1
- package/dist/esm/transports/blockchair/getBalance.d.ts.map +1 -1
- package/dist/esm/transports/blockchair/getBalance.js +2 -2
- package/dist/esm/transports/blockchair/getBalance.js.map +1 -1
- package/dist/esm/transports/blockchair/getTransactionFee.d.ts +0 -1
- package/dist/esm/transports/blockchair/getTransactionFee.d.ts.map +1 -1
- package/dist/esm/transports/blockchair/getTransactionFee.js +2 -2
- package/dist/esm/transports/blockchair/getTransactionFee.js.map +1 -1
- package/dist/esm/transports/blockchair/getUTXOs.d.ts +0 -1
- package/dist/esm/transports/blockchair/getUTXOs.d.ts.map +1 -1
- package/dist/esm/transports/blockchair/getUTXOs.js +2 -2
- package/dist/esm/transports/blockchair/getUTXOs.js.map +1 -1
- package/dist/esm/transports/blockchair/getXPubAddresses.d.ts +0 -1
- package/dist/esm/transports/blockchair/getXPubAddresses.d.ts.map +1 -1
- package/dist/esm/transports/blockchair/getXPubAddresses.js +2 -2
- package/dist/esm/transports/blockchair/getXPubAddresses.js.map +1 -1
- package/dist/esm/transports/blockchair/methods.d.ts +0 -1
- package/dist/esm/transports/blockchair/methods.d.ts.map +1 -1
- package/dist/esm/transports/blockchair/methods.js.map +1 -1
- package/dist/esm/transports/blockcypher/blockcypher.d.ts +0 -1
- package/dist/esm/transports/blockcypher/blockcypher.d.ts.map +1 -1
- package/dist/esm/transports/blockcypher/blockcypher.js.map +1 -1
- package/dist/esm/transports/blockcypher/blockcypher.types.d.ts.map +1 -1
- package/dist/esm/transports/blockcypher/getBalance.d.ts +0 -1
- package/dist/esm/transports/blockcypher/getBalance.d.ts.map +1 -1
- package/dist/esm/transports/blockcypher/getBalance.js.map +1 -1
- package/dist/esm/transports/blockcypher/getTransactionFee.d.ts +0 -1
- package/dist/esm/transports/blockcypher/getTransactionFee.d.ts.map +1 -1
- package/dist/esm/transports/blockcypher/getTransactionFee.js.map +1 -1
- package/dist/esm/transports/blockcypher/getUTXOs.d.ts +0 -1
- package/dist/esm/transports/blockcypher/getUTXOs.d.ts.map +1 -1
- package/dist/esm/transports/blockcypher/getUTXOs.js.map +1 -1
- package/dist/esm/transports/blockcypher/methods.d.ts +0 -1
- package/dist/esm/transports/blockcypher/methods.d.ts.map +1 -1
- package/dist/esm/transports/blockcypher/methods.js.map +1 -1
- package/dist/esm/transports/blockcypher/utils.d.ts +0 -1
- package/dist/esm/transports/blockcypher/utils.d.ts.map +1 -1
- package/dist/esm/transports/blockcypher/utils.js +3 -3
- package/dist/esm/transports/blockcypher/utils.js.map +1 -1
- package/dist/esm/transports/custom.d.ts +11 -7
- package/dist/esm/transports/custom.d.ts.map +1 -1
- package/dist/esm/transports/custom.js.map +1 -1
- package/dist/esm/transports/fallback.d.ts +32 -36
- package/dist/esm/transports/fallback.d.ts.map +1 -1
- package/dist/esm/transports/fallback.js +2 -2
- package/dist/esm/transports/fallback.js.map +1 -1
- package/dist/esm/transports/getHttpRpcClient.d.ts +17 -9
- package/dist/esm/transports/getHttpRpcClient.d.ts.map +1 -1
- package/dist/esm/transports/getHttpRpcClient.js.map +1 -1
- package/dist/esm/transports/getRpcProviderMethods.d.ts +0 -1
- package/dist/esm/transports/getRpcProviderMethods.d.ts.map +1 -1
- package/dist/esm/transports/getRpcProviderMethods.js.map +1 -1
- package/dist/esm/transports/http.d.ts +31 -20
- package/dist/esm/transports/http.d.ts.map +1 -1
- package/dist/esm/transports/http.js.map +1 -1
- package/dist/esm/transports/mempool/getBalance.d.ts +0 -1
- package/dist/esm/transports/mempool/getBalance.d.ts.map +1 -1
- package/dist/esm/transports/mempool/getBalance.js.map +1 -1
- package/dist/esm/transports/mempool/getTransactionFee.d.ts +0 -1
- package/dist/esm/transports/mempool/getTransactionFee.d.ts.map +1 -1
- package/dist/esm/transports/mempool/getTransactionFee.js.map +1 -1
- package/dist/esm/transports/mempool/getTransactions.d.ts +0 -1
- package/dist/esm/transports/mempool/getTransactions.d.ts.map +1 -1
- package/dist/esm/transports/mempool/getTransactions.js.map +1 -1
- package/dist/esm/transports/mempool/mempool.d.ts +0 -1
- package/dist/esm/transports/mempool/mempool.d.ts.map +1 -1
- package/dist/esm/transports/mempool/mempool.js.map +1 -1
- package/dist/esm/transports/mempool/mempool.types.d.ts.map +1 -1
- package/dist/esm/transports/mempool/methods.d.ts +0 -1
- package/dist/esm/transports/mempool/methods.d.ts.map +1 -1
- package/dist/esm/transports/mempool/methods.js.map +1 -1
- package/dist/esm/transports/mempool/utils.d.ts +0 -1
- package/dist/esm/transports/mempool/utils.d.ts.map +1 -1
- package/dist/esm/transports/mempool/utils.js.map +1 -1
- package/dist/esm/transports/types.d.ts +17 -15
- package/dist/esm/transports/types.d.ts.map +1 -1
- package/dist/esm/transports/types.js.map +1 -1
- package/dist/esm/transports/utxo.d.ts +0 -1
- package/dist/esm/transports/utxo.d.ts.map +1 -1
- package/dist/esm/transports/utxo.js.map +1 -1
- package/dist/esm/types/account.d.ts +0 -1
- package/dist/esm/types/account.d.ts.map +1 -1
- package/dist/esm/types/address.d.ts +0 -1
- package/dist/esm/types/address.d.ts.map +1 -1
- package/dist/esm/types/address.js.map +1 -1
- package/dist/esm/types/block.d.ts +17 -17
- package/dist/esm/types/block.d.ts.map +1 -1
- package/dist/esm/types/blockStats.d.ts.map +1 -1
- package/dist/esm/types/chain.d.ts +20 -9
- package/dist/esm/types/chain.d.ts.map +1 -1
- package/dist/esm/types/chain.js.map +1 -1
- package/dist/esm/types/client.d.ts +40 -25
- package/dist/esm/types/client.d.ts.map +1 -1
- package/dist/esm/types/hash.d.ts.map +1 -1
- package/dist/esm/types/request.d.ts +12 -8
- package/dist/esm/types/request.d.ts.map +1 -1
- package/dist/esm/types/rpc.d.ts.map +1 -1
- package/dist/esm/types/transaction.d.ts.map +1 -1
- package/dist/esm/types/transport.d.ts +16 -11
- package/dist/esm/types/transport.d.ts.map +1 -1
- package/dist/esm/types/utils.d.ts +31 -31
- package/dist/esm/types/utils.d.ts.map +1 -1
- package/dist/esm/types/xpub.d.ts +0 -1
- package/dist/esm/types/xpub.d.ts.map +1 -1
- package/dist/esm/utils/buildRequest.d.ts +0 -1
- package/dist/esm/utils/buildRequest.d.ts.map +1 -1
- package/dist/esm/utils/buildRequest.js +4 -4
- package/dist/esm/utils/buildRequest.js.map +1 -1
- package/dist/esm/utils/cancelTransaction.d.ts +0 -1
- package/dist/esm/utils/cancelTransaction.d.ts.map +1 -1
- package/dist/esm/utils/cancelTransaction.js.map +1 -1
- package/dist/esm/utils/converter.d.ts.map +1 -1
- package/dist/esm/utils/converter.js.map +1 -1
- package/dist/esm/utils/createBatchScheduler.d.ts +1 -8
- package/dist/esm/utils/createBatchScheduler.d.ts.map +1 -1
- package/dist/esm/utils/createBatchScheduler.js +1 -1
- package/dist/esm/utils/createBatchScheduler.js.map +1 -1
- package/dist/esm/utils/deepEqual.d.ts.map +1 -1
- package/dist/esm/utils/deepEqual.js.map +1 -1
- package/dist/esm/utils/getAction.d.ts +6 -7
- package/dist/esm/utils/getAction.d.ts.map +1 -1
- package/dist/esm/utils/getAction.js.map +1 -1
- package/dist/esm/utils/getAddressInfo.d.ts +0 -1
- package/dist/esm/utils/getAddressInfo.d.ts.map +1 -1
- package/dist/esm/utils/getAddressInfo.js +25 -25
- package/dist/esm/utils/getAddressInfo.js.map +1 -1
- package/dist/esm/utils/idCache.d.ts.map +1 -1
- package/dist/esm/utils/idCache.js.map +1 -1
- package/dist/esm/utils/isAddress.d.ts +0 -1
- package/dist/esm/utils/isAddress.d.ts.map +1 -1
- package/dist/esm/utils/isAddress.js.map +1 -1
- package/dist/esm/utils/lru.d.ts +4 -4
- package/dist/esm/utils/lru.d.ts.map +1 -1
- package/dist/esm/utils/lru.js.map +1 -1
- package/dist/esm/utils/modifyFee.d.ts +0 -1
- package/dist/esm/utils/modifyFee.d.ts.map +1 -1
- package/dist/esm/utils/modifyFee.js.map +1 -1
- package/dist/esm/utils/observe.d.ts +4 -5
- package/dist/esm/utils/observe.d.ts.map +1 -1
- package/dist/esm/utils/observe.js +2 -2
- package/dist/esm/utils/observe.js.map +1 -1
- package/dist/esm/utils/parseAccount.d.ts +0 -1
- package/dist/esm/utils/parseAccount.d.ts.map +1 -1
- package/dist/esm/utils/parseAccount.js.map +1 -1
- package/dist/esm/utils/poll.d.ts +4 -10
- package/dist/esm/utils/poll.d.ts.map +1 -1
- package/dist/esm/utils/poll.js.map +1 -1
- package/dist/esm/utils/retryUntil.d.ts +17 -15
- package/dist/esm/utils/retryUntil.d.ts.map +1 -1
- package/dist/esm/utils/retryUntil.js.map +1 -1
- package/dist/esm/utils/sleep.d.ts.map +1 -1
- package/dist/esm/utils/sleep.js.map +1 -1
- package/dist/esm/utils/stringify.d.ts +0 -1
- package/dist/esm/utils/stringify.d.ts.map +1 -1
- package/dist/esm/utils/stringify.js.map +1 -1
- package/dist/esm/utils/uid.d.ts.map +1 -1
- package/dist/esm/utils/uid.js.map +1 -1
- package/dist/esm/utils/url.d.ts.map +1 -1
- package/dist/esm/utils/url.js.map +1 -1
- package/dist/esm/utils/wait.d.ts.map +1 -1
- package/dist/esm/utils/wait.js.map +1 -1
- package/dist/esm/utils/withDedupe.d.ts +1 -5
- package/dist/esm/utils/withDedupe.d.ts.map +1 -1
- package/dist/esm/utils/withDedupe.js +1 -1
- package/dist/esm/utils/withDedupe.js.map +1 -1
- package/dist/esm/utils/withResolvers.d.ts.map +1 -1
- package/dist/esm/utils/withResolvers.js.map +1 -1
- package/dist/esm/utils/withRetry.d.ts +2 -10
- package/dist/esm/utils/withRetry.d.ts.map +1 -1
- package/dist/esm/utils/withRetry.js.map +1 -1
- package/dist/esm/utils/withTimeout.d.ts +2 -9
- package/dist/esm/utils/withTimeout.d.ts.map +1 -1
- package/dist/esm/utils/withTimeout.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.d.ts.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/package.json +3 -2
- package/src/version.ts +1 -1
- package/dist/cjs/transports/__mocks__/getTransactionFee.d.ts +0 -7
- package/dist/cjs/transports/__mocks__/getTransactionFee.js +0 -11
- package/dist/cjs/transports/__mocks__/getTransactionFee.js.map +0 -1
- package/dist/esm/transports/__mocks__/getTransactionFee.d.ts +0 -7
- package/dist/esm/transports/__mocks__/getTransactionFee.d.ts.map +0 -1
- package/dist/esm/transports/__mocks__/getTransactionFee.js +0 -8
- package/dist/esm/transports/__mocks__/getTransactionFee.js.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# @bigmi/core
|
|
2
|
+
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#62](https://github.com/lifinance/bigmi/pull/62) [`3569fc2`](https://github.com/lifinance/bigmi/commit/3569fc295a7877daf5b47989edecde85b2c38ea8) Thanks [@chybisov](https://github.com/chybisov)! - chore: migrate the toolchain to TypeScript 7
|
|
8
|
+
|
|
9
|
+
Bump the `typescript` devDependency from `6.x` to `7.x` (the native compiler) across the workspace, and bump `tsdown` `0.22.3` → `0.22.7` so its peer range accepts `typescript@^7`.
|
|
10
|
+
|
|
11
|
+
This is a build-time-only change with **no integration impact**: `typescript` is a devDependency (never a peer/runtime dependency), so consumers' own TypeScript version is untouched, and `.d.ts`/`.js` emit is handled by tsdown (Rolldown + OXC isolated declarations), not `tsc`. `tsc --noEmit` type-checks cleanly on TS 7 with zero source changes, and the public type surface is semantically identical (a rebuild only reformats declaration whitespace/comments via the newer `rolldown-plugin-dts` printer). Safe to ship as a minor.
|
|
12
|
+
|
|
13
|
+
## 0.8.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#55](https://github.com/lifinance/bigmi/pull/55) [`767fb0c`](https://github.com/lifinance/bigmi/commit/767fb0cba233decea140daf1b562c104f027a261) Thanks [@chybisov](https://github.com/chybisov)! - Update the `zustand` runtime dependency to `^5.0.14`.
|
package/README.md
CHANGED
|
@@ -110,12 +110,12 @@ Simple bigmi setup with a react app:
|
|
|
110
110
|
|
|
111
111
|
import { bitcoin, http, createClient } from '@bigmi/core'
|
|
112
112
|
import { BigmiProvider, createConfig } from '@bigmi/react'
|
|
113
|
-
import { binance, xverse
|
|
113
|
+
import { binance, xverse } from '@bigmi/client'
|
|
114
114
|
|
|
115
115
|
// Create bigmi config object
|
|
116
116
|
const config = createConfig({
|
|
117
117
|
chains: [bitcoin],
|
|
118
|
-
connectors: [binance(), xverse()
|
|
118
|
+
connectors: [binance(), xverse()],
|
|
119
119
|
client: ({ chain }) => createClient({ chain, transport: http() }),
|
|
120
120
|
ssr: true // If using Next.js or SSR
|
|
121
121
|
})
|
|
@@ -3,10 +3,10 @@ import { UTXOSchema } from "../transports/types.js";
|
|
|
3
3
|
import { Account } from "../types/account.js";
|
|
4
4
|
import { Transport } from "../types/transport.js";
|
|
5
5
|
import { Client } from "../types/client.js";
|
|
6
|
-
|
|
7
6
|
//#region src/actions/getBalance.d.ts
|
|
8
7
|
type GetBalanceParameters = {
|
|
9
|
-
/** The address of the account. */
|
|
8
|
+
/** The address of the account. */
|
|
9
|
+
address: string;
|
|
10
10
|
};
|
|
11
11
|
type GetBalanceReturnType = bigint;
|
|
12
12
|
declare function getBalance<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>, params: GetBalanceParameters): Promise<GetBalanceReturnType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBalance.js","names":[],"sources":["../../../src/actions/getBalance.ts"],"sourcesContent":["import type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type GetBalanceParameters = {\n /** The address of the account. */\n address: string\n}\n\nexport type GetBalanceReturnType = bigint\n\nexport async function getBalance<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n params: GetBalanceParameters\n): Promise<GetBalanceReturnType> {\n const data = await client.request(\n {\n method: 'getBalance',\n params,\n },\n { dedupe: true }\n )\n\n return data\n}\n"],"mappings":";;AAaA,eAAsB,WAIpB,QACA,QAC+B;
|
|
1
|
+
{"version":3,"file":"getBalance.js","names":[],"sources":["../../../src/actions/getBalance.ts"],"sourcesContent":["import type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type GetBalanceParameters = {\n /** The address of the account. */\n address: string\n}\n\nexport type GetBalanceReturnType = bigint\n\nexport async function getBalance<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n params: GetBalanceParameters\n): Promise<GetBalanceReturnType> {\n const data = await client.request(\n {\n method: 'getBalance',\n params,\n },\n { dedupe: true }\n )\n\n return data\n}\n"],"mappings":";;AAaA,eAAsB,WAIpB,QACA,QAC+B;CAS/B,OAAO,MARY,OAAO,QACxB;EACE,QAAQ;EACR;CACF,GACA,EAAE,QAAQ,KAAK,CACjB;AAGF"}
|
|
@@ -4,7 +4,6 @@ import { Account } from "../types/account.js";
|
|
|
4
4
|
import { Transport } from "../types/transport.js";
|
|
5
5
|
import { Client } from "../types/client.js";
|
|
6
6
|
import { Block } from "bitcoinjs-lib";
|
|
7
|
-
|
|
8
7
|
//#region src/actions/getBlock.d.ts
|
|
9
8
|
type GetBlockParameters = {
|
|
10
9
|
blockHash: string;
|
|
@@ -14,10 +13,7 @@ type GetBlockParameters = {
|
|
|
14
13
|
blockNumber: number;
|
|
15
14
|
};
|
|
16
15
|
type GetBlockReturnType = Block;
|
|
17
|
-
declare function getBlock<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>, {
|
|
18
|
-
blockHash,
|
|
19
|
-
blockNumber
|
|
20
|
-
}: GetBlockParameters): Promise<GetBlockReturnType>;
|
|
16
|
+
declare function getBlock<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>, { blockHash, blockNumber }: GetBlockParameters): Promise<GetBlockReturnType>;
|
|
21
17
|
//#endregion
|
|
22
18
|
export { GetBlockParameters, GetBlockReturnType, getBlock };
|
|
23
19
|
//# sourceMappingURL=getBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBlock.js","names":["BlockNotFoundError","Block"],"sources":["../../../src/actions/getBlock.ts"],"sourcesContent":["import { Block } from 'bitcoinjs-lib'\nimport { BlockNotFoundError } from '../errors/block.js'\nimport type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type GetBlockParameters =\n | {\n blockHash: string\n blockNumber?: never\n }\n | {\n blockHash?: never\n blockNumber: number\n }\n\nexport type GetBlockReturnType = Block\n\nexport async function getBlock<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n { blockHash, blockNumber }: GetBlockParameters\n): Promise<GetBlockReturnType> {\n let blockHex: string | undefined\n try {\n let _blockHash = blockHash\n if (!_blockHash && blockNumber) {\n _blockHash = await client.request(\n {\n method: 'getblockhash',\n params: [blockNumber],\n },\n { dedupe: true }\n )\n }\n if (_blockHash) {\n blockHex = await client.request(\n {\n method: 'getblock',\n params: [_blockHash, 0],\n },\n { dedupe: true }\n )\n }\n } catch (_error) {\n throw new BlockNotFoundError({ blockHash, blockNumber } as never)\n }\n if (!blockHex) {\n throw new BlockNotFoundError({ blockHash, blockNumber } as never)\n }\n return Block.fromHex(blockHex)\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getBlock.js","names":["BlockNotFoundError","Block"],"sources":["../../../src/actions/getBlock.ts"],"sourcesContent":["import { Block } from 'bitcoinjs-lib'\nimport { BlockNotFoundError } from '../errors/block.js'\nimport type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type GetBlockParameters =\n | {\n blockHash: string\n blockNumber?: never\n }\n | {\n blockHash?: never\n blockNumber: number\n }\n\nexport type GetBlockReturnType = Block\n\nexport async function getBlock<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n { blockHash, blockNumber }: GetBlockParameters\n): Promise<GetBlockReturnType> {\n let blockHex: string | undefined\n try {\n let _blockHash = blockHash\n if (!_blockHash && blockNumber) {\n _blockHash = await client.request(\n {\n method: 'getblockhash',\n params: [blockNumber],\n },\n { dedupe: true }\n )\n }\n if (_blockHash) {\n blockHex = await client.request(\n {\n method: 'getblock',\n params: [_blockHash, 0],\n },\n { dedupe: true }\n )\n }\n } catch (_error) {\n throw new BlockNotFoundError({ blockHash, blockNumber } as never)\n }\n if (!blockHex) {\n throw new BlockNotFoundError({ blockHash, blockNumber } as never)\n }\n return Block.fromHex(blockHex)\n}\n"],"mappings":";;;;AAoBA,eAAsB,SAIpB,QACA,EAAE,WAAW,eACgB;CAC7B,IAAI;CACJ,IAAI;EACF,IAAI,aAAa;EACjB,IAAI,CAAC,cAAc,aACjB,aAAa,MAAM,OAAO,QACxB;GACE,QAAQ;GACR,QAAQ,CAAC,WAAW;EACtB,GACA,EAAE,QAAQ,KAAK,CACjB;EAEF,IAAI,YACF,WAAW,MAAM,OAAO,QACtB;GACE,QAAQ;GACR,QAAQ,CAAC,YAAY,CAAC;EACxB,GACA,EAAE,QAAQ,KAAK,CACjB;CAEJ,SAAS,QAAQ;EACf,MAAM,IAAIA,qBAAAA,mBAAmB;GAAE;GAAW;EAAY,CAAU;CAClE;CACA,IAAI,CAAC,UACH,MAAM,IAAIA,qBAAAA,mBAAmB;EAAE;EAAW;CAAY,CAAU;CAElE,OAAOC,cAAAA,MAAM,QAAQ,QAAQ;AAC/B"}
|
|
@@ -3,7 +3,6 @@ import { UTXOSchema } from "../transports/types.js";
|
|
|
3
3
|
import { Account } from "../types/account.js";
|
|
4
4
|
import { Transport } from "../types/transport.js";
|
|
5
5
|
import { Client } from "../types/client.js";
|
|
6
|
-
|
|
7
6
|
//#region src/actions/getBlockCount.d.ts
|
|
8
7
|
type GetBlockCountReturnType = number;
|
|
9
8
|
declare function getBlockCount<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>): Promise<GetBlockCountReturnType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBlockCount.js","names":[],"sources":["../../../src/actions/getBlockCount.ts"],"sourcesContent":["import type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type GetBlockCountReturnType = number\n\nexport async function getBlockCount<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>\n): Promise<GetBlockCountReturnType> {\n const data = await client.request(\n {\n method: 'getblockcount',\n params: [],\n },\n { dedupe: true }\n )\n return data\n}\n"],"mappings":";;AAQA,eAAsB,cAIpB,QACkC;
|
|
1
|
+
{"version":3,"file":"getBlockCount.js","names":[],"sources":["../../../src/actions/getBlockCount.ts"],"sourcesContent":["import type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type GetBlockCountReturnType = number\n\nexport async function getBlockCount<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>\n): Promise<GetBlockCountReturnType> {\n const data = await client.request(\n {\n method: 'getblockcount',\n params: [],\n },\n { dedupe: true }\n )\n return data\n}\n"],"mappings":";;AAQA,eAAsB,cAIpB,QACkC;CAQlC,OAAO,MAPY,OAAO,QACxB;EACE,QAAQ;EACR,QAAQ,CAAC;CACX,GACA,EAAE,QAAQ,KAAK,CACjB;AAEF"}
|
|
@@ -4,7 +4,6 @@ import { UTXOSchema } from "../transports/types.js";
|
|
|
4
4
|
import { Account } from "../types/account.js";
|
|
5
5
|
import { Transport } from "../types/transport.js";
|
|
6
6
|
import { Client } from "../types/client.js";
|
|
7
|
-
|
|
8
7
|
//#region src/actions/getBlockStats.d.ts
|
|
9
8
|
type GetBlockStatsParameters = ({
|
|
10
9
|
blockHash: string;
|
|
@@ -16,11 +15,7 @@ type GetBlockStatsParameters = ({
|
|
|
16
15
|
stats?: Array<BlockStatsKeys>;
|
|
17
16
|
};
|
|
18
17
|
type GetBlockStatsReturnType = BlockStats;
|
|
19
|
-
declare function getBlockStats<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>, {
|
|
20
|
-
blockHash,
|
|
21
|
-
blockNumber,
|
|
22
|
-
stats
|
|
23
|
-
}: GetBlockStatsParameters): Promise<GetBlockStatsReturnType>;
|
|
18
|
+
declare function getBlockStats<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>, { blockHash, blockNumber, stats }: GetBlockStatsParameters): Promise<GetBlockStatsReturnType>;
|
|
24
19
|
//#endregion
|
|
25
20
|
export { GetBlockStatsParameters, GetBlockStatsReturnType, getBlockStats };
|
|
26
21
|
//# sourceMappingURL=getBlockStats.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBlockStats.js","names":["BlockNotFoundError"],"sources":["../../../src/actions/getBlockStats.ts"],"sourcesContent":["import { BlockNotFoundError } from '../errors/block.js'\nimport type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { BlockStats, BlockStatsKeys } from '../types/blockStats.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type GetBlockStatsParameters = (\n | {\n blockHash: string\n blockNumber?: never\n }\n | {\n blockHash?: never\n blockNumber: number\n }\n) & {\n stats?: Array<BlockStatsKeys>\n}\n\nexport type GetBlockStatsReturnType = BlockStats\n\nexport async function getBlockStats<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n { blockHash, blockNumber, stats }: GetBlockStatsParameters\n): Promise<GetBlockStatsReturnType> {\n const blockHashOrNumber = blockHash || blockNumber\n if (!blockHashOrNumber) {\n throw new BlockNotFoundError({ blockHash, blockNumber } as never)\n }\n try {\n const params: [string | number, Array<BlockStatsKeys>?] = [\n blockHashOrNumber,\n ]\n if (stats) {\n params.push(stats)\n }\n const data = await client.request(\n {\n method: 'getblockstats',\n params: params,\n },\n { dedupe: true }\n )\n return data\n } catch (_error) {\n throw new BlockNotFoundError({ blockHash, blockNumber } as never)\n }\n}\n"],"mappings":";;;AAuBA,eAAsB,cAIpB,QACA,EAAE,WAAW,aAAa,SACQ;CAClC,MAAM,oBAAoB,aAAa;
|
|
1
|
+
{"version":3,"file":"getBlockStats.js","names":["BlockNotFoundError"],"sources":["../../../src/actions/getBlockStats.ts"],"sourcesContent":["import { BlockNotFoundError } from '../errors/block.js'\nimport type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { BlockStats, BlockStatsKeys } from '../types/blockStats.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type GetBlockStatsParameters = (\n | {\n blockHash: string\n blockNumber?: never\n }\n | {\n blockHash?: never\n blockNumber: number\n }\n) & {\n stats?: Array<BlockStatsKeys>\n}\n\nexport type GetBlockStatsReturnType = BlockStats\n\nexport async function getBlockStats<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n { blockHash, blockNumber, stats }: GetBlockStatsParameters\n): Promise<GetBlockStatsReturnType> {\n const blockHashOrNumber = blockHash || blockNumber\n if (!blockHashOrNumber) {\n throw new BlockNotFoundError({ blockHash, blockNumber } as never)\n }\n try {\n const params: [string | number, Array<BlockStatsKeys>?] = [\n blockHashOrNumber,\n ]\n if (stats) {\n params.push(stats)\n }\n const data = await client.request(\n {\n method: 'getblockstats',\n params: params,\n },\n { dedupe: true }\n )\n return data\n } catch (_error) {\n throw new BlockNotFoundError({ blockHash, blockNumber } as never)\n }\n}\n"],"mappings":";;;AAuBA,eAAsB,cAIpB,QACA,EAAE,WAAW,aAAa,SACQ;CAClC,MAAM,oBAAoB,aAAa;CACvC,IAAI,CAAC,mBACH,MAAM,IAAIA,qBAAAA,mBAAmB;EAAE;EAAW;CAAY,CAAU;CAElE,IAAI;EACF,MAAM,SAAoD,CACxD,iBACF;EACA,IAAI,OACF,OAAO,KAAK,KAAK;EASnB,OAAO,MAPY,OAAO,QACxB;GACE,QAAQ;GACA;EACV,GACA,EAAE,QAAQ,KAAK,CACjB;CAEF,SAAS,QAAQ;EACf,MAAM,IAAIA,qBAAAA,mBAAmB;GAAE;GAAW;EAAY,CAAU;CAClE;AACF"}
|
|
@@ -3,15 +3,12 @@ import { UTXOSchema } from "../transports/types.js";
|
|
|
3
3
|
import { Account } from "../types/account.js";
|
|
4
4
|
import { Transport } from "../types/transport.js";
|
|
5
5
|
import { Client } from "../types/client.js";
|
|
6
|
-
|
|
7
6
|
//#region src/actions/getTransactionFee.d.ts
|
|
8
7
|
type GetTransactionFeeParameters = {
|
|
9
8
|
txId: string;
|
|
10
9
|
};
|
|
11
10
|
type GetTransactionFeeReturnType = bigint;
|
|
12
|
-
declare function getTransactionFee<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>, {
|
|
13
|
-
txId
|
|
14
|
-
}: GetTransactionFeeParameters): Promise<GetTransactionFeeReturnType>;
|
|
11
|
+
declare function getTransactionFee<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>, { txId }: GetTransactionFeeParameters): Promise<GetTransactionFeeReturnType>;
|
|
15
12
|
//#endregion
|
|
16
13
|
export { GetTransactionFeeParameters, GetTransactionFeeReturnType, getTransactionFee };
|
|
17
14
|
//# sourceMappingURL=getTransactionFee.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTransactionFee.js","names":[],"sources":["../../../src/actions/getTransactionFee.ts"],"sourcesContent":["import type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type GetTransactionFeeParameters = {\n txId: string\n}\n\nexport type GetTransactionFeeReturnType = bigint\n\nexport async function getTransactionFee<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n { txId }: GetTransactionFeeParameters\n): Promise<GetTransactionFeeReturnType> {\n const data = await client.request({\n method: 'getTransactionFee',\n params: { txId },\n })\n\n return data\n}\n"],"mappings":";;AAYA,eAAsB,kBAIpB,QACA,EAAE,QACoC;
|
|
1
|
+
{"version":3,"file":"getTransactionFee.js","names":[],"sources":["../../../src/actions/getTransactionFee.ts"],"sourcesContent":["import type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type GetTransactionFeeParameters = {\n txId: string\n}\n\nexport type GetTransactionFeeReturnType = bigint\n\nexport async function getTransactionFee<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n { txId }: GetTransactionFeeParameters\n): Promise<GetTransactionFeeReturnType> {\n const data = await client.request({\n method: 'getTransactionFee',\n params: { txId },\n })\n\n return data\n}\n"],"mappings":";;AAYA,eAAsB,kBAIpB,QACA,EAAE,QACoC;CAMtC,OAAO,MALY,OAAO,QAAQ;EAChC,QAAQ;EACR,QAAQ,EAAE,KAAK;CACjB,CAAC;AAGH"}
|
|
@@ -4,7 +4,6 @@ import { UTXOSchema } from "../transports/types.js";
|
|
|
4
4
|
import { Account } from "../types/account.js";
|
|
5
5
|
import { Transport } from "../types/transport.js";
|
|
6
6
|
import { Client } from "../types/client.js";
|
|
7
|
-
|
|
8
7
|
//#region src/actions/getTransactions.d.ts
|
|
9
8
|
type GetTransactionsParameters = {
|
|
10
9
|
address: string;
|
|
@@ -18,12 +17,7 @@ type GetTransactionsReturnType = {
|
|
|
18
17
|
total: number;
|
|
19
18
|
hasMore?: boolean;
|
|
20
19
|
};
|
|
21
|
-
declare function getTransactions<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>, {
|
|
22
|
-
address,
|
|
23
|
-
offset,
|
|
24
|
-
limit,
|
|
25
|
-
lastBlock
|
|
26
|
-
}: GetTransactionsParameters): Promise<GetTransactionsReturnType>;
|
|
20
|
+
declare function getTransactions<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>, { address, offset, limit, lastBlock }: GetTransactionsParameters): Promise<GetTransactionsReturnType>;
|
|
27
21
|
//#endregion
|
|
28
22
|
export { GetTransactionsParameters, GetTransactionsReturnType, getTransactions };
|
|
29
23
|
//# sourceMappingURL=getTransactions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTransactions.js","names":[],"sources":["../../../src/actions/getTransactions.ts"],"sourcesContent":["import type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { UTXOTransaction } from '../types/transaction.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type GetTransactionsParameters = {\n address: string\n offset?: number\n limit?: number\n lastBlock?: string\n afterTxId?: string\n}\n\nexport type GetTransactionsReturnType = {\n transactions: Array<Partial<UTXOTransaction>>\n total: number\n hasMore?: boolean\n}\n\nexport async function getTransactions<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n { address, offset, limit, lastBlock }: GetTransactionsParameters\n): Promise<GetTransactionsReturnType> {\n const data = await client.request({\n method: 'getTransactions',\n params: {\n address,\n offset,\n limit,\n lastBlock,\n },\n })\n\n return data\n}\n"],"mappings":";;AAqBA,eAAsB,gBAIpB,QACA,EAAE,SAAS,QAAQ,OAAO,aACU;
|
|
1
|
+
{"version":3,"file":"getTransactions.js","names":[],"sources":["../../../src/actions/getTransactions.ts"],"sourcesContent":["import type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { UTXOTransaction } from '../types/transaction.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type GetTransactionsParameters = {\n address: string\n offset?: number\n limit?: number\n lastBlock?: string\n afterTxId?: string\n}\n\nexport type GetTransactionsReturnType = {\n transactions: Array<Partial<UTXOTransaction>>\n total: number\n hasMore?: boolean\n}\n\nexport async function getTransactions<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n { address, offset, limit, lastBlock }: GetTransactionsParameters\n): Promise<GetTransactionsReturnType> {\n const data = await client.request({\n method: 'getTransactions',\n params: {\n address,\n offset,\n limit,\n lastBlock,\n },\n })\n\n return data\n}\n"],"mappings":";;AAqBA,eAAsB,gBAIpB,QACA,EAAE,SAAS,QAAQ,OAAO,aACU;CAWpC,OAAO,MAVY,OAAO,QAAQ;EAChC,QAAQ;EACR,QAAQ;GACN;GACA;GACA;GACA;EACF;CACF,CAAC;AAGH"}
|
|
@@ -4,17 +4,15 @@ import { UTXOSchema } from "../transports/types.js";
|
|
|
4
4
|
import { Account } from "../types/account.js";
|
|
5
5
|
import { Transport } from "../types/transport.js";
|
|
6
6
|
import { Client } from "../types/client.js";
|
|
7
|
-
|
|
8
7
|
//#region src/actions/getUTXOTransaction.d.ts
|
|
9
8
|
type GetUTXOTransactionParameters = {
|
|
10
|
-
/** The Id of the transaction */
|
|
9
|
+
/** The Id of the transaction */
|
|
10
|
+
txId: string;
|
|
11
|
+
/** The block in which to look for the transaction */
|
|
11
12
|
blockHash?: string;
|
|
12
13
|
};
|
|
13
14
|
type GetUTXOTransactionReturnType = UTXOTransaction;
|
|
14
|
-
declare function getUTXOTransaction<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>, {
|
|
15
|
-
txId,
|
|
16
|
-
blockHash
|
|
17
|
-
}: GetUTXOTransactionParameters): Promise<GetUTXOTransactionReturnType>;
|
|
15
|
+
declare function getUTXOTransaction<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>, { txId, blockHash }: GetUTXOTransactionParameters): Promise<GetUTXOTransactionReturnType>;
|
|
18
16
|
//#endregion
|
|
19
17
|
export { GetUTXOTransactionParameters, GetUTXOTransactionReturnType, getUTXOTransaction };
|
|
20
18
|
//# sourceMappingURL=getUTXOTransaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUTXOTransaction.js","names":["TransactionNotFoundError"],"sources":["../../../src/actions/getUTXOTransaction.ts"],"sourcesContent":["import { TransactionNotFoundError } from '../errors/transaction.js'\nimport type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { UTXOTransaction } from '../types/transaction.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type GetUTXOTransactionParameters = {\n /** The Id of the transaction */\n txId: string\n /** The block in which to look for the transaction */\n blockHash?: string\n}\n\nexport type GetUTXOTransactionReturnType = UTXOTransaction\n\nexport async function getUTXOTransaction<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n { txId, blockHash }: GetUTXOTransactionParameters\n): Promise<GetUTXOTransactionReturnType> {\n try {\n const params: [string, boolean, string?] = [txId, true]\n if (blockHash) {\n params.push(blockHash)\n }\n const data = await client.request({\n method: 'getrawtransaction',\n params: params,\n })\n return data\n } catch (_error) {\n throw new TransactionNotFoundError({\n blockHash: blockHash as never,\n hash: txId as never,\n })\n }\n}\n"],"mappings":";;;AAiBA,eAAsB,mBAIpB,QACA,EAAE,MAAM,aAC+B;
|
|
1
|
+
{"version":3,"file":"getUTXOTransaction.js","names":["TransactionNotFoundError"],"sources":["../../../src/actions/getUTXOTransaction.ts"],"sourcesContent":["import { TransactionNotFoundError } from '../errors/transaction.js'\nimport type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { UTXOTransaction } from '../types/transaction.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type GetUTXOTransactionParameters = {\n /** The Id of the transaction */\n txId: string\n /** The block in which to look for the transaction */\n blockHash?: string\n}\n\nexport type GetUTXOTransactionReturnType = UTXOTransaction\n\nexport async function getUTXOTransaction<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n { txId, blockHash }: GetUTXOTransactionParameters\n): Promise<GetUTXOTransactionReturnType> {\n try {\n const params: [string, boolean, string?] = [txId, true]\n if (blockHash) {\n params.push(blockHash)\n }\n const data = await client.request({\n method: 'getrawtransaction',\n params: params,\n })\n return data\n } catch (_error) {\n throw new TransactionNotFoundError({\n blockHash: blockHash as never,\n hash: txId as never,\n })\n }\n}\n"],"mappings":";;;AAiBA,eAAsB,mBAIpB,QACA,EAAE,MAAM,aAC+B;CACvC,IAAI;EACF,MAAM,SAAqC,CAAC,MAAM,IAAI;EACtD,IAAI,WACF,OAAO,KAAK,SAAS;EAMvB,OAAO,MAJY,OAAO,QAAQ;GAChC,QAAQ;GACA;EACV,CAAC;CAEH,SAAS,QAAQ;EACf,MAAM,IAAIA,2BAAAA,yBAAyB;GACtB;GACX,MAAM;EACR,CAAC;CACH;AACF"}
|
|
@@ -4,17 +4,13 @@ import { UTXOSchema } from "../transports/types.js";
|
|
|
4
4
|
import { Account } from "../types/account.js";
|
|
5
5
|
import { Transport } from "../types/transport.js";
|
|
6
6
|
import { Client } from "../types/client.js";
|
|
7
|
-
|
|
8
7
|
//#region src/actions/getUTXOs.d.ts
|
|
9
8
|
type GetUTXOsParameters = {
|
|
10
9
|
address: string;
|
|
11
10
|
minValue?: number;
|
|
12
11
|
};
|
|
13
12
|
type GetUTXOsReturnType = Array<UTXO>;
|
|
14
|
-
declare function getUTXOs<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>, {
|
|
15
|
-
address,
|
|
16
|
-
minValue
|
|
17
|
-
}: GetUTXOsParameters): Promise<GetUTXOsReturnType>;
|
|
13
|
+
declare function getUTXOs<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>, { address, minValue }: GetUTXOsParameters): Promise<GetUTXOsReturnType>;
|
|
18
14
|
//#endregion
|
|
19
15
|
export { GetUTXOsParameters, GetUTXOsReturnType, getUTXOs };
|
|
20
16
|
//# sourceMappingURL=getUTXOs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUTXOs.js","names":[],"sources":["../../../src/actions/getUTXOs.ts"],"sourcesContent":["import type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { UTXO } from '../types/transaction.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type GetUTXOsParameters = {\n address: string\n minValue?: number // get utxos add up to this value\n}\n\nexport type GetUTXOsReturnType = Array<UTXO>\n\nexport async function getUTXOs<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n { address, minValue }: GetUTXOsParameters\n): Promise<GetUTXOsReturnType> {\n const data = await client.request({\n method: 'getUTXOs',\n params: {\n address,\n minValue,\n },\n })\n return data\n}\n"],"mappings":";;AAcA,eAAsB,SAIpB,QACA,EAAE,SAAS,YACkB;
|
|
1
|
+
{"version":3,"file":"getUTXOs.js","names":[],"sources":["../../../src/actions/getUTXOs.ts"],"sourcesContent":["import type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { UTXO } from '../types/transaction.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type GetUTXOsParameters = {\n address: string\n minValue?: number // get utxos add up to this value\n}\n\nexport type GetUTXOsReturnType = Array<UTXO>\n\nexport async function getUTXOs<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n { address, minValue }: GetUTXOsParameters\n): Promise<GetUTXOsReturnType> {\n const data = await client.request({\n method: 'getUTXOs',\n params: {\n address,\n minValue,\n },\n })\n return data\n}\n"],"mappings":";;AAcA,eAAsB,SAIpB,QACA,EAAE,SAAS,YACkB;CAQ7B,OAAO,MAPY,OAAO,QAAQ;EAChC,QAAQ;EACR,QAAQ;GACN;GACA;EACF;CACF,CAAC;AAEH"}
|
|
@@ -4,33 +4,33 @@ import { UTXOSchema } from "../transports/types.js";
|
|
|
4
4
|
import { Account } from "../types/account.js";
|
|
5
5
|
import { Transport } from "../types/transport.js";
|
|
6
6
|
import { Client } from "../types/client.js";
|
|
7
|
-
|
|
8
7
|
//#region src/actions/getXPubAddresses.d.ts
|
|
9
8
|
type GetXPubAddressesParameters = {
|
|
10
|
-
/** The public key you're trying to get addresses of. */
|
|
9
|
+
/** The public key you're trying to get addresses of. */
|
|
10
|
+
xPubKey: string;
|
|
11
11
|
};
|
|
12
12
|
type GetXPubAddressesReturnType = xPubAccount;
|
|
13
13
|
/**
|
|
14
|
-
* Retrieves all addresses and their balances associated with an extended public key (xPub).
|
|
15
|
-
*
|
|
16
|
-
* An extended public key (xPub) is a Bitcoin public key that can be used to derive multiple
|
|
17
|
-
* child addresses. This action fetches all derived addresses along with their individual balances
|
|
18
|
-
* and the total balance across all addresses.
|
|
19
|
-
*
|
|
20
|
-
* @param client - Client instance configured with UTXO transport
|
|
21
|
-
* @param params - {@link GetXPubAddressesParameters}
|
|
22
|
-
* @returns The xPub account data including total balance and all derived addresses. {@link GetXPubAddressesReturnType}
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```typescript
|
|
26
|
-
* const result = await getXPubAddresses(client, {
|
|
27
|
-
* xPubKey: 'xpub6CcGTthbwnbxsMRuEF3sb...'
|
|
28
|
-
* })
|
|
29
|
-
*
|
|
30
|
-
* console.log(result.balance) // Total balance across all addresses
|
|
31
|
-
* console.log(result.addresses) // Array of derived addresses with individual balances
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
14
|
+
* Retrieves all addresses and their balances associated with an extended public key (xPub).
|
|
15
|
+
*
|
|
16
|
+
* An extended public key (xPub) is a Bitcoin public key that can be used to derive multiple
|
|
17
|
+
* child addresses. This action fetches all derived addresses along with their individual balances
|
|
18
|
+
* and the total balance across all addresses.
|
|
19
|
+
*
|
|
20
|
+
* @param client - Client instance configured with UTXO transport
|
|
21
|
+
* @param params - {@link GetXPubAddressesParameters}
|
|
22
|
+
* @returns The xPub account data including total balance and all derived addresses. {@link GetXPubAddressesReturnType}
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* const result = await getXPubAddresses(client, {
|
|
27
|
+
* xPubKey: 'xpub6CcGTthbwnbxsMRuEF3sb...'
|
|
28
|
+
* })
|
|
29
|
+
*
|
|
30
|
+
* console.log(result.balance) // Total balance across all addresses
|
|
31
|
+
* console.log(result.addresses) // Array of derived addresses with individual balances
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
34
|
declare function getXPubAddresses<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>, params: GetXPubAddressesParameters): Promise<GetXPubAddressesReturnType>;
|
|
35
35
|
//#endregion
|
|
36
36
|
export { GetXPubAddressesParameters, GetXPubAddressesReturnType, getXPubAddresses };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getXPubAddresses.js","names":[],"sources":["../../../src/actions/getXPubAddresses.ts"],"sourcesContent":["import type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { Transport } from '../types/transport.js'\nimport type { xPubAccount } from '../types/xpub.js'\n\nexport type GetXPubAddressesParameters = {\n /** The public key you're trying to get addresses of. */\n xPubKey: string\n}\n\nexport type GetXPubAddressesReturnType = xPubAccount\n\n/**\n * Retrieves all addresses and their balances associated with an extended public key (xPub).\n *\n * An extended public key (xPub) is a Bitcoin public key that can be used to derive multiple\n * child addresses. This action fetches all derived addresses along with their individual balances\n * and the total balance across all addresses.\n *\n * @param client - Client instance configured with UTXO transport\n * @param params - {@link GetXPubAddressesParameters}\n * @returns The xPub account data including total balance and all derived addresses. {@link GetXPubAddressesReturnType}\n *\n * @example\n * ```typescript\n * const result = await getXPubAddresses(client, {\n * xPubKey: 'xpub6CcGTthbwnbxsMRuEF3sb...'\n * })\n *\n * console.log(result.balance) // Total balance across all addresses\n * console.log(result.addresses) // Array of derived addresses with individual balances\n * ```\n */\nexport async function getXPubAddresses<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n params: GetXPubAddressesParameters\n): Promise<GetXPubAddressesReturnType> {\n const data = await client.request(\n {\n method: 'getXPubAddresses',\n params,\n },\n { dedupe: true }\n )\n\n return data\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmCA,eAAsB,iBAIpB,QACA,QACqC;
|
|
1
|
+
{"version":3,"file":"getXPubAddresses.js","names":[],"sources":["../../../src/actions/getXPubAddresses.ts"],"sourcesContent":["import type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { Transport } from '../types/transport.js'\nimport type { xPubAccount } from '../types/xpub.js'\n\nexport type GetXPubAddressesParameters = {\n /** The public key you're trying to get addresses of. */\n xPubKey: string\n}\n\nexport type GetXPubAddressesReturnType = xPubAccount\n\n/**\n * Retrieves all addresses and their balances associated with an extended public key (xPub).\n *\n * An extended public key (xPub) is a Bitcoin public key that can be used to derive multiple\n * child addresses. This action fetches all derived addresses along with their individual balances\n * and the total balance across all addresses.\n *\n * @param client - Client instance configured with UTXO transport\n * @param params - {@link GetXPubAddressesParameters}\n * @returns The xPub account data including total balance and all derived addresses. {@link GetXPubAddressesReturnType}\n *\n * @example\n * ```typescript\n * const result = await getXPubAddresses(client, {\n * xPubKey: 'xpub6CcGTthbwnbxsMRuEF3sb...'\n * })\n *\n * console.log(result.balance) // Total balance across all addresses\n * console.log(result.addresses) // Array of derived addresses with individual balances\n * ```\n */\nexport async function getXPubAddresses<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n params: GetXPubAddressesParameters\n): Promise<GetXPubAddressesReturnType> {\n const data = await client.request(\n {\n method: 'getXPubAddresses',\n params,\n },\n { dedupe: true }\n )\n\n return data\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmCA,eAAsB,iBAIpB,QACA,QACqC;CASrC,OAAO,MARY,OAAO,QACxB;EACE,QAAQ;EACR;CACF,GACA,EAAE,QAAQ,KAAK,CACjB;AAGF"}
|
|
@@ -3,17 +3,15 @@ import { UTXOSchema } from "../transports/types.js";
|
|
|
3
3
|
import { Account } from "../types/account.js";
|
|
4
4
|
import { Transport } from "../types/transport.js";
|
|
5
5
|
import { Client } from "../types/client.js";
|
|
6
|
-
|
|
7
6
|
//#region src/actions/sendUTXOTransaction.d.ts
|
|
8
7
|
type SendUTXOTransactionParameters = {
|
|
9
|
-
/** The hex string of the raw transaction. */
|
|
8
|
+
/** The hex string of the raw transaction. */
|
|
9
|
+
hex: string;
|
|
10
|
+
/** Rejects transactions whose fee rate is higher than the specified value, expressed in BTC/kB. Set to 0 to accept any fee rate. Default = 0.10 */
|
|
10
11
|
maxFeeRate?: number;
|
|
11
12
|
};
|
|
12
13
|
type SendUTXOTransactionReturnType = string;
|
|
13
|
-
declare function sendUTXOTransaction<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>, {
|
|
14
|
-
hex,
|
|
15
|
-
maxFeeRate
|
|
16
|
-
}: SendUTXOTransactionParameters): Promise<SendUTXOTransactionReturnType>;
|
|
14
|
+
declare function sendUTXOTransaction<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOSchema>, { hex, maxFeeRate }: SendUTXOTransactionParameters): Promise<SendUTXOTransactionReturnType>;
|
|
17
15
|
//#endregion
|
|
18
16
|
export { SendUTXOTransactionParameters, SendUTXOTransactionReturnType, sendUTXOTransaction };
|
|
19
17
|
//# sourceMappingURL=sendUTXOTransaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendUTXOTransaction.js","names":[],"sources":["../../../src/actions/sendUTXOTransaction.ts"],"sourcesContent":["import type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type SendUTXOTransactionParameters = {\n /** The hex string of the raw transaction. */\n hex: string\n /** Rejects transactions whose fee rate is higher than the specified value, expressed in BTC/kB. Set to 0 to accept any fee rate. Default = 0.10 */\n maxFeeRate?: number\n}\n\nexport type SendUTXOTransactionReturnType = string\n\nexport async function sendUTXOTransaction<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n { hex, maxFeeRate }: SendUTXOTransactionParameters\n): Promise<SendUTXOTransactionReturnType> {\n const params: [string, number?] = [hex]\n if (maxFeeRate) {\n params.push(maxFeeRate)\n }\n const data = await client.request({\n method: 'sendrawtransaction',\n params: params,\n })\n return data\n}\n"],"mappings":";;AAeA,eAAsB,oBAIpB,QACA,EAAE,KAAK,cACiC;CACxC,MAAM,SAA4B,CAAC,
|
|
1
|
+
{"version":3,"file":"sendUTXOTransaction.js","names":[],"sources":["../../../src/actions/sendUTXOTransaction.ts"],"sourcesContent":["import type { UTXOSchema } from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { Transport } from '../types/transport.js'\n\nexport type SendUTXOTransactionParameters = {\n /** The hex string of the raw transaction. */\n hex: string\n /** Rejects transactions whose fee rate is higher than the specified value, expressed in BTC/kB. Set to 0 to accept any fee rate. Default = 0.10 */\n maxFeeRate?: number\n}\n\nexport type SendUTXOTransactionReturnType = string\n\nexport async function sendUTXOTransaction<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOSchema>,\n { hex, maxFeeRate }: SendUTXOTransactionParameters\n): Promise<SendUTXOTransactionReturnType> {\n const params: [string, number?] = [hex]\n if (maxFeeRate) {\n params.push(maxFeeRate)\n }\n const data = await client.request({\n method: 'sendrawtransaction',\n params: params,\n })\n return data\n}\n"],"mappings":";;AAeA,eAAsB,oBAIpB,QACA,EAAE,KAAK,cACiC;CACxC,MAAM,SAA4B,CAAC,GAAG;CACtC,IAAI,YACF,OAAO,KAAK,UAAU;CAMxB,OAAO,MAJY,OAAO,QAAQ;EAChC,QAAQ;EACA;CACV,CAAC;AAEH"}
|
|
@@ -3,7 +3,6 @@ import { SignPsbtParameters, SignPsbtReturnType, UTXOWalletSchema } from "../tra
|
|
|
3
3
|
import { Account } from "../types/account.js";
|
|
4
4
|
import { Transport } from "../types/transport.js";
|
|
5
5
|
import { Client } from "../types/client.js";
|
|
6
|
-
|
|
7
6
|
//#region src/actions/signPsbt.d.ts
|
|
8
7
|
declare function signPsbt<C extends Chain | undefined, A extends Account | undefined = Account | undefined>(client: Client<Transport, C, A, UTXOWalletSchema>, params: SignPsbtParameters): Promise<SignPsbtReturnType>;
|
|
9
8
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signPsbt.js","names":[],"sources":["../../../src/actions/signPsbt.ts"],"sourcesContent":["import type {\n SignPsbtParameters,\n SignPsbtReturnType,\n UTXOWalletSchema,\n} from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { Transport } from '../types/transport.js'\n\nexport async function signPsbt<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOWalletSchema>,\n params: SignPsbtParameters\n): Promise<SignPsbtReturnType> {\n const data = await client.request(\n {\n method: 'signPsbt',\n params: params,\n },\n { dedupe: true }\n )\n return data\n}\n"],"mappings":";;AAUA,eAAsB,SAIpB,QACA,QAC6B;
|
|
1
|
+
{"version":3,"file":"signPsbt.js","names":[],"sources":["../../../src/actions/signPsbt.ts"],"sourcesContent":["import type {\n SignPsbtParameters,\n SignPsbtReturnType,\n UTXOWalletSchema,\n} from '../transports/types.js'\nimport type { Account } from '../types/account.js'\nimport type { Chain } from '../types/chain.js'\nimport type { Client } from '../types/client.js'\nimport type { Transport } from '../types/transport.js'\n\nexport async function signPsbt<\n C extends Chain | undefined,\n A extends Account | undefined = Account | undefined,\n>(\n client: Client<Transport, C, A, UTXOWalletSchema>,\n params: SignPsbtParameters\n): Promise<SignPsbtReturnType> {\n const data = await client.request(\n {\n method: 'signPsbt',\n params: params,\n },\n { dedupe: true }\n )\n return data\n}\n"],"mappings":";;AAUA,eAAsB,SAIpB,QACA,QAC6B;CAQ7B,OAAO,MAPY,OAAO,QACxB;EACE,QAAQ;EACA;CACV,GACA,EAAE,QAAQ,KAAK,CACjB;AAEF"}
|
|
@@ -3,7 +3,6 @@ import { Chain } from "../types/chain.js";
|
|
|
3
3
|
import { Transport } from "../types/transport.js";
|
|
4
4
|
import { Client } from "../types/client.js";
|
|
5
5
|
import { Transaction } from "bitcoinjs-lib";
|
|
6
|
-
|
|
7
6
|
//#region src/actions/waitForTransaction.d.ts
|
|
8
7
|
type ReplacementReason = "cancelled" | "replaced" | "repriced";
|
|
9
8
|
type ReplacementReturnType = {
|
|
@@ -20,68 +19,63 @@ type WithRetryParameters = {
|
|
|
20
19
|
retryCount?: number | undefined;
|
|
21
20
|
};
|
|
22
21
|
type WaitForTransactionReceiptParameters = {
|
|
23
|
-
/** The Id of the transaction. */
|
|
24
|
-
|
|
22
|
+
/** The Id of the transaction. */
|
|
23
|
+
txId: string;
|
|
24
|
+
/** The hex string of the raw transaction. */
|
|
25
|
+
txHex: string;
|
|
26
|
+
/** The sender address of the transaction. */
|
|
25
27
|
senderAddress?: string;
|
|
26
28
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
confirmations?: number | undefined;
|
|
29
|
+
* The number of confirmations (blocks that have passed) to wait before resolving.
|
|
30
|
+
* @default 1
|
|
31
|
+
*/
|
|
32
|
+
confirmations?: number | undefined;
|
|
33
|
+
/** Optional callback to emit if the transaction has been replaced. */
|
|
31
34
|
onReplaced?: ((response: ReplacementReturnType) => void) | undefined;
|
|
32
35
|
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
* Polling frequency (in ms). Defaults to the client's pollingInterval config.
|
|
37
|
+
* @default client.pollingInterval
|
|
38
|
+
*/
|
|
36
39
|
pollingInterval?: number | undefined;
|
|
37
40
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
* Number of times to retry if the transaction or block is not found.
|
|
42
|
+
* @default 6 (exponential backoff)
|
|
43
|
+
*/
|
|
41
44
|
retryCount?: number;
|
|
42
45
|
/**
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
* Time to wait (in ms) between retries.
|
|
47
|
+
*/
|
|
45
48
|
retryDelay?: ((config: {
|
|
46
49
|
count: number;
|
|
47
50
|
error: Error;
|
|
48
|
-
}) => number) | number;
|
|
51
|
+
}) => number) | number;
|
|
52
|
+
/** Optional timeout (in milliseconds) to wait before stopping polling. */
|
|
49
53
|
timeout?: number | undefined;
|
|
50
54
|
};
|
|
51
55
|
/**
|
|
52
|
-
* Waits for the transaction to be included on a block (one confirmation), and then returns the transaction.
|
|
53
|
-
* - JSON-RPC Methods:
|
|
54
|
-
* - Polls getrawtransaction on each block until it has been processed.
|
|
55
|
-
* - If a transaction has been replaced:
|
|
56
|
-
* - Calls getblock and extracts the transactions
|
|
57
|
-
* - Checks if one of the transactions is a replacement
|
|
58
|
-
* - If so, calls getrawtransaction.
|
|
59
|
-
*
|
|
60
|
-
* The `waitForTransaction` action additionally supports replacement detection (e.g. RBF - transactions replaced-by-fee ).
|
|
61
|
-
*
|
|
62
|
-
* Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel).
|
|
63
|
-
* https://bitcoinops.org/en/topics/replace-by-fee/
|
|
64
|
-
*
|
|
65
|
-
* There are 3 types of Transaction Replacement reasons:
|
|
66
|
-
*
|
|
67
|
-
* - `repriced`: The fee has been modified (e.g. same outputs, different amounts)
|
|
68
|
-
* - `cancelled`: The Transaction has been cancelled (e.g. output is sender address)
|
|
69
|
-
* - `replaced`: The Transaction has been replaced (e.g. different outputs)
|
|
70
|
-
* @param client - Client to use
|
|
71
|
-
* @param parameters - {@link WaitForTransactionReceiptParameters}
|
|
72
|
-
* @returns The UTXO transaction. {@link WaitForTransactionReceiptReturnType}
|
|
73
|
-
*/
|
|
74
|
-
declare function waitForTransaction<chain extends Chain | undefined>(client: Client<Transport, chain>, {
|
|
75
|
-
confirmations,
|
|
76
|
-
txId,
|
|
77
|
-
txHex,
|
|
78
|
-
senderAddress,
|
|
79
|
-
onReplaced,
|
|
80
|
-
pollingInterval,
|
|
81
|
-
retryCount,
|
|
82
|
-
retryDelay,
|
|
83
|
-
timeout
|
|
84
|
-
}: WaitForTransactionReceiptParameters): Promise<WaitForTransactionReceiptReturnType>;
|
|
56
|
+
* Waits for the transaction to be included on a block (one confirmation), and then returns the transaction.
|
|
57
|
+
* - JSON-RPC Methods:
|
|
58
|
+
* - Polls getrawtransaction on each block until it has been processed.
|
|
59
|
+
* - If a transaction has been replaced:
|
|
60
|
+
* - Calls getblock and extracts the transactions
|
|
61
|
+
* - Checks if one of the transactions is a replacement
|
|
62
|
+
* - If so, calls getrawtransaction.
|
|
63
|
+
*
|
|
64
|
+
* The `waitForTransaction` action additionally supports replacement detection (e.g. RBF - transactions replaced-by-fee ).
|
|
65
|
+
*
|
|
66
|
+
* Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel).
|
|
67
|
+
* https://bitcoinops.org/en/topics/replace-by-fee/
|
|
68
|
+
*
|
|
69
|
+
* There are 3 types of Transaction Replacement reasons:
|
|
70
|
+
*
|
|
71
|
+
* - `repriced`: The fee has been modified (e.g. same outputs, different amounts)
|
|
72
|
+
* - `cancelled`: The Transaction has been cancelled (e.g. output is sender address)
|
|
73
|
+
* - `replaced`: The Transaction has been replaced (e.g. different outputs)
|
|
74
|
+
* @param client - Client to use
|
|
75
|
+
* @param parameters - {@link WaitForTransactionReceiptParameters}
|
|
76
|
+
* @returns The UTXO transaction. {@link WaitForTransactionReceiptReturnType}
|
|
77
|
+
*/
|
|
78
|
+
declare function waitForTransaction<chain extends Chain | undefined>(client: Client<Transport, chain>, { confirmations, txId, txHex, senderAddress, onReplaced, pollingInterval, retryCount, retryDelay, timeout }: WaitForTransactionReceiptParameters): Promise<WaitForTransactionReceiptReturnType>;
|
|
85
79
|
//#endregion
|
|
86
80
|
export { ReplacementReason, ReplacementReturnType, WaitForTransactionReceiptParameters, WaitForTransactionReceiptReturnType, WithRetryParameters, waitForTransaction };
|
|
87
81
|
//# sourceMappingURL=waitForTransaction.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
require("../_virtual/_rolldown/runtime.js");
|
|
3
2
|
const require_actions_getBlock = require("./getBlock.js");
|
|
4
3
|
const require_actions_getBlockStats = require("./getBlockStats.js");
|
|
5
4
|
const require_errors_transaction = require("../errors/transaction.js");
|