Skip to content

Commit

Permalink
renaming + delete unused tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Z4karia committed Sep 25, 2024
1 parent e1c0890 commit bb0bb3b
Show file tree
Hide file tree
Showing 17 changed files with 244 additions and 681 deletions.
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ For a smooth and quick integration:
#### Table of Contents

* [bippath](#bippath)
* [Acre](#btc)
* [Acre](#acre)
* [Parameters](#parameters)
* [Examples](#examples)
* [getWalletXpub](#getwalletxpub)
Expand All @@ -55,7 +55,7 @@ For a smooth and quick integration:
* [Parameters](#parameters-8)
* [getTrustedInputBIP143](#gettrustedinputbip143)
* [Parameters](#parameters-9)
* [BtcNew](#btcnew)
* [AcreBtcNew](#acrebtcnew)
* [getWalletXpub](#getwalletxpub-1)
* [Parameters](#parameters-10)
* [getWalletPublicKey](#getwalletpublickey-1)
Expand All @@ -68,7 +68,7 @@ For a smooth and quick integration:
* [Parameters](#parameters-14)
* [descrTemplFrom](#descrtemplfrom)
* [Parameters](#parameters-15)
* [BtcOld](#btcold)
* [AcreBtcOld](#acrebtcold)
* [getWalletPublicKey](#getwalletpublickey-2)
* [Parameters](#parameters-16)
* [Examples](#examples-7)
Expand Down Expand Up @@ -144,7 +144,7 @@ Acre app API.

```javascript
import Acre from "@blooo/hw-app-acre:";
const btc = new Acre({ transport, currency: "bitcoin" });
const acre = new Acre({ transport, currency: "bitcoin" });
```

#### getWalletXpub
Expand Down Expand Up @@ -181,8 +181,8 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
##### Examples

```javascript
btc.getWalletPublicKey("44'/0'/0'/0/0").then(o => o.bitcoinAddress)
btc.getWalletPublicKey("49'/0'/0'/0/0", { format: "p2sh" }).then(o => o.bitcoinAddress)
acre.getWalletPublicKey("44'/0'/0'/0/0").then(o => o.bitcoinAddress)
acre.getWalletPublicKey("49'/0'/0'/0/0", { format: "p2sh" }).then(o => o.bitcoinAddress)
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{publicKey: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), bitcoinAddress: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), chainCode: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}>**&#x20;
Expand All @@ -199,7 +199,7 @@ You can sign a message according to the Bitcoin Signature format and retrieve v,
##### Examples

```javascript
btc.signMessage("44'/60'/0'/0'/0", Buffer.from("test").toString("hex")).then(function(result) {
acre.signMessage("44'/60'/0'/0'/0", Buffer.from("test").toString("hex")).then(function(result) {
var v = result['v'] + 27 + 4;
var signature = Buffer.from(v.toString(16) + result['r'] + result['s'], 'hex').toString('base64');
console.log("Signature : " + signature);
Expand Down Expand Up @@ -239,7 +239,7 @@ To sign a transaction involving standard (P2PKH) inputs, call createTransaction
##### Examples

```javascript
btc.createTransaction({
acre.createTransaction({
inputs: [ [tx1, 1] ],
associatedKeysets: ["0'/0/0"],
outputScriptHex: "01905f0100000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88ac"
Expand Down Expand Up @@ -267,7 +267,7 @@ To obtain the signature of multisignature (P2SH) inputs, call signP2SHTransactio
##### Examples

```javascript
btc.signP2SHTransaction({
acre.signP2SHTransaction({
inputs: [ [tx, 1, "52210289b4a3ad52a919abd2bdd6920d8a6879b1e788c38aa76f0440a6f32a9f1996d02103a3393b1439d1693b063482c04bd40142db97bdf139eedd1b51ffb7070a37eac321030b9a409a1e476b0d5d17b804fcdb81cf30f9b99c6f3ae1178206e08bc500639853ae"] ],
associatedKeysets: ["0'/0/0"],
outputScriptHex: "01905f0100000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88ac"
Expand All @@ -290,7 +290,7 @@ For each UTXO included in your transaction, create a transaction object from the
##### Examples

```javascript
const tx1 = btc.splitTransaction("01000000014ea60aeac5252c14291d428915bd7ccd1bfc4af009f4d4dc57ae597ed0420b71010000008a47304402201f36a12c240dbf9e566bc04321050b1984cd6eaf6caee8f02bb0bfec08e3354b022012ee2aeadcbbfd1e92959f57c15c1c6debb757b798451b104665aa3010569b49014104090b15bde569386734abf2a2b99f9ca6a50656627e77de663ca7325702769986cf26cc9dd7fdea0af432c8e2becc867c932e1b9dd742f2a108997c2252e2bdebffffffff0281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88aca0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac00000000");
const tx1 = acre.splitTransaction("01000000014ea60aeac5252c14291d428915bd7ccd1bfc4af009f4d4dc57ae597ed0420b71010000008a47304402201f36a12c240dbf9e566bc04321050b1984cd6eaf6caee8f02bb0bfec08e3354b022012ee2aeadcbbfd1e92959f57c15c1c6debb757b798451b104665aa3010569b49014104090b15bde569386734abf2a2b99f9ca6a50656627e77de663ca7325702769986cf26cc9dd7fdea0af432c8e2becc867c932e1b9dd742f2a108997c2252e2bdebffffffff0281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88aca0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac00000000");
```

Returns **[Transaction](#transaction)** the transaction object deserialized from the raw hexadecimal transaction
Expand All @@ -306,8 +306,8 @@ Serialize a transaction's outputs to hexadecimal
##### Examples

```javascript
const tx1 = btc.splitTransaction("01000000014ea60aeac5252c14291d428915bd7ccd1bfc4af009f4d4dc57ae597ed0420b71010000008a47304402201f36a12c240dbf9e566bc04321050b1984cd6eaf6caee8f02bb0bfec08e3354b022012ee2aeadcbbfd1e92959f57c15c1c6debb757b798451b104665aa3010569b49014104090b15bde569386734abf2a2b99f9ca6a50656627e77de663ca7325702769986cf26cc9dd7fdea0af432c8e2becc867c932e1b9dd742f2a108997c2252e2bdebffffffff0281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88aca0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac00000000");
const outputScript = btc.serializeTransactionOutputs(tx1).toString('hex');
const tx1 = acre.splitTransaction("01000000014ea60aeac5252c14291d428915bd7ccd1bfc4af009f4d4dc57ae597ed0420b71010000008a47304402201f36a12c240dbf9e566bc04321050b1984cd6eaf6caee8f02bb0bfec08e3354b022012ee2aeadcbbfd1e92959f57c15c1c6debb757b798451b104665aa3010569b49014104090b15bde569386734abf2a2b99f9ca6a50656627e77de663ca7325702769986cf26cc9dd7fdea0af432c8e2becc867c932e1b9dd742f2a108997c2252e2bdebffffffff0281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88aca0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac00000000");
const outputScript = acre.serializeTransactionOutputs(tx1).toString('hex');
```

Returns **[Buffer](https://nodejs.org/api/buffer.html)**&#x20;
Expand Down Expand Up @@ -338,15 +338,15 @@ Trusted input is the hash of a UTXO that needs to be signed. BIP143 is used for

Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;

### BtcNew
### AcreBtcNew

This class implements the same interface as BtcOld (formerly
This class implements the same interface as AcreBtcOld (formerly
named Btc), but interacts with Acre hardware app from version 1.0.0
which uses the same APDU protocol as the Bitcoin app version 2.1.0+.
This protocol is documented at
<https://github.com/blooo-io/app-acre/blob/develop/doc/acre.md>

Since the interface must remain compatible with BtcOld, the methods
Since the interface must remain compatible with AcreBtcOld, the methods
of this class are quite clunky, because it needs to adapt legacy
input data into the PSBT process.

Expand Down Expand Up @@ -462,7 +462,7 @@ the bitcoin descriptor template.

Returns **DefaultDescriptorTemplate**&#x20;

### BtcOld
### AcreBtcOld

This Bitcoin old API is compatible with versions of the Bitcoin nano app that are earlier than 2.1.0

Expand All @@ -487,8 +487,8 @@ This Bitcoin old API is compatible with versions of the Bitcoin nano app that ar
##### Examples

```javascript
btc.getWalletPublicKey("44'/0'/0'/0/0").then(o => o.bitcoinAddress)
btc.getWalletPublicKey("49'/0'/0'/0/0", { format: "p2sh" }).then(o => o.bitcoinAddress)
acre.getWalletPublicKey("44'/0'/0'/0/0").then(o => o.bitcoinAddress)
acre.getWalletPublicKey("49'/0'/0'/0/0", { format: "p2sh" }).then(o => o.bitcoinAddress)
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<{publicKey: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), bitcoinAddress: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), chainCode: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}>**&#x20;
Expand Down Expand Up @@ -523,7 +523,7 @@ To sign a transaction involving standard (P2PKH) inputs, call createTransaction
##### Examples

```javascript
btc.createTransaction({
acre.createTransaction({
inputs: [ [tx1, 1] ],
associatedKeysets: ["0'/0/0"],
outputScriptHex: "01905f0100000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88ac"
Expand Down Expand Up @@ -827,8 +827,8 @@ complemantary fields as needed in the future.
#### Examples

```javascript
const tx1 = btc.splitTransaction("01000000014ea60aeac5252c14291d428915bd7ccd1bfc4af009f4d4dc57ae597ed0420b71010000008a47304402201f36a12c240dbf9e566bc04321050b1984cd6eaf6caee8f02bb0bfec08e3354b022012ee2aeadcbbfd1e92959f57c15c1c6debb757b798451b104665aa3010569b49014104090b15bde569386734abf2a2b99f9ca6a50656627e77de663ca7325702769986cf26cc9dd7fdea0af432c8e2becc867c932e1b9dd742f2a108997c2252e2bdebffffffff0281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88aca0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac00000000");
const outputScript = btc.serializeTransactionOutputs(tx1).toString('hex');
const tx1 = acre.splitTransaction("01000000014ea60aeac5252c14291d428915bd7ccd1bfc4af009f4d4dc57ae597ed0420b71010000008a47304402201f36a12c240dbf9e566bc04321050b1984cd6eaf6caee8f02bb0bfec08e3354b022012ee2aeadcbbfd1e92959f57c15c1c6debb757b798451b104665aa3010569b49014104090b15bde569386734abf2a2b99f9ca6a50656627e77de663ca7325702769986cf26cc9dd7fdea0af432c8e2becc867c932e1b9dd742f2a108997c2252e2bdebffffffff0281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88aca0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac00000000");
const outputScript = acre.serializeTransactionOutputs(tx1).toString('hex');
```

Returns **[Buffer](https://nodejs.org/api/buffer.html)**&#x20;
Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
collectCoverage: true,
testPathIgnorePatterns: ["packages/*/lib-es", "packages/*/lib"],
coveragePathIgnorePatterns: ["packages/create-dapp"],
testMatch: ["**/tests/newops/BtcNew.test.ts"],
testMatch: ["**/tests/newops/AcreBtcNew.test.ts"],
passWithNoTests: true,
// collectCoverageFrom: ["packages/**/src/*.ts"],
rootDir: __dirname,
Expand Down
41 changes: 20 additions & 21 deletions src/Acre.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import semver from "semver";
import type Transport from "@ledgerhq/hw-transport";
import BtcNew from "./BtcNew";
import BtcOld from "./BtcOld";
import AcreBtcNew from "./AcreBtcNew";
import AcreBtcOld from "./AcreBtcOld";
import type { CreateTransactionArg } from "./createTransaction";
import { getTrustedInput } from "./getTrustedInput";
import { getTrustedInputBIP143 } from "./getTrustedInputBIP143";
Expand All @@ -23,15 +23,15 @@ import { checkIsBtcLegacy, getAppAndVersion } from "./getAppAndVersion";
* @param currency The currency to use, defaults to "bitcoin".
* @example
* import Acre from "@blooo/hw-app-acre:";
* const btc = new Acre({ transport, currency: "bitcoin" });
* const acre = new Acre({ transport, currency: "bitcoin" });
*/

export default class Acre {
// Transport instance
private _transport: Transport;
// The specific implementation used, determined by the nano app and its version.
// It chooses between BtcNew (new interface) and BtcOld (old interface).
private _impl: BtcOld | BtcNew;
// It chooses between AcreBtcNew (current acre interface) and AcreBtcOld (old bitcoin interface).
private _impl: AcreBtcOld | AcreBtcNew;
constructor({
transport,
scrambleKey = "BTC",
Expand Down Expand Up @@ -62,10 +62,10 @@ export default class Acre {
case "bitcoin_testnet":
case "qtum":
// new APDU (nano app API) for currencies using app-bitcoin-new implementation
return new BtcNew(new AppClient(this._transport));
return new AcreBtcNew(new AppClient(this._transport));
default:
// old APDU (legacy API) for currencies using legacy bitcoin app implementation
return new BtcOld(this._transport);
return new AcreBtcOld(this._transport);
}
})();
}
Expand Down Expand Up @@ -106,8 +106,8 @@ export default class Acre {
* - cashaddr in case of Bitcoin Cash
*
* @example
* btc.getWalletPublicKey("44'/0'/0'/0/0").then(o => o.bitcoinAddress)
* btc.getWalletPublicKey("49'/0'/0'/0/0", { format: "p2sh" }).then(o => o.bitcoinAddress)
* acre.getWalletPublicKey("44'/0'/0'/0/0").then(o => o.bitcoinAddress)
* acre.getWalletPublicKey("49'/0'/0'/0/0", { format: "p2sh" }).then(o => o.bitcoinAddress)
*/
getWalletPublicKey(
path: string,
Expand All @@ -123,7 +123,7 @@ export default class Acre {
let options;
if (arguments.length > 2 || typeof opts === "boolean") {
console.warn(
"btc.getWalletPublicKey deprecated signature used. Please switch to getWalletPublicKey(path, { format, verify })",
"acre.getWalletPublicKey deprecated signature used. Please switch to getWalletPublicKey(path, { format, verify })",
);
options = {
verify: !!opts,
Expand All @@ -141,7 +141,7 @@ export default class Acre {
/**
* You can sign a message according to the Bitcoin Signature format and retrieve v, r, s given the message and the BIP 32 path of the account to sign.
* @example
btc.signMessage("44'/60'/0'/0'/0", Buffer.from("test").toString("hex")).then(function(result) {
acre.signMessage("44'/60'/0'/0'/0", Buffer.from("test").toString("hex")).then(function(result) {
var v = result['v'] + 27 + 4;
var signature = Buffer.from(v.toString(16) + result['r'] + result['s'], 'hex').toString('base64');
console.log("Signature : " + signature);
Expand Down Expand Up @@ -179,7 +179,7 @@ export default class Acre {
nonce: "0xC",
};
const path = "m/44'/0'/0'/0/0";
const result = await btc.signWithdrawal({path: path, withdrawalData: withdrawalData});
const result = await acre.signWithdrawal({path: path, withdrawalData: withdrawalData});
*/
signWithdrawal(
path: string,
Expand Down Expand Up @@ -225,7 +225,7 @@ export default class Acre {
* @param useTrustedInputForSegwit trust inputs for segwit transactions. If app version >= 1.4.0 this should be true.
* @return the signed transaction ready to be broadcast
* @example
btc.createTransaction({
acre.createTransaction({
inputs: [ [tx1, 1] ],
associatedKeysets: ["0'/0/0"],
outputScriptHex: "01905f0100000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88ac"
Expand Down Expand Up @@ -255,7 +255,7 @@ export default class Acre {
* @param sigHashType is the hash type of the transaction to sign, or default (all)
* @return the signed transaction ready to be broadcast
* @example
btc.signP2SHTransaction({
acre.signP2SHTransaction({
inputs: [ [tx, 1, "52210289b4a3ad52a919abd2bdd6920d8a6879b1e788c38aa76f0440a6f32a9f1996d02103a3393b1439d1693b063482c04bd40142db97bdf139eedd1b51ffb7070a37eac321030b9a409a1e476b0d5d17b804fcdb81cf30f9b99c6f3ae1178206e08bc500639853ae"] ],
associatedKeysets: ["0'/0/0"],
outputScriptHex: "01905f0100000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88ac"
Expand All @@ -273,7 +273,7 @@ export default class Acre {
* @param additionals list of additionnal options
* @return the transaction object deserialized from the raw hexadecimal transaction
* @example
const tx1 = btc.splitTransaction("01000000014ea60aeac5252c14291d428915bd7ccd1bfc4af009f4d4dc57ae597ed0420b71010000008a47304402201f36a12c240dbf9e566bc04321050b1984cd6eaf6caee8f02bb0bfec08e3354b022012ee2aeadcbbfd1e92959f57c15c1c6debb757b798451b104665aa3010569b49014104090b15bde569386734abf2a2b99f9ca6a50656627e77de663ca7325702769986cf26cc9dd7fdea0af432c8e2becc867c932e1b9dd742f2a108997c2252e2bdebffffffff0281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88aca0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac00000000");
const tx1 = acre.splitTransaction("01000000014ea60aeac5252c14291d428915bd7ccd1bfc4af009f4d4dc57ae597ed0420b71010000008a47304402201f36a12c240dbf9e566bc04321050b1984cd6eaf6caee8f02bb0bfec08e3354b022012ee2aeadcbbfd1e92959f57c15c1c6debb757b798451b104665aa3010569b49014104090b15bde569386734abf2a2b99f9ca6a50656627e77de663ca7325702769986cf26cc9dd7fdea0af432c8e2becc867c932e1b9dd742f2a108997c2252e2bdebffffffff0281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88aca0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac00000000");
*/
splitTransaction(
transactionHex: string,
Expand All @@ -287,8 +287,8 @@ export default class Acre {
/**
* Serialize a transaction's outputs to hexadecimal
* @example
const tx1 = btc.splitTransaction("01000000014ea60aeac5252c14291d428915bd7ccd1bfc4af009f4d4dc57ae597ed0420b71010000008a47304402201f36a12c240dbf9e566bc04321050b1984cd6eaf6caee8f02bb0bfec08e3354b022012ee2aeadcbbfd1e92959f57c15c1c6debb757b798451b104665aa3010569b49014104090b15bde569386734abf2a2b99f9ca6a50656627e77de663ca7325702769986cf26cc9dd7fdea0af432c8e2becc867c932e1b9dd742f2a108997c2252e2bdebffffffff0281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88aca0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac00000000");
const outputScript = btc.serializeTransactionOutputs(tx1).toString('hex');
const tx1 = acre.splitTransaction("01000000014ea60aeac5252c14291d428915bd7ccd1bfc4af009f4d4dc57ae597ed0420b71010000008a47304402201f36a12c240dbf9e566bc04321050b1984cd6eaf6caee8f02bb0bfec08e3354b022012ee2aeadcbbfd1e92959f57c15c1c6debb757b798451b104665aa3010569b49014104090b15bde569386734abf2a2b99f9ca6a50656627e77de663ca7325702769986cf26cc9dd7fdea0af432c8e2becc867c932e1b9dd742f2a108997c2252e2bdebffffffff0281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88aca0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac00000000");
const outputScript = acre.serializeTransactionOutputs(tx1).toString('hex');
*/
serializeTransactionOutputs(t: Transaction): Buffer {
return serializeTransactionOutputs(t);
Expand Down Expand Up @@ -318,9 +318,8 @@ export default class Acre {
return getTrustedInputBIP143(this._transport, indexLookup, transaction, additionals);
}

async changeImplIfNecessary(): Promise<BtcOld | BtcNew> {
// if BtcOld was instantiated, stick with it
if (this._impl instanceof BtcOld) return this._impl;
async changeImplIfNecessary(): Promise<AcreBtcOld | AcreBtcNew> {
if (this._impl instanceof AcreBtcOld) return this._impl;

const { name, version } = await getAppAndVersion(this._transport);

Expand Down Expand Up @@ -353,7 +352,7 @@ export default class Acre {
})();

if (isBtcLegacy) {
this._impl = new BtcOld(this._transport);
this._impl = new AcreBtcOld(this._transport);
}
return this._impl;
}
Expand Down
10 changes: 5 additions & 5 deletions src/BtcNew.ts → src/AcreBtcNew.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ import type { Transaction, AcreWithdrawalData, AcreWithdrawalDataBuffer } from "
import { log } from "@ledgerhq/logs";

/**
* @class BtcNew
* @description This class implements the same interface as BtcOld (formerly
* @class AcreBtcNew
* @description This class implements the same interface as AcreBtcOld (formerly
* named Btc), but interacts with Bitcoin hardware app version 2.1.0+
* which uses a totally new APDU protocol. This new
* protocol is documented at
* https://github.com/LedgerHQ/app-bitcoin-new/blob/master/doc/bitcoin.md
*
* Since the interface must remain compatible with BtcOld, the methods
* Since the interface must remain compatible with AcreBtcOld, the methods
* of this class are quite clunky, because it needs to adapt legacy
* input data into the PSBT process. In the future, a new interface should
* be developed that exposes PSBT to the outer world, which would render
* a much cleaner implementation.
*
*/
export default class BtcNew {
export default class AcreBtcNew {
constructor(private client: Client) {}

/**
Expand Down Expand Up @@ -559,7 +559,7 @@ function accountTypeFromArg(
Useful resource on derivation paths: https://learnmeabitcoin.com/technical/derivation-paths
*/

//path is not deepest hardened node of a standard path or deeper, use BtcOld
//path is not deepest hardened node of a standard path or deeper, use AcreBtcOld
const H = 0x80000000; //HARDENED from bip32

const VALID_COIN_TYPES = [
Expand Down
Loading

0 comments on commit bb0bb3b

Please sign in to comment.