@bsv/sdk 1.3.16 → 1.3.19
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/dist/cjs/package.json +1 -1
- package/dist/cjs/src/transaction/chaintrackers/WhatsOnChain.js.map +1 -1
- package/dist/cjs/src/wallet/substrates/HTTPWalletJSON.js +8 -1
- package/dist/cjs/src/wallet/substrates/HTTPWalletJSON.js.map +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/src/transaction/chaintrackers/WhatsOnChain.js.map +1 -1
- package/dist/esm/src/wallet/substrates/HTTPWalletJSON.js +8 -1
- package/dist/esm/src/wallet/substrates/HTTPWalletJSON.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/src/transaction/chaintrackers/WhatsOnChain.d.ts +3 -3
- package/dist/types/src/transaction/chaintrackers/WhatsOnChain.d.ts.map +1 -1
- package/dist/types/src/wallet/substrates/HTTPWalletJSON.d.ts.map +1 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/umd/bundle.js +1 -1
- package/docs/auth.md +0 -54
- package/docs/compat.md +0 -24
- package/docs/overlay-tools.md +0 -48
- package/docs/primitives.md +0 -144
- package/docs/script.md +0 -48
- package/docs/totp.md +0 -6
- package/docs/transaction.md +4 -79
- package/docs/wallet.md +0 -24
- package/package.json +1 -1
- package/src/transaction/chaintrackers/WhatsOnChain.ts +3 -3
- package/src/wallet/substrates/HTTPWalletJSON.ts +8 -1
package/docs/transaction.md
CHANGED
|
@@ -36,10 +36,6 @@ export interface ArcConfig {
|
|
|
36
36
|
|
|
37
37
|
See also: [HttpClient](./transaction.md#interface-httpclient)
|
|
38
38
|
|
|
39
|
-
<details>
|
|
40
|
-
|
|
41
|
-
<summary>Interface ArcConfig Details</summary>
|
|
42
|
-
|
|
43
39
|
#### Property apiKey
|
|
44
40
|
|
|
45
41
|
Authentication token for the ARC API
|
|
@@ -89,8 +85,6 @@ httpClient?: HttpClient
|
|
|
89
85
|
```
|
|
90
86
|
See also: [HttpClient](./transaction.md#interface-httpclient)
|
|
91
87
|
|
|
92
|
-
</details>
|
|
93
|
-
|
|
94
88
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
95
89
|
|
|
96
90
|
---
|
|
@@ -205,10 +199,6 @@ export interface FetchOptions {
|
|
|
205
199
|
}
|
|
206
200
|
```
|
|
207
201
|
|
|
208
|
-
<details>
|
|
209
|
-
|
|
210
|
-
<summary>Interface FetchOptions Details</summary>
|
|
211
|
-
|
|
212
202
|
#### Property body
|
|
213
203
|
|
|
214
204
|
An object or null to set request's body.
|
|
@@ -233,8 +223,6 @@ A string to set request's method.
|
|
|
233
223
|
method?: string
|
|
234
224
|
```
|
|
235
225
|
|
|
236
|
-
</details>
|
|
237
|
-
|
|
238
226
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
239
227
|
|
|
240
228
|
---
|
|
@@ -250,10 +238,6 @@ export interface HttpClient {
|
|
|
250
238
|
|
|
251
239
|
See also: [HttpClientRequestOptions](./transaction.md#interface-httpclientrequestoptions), [HttpClientResponse](./transaction.md#type-httpclientresponse)
|
|
252
240
|
|
|
253
|
-
<details>
|
|
254
|
-
|
|
255
|
-
<summary>Interface HttpClient Details</summary>
|
|
256
|
-
|
|
257
241
|
#### Property request
|
|
258
242
|
|
|
259
243
|
Makes a request to the server.
|
|
@@ -263,8 +247,6 @@ request: <T = any, D = any>(url: string, options: HttpClientRequestOptions<D>) =
|
|
|
263
247
|
```
|
|
264
248
|
See also: [HttpClientRequestOptions](./transaction.md#interface-httpclientrequestoptions), [HttpClientResponse](./transaction.md#type-httpclientresponse)
|
|
265
249
|
|
|
266
|
-
</details>
|
|
267
|
-
|
|
268
250
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
269
251
|
|
|
270
252
|
---
|
|
@@ -280,10 +262,6 @@ export interface HttpClientRequestOptions<Data = any> {
|
|
|
280
262
|
}
|
|
281
263
|
```
|
|
282
264
|
|
|
283
|
-
<details>
|
|
284
|
-
|
|
285
|
-
<summary>Interface HttpClientRequestOptions Details</summary>
|
|
286
|
-
|
|
287
265
|
#### Property data
|
|
288
266
|
|
|
289
267
|
An object or null to set request's body.
|
|
@@ -308,8 +286,6 @@ A string to set request's method.
|
|
|
308
286
|
method?: string
|
|
309
287
|
```
|
|
310
288
|
|
|
311
|
-
</details>
|
|
312
|
-
|
|
313
289
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
314
290
|
|
|
315
291
|
---
|
|
@@ -442,10 +418,6 @@ export interface WhatsOnChainConfig {
|
|
|
442
418
|
|
|
443
419
|
See also: [HttpClient](./transaction.md#interface-httpclient)
|
|
444
420
|
|
|
445
|
-
<details>
|
|
446
|
-
|
|
447
|
-
<summary>Interface WhatsOnChainConfig Details</summary>
|
|
448
|
-
|
|
449
421
|
#### Property apiKey
|
|
450
422
|
|
|
451
423
|
Authentication token for the WhatsOnChain API
|
|
@@ -463,8 +435,6 @@ httpClient?: HttpClient
|
|
|
463
435
|
```
|
|
464
436
|
See also: [HttpClient](./transaction.md#interface-httpclient)
|
|
465
437
|
|
|
466
|
-
</details>
|
|
467
|
-
|
|
468
438
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
469
439
|
|
|
470
440
|
---
|
|
@@ -509,10 +479,6 @@ export default class ARC implements Broadcaster {
|
|
|
509
479
|
|
|
510
480
|
See also: [ArcConfig](./transaction.md#interface-arcconfig), [BroadcastFailure](./transaction.md#interface-broadcastfailure), [BroadcastResponse](./transaction.md#interface-broadcastresponse), [Broadcaster](./transaction.md#interface-broadcaster), [Transaction](./transaction.md#class-transaction)
|
|
511
481
|
|
|
512
|
-
<details>
|
|
513
|
-
|
|
514
|
-
<summary>Class ARC Details</summary>
|
|
515
|
-
|
|
516
482
|
#### Constructor
|
|
517
483
|
|
|
518
484
|
Constructs an instance of the ARC broadcaster.
|
|
@@ -581,8 +547,6 @@ Argument Details
|
|
|
581
547
|
+ **txs**
|
|
582
548
|
+ Array of transactions to be broadcasted.
|
|
583
549
|
|
|
584
|
-
</details>
|
|
585
|
-
|
|
586
550
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
587
551
|
|
|
588
552
|
---
|
|
@@ -633,10 +597,6 @@ export class Beef {
|
|
|
633
597
|
|
|
634
598
|
See also: [BEEF_V2](./transaction.md#variable-beef_v2), [BeefTx](./transaction.md#class-beeftx), [ChainTracker](./transaction.md#interface-chaintracker), [MerklePath](./transaction.md#class-merklepath), [Reader](./primitives.md#class-reader), [Transaction](./transaction.md#class-transaction), [Writer](./primitives.md#class-writer), [toHex](./primitives.md#variable-tohex), [verify](./compat.md#variable-verify)
|
|
635
599
|
|
|
636
|
-
<details>
|
|
637
|
-
|
|
638
|
-
<summary>Class Beef Details</summary>
|
|
639
|
-
|
|
640
600
|
#### Method addComputedLeaves
|
|
641
601
|
|
|
642
602
|
In some circumstances it may be helpful for the BUMP MerklePaths to include
|
|
@@ -990,8 +950,6 @@ Argument Details
|
|
|
990
950
|
+ **allowTxidOnly**
|
|
991
951
|
+ optional. If true, transaction txid is assumed valid
|
|
992
952
|
|
|
993
|
-
</details>
|
|
994
|
-
|
|
995
953
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
996
954
|
|
|
997
955
|
---
|
|
@@ -1031,10 +989,6 @@ export class BeefParty extends Beef {
|
|
|
1031
989
|
|
|
1032
990
|
See also: [Beef](./transaction.md#class-beef)
|
|
1033
991
|
|
|
1034
|
-
<details>
|
|
1035
|
-
|
|
1036
|
-
<summary>Class BeefParty Details</summary>
|
|
1037
|
-
|
|
1038
992
|
#### Constructor
|
|
1039
993
|
|
|
1040
994
|
```ts
|
|
@@ -1120,8 +1074,6 @@ mergeBeefFromParty(party: string, beef: number[] | Beef): void
|
|
|
1120
1074
|
```
|
|
1121
1075
|
See also: [Beef](./transaction.md#class-beef)
|
|
1122
1076
|
|
|
1123
|
-
</details>
|
|
1124
|
-
|
|
1125
1077
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1126
1078
|
|
|
1127
1079
|
---
|
|
@@ -1161,10 +1113,6 @@ export default class BeefTx {
|
|
|
1161
1113
|
|
|
1162
1114
|
See also: [Reader](./primitives.md#class-reader), [Transaction](./transaction.md#class-transaction), [Writer](./primitives.md#class-writer)
|
|
1163
1115
|
|
|
1164
|
-
<details>
|
|
1165
|
-
|
|
1166
|
-
<summary>Class BeefTx Details</summary>
|
|
1167
|
-
|
|
1168
1116
|
#### Constructor
|
|
1169
1117
|
|
|
1170
1118
|
```ts
|
|
@@ -1189,8 +1137,6 @@ Typically set by sorting transactions by proven dependency chains.
|
|
|
1189
1137
|
isValid?: boolean = undefined
|
|
1190
1138
|
```
|
|
1191
1139
|
|
|
1192
|
-
</details>
|
|
1193
|
-
|
|
1194
1140
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1195
1141
|
|
|
1196
1142
|
---
|
|
@@ -1255,10 +1201,6 @@ export default class MerklePath {
|
|
|
1255
1201
|
|
|
1256
1202
|
See also: [ChainTracker](./transaction.md#interface-chaintracker), [MerklePathLeaf](./transaction.md#interface-merklepathleaf), [Reader](./primitives.md#class-reader), [toHex](./primitives.md#variable-tohex), [verify](./compat.md#variable-verify)
|
|
1257
1203
|
|
|
1258
|
-
<details>
|
|
1259
|
-
|
|
1260
|
-
<summary>Class MerklePath Details</summary>
|
|
1261
|
-
|
|
1262
1204
|
#### Method combine
|
|
1263
1205
|
|
|
1264
1206
|
Combines this MerklePath with another to create a compound proof.
|
|
@@ -1417,8 +1359,6 @@ Argument Details
|
|
|
1417
1359
|
+ **chainTracker**
|
|
1418
1360
|
+ The ChainTracker instance used to verify the Merkle root.
|
|
1419
1361
|
|
|
1420
|
-
</details>
|
|
1421
|
-
|
|
1422
1362
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1423
1363
|
|
|
1424
1364
|
---
|
|
@@ -1452,10 +1392,6 @@ export default class SatoshisPerKilobyte implements FeeModel {
|
|
|
1452
1392
|
|
|
1453
1393
|
See also: [FeeModel](./transaction.md#interface-feemodel), [Transaction](./transaction.md#class-transaction)
|
|
1454
1394
|
|
|
1455
|
-
<details>
|
|
1456
|
-
|
|
1457
|
-
<summary>Class SatoshisPerKilobyte Details</summary>
|
|
1458
|
-
|
|
1459
1395
|
#### Constructor
|
|
1460
1396
|
|
|
1461
1397
|
Constructs an instance of the sat/kb fee model.
|
|
@@ -1487,8 +1423,6 @@ Argument Details
|
|
|
1487
1423
|
+ **tx**
|
|
1488
1424
|
+ The transaction for which a fee is to be computed.
|
|
1489
1425
|
|
|
1490
|
-
</details>
|
|
1491
|
-
|
|
1492
1426
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1493
1427
|
|
|
1494
1428
|
---
|
|
@@ -1565,10 +1499,6 @@ export default class Transaction {
|
|
|
1565
1499
|
|
|
1566
1500
|
See also: [BroadcastFailure](./transaction.md#interface-broadcastfailure), [BroadcastResponse](./transaction.md#interface-broadcastresponse), [Broadcaster](./transaction.md#interface-broadcaster), [ChainTracker](./transaction.md#interface-chaintracker), [FeeModel](./transaction.md#interface-feemodel), [MerklePath](./transaction.md#class-merklepath), [Reader](./primitives.md#class-reader), [SatoshisPerKilobyte](./transaction.md#class-satoshisperkilobyte), [TransactionInput](./transaction.md#interface-transactioninput), [TransactionOutput](./transaction.md#interface-transactionoutput), [defaultBroadcaster](./transaction.md#function-defaultbroadcaster), [defaultChainTracker](./transaction.md#function-defaultchaintracker), [sign](./compat.md#variable-sign), [toHex](./primitives.md#variable-tohex), [verify](./compat.md#variable-verify)
|
|
1567
1501
|
|
|
1568
|
-
<details>
|
|
1569
|
-
|
|
1570
|
-
<summary>Class Transaction Details</summary>
|
|
1571
|
-
|
|
1572
1502
|
#### Method addInput
|
|
1573
1503
|
|
|
1574
1504
|
Adds a new input to the transaction.
|
|
@@ -2063,8 +1993,6 @@ Example
|
|
|
2063
1993
|
tx.verify(new WhatsOnChain(), new SatoshisPerKilobyte(1))
|
|
2064
1994
|
```
|
|
2065
1995
|
|
|
2066
|
-
</details>
|
|
2067
|
-
|
|
2068
1996
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
2069
1997
|
|
|
2070
1998
|
---
|
|
@@ -2076,17 +2004,16 @@ Represents a chain tracker based on What's On Chain .
|
|
|
2076
2004
|
export default class WhatsOnChain implements ChainTracker {
|
|
2077
2005
|
readonly network: string;
|
|
2078
2006
|
readonly apiKey: string;
|
|
2007
|
+
protected readonly URL: string;
|
|
2008
|
+
protected readonly httpClient: HttpClient;
|
|
2079
2009
|
constructor(network: "main" | "test" | "stn" = "main", config: WhatsOnChainConfig = {})
|
|
2080
2010
|
async isValidRootForHeight(root: string, height: number): Promise<boolean>
|
|
2081
2011
|
async currentHeight(): Promise<number>
|
|
2012
|
+
protected getHttpHeaders(): Record<string, string>
|
|
2082
2013
|
}
|
|
2083
2014
|
```
|
|
2084
2015
|
|
|
2085
|
-
See also: [ChainTracker](./transaction.md#interface-chaintracker), [WhatsOnChainConfig](./transaction.md#interface-whatsonchainconfig)
|
|
2086
|
-
|
|
2087
|
-
<details>
|
|
2088
|
-
|
|
2089
|
-
<summary>Class WhatsOnChain Details</summary>
|
|
2016
|
+
See also: [ChainTracker](./transaction.md#interface-chaintracker), [HttpClient](./transaction.md#interface-httpclient), [WhatsOnChainConfig](./transaction.md#interface-whatsonchainconfig)
|
|
2090
2017
|
|
|
2091
2018
|
#### Constructor
|
|
2092
2019
|
|
|
@@ -2104,8 +2031,6 @@ Argument Details
|
|
|
2104
2031
|
+ **config**
|
|
2105
2032
|
+ Configuration options for the WhatsOnChain ChainTracker.
|
|
2106
2033
|
|
|
2107
|
-
</details>
|
|
2108
|
-
|
|
2109
2034
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
2110
2035
|
|
|
2111
2036
|
---
|
package/docs/wallet.md
CHANGED
|
@@ -502,10 +502,6 @@ export interface KeyDeriverApi {
|
|
|
502
502
|
|
|
503
503
|
See also: [Counterparty](./wallet.md#type-counterparty), [PrivateKey](./primitives.md#class-privatekey), [PublicKey](./primitives.md#class-publickey), [SymmetricKey](./primitives.md#class-symmetrickey), [WalletProtocol](./wallet.md#type-walletprotocol)
|
|
504
504
|
|
|
505
|
-
<details>
|
|
506
|
-
|
|
507
|
-
<summary>Interface KeyDeriverApi Details</summary>
|
|
508
|
-
|
|
509
505
|
#### Property derivePrivateKey
|
|
510
506
|
|
|
511
507
|
Derives a private key based on protocol ID, key ID, and counterparty.
|
|
@@ -570,8 +566,6 @@ rootKey: PrivateKey
|
|
|
570
566
|
```
|
|
571
567
|
See also: [PrivateKey](./primitives.md#class-privatekey)
|
|
572
568
|
|
|
573
|
-
</details>
|
|
574
|
-
|
|
575
569
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
576
570
|
|
|
577
571
|
---
|
|
@@ -1197,10 +1191,6 @@ export interface WalletInterface {
|
|
|
1197
1191
|
|
|
1198
1192
|
See also: [AbortActionArgs](./wallet.md#interface-abortactionargs), [AbortActionResult](./wallet.md#interface-abortactionresult), [AcquireCertificateArgs](./wallet.md#interface-acquirecertificateargs), [AuthenticatedResult](./wallet.md#interface-authenticatedresult), [CreateActionArgs](./wallet.md#interface-createactionargs), [CreateActionResult](./wallet.md#interface-createactionresult), [CreateHmacArgs](./wallet.md#interface-createhmacargs), [CreateHmacResult](./wallet.md#interface-createhmacresult), [CreateSignatureArgs](./wallet.md#interface-createsignatureargs), [CreateSignatureResult](./wallet.md#interface-createsignatureresult), [DiscoverByAttributesArgs](./wallet.md#interface-discoverbyattributesargs), [DiscoverByIdentityKeyArgs](./wallet.md#interface-discoverbyidentitykeyargs), [DiscoverCertificatesResult](./wallet.md#interface-discovercertificatesresult), [GetHeaderArgs](./wallet.md#interface-getheaderargs), [GetHeaderResult](./wallet.md#interface-getheaderresult), [GetHeightResult](./wallet.md#interface-getheightresult), [GetNetworkResult](./wallet.md#interface-getnetworkresult), [GetPublicKeyArgs](./wallet.md#interface-getpublickeyargs), [GetPublicKeyResult](./wallet.md#interface-getpublickeyresult), [GetVersionResult](./wallet.md#interface-getversionresult), [InternalizeActionArgs](./wallet.md#interface-internalizeactionargs), [InternalizeActionResult](./wallet.md#interface-internalizeactionresult), [ListActionsArgs](./wallet.md#interface-listactionsargs), [ListActionsResult](./wallet.md#interface-listactionsresult), [ListCertificatesArgs](./wallet.md#interface-listcertificatesargs), [ListCertificatesResult](./wallet.md#interface-listcertificatesresult), [ListOutputsArgs](./wallet.md#interface-listoutputsargs), [ListOutputsResult](./wallet.md#interface-listoutputsresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [ProveCertificateArgs](./wallet.md#interface-provecertificateargs), [ProveCertificateResult](./wallet.md#interface-provecertificateresult), [RelinquishCertificateArgs](./wallet.md#interface-relinquishcertificateargs), [RelinquishCertificateResult](./wallet.md#interface-relinquishcertificateresult), [RelinquishOutputArgs](./wallet.md#interface-relinquishoutputargs), [RelinquishOutputResult](./wallet.md#interface-relinquishoutputresult), [RevealCounterpartyKeyLinkageArgs](./wallet.md#interface-revealcounterpartykeylinkageargs), [RevealCounterpartyKeyLinkageResult](./wallet.md#interface-revealcounterpartykeylinkageresult), [RevealSpecificKeyLinkageArgs](./wallet.md#interface-revealspecifickeylinkageargs), [RevealSpecificKeyLinkageResult](./wallet.md#interface-revealspecifickeylinkageresult), [SignActionArgs](./wallet.md#interface-signactionargs), [SignActionResult](./wallet.md#interface-signactionresult), [VerifyHmacArgs](./wallet.md#interface-verifyhmacargs), [VerifyHmacResult](./wallet.md#interface-verifyhmacresult), [VerifySignatureArgs](./wallet.md#interface-verifysignatureargs), [VerifySignatureResult](./wallet.md#interface-verifysignatureresult), [WalletCertificate](./wallet.md#interface-walletcertificate), [WalletDecryptArgs](./wallet.md#interface-walletdecryptargs), [WalletDecryptResult](./wallet.md#interface-walletdecryptresult), [WalletEncryptArgs](./wallet.md#interface-walletencryptargs), [WalletEncryptResult](./wallet.md#interface-walletencryptresult), [decrypt](./messages.md#variable-decrypt), [encrypt](./messages.md#variable-encrypt)
|
|
1199
1193
|
|
|
1200
|
-
<details>
|
|
1201
|
-
|
|
1202
|
-
<summary>Interface WalletInterface Details</summary>
|
|
1203
|
-
|
|
1204
1194
|
#### Property abortAction
|
|
1205
1195
|
|
|
1206
1196
|
Aborts a transaction that is in progress and has not yet been finalized or sent to the network.
|
|
@@ -1453,8 +1443,6 @@ waitForAuthentication: (args: object, originator?: OriginatorDomainNameStringUnd
|
|
|
1453
1443
|
```
|
|
1454
1444
|
See also: [AuthenticatedResult](./wallet.md#interface-authenticatedresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
|
|
1455
1445
|
|
|
1456
|
-
</details>
|
|
1457
|
-
|
|
1458
1446
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1459
1447
|
|
|
1460
1448
|
---
|
|
@@ -1546,10 +1534,6 @@ export default class CachedKeyDeriver {
|
|
|
1546
1534
|
|
|
1547
1535
|
See also: [Counterparty](./wallet.md#type-counterparty), [PrivateKey](./primitives.md#class-privatekey), [PublicKey](./primitives.md#class-publickey), [SymmetricKey](./primitives.md#class-symmetrickey), [WalletProtocol](./wallet.md#type-walletprotocol)
|
|
1548
1536
|
|
|
1549
|
-
<details>
|
|
1550
|
-
|
|
1551
|
-
<summary>Class CachedKeyDeriver Details</summary>
|
|
1552
|
-
|
|
1553
1537
|
#### Constructor
|
|
1554
1538
|
|
|
1555
1539
|
Initializes the CachedKeyDeriver instance with a root private key and optional cache settings.
|
|
@@ -1689,8 +1673,6 @@ Argument Details
|
|
|
1689
1673
|
+ **keyID**
|
|
1690
1674
|
+ The key identifier.
|
|
1691
1675
|
|
|
1692
|
-
</details>
|
|
1693
|
-
|
|
1694
1676
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1695
1677
|
|
|
1696
1678
|
---
|
|
@@ -1955,10 +1937,6 @@ export class KeyDeriver implements KeyDeriverApi {
|
|
|
1955
1937
|
|
|
1956
1938
|
See also: [Counterparty](./wallet.md#type-counterparty), [KeyDeriverApi](./wallet.md#interface-keyderiverapi), [PrivateKey](./primitives.md#class-privatekey), [PublicKey](./primitives.md#class-publickey), [SymmetricKey](./primitives.md#class-symmetrickey), [WalletProtocol](./wallet.md#type-walletprotocol)
|
|
1957
1939
|
|
|
1958
|
-
<details>
|
|
1959
|
-
|
|
1960
|
-
<summary>Class KeyDeriver Details</summary>
|
|
1961
|
-
|
|
1962
1940
|
#### Constructor
|
|
1963
1941
|
|
|
1964
1942
|
Initializes the KeyDeriver instance with a root private key.
|
|
@@ -2087,8 +2065,6 @@ Argument Details
|
|
|
2087
2065
|
+ **keyID**
|
|
2088
2066
|
+ The key identifier.
|
|
2089
2067
|
|
|
2090
|
-
</details>
|
|
2091
|
-
|
|
2092
2068
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
2093
2069
|
|
|
2094
2070
|
---
|
package/package.json
CHANGED
|
@@ -21,8 +21,8 @@ interface WhatsOnChainBlockHeader {
|
|
|
21
21
|
export default class WhatsOnChain implements ChainTracker {
|
|
22
22
|
readonly network: string
|
|
23
23
|
readonly apiKey: string
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
protected readonly URL: string
|
|
25
|
+
protected readonly httpClient: HttpClient
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Constructs an instance of the WhatsOnChain ChainTracker.
|
|
@@ -88,7 +88,7 @@ export default class WhatsOnChain implements ChainTracker {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
protected getHttpHeaders(): Record<string, string> {
|
|
92
92
|
const headers: Record<string, string> = {
|
|
93
93
|
Accept: 'application/json'
|
|
94
94
|
}
|
|
@@ -64,9 +64,16 @@ export default class HTTPWalletJSON implements WalletInterface {
|
|
|
64
64
|
body: JSON.stringify(args)
|
|
65
65
|
})
|
|
66
66
|
).json()
|
|
67
|
+
if (!response.ok) {
|
|
68
|
+
const err = {
|
|
69
|
+
call,
|
|
70
|
+
args,
|
|
71
|
+
message: response.message || `HTTP Client error ${response.status}`
|
|
72
|
+
}
|
|
73
|
+
throw new Error(JSON.stringify(err))
|
|
74
|
+
}
|
|
67
75
|
return response
|
|
68
76
|
} catch (error) {
|
|
69
|
-
console.log({ HTTPWalletJSON: { call, args, error } })
|
|
70
77
|
throw error
|
|
71
78
|
}
|
|
72
79
|
}
|