@@ -28,7 +28,7 @@ For a smooth and quick integration:
28
28
#### Table of Contents
29
29
30
30
* [ bippath] ( #bippath )
31
- * [ Acre] ( #btc )
31
+ * [ Acre] ( #acre )
32
32
* [ Parameters] ( #parameters )
33
33
* [ Examples] ( #examples )
34
34
* [ getWalletXpub] ( #getwalletxpub )
@@ -55,7 +55,7 @@ For a smooth and quick integration:
55
55
* [ Parameters] ( #parameters-8 )
56
56
* [ getTrustedInputBIP143] ( #gettrustedinputbip143 )
57
57
* [ Parameters] ( #parameters-9 )
58
- * [ BtcNew ] ( #btcnew )
58
+ * [ AcreBtcNew ] ( #acrebtcnew )
59
59
* [ getWalletXpub] ( #getwalletxpub-1 )
60
60
* [ Parameters] ( #parameters-10 )
61
61
* [ getWalletPublicKey] ( #getwalletpublickey-1 )
@@ -68,7 +68,7 @@ For a smooth and quick integration:
68
68
* [ Parameters] ( #parameters-14 )
69
69
* [ descrTemplFrom] ( #descrtemplfrom )
70
70
* [ Parameters] ( #parameters-15 )
71
- * [ BtcOld ] ( #btcold )
71
+ * [ AcreBtcOld ] ( #acrebtcold )
72
72
* [ getWalletPublicKey] ( #getwalletpublickey-2 )
73
73
* [ Parameters] ( #parameters-16 )
74
74
* [ Examples] ( #examples-7 )
@@ -144,7 +144,7 @@ Acre app API.
144
144
145
145
``` javascript
146
146
import Acre from " @blooo/hw-app-acre:" ;
147
- const btc = new Acre ({ transport, currency: " bitcoin" });
147
+ const acre = new Acre ({ transport, currency: " bitcoin" });
148
148
```
149
149
150
150
#### getWalletXpub
@@ -181,8 +181,8 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
181
181
##### Examples
182
182
183
183
``` javascript
184
- btc .getWalletPublicKey (" 44'/0'/0'/0/0" ).then (o => o .bitcoinAddress )
185
- btc .getWalletPublicKey (" 49'/0'/0'/0/0" , { format: " p2sh" }).then (o => o .bitcoinAddress )
184
+ acre .getWalletPublicKey (" 44'/0'/0'/0/0" ).then (o => o .bitcoinAddress )
185
+ acre .getWalletPublicKey (" 49'/0'/0'/0/0" , { format: " p2sh" }).then (o => o .bitcoinAddress )
186
186
```
187
187
188
188
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 ) }>**   ;
@@ -199,7 +199,7 @@ You can sign a message according to the Bitcoin Signature format and retrieve v,
199
199
##### Examples
200
200
201
201
``` javascript
202
- btc .signMessage (" 44'/60'/0'/0'/0" , Buffer .from (" test" ).toString (" hex" )).then (function (result ) {
202
+ acre .signMessage (" 44'/60'/0'/0'/0" , Buffer .from (" test" ).toString (" hex" )).then (function (result ) {
203
203
var v = result[' v' ] + 27 + 4 ;
204
204
var signature = Buffer .from (v .toString (16 ) + result[' r' ] + result[' s' ], ' hex' ).toString (' base64' );
205
205
console .log (" Signature : " + signature);
@@ -239,7 +239,7 @@ To sign a transaction involving standard (P2PKH) inputs, call createTransaction
239
239
##### Examples
240
240
241
241
``` javascript
242
- btc .createTransaction ({
242
+ acre .createTransaction ({
243
243
inputs: [ [tx1, 1 ] ],
244
244
associatedKeysets: [" 0'/0/0" ],
245
245
outputScriptHex: " 01905f0100000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88ac"
@@ -267,7 +267,7 @@ To obtain the signature of multisignature (P2SH) inputs, call signP2SHTransactio
267
267
##### Examples
268
268
269
269
``` javascript
270
- btc .signP2SHTransaction ({
270
+ acre .signP2SHTransaction ({
271
271
inputs: [ [tx, 1 , " 52210289b4a3ad52a919abd2bdd6920d8a6879b1e788c38aa76f0440a6f32a9f1996d02103a3393b1439d1693b063482c04bd40142db97bdf139eedd1b51ffb7070a37eac321030b9a409a1e476b0d5d17b804fcdb81cf30f9b99c6f3ae1178206e08bc500639853ae" ] ],
272
272
associatedKeysets: [" 0'/0/0" ],
273
273
outputScriptHex: " 01905f0100000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88ac"
@@ -290,7 +290,7 @@ For each UTXO included in your transaction, create a transaction object from the
290
290
##### Examples
291
291
292
292
``` javascript
293
- const tx1 = btc .splitTransaction (" 01000000014ea60aeac5252c14291d428915bd7ccd1bfc4af009f4d4dc57ae597ed0420b71010000008a47304402201f36a12c240dbf9e566bc04321050b1984cd6eaf6caee8f02bb0bfec08e3354b022012ee2aeadcbbfd1e92959f57c15c1c6debb757b798451b104665aa3010569b49014104090b15bde569386734abf2a2b99f9ca6a50656627e77de663ca7325702769986cf26cc9dd7fdea0af432c8e2becc867c932e1b9dd742f2a108997c2252e2bdebffffffff0281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88aca0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac00000000" );
293
+ const tx1 = acre .splitTransaction (" 01000000014ea60aeac5252c14291d428915bd7ccd1bfc4af009f4d4dc57ae597ed0420b71010000008a47304402201f36a12c240dbf9e566bc04321050b1984cd6eaf6caee8f02bb0bfec08e3354b022012ee2aeadcbbfd1e92959f57c15c1c6debb757b798451b104665aa3010569b49014104090b15bde569386734abf2a2b99f9ca6a50656627e77de663ca7325702769986cf26cc9dd7fdea0af432c8e2becc867c932e1b9dd742f2a108997c2252e2bdebffffffff0281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88aca0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac00000000" );
294
294
```
295
295
296
296
Returns ** [ Transaction] ( #transaction ) ** the transaction object deserialized from the raw hexadecimal transaction
@@ -306,8 +306,8 @@ Serialize a transaction's outputs to hexadecimal
306
306
##### Examples
307
307
308
308
``` javascript
309
- const tx1 = btc .splitTransaction (" 01000000014ea60aeac5252c14291d428915bd7ccd1bfc4af009f4d4dc57ae597ed0420b71010000008a47304402201f36a12c240dbf9e566bc04321050b1984cd6eaf6caee8f02bb0bfec08e3354b022012ee2aeadcbbfd1e92959f57c15c1c6debb757b798451b104665aa3010569b49014104090b15bde569386734abf2a2b99f9ca6a50656627e77de663ca7325702769986cf26cc9dd7fdea0af432c8e2becc867c932e1b9dd742f2a108997c2252e2bdebffffffff0281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88aca0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac00000000" );
310
- const outputScript = btc .serializeTransactionOutputs (tx1).toString (' hex' );
309
+ const tx1 = acre .splitTransaction (" 01000000014ea60aeac5252c14291d428915bd7ccd1bfc4af009f4d4dc57ae597ed0420b71010000008a47304402201f36a12c240dbf9e566bc04321050b1984cd6eaf6caee8f02bb0bfec08e3354b022012ee2aeadcbbfd1e92959f57c15c1c6debb757b798451b104665aa3010569b49014104090b15bde569386734abf2a2b99f9ca6a50656627e77de663ca7325702769986cf26cc9dd7fdea0af432c8e2becc867c932e1b9dd742f2a108997c2252e2bdebffffffff0281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88aca0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac00000000" );
310
+ const outputScript = acre .serializeTransactionOutputs (tx1).toString (' hex' );
311
311
```
312
312
313
313
Returns ** [ Buffer] ( https://nodejs.org/api/buffer.html ) **   ;
@@ -338,15 +338,15 @@ Trusted input is the hash of a UTXO that needs to be signed. BIP143 is used for
338
338
339
339
Returns ** [ string] ( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String ) **   ;
340
340
341
- ### BtcNew
341
+ ### AcreBtcNew
342
342
343
- This class implements the same interface as BtcOld (formerly
343
+ This class implements the same interface as AcreBtcOld (formerly
344
344
named Btc), but interacts with Acre hardware app from version 1.0.0
345
345
which uses the same APDU protocol as the Bitcoin app version 2.1.0+.
346
346
This protocol is documented at
347
347
< https://github.com/blooo-io/app-acre/blob/develop/doc/acre.md >
348
348
349
- Since the interface must remain compatible with BtcOld , the methods
349
+ Since the interface must remain compatible with AcreBtcOld , the methods
350
350
of this class are quite clunky, because it needs to adapt legacy
351
351
input data into the PSBT process.
352
352
@@ -462,7 +462,7 @@ the bitcoin descriptor template.
462
462
463
463
Returns ** DefaultDescriptorTemplate**   ;
464
464
465
- ### BtcOld
465
+ ### AcreBtcOld
466
466
467
467
This Bitcoin old API is compatible with versions of the Bitcoin nano app that are earlier than 2.1.0
468
468
@@ -487,8 +487,8 @@ This Bitcoin old API is compatible with versions of the Bitcoin nano app that ar
487
487
##### Examples
488
488
489
489
``` javascript
490
- btc .getWalletPublicKey (" 44'/0'/0'/0/0" ).then (o => o .bitcoinAddress )
491
- btc .getWalletPublicKey (" 49'/0'/0'/0/0" , { format: " p2sh" }).then (o => o .bitcoinAddress )
490
+ acre .getWalletPublicKey (" 44'/0'/0'/0/0" ).then (o => o .bitcoinAddress )
491
+ acre .getWalletPublicKey (" 49'/0'/0'/0/0" , { format: " p2sh" }).then (o => o .bitcoinAddress )
492
492
```
493
493
494
494
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 ) }>**   ;
@@ -523,7 +523,7 @@ To sign a transaction involving standard (P2PKH) inputs, call createTransaction
523
523
##### Examples
524
524
525
525
``` javascript
526
- btc .createTransaction ({
526
+ acre .createTransaction ({
527
527
inputs: [ [tx1, 1 ] ],
528
528
associatedKeysets: [" 0'/0/0" ],
529
529
outputScriptHex: " 01905f0100000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88ac"
@@ -827,8 +827,8 @@ complemantary fields as needed in the future.
827
827
#### Examples
828
828
829
829
``` javascript
830
- const tx1 = btc .splitTransaction (" 01000000014ea60aeac5252c14291d428915bd7ccd1bfc4af009f4d4dc57ae597ed0420b71010000008a47304402201f36a12c240dbf9e566bc04321050b1984cd6eaf6caee8f02bb0bfec08e3354b022012ee2aeadcbbfd1e92959f57c15c1c6debb757b798451b104665aa3010569b49014104090b15bde569386734abf2a2b99f9ca6a50656627e77de663ca7325702769986cf26cc9dd7fdea0af432c8e2becc867c932e1b9dd742f2a108997c2252e2bdebffffffff0281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88aca0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac00000000" );
831
- const outputScript = btc .serializeTransactionOutputs (tx1).toString (' hex' );
830
+ const tx1 = acre .splitTransaction (" 01000000014ea60aeac5252c14291d428915bd7ccd1bfc4af009f4d4dc57ae597ed0420b71010000008a47304402201f36a12c240dbf9e566bc04321050b1984cd6eaf6caee8f02bb0bfec08e3354b022012ee2aeadcbbfd1e92959f57c15c1c6debb757b798451b104665aa3010569b49014104090b15bde569386734abf2a2b99f9ca6a50656627e77de663ca7325702769986cf26cc9dd7fdea0af432c8e2becc867c932e1b9dd742f2a108997c2252e2bdebffffffff0281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88aca0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac00000000" );
831
+ const outputScript = acre .serializeTransactionOutputs (tx1).toString (' hex' );
832
832
```
833
833
834
834
Returns ** [ Buffer] ( https://nodejs.org/api/buffer.html ) **   ;
0 commit comments