Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xchainjs/xchain-bitcoin

Package Overview
Dependencies
Maintainers
10
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xchainjs/xchain-bitcoin - npm Package Compare versions

Comparing version 0.23.3 to 0.23.4

6

lib/client.d.ts

@@ -18,2 +18,6 @@ /// <reference types="node" />

/**
* @deprecated this function eventually will be removed use getAddressAsync instead
*/
getAddress(index?: number): Address;
/**
* Get the current address.

@@ -29,3 +33,3 @@ *

*/
getAddress(index?: number): Address;
getAddressAsync(index?: number): Promise<string>;
/**

@@ -32,0 +36,0 @@ *

28

lib/index.esm.js

@@ -188,11 +188,3 @@ import { ExplorerProvider, Network, UTXOClient, FeeOption, checkFeeBounds } from '@xchainjs/xchain-client';

/**
* Get the current address.
*
* Generates a network-specific key-pair by first converting the buffer to a Wallet-Import-Format (WIF)
* The address is then decoded into type P2WPKH and returned.
*
* @returns {Address} The current address.
*
* @throws {"Phrase must be provided"} Thrown if phrase has not been set before.
* @throws {"Address not defined"} Thrown if failed creating account from phrase.
* @deprecated this function eventually will be removed use getAddressAsync instead
*/

@@ -218,3 +210,19 @@ getAddress(index = 0) {

/**
* Get the current address.
*
* Generates a network-specific key-pair by first converting the buffer to a Wallet-Import-Format (WIF)
* The address is then decoded into type P2WPKH and returned.
*
* @returns {Address} The current address.
*
* @throws {"Phrase must be provided"} Thrown if phrase has not been set before.
* @throws {"Address not defined"} Thrown if failed creating account from phrase.
*/
getAddressAsync(index = 0) {
return __awaiter(this, void 0, void 0, function* () {
return this.getAddress(index);
});
}
/**
*
* @returns BTC asset info

@@ -319,3 +327,3 @@ */

const fromAddressIndex = (params === null || params === void 0 ? void 0 : params.walletIndex) || 0;
const { rawUnsignedTx } = yield this.prepareTx(Object.assign(Object.assign({}, params), { sender: this.getAddress(fromAddressIndex), feeRate }));
const { rawUnsignedTx } = yield this.prepareTx(Object.assign(Object.assign({}, params), { sender: yield this.getAddressAsync(fromAddressIndex), feeRate }));
const btcKeys = this.getBtcKeys(this.phrase, fromAddressIndex);

@@ -322,0 +330,0 @@ const psbt = Bitcoin.Psbt.fromBase64(rawUnsignedTx);

@@ -216,11 +216,3 @@ 'use strict';

/**
* Get the current address.
*
* Generates a network-specific key-pair by first converting the buffer to a Wallet-Import-Format (WIF)
* The address is then decoded into type P2WPKH and returned.
*
* @returns {Address} The current address.
*
* @throws {"Phrase must be provided"} Thrown if phrase has not been set before.
* @throws {"Address not defined"} Thrown if failed creating account from phrase.
* @deprecated this function eventually will be removed use getAddressAsync instead
*/

@@ -246,3 +238,19 @@ getAddress(index = 0) {

/**
* Get the current address.
*
* Generates a network-specific key-pair by first converting the buffer to a Wallet-Import-Format (WIF)
* The address is then decoded into type P2WPKH and returned.
*
* @returns {Address} The current address.
*
* @throws {"Phrase must be provided"} Thrown if phrase has not been set before.
* @throws {"Address not defined"} Thrown if failed creating account from phrase.
*/
getAddressAsync(index = 0) {
return __awaiter(this, void 0, void 0, function* () {
return this.getAddress(index);
});
}
/**
*
* @returns BTC asset info

@@ -347,3 +355,3 @@ */

const fromAddressIndex = (params === null || params === void 0 ? void 0 : params.walletIndex) || 0;
const { rawUnsignedTx } = yield this.prepareTx(Object.assign(Object.assign({}, params), { sender: this.getAddress(fromAddressIndex), feeRate }));
const { rawUnsignedTx } = yield this.prepareTx(Object.assign(Object.assign({}, params), { sender: yield this.getAddressAsync(fromAddressIndex), feeRate }));
const btcKeys = this.getBtcKeys(this.phrase, fromAddressIndex);

@@ -350,0 +358,0 @@ const psbt = Bitcoin__namespace.Psbt.fromBase64(rawUnsignedTx);

{
"name": "@xchainjs/xchain-bitcoin",
"version": "0.23.3",
"version": "0.23.4",
"description": "Custom Bitcoin client and utilities used by XChainJS clients",

@@ -37,6 +37,6 @@ "keywords": [

"@types/wif": "^2.0.2",
"@xchainjs/xchain-client": "^0.15.1",
"@xchainjs/xchain-client": "^0.15.3",
"@xchainjs/xchain-crypto": "^0.3.0",
"@xchainjs/xchain-util": "^0.13.1",
"@xchainjs/xchain-utxo-providers": "^0.2.6",
"@xchainjs/xchain-utxo-providers": "^0.2.7",
"axios": "^1.3.6",

@@ -49,6 +49,6 @@ "axios-mock-adapter": "^1.20.0",

"peerDependencies": {
"@xchainjs/xchain-client": "^0.15.1",
"@xchainjs/xchain-client": "^0.15.3",
"@xchainjs/xchain-crypto": "^0.3.0",
"@xchainjs/xchain-util": "^0.13.1",
"@xchainjs/xchain-utxo-providers": "^0.2.6",
"@xchainjs/xchain-utxo-providers": "^0.2.7",
"axios": "^1.3.6",

@@ -62,2 +62,2 @@ "bitcoinjs-lib": "5.2.0",

}
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc