@xchainjs/xchain-bitcoin 0.21.1 → 0.21.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.esm.js +2 -48
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +2 -48
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
package/lib/index.esm.js
CHANGED
|
@@ -77994,8 +77994,8 @@ const blockstreamExplorerProviders = {
|
|
|
77994
77994
|
//======================
|
|
77995
77995
|
// sochain
|
|
77996
77996
|
//======================
|
|
77997
|
-
const testnetSochainProvider = new SochainProvider('https://sochain.com/api/v3',
|
|
77998
|
-
const mainnetSochainProvider = new SochainProvider('https://sochain.com/api/v3',
|
|
77997
|
+
const testnetSochainProvider = new SochainProvider('https://sochain.com/api/v3', 'PLACEHOLDER_APIKEY', BTCChain, AssetBTC, 8, SochainNetwork.BTCTEST);
|
|
77998
|
+
const mainnetSochainProvider = new SochainProvider('https://sochain.com/api/v3', 'PLACEHOLDER_APIKEY', BTCChain, AssetBTC, 8, SochainNetwork.BTC);
|
|
77999
77999
|
const SochainDataProviders = {
|
|
78000
78000
|
[Network.Testnet]: testnetSochainProvider,
|
|
78001
78001
|
[Network.Stagenet]: mainnetSochainProvider,
|
|
@@ -81080,43 +81080,6 @@ const btcNetwork = (network) => {
|
|
|
81080
81080
|
return src_5$1.testnet;
|
|
81081
81081
|
}
|
|
81082
81082
|
};
|
|
81083
|
-
// /**
|
|
81084
|
-
// * Get the balances of an address.
|
|
81085
|
-
// *
|
|
81086
|
-
// * @param {string} sochainUrl sochain Node URL.
|
|
81087
|
-
// * @param {Network} network
|
|
81088
|
-
// * @param {Address} address
|
|
81089
|
-
// * @returns {Balance[]} The balances of the given address.
|
|
81090
|
-
// */
|
|
81091
|
-
// export const getBalance = async ({
|
|
81092
|
-
// params,
|
|
81093
|
-
// haskoinUrl,
|
|
81094
|
-
// }: {
|
|
81095
|
-
// params: BalanceParams
|
|
81096
|
-
// haskoinUrl: string
|
|
81097
|
-
// }): Promise<Balance[]> => {
|
|
81098
|
-
// switch (params.network) {
|
|
81099
|
-
// case Network.Mainnet:
|
|
81100
|
-
// case Network.Stagenet:
|
|
81101
|
-
// return [
|
|
81102
|
-
// {
|
|
81103
|
-
// asset: AssetBTC,
|
|
81104
|
-
// amount: await haskoinApi.getBalance({
|
|
81105
|
-
// haskoinUrl,
|
|
81106
|
-
// address: params.address,
|
|
81107
|
-
// confirmedOnly: params.confirmedOnly,
|
|
81108
|
-
// }),
|
|
81109
|
-
// },
|
|
81110
|
-
// ]
|
|
81111
|
-
// case Network.Testnet:
|
|
81112
|
-
// return [
|
|
81113
|
-
// {
|
|
81114
|
-
// asset: AssetBTC,
|
|
81115
|
-
// amount: await sochain.getBalance({ ...params }),
|
|
81116
|
-
// },
|
|
81117
|
-
// ]
|
|
81118
|
-
// }
|
|
81119
|
-
// }
|
|
81120
81083
|
/**
|
|
81121
81084
|
* Validate the BTC address.
|
|
81122
81085
|
*
|
|
@@ -81133,15 +81096,6 @@ const validateAddress = (address, network) => {
|
|
|
81133
81096
|
return false;
|
|
81134
81097
|
}
|
|
81135
81098
|
};
|
|
81136
|
-
// /**
|
|
81137
|
-
// * Broadcast the transaction.
|
|
81138
|
-
// *
|
|
81139
|
-
// * @param {BroadcastTxParams} params The transaction broadcast options.
|
|
81140
|
-
// * @returns {TxHash} The transaction hash.
|
|
81141
|
-
// */
|
|
81142
|
-
// export const broadcastTx = async ({ haskoinUrl, txHex }: BroadcastTxParams): Promise<TxHash> => {
|
|
81143
|
-
// return await haskoinApi.broadcastTx({ haskoinUrl, txHex })
|
|
81144
|
-
// }
|
|
81145
81099
|
/**
|
|
81146
81100
|
* Calculate fees based on fee rate and memo.
|
|
81147
81101
|
*
|