@xchainjs/xchain-bitcoin 0.15.11 → 0.17.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 +21 -0
- package/lib/client.d.ts +4 -1
- package/lib/haskoin-api.d.ts +12 -3
- package/lib/index.esm.js +2358 -99
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +2358 -99
- package/lib/index.js.map +1 -1
- package/lib/types/client-types.d.ts +1 -0
- package/lib/types/ledger.d.ts +1 -0
- package/lib/types/sochain-api-types.d.ts +1 -0
- package/lib/utils.d.ts +4 -3
- package/package.json +12 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
# v.0.17.0 (2022-01-05)
|
|
2
|
+
|
|
3
|
+
## Breaking change
|
|
4
|
+
|
|
5
|
+
- Make `haskoinUrl` configurable (change default haskoin url back to `https://api.haskoin.com/btc`)
|
|
6
|
+
- `haskoinUrl` needs to be passed as parameter into misc. `utils` functions
|
|
7
|
+
|
|
8
|
+
# v.0.16.0 (2021-12-29)
|
|
9
|
+
|
|
10
|
+
## Breaking change
|
|
11
|
+
|
|
12
|
+
- Add stagenet environment handling for `Network` and `BaseXChainClient` changes client to default to mainnet values until stagenet is configured.
|
|
13
|
+
|
|
14
|
+
# v.0.15.13 (2021-11-12)
|
|
15
|
+
|
|
16
|
+
- updated haskoin api URL
|
|
17
|
+
|
|
18
|
+
# v.0.15.12 (2021-09-03)
|
|
19
|
+
|
|
20
|
+
- updated to the latest dependencies
|
|
21
|
+
|
|
1
22
|
# v.0.15.11 (2021-07-07)
|
|
2
23
|
|
|
3
24
|
- Use latest `xchain-client@0.10.1` + `xchain-util@0.3.0`
|
package/lib/client.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Address, Balance, Fee, FeeRate, Tx, TxHash, TxHistoryParams, TxParams, TxsPage, UTXOClient, XChainClientParams } from '@xchainjs/xchain-client';
|
|
2
|
+
import { ClientUrl } from './types/client-types';
|
|
2
3
|
export declare type BitcoinClientParams = XChainClientParams & {
|
|
3
4
|
sochainUrl?: string;
|
|
4
5
|
blockstreamUrl?: string;
|
|
6
|
+
haskoinUrl?: ClientUrl;
|
|
5
7
|
};
|
|
6
8
|
/**
|
|
7
9
|
* Custom Bitcoin client
|
|
@@ -9,13 +11,14 @@ export declare type BitcoinClientParams = XChainClientParams & {
|
|
|
9
11
|
declare class Client extends UTXOClient {
|
|
10
12
|
private sochainUrl;
|
|
11
13
|
private blockstreamUrl;
|
|
14
|
+
private haskoinUrl;
|
|
12
15
|
/**
|
|
13
16
|
* Constructor
|
|
14
17
|
* Client is initialised with network type
|
|
15
18
|
*
|
|
16
19
|
* @param {BitcoinClientParams} params
|
|
17
20
|
*/
|
|
18
|
-
constructor({ network, sochainUrl, blockstreamUrl, rootDerivationPaths, phrase, }: BitcoinClientParams);
|
|
21
|
+
constructor({ network, sochainUrl, blockstreamUrl, haskoinUrl, rootDerivationPaths, phrase, }: BitcoinClientParams);
|
|
19
22
|
/**
|
|
20
23
|
* Set/Update the sochain url.
|
|
21
24
|
*
|
package/lib/haskoin-api.d.ts
CHANGED
|
@@ -14,6 +14,15 @@ export declare type BalanceData = {
|
|
|
14
14
|
txs: number;
|
|
15
15
|
received: number;
|
|
16
16
|
};
|
|
17
|
-
export declare const getBalance: (address:
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
export declare const getBalance: ({ haskoinUrl, address, }: {
|
|
18
|
+
haskoinUrl: string;
|
|
19
|
+
address: string;
|
|
20
|
+
}) => Promise<BaseAmount>;
|
|
21
|
+
export declare const getUnspentTxs: ({ haskoinUrl, address, }: {
|
|
22
|
+
haskoinUrl: string;
|
|
23
|
+
address: string;
|
|
24
|
+
}) => Promise<UtxoData[]>;
|
|
25
|
+
export declare const getConfirmedUnspentTxs: ({ haskoinUrl, address, }: {
|
|
26
|
+
haskoinUrl: string;
|
|
27
|
+
address: string;
|
|
28
|
+
}) => Promise<UtxoData[]>;
|