From dcc4ed306c683a58f59252f27d2de61c2716fe55 Mon Sep 17 00:00:00 2001 From: Z4karia Date: Wed, 25 Sep 2024 15:01:34 +0200 Subject: [PATCH] chore: renaming --- README.md | 20 +++++++++++--------- src/Acre.ts | 6 +++--- src/AcreBtcNew.ts | 6 +++--- src/AcreBtcOld.ts | 5 +++-- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index c991b21..c05f65a 100644 --- a/README.md +++ b/README.md @@ -354,7 +354,7 @@ input data into the PSBT process. This is a new method that allow users to get an xpub at a standard path. Standard paths are described at - + This boils down to paths (N=0 for Bitcoin, N=1 for Testnet): M/44'/N'/x'/\*\* @@ -453,7 +453,7 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/ ### descrTemplFrom This function returns a descriptor template based on the address format. -See for details of +See for details of the bitcoin descriptor template. #### Parameters @@ -464,7 +464,9 @@ Returns **DefaultDescriptorTemplate** ### AcreBtcOld -This Bitcoin old API is compatible with versions of the Bitcoin nano app that are earlier than 2.1.0 +This old API is compatible with versions of the Bitcoin nano app that are earlier than 2.1.0 . +It is never used by Acre, that is based on the latest Bitcoin nano app (2.1.0+). +This class is kept for compatibility purposes. #### getWalletPublicKey @@ -656,7 +658,7 @@ Returns **[Buffer](https://nodejs.org/api/buffer.html)** The output key ### AppClient This class encapsulates the APDU protocol documented at - + #### Parameters @@ -694,7 +696,7 @@ The reason for this is the limited amount of memory available to the app, so it can't always store the full psbt in memory. The signing process is documented at - + #### Parameters @@ -702,9 +704,9 @@ The signing process is documented at ### Merkle -This class implements the merkle tree used by Ledger Bitcoin app v2+, +This class implements the merkle tree used by Ledger Acre app, which is documented at - + #### Parameters @@ -714,7 +716,7 @@ which is documented at ### MerkleMap This implements "Merkelized Maps", documented at - + A merkelized map consist of two merkle trees, one for the keys of a map and one for the values of the same map, thus the two merkle @@ -734,7 +736,7 @@ how to construct output scripts from keys. A "Wallet Policy" consists of a "Descriptor Template" and a list of "keys". A key is basically a serialized BIP32 extended public key with some added derivation path information. This is documented at - + #### Parameters diff --git a/src/Acre.ts b/src/Acre.ts index 140b049..3b785f7 100644 --- a/src/Acre.ts +++ b/src/Acre.ts @@ -17,7 +17,7 @@ import { checkIsBtcLegacy, getAppAndVersion } from "./getAppAndVersion"; /** * @class Acre - * @description Bitcoin API. + * @description Acre API. * @param transport The transport layer used for communication. * @param scrambleKey This parameter is deprecated and no longer needed. * @param currency The currency to use, defaults to "bitcoin". @@ -61,10 +61,10 @@ export default class Acre { case "bitcoin": case "bitcoin_testnet": case "qtum": - // new APDU (nano app API) for currencies using app-bitcoin-new implementation + // new APDU (nano app API) for currencies using app-acre implementation return new AcreBtcNew(new AppClient(this._transport)); default: - // old APDU (legacy API) for currencies using legacy bitcoin app implementation + // old APDU (legacy API) for currencies using legacy bitcoin app implementation (not used by acre) return new AcreBtcOld(this._transport); } })(); diff --git a/src/AcreBtcNew.ts b/src/AcreBtcNew.ts index d5765b6..6d5d184 100644 --- a/src/AcreBtcNew.ts +++ b/src/AcreBtcNew.ts @@ -33,7 +33,7 @@ import { log } from "@ledgerhq/logs"; * 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 + * https://github.com/blooo-io/app-acre/blob/develop/doc/acre.md * * Since the interface must remain compatible with AcreBtcOld, the methods * of this class are quite clunky, because it needs to adapt legacy @@ -48,7 +48,7 @@ export default class AcreBtcNew { /** * This is a new method that allow users to get an xpub at a standard path. * Standard paths are described at - * https://github.com/LedgerHQ/app-bitcoin-new/blob/master/doc/bitcoin.md#description + * https://github.com/blooo-io/app-acre/blob/develop/doc/acre.md#description * * This boils down to paths (N=0 for Bitcoin, N=1 for Testnet): * M/44'/N'/x'/** @@ -515,7 +515,7 @@ export default class AcreBtcNew { /** * This function returns a descriptor template based on the address format. - * See https://github.com/LedgerHQ/app-bitcoin-new/blob/develop/doc/wallet.md for details of + * See https://github.com/blooo-io/app-acre/blob/develop/doc/wallet.md for details of * the bitcoin descriptor template. */ function descrTemplFrom(addressFormat: AddressFormat): DefaultDescriptorTemplate { diff --git a/src/AcreBtcOld.ts b/src/AcreBtcOld.ts index 46169ad..a7f6f33 100644 --- a/src/AcreBtcOld.ts +++ b/src/AcreBtcOld.ts @@ -13,8 +13,9 @@ export type { AddressFormat }; /** * @class AcreBtcOld - * @description This Bitcoin old API is compatible with versions of the Bitcoin nano app that are earlier than 2.1.0 - * + * @description This old API is compatible with versions of the Bitcoin nano app that are earlier than 2.1.0 . + * It is never used by Acre, that is based on the latest Bitcoin nano app (2.1.0+). + * This class is kept for compatibility purposes. */ export default class AcreBtcOld {