@thorwallet/xchain-bitcoin
Advanced tools
Comparing version 0.0.1-alpha.927 to 0.0.1-alpha.928
@@ -0,1 +1,34 @@ | ||
# v.0.17.0 (2022-01-05) | ||
## Breaking change | ||
- Make `haskoinUrl` configurable (change default haskoin url back to `https://api.haskoin.com/btc`) | ||
- `haskoinUrl` needs to be passed as parameter into misc. `utils` functions | ||
# v.0.16.0 (2021-12-29) | ||
## Breaking change | ||
- Add stagenet environment handling for `Network` and `BaseXChainClient` changes client to default to mainnet values until stagenet is configured. | ||
# v.0.15.13 (2021-11-12) | ||
- updated haskoin api URL | ||
# v.0.15.12 (2021-09-03) | ||
- updated to the latest dependencies | ||
# v.0.15.11 (2021-07-07) | ||
- Use latest `xchain-client@0.10.1` + `xchain-util@0.3.0` | ||
# v.0.15.10 (2021-07-03) | ||
- refactored client methods to use regular method syntax (not fat arrow) in order for bcall to super.xxx() to work properly | ||
# v.0.15.9 (2021-06-29) | ||
- added support for pulling fees from thornode. | ||
# v.0.15.8 (2021-06-18) | ||
@@ -2,0 +35,0 @@ |
@@ -1,3 +0,3 @@ | ||
import { TxHistoryParams, TxsPage, Address, XChainClient, Tx, TxParams, TxHash, Balance, Network, Fees, XChainClientParams } from '@thorwallet/xchain-client'; | ||
import { FeesWithRates, FeeRate, FeeRates, Signature } from './types/client-types'; | ||
import { Address, Balance, Fees, Network, Tx, TxHash, TxHistoryParams, TxParams, TxsPage, XChainClient, XChainClientParams } from '@thorwallet/xchain-client'; | ||
import { ClientUrl, FeeRate, FeeRates, FeesWithRates, Signature } from './types/client-types'; | ||
/** | ||
@@ -14,2 +14,3 @@ * BitcoinClient Interface | ||
blockstreamUrl?: string; | ||
haskoinUrl?: ClientUrl; | ||
}; | ||
@@ -26,2 +27,3 @@ /** | ||
private addrCache; | ||
private haskoinUrl; | ||
/** | ||
@@ -33,3 +35,3 @@ * Constructor | ||
*/ | ||
constructor({ network, sochainUrl, blockstreamUrl, rootDerivationPaths, }: BitcoinClientParams); | ||
constructor({ network, sochainUrl, blockstreamUrl, haskoinUrl, rootDerivationPaths, }: BitcoinClientParams); | ||
/** | ||
@@ -36,0 +38,0 @@ * Set/Update the sochain url. |
@@ -17,4 +17,13 @@ import { Address } from '@thorwallet/xchain-client/lib'; | ||
}; | ||
export declare const getBalance: (address: string) => Promise<BaseAmount>; | ||
export declare const getUnspentTxs: (address: string) => Promise<UtxoData[]>; | ||
export declare const getConfirmedUnspentTxs: (address: string) => Promise<UtxoData[]>; | ||
export declare const getBalance: ({ haskoinUrl, address, }: { | ||
haskoinUrl: string; | ||
address: string; | ||
}) => Promise<BaseAmount>; | ||
export declare const getUnspentTxs: ({ haskoinUrl, address, }: { | ||
haskoinUrl: string; | ||
address: string; | ||
}) => Promise<UtxoData[]>; | ||
export declare const getConfirmedUnspentTxs: ({ haskoinUrl, address, }: { | ||
haskoinUrl: string; | ||
address: string; | ||
}) => Promise<UtxoData[]>; |
@@ -26,1 +26,2 @@ import { Address, FeeOptionKey, Fees, Network } from '@thorwallet/xchain-client'; | ||
}; | ||
export declare type ClientUrl = Record<Network, string>; |
@@ -13,2 +13,3 @@ import { Address, Network, TxParams } from '@thorwallet/xchain-client'; | ||
sochainUrl: string; | ||
haskoinUrl: string; | ||
}; |
@@ -89,2 +89,3 @@ import { Network, TxHash } from '@thorwallet/xchain-client'; | ||
sochainUrl: string; | ||
haskoinUrl: string; | ||
network: Network; | ||
@@ -91,0 +92,0 @@ address: string; |
@@ -7,3 +7,3 @@ /// <reference types="node" /> | ||
import { FeeRate, FeesWithRates } from './types/client-types'; | ||
import { BroadcastTxParams, UTXOs } from './types/common'; | ||
import { BroadcastTxParams, UTXO, UTXOs } from './types/common'; | ||
export declare const BTC_DECIMAL = 8; | ||
@@ -55,3 +55,3 @@ /** | ||
*/ | ||
export declare const getBalance: (params: AddressParams) => Promise<Balance[]>; | ||
export declare const getBalance: (params: AddressParams, haskoinUrl: string) => Promise<Balance[]>; | ||
/** | ||
@@ -73,3 +73,3 @@ * Validate the BTC address. | ||
*/ | ||
export declare const scanUTXOs: ({ sochainUrl, network, address, confirmedOnly, }: ScanUTXOParam) => Promise<UTXOs>; | ||
export declare const scanUTXOs: ({ sochainUrl, haskoinUrl, network, address, confirmedOnly, }: ScanUTXOParam) => Promise<UTXOs>; | ||
/** | ||
@@ -81,3 +81,3 @@ * Build transcation. | ||
*/ | ||
export declare const buildTx: ({ amount, recipient, memo, feeRate, sender, network, sochainUrl, spendPendingUTXO, }: TxParams & { | ||
export declare const buildTx: ({ amount, recipient, memo, feeRate, sender, network, sochainUrl, haskoinUrl, spendPendingUTXO, }: TxParams & { | ||
feeRate: FeeRate; | ||
@@ -87,6 +87,7 @@ sender: Address; | ||
sochainUrl: string; | ||
haskoinUrl: string; | ||
spendPendingUTXO?: boolean | undefined; | ||
}) => Promise<{ | ||
psbt: Bitcoin.Psbt; | ||
utxos: UTXOs; | ||
utxos: UTXO[]; | ||
}>; | ||
@@ -93,0 +94,0 @@ /** |
{ | ||
"name": "@thorwallet/xchain-bitcoin", | ||
"version": "0.0.1-alpha.927+4371bb8", | ||
"version": "0.0.1-alpha.928+5412cb4", | ||
"description": "Custom Bitcoin client and utilities used by XChainJS clients", | ||
@@ -35,9 +35,9 @@ "keywords": [ | ||
"devDependencies": { | ||
"@thorwallet/xchain-client": "0.0.1-alpha.927+4371bb8", | ||
"@thorwallet/xchain-crypto": "0.0.1-alpha.927+4371bb8", | ||
"@thorwallet/xchain-util": "0.0.1-alpha.927+4371bb8", | ||
"@thorwallet/xchain-client": "0.0.1-alpha.928+5412cb4", | ||
"@thorwallet/xchain-crypto": "0.0.1-alpha.928+5412cb4", | ||
"@thorwallet/xchain-util": "0.0.1-alpha.928+5412cb4", | ||
"@types/bitcoinjs-lib": "^5.0.0", | ||
"@types/wif": "^2.0.1", | ||
"axios": "^0.21.0", | ||
"axios-mock-adapter": "^1.19.0", | ||
"@types/wif": "^2.0.2", | ||
"axios": "^0.21.1", | ||
"axios-mock-adapter": "^1.20.0", | ||
"bitcoinjs-lib": "^5.2.0", | ||
@@ -51,3 +51,3 @@ "coinselect": "^3.1.12", | ||
"@thorwallet/xchain-util": "0.0.1-alpha.869+49db531", | ||
"axios": "^0.21.0", | ||
"axios": "^0.21.1", | ||
"bitcoinjs-lib": "^5.2.0", | ||
@@ -60,3 +60,3 @@ "coinselect": "^3.1.12", | ||
}, | ||
"gitHead": "4371bb8c23b35cff70af106db1c72743589f1da6" | ||
"gitHead": "5412cb48308df93fda41023eb33c4c77d03d8103" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
15202618
171620