@bigmi/core 0.8.1 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +2 -2
- package/dist/cjs/_virtual/_rolldown/runtime.js +1 -1
- package/dist/cjs/actions/getBalance.d.ts +5 -6
- package/dist/cjs/actions/getBlock.d.ts +3 -8
- package/dist/cjs/actions/getBlockCount.d.ts +2 -4
- package/dist/cjs/actions/getBlockStats.d.ts +3 -9
- package/dist/cjs/actions/getTransactionFee.d.ts +3 -7
- package/dist/cjs/actions/getTransactions.d.ts +3 -10
- package/dist/cjs/actions/getUTXOTransaction.d.ts +6 -9
- package/dist/cjs/actions/getUTXOs.d.ts +3 -8
- package/dist/cjs/actions/getXPubAddresses.d.ts +25 -26
- package/dist/cjs/actions/sendUTXOTransaction.d.ts +6 -9
- package/dist/cjs/actions/signPsbt.d.ts +1 -3
- package/dist/cjs/actions/waitForTransaction.d.ts +48 -55
- package/dist/cjs/actions/waitForTransaction.js.map +1 -1
- package/dist/cjs/actions/watchBlockNumber.d.ts +18 -21
- package/dist/cjs/actions/watchBlockNumber.js +3 -2
- package/dist/cjs/actions/watchBlockNumber.js.map +1 -1
- package/dist/cjs/chains/bitcoin.d.ts +1 -3
- package/dist/cjs/chains/bitcoin.js.map +1 -1
- package/dist/cjs/chains/defineChain.d.ts +1 -3
- package/dist/cjs/chains/signet.d.ts +1 -3
- package/dist/cjs/chains/signet.js.map +1 -1
- package/dist/cjs/clients/decorators/public.d.ts +2 -4
- package/dist/cjs/clients/decorators/wallet.d.ts +4 -6
- package/dist/cjs/errors/address.d.ts +3 -7
- package/dist/cjs/errors/base.d.ts +3 -4
- package/dist/cjs/errors/base.js.map +1 -1
- package/dist/cjs/errors/block.d.ts +3 -8
- package/dist/cjs/errors/provider.d.ts +1 -3
- package/dist/cjs/errors/request.d.ts +15 -39
- package/dist/cjs/errors/request.js.map +1 -1
- package/dist/cjs/errors/rpc.d.ts +28 -30
- package/dist/cjs/errors/transaction.d.ts +9 -21
- package/dist/cjs/errors/transport.d.ts +8 -17
- package/dist/cjs/errors/transport.js.map +1 -1
- package/dist/cjs/errors/utils.d.ts +3 -5
- package/dist/cjs/errors/utxo.d.ts +3 -9
- package/dist/cjs/factories/createClient.d.ts +55 -37
- package/dist/cjs/factories/createClient.js.map +1 -1
- package/dist/cjs/factories/createTransport.d.ts +3 -14
- package/dist/cjs/test/utils.d.ts +1 -2
- package/dist/cjs/transports/ankr/ankr.d.ts +1 -3
- package/dist/cjs/transports/ankr/ankr.types.d.ts +7 -8
- package/dist/cjs/transports/ankr/getBalance.d.ts +1 -3
- package/dist/cjs/transports/ankr/getTransactionFee.d.ts +1 -3
- package/dist/cjs/transports/ankr/getTransactions.d.ts +1 -3
- package/dist/cjs/transports/ankr/methods.d.ts +1 -3
- package/dist/cjs/transports/ankr/utils.d.ts +1 -3
- package/dist/cjs/transports/blockchair/blockchair.d.ts +1 -3
- package/dist/cjs/transports/blockchair/blockchair.types.d.ts +13 -14
- package/dist/cjs/transports/blockchair/getBalance.d.ts +1 -3
- package/dist/cjs/transports/blockchair/getTransactionFee.d.ts +1 -3
- package/dist/cjs/transports/blockchair/getTransactionFee.js.map +1 -1
- package/dist/cjs/transports/blockchair/getUTXOs.d.ts +1 -3
- package/dist/cjs/transports/blockchair/getUTXOs.js.map +1 -1
- package/dist/cjs/transports/blockchair/getXPubAddresses.d.ts +1 -3
- package/dist/cjs/transports/blockchair/getXPubAddresses.js.map +1 -1
- package/dist/cjs/transports/blockchair/methods.d.ts +1 -3
- package/dist/cjs/transports/blockcypher/blockcypher.d.ts +1 -3
- package/dist/cjs/transports/blockcypher/blockcypher.types.d.ts +8 -9
- package/dist/cjs/transports/blockcypher/getBalance.d.ts +1 -3
- package/dist/cjs/transports/blockcypher/getTransactionFee.d.ts +1 -3
- package/dist/cjs/transports/blockcypher/getUTXOs.d.ts +1 -3
- package/dist/cjs/transports/blockcypher/getUTXOs.js.map +1 -1
- package/dist/cjs/transports/blockcypher/methods.d.ts +1 -3
- package/dist/cjs/transports/blockcypher/utils.d.ts +1 -3
- package/dist/cjs/transports/blockcypher/utils.js.map +1 -1
- package/dist/cjs/transports/custom.d.ts +15 -12
- package/dist/cjs/transports/fallback.d.ts +38 -43
- package/dist/cjs/transports/fallback.js.map +1 -1
- package/dist/cjs/transports/getHttpRpcClient.d.ts +23 -16
- package/dist/cjs/transports/getHttpRpcClient.js.map +1 -1
- package/dist/cjs/transports/getRpcProviderMethods.d.ts +1 -3
- package/dist/cjs/transports/http.d.ts +35 -25
- package/dist/cjs/transports/mempool/getBalance.d.ts +1 -3
- package/dist/cjs/transports/mempool/getTransactionFee.d.ts +1 -3
- package/dist/cjs/transports/mempool/getTransactions.d.ts +1 -3
- package/dist/cjs/transports/mempool/getTransactions.js.map +1 -1
- package/dist/cjs/transports/mempool/mempool.d.ts +1 -3
- package/dist/cjs/transports/mempool/mempool.types.d.ts +7 -8
- package/dist/cjs/transports/mempool/methods.d.ts +1 -3
- package/dist/cjs/transports/mempool/utils.d.ts +1 -3
- package/dist/cjs/transports/types.d.ts +28 -27
- package/dist/cjs/transports/utxo.d.ts +1 -3
- package/dist/cjs/transports/utxo.js.map +1 -1
- package/dist/cjs/types/account.d.ts +1 -3
- package/dist/cjs/types/address.d.ts +4 -6
- package/dist/cjs/types/block.d.ts +18 -19
- package/dist/cjs/types/blockStats.d.ts +2 -3
- package/dist/cjs/types/chain.d.ts +26 -16
- package/dist/cjs/types/client.d.ts +43 -29
- package/dist/cjs/types/hash.d.ts +1 -2
- package/dist/cjs/types/request.d.ts +16 -13
- package/dist/cjs/types/rpc.d.ts +4 -5
- package/dist/cjs/types/transaction.d.ts +2 -3
- package/dist/cjs/types/transport.d.ts +18 -14
- package/dist/cjs/types/utils.d.ts +43 -44
- package/dist/cjs/types/xpub.d.ts +1 -3
- package/dist/cjs/utils/buildRequest.d.ts +3 -5
- package/dist/cjs/utils/buildRequest.js +2 -1
- package/dist/cjs/utils/buildRequest.js.map +1 -1
- package/dist/cjs/utils/cancelTransaction.d.ts +1 -3
- package/dist/cjs/utils/converter.d.ts +5 -6
- package/dist/cjs/utils/converter.js.map +1 -1
- package/dist/cjs/utils/createBatchScheduler.d.ts +2 -10
- package/dist/cjs/utils/createBatchScheduler.js.map +1 -1
- package/dist/cjs/utils/deepEqual.d.ts +1 -2
- package/dist/cjs/utils/deepEqual.js.map +1 -1
- package/dist/cjs/utils/getAction.d.ts +7 -9
- package/dist/cjs/utils/getAddressInfo.d.ts +2 -4
- package/dist/cjs/utils/getAddressInfo.js +2 -1
- package/dist/cjs/utils/getAddressInfo.js.map +1 -1
- package/dist/cjs/utils/idCache.d.ts +1 -2
- package/dist/cjs/utils/isAddress.d.ts +1 -3
- package/dist/cjs/utils/lru.d.ts +5 -6
- package/dist/cjs/utils/lru.js.map +1 -1
- package/dist/cjs/utils/modifyFee.d.ts +1 -3
- package/dist/cjs/utils/modifyFee.js.map +1 -1
- package/dist/cjs/utils/observe.d.ts +7 -9
- package/dist/cjs/utils/observe.js.map +1 -1
- package/dist/cjs/utils/parseAccount.d.ts +2 -4
- package/dist/cjs/utils/poll.d.ts +4 -11
- package/dist/cjs/utils/poll.js +2 -1
- package/dist/cjs/utils/poll.js.map +1 -1
- package/dist/cjs/utils/retryUntil.d.ts +18 -17
- package/dist/cjs/utils/retryUntil.js.map +1 -1
- package/dist/cjs/utils/sleep.d.ts +1 -2
- package/dist/cjs/utils/stringify.d.ts +2 -4
- package/dist/cjs/utils/uid.d.ts +1 -2
- package/dist/cjs/utils/uid.js.map +1 -1
- package/dist/cjs/utils/url.d.ts +1 -2
- package/dist/cjs/utils/url.js.map +1 -1
- package/dist/cjs/utils/wait.d.ts +1 -2
- package/dist/cjs/utils/withDedupe.d.ts +2 -7
- package/dist/cjs/utils/withDedupe.js.map +1 -1
- package/dist/cjs/utils/withResolvers.d.ts +2 -3
- package/dist/cjs/utils/withRetry.d.ts +4 -13
- package/dist/cjs/utils/withTimeout.d.ts +3 -11
- package/dist/cjs/utils/withTimeout.js.map +1 -1
- package/dist/cjs/version.d.ts +2 -3
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/cjs/vite-env.d.ts +1 -1
- package/dist/esm/actions/getBalance.d.ts +5 -6
- package/dist/esm/actions/getBalance.d.ts.map +1 -1
- package/dist/esm/actions/getBlock.d.ts +3 -8
- package/dist/esm/actions/getBlock.d.ts.map +1 -1
- package/dist/esm/actions/getBlockCount.d.ts +2 -4
- package/dist/esm/actions/getBlockCount.d.ts.map +1 -1
- package/dist/esm/actions/getBlockStats.d.ts +3 -9
- package/dist/esm/actions/getBlockStats.d.ts.map +1 -1
- package/dist/esm/actions/getTransactionFee.d.ts +3 -7
- package/dist/esm/actions/getTransactionFee.d.ts.map +1 -1
- package/dist/esm/actions/getTransactions.d.ts +3 -10
- package/dist/esm/actions/getTransactions.d.ts.map +1 -1
- package/dist/esm/actions/getUTXOTransaction.d.ts +6 -9
- package/dist/esm/actions/getUTXOTransaction.d.ts.map +1 -1
- package/dist/esm/actions/getUTXOs.d.ts +3 -8
- package/dist/esm/actions/getUTXOs.d.ts.map +1 -1
- package/dist/esm/actions/getXPubAddresses.d.ts +25 -26
- package/dist/esm/actions/getXPubAddresses.d.ts.map +1 -1
- package/dist/esm/actions/sendUTXOTransaction.d.ts +6 -9
- package/dist/esm/actions/sendUTXOTransaction.d.ts.map +1 -1
- package/dist/esm/actions/signPsbt.d.ts +1 -3
- package/dist/esm/actions/signPsbt.d.ts.map +1 -1
- package/dist/esm/actions/waitForTransaction.d.ts +48 -55
- 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 +18 -21
- package/dist/esm/actions/watchBlockNumber.d.ts.map +1 -1
- package/dist/esm/actions/watchBlockNumber.js +3 -2
- package/dist/esm/actions/watchBlockNumber.js.map +1 -1
- package/dist/esm/chains/bitcoin.d.ts +1 -3
- package/dist/esm/chains/bitcoin.d.ts.map +1 -1
- package/dist/esm/chains/defineChain.d.ts +1 -3
- package/dist/esm/chains/defineChain.d.ts.map +1 -1
- package/dist/esm/chains/signet.d.ts +1 -3
- package/dist/esm/chains/signet.d.ts.map +1 -1
- package/dist/esm/clients/decorators/public.d.ts +2 -4
- package/dist/esm/clients/decorators/public.d.ts.map +1 -1
- package/dist/esm/clients/decorators/wallet.d.ts +4 -6
- package/dist/esm/clients/decorators/wallet.d.ts.map +1 -1
- package/dist/esm/errors/address.d.ts +3 -7
- package/dist/esm/errors/address.d.ts.map +1 -1
- package/dist/esm/errors/base.d.ts +3 -4
- 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 +3 -8
- package/dist/esm/errors/block.d.ts.map +1 -1
- package/dist/esm/errors/provider.d.ts +1 -3
- package/dist/esm/errors/provider.d.ts.map +1 -1
- package/dist/esm/errors/request.d.ts +15 -39
- 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 +28 -30
- package/dist/esm/errors/rpc.d.ts.map +1 -1
- package/dist/esm/errors/transaction.d.ts +9 -21
- package/dist/esm/errors/transaction.d.ts.map +1 -1
- package/dist/esm/errors/transport.d.ts +8 -17
- 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 +3 -5
- package/dist/esm/errors/utils.d.ts.map +1 -1
- package/dist/esm/errors/utxo.d.ts +3 -9
- package/dist/esm/errors/utxo.d.ts.map +1 -1
- package/dist/esm/factories/createClient.d.ts +55 -37
- 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 -14
- package/dist/esm/factories/createTransport.d.ts.map +1 -1
- package/dist/esm/test/utils.d.ts +1 -2
- package/dist/esm/test/utils.d.ts.map +1 -1
- package/dist/esm/transports/ankr/ankr.d.ts +1 -3
- package/dist/esm/transports/ankr/ankr.d.ts.map +1 -1
- package/dist/esm/transports/ankr/ankr.types.d.ts +7 -8
- package/dist/esm/transports/ankr/ankr.types.d.ts.map +1 -1
- package/dist/esm/transports/ankr/getBalance.d.ts +1 -3
- package/dist/esm/transports/ankr/getBalance.d.ts.map +1 -1
- package/dist/esm/transports/ankr/getTransactionFee.d.ts +1 -3
- package/dist/esm/transports/ankr/getTransactionFee.d.ts.map +1 -1
- package/dist/esm/transports/ankr/getTransactions.d.ts +1 -3
- package/dist/esm/transports/ankr/getTransactions.d.ts.map +1 -1
- package/dist/esm/transports/ankr/methods.d.ts +1 -3
- package/dist/esm/transports/ankr/methods.d.ts.map +1 -1
- package/dist/esm/transports/ankr/utils.d.ts +1 -3
- package/dist/esm/transports/ankr/utils.d.ts.map +1 -1
- package/dist/esm/transports/blockchair/blockchair.d.ts +1 -3
- package/dist/esm/transports/blockchair/blockchair.d.ts.map +1 -1
- package/dist/esm/transports/blockchair/blockchair.types.d.ts +13 -14
- package/dist/esm/transports/blockchair/blockchair.types.d.ts.map +1 -1
- package/dist/esm/transports/blockchair/getBalance.d.ts +1 -3
- package/dist/esm/transports/blockchair/getBalance.d.ts.map +1 -1
- package/dist/esm/transports/blockchair/getTransactionFee.d.ts +1 -3
- package/dist/esm/transports/blockchair/getTransactionFee.d.ts.map +1 -1
- package/dist/esm/transports/blockchair/getTransactionFee.js.map +1 -1
- package/dist/esm/transports/blockchair/getUTXOs.d.ts +1 -3
- package/dist/esm/transports/blockchair/getUTXOs.d.ts.map +1 -1
- package/dist/esm/transports/blockchair/getUTXOs.js.map +1 -1
- package/dist/esm/transports/blockchair/getXPubAddresses.d.ts +1 -3
- package/dist/esm/transports/blockchair/getXPubAddresses.d.ts.map +1 -1
- package/dist/esm/transports/blockchair/getXPubAddresses.js.map +1 -1
- package/dist/esm/transports/blockchair/methods.d.ts +1 -3
- package/dist/esm/transports/blockchair/methods.d.ts.map +1 -1
- package/dist/esm/transports/blockcypher/blockcypher.d.ts +1 -3
- package/dist/esm/transports/blockcypher/blockcypher.d.ts.map +1 -1
- package/dist/esm/transports/blockcypher/blockcypher.types.d.ts +8 -9
- package/dist/esm/transports/blockcypher/blockcypher.types.d.ts.map +1 -1
- package/dist/esm/transports/blockcypher/getBalance.d.ts +1 -3
- package/dist/esm/transports/blockcypher/getBalance.d.ts.map +1 -1
- package/dist/esm/transports/blockcypher/getTransactionFee.d.ts +1 -3
- package/dist/esm/transports/blockcypher/getTransactionFee.d.ts.map +1 -1
- package/dist/esm/transports/blockcypher/getUTXOs.d.ts +1 -3
- 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 +1 -3
- package/dist/esm/transports/blockcypher/methods.d.ts.map +1 -1
- package/dist/esm/transports/blockcypher/utils.d.ts +1 -3
- package/dist/esm/transports/blockcypher/utils.d.ts.map +1 -1
- package/dist/esm/transports/blockcypher/utils.js.map +1 -1
- package/dist/esm/transports/custom.d.ts +15 -12
- package/dist/esm/transports/custom.d.ts.map +1 -1
- package/dist/esm/transports/fallback.d.ts +38 -43
- package/dist/esm/transports/fallback.d.ts.map +1 -1
- package/dist/esm/transports/fallback.js.map +1 -1
- package/dist/esm/transports/getHttpRpcClient.d.ts +23 -16
- 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 +1 -3
- package/dist/esm/transports/getRpcProviderMethods.d.ts.map +1 -1
- package/dist/esm/transports/http.d.ts +35 -25
- package/dist/esm/transports/http.d.ts.map +1 -1
- package/dist/esm/transports/mempool/getBalance.d.ts +1 -3
- package/dist/esm/transports/mempool/getBalance.d.ts.map +1 -1
- package/dist/esm/transports/mempool/getTransactionFee.d.ts +1 -3
- package/dist/esm/transports/mempool/getTransactionFee.d.ts.map +1 -1
- package/dist/esm/transports/mempool/getTransactions.d.ts +1 -3
- 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 +1 -3
- package/dist/esm/transports/mempool/mempool.d.ts.map +1 -1
- package/dist/esm/transports/mempool/mempool.types.d.ts +7 -8
- package/dist/esm/transports/mempool/mempool.types.d.ts.map +1 -1
- package/dist/esm/transports/mempool/methods.d.ts +1 -3
- package/dist/esm/transports/mempool/methods.d.ts.map +1 -1
- package/dist/esm/transports/mempool/utils.d.ts +1 -3
- package/dist/esm/transports/mempool/utils.d.ts.map +1 -1
- package/dist/esm/transports/types.d.ts +28 -27
- package/dist/esm/transports/types.d.ts.map +1 -1
- package/dist/esm/transports/utxo.d.ts +1 -3
- 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 +1 -3
- package/dist/esm/types/account.d.ts.map +1 -1
- package/dist/esm/types/address.d.ts +4 -6
- package/dist/esm/types/address.d.ts.map +1 -1
- package/dist/esm/types/block.d.ts +18 -19
- package/dist/esm/types/block.d.ts.map +1 -1
- package/dist/esm/types/blockStats.d.ts +2 -3
- package/dist/esm/types/blockStats.d.ts.map +1 -1
- package/dist/esm/types/chain.d.ts +26 -16
- package/dist/esm/types/chain.d.ts.map +1 -1
- package/dist/esm/types/client.d.ts +43 -29
- package/dist/esm/types/client.d.ts.map +1 -1
- package/dist/esm/types/hash.d.ts +1 -2
- package/dist/esm/types/hash.d.ts.map +1 -1
- package/dist/esm/types/request.d.ts +16 -13
- package/dist/esm/types/request.d.ts.map +1 -1
- package/dist/esm/types/rpc.d.ts +4 -5
- package/dist/esm/types/rpc.d.ts.map +1 -1
- package/dist/esm/types/transaction.d.ts +2 -3
- package/dist/esm/types/transaction.d.ts.map +1 -1
- package/dist/esm/types/transport.d.ts +18 -14
- package/dist/esm/types/transport.d.ts.map +1 -1
- package/dist/esm/types/utils.d.ts +43 -44
- package/dist/esm/types/utils.d.ts.map +1 -1
- package/dist/esm/types/xpub.d.ts +1 -3
- package/dist/esm/types/xpub.d.ts.map +1 -1
- package/dist/esm/utils/buildRequest.d.ts +3 -5
- package/dist/esm/utils/buildRequest.d.ts.map +1 -1
- package/dist/esm/utils/buildRequest.js +2 -1
- package/dist/esm/utils/buildRequest.js.map +1 -1
- package/dist/esm/utils/cancelTransaction.d.ts +1 -3
- package/dist/esm/utils/cancelTransaction.d.ts.map +1 -1
- package/dist/esm/utils/converter.d.ts +5 -6
- 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 +2 -10
- package/dist/esm/utils/createBatchScheduler.d.ts.map +1 -1
- package/dist/esm/utils/createBatchScheduler.js.map +1 -1
- package/dist/esm/utils/deepEqual.d.ts +1 -2
- 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 +7 -9
- package/dist/esm/utils/getAction.d.ts.map +1 -1
- package/dist/esm/utils/getAddressInfo.d.ts +2 -4
- package/dist/esm/utils/getAddressInfo.d.ts.map +1 -1
- package/dist/esm/utils/getAddressInfo.js +2 -1
- package/dist/esm/utils/getAddressInfo.js.map +1 -1
- package/dist/esm/utils/idCache.d.ts +1 -2
- package/dist/esm/utils/idCache.d.ts.map +1 -1
- package/dist/esm/utils/isAddress.d.ts +1 -3
- package/dist/esm/utils/isAddress.d.ts.map +1 -1
- package/dist/esm/utils/lru.d.ts +5 -6
- 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 +1 -3
- 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 +7 -9
- package/dist/esm/utils/observe.d.ts.map +1 -1
- package/dist/esm/utils/observe.js.map +1 -1
- package/dist/esm/utils/parseAccount.d.ts +2 -4
- package/dist/esm/utils/parseAccount.d.ts.map +1 -1
- package/dist/esm/utils/poll.d.ts +4 -11
- package/dist/esm/utils/poll.d.ts.map +1 -1
- package/dist/esm/utils/poll.js +2 -1
- package/dist/esm/utils/poll.js.map +1 -1
- package/dist/esm/utils/retryUntil.d.ts +18 -17
- 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 +1 -2
- package/dist/esm/utils/sleep.d.ts.map +1 -1
- package/dist/esm/utils/stringify.d.ts +2 -4
- package/dist/esm/utils/stringify.d.ts.map +1 -1
- package/dist/esm/utils/uid.d.ts +1 -2
- 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 +1 -2
- 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 +1 -2
- package/dist/esm/utils/wait.d.ts.map +1 -1
- package/dist/esm/utils/withDedupe.d.ts +2 -7
- package/dist/esm/utils/withDedupe.d.ts.map +1 -1
- package/dist/esm/utils/withDedupe.js.map +1 -1
- package/dist/esm/utils/withResolvers.d.ts +2 -3
- package/dist/esm/utils/withResolvers.d.ts.map +1 -1
- package/dist/esm/utils/withRetry.d.ts +4 -13
- package/dist/esm/utils/withRetry.d.ts.map +1 -1
- package/dist/esm/utils/withTimeout.d.ts +3 -11
- 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 +2 -3
- 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/dist/esm/vite-env.d.ts +1 -1
- package/package.json +3 -3
- package/src/factories/createClient.ts +1 -2
- package/src/types/client.ts +1 -2
- package/src/version.ts +1 -1
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { RpcMethods } from "../types.js";
|
|
2
|
-
|
|
3
2
|
//#region src/transports/mempool/methods.d.ts
|
|
4
|
-
declare const mempoolMethods: RpcMethods;
|
|
3
|
+
export declare const mempoolMethods: RpcMethods;
|
|
5
4
|
//#endregion
|
|
6
|
-
export { mempoolMethods };
|
|
7
5
|
//# sourceMappingURL=methods.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"methods.d.ts","names":[],"sources":["../../../../src/transports/mempool/methods.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"methods.d.ts","names":[],"sources":["../../../../src/transports/mempool/methods.ts"],"mappings":";;qBAKa,gBAAgB"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { UTXOTransaction } from "../../types/transaction.js";
|
|
2
2
|
import { MempoolTransaction } from "./mempool.types.js";
|
|
3
|
-
|
|
4
3
|
//#region src/transports/mempool/utils.d.ts
|
|
5
|
-
declare const mempoolTransactionTransformer: (txn: MempoolTransaction) => Partial<UTXOTransaction>;
|
|
4
|
+
export declare const mempoolTransactionTransformer: (txn: MempoolTransaction) => Partial<UTXOTransaction>;
|
|
6
5
|
//#endregion
|
|
7
|
-
export { mempoolTransactionTransformer };
|
|
8
6
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","names":[],"sources":["../../../../src/transports/mempool/utils.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","names":[],"sources":["../../../../src/transports/mempool/utils.ts"],"mappings":";;;qBAGa,gCACX,KAAK,uBACJ,QAAQ"}
|
|
@@ -2,10 +2,9 @@ import { BlockStats, BlockStatsKeys } from "../types/blockStats.js";
|
|
|
2
2
|
import { UTXO, UTXOTransaction } from "../types/transaction.js";
|
|
3
3
|
import { xPubAccount } from "../types/xpub.js";
|
|
4
4
|
import { HttpRpcClient } from "./getHttpRpcClient.js";
|
|
5
|
-
|
|
6
5
|
//#region src/transports/types.d.ts
|
|
7
|
-
declare const UTXOAPISchemaMethods: UTXOMethod[];
|
|
8
|
-
type UTXOAPISchema = [{
|
|
6
|
+
export declare const UTXOAPISchemaMethods: UTXOMethod[];
|
|
7
|
+
export type UTXOAPISchema = [{
|
|
9
8
|
Method: "getBalance";
|
|
10
9
|
Parameters: {
|
|
11
10
|
address: string;
|
|
@@ -45,7 +44,7 @@ type UTXOAPISchema = [{
|
|
|
45
44
|
};
|
|
46
45
|
ReturnType: xPubAccount;
|
|
47
46
|
}];
|
|
48
|
-
type UTXOSchema = [{
|
|
47
|
+
export type UTXOSchema = [{
|
|
49
48
|
Method: "getblockcount";
|
|
50
49
|
Parameters: [];
|
|
51
50
|
ReturnType: number;
|
|
@@ -70,47 +69,50 @@ type UTXOSchema = [{
|
|
|
70
69
|
Parameters: [string, boolean, string?];
|
|
71
70
|
ReturnType: UTXOTransaction;
|
|
72
71
|
}, ...UTXOAPISchema];
|
|
73
|
-
type UTXOMethod = UTXOSchema[number]["Method"];
|
|
74
|
-
type SignPsbtParameters = {
|
|
75
|
-
/** The PSBT encoded as a hexadecimal string */
|
|
72
|
+
export type UTXOMethod = UTXOSchema[number]["Method"];
|
|
73
|
+
export type SignPsbtParameters = {
|
|
74
|
+
/** The PSBT encoded as a hexadecimal string */
|
|
75
|
+
psbt: string;
|
|
76
76
|
/**
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
* Array of objects specifying details about the inputs to be signed
|
|
78
|
+
*/
|
|
79
79
|
inputsToSign: {
|
|
80
80
|
/**
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
sigHash?: number;
|
|
85
|
-
|
|
81
|
+
* The SigHash type to use for signing (e.g., SIGHASH_ALL).
|
|
82
|
+
* If not specified, a default value is used.
|
|
83
|
+
*/
|
|
84
|
+
sigHash?: number;
|
|
85
|
+
/** The Bitcoin address associated with the input that will be signed */
|
|
86
|
+
address: string;
|
|
87
|
+
/** An array of indexes in the PSBT corresponding to the inputs that need to be signed */
|
|
86
88
|
signingIndexes: number[];
|
|
87
89
|
}[];
|
|
88
90
|
/**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
* Whether to finalize the PSBT after signing.
|
|
92
|
+
* If `true`, the PSBT will be completed and ready for broadcasting.
|
|
93
|
+
* If `false` or omitted, the PSBT remains partially signed.
|
|
94
|
+
* Some wallets does not support it.
|
|
95
|
+
*/
|
|
94
96
|
finalize?: boolean;
|
|
95
97
|
};
|
|
96
|
-
type SignPsbtReturnType = string;
|
|
97
|
-
type UTXOWalletSchema = readonly [{
|
|
98
|
+
export type SignPsbtReturnType = string;
|
|
99
|
+
export type UTXOWalletSchema = readonly [{
|
|
98
100
|
Method: "signPsbt";
|
|
99
101
|
Parameters: SignPsbtParameters;
|
|
100
102
|
ReturnType: SignPsbtReturnType;
|
|
101
103
|
}];
|
|
102
|
-
type SuccessResult<result> = {
|
|
104
|
+
export type SuccessResult<result> = {
|
|
103
105
|
method?: undefined;
|
|
104
106
|
result: result;
|
|
105
107
|
error?: undefined;
|
|
106
108
|
};
|
|
107
|
-
type ErrorResult<error> = {
|
|
109
|
+
export type ErrorResult<error> = {
|
|
108
110
|
method?: undefined;
|
|
109
111
|
result?: undefined;
|
|
110
112
|
error: error;
|
|
111
113
|
};
|
|
112
|
-
type RpcResponse<result = any, error = any> = SuccessResult<result> | ErrorResult<error>;
|
|
113
|
-
type RpcMethodHandler<M extends UTXOMethod = UTXOMethod> = (client: HttpRpcClient, config: {
|
|
114
|
+
export type RpcResponse<result = any, error = any> = SuccessResult<result> | ErrorResult<error>;
|
|
115
|
+
export type RpcMethodHandler<M extends UTXOMethod = UTXOMethod> = (client: HttpRpcClient, config: {
|
|
114
116
|
baseUrl: string;
|
|
115
117
|
apiKey?: string;
|
|
116
118
|
}, params: Extract<UTXOSchema[number], {
|
|
@@ -118,7 +120,6 @@ type RpcMethodHandler<M extends UTXOMethod = UTXOMethod> = (client: HttpRpcClien
|
|
|
118
120
|
}>["Parameters"]) => Promise<RpcResponse<Extract<UTXOSchema[number], {
|
|
119
121
|
Method: M;
|
|
120
122
|
}>["ReturnType"]>>;
|
|
121
|
-
type RpcMethods = { [key in UTXOMethod]?: RpcMethodHandler<key
|
|
123
|
+
export type RpcMethods = { [key in UTXOMethod]?: RpcMethodHandler<key>; };
|
|
122
124
|
//#endregion
|
|
123
|
-
export { ErrorResult, RpcMethodHandler, RpcMethods, RpcResponse, SignPsbtParameters, SignPsbtReturnType, SuccessResult, UTXOAPISchema, UTXOAPISchemaMethods, UTXOMethod, UTXOSchema, UTXOWalletSchema };
|
|
124
125
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/transports/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/transports/types.ts"],"mappings":";;;;;qBAKa,sBAAsB;YAQvB;EAER;EACA;IAAc;;EACd;;EAGA;EACA;IACE;IACA;IACA;IACA;IACA;;EAEF;IACE,cAAc,MAAM,QAAQ;IAC5B;IACA;;;EAIF;EACA;IACE;;EAEF;;EAGA;EACA;IACE;IACA;;EAEF,YAAY,MAAM;;EAGlB;EACA;IACE;;EAEF,YAAY;;YAIJ;EAER;EACA;EACA;;EAGA;EACA;EACA;;EAGA;EACA;EACA;;EAGA;EACA,8BAA8B,MAAM;EACpC,YAAY;;EAGZ;EACA;EACA;;EAGA;EACA;EACA,YAAY;MAEX;YAGO,aAAa;YAEb;;EAEV;;;;EAIA;;;;;IAKE;;IAEA;;IAEA;;;;;;;;EAQF;;YAGU;YAEA;EAER;EACA,YAAY;EACZ,YAAY;;YAIJ,cAAc;EACxB;EACA,QAAQ;EACR;;YAEU,YAAY;EACtB;EACA;EACA,OAAO;;YAGG,YAAY,cAAc,eAClC,cAAc,UACd,YAAY;YAEJ,iBAAiB,UAAU,aAAa,eAClD,QAAQ,eACR;EAAU;EAAiB;GAC3B,QAAQ,QAAQ;EAAsB,QAAQ;qBAC3C,QACH,YAAY,QAAQ;EAAsB,QAAQ;;YAGxC,gBACT,OAAO,cAAc,iBAAiB"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { HttpTransport, HttpTransportConfig } from "./http.js";
|
|
2
|
-
|
|
3
2
|
//#region src/transports/utxo.d.ts
|
|
4
3
|
type UTXOHttpTransportConfig = HttpTransportConfig & {
|
|
5
4
|
includeChainToURL?: boolean;
|
|
6
5
|
apiKey?: string;
|
|
7
6
|
};
|
|
8
|
-
declare function utxo(url?: string, config?: UTXOHttpTransportConfig): HttpTransport;
|
|
7
|
+
export declare function utxo(url?: string, config?: UTXOHttpTransportConfig): HttpTransport;
|
|
9
8
|
//#endregion
|
|
10
|
-
export { utxo };
|
|
11
9
|
//# sourceMappingURL=utxo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utxo.d.ts","names":[],"sources":["../../../src/transports/utxo.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"utxo.d.ts","names":[],"sources":["../../../src/transports/utxo.ts"],"mappings":";;KASK,0BAA0B;EAC7B;EACA;;wBAGc,KACd,cACA,SAAQ,0BACP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utxo.js","names":[],"sources":["../../../src/transports/utxo.ts"],"sourcesContent":["import { RpcRequestError } from '../errors/request.js'\nimport { UrlRequiredError } from '../errors/transport.js'\nimport { createTransport } from '../factories/createTransport.js'\nimport { idCache } from '../utils/idCache.js'\nimport { getHttpRpcClient } from './getHttpRpcClient.js'\nimport { getRpcProviderMethods } from './getRpcProviderMethods.js'\nimport type { HttpTransport, HttpTransportConfig } from './http.js'\nimport type { UTXOMethod } from './types.js'\n\ntype UTXOHttpTransportConfig = HttpTransportConfig & {\n includeChainToURL?: boolean\n apiKey?: string\n}\n\nexport function utxo(\n url?: string,\n config: UTXOHttpTransportConfig = {}\n): HttpTransport {\n const {\n fetchOptions,\n key = 'utxo',\n name = 'UTXO HTTP API',\n onFetchRequest,\n onFetchResponse,\n retryDelay,\n apiKey,\n methods,\n } = config\n\n return ({ chain, retryCount: retryCount_, timeout: timeout_ }) => {\n const retryCount = config.retryCount ?? retryCount_\n const timeout = timeout_ ?? config.timeout ?? 10_000\n let url_ = url\n if (config.includeChainToURL) {\n const chainName = chain?.name.replace(' ', '-').toLowerCase()\n url_ = `${url}${chainName ? `/${chainName}` : ''}`\n }\n if (!url_) {\n throw new UrlRequiredError()\n }\n\n const client = getHttpRpcClient(url_, {\n fetchOptions,\n onRequest: onFetchRequest,\n onResponse: onFetchResponse,\n timeout,\n })\n\n const rpcMethods = getRpcProviderMethods(key)\n\n return createTransport(\n {\n key,\n name,\n methods,\n async request({ method, params }) {\n const body = {\n jsonrpc: '2.0' as const,\n id: idCache.take(),\n method,\n params,\n }\n const methodHandler = rpcMethods?.[method as UTXOMethod]\n const { error, result } = await (methodHandler?.(\n client,\n { baseUrl: url_, apiKey },\n params\n ) ??\n client.request({\n body,\n }))\n if (error) {\n throw new RpcRequestError({\n body,\n error,\n url: url_,\n })\n }\n return result\n },\n retryCount,\n retryDelay,\n timeout,\n type: 'http',\n },\n {\n fetchOptions,\n url: url_,\n }\n )\n }\n}\n"],"mappings":";;;;;;;AAcA,SAAgB,KACd,KACA,SAAkC,CAAC,GACpB;CACf,MAAM,EACJ,cACA,MAAM,QACN,OAAO,iBACP,gBACA,iBACA,YACA,QACA,YACE;CAEJ,QAAQ,EAAE,OAAO,YAAY,aAAa,SAAS,eAAe;EAChE,MAAM,aAAa,OAAO,cAAc;EACxC,MAAM,UAAU,YAAY,OAAO,WAAW;EAC9C,IAAI,OAAO;EACX,IAAI,OAAO,mBAAmB;GAC5B,MAAM,YAAY,OAAO,KAAK,QAAQ,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"utxo.js","names":[],"sources":["../../../src/transports/utxo.ts"],"sourcesContent":["import { RpcRequestError } from '../errors/request.js'\nimport { UrlRequiredError } from '../errors/transport.js'\nimport { createTransport } from '../factories/createTransport.js'\nimport { idCache } from '../utils/idCache.js'\nimport { getHttpRpcClient } from './getHttpRpcClient.js'\nimport { getRpcProviderMethods } from './getRpcProviderMethods.js'\nimport type { HttpTransport, HttpTransportConfig } from './http.js'\nimport type { UTXOMethod } from './types.js'\n\ntype UTXOHttpTransportConfig = HttpTransportConfig & {\n includeChainToURL?: boolean\n apiKey?: string\n}\n\nexport function utxo(\n url?: string,\n config: UTXOHttpTransportConfig = {}\n): HttpTransport {\n const {\n fetchOptions,\n key = 'utxo',\n name = 'UTXO HTTP API',\n onFetchRequest,\n onFetchResponse,\n retryDelay,\n apiKey,\n methods,\n } = config\n\n return ({ chain, retryCount: retryCount_, timeout: timeout_ }) => {\n const retryCount = config.retryCount ?? retryCount_\n const timeout = timeout_ ?? config.timeout ?? 10_000\n let url_ = url\n if (config.includeChainToURL) {\n const chainName = chain?.name.replace(' ', '-').toLowerCase()\n url_ = `${url}${chainName ? `/${chainName}` : ''}`\n }\n if (!url_) {\n throw new UrlRequiredError()\n }\n\n const client = getHttpRpcClient(url_, {\n fetchOptions,\n onRequest: onFetchRequest,\n onResponse: onFetchResponse,\n timeout,\n })\n\n const rpcMethods = getRpcProviderMethods(key)\n\n return createTransport(\n {\n key,\n name,\n methods,\n async request({ method, params }) {\n const body = {\n jsonrpc: '2.0' as const,\n id: idCache.take(),\n method,\n params,\n }\n const methodHandler = rpcMethods?.[method as UTXOMethod]\n const { error, result } = await (methodHandler?.(\n client,\n { baseUrl: url_, apiKey },\n params\n ) ??\n client.request({\n body,\n }))\n if (error) {\n throw new RpcRequestError({\n body,\n error,\n url: url_,\n })\n }\n return result\n },\n retryCount,\n retryDelay,\n timeout,\n type: 'http',\n },\n {\n fetchOptions,\n url: url_,\n }\n )\n }\n}\n"],"mappings":";;;;;;;AAcA,SAAgB,KACd,KACA,SAAkC,CAAC,GACpB;CACf,MAAM,EACJ,cACA,MAAM,QACN,OAAO,iBACP,gBACA,iBACA,YACA,QACA,YACE;CAEJ,QAAQ,EAAE,OAAO,YAAY,aAAa,SAAS,eAAe;EAChE,MAAM,aAAa,OAAO,cAAc;EACxC,MAAM,UAAU,YAAY,OAAO,WAAW;EAC9C,IAAI,OAAO;EACX,IAAI,OAAO,mBAAmB;GAC5B,MAAM,YAAY,OAAO,KAAK,QAAQ,KAAK,GAAG,CAAC,CAAC,YAAY;GAC5D,OAAO,GAAG,MAAM,YAAY,IAAI,cAAc;EAChD;EACA,IAAI,CAAC,MACH,MAAM,IAAI,iBAAiB;EAG7B,MAAM,SAAS,iBAAiB,MAAM;GACpC;GACA,WAAW;GACX,YAAY;GACZ;EACF,CAAC;EAED,MAAM,aAAa,sBAAsB,GAAG;EAE5C,OAAO,gBACL;GACE;GACA;GACA;GACA,MAAM,QAAQ,EAAE,QAAQ,UAAU;IAChC,MAAM,OAAO;KACX,SAAS;KACT,IAAI,QAAQ,KAAK;KACjB;KACA;IACF;IACA,MAAM,gBAAgB,aAAa;IACnC,MAAM,EAAE,OAAO,WAAW,OAAO,gBAC/B,QACA;KAAE,SAAS;KAAM;IAAO,GACxB,MACF,KACE,OAAO,QAAQ,EACb,KACF,CAAC;IACH,IAAI,OACF,MAAM,IAAI,gBAAgB;KACxB;KACA;KACA,KAAK;IACP,CAAC;IAEH,OAAO;GACT;GACA;GACA;GACA;GACA,MAAM;EACR,GACA;GACE;GACA,KAAK;EACP,CACF;CACF;AACF"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Address, AddressPurpose, AddressType } from "./address.js";
|
|
2
|
-
|
|
3
2
|
//#region src/types/account.d.ts
|
|
4
|
-
interface Account {
|
|
3
|
+
export interface Account {
|
|
5
4
|
address: Address;
|
|
6
5
|
addressType: AddressType;
|
|
7
6
|
publicKey: string;
|
|
8
7
|
purpose: AddressPurpose;
|
|
9
8
|
}
|
|
10
9
|
//#endregion
|
|
11
|
-
export { Account };
|
|
12
10
|
//# sourceMappingURL=account.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.d.ts","names":[],"sources":["../../../src/types/account.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"account.d.ts","names":[],"sources":["../../../src/types/account.ts"],"mappings":";;iBAEiB;EACf,SAAS;EACT,aAAa;EACb;EACA,SAAS"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { Network } from "./chain.js";
|
|
2
|
-
|
|
3
2
|
//#region src/types/address.d.ts
|
|
4
|
-
type Address = string;
|
|
5
|
-
type AddressPurpose = "payment" | "ordinals" | "stacks";
|
|
6
|
-
declare enum AddressType {
|
|
3
|
+
export type Address = string;
|
|
4
|
+
export type AddressPurpose = "payment" | "ordinals" | "stacks";
|
|
5
|
+
export declare enum AddressType {
|
|
7
6
|
p2pkh = "p2pkh",
|
|
8
7
|
p2sh = "p2sh",
|
|
9
8
|
p2wpkh = "p2wpkh",
|
|
10
9
|
p2wsh = "p2wsh",
|
|
11
10
|
p2tr = "p2tr"
|
|
12
11
|
}
|
|
13
|
-
type AddressInfo = {
|
|
12
|
+
export type AddressInfo = {
|
|
14
13
|
bech32: boolean;
|
|
15
14
|
network: Network;
|
|
16
15
|
address: Address;
|
|
@@ -18,5 +17,4 @@ type AddressInfo = {
|
|
|
18
17
|
purpose: AddressPurpose;
|
|
19
18
|
};
|
|
20
19
|
//#endregion
|
|
21
|
-
export { Address, AddressInfo, AddressPurpose, AddressType };
|
|
22
20
|
//# sourceMappingURL=address.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address.d.ts","names":[],"sources":["../../../src/types/address.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"address.d.ts","names":[],"sources":["../../../src/types/address.ts"],"mappings":";;YAEY;YAEA;oBAEA;EACV;EACA;EACA;EACA;EACA;;YAGU;EACV;EACA,SAAS;EACT,SAAS;EACT,MAAM;EACN,SAAS"}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
//#region src/types/block.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* Specifies a particular block in the blockchain.
|
|
4
|
-
*
|
|
5
|
-
* - `"latest"`: the latest proposed block
|
|
6
|
-
* - `"earliest"`: the earliest/genesis block – lowest numbered block the client has available
|
|
7
|
-
* - `"pending"`: pending state/transactions – next block built by the client on top
|
|
8
|
-
* of unsafe and containing the set of transactions usually taken from local mempool
|
|
9
|
-
* - `"safe"`: the latest safe head block – the most recent block that is safe from
|
|
10
|
-
* re-orgs under honest majority and certain synchronicity assumptions
|
|
11
|
-
* - `"finalized"`: the latest finalized block – the most recent crypto-economically secure block;
|
|
12
|
-
* cannot be re-orged outside of manual intervention driven by community coordination
|
|
13
|
-
*
|
|
14
|
-
* Using `pending`, while allowed, is not advised, as it may lead
|
|
15
|
-
* to internally inconsistent results. Use of `latest` is safe and will not
|
|
16
|
-
* lead to inconsistent results. Depending on the backing RPC networks caching system,
|
|
17
|
-
* the usage of `pending` may lead to inconsistencies as a result of an
|
|
18
|
-
* overly aggressive cache system. This may cause downstream errors/invalid states.
|
|
19
|
-
*/
|
|
20
|
-
type BlockTag = "latest" | "earliest" | "pending" | "safe" | "finalized";
|
|
3
|
+
* Specifies a particular block in the blockchain.
|
|
4
|
+
*
|
|
5
|
+
* - `"latest"`: the latest proposed block
|
|
6
|
+
* - `"earliest"`: the earliest/genesis block – lowest numbered block the client has available
|
|
7
|
+
* - `"pending"`: pending state/transactions – next block built by the client on top
|
|
8
|
+
* of unsafe and containing the set of transactions usually taken from local mempool
|
|
9
|
+
* - `"safe"`: the latest safe head block – the most recent block that is safe from
|
|
10
|
+
* re-orgs under honest majority and certain synchronicity assumptions
|
|
11
|
+
* - `"finalized"`: the latest finalized block – the most recent crypto-economically secure block;
|
|
12
|
+
* cannot be re-orged outside of manual intervention driven by community coordination
|
|
13
|
+
*
|
|
14
|
+
* Using `pending`, while allowed, is not advised, as it may lead
|
|
15
|
+
* to internally inconsistent results. Use of `latest` is safe and will not
|
|
16
|
+
* lead to inconsistent results. Depending on the backing RPC networks caching system,
|
|
17
|
+
* the usage of `pending` may lead to inconsistencies as a result of an
|
|
18
|
+
* overly aggressive cache system. This may cause downstream errors/invalid states.
|
|
19
|
+
*/
|
|
20
|
+
export type BlockTag = "latest" | "earliest" | "pending" | "safe" | "finalized";
|
|
21
21
|
//#endregion
|
|
22
|
-
export { BlockTag };
|
|
23
22
|
//# sourceMappingURL=block.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block.d.ts","names":[],"sources":["../../../src/types/block.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"block.d.ts","names":[],"sources":["../../../src/types/block.ts"],"mappings":";;;;;;;;;;;;;;;;;;;YAkBY"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/types/blockStats.d.ts
|
|
2
|
-
type BlockStats = Partial<{
|
|
2
|
+
export type BlockStats = Partial<{
|
|
3
3
|
avgfee: number;
|
|
4
4
|
avgfeerate: number;
|
|
5
5
|
avgtxsize: number;
|
|
@@ -32,7 +32,6 @@ type BlockStats = Partial<{
|
|
|
32
32
|
utxo_increase_actual: number;
|
|
33
33
|
utxo_size_inc_actual: number;
|
|
34
34
|
}>;
|
|
35
|
-
type BlockStatsKeys = keyof BlockStats;
|
|
35
|
+
export type BlockStatsKeys = keyof BlockStats;
|
|
36
36
|
//#endregion
|
|
37
|
-
export { BlockStats, BlockStatsKeys };
|
|
38
37
|
//# sourceMappingURL=blockStats.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockStats.d.ts","names":[],"sources":["../../../src/types/blockStats.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"blockStats.d.ts","names":[],"sources":["../../../src/types/blockStats.ts"],"mappings":";YAAY,aAAa;EACvB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;YAGU,uBAAuB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/types/chain.d.ts
|
|
2
|
-
declare enum ChainId {
|
|
2
|
+
export declare enum ChainId {
|
|
3
3
|
BITCOIN_MAINNET = "bitcoin:mainnet",
|
|
4
4
|
BITCOIN_TESTNET = "bitcoin:testnet",
|
|
5
5
|
BITCOIN_TESTNET4 = "bitcoin:testnet4",
|
|
@@ -9,35 +9,46 @@ declare enum ChainId {
|
|
|
9
9
|
STACKS_MAINNET = "stacks:mainnet",
|
|
10
10
|
STACKS_TESTNET = "stacks:testnet"
|
|
11
11
|
}
|
|
12
|
-
declare enum Network {
|
|
12
|
+
export declare enum Network {
|
|
13
13
|
Mainnet = "mainnet",
|
|
14
14
|
Testnet = "testnet",
|
|
15
15
|
Regtest = "regtest"
|
|
16
16
|
}
|
|
17
|
-
type Chain<formatters extends ChainFormatters | undefined = ChainFormatters | undefined, custom extends Record<string, unknown> | undefined = Record<string, unknown> | undefined> = {
|
|
18
|
-
/** Collection of block explorers */
|
|
17
|
+
export type Chain<formatters extends ChainFormatters | undefined = ChainFormatters | undefined, custom extends Record<string, unknown> | undefined = Record<string, unknown> | undefined> = {
|
|
18
|
+
/** Collection of block explorers */
|
|
19
|
+
blockExplorers?: {
|
|
19
20
|
[key: string]: ChainBlockExplorer;
|
|
20
21
|
default: ChainBlockExplorer;
|
|
21
|
-
} | undefined;
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
} | undefined;
|
|
23
|
+
/** ID in number form */
|
|
24
|
+
id: ChainId;
|
|
25
|
+
/** Human-readable name */
|
|
26
|
+
name: string;
|
|
27
|
+
/** Collection of RPC endpoints */
|
|
24
28
|
rpcUrls: {
|
|
25
29
|
[key: string]: ChainRpcUrls;
|
|
26
30
|
default: ChainRpcUrls;
|
|
27
|
-
};
|
|
31
|
+
};
|
|
32
|
+
/** Flag for test networks */
|
|
28
33
|
testnet?: boolean | undefined;
|
|
29
34
|
} & ChainConfig<formatters, custom>;
|
|
30
|
-
type ChainConfig<formatters extends ChainFormatters | undefined = ChainFormatters | undefined, custom extends Record<string, unknown> | undefined = Record<string, unknown> | undefined> = {
|
|
31
|
-
/** Custom chain data. */
|
|
35
|
+
export type ChainConfig<formatters extends ChainFormatters | undefined = ChainFormatters | undefined, custom extends Record<string, unknown> | undefined = Record<string, unknown> | undefined> = {
|
|
36
|
+
/** Custom chain data. */
|
|
37
|
+
custom?: custom | undefined;
|
|
38
|
+
/** Modifies how data is formatted and typed (e.g. blocks and transactions) */
|
|
32
39
|
formatters?: formatters | undefined;
|
|
33
40
|
};
|
|
34
|
-
type ChainFormatters = {
|
|
35
|
-
/** Modifies how the Block structure is formatted & typed. */
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
export type ChainFormatters = {
|
|
42
|
+
/** Modifies how the Block structure is formatted & typed. */
|
|
43
|
+
block?: ChainFormatter<"block"> | undefined;
|
|
44
|
+
/** Modifies how the Transaction structure is formatted & typed. */
|
|
45
|
+
transaction?: ChainFormatter<"transaction"> | undefined;
|
|
46
|
+
/** Modifies how the TransactionReceipt structure is formatted & typed. */
|
|
47
|
+
transactionReceipt?: ChainFormatter<"transactionReceipt"> | undefined;
|
|
48
|
+
/** Modifies how the TransactionRequest structure is formatted & typed. */
|
|
38
49
|
transactionRequest?: ChainFormatter<"transactionRequest"> | undefined;
|
|
39
50
|
};
|
|
40
|
-
type ChainFormatter<type extends string = string> = {
|
|
51
|
+
export type ChainFormatter<type extends string = string> = {
|
|
41
52
|
format: (args: any) => any;
|
|
42
53
|
type: type;
|
|
43
54
|
};
|
|
@@ -51,5 +62,4 @@ type ChainRpcUrls = {
|
|
|
51
62
|
webSocket?: readonly string[] | undefined;
|
|
52
63
|
};
|
|
53
64
|
//#endregion
|
|
54
|
-
export { Chain, ChainConfig, ChainFormatter, ChainFormatters, ChainId, Network };
|
|
55
65
|
//# sourceMappingURL=chain.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.d.ts","names":[],"sources":["../../../src/types/chain.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"chain.d.ts","names":[],"sources":["../../../src/types/chain.ts"],"mappings":";oBAAY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;oBAGU;EACV;EACA;EACA;;YAGU,MACV,mBAAmB,8BAA8B,6BACjD,eAAe,sCACX;;EAIJ;KAEqB,cAAA;IACf,SAAS;;;EAIf,IAAI;;EAEJ;;EAEA;KACiB,cAAA;IACf,SAAS;;;EAGX;IACE,YAAY,YAAY;YAEhB,YACV,mBAAmB,8BAA8B,6BACjD,eAAe,sCACX;;EAIJ,SAAS;;EAET,aAAa;;YAOH;;EAEV,QAAQ;;EAER,cAAc;;EAEd,qBAAqB;;EAErB,qBAAqB;;YAGX,eAAe;EACzB,SAAS;EACT,MAAM;;KAOH;EACH;EACA;EACA;;KAGG;EACH;EACA"}
|
|
@@ -6,49 +6,63 @@ import { Account } from "./account.js";
|
|
|
6
6
|
import { ErrorType } from "../errors/utils.js";
|
|
7
7
|
import { BtcRpcRequestFn, RpcSchema } from "./request.js";
|
|
8
8
|
import { Transport } from "./transport.js";
|
|
9
|
-
|
|
10
9
|
//#region src/types/client.d.ts
|
|
11
|
-
type ClientConfig<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, accountOrAddress extends Account | Address | undefined = Account | Address | undefined, rpcSchema extends RpcSchema | undefined = undefined> = {
|
|
12
|
-
/** The Account to use for the Client. This will be used for Actions that require an account as an argument. */
|
|
10
|
+
export type ClientConfig<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, accountOrAddress extends Account | Address | undefined = Account | Address | undefined, rpcSchema extends RpcSchema | undefined = undefined> = {
|
|
11
|
+
/** The Account to use for the Client. This will be used for Actions that require an account as an argument. */
|
|
12
|
+
account?: accountOrAddress | Account | Address | undefined;
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
cacheTime?: number | undefined;
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
* Time (in ms) that cached data will remain in memory.
|
|
15
|
+
* @default 4_000
|
|
16
|
+
*/
|
|
17
|
+
cacheTime?: number | undefined;
|
|
18
|
+
/** Chain for the client. */
|
|
19
|
+
chain?: Chain | undefined | chain;
|
|
20
|
+
/** A key for the client. */
|
|
21
|
+
key?: string | undefined;
|
|
22
|
+
/** A name for the client. */
|
|
20
23
|
name?: string | undefined;
|
|
21
24
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
* Frequency (in ms) for polling enabled actions & events.
|
|
26
|
+
* @default 4_000
|
|
27
|
+
*/
|
|
25
28
|
pollingInterval?: number | undefined;
|
|
26
29
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
rpcSchema?: rpcSchema | undefined;
|
|
30
|
-
|
|
30
|
+
* Typed JSON-RPC schema for the client.
|
|
31
|
+
*/
|
|
32
|
+
rpcSchema?: rpcSchema | undefined;
|
|
33
|
+
/** The RPC transport */
|
|
34
|
+
transport: transport;
|
|
35
|
+
/** The type of client. */
|
|
31
36
|
type?: string | undefined;
|
|
32
37
|
};
|
|
33
|
-
type Client<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined, rpcSchema extends RpcSchema | undefined = undefined, extended extends Extended | undefined = Extended | undefined> = Client_Base<transport, chain, account, rpcSchema> & (extended extends Extended ? extended : unknown) & {
|
|
38
|
+
export type Client<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined, rpcSchema extends RpcSchema | undefined = undefined, extended extends Extended | undefined = Extended | undefined> = Client_Base<transport, chain, account, rpcSchema> & (extended extends Extended ? extended : unknown) & {
|
|
34
39
|
extend: <const client extends Extended>(fn: (client: Client<transport, chain, account, rpcSchema, extended>) => client) => Client<transport, chain, account, rpcSchema, Prettify<client> & (extended extends Extended ? extended : unknown)>;
|
|
35
40
|
};
|
|
36
41
|
type Client_Base<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined, rpcSchema extends RpcSchema | undefined = undefined> = {
|
|
37
|
-
/** The Account of the Client. */
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
/** The Account of the Client. */
|
|
43
|
+
account: account;
|
|
44
|
+
/** Time (in ms) that cached data will remain in memory. */
|
|
45
|
+
cacheTime: number;
|
|
46
|
+
/** Chain for the client. */
|
|
47
|
+
chain: chain;
|
|
48
|
+
/** A key for the client. */
|
|
49
|
+
key: string;
|
|
50
|
+
/** A name for the client. */
|
|
51
|
+
name: string;
|
|
52
|
+
/** Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. */
|
|
53
|
+
pollingInterval: number;
|
|
54
|
+
/** Request function wrapped with friendly error handling */
|
|
55
|
+
request: BtcRpcRequestFn<rpcSchema extends undefined ? BitcoinRpcMethods : rpcSchema>;
|
|
56
|
+
/** The RPC transport */
|
|
57
|
+
transport: ReturnType<transport>["config"] & ReturnType<transport>["value"];
|
|
58
|
+
/** The type of client. */
|
|
59
|
+
type: string;
|
|
60
|
+
/** A unique ID for the client. */
|
|
46
61
|
uid: string;
|
|
47
62
|
};
|
|
48
|
-
type Extended = Prettify<{ [_ in keyof Client_Base]?: undefined } & {
|
|
63
|
+
type Extended = Prettify<{ [_ in keyof Client_Base]?: undefined; } & {
|
|
49
64
|
[key: string]: unknown;
|
|
50
65
|
}>;
|
|
51
|
-
type CreateClientErrorType = ErrorType;
|
|
66
|
+
export type CreateClientErrorType = ErrorType;
|
|
52
67
|
//#endregion
|
|
53
|
-
export { Client, ClientConfig, CreateClientErrorType };
|
|
54
68
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","names":[],"sources":["../../../src/types/client.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","names":[],"sources":["../../../src/types/client.ts"],"mappings":";;;;;;;;;YAUY,aACV,kBAAkB,YAAY,WAC9B,cAAc,oBAAoB,mBAClC,yBAAyB,UAAU,sBAC/B,UACA,qBAEJ,kBAAkB;;EAGlB,UAAU,mBAAmB,UAAU;;;;;EAKvC;;EAEA,QAAQ,oBAAoB;;EAE5B;;EAEA;;;;;EAKA;;;;EAIA,YAAY;;EAEZ,WAAW;;EAEX;;YAKU,OACV,kBAAkB,YAAY,WAC9B,cAAc,oBAAoB,mBAClC,gBAAgB,sBAAsB,qBACtC,kBAAkB,mCAClB,iBAAiB,uBAAuB,wBACtC,YAAY,WAAW,OAAO,SAAS,cACxC,iBAAiB,WAAW;EAC3B,eAAe,eAAe,UAC5B,KACE,QAAQ,OAAO,WAAW,OAAO,SAAS,WAAW,cAClD,WACF,OACH,WACA,OACA,SACA,WACA,SAAS,WAAW,iBAAiB,WAAW;;KAIjD,YACH,kBAAkB,YAAY,WAC9B,cAAc,oBAAoB,mBAClC,gBAAgB,sBAAsB,qBACtC,kBAAkB;;EAGlB,SAAS;;EAET;;EAEA,OAAO;;EAEP;;EAEA;;EAEA;;EAEA,SAAS,gBACP,8BAA8B,oBAAoB;;EAGpD,WAAW,WAAW,uBAAuB,WAAW;;EAExD;;EAEA;;KAGG,WAAW,YAEX,WAAW;;;YAIJ,wBAAwB"}
|
package/dist/esm/types/hash.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.d.ts","names":[],"sources":["../../../src/types/hash.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"hash.d.ts","names":[],"sources":["../../../src/types/hash.ts"],"mappings":";YAAY"}
|
|
@@ -1,34 +1,38 @@
|
|
|
1
1
|
import { OneOf } from "./utils.js";
|
|
2
2
|
import { UTXOMethod } from "../transports/types.js";
|
|
3
3
|
import { ErrorType } from "../errors/utils.js";
|
|
4
|
-
|
|
5
4
|
//#region src/types/request.d.ts
|
|
6
|
-
type RpcSchema = readonly {
|
|
5
|
+
export type RpcSchema = readonly {
|
|
7
6
|
Method: string;
|
|
8
7
|
Parameters?: unknown | undefined;
|
|
9
8
|
ReturnType: unknown;
|
|
10
9
|
}[];
|
|
11
|
-
type RpcSchemaOverride = Omit<RpcSchema[number], "Method">;
|
|
10
|
+
export type RpcSchemaOverride = Omit<RpcSchema[number], "Method">;
|
|
12
11
|
type DerivedRpcSchema<rpcSchema extends RpcSchema | undefined> = rpcSchema extends RpcSchema ? rpcSchema : never;
|
|
13
|
-
type RpcParameters<rpcSchema extends RpcSchema | undefined = undefined> = rpcSchema extends RpcSchema ? { [K in keyof rpcSchema]: rpcSchema[K] extends RpcSchema[number] ? {
|
|
12
|
+
export type RpcParameters<rpcSchema extends RpcSchema | undefined = undefined> = rpcSchema extends RpcSchema ? { [K in keyof rpcSchema]: rpcSchema[K] extends RpcSchema[number] ? {
|
|
14
13
|
method: rpcSchema[K]["Method"];
|
|
15
14
|
params: rpcSchema[K]["Parameters"];
|
|
16
|
-
} : never }[number] : {
|
|
15
|
+
} : never; }[number] : {
|
|
17
16
|
method: string;
|
|
18
17
|
params?: unknown | undefined;
|
|
19
18
|
};
|
|
20
|
-
type BtcRpcRequestOptions = {
|
|
21
|
-
/** Deduplicate in-flight requests. */
|
|
19
|
+
export type BtcRpcRequestOptions = {
|
|
20
|
+
/** Deduplicate in-flight requests. */
|
|
21
|
+
dedupe?: boolean | undefined;
|
|
22
|
+
/** Methods to include or exclude from executing RPC requests. */
|
|
22
23
|
methods?: OneOf<{
|
|
23
24
|
include?: UTXOMethod[] | undefined;
|
|
24
25
|
} | {
|
|
25
26
|
exclude?: UTXOMethod[] | undefined;
|
|
26
|
-
}> | undefined;
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
}> | undefined;
|
|
28
|
+
/** The base delay (in ms) between retries. */
|
|
29
|
+
retryDelay?: number | undefined;
|
|
30
|
+
/** The max number of times to retry. */
|
|
31
|
+
retryCount?: number | undefined;
|
|
32
|
+
/** Unique identifier for the request. */
|
|
29
33
|
uid?: string | undefined;
|
|
30
34
|
};
|
|
31
|
-
type BtcRpcRequestFn<rpcSchema extends RpcSchema | undefined = undefined, raw extends boolean = false> = <_parameters extends RpcParameters<DerivedRpcSchema<rpcSchema>> = RpcParameters<DerivedRpcSchema<rpcSchema>>, _returnType =
|
|
35
|
+
export type BtcRpcRequestFn<rpcSchema extends RpcSchema | undefined = undefined, raw extends boolean = false> = <_parameters extends RpcParameters<DerivedRpcSchema<rpcSchema>> = RpcParameters<DerivedRpcSchema<rpcSchema>>, _returnType = DerivedRpcSchema<rpcSchema> extends RpcSchema ? raw extends true ? OneOf<{
|
|
32
36
|
result: Extract<DerivedRpcSchema<rpcSchema>[number], {
|
|
33
37
|
Method: _parameters["method"];
|
|
34
38
|
}>["ReturnType"];
|
|
@@ -40,7 +44,6 @@ type BtcRpcRequestFn<rpcSchema extends RpcSchema | undefined = undefined, raw ex
|
|
|
40
44
|
result: unknown;
|
|
41
45
|
} | {
|
|
42
46
|
error: ErrorType;
|
|
43
|
-
}> : unknown
|
|
47
|
+
}> : unknown>(args: _parameters, options?: BtcRpcRequestOptions | undefined) => Promise<_returnType>;
|
|
44
48
|
//#endregion
|
|
45
|
-
export { BtcRpcRequestFn, BtcRpcRequestOptions, RpcParameters, RpcSchema, RpcSchemaOverride };
|
|
46
49
|
//# sourceMappingURL=request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","names":[],"sources":["../../../src/types/request.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"request.d.ts","names":[],"sources":["../../../src/types/request.ts"],"mappings":";;;;YAIY;EACV;EACA;EACA;;YAGU,oBAAoB,KAAK;KAEhC,iBAAiB,kBAAkB,yBACtC,kBAAkB,YAAY;YAEpB,cAAc,kBAAkB,qCAC1C,kBAAkB,eAEX,WAAW,YAAY,UAAU,WAAW;EAEvC,QAAQ,UAAU;EAClB,QAAQ,UAAU;;EAKxB;EACA;;YAGI;;EAEV;;EAEA,UACI;IAEM,UAAU;;IAGV,UAAU;;;EAKpB;;EAEA;;EAEA;;YAGU,gBACV,kBAAkB,mCAClB,gCAEA,oBAAoB,cAClB,iBAAiB,cACf,cAAc,iBAAiB,aACnC,cAAc,iBAAiB,mBAAmB,YAC9C,mBACE;EAEM,QAAQ,QACN,iBAAiB;IACf,QAAQ;;;EAGZ,OAAO;KAEb,QACE,iBAAiB;EACf,QAAQ;mBAEd,mBACE;EAEM;;EAGA,OAAO;cAKnB,MAAM,aACN,UAAU,qCACP,QAAQ"}
|
package/dist/esm/types/rpc.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
//#region src/types/rpc.d.ts
|
|
2
|
-
type RpcRequest = {
|
|
2
|
+
export type RpcRequest = {
|
|
3
3
|
jsonrpc?: "2.0" | undefined;
|
|
4
4
|
method: string;
|
|
5
5
|
params?: any | undefined;
|
|
6
6
|
id?: number | undefined;
|
|
7
7
|
};
|
|
8
|
-
type RpcResponse<result = any, error = any> = {
|
|
8
|
+
export type RpcResponse<result = any, error = any> = {
|
|
9
9
|
jsonrpc: `${number}`;
|
|
10
10
|
id: number;
|
|
11
11
|
} & (SuccessResult<result> | ErrorResult<error>);
|
|
@@ -19,8 +19,8 @@ type ErrorResult<error> = {
|
|
|
19
19
|
result?: undefined;
|
|
20
20
|
error: error;
|
|
21
21
|
};
|
|
22
|
-
type BitcoinRpcMethods = [...WalletRpcSchema];
|
|
23
|
-
type WalletRpcSchema = [{
|
|
22
|
+
export type BitcoinRpcMethods = [...WalletRpcSchema];
|
|
23
|
+
export type WalletRpcSchema = [{
|
|
24
24
|
Method: "getAddressInfo";
|
|
25
25
|
Parameters?: undefined;
|
|
26
26
|
ReturnType: string;
|
|
@@ -30,5 +30,4 @@ type WalletRpcSchema = [{
|
|
|
30
30
|
ReturnType: bigint;
|
|
31
31
|
}];
|
|
32
32
|
//#endregion
|
|
33
|
-
export { BitcoinRpcMethods, RpcRequest, RpcResponse, WalletRpcSchema };
|
|
34
33
|
//# sourceMappingURL=rpc.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.d.ts","names":[],"sources":["../../../src/types/rpc.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"rpc.d.ts","names":[],"sources":["../../../src/types/rpc.ts"],"mappings":";YAAY;EACV;EACA;EACA;EACA;;YAGU,YAAY,cAAc;EACpC;EACA;KACG,cAAc,UAAU,YAAY;KAEpC,cAAc;EACjB;EACA,QAAQ;EACR;;KAEG,YAAY;EACf;EACA;EACA,OAAO;;YAGG,wBAAwB;YAExB;EAER;EACA;EACA;;EAGA;EACA;EACA"}
|