@bopen-io/wallet-toolbox 2.15.0-bopen.1 → 2.15.0-bopen.2
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/CHANGELOG.md +2 -47
- package/README.md +7 -73
- package/docs/client.md +2729 -3020
- package/docs/monitor.md +153 -164
- package/docs/services.md +710 -856
- package/docs/setup.md +1 -46
- package/docs/storage.md +1636 -1654
- package/docs/wallet.md +1842 -2090
- package/out/src/Setup.d.ts +0 -10
- package/out/src/Setup.d.ts.map +1 -1
- package/out/src/Setup.js +0 -24
- package/out/src/Setup.js.map +1 -1
- package/out/src/monitor/MonitorDaemon.d.ts +0 -2
- package/out/src/monitor/MonitorDaemon.d.ts.map +1 -1
- package/out/src/monitor/MonitorDaemon.js +1 -9
- package/out/src/monitor/MonitorDaemon.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.d.ts +0 -5
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.js +3 -11
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.js.map +1 -1
- package/out/src/storage/StorageKnex.d.ts +0 -3
- package/out/src/storage/StorageKnex.d.ts.map +1 -1
- package/out/src/storage/StorageKnex.js +207 -115
- package/out/src/storage/StorageKnex.js.map +1 -1
- package/out/src/storage/adminServer/adminServer.d.ts.map +1 -1
- package/out/src/storage/adminServer/adminServer.js +41 -3
- package/out/src/storage/adminServer/adminServer.js.map +1 -1
- package/out/src/storage/index.all.d.ts +0 -1
- package/out/src/storage/index.all.d.ts.map +1 -1
- package/out/src/storage/index.all.js +0 -1
- package/out/src/storage/index.all.js.map +1 -1
- package/out/src/storage/methods/listActionsKnex.d.ts.map +1 -1
- package/out/src/storage/methods/listActionsKnex.js +1 -0
- package/out/src/storage/methods/listActionsKnex.js.map +1 -1
- package/out/src/storage/methods/listOutputsKnex.d.ts.map +1 -1
- package/out/src/storage/methods/listOutputsKnex.js +1 -0
- package/out/src/storage/methods/listOutputsKnex.js.map +1 -1
- package/out/src/storage/methods/purgeData.d.ts.map +1 -1
- package/out/src/storage/methods/purgeData.js +3 -0
- package/out/src/storage/methods/purgeData.js.map +1 -1
- package/out/src/storage/methods/reviewStatus.d.ts.map +1 -1
- package/out/src/storage/methods/reviewStatus.js +3 -0
- package/out/src/storage/methods/reviewStatus.js.map +1 -1
- package/out/src/storage/portable/index.js +12 -38
- package/out/src/storage/portable/index.js.map +1 -1
- package/out/src/storage/remoting/StorageServer.d.ts +4 -17
- package/out/src/storage/remoting/StorageServer.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageServer.js +13 -22
- package/out/src/storage/remoting/StorageServer.js.map +1 -1
- package/out/src/storage/schema/KnexMigrations.d.ts +2 -7
- package/out/src/storage/schema/KnexMigrations.d.ts.map +1 -1
- package/out/src/storage/schema/KnexMigrations.js +60 -162
- package/out/src/storage/schema/KnexMigrations.js.map +1 -1
- package/package.json +4 -5
- package/out/src/storage/adminServer/reqReviewQuery.d.ts +0 -41
- package/out/src/storage/adminServer/reqReviewQuery.d.ts.map +0 -1
- package/out/src/storage/adminServer/reqReviewQuery.js +0 -67
- package/out/src/storage/adminServer/reqReviewQuery.js.map +0 -1
- package/out/src/storage/knexPostgres.d.ts +0 -16
- package/out/src/storage/knexPostgres.d.ts.map +0 -1
- package/out/src/storage/knexPostgres.js +0 -34
- package/out/src/storage/knexPostgres.js.map +0 -1
package/docs/services.md
CHANGED
|
@@ -1537,7 +1537,6 @@ Chaintracks client API excluding events and callbacks
|
|
|
1537
1537
|
|
|
1538
1538
|
```ts
|
|
1539
1539
|
export interface ChaintracksClientApi extends ChainTracker {
|
|
1540
|
-
readonly supportsReorgEvents?: boolean;
|
|
1541
1540
|
getChain(): Promise<Chain>;
|
|
1542
1541
|
getInfo(): Promise<ChaintracksInfoApi>;
|
|
1543
1542
|
getPresentHeight(): Promise<number>;
|
|
@@ -1561,17 +1560,6 @@ export interface ChaintracksClientApi extends ChainTracker {
|
|
|
1561
1560
|
|
|
1562
1561
|
See also: [BaseBlockHeader](./client.md#interface-baseblockheader), [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [ChaintracksInfoApi](./services.md#interface-chaintracksinfoapi), [HeaderListener](./services.md#type-headerlistener), [ReorgListener](./services.md#type-reorglistener)
|
|
1563
1562
|
|
|
1564
|
-
###### Property supportsReorgEvents
|
|
1565
|
-
|
|
1566
|
-
Additive reorg-event capability. Method presence is not capability:
|
|
1567
|
-
`false` means subscribe/unsubscribe are unsupported stubs and must not be
|
|
1568
|
-
called; `true` promises working registration whose failures must propagate.
|
|
1569
|
-
Omit to infer from a callable `subscribeReorgs` implementation.
|
|
1570
|
-
|
|
1571
|
-
```ts
|
|
1572
|
-
readonly supportsReorgEvents?: boolean
|
|
1573
|
-
```
|
|
1574
|
-
|
|
1575
1563
|
###### Method addHeader
|
|
1576
1564
|
|
|
1577
1565
|
Submit a possibly new header for adding
|
|
@@ -2197,7 +2185,6 @@ export interface ChaintracksServiceOptions {
|
|
|
2197
2185
|
http?: Partial<HttpServerPolicyDefaults>;
|
|
2198
2186
|
maxRequestsPerMinute?: number;
|
|
2199
2187
|
maxHeaderSubmissionsPerMinute?: number;
|
|
2200
|
-
trustProxy?: boolean | number | string | string[];
|
|
2201
2188
|
maxHeadersPerRequest?: number;
|
|
2202
2189
|
maxWaitMsecs?: number;
|
|
2203
2190
|
logRequests?: boolean;
|
|
@@ -2233,7 +2220,7 @@ logRequests?: boolean
|
|
|
2233
2220
|
|
|
2234
2221
|
###### Property maxHeaderSubmissionsPerMinute
|
|
2235
2222
|
|
|
2236
|
-
|
|
2223
|
+
Process-global header submissions allowed per minute. Defaults to 120.
|
|
2237
2224
|
|
|
2238
2225
|
```ts
|
|
2239
2226
|
maxHeaderSubmissionsPerMinute?: number
|
|
@@ -2249,7 +2236,7 @@ maxHeadersPerRequest?: number
|
|
|
2249
2236
|
|
|
2250
2237
|
###### Property maxRequestsPerMinute
|
|
2251
2238
|
|
|
2252
|
-
|
|
2239
|
+
Process-global request starts allowed per minute. Defaults to 3,000.
|
|
2253
2240
|
|
|
2254
2241
|
```ts
|
|
2255
2242
|
maxRequestsPerMinute?: number
|
|
@@ -2271,14 +2258,6 @@ prepended to the path of each registered service endpoint
|
|
|
2271
2258
|
routingPrefix: string
|
|
2272
2259
|
```
|
|
2273
2260
|
|
|
2274
|
-
###### Property trustProxy
|
|
2275
|
-
|
|
2276
|
-
Express trusted-proxy policy used to derive the client address. Disabled by default.
|
|
2277
|
-
|
|
2278
|
-
```ts
|
|
2279
|
-
trustProxy?: boolean | number | string | string[]
|
|
2280
|
-
```
|
|
2281
|
-
|
|
2282
2261
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2283
2262
|
|
|
2284
2263
|
---
|
|
@@ -4208,25 +4187,25 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
4208
4187
|
|
|
4209
4188
|
| | | |
|
|
4210
4189
|
| --- | --- | --- |
|
|
4211
|
-
| [ARC](#class-arc) | [BulkIngestorChaintracks](#class-bulkingestorchaintracks) | [
|
|
4212
|
-
| [ArcSSEClient](#class-arcsseclient) | [BulkIngestorWhatsOnChainCdn](#class-bulkingestorwhatsonchaincdn) | [
|
|
4213
|
-
| [Arcade](#class-arcade) | [BulkIngestorWhatsOnChainWs](#class-bulkingestorwhatsonchainws) | [
|
|
4214
|
-
| [BHServiceClient](#class-bhserviceclient) | [BulkStorageBase](#class-bulkstoragebase) | [
|
|
4215
|
-
| [Bitails](#class-bitails) | [Chaintracks](#class-chaintracks) | [
|
|
4216
|
-
| [BulkFileDataCacheFs](#class-bulkfiledatacachefs) | [ChaintracksAppendableFile](#class-chaintracksappendablefile) | [
|
|
4217
|
-
| [BulkFileDataManager](#class-bulkfiledatamanager) | [ChaintracksChainTracker](#class-chaintrackschaintracker) | [
|
|
4218
|
-
| [BulkFileDataReader](#class-bulkfiledatareader) | [ChaintracksFetch](#class-chaintracksfetch) | [
|
|
4219
|
-
| [BulkFileDataValidationError](#class-bulkfiledatavalidationerror) | [ChaintracksFetchError](#class-chaintracksfetcherror) | [
|
|
4220
|
-
| [BulkFilesReader](#class-bulkfilesreader) | [ChaintracksFsStatics](#class-chaintracksfsstatics) | [
|
|
4221
|
-
| [BulkFilesReaderFs](#class-bulkfilesreaderfs) | [ChaintracksKnexMigrations](#class-chaintracksknexmigrations) | [
|
|
4222
|
-
| [BulkFilesReaderStorage](#class-bulkfilesreaderstorage) | [
|
|
4223
|
-
| [BulkHeaderFile](#class-bulkheaderfile) | [
|
|
4224
|
-
| [BulkHeaderFileFs](#class-bulkheaderfilefs) | [
|
|
4225
|
-
| [BulkHeaderFileStorage](#class-bulkheaderfilestorage) | [
|
|
4226
|
-
| [BulkHeaderFiles](#class-bulkheaderfiles) | [
|
|
4227
|
-
| [BulkIngestorBase](#class-bulkingestorbase) | [
|
|
4228
|
-
| [BulkIngestorCDN](#class-bulkingestorcdn) | [
|
|
4229
|
-
| [BulkIngestorCDNBabbage](#class-bulkingestorcdnbabbage) | [
|
|
4190
|
+
| [ARC](#class-arc) | [BulkIngestorChaintracks](#class-bulkingestorchaintracks) | [DurableFileBulkFileDownloadBudget](#class-durablefilebulkfiledownloadbudget) |
|
|
4191
|
+
| [ArcSSEClient](#class-arcsseclient) | [BulkIngestorWhatsOnChainCdn](#class-bulkingestorwhatsonchaincdn) | [FixedWindowBulkFileDownloadBudget](#class-fixedwindowbulkfiledownloadbudget) |
|
|
4192
|
+
| [Arcade](#class-arcade) | [BulkIngestorWhatsOnChainWs](#class-bulkingestorwhatsonchainws) | [GoChaintracksServiceClient](#class-gochaintracksserviceclient) |
|
|
4193
|
+
| [BHServiceClient](#class-bhserviceclient) | [BulkStorageBase](#class-bulkstoragebase) | [HeightRange](#class-heightrange) |
|
|
4194
|
+
| [Bitails](#class-bitails) | [Chaintracks](#class-chaintracks) | [InlineBulkFileDataValidator](#class-inlinebulkfiledatavalidator) |
|
|
4195
|
+
| [BulkFileDataCacheFs](#class-bulkfiledatacachefs) | [ChaintracksAppendableFile](#class-chaintracksappendablefile) | [LiveIngestorBase](#class-liveingestorbase) |
|
|
4196
|
+
| [BulkFileDataManager](#class-bulkfiledatamanager) | [ChaintracksChainTracker](#class-chaintrackschaintracker) | [LiveIngestorChaintracksSSE](#class-liveingestorchaintrackssse) |
|
|
4197
|
+
| [BulkFileDataReader](#class-bulkfiledatareader) | [ChaintracksFetch](#class-chaintracksfetch) | [LiveIngestorWhatsOnChainPoll](#class-liveingestorwhatsonchainpoll) |
|
|
4198
|
+
| [BulkFileDataValidationError](#class-bulkfiledatavalidationerror) | [ChaintracksFetchError](#class-chaintracksfetcherror) | [LiveIngestorWhatsOnChainWs](#class-liveingestorwhatsonchainws) |
|
|
4199
|
+
| [BulkFilesReader](#class-bulkfilesreader) | [ChaintracksFsStatics](#class-chaintracksfsstatics) | [LocalChainTracker](#class-localchaintracker) |
|
|
4200
|
+
| [BulkFilesReaderFs](#class-bulkfilesreaderfs) | [ChaintracksKnexMigrations](#class-chaintracksknexmigrations) | [NodeBulkFileDataValidator](#class-nodebulkfiledatavalidator) |
|
|
4201
|
+
| [BulkFilesReaderStorage](#class-bulkfilesreaderstorage) | [ChaintracksReadableFile](#class-chaintracksreadablefile) | [SdkWhatsOnChain](#class-sdkwhatsonchain) |
|
|
4202
|
+
| [BulkHeaderFile](#class-bulkheaderfile) | [ChaintracksService](#class-chaintracksservice) | [ServiceCollection](#class-servicecollection) |
|
|
4203
|
+
| [BulkHeaderFileFs](#class-bulkheaderfilefs) | [ChaintracksServiceClient](#class-chaintracksserviceclient) | [Services](#class-services) |
|
|
4204
|
+
| [BulkHeaderFileStorage](#class-bulkheaderfilestorage) | [ChaintracksStorageBase](#class-chaintracksstoragebase) | [SingleWriterMultiReaderLock](#class-singlewritermultireaderlock) |
|
|
4205
|
+
| [BulkHeaderFiles](#class-bulkheaderfiles) | [ChaintracksStorageIdb](#class-chaintracksstorageidb) | [WhatsOnChain](#class-whatsonchain) |
|
|
4206
|
+
| [BulkIngestorBase](#class-bulkingestorbase) | [ChaintracksStorageKnex](#class-chaintracksstorageknex) | [WhatsOnChainNoServices](#class-whatsonchainnoservices) |
|
|
4207
|
+
| [BulkIngestorCDN](#class-bulkingestorcdn) | [ChaintracksStorageNoDb](#class-chaintracksstoragenodb) | [WhatsOnChainServices](#class-whatsonchainservices) |
|
|
4208
|
+
| [BulkIngestorCDNBabbage](#class-bulkingestorcdnbabbage) | [ChaintracksWritableFile](#class-chaintrackswritablefile) | |
|
|
4230
4209
|
|
|
4231
4210
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4232
4211
|
|
|
@@ -4247,10 +4226,10 @@ export class ARC {
|
|
|
4247
4226
|
readonly headers: Record<string, string> | undefined;
|
|
4248
4227
|
constructor(URL: string, config?: ArcConfig, name?: string);
|
|
4249
4228
|
constructor(URL: string, apiKey?: string, name?: string);
|
|
4250
|
-
constructor(URL: string, config?: string | ArcConfig, name?: string)
|
|
4251
|
-
async postRawTx(rawTx: HexString, txids?: string[]): Promise<PostTxResultForTxid>
|
|
4252
|
-
async postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult>
|
|
4253
|
-
async getTxData(txid: string): Promise<ArcMinerGetTxData>
|
|
4229
|
+
constructor(URL: string, config?: string | ArcConfig, name?: string)
|
|
4230
|
+
async postRawTx(rawTx: HexString, txids?: string[]): Promise<PostTxResultForTxid>
|
|
4231
|
+
async postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult>
|
|
4232
|
+
async getTxData(txid: string): Promise<ArcMinerGetTxData>
|
|
4254
4233
|
}
|
|
4255
4234
|
```
|
|
4256
4235
|
|
|
@@ -4292,7 +4271,7 @@ Argument Details
|
|
|
4292
4271
|
This seems to only work for recently submitted txids...but that's all we need to complete postBeef!
|
|
4293
4272
|
|
|
4294
4273
|
```ts
|
|
4295
|
-
async getTxData(txid: string): Promise<ArcMinerGetTxData>
|
|
4274
|
+
async getTxData(txid: string): Promise<ArcMinerGetTxData>
|
|
4296
4275
|
```
|
|
4297
4276
|
See also: [ArcMinerGetTxData](./services.md#interface-arcminergettxdata)
|
|
4298
4277
|
|
|
@@ -4304,7 +4283,7 @@ It does process multiple new transactions, however, which allows results for all
|
|
|
4304
4283
|
to be collected by the `/v1/tx/${txid}` endpoint.
|
|
4305
4284
|
|
|
4306
4285
|
```ts
|
|
4307
|
-
async postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult>
|
|
4286
|
+
async postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult>
|
|
4308
4287
|
```
|
|
4309
4288
|
See also: [PostBeefResult](./client.md#interface-postbeefresult)
|
|
4310
4289
|
|
|
@@ -4319,7 +4298,7 @@ The ARC '/v1/tx' endpoint, as of 2025-02-17 DOES NOT support the following hex s
|
|
|
4319
4298
|
1. V2 serialized Beef
|
|
4320
4299
|
|
|
4321
4300
|
```ts
|
|
4322
|
-
async postRawTx(rawTx: HexString, txids?: string[]): Promise<PostTxResultForTxid>
|
|
4301
|
+
async postRawTx(rawTx: HexString, txids?: string[]): Promise<PostTxResultForTxid>
|
|
4323
4302
|
```
|
|
4324
4303
|
See also: [PostTxResultForTxid](./client.md#interface-posttxresultfortxid)
|
|
4325
4304
|
|
|
@@ -4330,11 +4309,11 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
4330
4309
|
|
|
4331
4310
|
```ts
|
|
4332
4311
|
export class ArcSSEClient {
|
|
4333
|
-
constructor(options: ArcSSEClientOptions)
|
|
4334
|
-
get lastEventId(): string | undefined
|
|
4335
|
-
connect(): void
|
|
4336
|
-
close(): void
|
|
4337
|
-
async fetchEvents(): Promise<number>
|
|
4312
|
+
constructor(options: ArcSSEClientOptions)
|
|
4313
|
+
get lastEventId(): string | undefined
|
|
4314
|
+
connect(): void
|
|
4315
|
+
close(): void
|
|
4316
|
+
async fetchEvents(): Promise<number>
|
|
4338
4317
|
}
|
|
4339
4318
|
```
|
|
4340
4319
|
|
|
@@ -4345,7 +4324,7 @@ See also: [ArcSSEClientOptions](./services.md#interface-arcsseclientoptions)
|
|
|
4345
4324
|
Close the connection, discard unacknowledged network events, and reset lifecycle state.
|
|
4346
4325
|
|
|
4347
4326
|
```ts
|
|
4348
|
-
close(): void
|
|
4327
|
+
close(): void
|
|
4349
4328
|
```
|
|
4350
4329
|
|
|
4351
4330
|
###### Method connect
|
|
@@ -4353,7 +4332,7 @@ close(): void
|
|
|
4353
4332
|
Open the SSE connection. Events are processed serially in exact arrival order.
|
|
4354
4333
|
|
|
4355
4334
|
```ts
|
|
4356
|
-
connect(): void
|
|
4335
|
+
connect(): void
|
|
4357
4336
|
```
|
|
4358
4337
|
|
|
4359
4338
|
###### Method fetchEvents
|
|
@@ -4361,7 +4340,7 @@ connect(): void
|
|
|
4361
4340
|
Ensure a connection is open; events still commit asynchronously in arrival order.
|
|
4362
4341
|
|
|
4363
4342
|
```ts
|
|
4364
|
-
async fetchEvents(): Promise<number>
|
|
4343
|
+
async fetchEvents(): Promise<number>
|
|
4365
4344
|
```
|
|
4366
4345
|
|
|
4367
4346
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -4380,12 +4359,12 @@ export class Arcade {
|
|
|
4380
4359
|
readonly headers: Record<string, string> | undefined;
|
|
4381
4360
|
constructor(URL: string, config?: ArcConfig, name?: string);
|
|
4382
4361
|
constructor(URL: string, apiKey?: string, name?: string);
|
|
4383
|
-
constructor(URL: string, config?: string | ArcConfig, name?: string)
|
|
4384
|
-
async postRawTx(rawTx: HexString, txids?: string[]): Promise<PostTxResultForTxid>
|
|
4385
|
-
async postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult>
|
|
4386
|
-
async getTxData(txid: string): Promise<ArcMinerGetTxData>
|
|
4387
|
-
async getStatusForTxids(txids: string[]): Promise<GetStatusForTxidsResult>
|
|
4388
|
-
async getMerklePath(txid: string, services: WalletServices): Promise<GetMerklePathResult>
|
|
4362
|
+
constructor(URL: string, config?: string | ArcConfig, name?: string)
|
|
4363
|
+
async postRawTx(rawTx: HexString, txids?: string[]): Promise<PostTxResultForTxid>
|
|
4364
|
+
async postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult>
|
|
4365
|
+
async getTxData(txid: string): Promise<ArcMinerGetTxData>
|
|
4366
|
+
async getStatusForTxids(txids: string[]): Promise<GetStatusForTxidsResult>
|
|
4367
|
+
async getMerklePath(txid: string, services: WalletServices): Promise<GetMerklePathResult>
|
|
4389
4368
|
}
|
|
4390
4369
|
```
|
|
4391
4370
|
|
|
@@ -4413,7 +4392,7 @@ states remain unknown, while MINED/IMMUTABLE are authoritative mined
|
|
|
4413
4392
|
observations whose proof is validated separately.
|
|
4414
4393
|
|
|
4415
4394
|
```ts
|
|
4416
|
-
async getStatusForTxids(txids: string[]): Promise<GetStatusForTxidsResult>
|
|
4395
|
+
async getStatusForTxids(txids: string[]): Promise<GetStatusForTxidsResult>
|
|
4417
4396
|
```
|
|
4418
4397
|
See also: [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult)
|
|
4419
4398
|
|
|
@@ -4422,7 +4401,7 @@ See also: [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresul
|
|
|
4422
4401
|
Look up a transaction's current status (and merkle path once mined) via `GET /tx/{txid}`.
|
|
4423
4402
|
|
|
4424
4403
|
```ts
|
|
4425
|
-
async getTxData(txid: string): Promise<ArcMinerGetTxData>
|
|
4404
|
+
async getTxData(txid: string): Promise<ArcMinerGetTxData>
|
|
4426
4405
|
```
|
|
4427
4406
|
See also: [ArcMinerGetTxData](./services.md#interface-arcminergettxdata)
|
|
4428
4407
|
|
|
@@ -4434,7 +4413,7 @@ Submit a single transaction to Arcade's `POST /tx` endpoint.
|
|
|
4434
4413
|
txid is taken from `txids` when supplied (Arcade derives the same txid from the parsed tx).
|
|
4435
4414
|
|
|
4436
4415
|
```ts
|
|
4437
|
-
async postRawTx(rawTx: HexString, txids?: string[]): Promise<PostTxResultForTxid>
|
|
4416
|
+
async postRawTx(rawTx: HexString, txids?: string[]): Promise<PostTxResultForTxid>
|
|
4438
4417
|
```
|
|
4439
4418
|
See also: [PostTxResultForTxid](./client.md#interface-posttxresultfortxid)
|
|
4440
4419
|
|
|
@@ -4445,51 +4424,42 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
4445
4424
|
|
|
4446
4425
|
```ts
|
|
4447
4426
|
export class BHServiceClient implements ChaintracksClientApi {
|
|
4448
|
-
readonly supportsReorgEvents = false;
|
|
4449
4427
|
bhs: BlockHeadersService;
|
|
4450
4428
|
cache: Record<number, string>;
|
|
4451
4429
|
chain: Chain;
|
|
4452
4430
|
serviceUrl: string;
|
|
4453
4431
|
options: ChaintracksServiceClientOptions;
|
|
4454
4432
|
apiKey: string;
|
|
4455
|
-
constructor(chain: Chain, url: string, apiKey: string, options: ChaintracksServiceClientOptions = {})
|
|
4456
|
-
async currentHeight(): Promise<number>
|
|
4457
|
-
async isValidRootForHeight(root: string, height: number): Promise<boolean>
|
|
4458
|
-
async getPresentHeight(): Promise<number>
|
|
4459
|
-
async findHeaderForHeight(height: number): Promise<BlockHeader | undefined>
|
|
4460
|
-
async findHeaderForBlockHash(hash: string): Promise<BlockHeader | undefined>
|
|
4461
|
-
async getHeaders(height: number, count: number): Promise<string>
|
|
4462
|
-
async findChainWorkForBlockHash(_hash: string): Promise<string | undefined>
|
|
4463
|
-
async findChainTipHeader(): Promise<BlockHeader>
|
|
4464
|
-
async getJsonOrUndefined<T>(path: string): Promise<T | undefined>
|
|
4465
|
-
async getJson<T>(path: string): Promise<T>
|
|
4466
|
-
async postJsonVoid<T>(_path: string, _params: T): Promise<void>
|
|
4467
|
-
async addHeader(_header: any): Promise<void>
|
|
4468
|
-
async findHeaderForMerkleRoot(_merkleRoot: string, _height?: number): Promise<undefined>
|
|
4469
|
-
async startListening(): Promise<void>
|
|
4470
|
-
async listening(): Promise<void>
|
|
4471
|
-
async isSynchronized(): Promise<boolean>
|
|
4472
|
-
async getChain(): Promise<Chain>
|
|
4473
|
-
async isListening(): Promise<boolean>
|
|
4474
|
-
async getChainTipHeader(): Promise<BlockHeader>
|
|
4475
|
-
async findChainTipHash(): Promise<string>
|
|
4476
|
-
async subscribeHeaders(_listener: HeaderListener): Promise<string>
|
|
4477
|
-
async subscribeReorgs(_listener: ReorgListener): Promise<string>
|
|
4478
|
-
async unsubscribe(_subscriptionId: string): Promise<boolean>
|
|
4479
|
-
async getInfo(): Promise<ChaintracksInfoApi>
|
|
4433
|
+
constructor(chain: Chain, url: string, apiKey: string, options: ChaintracksServiceClientOptions = {})
|
|
4434
|
+
async currentHeight(): Promise<number>
|
|
4435
|
+
async isValidRootForHeight(root: string, height: number): Promise<boolean>
|
|
4436
|
+
async getPresentHeight(): Promise<number>
|
|
4437
|
+
async findHeaderForHeight(height: number): Promise<BlockHeader | undefined>
|
|
4438
|
+
async findHeaderForBlockHash(hash: string): Promise<BlockHeader | undefined>
|
|
4439
|
+
async getHeaders(height: number, count: number): Promise<string>
|
|
4440
|
+
async findChainWorkForBlockHash(_hash: string): Promise<string | undefined>
|
|
4441
|
+
async findChainTipHeader(): Promise<BlockHeader>
|
|
4442
|
+
async getJsonOrUndefined<T>(path: string): Promise<T | undefined>
|
|
4443
|
+
async getJson<T>(path: string): Promise<T>
|
|
4444
|
+
async postJsonVoid<T>(_path: string, _params: T): Promise<void>
|
|
4445
|
+
async addHeader(_header: any): Promise<void>
|
|
4446
|
+
async findHeaderForMerkleRoot(_merkleRoot: string, _height?: number): Promise<undefined>
|
|
4447
|
+
async startListening(): Promise<void>
|
|
4448
|
+
async listening(): Promise<void>
|
|
4449
|
+
async isSynchronized(): Promise<boolean>
|
|
4450
|
+
async getChain(): Promise<Chain>
|
|
4451
|
+
async isListening(): Promise<boolean>
|
|
4452
|
+
async getChainTipHeader(): Promise<BlockHeader>
|
|
4453
|
+
async findChainTipHash(): Promise<string>
|
|
4454
|
+
async subscribeHeaders(_listener: HeaderListener): Promise<string>
|
|
4455
|
+
async subscribeReorgs(_listener: ReorgListener): Promise<string>
|
|
4456
|
+
async unsubscribe(_subscriptionId: string): Promise<boolean>
|
|
4457
|
+
async getInfo(): Promise<ChaintracksInfoApi>
|
|
4480
4458
|
}
|
|
4481
4459
|
```
|
|
4482
4460
|
|
|
4483
4461
|
See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [ChaintracksClientApi](./services.md#interface-chaintracksclientapi), [ChaintracksInfoApi](./services.md#interface-chaintracksinfoapi), [ChaintracksServiceClientOptions](./services.md#interface-chaintracksserviceclientoptions), [HeaderListener](./services.md#type-headerlistener), [ReorgListener](./services.md#type-reorglistener)
|
|
4484
4462
|
|
|
4485
|
-
###### Property supportsReorgEvents
|
|
4486
|
-
|
|
4487
|
-
HTTP polling client; callback event methods are legacy unsupported stubs.
|
|
4488
|
-
|
|
4489
|
-
```ts
|
|
4490
|
-
readonly supportsReorgEvents = false
|
|
4491
|
-
```
|
|
4492
|
-
|
|
4493
4463
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4494
4464
|
|
|
4495
4465
|
---
|
|
@@ -4502,11 +4472,11 @@ export class Bitails {
|
|
|
4502
4472
|
readonly URL: string;
|
|
4503
4473
|
readonly httpClient: HttpClient;
|
|
4504
4474
|
readonly requestTimeoutMsecs: number;
|
|
4505
|
-
constructor(chain: Chain = "main", config: BitailsConfig = {})
|
|
4506
|
-
getHttpHeaders(): Record<string, string>
|
|
4507
|
-
async postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult>
|
|
4508
|
-
async postRaws(raws: HexString[], txids?: string[]): Promise<PostBeefResult>
|
|
4509
|
-
async getMerklePath(txid: string, services: WalletServices): Promise<GetMerklePathResult>
|
|
4475
|
+
constructor(chain: Chain = "main", config: BitailsConfig = {})
|
|
4476
|
+
getHttpHeaders(): Record<string, string>
|
|
4477
|
+
async postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult>
|
|
4478
|
+
async postRaws(raws: HexString[], txids?: string[]): Promise<PostBeefResult>
|
|
4479
|
+
async getMerklePath(txid: string, services: WalletServices): Promise<GetMerklePathResult>
|
|
4510
4480
|
}
|
|
4511
4481
|
```
|
|
4512
4482
|
|
|
@@ -4519,14 +4489,14 @@ Bitails does not natively support a postBeef end-point aware of multiple txids o
|
|
|
4519
4489
|
Send rawTx in `txids` order from beef.
|
|
4520
4490
|
|
|
4521
4491
|
```ts
|
|
4522
|
-
async postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult>
|
|
4492
|
+
async postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult>
|
|
4523
4493
|
```
|
|
4524
4494
|
See also: [PostBeefResult](./client.md#interface-postbeefresult)
|
|
4525
4495
|
|
|
4526
4496
|
###### Method postRaws
|
|
4527
4497
|
|
|
4528
4498
|
```ts
|
|
4529
|
-
async postRaws(raws: HexString[], txids?: string[]): Promise<PostBeefResult>
|
|
4499
|
+
async postRaws(raws: HexString[], txids?: string[]): Promise<PostBeefResult>
|
|
4530
4500
|
```
|
|
4531
4501
|
See also: [PostBeefResult](./client.md#interface-postbeefresult)
|
|
4532
4502
|
|
|
@@ -4550,12 +4520,12 @@ byte length and SHA-256 digest.
|
|
|
4550
4520
|
|
|
4551
4521
|
```ts
|
|
4552
4522
|
export class BulkFileDataCacheFs implements BulkFileDataCacheApi {
|
|
4553
|
-
constructor(rootFolderOrOptions: string | BulkFileDataCacheFsOptions)
|
|
4554
|
-
async get(file: Readonly<BulkHeaderFileInfo>): Promise<Uint8Array | undefined>
|
|
4555
|
-
async set(file: Readonly<BulkHeaderFileInfo>, data: Uint8Array): Promise<void>
|
|
4556
|
-
async promoteValidated(file: Readonly<BulkHeaderFileInfo>, data: Uint8Array): Promise<void>
|
|
4557
|
-
async quarantine(file: Readonly<BulkHeaderFileInfo>, reason: string, rejectedData?: Uint8Array): Promise<void>
|
|
4558
|
-
async delete(file: Readonly<BulkHeaderFileInfo>): Promise<void>
|
|
4523
|
+
constructor(rootFolderOrOptions: string | BulkFileDataCacheFsOptions)
|
|
4524
|
+
async get(file: Readonly<BulkHeaderFileInfo>): Promise<Uint8Array | undefined>
|
|
4525
|
+
async set(file: Readonly<BulkHeaderFileInfo>, data: Uint8Array): Promise<void>
|
|
4526
|
+
async promoteValidated(file: Readonly<BulkHeaderFileInfo>, data: Uint8Array): Promise<void>
|
|
4527
|
+
async quarantine(file: Readonly<BulkHeaderFileInfo>, reason: string, rejectedData?: Uint8Array): Promise<void>
|
|
4528
|
+
async delete(file: Readonly<BulkHeaderFileInfo>): Promise<void>
|
|
4559
4529
|
}
|
|
4560
4530
|
```
|
|
4561
4531
|
|
|
@@ -4576,7 +4546,7 @@ subject to the optional `maxRetained` limit.
|
|
|
4576
4546
|
|
|
4577
4547
|
```ts
|
|
4578
4548
|
export class BulkFileDataManager {
|
|
4579
|
-
static createDefaultOptions(chain: Chain): BulkFileDataManagerOptions
|
|
4549
|
+
static createDefaultOptions(chain: Chain): BulkFileDataManagerOptions
|
|
4580
4550
|
readonly chain: Chain;
|
|
4581
4551
|
readonly maxPerFile: number;
|
|
4582
4552
|
readonly fetch?: ChaintracksFetchApi;
|
|
@@ -4586,29 +4556,29 @@ export class BulkFileDataManager {
|
|
|
4586
4556
|
readonly downloadBudget?: BulkFileDownloadBudgetApi;
|
|
4587
4557
|
readonly validator: BulkFileDataValidatorApi;
|
|
4588
4558
|
readonly failedLoadRetryMsecs: number;
|
|
4589
|
-
constructor(options: BulkFileDataManagerOptions | Chain)
|
|
4590
|
-
getStats(): BulkFileDataManagerStats
|
|
4591
|
-
async deleteBulkFiles(): Promise<void>
|
|
4592
|
-
async setStorage(storage: ChaintracksStorageBulkFileApi, log: (...args: any[]) => void): Promise<void>
|
|
4559
|
+
constructor(options: BulkFileDataManagerOptions | Chain)
|
|
4560
|
+
getStats(): BulkFileDataManagerStats
|
|
4561
|
+
async deleteBulkFiles(): Promise<void>
|
|
4562
|
+
async setStorage(storage: ChaintracksStorageBulkFileApi, log: (...args: any[]) => void): Promise<void>
|
|
4593
4563
|
heightRangesFromBulkFiles(files: BulkHeaderFileInfo[]): {
|
|
4594
4564
|
all: HeightRange;
|
|
4595
4565
|
cdn: HeightRange;
|
|
4596
4566
|
incremental: HeightRange;
|
|
4597
|
-
}
|
|
4598
|
-
async createReader(range?: HeightRange, maxBufferSize?: number): Promise<BulkFileDataReader>
|
|
4599
|
-
async updateFromUrl(cdnUrl: string): Promise<void>
|
|
4600
|
-
async merge(files: BulkHeaderFileInfo[]): Promise<BulkFileDataManagerMergeResult>
|
|
4601
|
-
toLogString(what?: BulkFileDataManagerMergeResult | BulkFileData[] | BulkHeaderFileInfo[]): string
|
|
4602
|
-
async mergeIncrementalBlockHeaders(newBulkHeaders: BlockHeader[], incrementalChainWork?: string): Promise<void>
|
|
4603
|
-
async getBulkFiles(keepData?: boolean): Promise<BulkHeaderFileInfo[]>
|
|
4604
|
-
async getHeightRange(): Promise<HeightRange>
|
|
4605
|
-
async getDataFromFile(file: BulkHeaderFileInfo, offset?: number, length?: number): Promise<Uint8Array | undefined>
|
|
4606
|
-
async findHeaderForHeightOrUndefined(height: number): Promise<BlockHeader | undefined>
|
|
4607
|
-
async getFileForHeight(height: number): Promise<BulkHeaderFileInfo | undefined>
|
|
4608
|
-
async getLastFile(fromEnd = 1): Promise<BulkHeaderFileInfo | undefined>
|
|
4609
|
-
async ReValidate(): Promise<void>
|
|
4610
|
-
async exportHeadersToFs(toFs: ChaintracksFsApi, toHeadersPerFile: number, toFolder: string, sourceUrl?: string, maxHeight?: number): Promise<void>
|
|
4611
|
-
async destroy(): Promise<void>
|
|
4567
|
+
}
|
|
4568
|
+
async createReader(range?: HeightRange, maxBufferSize?: number): Promise<BulkFileDataReader>
|
|
4569
|
+
async updateFromUrl(cdnUrl: string): Promise<void>
|
|
4570
|
+
async merge(files: BulkHeaderFileInfo[]): Promise<BulkFileDataManagerMergeResult>
|
|
4571
|
+
toLogString(what?: BulkFileDataManagerMergeResult | BulkFileData[] | BulkHeaderFileInfo[]): string
|
|
4572
|
+
async mergeIncrementalBlockHeaders(newBulkHeaders: BlockHeader[], incrementalChainWork?: string): Promise<void>
|
|
4573
|
+
async getBulkFiles(keepData?: boolean): Promise<BulkHeaderFileInfo[]>
|
|
4574
|
+
async getHeightRange(): Promise<HeightRange>
|
|
4575
|
+
async getDataFromFile(file: BulkHeaderFileInfo, offset?: number, length?: number): Promise<Uint8Array | undefined>
|
|
4576
|
+
async findHeaderForHeightOrUndefined(height: number): Promise<BlockHeader | undefined>
|
|
4577
|
+
async getFileForHeight(height: number): Promise<BulkHeaderFileInfo | undefined>
|
|
4578
|
+
async getLastFile(fromEnd = 1): Promise<BulkHeaderFileInfo | undefined>
|
|
4579
|
+
async ReValidate(): Promise<void>
|
|
4580
|
+
async exportHeadersToFs(toFs: ChaintracksFsApi, toHeadersPerFile: number, toFolder: string, sourceUrl?: string, maxHeight?: number): Promise<void>
|
|
4581
|
+
async destroy(): Promise<void>
|
|
4612
4582
|
}
|
|
4613
4583
|
```
|
|
4614
4584
|
|
|
@@ -4623,7 +4593,7 @@ Synchronizes bfds and storage files, after which this manager maintains sync.
|
|
|
4623
4593
|
There should be no changes to bulk files by direct access to storage bulk file methods.
|
|
4624
4594
|
|
|
4625
4595
|
```ts
|
|
4626
|
-
async setStorage(storage: ChaintracksStorageBulkFileApi, log: (...args: any[]) => void): Promise<void>
|
|
4596
|
+
async setStorage(storage: ChaintracksStorageBulkFileApi, log: (...args: any[]) => void): Promise<void>
|
|
4627
4597
|
```
|
|
4628
4598
|
See also: [ChaintracksStorageBulkFileApi](./services.md#interface-chaintracksstoragebulkfileapi)
|
|
4629
4599
|
|
|
@@ -4638,8 +4608,8 @@ export class BulkFileDataReader {
|
|
|
4638
4608
|
readonly range: HeightRange;
|
|
4639
4609
|
readonly maxBufferSize: number;
|
|
4640
4610
|
nextHeight: number;
|
|
4641
|
-
constructor(manager: BulkFileDataManager, range: HeightRange, maxBufferSize: number)
|
|
4642
|
-
async read(): Promise<Uint8Array | undefined>
|
|
4611
|
+
constructor(manager: BulkFileDataManager, range: HeightRange, maxBufferSize: number)
|
|
4612
|
+
async read(): Promise<Uint8Array | undefined>
|
|
4643
4613
|
}
|
|
4644
4614
|
```
|
|
4645
4615
|
|
|
@@ -4648,7 +4618,7 @@ See also: [BulkFileDataManager](./services.md#class-bulkfiledatamanager), [Heigh
|
|
|
4648
4618
|
###### Method read
|
|
4649
4619
|
|
|
4650
4620
|
```ts
|
|
4651
|
-
async read(): Promise<Uint8Array | undefined>
|
|
4621
|
+
async read(): Promise<Uint8Array | undefined>
|
|
4652
4622
|
```
|
|
4653
4623
|
|
|
4654
4624
|
Returns
|
|
@@ -4667,7 +4637,7 @@ a replacement that cannot be validated.
|
|
|
4667
4637
|
|
|
4668
4638
|
```ts
|
|
4669
4639
|
export class BulkFileDataValidationError extends Error {
|
|
4670
|
-
constructor(message: string, public readonly data?: Uint8Array)
|
|
4640
|
+
constructor(message: string, public readonly data?: Uint8Array)
|
|
4671
4641
|
}
|
|
4672
4642
|
```
|
|
4673
4643
|
|
|
@@ -4685,18 +4655,18 @@ export class BulkFilesReader {
|
|
|
4685
4655
|
range: HeightRange;
|
|
4686
4656
|
maxBufferSize = 400 * 80;
|
|
4687
4657
|
nextHeight: number | undefined;
|
|
4688
|
-
constructor(files: BulkHeaderFile[], range?: HeightRange, maxBufferSize?: number)
|
|
4689
|
-
protected setRange(range?: HeightRange)
|
|
4690
|
-
setMaxBufferSize(maxBufferSize: number | undefined)
|
|
4691
|
-
get heightRange(): HeightRange
|
|
4692
|
-
async readBufferForHeightOrUndefined(height: number): Promise<Uint8Array | undefined>
|
|
4693
|
-
async readBufferForHeight(height: number): Promise<Uint8Array>
|
|
4694
|
-
async readHeaderForHeight(height: number): Promise<BaseBlockHeader>
|
|
4695
|
-
async readHeaderForHeightOrUndefined(height: number): Promise<BaseBlockHeader | undefined>
|
|
4696
|
-
async read(): Promise<Uint8Array | undefined>
|
|
4697
|
-
resetRange(range: HeightRange, maxBufferSize?: number)
|
|
4698
|
-
async validateFiles(): Promise<void>
|
|
4699
|
-
async exportHeadersToFs(toFs: ChaintracksFsApi, toHeadersPerFile: number, toFolder: string): Promise<void>
|
|
4658
|
+
constructor(files: BulkHeaderFile[], range?: HeightRange, maxBufferSize?: number)
|
|
4659
|
+
protected setRange(range?: HeightRange)
|
|
4660
|
+
setMaxBufferSize(maxBufferSize: number | undefined)
|
|
4661
|
+
get heightRange(): HeightRange
|
|
4662
|
+
async readBufferForHeightOrUndefined(height: number): Promise<Uint8Array | undefined>
|
|
4663
|
+
async readBufferForHeight(height: number): Promise<Uint8Array>
|
|
4664
|
+
async readHeaderForHeight(height: number): Promise<BaseBlockHeader>
|
|
4665
|
+
async readHeaderForHeightOrUndefined(height: number): Promise<BaseBlockHeader | undefined>
|
|
4666
|
+
async read(): Promise<Uint8Array | undefined>
|
|
4667
|
+
resetRange(range: HeightRange, maxBufferSize?: number)
|
|
4668
|
+
async validateFiles(): Promise<void>
|
|
4669
|
+
async exportHeadersToFs(toFs: ChaintracksFsApi, toHeadersPerFile: number, toFolder: string): Promise<void>
|
|
4700
4670
|
}
|
|
4701
4671
|
```
|
|
4702
4672
|
|
|
@@ -4739,7 +4709,7 @@ See also: [HeightRange](./services.md#class-heightrange)
|
|
|
4739
4709
|
###### Method read
|
|
4740
4710
|
|
|
4741
4711
|
```ts
|
|
4742
|
-
async read(): Promise<Uint8Array | undefined>
|
|
4712
|
+
async read(): Promise<Uint8Array | undefined>
|
|
4743
4713
|
```
|
|
4744
4714
|
|
|
4745
4715
|
Returns
|
|
@@ -4751,7 +4721,7 @@ an array containing the next `maxBufferSize` bytes of headers from the files.
|
|
|
4751
4721
|
Reset the reading process and adjust the range to be read to a new subset of what's available...
|
|
4752
4722
|
|
|
4753
4723
|
```ts
|
|
4754
|
-
resetRange(range: HeightRange, maxBufferSize?: number)
|
|
4724
|
+
resetRange(range: HeightRange, maxBufferSize?: number)
|
|
4755
4725
|
```
|
|
4756
4726
|
See also: [HeightRange](./services.md#class-heightrange)
|
|
4757
4727
|
|
|
@@ -4769,10 +4739,10 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
4769
4739
|
|
|
4770
4740
|
```ts
|
|
4771
4741
|
export class BulkFilesReaderFs extends BulkFilesReader {
|
|
4772
|
-
constructor(public fs: ChaintracksFsApi, files: BulkHeaderFileFs[], range?: HeightRange, maxBufferSize?: number)
|
|
4773
|
-
static async fromFs(fs: ChaintracksFsApi, rootFolder: string, jsonFilename: string, range?: HeightRange, maxBufferSize?: number): Promise<BulkFilesReaderFs>
|
|
4774
|
-
static async writeEmptyJsonFile(fs: ChaintracksFsApi, rootFolder: string, jsonFilename: string): Promise<string>
|
|
4775
|
-
static async readJsonFile(fs: ChaintracksFsApi, rootFolder: string, jsonFilename: string, failToEmptyRange: boolean = true): Promise<BulkHeaderFilesInfo>
|
|
4742
|
+
constructor(public fs: ChaintracksFsApi, files: BulkHeaderFileFs[], range?: HeightRange, maxBufferSize?: number)
|
|
4743
|
+
static async fromFs(fs: ChaintracksFsApi, rootFolder: string, jsonFilename: string, range?: HeightRange, maxBufferSize?: number): Promise<BulkFilesReaderFs>
|
|
4744
|
+
static async writeEmptyJsonFile(fs: ChaintracksFsApi, rootFolder: string, jsonFilename: string): Promise<string>
|
|
4745
|
+
static async readJsonFile(fs: ChaintracksFsApi, rootFolder: string, jsonFilename: string, failToEmptyRange: boolean = true): Promise<BulkHeaderFilesInfo>
|
|
4776
4746
|
}
|
|
4777
4747
|
```
|
|
4778
4748
|
|
|
@@ -4783,7 +4753,7 @@ See also: [BulkFilesReader](./services.md#class-bulkfilesreader), [BulkHeaderFil
|
|
|
4783
4753
|
Return a BulkFilesReader configured to access the intersection of `range` and available headers.
|
|
4784
4754
|
|
|
4785
4755
|
```ts
|
|
4786
|
-
static async fromFs(fs: ChaintracksFsApi, rootFolder: string, jsonFilename: string, range?: HeightRange, maxBufferSize?: number): Promise<BulkFilesReaderFs>
|
|
4756
|
+
static async fromFs(fs: ChaintracksFsApi, rootFolder: string, jsonFilename: string, range?: HeightRange, maxBufferSize?: number): Promise<BulkFilesReaderFs>
|
|
4787
4757
|
```
|
|
4788
4758
|
See also: [BulkFilesReaderFs](./services.md#class-bulkfilesreaderfs), [ChaintracksFsApi](./services.md#interface-chaintracksfsapi), [HeightRange](./services.md#class-heightrange)
|
|
4789
4759
|
|
|
@@ -4794,8 +4764,8 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
4794
4764
|
|
|
4795
4765
|
```ts
|
|
4796
4766
|
export class BulkFilesReaderStorage extends BulkFilesReader {
|
|
4797
|
-
constructor(storage: ChaintracksStorageBase, files: BulkHeaderFileStorage[], range?: HeightRange, maxBufferSize?: number)
|
|
4798
|
-
static async fromStorage(storage: ChaintracksStorageBase, fetch?: ChaintracksFetchApi, range?: HeightRange, maxBufferSize?: number): Promise<BulkFilesReaderStorage>
|
|
4767
|
+
constructor(storage: ChaintracksStorageBase, files: BulkHeaderFileStorage[], range?: HeightRange, maxBufferSize?: number)
|
|
4768
|
+
static async fromStorage(storage: ChaintracksStorageBase, fetch?: ChaintracksFetchApi, range?: HeightRange, maxBufferSize?: number): Promise<BulkFilesReaderStorage>
|
|
4799
4769
|
}
|
|
4800
4770
|
```
|
|
4801
4771
|
|
|
@@ -4821,15 +4791,15 @@ export abstract class BulkHeaderFile implements BulkHeaderFileInfo {
|
|
|
4821
4791
|
prevHash: string;
|
|
4822
4792
|
sourceUrl?: string;
|
|
4823
4793
|
validated?: boolean;
|
|
4824
|
-
constructor(info: BulkHeaderFileInfo)
|
|
4794
|
+
constructor(info: BulkHeaderFileInfo)
|
|
4825
4795
|
abstract readDataFromFile(length: number, offset: number): Promise<Uint8Array | undefined>;
|
|
4826
|
-
protected validateReadBounds(length: number, offset: number): void
|
|
4827
|
-
get heightRange(): HeightRange
|
|
4828
|
-
async ensureData(): Promise<Uint8Array>
|
|
4829
|
-
async computeFileHash(): Promise<string>
|
|
4830
|
-
async releaseData(): Promise<void>
|
|
4831
|
-
toCdnInfo(): BulkHeaderFileInfo
|
|
4832
|
-
toStorageInfo(): BulkHeaderFileInfo
|
|
4796
|
+
protected validateReadBounds(length: number, offset: number): void
|
|
4797
|
+
get heightRange(): HeightRange
|
|
4798
|
+
async ensureData(): Promise<Uint8Array>
|
|
4799
|
+
async computeFileHash(): Promise<string>
|
|
4800
|
+
async releaseData(): Promise<void>
|
|
4801
|
+
toCdnInfo(): BulkHeaderFileInfo
|
|
4802
|
+
toStorageInfo(): BulkHeaderFileInfo
|
|
4833
4803
|
}
|
|
4834
4804
|
```
|
|
4835
4805
|
|
|
@@ -4840,7 +4810,7 @@ See also: [BulkHeaderFileInfo](./services.md#interface-bulkheaderfileinfo), [Cha
|
|
|
4840
4810
|
Whenever reloading data from a backing store, validated fileHash must be re-verified
|
|
4841
4811
|
|
|
4842
4812
|
```ts
|
|
4843
|
-
async computeFileHash(): Promise<string>
|
|
4813
|
+
async computeFileHash(): Promise<string>
|
|
4844
4814
|
```
|
|
4845
4815
|
|
|
4846
4816
|
Returns
|
|
@@ -4854,9 +4824,9 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
4854
4824
|
|
|
4855
4825
|
```ts
|
|
4856
4826
|
export class BulkHeaderFileFs extends BulkHeaderFile {
|
|
4857
|
-
constructor(info: BulkHeaderFileInfo, public fs: ChaintracksFsApi, public rootFolder: string)
|
|
4858
|
-
override async readDataFromFile(length: number, offset: number): Promise<Uint8Array | undefined>
|
|
4859
|
-
override async ensureData(): Promise<Uint8Array>
|
|
4827
|
+
constructor(info: BulkHeaderFileInfo, public fs: ChaintracksFsApi, public rootFolder: string)
|
|
4828
|
+
override async readDataFromFile(length: number, offset: number): Promise<Uint8Array | undefined>
|
|
4829
|
+
override async ensureData(): Promise<Uint8Array>
|
|
4860
4830
|
}
|
|
4861
4831
|
```
|
|
4862
4832
|
|
|
@@ -4869,9 +4839,9 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
4869
4839
|
|
|
4870
4840
|
```ts
|
|
4871
4841
|
export class BulkHeaderFileStorage extends BulkHeaderFile {
|
|
4872
|
-
constructor(info: BulkHeaderFileInfo, public storage: ChaintracksStorageBase, public fetch?: ChaintracksFetchApi)
|
|
4873
|
-
override async readDataFromFile(length: number, offset: number): Promise<Uint8Array | undefined>
|
|
4874
|
-
override async ensureData(): Promise<Uint8Array>
|
|
4842
|
+
constructor(info: BulkHeaderFileInfo, public storage: ChaintracksStorageBase, public fetch?: ChaintracksFetchApi)
|
|
4843
|
+
override async readDataFromFile(length: number, offset: number): Promise<Uint8Array | undefined>
|
|
4844
|
+
override async ensureData(): Promise<Uint8Array>
|
|
4875
4845
|
}
|
|
4876
4846
|
```
|
|
4877
4847
|
|
|
@@ -4884,7 +4854,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
4884
4854
|
|
|
4885
4855
|
```ts
|
|
4886
4856
|
export abstract class BulkHeaderFiles implements BulkHeaderFilesInfo {
|
|
4887
|
-
constructor(public rootFolder: string, public jsonFilename: string, public files: BulkHeaderFileInfo[], public headersPerFile: number)
|
|
4857
|
+
constructor(public rootFolder: string, public jsonFilename: string, public files: BulkHeaderFileInfo[], public headersPerFile: number)
|
|
4888
4858
|
}
|
|
4889
4859
|
```
|
|
4890
4860
|
|
|
@@ -4897,19 +4867,19 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
4897
4867
|
|
|
4898
4868
|
```ts
|
|
4899
4869
|
export abstract class BulkIngestorBase implements BulkIngestorApi {
|
|
4900
|
-
static createBulkIngestorBaseOptions(chain: Chain)
|
|
4870
|
+
static createBulkIngestorBaseOptions(chain: Chain)
|
|
4901
4871
|
chain: Chain;
|
|
4902
4872
|
jsonFilename: string;
|
|
4903
4873
|
log: (...args: any[]) => void = () => { };
|
|
4904
|
-
constructor(options: BulkIngestorBaseOptions)
|
|
4905
|
-
async setStorage(storage: ChaintracksStorageBase, log: (...args: any[]) => void): Promise<void>
|
|
4906
|
-
async shutdown(): Promise<void>
|
|
4907
|
-
storageOrUndefined(): ChaintracksStorageApi | undefined
|
|
4908
|
-
storage(): ChaintracksStorageBase
|
|
4874
|
+
constructor(options: BulkIngestorBaseOptions)
|
|
4875
|
+
async setStorage(storage: ChaintracksStorageBase, log: (...args: any[]) => void): Promise<void>
|
|
4876
|
+
async shutdown(): Promise<void>
|
|
4877
|
+
storageOrUndefined(): ChaintracksStorageApi | undefined
|
|
4878
|
+
storage(): ChaintracksStorageBase
|
|
4909
4879
|
filesInfo: BulkHeaderFilesInfo | undefined;
|
|
4910
|
-
async getPresentHeight(): Promise<number | undefined>
|
|
4880
|
+
async getPresentHeight(): Promise<number | undefined>
|
|
4911
4881
|
abstract fetchHeaders(before: HeightRanges, fetchRange: HeightRange, bulkRange: HeightRange, priorLiveHeaders: BlockHeader[]): Promise<BlockHeader[]>;
|
|
4912
|
-
async synchronize(presentHeight: number, before: HeightRanges, priorLiveHeaders: BlockHeader[]): Promise<BulkSyncResult>
|
|
4882
|
+
async synchronize(presentHeight: number, before: HeightRanges, priorLiveHeaders: BlockHeader[]): Promise<BulkSyncResult>
|
|
4913
4883
|
}
|
|
4914
4884
|
```
|
|
4915
4885
|
|
|
@@ -4927,7 +4897,7 @@ See also: [BulkHeaderFilesInfo](./services.md#interface-bulkheaderfilesinfo)
|
|
|
4927
4897
|
###### Method createBulkIngestorBaseOptions
|
|
4928
4898
|
|
|
4929
4899
|
```ts
|
|
4930
|
-
static createBulkIngestorBaseOptions(chain: Chain)
|
|
4900
|
+
static createBulkIngestorBaseOptions(chain: Chain)
|
|
4931
4901
|
```
|
|
4932
4902
|
See also: [Chain](./client.md#type-chain)
|
|
4933
4903
|
|
|
@@ -4969,7 +4939,7 @@ Argument Details
|
|
|
4969
4939
|
At least one derived BulkIngestor must override this method to provide the current height of the active chain tip.
|
|
4970
4940
|
|
|
4971
4941
|
```ts
|
|
4972
|
-
async getPresentHeight(): Promise<number | undefined>
|
|
4942
|
+
async getPresentHeight(): Promise<number | undefined>
|
|
4973
4943
|
```
|
|
4974
4944
|
|
|
4975
4945
|
Returns
|
|
@@ -4983,7 +4953,7 @@ A BulkIngestor has two potential goals:
|
|
|
4983
4953
|
2. To source missing live headers to be forwarded to live storage.
|
|
4984
4954
|
|
|
4985
4955
|
```ts
|
|
4986
|
-
async synchronize(presentHeight: number, before: HeightRanges, priorLiveHeaders: BlockHeader[]): Promise<BulkSyncResult>
|
|
4956
|
+
async synchronize(presentHeight: number, before: HeightRanges, priorLiveHeaders: BlockHeader[]): Promise<BulkSyncResult>
|
|
4987
4957
|
```
|
|
4988
4958
|
See also: [BlockHeader](./client.md#interface-blockheader), [BulkSyncResult](./services.md#interface-bulksyncresult), [HeightRanges](./services.md#interface-heightranges)
|
|
4989
4959
|
|
|
@@ -5007,7 +4977,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
5007
4977
|
|
|
5008
4978
|
```ts
|
|
5009
4979
|
export class BulkIngestorCDN extends BulkIngestorBase {
|
|
5010
|
-
static createBulkIngestorCDNOptions(chain: Chain, cdnUrl: string, fetch: ChaintracksFetchApi, maxPerFile?: number): BulkIngestorCDNOptions
|
|
4980
|
+
static createBulkIngestorCDNOptions(chain: Chain, cdnUrl: string, fetch: ChaintracksFetchApi, maxPerFile?: number): BulkIngestorCDNOptions
|
|
5011
4981
|
fetch: ChaintracksFetchApi;
|
|
5012
4982
|
jsonResource: string;
|
|
5013
4983
|
cdnUrl: string;
|
|
@@ -5015,10 +4985,10 @@ export class BulkIngestorCDN extends BulkIngestorBase {
|
|
|
5015
4985
|
availableBulkFiles: BulkHeaderFilesInfo | undefined;
|
|
5016
4986
|
selectedFiles: BulkHeaderFileInfo[] | undefined;
|
|
5017
4987
|
currentRange: HeightRange | undefined;
|
|
5018
|
-
constructor(options: BulkIngestorCDNOptions)
|
|
5019
|
-
override async getPresentHeight(): Promise<number | undefined>
|
|
5020
|
-
getJsonHttpHeaders(): Record<string, string>
|
|
5021
|
-
async fetchHeaders(before: HeightRanges, fetchRange: HeightRange, bulkRange: HeightRange, priorLiveHeaders: BlockHeader[]): Promise<BlockHeader[]>
|
|
4988
|
+
constructor(options: BulkIngestorCDNOptions)
|
|
4989
|
+
override async getPresentHeight(): Promise<number | undefined>
|
|
4990
|
+
getJsonHttpHeaders(): Record<string, string>
|
|
4991
|
+
async fetchHeaders(before: HeightRanges, fetchRange: HeightRange, bulkRange: HeightRange, priorLiveHeaders: BlockHeader[]): Promise<BlockHeader[]>
|
|
5022
4992
|
}
|
|
5023
4993
|
```
|
|
5024
4994
|
|
|
@@ -5027,7 +4997,7 @@ See also: [BlockHeader](./client.md#interface-blockheader), [BulkHeaderFileInfo]
|
|
|
5027
4997
|
###### Method createBulkIngestorCDNOptions
|
|
5028
4998
|
|
|
5029
4999
|
```ts
|
|
5030
|
-
static createBulkIngestorCDNOptions(chain: Chain, cdnUrl: string, fetch: ChaintracksFetchApi, maxPerFile?: number): BulkIngestorCDNOptions
|
|
5000
|
+
static createBulkIngestorCDNOptions(chain: Chain, cdnUrl: string, fetch: ChaintracksFetchApi, maxPerFile?: number): BulkIngestorCDNOptions
|
|
5031
5001
|
```
|
|
5032
5002
|
See also: [BulkIngestorCDNOptions](./services.md#interface-bulkingestorcdnoptions), [Chain](./client.md#type-chain), [ChaintracksFetchApi](./services.md#interface-chaintracksfetchapi)
|
|
5033
5003
|
|
|
@@ -5062,7 +5032,7 @@ Context Replace:
|
|
|
5062
5032
|
- Proceed as context Incremental.
|
|
5063
5033
|
|
|
5064
5034
|
```ts
|
|
5065
|
-
async fetchHeaders(before: HeightRanges, fetchRange: HeightRange, bulkRange: HeightRange, priorLiveHeaders: BlockHeader[]): Promise<BlockHeader[]>
|
|
5035
|
+
async fetchHeaders(before: HeightRanges, fetchRange: HeightRange, bulkRange: HeightRange, priorLiveHeaders: BlockHeader[]): Promise<BlockHeader[]>
|
|
5066
5036
|
```
|
|
5067
5037
|
See also: [BlockHeader](./client.md#interface-blockheader), [HeightRange](./services.md#class-heightrange), [HeightRanges](./services.md#interface-heightranges)
|
|
5068
5038
|
|
|
@@ -5082,7 +5052,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
5082
5052
|
|
|
5083
5053
|
```ts
|
|
5084
5054
|
export class BulkIngestorCDNBabbage extends BulkIngestorCDN {
|
|
5085
|
-
static createBulkIngestorCDNBabbageOptions(chain: Chain, fetch: ChaintracksFetchApi): BulkIngestorCDNOptions
|
|
5055
|
+
static createBulkIngestorCDNBabbageOptions(chain: Chain, fetch: ChaintracksFetchApi): BulkIngestorCDNOptions
|
|
5086
5056
|
}
|
|
5087
5057
|
```
|
|
5088
5058
|
|
|
@@ -5091,7 +5061,7 @@ See also: [BulkIngestorCDN](./services.md#class-bulkingestorcdn), [BulkIngestorC
|
|
|
5091
5061
|
###### Method createBulkIngestorCDNBabbageOptions
|
|
5092
5062
|
|
|
5093
5063
|
```ts
|
|
5094
|
-
static createBulkIngestorCDNBabbageOptions(chain: Chain, fetch: ChaintracksFetchApi): BulkIngestorCDNOptions
|
|
5064
|
+
static createBulkIngestorCDNBabbageOptions(chain: Chain, fetch: ChaintracksFetchApi): BulkIngestorCDNOptions
|
|
5095
5065
|
```
|
|
5096
5066
|
See also: [BulkIngestorCDNOptions](./services.md#interface-bulkingestorcdnoptions), [Chain](./client.md#type-chain), [ChaintracksFetchApi](./services.md#interface-chaintracksfetchapi)
|
|
5097
5067
|
|
|
@@ -5111,9 +5081,9 @@ continuity, and genesis checks before storage.
|
|
|
5111
5081
|
|
|
5112
5082
|
```ts
|
|
5113
5083
|
export class BulkIngestorChaintracks extends BulkIngestorBase {
|
|
5114
|
-
constructor(options: BulkIngestorChaintracksOptions)
|
|
5115
|
-
override async getPresentHeight(): Promise<number>
|
|
5116
|
-
async fetchHeaders(_before: HeightRanges, fetchRange: HeightRange, bulkRange: HeightRange, priorLiveHeaders: BlockHeader[]): Promise<BlockHeader[]>
|
|
5084
|
+
constructor(options: BulkIngestorChaintracksOptions)
|
|
5085
|
+
override async getPresentHeight(): Promise<number>
|
|
5086
|
+
async fetchHeaders(_before: HeightRanges, fetchRange: HeightRange, bulkRange: HeightRange, priorLiveHeaders: BlockHeader[]): Promise<BlockHeader[]>
|
|
5117
5087
|
}
|
|
5118
5088
|
```
|
|
5119
5089
|
|
|
@@ -5126,14 +5096,14 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
5126
5096
|
|
|
5127
5097
|
```ts
|
|
5128
5098
|
export class BulkIngestorWhatsOnChainCdn extends BulkIngestorBase {
|
|
5129
|
-
static createBulkIngestorWhatsOnChainOptions(chain: Chain): BulkIngestorWhatsOnChainOptions
|
|
5099
|
+
static createBulkIngestorWhatsOnChainOptions(chain: Chain): BulkIngestorWhatsOnChainOptions
|
|
5130
5100
|
fetch: ChaintracksFetchApi;
|
|
5131
5101
|
idleWait: number;
|
|
5132
5102
|
woc: WhatsOnChainServices;
|
|
5133
5103
|
stopOldListenersToken: StopListenerToken = { stop: undefined };
|
|
5134
|
-
constructor(options: BulkIngestorWhatsOnChainOptions)
|
|
5135
|
-
override async getPresentHeight(): Promise<number | undefined>
|
|
5136
|
-
async fetchHeaders(before: HeightRanges, fetchRange: HeightRange, bulkRange: HeightRange, priorLiveHeaders: BlockHeader[]): Promise<BlockHeader[]>
|
|
5104
|
+
constructor(options: BulkIngestorWhatsOnChainOptions)
|
|
5105
|
+
override async getPresentHeight(): Promise<number | undefined>
|
|
5106
|
+
async fetchHeaders(before: HeightRanges, fetchRange: HeightRange, bulkRange: HeightRange, priorLiveHeaders: BlockHeader[]): Promise<BlockHeader[]>
|
|
5137
5107
|
}
|
|
5138
5108
|
```
|
|
5139
5109
|
|
|
@@ -5142,7 +5112,7 @@ See also: [BlockHeader](./client.md#interface-blockheader), [BulkIngestorBase](.
|
|
|
5142
5112
|
###### Method createBulkIngestorWhatsOnChainOptions
|
|
5143
5113
|
|
|
5144
5114
|
```ts
|
|
5145
|
-
static createBulkIngestorWhatsOnChainOptions(chain: Chain): BulkIngestorWhatsOnChainOptions
|
|
5115
|
+
static createBulkIngestorWhatsOnChainOptions(chain: Chain): BulkIngestorWhatsOnChainOptions
|
|
5146
5116
|
```
|
|
5147
5117
|
See also: [BulkIngestorWhatsOnChainOptions](./services.md#interface-bulkingestorwhatsonchainoptions), [Chain](./client.md#type-chain)
|
|
5148
5118
|
|
|
@@ -5158,14 +5128,14 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
5158
5128
|
|
|
5159
5129
|
```ts
|
|
5160
5130
|
export class BulkIngestorWhatsOnChainWs extends BulkIngestorBase {
|
|
5161
|
-
static createBulkIngestorWhatsOnChainOptions(chain: Chain): BulkIngestorWhatsOnChainOptions
|
|
5131
|
+
static createBulkIngestorWhatsOnChainOptions(chain: Chain): BulkIngestorWhatsOnChainOptions
|
|
5162
5132
|
idleWait: number;
|
|
5163
5133
|
maxHeadersPerRequest: number;
|
|
5164
5134
|
woc: WhatsOnChainServices;
|
|
5165
5135
|
stopOldListenersToken: StopListenerToken = { stop: undefined };
|
|
5166
|
-
constructor(options: BulkIngestorWhatsOnChainOptions)
|
|
5167
|
-
override async getPresentHeight(): Promise<number | undefined>
|
|
5168
|
-
async fetchHeaders(before: HeightRanges, fetchRange: HeightRange, bulkRange: HeightRange, priorLiveHeaders: BlockHeader[]): Promise<BlockHeader[]>
|
|
5136
|
+
constructor(options: BulkIngestorWhatsOnChainOptions)
|
|
5137
|
+
override async getPresentHeight(): Promise<number | undefined>
|
|
5138
|
+
async fetchHeaders(before: HeightRanges, fetchRange: HeightRange, bulkRange: HeightRange, priorLiveHeaders: BlockHeader[]): Promise<BlockHeader[]>
|
|
5169
5139
|
}
|
|
5170
5140
|
```
|
|
5171
5141
|
|
|
@@ -5174,7 +5144,7 @@ See also: [BlockHeader](./client.md#interface-blockheader), [BulkIngestorBase](.
|
|
|
5174
5144
|
###### Method createBulkIngestorWhatsOnChainOptions
|
|
5175
5145
|
|
|
5176
5146
|
```ts
|
|
5177
|
-
static createBulkIngestorWhatsOnChainOptions(chain: Chain): BulkIngestorWhatsOnChainOptions
|
|
5147
|
+
static createBulkIngestorWhatsOnChainOptions(chain: Chain): BulkIngestorWhatsOnChainOptions
|
|
5178
5148
|
```
|
|
5179
5149
|
See also: [BulkIngestorWhatsOnChainOptions](./services.md#interface-bulkingestorwhatsonchainoptions), [Chain](./client.md#type-chain)
|
|
5180
5150
|
|
|
@@ -5190,20 +5160,20 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
5190
5160
|
|
|
5191
5161
|
```ts
|
|
5192
5162
|
export abstract class BulkStorageBase implements BulkStorageApi {
|
|
5193
|
-
static createBulkStorageBaseOptions(chain: Chain, fs: ChaintracksFsApi): BulkStorageBaseOptions
|
|
5163
|
+
static createBulkStorageBaseOptions(chain: Chain, fs: ChaintracksFsApi): BulkStorageBaseOptions
|
|
5194
5164
|
chain: Chain;
|
|
5195
5165
|
fs: ChaintracksFsApi;
|
|
5196
5166
|
log: (...args: any[]) => void = () => { };
|
|
5197
|
-
constructor(options: BulkStorageBaseOptions)
|
|
5198
|
-
async shutdown(): Promise<void>
|
|
5167
|
+
constructor(options: BulkStorageBaseOptions)
|
|
5168
|
+
async shutdown(): Promise<void>
|
|
5199
5169
|
abstract appendHeaders(minHeight: number, count: number, newBulkHeaders: Uint8Array): Promise<void>;
|
|
5200
5170
|
abstract getMaxHeight(): Promise<number>;
|
|
5201
5171
|
abstract headersToBuffer(height: number, count: number): Promise<Uint8Array>;
|
|
5202
5172
|
abstract findHeaderForHeightOrUndefined(height: number): Promise<BlockHeader | undefined>;
|
|
5203
|
-
async findHeaderForHeight(height: number): Promise<BlockHeader>
|
|
5204
|
-
async getHeightRange(): Promise<HeightRange>
|
|
5205
|
-
async setStorage(storage: ChaintracksStorageBase, log: (...args: any[]) => void): Promise<void>
|
|
5206
|
-
async exportBulkHeaders(rootFolder: string, jsonFilename: string, maxPerFile: number): Promise<void>
|
|
5173
|
+
async findHeaderForHeight(height: number): Promise<BlockHeader>
|
|
5174
|
+
async getHeightRange(): Promise<HeightRange>
|
|
5175
|
+
async setStorage(storage: ChaintracksStorageBase, log: (...args: any[]) => void): Promise<void>
|
|
5176
|
+
async exportBulkHeaders(rootFolder: string, jsonFilename: string, maxPerFile: number): Promise<void>
|
|
5207
5177
|
}
|
|
5208
5178
|
```
|
|
5209
5179
|
|
|
@@ -5216,37 +5186,37 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
5216
5186
|
|
|
5217
5187
|
```ts
|
|
5218
5188
|
export class Chaintracks implements ChaintracksManagementApi {
|
|
5219
|
-
static createOptions(chain: Chain): ChaintracksOptions
|
|
5189
|
+
static createOptions(chain: Chain): ChaintracksOptions
|
|
5220
5190
|
log: (...args: any[]) => void = () => { };
|
|
5221
5191
|
readonly chain: Chain;
|
|
5222
5192
|
readonly readonly: boolean;
|
|
5223
|
-
constructor(public options: ChaintracksOptions)
|
|
5224
|
-
async getChain(): Promise<Chain>
|
|
5225
|
-
async getPresentHeight(): Promise<number>
|
|
5226
|
-
async currentHeight(): Promise<number>
|
|
5227
|
-
getAvailabilitySnapshot(): ChaintracksAvailabilitySnapshotApi
|
|
5228
|
-
async subscribeHeaders(listener: HeaderListener): Promise<string>
|
|
5229
|
-
async subscribeReorgs(listener: ReorgListener): Promise<string>
|
|
5230
|
-
async unsubscribe(subscriptionId: string): Promise<boolean>
|
|
5231
|
-
async addHeader(header: BaseBlockHeader): Promise<void>
|
|
5232
|
-
async makeAvailable(): Promise<void>
|
|
5233
|
-
async startPromises(): Promise<void>
|
|
5234
|
-
async destroy(): Promise<void>
|
|
5235
|
-
async listening(): Promise<void>
|
|
5236
|
-
async isListening(): Promise<boolean>
|
|
5237
|
-
async isSynchronized(): Promise<boolean>
|
|
5238
|
-
async findHeaderForHeight(height: number): Promise<BlockHeader | undefined>
|
|
5239
|
-
async findHeaderForBlockHash(hash: string): Promise<BlockHeader | undefined>
|
|
5240
|
-
async isValidRootForHeight(root: string, height: number): Promise<boolean>
|
|
5241
|
-
async getInfo(): Promise<ChaintracksInfoApi>
|
|
5242
|
-
async getHeaders(height: number, count: number): Promise<string>
|
|
5243
|
-
async findChainTipHeader(): Promise<BlockHeader>
|
|
5244
|
-
async findChainTipHash(): Promise<string>
|
|
5245
|
-
async findLiveHeaderForBlockHash(hash: string): Promise<LiveBlockHeader | undefined>
|
|
5246
|
-
async findChainWorkForBlockHash(hash: string): Promise<string | undefined>
|
|
5247
|
-
async validate(): Promise<boolean>
|
|
5248
|
-
async exportBulkHeaders(toFolder: string, toFs: ChaintracksFsApi, sourceUrl?: string, toHeadersPerFile?: number, maxHeight?: number): Promise<void>
|
|
5249
|
-
async startListening(): Promise<void>
|
|
5193
|
+
constructor(public options: ChaintracksOptions)
|
|
5194
|
+
async getChain(): Promise<Chain>
|
|
5195
|
+
async getPresentHeight(): Promise<number>
|
|
5196
|
+
async currentHeight(): Promise<number>
|
|
5197
|
+
getAvailabilitySnapshot(): ChaintracksAvailabilitySnapshotApi
|
|
5198
|
+
async subscribeHeaders(listener: HeaderListener): Promise<string>
|
|
5199
|
+
async subscribeReorgs(listener: ReorgListener): Promise<string>
|
|
5200
|
+
async unsubscribe(subscriptionId: string): Promise<boolean>
|
|
5201
|
+
async addHeader(header: BaseBlockHeader): Promise<void>
|
|
5202
|
+
async makeAvailable(): Promise<void>
|
|
5203
|
+
async startPromises(): Promise<void>
|
|
5204
|
+
async destroy(): Promise<void>
|
|
5205
|
+
async listening(): Promise<void>
|
|
5206
|
+
async isListening(): Promise<boolean>
|
|
5207
|
+
async isSynchronized(): Promise<boolean>
|
|
5208
|
+
async findHeaderForHeight(height: number): Promise<BlockHeader | undefined>
|
|
5209
|
+
async findHeaderForBlockHash(hash: string): Promise<BlockHeader | undefined>
|
|
5210
|
+
async isValidRootForHeight(root: string, height: number): Promise<boolean>
|
|
5211
|
+
async getInfo(): Promise<ChaintracksInfoApi>
|
|
5212
|
+
async getHeaders(height: number, count: number): Promise<string>
|
|
5213
|
+
async findChainTipHeader(): Promise<BlockHeader>
|
|
5214
|
+
async findChainTipHash(): Promise<string>
|
|
5215
|
+
async findLiveHeaderForBlockHash(hash: string): Promise<LiveBlockHeader | undefined>
|
|
5216
|
+
async findChainWorkForBlockHash(hash: string): Promise<string | undefined>
|
|
5217
|
+
async validate(): Promise<boolean>
|
|
5218
|
+
async exportBulkHeaders(toFolder: string, toFs: ChaintracksFsApi, sourceUrl?: string, toHeadersPerFile?: number, maxHeight?: number): Promise<void>
|
|
5219
|
+
async startListening(): Promise<void>
|
|
5250
5220
|
private async syncBulkStorageNoLock(presentHeight: number, initialRanges: HeightRanges): Promise<void> {
|
|
5251
5221
|
let newLiveHeaders: BlockHeader[] = [];
|
|
5252
5222
|
let before = initialRanges;
|
|
@@ -5324,7 +5294,7 @@ bulk ingestors will be attempted to resolve the linkage up to a depth of `addLiv
|
|
|
5324
5294
|
Headers are considered in the order they were added.
|
|
5325
5295
|
|
|
5326
5296
|
```ts
|
|
5327
|
-
async addHeader(header: BaseBlockHeader): Promise<void>
|
|
5297
|
+
async addHeader(header: BaseBlockHeader): Promise<void>
|
|
5328
5298
|
```
|
|
5329
5299
|
See also: [BaseBlockHeader](./client.md#interface-baseblockheader)
|
|
5330
5300
|
|
|
@@ -5333,7 +5303,7 @@ See also: [BaseBlockHeader](./client.md#interface-baseblockheader)
|
|
|
5333
5303
|
Returns local process state without locks, storage reads, or network I/O.
|
|
5334
5304
|
|
|
5335
5305
|
```ts
|
|
5336
|
-
getAvailabilitySnapshot(): ChaintracksAvailabilitySnapshotApi
|
|
5306
|
+
getAvailabilitySnapshot(): ChaintracksAvailabilitySnapshotApi
|
|
5337
5307
|
```
|
|
5338
5308
|
See also: [ChaintracksAvailabilitySnapshotApi](./services.md#interface-chaintracksavailabilitysnapshotapi)
|
|
5339
5309
|
|
|
@@ -5343,7 +5313,7 @@ Returns the last known valid height immediately and refreshes stale state
|
|
|
5343
5313
|
once in the background. Cold start waits for the single shared refresh.
|
|
5344
5314
|
|
|
5345
5315
|
```ts
|
|
5346
|
-
async getPresentHeight(): Promise<number>
|
|
5316
|
+
async getPresentHeight(): Promise<number>
|
|
5347
5317
|
```
|
|
5348
5318
|
|
|
5349
5319
|
###### Method makeAvailable
|
|
@@ -5355,7 +5325,7 @@ Note that the main thread continues running and takes additional write locks
|
|
|
5355
5325
|
itself when already available.
|
|
5356
5326
|
|
|
5357
5327
|
```ts
|
|
5358
|
-
async makeAvailable(): Promise<void>
|
|
5328
|
+
async makeAvailable(): Promise<void>
|
|
5359
5329
|
```
|
|
5360
5330
|
|
|
5361
5331
|
Returns
|
|
@@ -5365,7 +5335,7 @@ when available for client requests
|
|
|
5365
5335
|
###### Method validate
|
|
5366
5336
|
|
|
5367
5337
|
```ts
|
|
5368
|
-
async validate(): Promise<boolean>
|
|
5338
|
+
async validate(): Promise<boolean>
|
|
5369
5339
|
```
|
|
5370
5340
|
|
|
5371
5341
|
Returns
|
|
@@ -5379,8 +5349,8 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
5379
5349
|
|
|
5380
5350
|
```ts
|
|
5381
5351
|
export class ChaintracksAppendableFile extends ChaintracksFolderAwareFile implements ChaintracksAppendableFileApi {
|
|
5382
|
-
static async openAsAppendable(path: string): Promise<ChaintracksAppendableFile>
|
|
5383
|
-
async append(data: Uint8Array): Promise<void>
|
|
5352
|
+
static async openAsAppendable(path: string): Promise<ChaintracksAppendableFile>
|
|
5353
|
+
async append(data: Uint8Array): Promise<void>
|
|
5384
5354
|
}
|
|
5385
5355
|
```
|
|
5386
5356
|
|
|
@@ -5393,38 +5363,18 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
5393
5363
|
|
|
5394
5364
|
```ts
|
|
5395
5365
|
export class ChaintracksChainTracker implements ChainTracker {
|
|
5366
|
+
chaintracks: ChaintracksClientApi;
|
|
5396
5367
|
cache: Record<number, string>;
|
|
5397
5368
|
options: ChaintracksChainTrackerOptions;
|
|
5398
5369
|
readonly telemetry: Telemetry;
|
|
5399
|
-
constructor(chain?: Chain, chaintracks?: ChaintracksClientApi, options?: ChaintracksChainTrackerOptions)
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
getVerificationContext(): string
|
|
5403
|
-
async getVerificationContextToken(signal?: AbortSignal): Promise<string>
|
|
5404
|
-
async dispose(): Promise<void>
|
|
5405
|
-
async currentHeight(signal?: AbortSignal): Promise<number>
|
|
5406
|
-
async isValidRootForHeight(root: string, height: number, signal?: AbortSignal): Promise<boolean>
|
|
5370
|
+
constructor(chain?: Chain, chaintracks?: ChaintracksClientApi, options?: ChaintracksChainTrackerOptions)
|
|
5371
|
+
async currentHeight(): Promise<number>
|
|
5372
|
+
async isValidRootForHeight(root: string, height: number): Promise<boolean>
|
|
5407
5373
|
}
|
|
5408
5374
|
```
|
|
5409
5375
|
|
|
5410
5376
|
See also: [Chain](./client.md#type-chain), [ChaintracksChainTrackerOptions](./services.md#interface-chaintrackschaintrackeroptions), [ChaintracksClientApi](./services.md#interface-chaintracksclientapi)
|
|
5411
5377
|
|
|
5412
|
-
###### Method getVerificationContext
|
|
5413
|
-
|
|
5414
|
-
Local provider-generation marker for consumers that invalidate derived verdicts.
|
|
5415
|
-
|
|
5416
|
-
```ts
|
|
5417
|
-
getVerificationContext(): string
|
|
5418
|
-
```
|
|
5419
|
-
|
|
5420
|
-
###### Method getVerificationContextToken
|
|
5421
|
-
|
|
5422
|
-
Fresh provider-bound canonical tip token; unlike the stable context, normal tip advances change it.
|
|
5423
|
-
|
|
5424
|
-
```ts
|
|
5425
|
-
async getVerificationContextToken(signal?: AbortSignal): Promise<string>
|
|
5426
|
-
```
|
|
5427
|
-
|
|
5428
5378
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5429
5379
|
|
|
5430
5380
|
---
|
|
@@ -5439,10 +5389,10 @@ every materialized response has an explicit byte ceiling.
|
|
|
5439
5389
|
```ts
|
|
5440
5390
|
export class ChaintracksFetch implements ChaintracksFetchApi {
|
|
5441
5391
|
httpClient: HttpClient = defaultHttpClient();
|
|
5442
|
-
constructor(options: ChaintracksFetchOptions = {})
|
|
5443
|
-
async download(url: string, maxResponseBytes?: number, options?: ChaintracksDownloadOptions): Promise<Uint8Array>
|
|
5444
|
-
async fetchJson<R>(url: string): Promise<R>
|
|
5445
|
-
pathJoin(baseUrl: string, subpath: string): string
|
|
5392
|
+
constructor(options: ChaintracksFetchOptions = {})
|
|
5393
|
+
async download(url: string, maxResponseBytes?: number, options?: ChaintracksDownloadOptions): Promise<Uint8Array>
|
|
5394
|
+
async fetchJson<R>(url: string): Promise<R>
|
|
5395
|
+
pathJoin(baseUrl: string, subpath: string): string
|
|
5446
5396
|
}
|
|
5447
5397
|
```
|
|
5448
5398
|
|
|
@@ -5455,8 +5405,8 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
5455
5405
|
|
|
5456
5406
|
```ts
|
|
5457
5407
|
export class ChaintracksFetchError extends Error {
|
|
5458
|
-
constructor(message: string, public readonly url: string, public readonly status: number, public readonly statusText: string, public readonly retryAfterMsecs?: number)
|
|
5459
|
-
get retryable(): boolean
|
|
5408
|
+
constructor(message: string, public readonly url: string, public readonly status: number, public readonly statusText: string, public readonly retryAfterMsecs?: number)
|
|
5409
|
+
get retryable(): boolean
|
|
5460
5410
|
}
|
|
5461
5411
|
```
|
|
5462
5412
|
|
|
@@ -5467,14 +5417,14 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
5467
5417
|
|
|
5468
5418
|
```ts
|
|
5469
5419
|
export abstract class ChaintracksFsStatics {
|
|
5470
|
-
static async delete(path: string): Promise<void>
|
|
5471
|
-
static async writeFile(path: string, data: Uint8Array): Promise<void>
|
|
5472
|
-
static async readFile(path: string): Promise<Uint8Array>
|
|
5473
|
-
static async openReadableFile(path: string): Promise<ChaintracksReadableFileApi>
|
|
5474
|
-
static async openWritableFile(path: string): Promise<ChaintracksWritableFileApi>
|
|
5475
|
-
static async openAppendableFile(path: string): Promise<ChaintracksAppendableFileApi>
|
|
5476
|
-
static async ensureFoldersExist(path: string): Promise<void>
|
|
5477
|
-
static pathJoin(...parts: string[]): string
|
|
5420
|
+
static async delete(path: string): Promise<void>
|
|
5421
|
+
static async writeFile(path: string, data: Uint8Array): Promise<void>
|
|
5422
|
+
static async readFile(path: string): Promise<Uint8Array>
|
|
5423
|
+
static async openReadableFile(path: string): Promise<ChaintracksReadableFileApi>
|
|
5424
|
+
static async openWritableFile(path: string): Promise<ChaintracksWritableFileApi>
|
|
5425
|
+
static async openAppendableFile(path: string): Promise<ChaintracksAppendableFileApi>
|
|
5426
|
+
static async ensureFoldersExist(path: string): Promise<void>
|
|
5427
|
+
static pathJoin(...parts: string[]): string
|
|
5478
5428
|
}
|
|
5479
5429
|
```
|
|
5480
5430
|
|
|
@@ -5488,13 +5438,13 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
5488
5438
|
```ts
|
|
5489
5439
|
export class ChaintracksKnexMigrations implements MigrationSource<string> {
|
|
5490
5440
|
migrations: Record<string, Migration> = {};
|
|
5491
|
-
constructor(public chain: Chain)
|
|
5492
|
-
async getMigrations(): Promise<string[]>
|
|
5493
|
-
getMigrationName(migration: string)
|
|
5494
|
-
async getMigration(migration: string): Promise<Migration>
|
|
5495
|
-
async getLatestMigration(): Promise<string>
|
|
5496
|
-
static async latestMigration(): Promise<string>
|
|
5497
|
-
setupMigrations(): Record<string, Migration>
|
|
5441
|
+
constructor(public chain: Chain)
|
|
5442
|
+
async getMigrations(): Promise<string[]>
|
|
5443
|
+
getMigrationName(migration: string)
|
|
5444
|
+
async getMigration(migration: string): Promise<Migration>
|
|
5445
|
+
async getLatestMigration(): Promise<string>
|
|
5446
|
+
static async latestMigration(): Promise<string>
|
|
5447
|
+
setupMigrations(): Record<string, Migration>
|
|
5498
5448
|
}
|
|
5499
5449
|
```
|
|
5500
5450
|
|
|
@@ -5502,18 +5452,6 @@ See also: [Chain](./client.md#type-chain)
|
|
|
5502
5452
|
|
|
5503
5453
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5504
5454
|
|
|
5505
|
-
---
|
|
5506
|
-
##### Class: ChaintracksQueueCapacityError
|
|
5507
|
-
|
|
5508
|
-
```ts
|
|
5509
|
-
export class ChaintracksQueueCapacityError extends Error {
|
|
5510
|
-
readonly code = "ERR_CHAINTRACKS_QUEUE_CAPACITY";
|
|
5511
|
-
constructor()
|
|
5512
|
-
}
|
|
5513
|
-
```
|
|
5514
|
-
|
|
5515
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5516
|
-
|
|
5517
5455
|
---
|
|
5518
5456
|
##### Class: ChaintracksReadableFile
|
|
5519
5457
|
|
|
@@ -5522,11 +5460,11 @@ export class ChaintracksReadableFile implements ChaintracksReadableFileApi {
|
|
|
5522
5460
|
path: string;
|
|
5523
5461
|
parsedPath: Path.ParsedPath;
|
|
5524
5462
|
f: fs.FileHandle;
|
|
5525
|
-
protected constructor(path: string, f: fs.FileHandle)
|
|
5526
|
-
async close(): Promise<void>
|
|
5527
|
-
async getLength(): Promise<number>
|
|
5528
|
-
async read(length?: number, offset?: number): Promise<Uint8Array>
|
|
5529
|
-
static async openAsReadable(path: string): Promise<ChaintracksReadableFile>
|
|
5463
|
+
protected constructor(path: string, f: fs.FileHandle)
|
|
5464
|
+
async close(): Promise<void>
|
|
5465
|
+
async getLength(): Promise<number>
|
|
5466
|
+
async read(length?: number, offset?: number): Promise<Uint8Array>
|
|
5467
|
+
static async openAsReadable(path: string): Promise<ChaintracksReadableFile>
|
|
5530
5468
|
}
|
|
5531
5469
|
```
|
|
5532
5470
|
|
|
@@ -5539,16 +5477,16 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
5539
5477
|
|
|
5540
5478
|
```ts
|
|
5541
5479
|
export class ChaintracksService {
|
|
5542
|
-
static createChaintracksServiceOptions(chain: Chain): ChaintracksServiceOptions
|
|
5480
|
+
static createChaintracksServiceOptions(chain: Chain): ChaintracksServiceOptions
|
|
5543
5481
|
chain: Chain;
|
|
5544
5482
|
options: ChaintracksServiceOptions;
|
|
5545
5483
|
port?: number;
|
|
5546
5484
|
chaintracks: Chaintracks;
|
|
5547
5485
|
services: Services;
|
|
5548
5486
|
server?: Server<typeof IncomingMessage, typeof ServerResponse>;
|
|
5549
|
-
constructor(options: ChaintracksServiceOptions)
|
|
5550
|
-
async stopJsonRpcServer(): Promise<void>
|
|
5551
|
-
async startJsonRpcServer(port?: number): Promise<void>
|
|
5487
|
+
constructor(options: ChaintracksServiceOptions)
|
|
5488
|
+
async stopJsonRpcServer(): Promise<void>
|
|
5489
|
+
async startJsonRpcServer(port?: number): Promise<void>
|
|
5552
5490
|
}
|
|
5553
5491
|
```
|
|
5554
5492
|
|
|
@@ -5563,45 +5501,36 @@ Connects to a ChaintracksService to implement 'ChaintracksClientApi'
|
|
|
5563
5501
|
|
|
5564
5502
|
```ts
|
|
5565
5503
|
export class ChaintracksServiceClient implements ChaintracksClientApi {
|
|
5566
|
-
|
|
5567
|
-
static createChaintracksServiceClientOptions(): ChaintracksServiceClientOptions
|
|
5504
|
+
static createChaintracksServiceClientOptions(): ChaintracksServiceClientOptions
|
|
5568
5505
|
options: ChaintracksServiceClientOptions;
|
|
5569
|
-
constructor(public chain: Chain, serviceUrl: string, options?: ChaintracksServiceClientOptions)
|
|
5506
|
+
constructor(public chain: Chain, serviceUrl: string, options?: ChaintracksServiceClientOptions)
|
|
5570
5507
|
readonly serviceUrl: string;
|
|
5571
|
-
async subscribeHeaders(_listener: HeaderListener): Promise<string>
|
|
5572
|
-
async subscribeReorgs(_listener: ReorgListener): Promise<string>
|
|
5573
|
-
async unsubscribe(_subscriptionId: string): Promise<boolean>
|
|
5574
|
-
async currentHeight(): Promise<number>
|
|
5575
|
-
async isValidRootForHeight(root: string, height: number): Promise<boolean>
|
|
5576
|
-
async getJsonOrUndefined<T>(path: string): Promise<T | undefined>
|
|
5577
|
-
async getJson<T>(path: string): Promise<T>
|
|
5578
|
-
async postJsonVoid<T>(path: string, params: T): Promise<void>
|
|
5579
|
-
async addHeader(header: BaseBlockHeader): Promise<void>
|
|
5580
|
-
async startListening(): Promise<void>
|
|
5581
|
-
async listening(): Promise<void>
|
|
5582
|
-
async getChain(): Promise<Chain>
|
|
5583
|
-
async isListening(): Promise<boolean>
|
|
5584
|
-
async isSynchronized(): Promise<boolean>
|
|
5585
|
-
async getPresentHeight(): Promise<number>
|
|
5586
|
-
async getInfo(): Promise<ChaintracksInfoApi>
|
|
5587
|
-
async findChainTipHeader(): Promise<BlockHeader>
|
|
5588
|
-
async findChainTipHash(): Promise<string>
|
|
5589
|
-
async getHeaders(height: number, count: number): Promise<string>
|
|
5590
|
-
async findHeaderForHeight(height: number): Promise<BlockHeader | undefined>
|
|
5591
|
-
async findHeaderForBlockHash(hash: string): Promise<BlockHeader | undefined>
|
|
5508
|
+
async subscribeHeaders(_listener: HeaderListener): Promise<string>
|
|
5509
|
+
async subscribeReorgs(_listener: ReorgListener): Promise<string>
|
|
5510
|
+
async unsubscribe(_subscriptionId: string): Promise<boolean>
|
|
5511
|
+
async currentHeight(): Promise<number>
|
|
5512
|
+
async isValidRootForHeight(root: string, height: number): Promise<boolean>
|
|
5513
|
+
async getJsonOrUndefined<T>(path: string): Promise<T | undefined>
|
|
5514
|
+
async getJson<T>(path: string): Promise<T>
|
|
5515
|
+
async postJsonVoid<T>(path: string, params: T): Promise<void>
|
|
5516
|
+
async addHeader(header: BaseBlockHeader): Promise<void>
|
|
5517
|
+
async startListening(): Promise<void>
|
|
5518
|
+
async listening(): Promise<void>
|
|
5519
|
+
async getChain(): Promise<Chain>
|
|
5520
|
+
async isListening(): Promise<boolean>
|
|
5521
|
+
async isSynchronized(): Promise<boolean>
|
|
5522
|
+
async getPresentHeight(): Promise<number>
|
|
5523
|
+
async getInfo(): Promise<ChaintracksInfoApi>
|
|
5524
|
+
async findChainTipHeader(): Promise<BlockHeader>
|
|
5525
|
+
async findChainTipHash(): Promise<string>
|
|
5526
|
+
async getHeaders(height: number, count: number): Promise<string>
|
|
5527
|
+
async findHeaderForHeight(height: number): Promise<BlockHeader | undefined>
|
|
5528
|
+
async findHeaderForBlockHash(hash: string): Promise<BlockHeader | undefined>
|
|
5592
5529
|
}
|
|
5593
5530
|
```
|
|
5594
5531
|
|
|
5595
5532
|
See also: [BaseBlockHeader](./client.md#interface-baseblockheader), [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [ChaintracksClientApi](./services.md#interface-chaintracksclientapi), [ChaintracksInfoApi](./services.md#interface-chaintracksinfoapi), [ChaintracksServiceClientOptions](./services.md#interface-chaintracksserviceclientoptions), [HeaderListener](./services.md#type-headerlistener), [ReorgListener](./services.md#type-reorglistener)
|
|
5596
5533
|
|
|
5597
|
-
###### Property supportsReorgEvents
|
|
5598
|
-
|
|
5599
|
-
HTTP polling client; callback event methods are legacy unsupported stubs.
|
|
5600
|
-
|
|
5601
|
-
```ts
|
|
5602
|
-
readonly supportsReorgEvents = false
|
|
5603
|
-
```
|
|
5604
|
-
|
|
5605
5534
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5606
5535
|
|
|
5607
5536
|
---
|
|
@@ -5611,7 +5540,7 @@ Required interface methods of a Chaintracks Storage Engine implementation.
|
|
|
5611
5540
|
|
|
5612
5541
|
```ts
|
|
5613
5542
|
export abstract class ChaintracksStorageBase implements ChaintracksStorageQueryApi, ChaintracksStorageIngestApi {
|
|
5614
|
-
static createStorageBaseOptions(chain: Chain): ChaintracksStorageBaseOptions
|
|
5543
|
+
static createStorageBaseOptions(chain: Chain): ChaintracksStorageBaseOptions
|
|
5615
5544
|
log: (...args: any[]) => void = () => { };
|
|
5616
5545
|
chain: Chain;
|
|
5617
5546
|
liveHeightThreshold: number;
|
|
@@ -5621,19 +5550,19 @@ export abstract class ChaintracksStorageBase implements ChaintracksStorageQueryA
|
|
|
5621
5550
|
isAvailable: boolean = false;
|
|
5622
5551
|
hasMigrated: boolean = false;
|
|
5623
5552
|
bulkManager: BulkFileDataManager;
|
|
5624
|
-
constructor(options: ChaintracksStorageBaseOptions)
|
|
5625
|
-
protected validateIncomingHeader(header: BlockHeader): BlockHeader
|
|
5626
|
-
protected validateLiveHeaderRecord(header: LiveBlockHeader, allowUnassignedHeaderId = false): LiveBlockHeader
|
|
5627
|
-
protected validateHeight(height: number, name = "height"): void
|
|
5628
|
-
protected validateHeaderId(headerId: number, name = "headerId"): void
|
|
5629
|
-
protected validateHash(hash: string, name = "hash"): void
|
|
5630
|
-
protected validateRange(range: HeightRange, maximumLength = MAX_PUBLIC_HEADER_RANGE): void
|
|
5631
|
-
protected recordTraversalVisit(seen: Set<number>, header: LiveBlockHeader, operation: string): void
|
|
5632
|
-
protected validateStoredParentLink(child: LiveBlockHeader, parent: LiveBlockHeader): void
|
|
5633
|
-
async shutdown(): Promise<void>
|
|
5634
|
-
async makeAvailable(): Promise<void>
|
|
5635
|
-
async migrateLatest(): Promise<void>
|
|
5636
|
-
async dropAllData(): Promise<void>
|
|
5553
|
+
constructor(options: ChaintracksStorageBaseOptions)
|
|
5554
|
+
protected validateIncomingHeader(header: BlockHeader): BlockHeader
|
|
5555
|
+
protected validateLiveHeaderRecord(header: LiveBlockHeader, allowUnassignedHeaderId = false): LiveBlockHeader
|
|
5556
|
+
protected validateHeight(height: number, name = "height"): void
|
|
5557
|
+
protected validateHeaderId(headerId: number, name = "headerId"): void
|
|
5558
|
+
protected validateHash(hash: string, name = "hash"): void
|
|
5559
|
+
protected validateRange(range: HeightRange, maximumLength = MAX_PUBLIC_HEADER_RANGE): void
|
|
5560
|
+
protected recordTraversalVisit(seen: Set<number>, header: LiveBlockHeader, operation: string): void
|
|
5561
|
+
protected validateStoredParentLink(child: LiveBlockHeader, parent: LiveBlockHeader): void
|
|
5562
|
+
async shutdown(): Promise<void>
|
|
5563
|
+
async makeAvailable(): Promise<void>
|
|
5564
|
+
async migrateLatest(): Promise<void>
|
|
5565
|
+
async dropAllData(): Promise<void>
|
|
5637
5566
|
abstract deleteLiveBlockHeaders(): Promise<void>;
|
|
5638
5567
|
abstract deleteOlderLiveBlockHeaders(maxHeight: number): Promise<number>;
|
|
5639
5568
|
abstract findChainTipHeader(): Promise<LiveBlockHeader>;
|
|
@@ -5648,26 +5577,26 @@ export abstract class ChaintracksStorageBase implements ChaintracksStorageQueryA
|
|
|
5648
5577
|
abstract getLiveHeaders(range: HeightRange): Promise<LiveBlockHeader[]>;
|
|
5649
5578
|
abstract insertHeader(header: BlockHeader): Promise<InsertHeaderResult>;
|
|
5650
5579
|
abstract destroy(): Promise<void>;
|
|
5651
|
-
async getBulkHeaders(range: HeightRange): Promise<Uint8Array>
|
|
5652
|
-
async getHeadersUint8Array(height: number, count: number): Promise<Uint8Array>
|
|
5653
|
-
async getHeaders(height: number, count: number): Promise<BaseBlockHeader[]>
|
|
5654
|
-
async deleteBulkBlockHeaders(): Promise<void>
|
|
5580
|
+
async getBulkHeaders(range: HeightRange): Promise<Uint8Array>
|
|
5581
|
+
async getHeadersUint8Array(height: number, count: number): Promise<Uint8Array>
|
|
5582
|
+
async getHeaders(height: number, count: number): Promise<BaseBlockHeader[]>
|
|
5583
|
+
async deleteBulkBlockHeaders(): Promise<void>
|
|
5655
5584
|
async getAvailableHeightRanges(): Promise<{
|
|
5656
5585
|
bulk: HeightRange;
|
|
5657
5586
|
live: HeightRange;
|
|
5658
|
-
}>
|
|
5659
|
-
async pruneLiveBlockHeaders(activeTipHeight: number): Promise<void>
|
|
5660
|
-
async findChainTipHash(): Promise<string>
|
|
5661
|
-
async findChainTipWork(): Promise<string>
|
|
5662
|
-
async findChainWorkForBlockHash(hash: string): Promise<string>
|
|
5663
|
-
async findBulkFilesHeaderForHeightOrUndefined(height: number): Promise<BlockHeader | undefined>
|
|
5664
|
-
async findHeaderForHeightOrUndefined(height: number): Promise<LiveBlockHeader | BlockHeader | undefined>
|
|
5665
|
-
async findHeaderForHeight(height: number): Promise<LiveBlockHeader | BlockHeader>
|
|
5666
|
-
async isMerkleRootActive(merkleRoot: string): Promise<boolean>
|
|
5667
|
-
async findCommonAncestor(header1: LiveBlockHeader, header2: LiveBlockHeader): Promise<LiveBlockHeader>
|
|
5668
|
-
async findReorgDepth(header1: LiveBlockHeader, header2: LiveBlockHeader): Promise<number>
|
|
5669
|
-
async migrateLiveToBulk(count: number, ignoreLimits = false): Promise<void>
|
|
5670
|
-
async addBulkHeaders(headers: BlockHeader[], bulkRange: HeightRange, priorLiveHeaders: BlockHeader[]): Promise<BlockHeader[]>
|
|
5587
|
+
}>
|
|
5588
|
+
async pruneLiveBlockHeaders(activeTipHeight: number): Promise<void>
|
|
5589
|
+
async findChainTipHash(): Promise<string>
|
|
5590
|
+
async findChainTipWork(): Promise<string>
|
|
5591
|
+
async findChainWorkForBlockHash(hash: string): Promise<string>
|
|
5592
|
+
async findBulkFilesHeaderForHeightOrUndefined(height: number): Promise<BlockHeader | undefined>
|
|
5593
|
+
async findHeaderForHeightOrUndefined(height: number): Promise<LiveBlockHeader | BlockHeader | undefined>
|
|
5594
|
+
async findHeaderForHeight(height: number): Promise<LiveBlockHeader | BlockHeader>
|
|
5595
|
+
async isMerkleRootActive(merkleRoot: string): Promise<boolean>
|
|
5596
|
+
async findCommonAncestor(header1: LiveBlockHeader, header2: LiveBlockHeader): Promise<LiveBlockHeader>
|
|
5597
|
+
async findReorgDepth(header1: LiveBlockHeader, header2: LiveBlockHeader): Promise<number>
|
|
5598
|
+
async migrateLiveToBulk(count: number, ignoreLimits = false): Promise<void>
|
|
5599
|
+
async addBulkHeaders(headers: BlockHeader[], bulkRange: HeightRange, priorLiveHeaders: BlockHeader[]): Promise<BlockHeader[]>
|
|
5671
5600
|
}
|
|
5672
5601
|
```
|
|
5673
5602
|
|
|
@@ -5700,34 +5629,34 @@ export class ChaintracksStorageIdb extends ChaintracksStorageBase implements Cha
|
|
|
5700
5629
|
db?: IDBPDatabase<ChaintracksStorageIdbSchema>;
|
|
5701
5630
|
whenLastAccess?: Date;
|
|
5702
5631
|
allStores: string[] = ["live_headers", "bulk_headers"];
|
|
5703
|
-
constructor(options: ChaintracksStorageIdbOptions)
|
|
5704
|
-
override async makeAvailable(): Promise<void>
|
|
5705
|
-
override async migrateLatest(): Promise<void>
|
|
5706
|
-
override async destroy(): Promise<void>
|
|
5707
|
-
override async deleteLiveBlockHeaders(): Promise<void>
|
|
5708
|
-
override async deleteOlderLiveBlockHeaders(maxHeight: number): Promise<number>
|
|
5709
|
-
override async findChainTipHeader(): Promise<LiveBlockHeader>
|
|
5710
|
-
override async findChainTipHeaderOrUndefined(): Promise<LiveBlockHeader | undefined>
|
|
5711
|
-
override async findLiveHeaderForBlockHash(hash: string): Promise<LiveBlockHeader | null>
|
|
5712
|
-
override async findLiveHeaderForHeaderId(headerId: number): Promise<LiveBlockHeader>
|
|
5713
|
-
override async findLiveHeaderForHeight(height: number): Promise<LiveBlockHeader | null>
|
|
5714
|
-
override async findLiveHeaderForMerkleRoot(merkleRoot: string): Promise<LiveBlockHeader | null>
|
|
5715
|
-
override async findLiveHeightRange(): Promise<HeightRange>
|
|
5716
|
-
override async findMaxHeaderId(): Promise<number>
|
|
5717
|
-
override async liveHeadersForBulk(count: number): Promise<LiveBlockHeader[]>
|
|
5718
|
-
override async getLiveHeaders(range: HeightRange): Promise<LiveBlockHeader[]>
|
|
5719
|
-
override async insertHeader(header: BlockHeader): Promise<InsertHeaderResult>
|
|
5720
|
-
async deleteBulkFile(fileId: number): Promise<number>
|
|
5721
|
-
async insertBulkFile(file: BulkHeaderFileInfo): Promise<number>
|
|
5722
|
-
async updateBulkFile(fileId: number, file: BulkHeaderFileInfo): Promise<number>
|
|
5723
|
-
async replaceBulkFiles(files: BulkHeaderFileInfo[]): Promise<BulkHeaderFileInfo[]>
|
|
5724
|
-
async getBulkFiles(): Promise<BulkHeaderFileInfo[]>
|
|
5725
|
-
async getBulkFileData(fileId: number, offset?: number, length?: number): Promise<Uint8Array | undefined>
|
|
5726
|
-
protected repairStoredLiveHeader(header?: LiveBlockHeader): LiveBlockHeader | undefined
|
|
5727
|
-
async insertLiveHeader(header: LiveBlockHeader): Promise<LiveBlockHeader>
|
|
5728
|
-
async initDB(): Promise<IDBPDatabase<ChaintracksStorageIdbSchema>>
|
|
5729
|
-
toDbTrxReadOnly(stores: string[]): IDBPTransaction<ChaintracksStorageIdbSchema, string[], "readonly">
|
|
5730
|
-
toDbTrxReadWrite(stores: string[]): IDBPTransaction<ChaintracksStorageIdbSchema, string[], "readwrite">
|
|
5632
|
+
constructor(options: ChaintracksStorageIdbOptions)
|
|
5633
|
+
override async makeAvailable(): Promise<void>
|
|
5634
|
+
override async migrateLatest(): Promise<void>
|
|
5635
|
+
override async destroy(): Promise<void>
|
|
5636
|
+
override async deleteLiveBlockHeaders(): Promise<void>
|
|
5637
|
+
override async deleteOlderLiveBlockHeaders(maxHeight: number): Promise<number>
|
|
5638
|
+
override async findChainTipHeader(): Promise<LiveBlockHeader>
|
|
5639
|
+
override async findChainTipHeaderOrUndefined(): Promise<LiveBlockHeader | undefined>
|
|
5640
|
+
override async findLiveHeaderForBlockHash(hash: string): Promise<LiveBlockHeader | null>
|
|
5641
|
+
override async findLiveHeaderForHeaderId(headerId: number): Promise<LiveBlockHeader>
|
|
5642
|
+
override async findLiveHeaderForHeight(height: number): Promise<LiveBlockHeader | null>
|
|
5643
|
+
override async findLiveHeaderForMerkleRoot(merkleRoot: string): Promise<LiveBlockHeader | null>
|
|
5644
|
+
override async findLiveHeightRange(): Promise<HeightRange>
|
|
5645
|
+
override async findMaxHeaderId(): Promise<number>
|
|
5646
|
+
override async liveHeadersForBulk(count: number): Promise<LiveBlockHeader[]>
|
|
5647
|
+
override async getLiveHeaders(range: HeightRange): Promise<LiveBlockHeader[]>
|
|
5648
|
+
override async insertHeader(header: BlockHeader): Promise<InsertHeaderResult>
|
|
5649
|
+
async deleteBulkFile(fileId: number): Promise<number>
|
|
5650
|
+
async insertBulkFile(file: BulkHeaderFileInfo): Promise<number>
|
|
5651
|
+
async updateBulkFile(fileId: number, file: BulkHeaderFileInfo): Promise<number>
|
|
5652
|
+
async replaceBulkFiles(files: BulkHeaderFileInfo[]): Promise<BulkHeaderFileInfo[]>
|
|
5653
|
+
async getBulkFiles(): Promise<BulkHeaderFileInfo[]>
|
|
5654
|
+
async getBulkFileData(fileId: number, offset?: number, length?: number): Promise<Uint8Array | undefined>
|
|
5655
|
+
protected repairStoredLiveHeader(header?: LiveBlockHeader): LiveBlockHeader | undefined
|
|
5656
|
+
async insertLiveHeader(header: LiveBlockHeader): Promise<LiveBlockHeader>
|
|
5657
|
+
async initDB(): Promise<IDBPDatabase<ChaintracksStorageIdbSchema>>
|
|
5658
|
+
toDbTrxReadOnly(stores: string[]): IDBPTransaction<ChaintracksStorageIdbSchema, string[], "readonly">
|
|
5659
|
+
toDbTrxReadWrite(stores: string[]): IDBPTransaction<ChaintracksStorageIdbSchema, string[], "readwrite">
|
|
5731
5660
|
}
|
|
5732
5661
|
```
|
|
5733
5662
|
|
|
@@ -5741,7 +5670,7 @@ Set existing headers with previousHeaderId value set to the headerId value of
|
|
|
5741
5670
|
a header which is to be deleted to null.
|
|
5742
5671
|
|
|
5743
5672
|
```ts
|
|
5744
|
-
override async deleteOlderLiveBlockHeaders(maxHeight: number): Promise<number>
|
|
5673
|
+
override async deleteOlderLiveBlockHeaders(maxHeight: number): Promise<number>
|
|
5745
5674
|
```
|
|
5746
5675
|
|
|
5747
5676
|
Returns
|
|
@@ -5756,7 +5685,7 @@ Argument Details
|
|
|
5756
5685
|
###### Method findChainTipHeader
|
|
5757
5686
|
|
|
5758
5687
|
```ts
|
|
5759
|
-
override async findChainTipHeader(): Promise<LiveBlockHeader>
|
|
5688
|
+
override async findChainTipHeader(): Promise<LiveBlockHeader>
|
|
5760
5689
|
```
|
|
5761
5690
|
See also: [LiveBlockHeader](./services.md#interface-liveblockheader)
|
|
5762
5691
|
|
|
@@ -5771,7 +5700,7 @@ an error if there is no tip.
|
|
|
5771
5700
|
###### Method findChainTipHeaderOrUndefined
|
|
5772
5701
|
|
|
5773
5702
|
```ts
|
|
5774
|
-
override async findChainTipHeaderOrUndefined(): Promise<LiveBlockHeader | undefined>
|
|
5703
|
+
override async findChainTipHeaderOrUndefined(): Promise<LiveBlockHeader | undefined>
|
|
5775
5704
|
```
|
|
5776
5705
|
See also: [LiveBlockHeader](./services.md#interface-liveblockheader)
|
|
5777
5706
|
|
|
@@ -5791,7 +5720,7 @@ So true is stored as a 1, and false is stored as no property value (delete v['pr
|
|
|
5791
5720
|
This function restores these property values to true and false.
|
|
5792
5721
|
|
|
5793
5722
|
```ts
|
|
5794
|
-
protected repairStoredLiveHeader(header?: LiveBlockHeader): LiveBlockHeader | undefined
|
|
5723
|
+
protected repairStoredLiveHeader(header?: LiveBlockHeader): LiveBlockHeader | undefined
|
|
5795
5724
|
```
|
|
5796
5725
|
See also: [LiveBlockHeader](./services.md#interface-liveblockheader)
|
|
5797
5726
|
|
|
@@ -5809,40 +5738,40 @@ Also see `chaintracksStorageMemory` which leverages Knex support for an in memor
|
|
|
5809
5738
|
|
|
5810
5739
|
```ts
|
|
5811
5740
|
export class ChaintracksStorageKnex extends ChaintracksStorageBase implements ChaintracksStorageBulkFileApi {
|
|
5812
|
-
static createStorageKnexOptions(chain: Chain, knex?: Knex): ChaintracksStorageKnexOptions
|
|
5741
|
+
static createStorageKnexOptions(chain: Chain, knex?: Knex): ChaintracksStorageKnexOptions
|
|
5813
5742
|
knex: Knex;
|
|
5814
5743
|
_dbtype?: DBType;
|
|
5815
5744
|
bulkFilesTableName: string = "bulk_files";
|
|
5816
5745
|
headerTableName: string = "live_headers";
|
|
5817
5746
|
stateTableName: string = "chaintracks_state";
|
|
5818
|
-
constructor(options: ChaintracksStorageKnexOptions)
|
|
5819
|
-
get dbtype(): DBType
|
|
5820
|
-
override async shutdown(): Promise<void>
|
|
5821
|
-
override async makeAvailable(): Promise<void>
|
|
5822
|
-
override async migrateLatest(): Promise<void>
|
|
5823
|
-
override async dropAllData(): Promise<void>
|
|
5824
|
-
override async destroy(): Promise<void>
|
|
5825
|
-
override async findLiveHeightRange(): Promise<HeightRange>
|
|
5826
|
-
override async findLiveHeaderForHeaderId(headerId: number): Promise<LiveBlockHeader>
|
|
5827
|
-
override async findChainTipHeader(): Promise<LiveBlockHeader>
|
|
5828
|
-
override async findChainTipHeaderOrUndefined(): Promise<LiveBlockHeader | undefined>
|
|
5829
|
-
async findLiveHeaderForHeight(height: number): Promise<LiveBlockHeader | null>
|
|
5830
|
-
async findLiveHeaderForBlockHash(hash: string): Promise<LiveBlockHeader | null>
|
|
5831
|
-
async findLiveHeaderForMerkleRoot(merkleRoot: string): Promise<LiveBlockHeader | null>
|
|
5832
|
-
async deleteBulkFile(fileId: number): Promise<number>
|
|
5833
|
-
async insertBulkFile(file: BulkHeaderFileInfo): Promise<number>
|
|
5834
|
-
async updateBulkFile(fileId: number, file: BulkHeaderFileInfo): Promise<number>
|
|
5835
|
-
async replaceBulkFiles(files: BulkHeaderFileInfo[]): Promise<BulkHeaderFileInfo[]>
|
|
5836
|
-
async getBulkFiles(): Promise<BulkHeaderFileInfo[]>
|
|
5837
|
-
async getBulkFileData(fileId: number, offset?: number, length?: number): Promise<Uint8Array | undefined>
|
|
5838
|
-
async insertHeader(header: BlockHeader): Promise<InsertHeaderResult>
|
|
5839
|
-
async findMaxHeaderId(): Promise<number>
|
|
5840
|
-
override async deleteLiveBlockHeaders(): Promise<void>
|
|
5841
|
-
override async deleteBulkBlockHeaders(): Promise<void>
|
|
5842
|
-
async deleteOlderLiveBlockHeaders(maxHeight: number): Promise<number>
|
|
5843
|
-
async getLiveHeaders(range: HeightRange): Promise<LiveBlockHeader[]>
|
|
5844
|
-
concatSerializedHeaders(bufs: number[][]): number[]
|
|
5845
|
-
async liveHeadersForBulk(count: number): Promise<LiveBlockHeader[]>
|
|
5747
|
+
constructor(options: ChaintracksStorageKnexOptions)
|
|
5748
|
+
get dbtype(): DBType
|
|
5749
|
+
override async shutdown(): Promise<void>
|
|
5750
|
+
override async makeAvailable(): Promise<void>
|
|
5751
|
+
override async migrateLatest(): Promise<void>
|
|
5752
|
+
override async dropAllData(): Promise<void>
|
|
5753
|
+
override async destroy(): Promise<void>
|
|
5754
|
+
override async findLiveHeightRange(): Promise<HeightRange>
|
|
5755
|
+
override async findLiveHeaderForHeaderId(headerId: number): Promise<LiveBlockHeader>
|
|
5756
|
+
override async findChainTipHeader(): Promise<LiveBlockHeader>
|
|
5757
|
+
override async findChainTipHeaderOrUndefined(): Promise<LiveBlockHeader | undefined>
|
|
5758
|
+
async findLiveHeaderForHeight(height: number): Promise<LiveBlockHeader | null>
|
|
5759
|
+
async findLiveHeaderForBlockHash(hash: string): Promise<LiveBlockHeader | null>
|
|
5760
|
+
async findLiveHeaderForMerkleRoot(merkleRoot: string): Promise<LiveBlockHeader | null>
|
|
5761
|
+
async deleteBulkFile(fileId: number): Promise<number>
|
|
5762
|
+
async insertBulkFile(file: BulkHeaderFileInfo): Promise<number>
|
|
5763
|
+
async updateBulkFile(fileId: number, file: BulkHeaderFileInfo): Promise<number>
|
|
5764
|
+
async replaceBulkFiles(files: BulkHeaderFileInfo[]): Promise<BulkHeaderFileInfo[]>
|
|
5765
|
+
async getBulkFiles(): Promise<BulkHeaderFileInfo[]>
|
|
5766
|
+
async getBulkFileData(fileId: number, offset?: number, length?: number): Promise<Uint8Array | undefined>
|
|
5767
|
+
async insertHeader(header: BlockHeader): Promise<InsertHeaderResult>
|
|
5768
|
+
async findMaxHeaderId(): Promise<number>
|
|
5769
|
+
override async deleteLiveBlockHeaders(): Promise<void>
|
|
5770
|
+
override async deleteBulkBlockHeaders(): Promise<void>
|
|
5771
|
+
async deleteOlderLiveBlockHeaders(maxHeight: number): Promise<number>
|
|
5772
|
+
async getLiveHeaders(range: HeightRange): Promise<LiveBlockHeader[]>
|
|
5773
|
+
concatSerializedHeaders(bufs: number[][]): number[]
|
|
5774
|
+
async liveHeadersForBulk(count: number): Promise<LiveBlockHeader[]>
|
|
5846
5775
|
}
|
|
5847
5776
|
```
|
|
5848
5777
|
|
|
@@ -5890,22 +5819,22 @@ export class ChaintracksStorageNoDb extends ChaintracksStorageBase {
|
|
|
5890
5819
|
tipHeaderId: 0,
|
|
5891
5820
|
hashToHeaderId: new Map<string, number>()
|
|
5892
5821
|
};
|
|
5893
|
-
constructor(options: ChaintracksStorageNoDbOptions)
|
|
5894
|
-
override async destroy(): Promise<void>
|
|
5895
|
-
async getData(): Promise<ChaintracksNoDbData>
|
|
5896
|
-
override async deleteLiveBlockHeaders(): Promise<void>
|
|
5897
|
-
override async deleteOlderLiveBlockHeaders(maxHeight: number): Promise<number>
|
|
5898
|
-
override async findChainTipHeader(): Promise<LiveBlockHeader>
|
|
5899
|
-
override async findChainTipHeaderOrUndefined(): Promise<LiveBlockHeader | undefined>
|
|
5900
|
-
override async findLiveHeaderForBlockHash(hash: string): Promise<LiveBlockHeader | null>
|
|
5901
|
-
override async findLiveHeaderForHeaderId(headerId: number): Promise<LiveBlockHeader>
|
|
5902
|
-
override async findLiveHeaderForHeight(height: number): Promise<LiveBlockHeader | null>
|
|
5903
|
-
override async findLiveHeaderForMerkleRoot(merkleRoot: string): Promise<LiveBlockHeader | null>
|
|
5904
|
-
override async findLiveHeightRange(): Promise<HeightRange>
|
|
5905
|
-
override async findMaxHeaderId(): Promise<number>
|
|
5906
|
-
override async liveHeadersForBulk(count: number): Promise<LiveBlockHeader[]>
|
|
5907
|
-
override async getLiveHeaders(range: HeightRange): Promise<LiveBlockHeader[]>
|
|
5908
|
-
override async insertHeader(header: BlockHeader): Promise<InsertHeaderResult>
|
|
5822
|
+
constructor(options: ChaintracksStorageNoDbOptions)
|
|
5823
|
+
override async destroy(): Promise<void>
|
|
5824
|
+
async getData(): Promise<ChaintracksNoDbData>
|
|
5825
|
+
override async deleteLiveBlockHeaders(): Promise<void>
|
|
5826
|
+
override async deleteOlderLiveBlockHeaders(maxHeight: number): Promise<number>
|
|
5827
|
+
override async findChainTipHeader(): Promise<LiveBlockHeader>
|
|
5828
|
+
override async findChainTipHeaderOrUndefined(): Promise<LiveBlockHeader | undefined>
|
|
5829
|
+
override async findLiveHeaderForBlockHash(hash: string): Promise<LiveBlockHeader | null>
|
|
5830
|
+
override async findLiveHeaderForHeaderId(headerId: number): Promise<LiveBlockHeader>
|
|
5831
|
+
override async findLiveHeaderForHeight(height: number): Promise<LiveBlockHeader | null>
|
|
5832
|
+
override async findLiveHeaderForMerkleRoot(merkleRoot: string): Promise<LiveBlockHeader | null>
|
|
5833
|
+
override async findLiveHeightRange(): Promise<HeightRange>
|
|
5834
|
+
override async findMaxHeaderId(): Promise<number>
|
|
5835
|
+
override async liveHeadersForBulk(count: number): Promise<LiveBlockHeader[]>
|
|
5836
|
+
override async getLiveHeaders(range: HeightRange): Promise<LiveBlockHeader[]>
|
|
5837
|
+
override async insertHeader(header: BlockHeader): Promise<InsertHeaderResult>
|
|
5909
5838
|
}
|
|
5910
5839
|
```
|
|
5911
5840
|
|
|
@@ -5916,7 +5845,7 @@ See also: [BlockHeader](./client.md#interface-blockheader), [ChaintracksStorageB
|
|
|
5916
5845
|
Returns an isolated diagnostic snapshot; mutating it never changes tracker state.
|
|
5917
5846
|
|
|
5918
5847
|
```ts
|
|
5919
|
-
async getData(): Promise<ChaintracksNoDbData>
|
|
5848
|
+
async getData(): Promise<ChaintracksNoDbData>
|
|
5920
5849
|
```
|
|
5921
5850
|
|
|
5922
5851
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -5926,8 +5855,8 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
5926
5855
|
|
|
5927
5856
|
```ts
|
|
5928
5857
|
export class ChaintracksWritableFile extends ChaintracksFolderAwareFile implements ChaintracksWritableFileApi {
|
|
5929
|
-
static async openAsWritable(path: string): Promise<ChaintracksWritableFile>
|
|
5930
|
-
async append(data: Uint8Array): Promise<void>
|
|
5858
|
+
static async openAsWritable(path: string): Promise<ChaintracksWritableFile>
|
|
5859
|
+
async append(data: Uint8Array): Promise<void>
|
|
5931
5860
|
}
|
|
5932
5861
|
```
|
|
5933
5862
|
|
|
@@ -5946,10 +5875,10 @@ unrecorded request. Deployments must place `stateFile` on durable storage.
|
|
|
5946
5875
|
|
|
5947
5876
|
```ts
|
|
5948
5877
|
export class DurableFileBulkFileDownloadBudget implements BulkFileDownloadBudgetApi {
|
|
5949
|
-
constructor(options: DurableFileBulkFileDownloadBudgetOptions)
|
|
5950
|
-
async initialize(): Promise<void>
|
|
5951
|
-
async consume(byteCount: number): Promise<void>
|
|
5952
|
-
snapshot(): BulkFileDownloadBudgetSnapshot
|
|
5878
|
+
constructor(options: DurableFileBulkFileDownloadBudgetOptions)
|
|
5879
|
+
async initialize(): Promise<void>
|
|
5880
|
+
async consume(byteCount: number): Promise<void>
|
|
5881
|
+
snapshot(): BulkFileDownloadBudgetSnapshot
|
|
5953
5882
|
}
|
|
5954
5883
|
```
|
|
5955
5884
|
|
|
@@ -5963,7 +5892,7 @@ Load and validate the durable ledger before the service becomes ready.
|
|
|
5963
5892
|
readiness reports the persisted allowance and corrupt state fails startup.
|
|
5964
5893
|
|
|
5965
5894
|
```ts
|
|
5966
|
-
async initialize(): Promise<void>
|
|
5895
|
+
async initialize(): Promise<void>
|
|
5967
5896
|
```
|
|
5968
5897
|
|
|
5969
5898
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -5977,15 +5906,15 @@ fails, preventing a failing upstream from bypassing the bound.
|
|
|
5977
5906
|
|
|
5978
5907
|
```ts
|
|
5979
5908
|
export class FixedWindowBulkFileDownloadBudget implements BulkFileDownloadBudgetApi {
|
|
5980
|
-
constructor(options: FixedWindowBulkFileDownloadBudgetOptions)
|
|
5981
|
-
consume(byteCount: number): void
|
|
5909
|
+
constructor(options: FixedWindowBulkFileDownloadBudgetOptions)
|
|
5910
|
+
consume(byteCount: number): void
|
|
5982
5911
|
snapshot(): {
|
|
5983
5912
|
maxBytes: number;
|
|
5984
5913
|
consumedBytes: number;
|
|
5985
5914
|
remainingBytes: number;
|
|
5986
5915
|
windowStartedAt: number;
|
|
5987
5916
|
windowMsecs: number;
|
|
5988
|
-
}
|
|
5917
|
+
}
|
|
5989
5918
|
}
|
|
5990
5919
|
```
|
|
5991
5920
|
|
|
@@ -6003,39 +5932,30 @@ processing without a local WhatsOnChain polling ingestor.
|
|
|
6003
5932
|
|
|
6004
5933
|
```ts
|
|
6005
5934
|
export class GoChaintracksServiceClient implements ChaintracksClientApi {
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
async
|
|
6009
|
-
async
|
|
6010
|
-
async
|
|
6011
|
-
async
|
|
6012
|
-
async
|
|
6013
|
-
async
|
|
6014
|
-
async
|
|
6015
|
-
async
|
|
6016
|
-
async
|
|
6017
|
-
async
|
|
6018
|
-
async
|
|
6019
|
-
async
|
|
6020
|
-
async
|
|
6021
|
-
async
|
|
6022
|
-
async
|
|
6023
|
-
async
|
|
6024
|
-
async
|
|
6025
|
-
async unsubscribe(subscriptionId: string): Promise<boolean>
|
|
5935
|
+
constructor(public chain: Chain, serviceUrl: string, options: GoChaintracksServiceClientOptions = {})
|
|
5936
|
+
async currentHeight(): Promise<number>
|
|
5937
|
+
async isValidRootForHeight(root: string, height: number): Promise<boolean>
|
|
5938
|
+
async getChain(): Promise<Chain>
|
|
5939
|
+
async getInfo(): Promise<ChaintracksInfoApi>
|
|
5940
|
+
async getPresentHeight(): Promise<number>
|
|
5941
|
+
async getHeaders(height: number, count: number): Promise<string>
|
|
5942
|
+
async findChainTipHeader(): Promise<BlockHeader>
|
|
5943
|
+
async findChainTipHash(): Promise<string>
|
|
5944
|
+
async findHeaderForHeight(height: number): Promise<BlockHeader | undefined>
|
|
5945
|
+
async findHeaderForBlockHash(hash: string): Promise<BlockHeader | undefined>
|
|
5946
|
+
async addHeader(_header: BaseBlockHeader): Promise<void>
|
|
5947
|
+
async startListening(): Promise<void>
|
|
5948
|
+
async listening(): Promise<void>
|
|
5949
|
+
async isListening(): Promise<boolean>
|
|
5950
|
+
async isSynchronized(): Promise<boolean>
|
|
5951
|
+
async subscribeHeaders(listener: HeaderListener): Promise<string>
|
|
5952
|
+
async subscribeReorgs(listener: ReorgListener): Promise<string>
|
|
5953
|
+
async unsubscribe(subscriptionId: string): Promise<boolean>
|
|
6026
5954
|
}
|
|
6027
5955
|
```
|
|
6028
5956
|
|
|
6029
5957
|
See also: [BaseBlockHeader](./client.md#interface-baseblockheader), [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [ChaintracksClientApi](./services.md#interface-chaintracksclientapi), [ChaintracksInfoApi](./services.md#interface-chaintracksinfoapi), [GoChaintracksServiceClientOptions](./services.md#interface-gochaintracksserviceclientoptions), [HeaderListener](./services.md#type-headerlistener), [ReorgListener](./services.md#type-reorglistener)
|
|
6030
5958
|
|
|
6031
|
-
###### Property supportsReorgEvents
|
|
6032
|
-
|
|
6033
|
-
SSE client; reorg registration is a supported additive capability.
|
|
6034
|
-
|
|
6035
|
-
```ts
|
|
6036
|
-
readonly supportsReorgEvents = true
|
|
6037
|
-
```
|
|
6038
|
-
|
|
6039
5959
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6040
5960
|
|
|
6041
5961
|
---
|
|
@@ -6047,18 +5967,18 @@ Operations support integrating contiguous batches of headers,
|
|
|
6047
5967
|
|
|
6048
5968
|
```ts
|
|
6049
5969
|
export class HeightRange implements HeightRangeApi {
|
|
6050
|
-
constructor(public minHeight: number, public maxHeight: number)
|
|
5970
|
+
constructor(public minHeight: number, public maxHeight: number)
|
|
6051
5971
|
static readonly empty = new HeightRange(0, -1);
|
|
6052
|
-
get isEmpty()
|
|
6053
|
-
static from(headers: BlockHeader[]): HeightRange
|
|
6054
|
-
get length()
|
|
6055
|
-
toString(): string
|
|
6056
|
-
contains(range: HeightRange | number)
|
|
6057
|
-
intersect(range: HeightRange)
|
|
6058
|
-
union(range: HeightRange)
|
|
6059
|
-
subtract(range: HeightRange)
|
|
6060
|
-
above(range: HeightRange)
|
|
6061
|
-
copy(): HeightRange
|
|
5972
|
+
get isEmpty()
|
|
5973
|
+
static from(headers: BlockHeader[]): HeightRange
|
|
5974
|
+
get length()
|
|
5975
|
+
toString(): string
|
|
5976
|
+
contains(range: HeightRange | number)
|
|
5977
|
+
intersect(range: HeightRange)
|
|
5978
|
+
union(range: HeightRange)
|
|
5979
|
+
subtract(range: HeightRange)
|
|
5980
|
+
above(range: HeightRange)
|
|
5981
|
+
copy(): HeightRange
|
|
6062
5982
|
}
|
|
6063
5983
|
```
|
|
6064
5984
|
|
|
@@ -6084,14 +6004,14 @@ Otherwise returns a copy of this range.
|
|
|
6084
6004
|
This returns the portion of this range that is strictly above `range`.
|
|
6085
6005
|
|
|
6086
6006
|
```ts
|
|
6087
|
-
above(range: HeightRange)
|
|
6007
|
+
above(range: HeightRange)
|
|
6088
6008
|
```
|
|
6089
6009
|
See also: [HeightRange](./services.md#class-heightrange)
|
|
6090
6010
|
|
|
6091
6011
|
###### Method contains
|
|
6092
6012
|
|
|
6093
6013
|
```ts
|
|
6094
|
-
contains(range: HeightRange | number)
|
|
6014
|
+
contains(range: HeightRange | number)
|
|
6095
6015
|
```
|
|
6096
6016
|
See also: [HeightRange](./services.md#class-heightrange)
|
|
6097
6017
|
|
|
@@ -6109,14 +6029,14 @@ Argument Details
|
|
|
6109
6029
|
Return a copy of this range.
|
|
6110
6030
|
|
|
6111
6031
|
```ts
|
|
6112
|
-
copy(): HeightRange
|
|
6032
|
+
copy(): HeightRange
|
|
6113
6033
|
```
|
|
6114
6034
|
See also: [HeightRange](./services.md#class-heightrange)
|
|
6115
6035
|
|
|
6116
6036
|
###### Method from
|
|
6117
6037
|
|
|
6118
6038
|
```ts
|
|
6119
|
-
static from(headers: BlockHeader[]): HeightRange
|
|
6039
|
+
static from(headers: BlockHeader[]): HeightRange
|
|
6120
6040
|
```
|
|
6121
6041
|
See also: [BlockHeader](./client.md#interface-blockheader), [HeightRange](./services.md#class-heightrange)
|
|
6122
6042
|
|
|
@@ -6138,7 +6058,7 @@ Intersection with an empty range is always empty.
|
|
|
6138
6058
|
The result is always a single, possibly empty, range.
|
|
6139
6059
|
|
|
6140
6060
|
```ts
|
|
6141
|
-
intersect(range: HeightRange)
|
|
6061
|
+
intersect(range: HeightRange)
|
|
6142
6062
|
```
|
|
6143
6063
|
See also: [HeightRange](./services.md#class-heightrange)
|
|
6144
6064
|
|
|
@@ -6149,7 +6069,7 @@ Returns `range` subtracted from this range.
|
|
|
6149
6069
|
Throws an error if the subtraction would create two disjoint ranges.
|
|
6150
6070
|
|
|
6151
6071
|
```ts
|
|
6152
|
-
subtract(range: HeightRange)
|
|
6072
|
+
subtract(range: HeightRange)
|
|
6153
6073
|
```
|
|
6154
6074
|
See also: [HeightRange](./services.md#class-heightrange)
|
|
6155
6075
|
|
|
@@ -6158,7 +6078,7 @@ See also: [HeightRange](./services.md#class-heightrange)
|
|
|
6158
6078
|
function toString() { [native code] }
|
|
6159
6079
|
|
|
6160
6080
|
```ts
|
|
6161
|
-
toString(): string
|
|
6081
|
+
toString(): string
|
|
6162
6082
|
```
|
|
6163
6083
|
|
|
6164
6084
|
Returns
|
|
@@ -6174,7 +6094,7 @@ Only valid if the two ranges overlap or touch, or one is empty.
|
|
|
6174
6094
|
Throws an error if the union would create two disjoint ranges.
|
|
6175
6095
|
|
|
6176
6096
|
```ts
|
|
6177
|
-
union(range: HeightRange)
|
|
6097
|
+
union(range: HeightRange)
|
|
6178
6098
|
```
|
|
6179
6099
|
See also: [HeightRange](./services.md#class-heightrange)
|
|
6180
6100
|
|
|
@@ -6189,7 +6109,7 @@ dependency-free fallback.
|
|
|
6189
6109
|
|
|
6190
6110
|
```ts
|
|
6191
6111
|
export class InlineBulkFileDataValidator implements BulkFileDataValidatorApi {
|
|
6192
|
-
async validate(request: BulkFileDataValidationRequest): Promise<BulkFileDataValidationResult>
|
|
6112
|
+
async validate(request: BulkFileDataValidationRequest): Promise<BulkFileDataValidationResult>
|
|
6193
6113
|
}
|
|
6194
6114
|
```
|
|
6195
6115
|
|
|
@@ -6202,13 +6122,13 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
6202
6122
|
|
|
6203
6123
|
```ts
|
|
6204
6124
|
export abstract class LiveIngestorBase implements LiveIngestorApi {
|
|
6205
|
-
static createLiveIngestorBaseOptions(chain: Chain)
|
|
6125
|
+
static createLiveIngestorBaseOptions(chain: Chain)
|
|
6206
6126
|
chain: Chain;
|
|
6207
6127
|
log: (...args: any[]) => void = () => ;
|
|
6208
|
-
constructor(options: LiveIngestorBaseOptions)
|
|
6128
|
+
constructor(options: LiveIngestorBaseOptions)
|
|
6209
6129
|
async shutdown(): Promise<void> { }
|
|
6210
|
-
async setStorage(storage: ChaintracksStorageApi, log: (...args: any[]) => void): Promise<void>
|
|
6211
|
-
storage(): ChaintracksStorageApi
|
|
6130
|
+
async setStorage(storage: ChaintracksStorageApi, log: (...args: any[]) => void): Promise<void>
|
|
6131
|
+
storage(): ChaintracksStorageApi
|
|
6212
6132
|
abstract getHeaderByHash(hash: string): Promise<BlockHeader | undefined>;
|
|
6213
6133
|
abstract startListening(liveHeaders: BlockHeader[]): Promise<void>;
|
|
6214
6134
|
abstract stopListening(): void;
|
|
@@ -6237,7 +6157,7 @@ Argument Details
|
|
|
6237
6157
|
Allocate resources.
|
|
6238
6158
|
|
|
6239
6159
|
```ts
|
|
6240
|
-
async setStorage(storage: ChaintracksStorageApi, log: (...args: any[]) => void): Promise<void>
|
|
6160
|
+
async setStorage(storage: ChaintracksStorageApi, log: (...args: any[]) => void): Promise<void>
|
|
6241
6161
|
```
|
|
6242
6162
|
See also: [ChaintracksStorageApi](./services.md#interface-chaintracksstorageapi)
|
|
6243
6163
|
|
|
@@ -6252,7 +6172,7 @@ Release resources.
|
|
|
6252
6172
|
Override if required.
|
|
6253
6173
|
|
|
6254
6174
|
```ts
|
|
6255
|
-
async shutdown(): Promise<void>
|
|
6175
|
+
async shutdown(): Promise<void>
|
|
6256
6176
|
```
|
|
6257
6177
|
|
|
6258
6178
|
###### Method startListening
|
|
@@ -6284,7 +6204,7 @@ abstract stopListening(): void
|
|
|
6284
6204
|
###### Method storage
|
|
6285
6205
|
|
|
6286
6206
|
```ts
|
|
6287
|
-
storage(): ChaintracksStorageApi
|
|
6207
|
+
storage(): ChaintracksStorageApi
|
|
6288
6208
|
```
|
|
6289
6209
|
See also: [ChaintracksStorageApi](./services.md#interface-chaintracksstorageapi)
|
|
6290
6210
|
|
|
@@ -6302,12 +6222,12 @@ Adapts a remote Chaintracks event stream, such as Arcade/go-chaintracks
|
|
|
6302
6222
|
|
|
6303
6223
|
```ts
|
|
6304
6224
|
export class LiveIngestorChaintracksSSE extends LiveIngestorBase {
|
|
6305
|
-
static createLiveIngestorChaintracksSSEOptions(chain: Chain, chaintracks: ChaintracksClientApi): LiveIngestorChaintracksSSEOptions
|
|
6306
|
-
constructor(private readonly options: LiveIngestorChaintracksSSEOptions)
|
|
6307
|
-
async getHeaderByHash(hash: string): Promise<BlockHeader | undefined>
|
|
6308
|
-
async startListening(liveHeaders: BlockHeader[]): Promise<void>
|
|
6309
|
-
stopListening(): void
|
|
6310
|
-
override async shutdown(): Promise<void>
|
|
6225
|
+
static createLiveIngestorChaintracksSSEOptions(chain: Chain, chaintracks: ChaintracksClientApi): LiveIngestorChaintracksSSEOptions
|
|
6226
|
+
constructor(private readonly options: LiveIngestorChaintracksSSEOptions)
|
|
6227
|
+
async getHeaderByHash(hash: string): Promise<BlockHeader | undefined>
|
|
6228
|
+
async startListening(liveHeaders: BlockHeader[]): Promise<void>
|
|
6229
|
+
stopListening(): void
|
|
6230
|
+
override async shutdown(): Promise<void>
|
|
6311
6231
|
}
|
|
6312
6232
|
```
|
|
6313
6233
|
|
|
@@ -6322,18 +6242,18 @@ Reports new headers by polling periodically.
|
|
|
6322
6242
|
|
|
6323
6243
|
```ts
|
|
6324
6244
|
export class LiveIngestorWhatsOnChainPoll extends LiveIngestorBase {
|
|
6325
|
-
static createLiveIngestorWhatsOnChainOptions(chain: Chain): LiveIngestorWhatsOnChainOptions
|
|
6245
|
+
static createLiveIngestorWhatsOnChainOptions(chain: Chain): LiveIngestorWhatsOnChainOptions
|
|
6326
6246
|
idleWait: number;
|
|
6327
6247
|
retryWait: number;
|
|
6328
6248
|
retryWaitMax: number;
|
|
6329
6249
|
maxQueuedHeaders: number;
|
|
6330
6250
|
woc: WhatsOnChainServices;
|
|
6331
6251
|
done: boolean = false;
|
|
6332
|
-
constructor(options: LiveIngestorWhatsOnChainOptions)
|
|
6333
|
-
async getHeaderByHash(hash: string): Promise<BlockHeader | undefined>
|
|
6334
|
-
async startListening(liveHeaders: BlockHeader[]): Promise<void>
|
|
6335
|
-
stopListening(): void
|
|
6336
|
-
override async shutdown(): Promise<void>
|
|
6252
|
+
constructor(options: LiveIngestorWhatsOnChainOptions)
|
|
6253
|
+
async getHeaderByHash(hash: string): Promise<BlockHeader | undefined>
|
|
6254
|
+
async startListening(liveHeaders: BlockHeader[]): Promise<void>
|
|
6255
|
+
stopListening(): void
|
|
6256
|
+
override async shutdown(): Promise<void>
|
|
6337
6257
|
}
|
|
6338
6258
|
```
|
|
6339
6259
|
|
|
@@ -6346,7 +6266,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
6346
6266
|
|
|
6347
6267
|
```ts
|
|
6348
6268
|
export class LiveIngestorWhatsOnChainWs extends LiveIngestorBase {
|
|
6349
|
-
static createLiveIngestorWhatsOnChainOptions(chain: Chain): LiveIngestorWhatsOnChainOptions
|
|
6269
|
+
static createLiveIngestorWhatsOnChainOptions(chain: Chain): LiveIngestorWhatsOnChainOptions
|
|
6350
6270
|
idleWait: number;
|
|
6351
6271
|
retryWait: number;
|
|
6352
6272
|
retryWaitMax: number;
|
|
@@ -6354,11 +6274,11 @@ export class LiveIngestorWhatsOnChainWs extends LiveIngestorBase {
|
|
|
6354
6274
|
woc: WhatsOnChainServices;
|
|
6355
6275
|
stopNewListenersToken: StopListenerToken = { stop: undefined };
|
|
6356
6276
|
done = false;
|
|
6357
|
-
constructor(options: LiveIngestorWhatsOnChainOptions)
|
|
6358
|
-
async getHeaderByHash(hash: string): Promise<BlockHeader | undefined>
|
|
6359
|
-
async startListening(liveHeaders: BlockHeader[]): Promise<void>
|
|
6360
|
-
stopListening(): void
|
|
6361
|
-
override async shutdown(): Promise<void>
|
|
6277
|
+
constructor(options: LiveIngestorWhatsOnChainOptions)
|
|
6278
|
+
async getHeaderByHash(hash: string): Promise<BlockHeader | undefined>
|
|
6279
|
+
async startListening(liveHeaders: BlockHeader[]): Promise<void>
|
|
6280
|
+
stopListening(): void
|
|
6281
|
+
override async shutdown(): Promise<void>
|
|
6362
6282
|
}
|
|
6363
6283
|
```
|
|
6364
6284
|
|
|
@@ -6378,43 +6298,21 @@ references before accepting a fallback result.
|
|
|
6378
6298
|
|
|
6379
6299
|
```ts
|
|
6380
6300
|
export class LocalChainTracker implements ChainTracker {
|
|
6381
|
-
constructor(options: LocalChainTrackerOptions)
|
|
6382
|
-
getMode(): LocalChainTrackerMode
|
|
6383
|
-
setMode(mode: LocalChainTrackerMode): void
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
async
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
async
|
|
6390
|
-
async
|
|
6391
|
-
async synchronize(): Promise<LocalChainTrackerStatus>
|
|
6392
|
-
async clearLocalData(): Promise<LocalChainTrackerStatus>
|
|
6393
|
-
async checkConsistency(): Promise<LocalChainTrackerStatus>
|
|
6301
|
+
constructor(options: LocalChainTrackerOptions)
|
|
6302
|
+
getMode(): LocalChainTrackerMode
|
|
6303
|
+
setMode(mode: LocalChainTrackerMode): void
|
|
6304
|
+
getStatus(): LocalChainTrackerStatus
|
|
6305
|
+
getLocalClient(): ChaintracksClientApi
|
|
6306
|
+
async currentHeight(): Promise<number>
|
|
6307
|
+
async isValidRootForHeight(root: string, height: number): Promise<boolean>
|
|
6308
|
+
async synchronize(): Promise<LocalChainTrackerStatus>
|
|
6309
|
+
async clearLocalData(): Promise<LocalChainTrackerStatus>
|
|
6310
|
+
async checkConsistency(): Promise<LocalChainTrackerStatus>
|
|
6394
6311
|
}
|
|
6395
6312
|
```
|
|
6396
6313
|
|
|
6397
6314
|
See also: [ChaintracksClientApi](./services.md#interface-chaintracksclientapi), [LocalChainTrackerMode](./services.md#type-localchaintrackermode), [LocalChainTrackerOptions](./services.md#interface-localchaintrackeroptions), [LocalChainTrackerStatus](./services.md#interface-localchaintrackerstatus)
|
|
6398
6315
|
|
|
6399
|
-
###### Method getVerificationContext
|
|
6400
|
-
|
|
6401
|
-
Local mode/source generation marker for consumers that invalidate derived verdicts.
|
|
6402
|
-
|
|
6403
|
-
```ts
|
|
6404
|
-
getVerificationContext(): string
|
|
6405
|
-
```
|
|
6406
|
-
|
|
6407
|
-
###### Method getVerificationContextToken
|
|
6408
|
-
|
|
6409
|
-
Fresh token for providers participating in this attempt's canonical authority.
|
|
6410
|
-
Remote-only uses fallbacks only; local-primary uses the local client only.
|
|
6411
|
-
A missing participating identity fails closed. Unused providers are omitted
|
|
6412
|
-
and cannot stand in. This is not an atomic multi-source snapshot.
|
|
6413
|
-
|
|
6414
|
-
```ts
|
|
6415
|
-
async getVerificationContextToken(signal?: AbortSignal): Promise<string>
|
|
6416
|
-
```
|
|
6417
|
-
|
|
6418
6316
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6419
6317
|
|
|
6420
6318
|
---
|
|
@@ -6428,10 +6326,10 @@ queue bounds prevent validation copies from consuming unbounded memory.
|
|
|
6428
6326
|
|
|
6429
6327
|
```ts
|
|
6430
6328
|
export class NodeBulkFileDataValidator implements BulkFileDataValidatorApi {
|
|
6431
|
-
constructor(options: NodeBulkFileDataValidatorOptions = {})
|
|
6432
|
-
async validate(request: BulkFileDataValidationRequest): Promise<BulkFileDataValidationResult>
|
|
6433
|
-
getStats(): BulkFileDataValidatorStats
|
|
6434
|
-
async destroy(): Promise<void>
|
|
6329
|
+
constructor(options: NodeBulkFileDataValidatorOptions = {})
|
|
6330
|
+
async validate(request: BulkFileDataValidationRequest): Promise<BulkFileDataValidationResult>
|
|
6331
|
+
getStats(): BulkFileDataValidatorStats
|
|
6332
|
+
async destroy(): Promise<void>
|
|
6435
6333
|
}
|
|
6436
6334
|
```
|
|
6437
6335
|
|
|
@@ -6451,11 +6349,11 @@ export default class SdkWhatsOnChain implements ChainTracker {
|
|
|
6451
6349
|
protected readonly URL: string;
|
|
6452
6350
|
protected readonly httpClient: HttpClient;
|
|
6453
6351
|
protected readonly requestTimeoutMsecs: number;
|
|
6454
|
-
constructor(network: "main" | "test" | "stn" | "ttn" | "tstn" = "main", config: LocalWhatsOnChainConfig = {})
|
|
6455
|
-
protected async request<T, Data = unknown>(url: string, options: HttpClientRequestOptions<Data>): Promise<HttpClientResponse<T>>
|
|
6456
|
-
async isValidRootForHeight(root: string, height: number): Promise<boolean>
|
|
6457
|
-
async currentHeight(): Promise<number>
|
|
6458
|
-
protected getHttpHeaders(): Record<string, string>
|
|
6352
|
+
constructor(network: "main" | "test" | "stn" | "ttn" | "tstn" = "main", config: LocalWhatsOnChainConfig = {})
|
|
6353
|
+
protected async request<T, Data = unknown>(url: string, options: HttpClientRequestOptions<Data>): Promise<HttpClientResponse<T>>
|
|
6354
|
+
async isValidRootForHeight(root: string, height: number): Promise<boolean>
|
|
6355
|
+
async currentHeight(): Promise<number>
|
|
6356
|
+
protected getHttpHeaders(): Record<string, string>
|
|
6459
6357
|
}
|
|
6460
6358
|
```
|
|
6461
6359
|
|
|
@@ -6464,7 +6362,7 @@ export default class SdkWhatsOnChain implements ChainTracker {
|
|
|
6464
6362
|
Constructs an instance of the WhatsOnChain ChainTracker.
|
|
6465
6363
|
|
|
6466
6364
|
```ts
|
|
6467
|
-
constructor(network: "main" | "test" | "stn" | "ttn" | "tstn" = "main", config: LocalWhatsOnChainConfig = {})
|
|
6365
|
+
constructor(network: "main" | "test" | "stn" | "ttn" | "tstn" = "main", config: LocalWhatsOnChainConfig = {})
|
|
6468
6366
|
```
|
|
6469
6367
|
|
|
6470
6368
|
Argument Details
|
|
@@ -6491,30 +6389,30 @@ export class ServiceCollection<T> {
|
|
|
6491
6389
|
constructor(public serviceName: string, services?: Array<{
|
|
6492
6390
|
name: string;
|
|
6493
6391
|
service: T;
|
|
6494
|
-
}>)
|
|
6392
|
+
}>)
|
|
6495
6393
|
add(s: {
|
|
6496
6394
|
name: string;
|
|
6497
6395
|
service: T;
|
|
6498
|
-
}): this
|
|
6499
|
-
remove(name: string): void
|
|
6500
|
-
get name(): string
|
|
6501
|
-
get service(): T
|
|
6502
|
-
getServiceToCall(i: number): ServiceToCall<T>
|
|
6503
|
-
get serviceToCall(): ServiceToCall<T>
|
|
6504
|
-
get allServicesToCall(): Array<ServiceToCall<T>>
|
|
6505
|
-
moveServiceToLast(stc: ServiceToCall<T>): void
|
|
6506
|
-
get allServices(): T[]
|
|
6507
|
-
get count(): number
|
|
6508
|
-
get index(): number
|
|
6509
|
-
reset(): void
|
|
6510
|
-
next(): number
|
|
6511
|
-
clone(): ServiceCollection<T>
|
|
6512
|
-
_addServiceCall(providerName: string, call: ServiceCall): ProviderCallHistory
|
|
6513
|
-
getDuration(since: Date | string): number
|
|
6514
|
-
addServiceCallSuccess(stc: ServiceToCall<T>, result?: string): void
|
|
6515
|
-
addServiceCallFailure(stc: ServiceToCall<T>, result?: string): void
|
|
6516
|
-
addServiceCallError(stc: ServiceToCall<T>, error: WalletError): void
|
|
6517
|
-
getServiceCallHistory(reset?: boolean): ServiceCallHistory
|
|
6396
|
+
}): this
|
|
6397
|
+
remove(name: string): void
|
|
6398
|
+
get name(): string
|
|
6399
|
+
get service(): T
|
|
6400
|
+
getServiceToCall(i: number): ServiceToCall<T>
|
|
6401
|
+
get serviceToCall(): ServiceToCall<T>
|
|
6402
|
+
get allServicesToCall(): Array<ServiceToCall<T>>
|
|
6403
|
+
moveServiceToLast(stc: ServiceToCall<T>): void
|
|
6404
|
+
get allServices(): T[]
|
|
6405
|
+
get count(): number
|
|
6406
|
+
get index(): number
|
|
6407
|
+
reset(): void
|
|
6408
|
+
next(): number
|
|
6409
|
+
clone(): ServiceCollection<T>
|
|
6410
|
+
_addServiceCall(providerName: string, call: ServiceCall): ProviderCallHistory
|
|
6411
|
+
getDuration(since: Date | string): number
|
|
6412
|
+
addServiceCallSuccess(stc: ServiceToCall<T>, result?: string): void
|
|
6413
|
+
addServiceCallFailure(stc: ServiceToCall<T>, result?: string): void
|
|
6414
|
+
addServiceCallError(stc: ServiceToCall<T>, error: WalletError): void
|
|
6415
|
+
getServiceCallHistory(reset?: boolean): ServiceCallHistory
|
|
6518
6416
|
}
|
|
6519
6417
|
```
|
|
6520
6418
|
|
|
@@ -6531,7 +6429,7 @@ readonly since: Date
|
|
|
6531
6429
|
###### Method getServiceCallHistory
|
|
6532
6430
|
|
|
6533
6431
|
```ts
|
|
6534
|
-
getServiceCallHistory(reset?: boolean): ServiceCallHistory
|
|
6432
|
+
getServiceCallHistory(reset?: boolean): ServiceCallHistory
|
|
6535
6433
|
```
|
|
6536
6434
|
See also: [ServiceCallHistory](./client.md#interface-servicecallhistory)
|
|
6537
6435
|
|
|
@@ -6544,7 +6442,7 @@ A copy of current service call history
|
|
|
6544
6442
|
Used to de-prioritize a service call by moving it to the end of the list.
|
|
6545
6443
|
|
|
6546
6444
|
```ts
|
|
6547
|
-
moveServiceToLast(stc: ServiceToCall<T>): void
|
|
6445
|
+
moveServiceToLast(stc: ServiceToCall<T>): void
|
|
6548
6446
|
```
|
|
6549
6447
|
See also: [ServiceToCall](./services.md#interface-servicetocall)
|
|
6550
6448
|
|
|
@@ -6556,7 +6454,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
6556
6454
|
```ts
|
|
6557
6455
|
export class Services implements WalletServices {
|
|
6558
6456
|
static readonly getStatusForTxidsBatchLimit = 20;
|
|
6559
|
-
static createDefaultOptions(chain: Chain): WalletServicesOptions
|
|
6457
|
+
static createDefaultOptions(chain: Chain): WalletServicesOptions
|
|
6560
6458
|
options: WalletServicesOptions;
|
|
6561
6459
|
whatsonchain: WhatsOnChain;
|
|
6562
6460
|
arcTaal: ARC;
|
|
@@ -6572,36 +6470,36 @@ export class Services implements WalletServices {
|
|
|
6572
6470
|
updateFiatExchangeRateServices!: ServiceCollection<UpdateFiatExchangeRateService>;
|
|
6573
6471
|
chain: Chain;
|
|
6574
6472
|
readonly telemetry: Telemetry;
|
|
6575
|
-
constructor(optionsOrChain: Chain | WalletServicesOptions)
|
|
6576
|
-
getServicesCallHistory(reset?: boolean): ServicesCallHistory
|
|
6577
|
-
async getChainTracker(): Promise<ChainTracker>
|
|
6578
|
-
async getBsvExchangeRate(): Promise<number>
|
|
6579
|
-
async getFiatExchangeRate(currency: FiatCurrencyCode, base?: FiatCurrencyCode): Promise<number>
|
|
6580
|
-
async getFiatExchangeRates(targetCurrencies: FiatCurrencyCode[]): Promise<FiatExchangeRates>
|
|
6581
|
-
get getProofsCount(): number
|
|
6582
|
-
get getRawTxsCount(): number
|
|
6583
|
-
get postBeefServicesCount(): number
|
|
6584
|
-
get getUtxoStatsCount(): number
|
|
6585
|
-
async getStatusForTxids(txids: string[], useNext?: boolean): Promise<GetStatusForTxidsResult>
|
|
6586
|
-
hashOutputScript(script: string): string
|
|
6587
|
-
async isUtxo(output: TableOutput): Promise<boolean>
|
|
6588
|
-
async getUtxoStatus(output: string, outputFormat?: GetUtxoStatusOutputFormat, outpoint?: string, useNext?: boolean, logger?: WalletLoggerInterface): Promise<GetUtxoStatusResult>
|
|
6589
|
-
async getScriptHashHistory(hash: string, useNext?: boolean, logger?: WalletLoggerInterface): Promise<GetScriptHashHistoryResult>
|
|
6473
|
+
constructor(optionsOrChain: Chain | WalletServicesOptions)
|
|
6474
|
+
getServicesCallHistory(reset?: boolean): ServicesCallHistory
|
|
6475
|
+
async getChainTracker(): Promise<ChainTracker>
|
|
6476
|
+
async getBsvExchangeRate(): Promise<number>
|
|
6477
|
+
async getFiatExchangeRate(currency: FiatCurrencyCode, base?: FiatCurrencyCode): Promise<number>
|
|
6478
|
+
async getFiatExchangeRates(targetCurrencies: FiatCurrencyCode[]): Promise<FiatExchangeRates>
|
|
6479
|
+
get getProofsCount(): number
|
|
6480
|
+
get getRawTxsCount(): number
|
|
6481
|
+
get postBeefServicesCount(): number
|
|
6482
|
+
get getUtxoStatsCount(): number
|
|
6483
|
+
async getStatusForTxids(txids: string[], useNext?: boolean): Promise<GetStatusForTxidsResult>
|
|
6484
|
+
hashOutputScript(script: string): string
|
|
6485
|
+
async isUtxo(output: TableOutput): Promise<boolean>
|
|
6486
|
+
async getUtxoStatus(output: string, outputFormat?: GetUtxoStatusOutputFormat, outpoint?: string, useNext?: boolean, logger?: WalletLoggerInterface): Promise<GetUtxoStatusResult>
|
|
6487
|
+
async getScriptHashHistory(hash: string, useNext?: boolean, logger?: WalletLoggerInterface): Promise<GetScriptHashHistoryResult>
|
|
6590
6488
|
postBeefMode: "PromiseAll" | "UntilSuccess" = "UntilSuccess";
|
|
6591
6489
|
postBeefUntilSuccessSoftTimeoutMs = 5000;
|
|
6592
6490
|
postBeefUntilSuccessSoftTimeoutPerKbMs = 50;
|
|
6593
6491
|
postBeefUntilSuccessSoftTimeoutMaxMs = 30000;
|
|
6594
|
-
async postBeef(beef: Beef, txids: string[], logger?: WalletLoggerInterface): Promise<PostBeefResult[]>
|
|
6595
|
-
async getRawTx(txid: string, useNext?: boolean): Promise<GetRawTxResult>
|
|
6596
|
-
async invokeChaintracksWithRetry<R>(method: () => Promise<R>, operation: string = "unknown"): Promise<R>
|
|
6597
|
-
async getHeaderForHeight(height: number): Promise<number[]>
|
|
6598
|
-
async getHeight(): Promise<number>
|
|
6599
|
-
async hashToHeader(hash: string): Promise<BlockHeader>
|
|
6600
|
-
async getMerklePath(txid: string, useNext?: boolean, logger?: WalletLoggerInterface): Promise<GetMerklePathResult>
|
|
6601
|
-
async getValidatedMerklePath(txid: string, validate: (result: GetMerklePathResult) => Promise<void>): Promise<GetMerklePathResult>
|
|
6602
|
-
async updateFiatExchangeRates(targetCurrencies: FiatCurrencyCode[], updateMsecs?: number): Promise<FiatExchangeRates>
|
|
6603
|
-
async nLockTimeIsFinal(tx: string | number[] | BsvTransaction | number): Promise<boolean>
|
|
6604
|
-
async getBeefForTxid(txid: string): Promise<Beef>
|
|
6492
|
+
async postBeef(beef: Beef, txids: string[], logger?: WalletLoggerInterface): Promise<PostBeefResult[]>
|
|
6493
|
+
async getRawTx(txid: string, useNext?: boolean): Promise<GetRawTxResult>
|
|
6494
|
+
async invokeChaintracksWithRetry<R>(method: () => Promise<R>, operation: string = "unknown"): Promise<R>
|
|
6495
|
+
async getHeaderForHeight(height: number): Promise<number[]>
|
|
6496
|
+
async getHeight(): Promise<number>
|
|
6497
|
+
async hashToHeader(hash: string): Promise<BlockHeader>
|
|
6498
|
+
async getMerklePath(txid: string, useNext?: boolean, logger?: WalletLoggerInterface): Promise<GetMerklePathResult>
|
|
6499
|
+
async getValidatedMerklePath(txid: string, validate: (result: GetMerklePathResult) => Promise<void>): Promise<GetMerklePathResult>
|
|
6500
|
+
async updateFiatExchangeRates(targetCurrencies: FiatCurrencyCode[], updateMsecs?: number): Promise<FiatExchangeRates>
|
|
6501
|
+
async nLockTimeIsFinal(tx: string | number[] | BsvTransaction | number): Promise<boolean>
|
|
6502
|
+
async getBeefForTxid(txid: string): Promise<Beef>
|
|
6605
6503
|
}
|
|
6606
6504
|
```
|
|
6607
6505
|
|
|
@@ -6645,7 +6543,7 @@ postBeefUntilSuccessSoftTimeoutPerKbMs = 50
|
|
|
6645
6543
|
###### Method hashOutputScript
|
|
6646
6544
|
|
|
6647
6545
|
```ts
|
|
6648
|
-
hashOutputScript(script: string): string
|
|
6546
|
+
hashOutputScript(script: string): string
|
|
6649
6547
|
```
|
|
6650
6548
|
|
|
6651
6549
|
Returns
|
|
@@ -6667,9 +6565,9 @@ Allows multiple readers or one writer at a time.
|
|
|
6667
6565
|
|
|
6668
6566
|
```ts
|
|
6669
6567
|
export class SingleWriterMultiReaderLock {
|
|
6670
|
-
constructor(private readonly maxQueued = 4096)
|
|
6671
|
-
async withReadLock<T>(fn: () => Promise<T>): Promise<T>
|
|
6672
|
-
async withWriteLock<T>(fn: () => Promise<T>): Promise<T>
|
|
6568
|
+
constructor(private readonly maxQueued = 4096)
|
|
6569
|
+
async withReadLock<T>(fn: () => Promise<T>): Promise<T>
|
|
6570
|
+
async withWriteLock<T>(fn: () => Promise<T>): Promise<T>
|
|
6673
6571
|
}
|
|
6674
6572
|
```
|
|
6675
6573
|
|
|
@@ -6681,8 +6579,8 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
6681
6579
|
```ts
|
|
6682
6580
|
export class WhatsOnChain extends WhatsOnChainNoServices {
|
|
6683
6581
|
services: Services;
|
|
6684
|
-
constructor(chain: Chain = "main", config: WalletToolboxWhatsOnChainConfig = {}, services?: Services)
|
|
6685
|
-
async getMerklePath(txid: string, services: WalletServices): Promise<GetMerklePathResult>
|
|
6582
|
+
constructor(chain: Chain = "main", config: WalletToolboxWhatsOnChainConfig = {}, services?: Services)
|
|
6583
|
+
async getMerklePath(txid: string, services: WalletServices): Promise<GetMerklePathResult>
|
|
6686
6584
|
}
|
|
6687
6585
|
```
|
|
6688
6586
|
|
|
@@ -6695,20 +6593,20 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
6695
6593
|
|
|
6696
6594
|
```ts
|
|
6697
6595
|
export class WhatsOnChainNoServices extends SdkWhatsOnChain {
|
|
6698
|
-
constructor(chain: Chain = "main", config: WalletToolboxWhatsOnChainConfig = {})
|
|
6699
|
-
async getStatusForTxids(txids: string[]): Promise<GetStatusForTxidsResult>
|
|
6700
|
-
async getTxPropagation(txid: string): Promise<number>
|
|
6701
|
-
async getRawTx(txid: string): Promise<string | undefined>
|
|
6702
|
-
async getRawTxResult(txid: string): Promise<GetRawTxResult>
|
|
6703
|
-
async postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult>
|
|
6704
|
-
async postRawTx(rawTx: HexString): Promise<PostTxResultForTxid>
|
|
6705
|
-
async updateBsvExchangeRate(rate?: BsvExchangeRate, updateMsecs?: number): Promise<BsvExchangeRate>
|
|
6706
|
-
async getUtxoStatus(output: string, outputFormat?: GetUtxoStatusOutputFormat, outpoint?: string): Promise<GetUtxoStatusResult>
|
|
6707
|
-
async getScriptHashConfirmedHistory(hash: string): Promise<GetScriptHashHistoryResult>
|
|
6708
|
-
async getScriptHashUnconfirmedHistory(hash: string): Promise<GetScriptHashHistoryResult>
|
|
6709
|
-
async getScriptHashHistory(hash: string): Promise<GetScriptHashHistoryResult>
|
|
6710
|
-
async getBlockHeaderByHash(hash: string): Promise<BlockHeader | undefined>
|
|
6711
|
-
async getChainInfo(): Promise<WocChainInfo>
|
|
6596
|
+
constructor(chain: Chain = "main", config: WalletToolboxWhatsOnChainConfig = {})
|
|
6597
|
+
async getStatusForTxids(txids: string[]): Promise<GetStatusForTxidsResult>
|
|
6598
|
+
async getTxPropagation(txid: string): Promise<number>
|
|
6599
|
+
async getRawTx(txid: string): Promise<string | undefined>
|
|
6600
|
+
async getRawTxResult(txid: string): Promise<GetRawTxResult>
|
|
6601
|
+
async postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult>
|
|
6602
|
+
async postRawTx(rawTx: HexString): Promise<PostTxResultForTxid>
|
|
6603
|
+
async updateBsvExchangeRate(rate?: BsvExchangeRate, updateMsecs?: number): Promise<BsvExchangeRate>
|
|
6604
|
+
async getUtxoStatus(output: string, outputFormat?: GetUtxoStatusOutputFormat, outpoint?: string): Promise<GetUtxoStatusResult>
|
|
6605
|
+
async getScriptHashConfirmedHistory(hash: string): Promise<GetScriptHashHistoryResult>
|
|
6606
|
+
async getScriptHashUnconfirmedHistory(hash: string): Promise<GetScriptHashHistoryResult>
|
|
6607
|
+
async getScriptHashHistory(hash: string): Promise<GetScriptHashHistoryResult>
|
|
6608
|
+
async getBlockHeaderByHash(hash: string): Promise<BlockHeader | undefined>
|
|
6609
|
+
async getChainInfo(): Promise<WocChainInfo>
|
|
6712
6610
|
}
|
|
6713
6611
|
```
|
|
6714
6612
|
|
|
@@ -6737,7 +6635,7 @@ See also: [BlockHeader](./client.md#interface-blockheader), [BsvExchangeRate](./
|
|
|
6737
6635
|
}
|
|
6738
6636
|
|
|
6739
6637
|
```ts
|
|
6740
|
-
async getBlockHeaderByHash(hash: string): Promise<BlockHeader | undefined>
|
|
6638
|
+
async getBlockHeaderByHash(hash: string): Promise<BlockHeader | undefined>
|
|
6741
6639
|
```
|
|
6742
6640
|
See also: [BlockHeader](./client.md#interface-blockheader)
|
|
6743
6641
|
|
|
@@ -6746,7 +6644,7 @@ See also: [BlockHeader](./client.md#interface-blockheader)
|
|
|
6746
6644
|
May return undefined for unmined transactions that are in the mempool.
|
|
6747
6645
|
|
|
6748
6646
|
```ts
|
|
6749
|
-
async getRawTx(txid: string): Promise<string | undefined>
|
|
6647
|
+
async getRawTx(txid: string): Promise<string | undefined>
|
|
6750
6648
|
```
|
|
6751
6649
|
|
|
6752
6650
|
Returns
|
|
@@ -6776,7 +6674,7 @@ result for an unknown txid:
|
|
|
6776
6674
|
[{"txid":"6815f8014db74eab8b7f75925c68929597f1d97efa970109d990824c25e5e62c","error":"unknown"}]
|
|
6777
6675
|
|
|
6778
6676
|
```ts
|
|
6779
|
-
async getStatusForTxids(txids: string[]): Promise<GetStatusForTxidsResult>
|
|
6677
|
+
async getStatusForTxids(txids: string[]): Promise<GetStatusForTxidsResult>
|
|
6780
6678
|
```
|
|
6781
6679
|
See also: [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult)
|
|
6782
6680
|
|
|
@@ -6785,7 +6683,7 @@ See also: [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresul
|
|
|
6785
6683
|
2025-02-16 throwing internal server error 500.
|
|
6786
6684
|
|
|
6787
6685
|
```ts
|
|
6788
|
-
async getTxPropagation(txid: string): Promise<number>
|
|
6686
|
+
async getTxPropagation(txid: string): Promise<number>
|
|
6789
6687
|
```
|
|
6790
6688
|
|
|
6791
6689
|
###### Method postBeef
|
|
@@ -6795,14 +6693,14 @@ WhatsOnChain does not natively support a postBeef end-point aware of multiple tx
|
|
|
6795
6693
|
Send rawTx in `txids` order from beef.
|
|
6796
6694
|
|
|
6797
6695
|
```ts
|
|
6798
|
-
async postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult>
|
|
6696
|
+
async postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult>
|
|
6799
6697
|
```
|
|
6800
6698
|
See also: [PostBeefResult](./client.md#interface-postbeefresult)
|
|
6801
6699
|
|
|
6802
6700
|
###### Method postRawTx
|
|
6803
6701
|
|
|
6804
6702
|
```ts
|
|
6805
|
-
async postRawTx(rawTx: HexString): Promise<PostTxResultForTxid>
|
|
6703
|
+
async postRawTx(rawTx: HexString): Promise<PostTxResultForTxid>
|
|
6806
6704
|
```
|
|
6807
6705
|
See also: [PostTxResultForTxid](./client.md#interface-posttxresultfortxid)
|
|
6808
6706
|
|
|
@@ -6822,7 +6720,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
6822
6720
|
|
|
6823
6721
|
```ts
|
|
6824
6722
|
export class WhatsOnChainServices {
|
|
6825
|
-
static createWhatsOnChainServicesOptions(chain: Chain): WhatsOnChainServicesOptions
|
|
6723
|
+
static createWhatsOnChainServicesOptions(chain: Chain): WhatsOnChainServicesOptions
|
|
6826
6724
|
static readonly chainInfo: Array<WocChainInfo | undefined> = [];
|
|
6827
6725
|
static readonly chainInfoTime: Array<Date | undefined> = [];
|
|
6828
6726
|
static readonly chainInfoMsecs: number[] = [];
|
|
@@ -6830,13 +6728,13 @@ export class WhatsOnChainServices {
|
|
|
6830
6728
|
chain: Chain;
|
|
6831
6729
|
woc: WhatsOnChain;
|
|
6832
6730
|
public readonly options: WhatsOnChainServicesOptions;
|
|
6833
|
-
constructor(options: WhatsOnChainServicesOptions)
|
|
6834
|
-
async getHeaderByHash(hash: string): Promise<BlockHeader | undefined>
|
|
6835
|
-
async getChainInfo(): Promise<WocChainInfo>
|
|
6836
|
-
async getChainTipHeight(): Promise<number>
|
|
6837
|
-
async getChainTipHash(): Promise<string>
|
|
6838
|
-
async getHeaders(fetch?: ChaintracksFetchApi): Promise<WocGetHeadersHeader[]>
|
|
6839
|
-
async getHeaderByteFileLinks(neededRange: HeightRange, fetch?: ChaintracksFetchApi): Promise<GetHeaderByteFileLinksResult[]>
|
|
6731
|
+
constructor(options: WhatsOnChainServicesOptions)
|
|
6732
|
+
async getHeaderByHash(hash: string): Promise<BlockHeader | undefined>
|
|
6733
|
+
async getChainInfo(): Promise<WocChainInfo>
|
|
6734
|
+
async getChainTipHeight(): Promise<number>
|
|
6735
|
+
async getChainTipHash(): Promise<string>
|
|
6736
|
+
async getHeaders(fetch?: ChaintracksFetchApi): Promise<WocGetHeadersHeader[]>
|
|
6737
|
+
async getHeaderByteFileLinks(neededRange: HeightRange, fetch?: ChaintracksFetchApi): Promise<GetHeaderByteFileLinksResult[]>
|
|
6840
6738
|
}
|
|
6841
6739
|
```
|
|
6842
6740
|
|
|
@@ -6845,7 +6743,7 @@ See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#
|
|
|
6845
6743
|
###### Method getHeaders
|
|
6846
6744
|
|
|
6847
6745
|
```ts
|
|
6848
|
-
async getHeaders(fetch?: ChaintracksFetchApi): Promise<WocGetHeadersHeader[]>
|
|
6746
|
+
async getHeaders(fetch?: ChaintracksFetchApi): Promise<WocGetHeadersHeader[]>
|
|
6849
6747
|
```
|
|
6850
6748
|
See also: [ChaintracksFetchApi](./services.md#interface-chaintracksfetchapi), [WocGetHeadersHeader](./services.md#interface-wocgetheadersheader)
|
|
6851
6749
|
|
|
@@ -6860,30 +6758,29 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
6860
6758
|
|
|
6861
6759
|
| | | |
|
|
6862
6760
|
| --- | --- | --- |
|
|
6863
|
-
| [WocHeadersBulkListener](#function-wocheadersbulklistener) | [
|
|
6864
|
-
| [WocHeadersBulkListener_test](#function-wocheadersbulklistener_test) | [
|
|
6865
|
-
| [WocHeadersLiveListener](#function-wocheaderslivelistener) | [
|
|
6866
|
-
| [WocHeadersLiveListener_test](#function-wocheaderslivelistener_test) | [
|
|
6867
|
-
| [addWork](#function-addwork) | [
|
|
6868
|
-
| [arcDefaultUrl](#function-arcdefaulturl) | [
|
|
6869
|
-
| [arcGorillaPoolUrl](#function-arcgorillapoolurl) | [
|
|
6870
|
-
| [arcadeDefaultUrl](#function-arcadedefaulturl) | [
|
|
6871
|
-
| [authenticateMerklePathResult](#function-authenticatemerklepathresult) | [
|
|
6872
|
-
| [blockHash](#function-blockhash) | [
|
|
6873
|
-
| [buildChaintracksOptionsWithIngestors](#function-buildchaintracksoptionswithingestors) | [
|
|
6874
|
-
| [classifyArcadeRejection](#function-classifyarcaderejection) | [
|
|
6875
|
-
| [classifyMerklePathResponse](#function-classifymerklepathresponse) | [
|
|
6876
|
-
| [classifyOutputUtxo](#function-classifyoutpututxo) | [
|
|
6877
|
-
| [containsControlCharacter](#function-containscontrolcharacter) | [
|
|
6878
|
-
| [convertBitsToTarget](#function-convertbitstotarget) | [
|
|
6879
|
-
| [convertBitsToWork](#function-convertbitstowork) | [
|
|
6880
|
-
| [convertBufferToUint32](#function-convertbuffertouint32) | [
|
|
6881
|
-
| [convertUint32ToBuffer](#function-convertuint32tobuffer) | [
|
|
6882
|
-
| [convertWocToBlockHeaderHex](#function-convertwoctoblockheaderhex) | [
|
|
6883
|
-
| [
|
|
6884
|
-
| [
|
|
6885
|
-
| [
|
|
6886
|
-
| [createAndStartDefaultChaintracks](#function-createandstartdefaultchaintracks) | [normalizeBulkHeaderFileSequence](#function-normalizebulkheaderfilesequence) | [validateCanonicalMerklePathResult](#function-validatecanonicalmerklepathresult) |
|
|
6761
|
+
| [WocHeadersBulkListener](#function-wocheadersbulklistener) | [getWhatsOnChainBlockHeaderByHash](#function-getwhatsonchainblockheaderbyhash) | [serializeBaseBlockHeader](#function-serializebaseblockheader) |
|
|
6762
|
+
| [WocHeadersBulkListener_test](#function-wocheadersbulklistener_test) | [handlePostRawTxErrorResponse](#function-handlepostrawtxerrorresponse) | [serializeBaseBlockHeaders](#function-serializebaseblockheaders) |
|
|
6763
|
+
| [WocHeadersLiveListener](#function-wocheaderslivelistener) | [handleScriptHashHistoryCatch](#function-handlescripthashhistorycatch) | [sha256HashOfBinaryFile](#function-sha256hashofbinaryfile) |
|
|
6764
|
+
| [WocHeadersLiveListener_test](#function-wocheaderslivelistener_test) | [handleScriptHashHistoryResponse](#function-handlescripthashhistoryresponse) | [snapshotMerklePathResult](#function-snapshotmerklepathresult) |
|
|
6765
|
+
| [addWork](#function-addwork) | [handleUtxoConnReset](#function-handleutxoconnreset) | [snapshotPostBeefRequest](#function-snapshotpostbeefrequest) |
|
|
6766
|
+
| [arcDefaultUrl](#function-arcdefaulturl) | [isArcAcceptedTxStatus](#function-isarcacceptedtxstatus) | [startChaintracks](#function-startchaintracks) |
|
|
6767
|
+
| [arcGorillaPoolUrl](#function-arcgorillapoolurl) | [isArcDoubleSpendTxStatus](#function-isarcdoublespendtxstatus) | [stnArcadeUrl](#function-stnarcadeurl) |
|
|
6768
|
+
| [arcadeDefaultUrl](#function-arcadedefaulturl) | [isArcInvalidTxStatus](#function-isarcinvalidtxstatus) | [stnChaintracksUrl](#function-stnchaintracksurl) |
|
|
6769
|
+
| [authenticateMerklePathResult](#function-authenticatemerklepathresult) | [isArcServiceErrorStatus](#function-isarcserviceerrorstatus) | [subWork](#function-subwork) |
|
|
6770
|
+
| [blockHash](#function-blockhash) | [isBaseBlockHeader](#function-isbaseblockheader) | [swapByteOrder](#function-swapbyteorder) |
|
|
6771
|
+
| [buildChaintracksOptionsWithIngestors](#function-buildchaintracksoptionswithingestors) | [isBlockHeader](#function-isblockheader) | [toBinaryBaseBlockHeader](#function-tobinarybaseblockheader) |
|
|
6772
|
+
| [classifyArcadeRejection](#function-classifyarcaderejection) | [isKnownValidBulkHeaderFile](#function-isknownvalidbulkheaderfile) | [toDefaultChaintracksArguments](#function-todefaultchaintracksarguments) |
|
|
6773
|
+
| [classifyMerklePathResponse](#function-classifymerklepathresponse) | [isLive](#function-islive) | [toDefaultKnexChaintracksArguments](#function-todefaultknexchaintracksarguments) |
|
|
6774
|
+
| [classifyOutputUtxo](#function-classifyoutpututxo) | [isLiveBlockHeader](#function-isliveblockheader) | [tstnArcadeUrl](#function-tstnarcadeurl) |
|
|
6775
|
+
| [containsControlCharacter](#function-containscontrolcharacter) | [isMoreWork](#function-ismorework) | [tstnChaintracksUrl](#function-tstnchaintracksurl) |
|
|
6776
|
+
| [convertBitsToTarget](#function-convertbitstotarget) | [isValidFiatRate](#function-isvalidfiatrate) | [updateChaintracksFiatExchangeRates](#function-updatechaintracksfiatexchangerates) |
|
|
6777
|
+
| [convertBitsToWork](#function-convertbitstowork) | [makeMerklePathNote](#function-makemerklepathnote) | [updateExchangeratesapi](#function-updateexchangeratesapi) |
|
|
6778
|
+
| [convertBufferToUint32](#function-convertbuffertouint32) | [makePostBeefServiceError](#function-makepostbeefserviceerror) | [validBulkHeaderFilesByFileHash](#function-validbulkheaderfilesbyfilehash) |
|
|
6779
|
+
| [convertUint32ToBuffer](#function-convertuint32tobuffer) | [mapWithConcurrency](#function-mapwithconcurrency) | [validateAgainstDirtyHashes](#function-validateagainstdirtyhashes) |
|
|
6780
|
+
| [convertWocToBlockHeaderHex](#function-convertwoctoblockheaderhex) | [normalizeArcProviderConfig](#function-normalizearcproviderconfig) | [validateArcadeTxData](#function-validatearcadetxdata) |
|
|
6781
|
+
| [copyRawTransactionBytes](#function-copyrawtransactionbytes) | [normalizeBulkFileDataValidationRequest](#function-normalizebulkfiledatavalidationrequest) | [validateBaseBlockHeaderFormat](#function-validatebaseblockheaderformat) |
|
|
6782
|
+
| [copyValidatedBlockHeader](#function-copyvalidatedblockheader) | [normalizeBulkHeaderFileInfo](#function-normalizebulkheaderfileinfo) | [validateBufferOfHeaders](#function-validatebufferofheaders) |
|
|
6783
|
+
| [createAndStartDefaultChaintracks](#function-createandstartdefaultchaintracks) | [normalizeBulkHeaderFileSequence](#function-normalizebulkheaderfilesequence) | [validateBulkFileData](#function-validatebulkfiledata) |
|
|
6887
6784
|
| [createAndStartDefaultKnexChaintracks](#function-createandstartdefaultknexchaintracks) | [normalizeBulkHeaderFilesInfo](#function-normalizebulkheaderfilesinfo) | [validateGenesisHeader](#function-validategenesisheader) |
|
|
6888
6785
|
| [createChaintracksInitialSchema](#function-createchaintracksinitialschema) | [normalizeFiatCurrencies](#function-normalizefiatcurrencies) | [validateHeaderDifficulty](#function-validateheaderdifficulty) |
|
|
6889
6786
|
| [createDefaultBulkFileDataManager](#function-createdefaultbulkfiledatamanager) | [normalizeFiatCurrency](#function-normalizefiatcurrency) | [validateHeaderFormat](#function-validateheaderformat) |
|
|
@@ -6904,7 +6801,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
6904
6801
|
| [genesisBuffer](#function-genesisbuffer) | [resolveDefaultChaintracksArguments](#function-resolvedefaultchaintracksarguments) | [writeUInt32BE](#function-writeuint32be) |
|
|
6905
6802
|
| [genesisHeader](#function-genesisheader) | [resolveDefaultKnexChaintracksArguments](#function-resolvedefaultknexchaintracksarguments) | [writeUInt32LE](#function-writeuint32le) |
|
|
6906
6803
|
| [getBeefForTxid](#function-getbeeffortxid) | [safeDiagnostic](#function-safediagnostic) | |
|
|
6907
|
-
| [
|
|
6804
|
+
| [getExchangeRatesIo](#function-getexchangeratesio) | [selectBulkHeaderFiles](#function-selectbulkheaderfiles) | |
|
|
6908
6805
|
|
|
6909
6806
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6910
6807
|
|
|
@@ -6924,7 +6821,7 @@ export async function WocHeadersBulkListener(...[fromHeight, toHeight, enqueue,
|
|
|
6924
6821
|
chain: Chain,
|
|
6925
6822
|
logger?: (...args: any[]) => void,
|
|
6926
6823
|
idleWait?: number
|
|
6927
|
-
]): Promise<boolean>
|
|
6824
|
+
]): Promise<boolean>
|
|
6928
6825
|
```
|
|
6929
6826
|
|
|
6930
6827
|
See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [StopListenerToken](./services.md#interface-stoplistenertoken), [logger](./client.md#variable-logger)
|
|
@@ -6968,7 +6865,7 @@ v2
|
|
|
6968
6865
|
}
|
|
6969
6866
|
|
|
6970
6867
|
```ts
|
|
6971
|
-
export async function WocHeadersBulkListener_test(): Promise<void>
|
|
6868
|
+
export async function WocHeadersBulkListener_test(): Promise<void>
|
|
6972
6869
|
```
|
|
6973
6870
|
|
|
6974
6871
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -6979,7 +6876,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
6979
6876
|
High speed WebSocket based based new block header listener
|
|
6980
6877
|
|
|
6981
6878
|
```ts
|
|
6982
|
-
export async function WocHeadersLiveListener(enqueue: (header: BlockHeader) => void, error: (code: number, message: string) => boolean, stop: StopListenerToken, chain: Chain, _logger: (...args: any[]) => void, idleWait = 100000): Promise<boolean>
|
|
6879
|
+
export async function WocHeadersLiveListener(enqueue: (header: BlockHeader) => void, error: (code: number, message: string) => boolean, stop: StopListenerToken, chain: Chain, _logger: (...args: any[]) => void, idleWait = 100000): Promise<boolean>
|
|
6983
6880
|
```
|
|
6984
6881
|
|
|
6985
6882
|
See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [StopListenerToken](./services.md#interface-stoplistenertoken)
|
|
@@ -7007,7 +6904,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7007
6904
|
##### Function: WocHeadersLiveListener_test
|
|
7008
6905
|
|
|
7009
6906
|
```ts
|
|
7010
|
-
export async function WocHeadersLiveListener_test(): Promise<void>
|
|
6907
|
+
export async function WocHeadersLiveListener_test(): Promise<void>
|
|
7011
6908
|
```
|
|
7012
6909
|
|
|
7013
6910
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -7018,7 +6915,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7018
6915
|
Add two Buffer encoded chainwork values
|
|
7019
6916
|
|
|
7020
6917
|
```ts
|
|
7021
|
-
export function addWork(work1: string, work2: string): string
|
|
6918
|
+
export function addWork(work1: string, work2: string): string
|
|
7022
6919
|
```
|
|
7023
6920
|
|
|
7024
6921
|
Returns
|
|
@@ -7031,7 +6928,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7031
6928
|
##### Function: arcDefaultUrl
|
|
7032
6929
|
|
|
7033
6930
|
```ts
|
|
7034
|
-
export function arcDefaultUrl(chain: Chain): string
|
|
6931
|
+
export function arcDefaultUrl(chain: Chain): string
|
|
7035
6932
|
```
|
|
7036
6933
|
|
|
7037
6934
|
See also: [Chain](./client.md#type-chain)
|
|
@@ -7042,7 +6939,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7042
6939
|
##### Function: arcGorillaPoolUrl
|
|
7043
6940
|
|
|
7044
6941
|
```ts
|
|
7045
|
-
export function arcGorillaPoolUrl(chain: Chain): string | undefined
|
|
6942
|
+
export function arcGorillaPoolUrl(chain: Chain): string | undefined
|
|
7046
6943
|
```
|
|
7047
6944
|
|
|
7048
6945
|
See also: [Chain](./client.md#type-chain)
|
|
@@ -7056,7 +6953,7 @@ Default Arcade (bsv-blockchain/arcade) endpoint per chain.
|
|
|
7056
6953
|
Returns undefined when no public default is known for the chain.
|
|
7057
6954
|
|
|
7058
6955
|
```ts
|
|
7059
|
-
export function arcadeDefaultUrl(chain: Chain): string | undefined
|
|
6956
|
+
export function arcadeDefaultUrl(chain: Chain): string | undefined
|
|
7060
6957
|
```
|
|
7061
6958
|
|
|
7062
6959
|
See also: [Chain](./client.md#type-chain)
|
|
@@ -7067,7 +6964,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7067
6964
|
##### Function: authenticateMerklePathResult
|
|
7068
6965
|
|
|
7069
6966
|
```ts
|
|
7070
|
-
export async function authenticateMerklePathResult(requestedTxid: unknown, result: GetMerklePathResult, validator: MerkleRootValidator, requireProofOfWork = false, requireHeaderFormat = true): Promise<ValidatedMerklePathResult>
|
|
6967
|
+
export async function authenticateMerklePathResult(requestedTxid: unknown, result: GetMerklePathResult, validator: MerkleRootValidator, requireProofOfWork = false, requireHeaderFormat = true): Promise<ValidatedMerklePathResult>
|
|
7071
6968
|
```
|
|
7072
6969
|
|
|
7073
6970
|
See also: [GetMerklePathResult](./client.md#interface-getmerklepathresult), [MerkleRootValidator](./services.md#interface-merklerootvalidator), [ValidatedMerklePathResult](./services.md#interface-validatedmerklepathresult)
|
|
@@ -7109,7 +7006,7 @@ Builds the shared portion of ChaintracksOptions that all storage backends
|
|
|
7109
7006
|
The caller is responsible for providing the storage implementation.
|
|
7110
7007
|
|
|
7111
7008
|
```ts
|
|
7112
|
-
export function buildChaintracksOptionsWithIngestors(params: ChaintracksIngestorParams, storage: ChaintracksOptions["storage"]): ChaintracksOptions
|
|
7009
|
+
export function buildChaintracksOptionsWithIngestors(params: ChaintracksIngestorParams, storage: ChaintracksOptions["storage"]): ChaintracksOptions
|
|
7113
7010
|
```
|
|
7114
7011
|
|
|
7115
7012
|
See also: [ChaintracksIngestorParams](./services.md#interface-chaintracksingestorparams), [ChaintracksOptions](./services.md#interface-chaintracksoptions)
|
|
@@ -7124,7 +7021,7 @@ one place prevents a provider from calling a rejection "unknown" while the
|
|
|
7124
7021
|
monitor's event path calls the same status terminal.
|
|
7125
7022
|
|
|
7126
7023
|
```ts
|
|
7127
|
-
export function classifyArcadeRejection(event: ArcadeLifecycleStatus): ArcadeRejectionClassification
|
|
7024
|
+
export function classifyArcadeRejection(event: ArcadeLifecycleStatus): ArcadeRejectionClassification
|
|
7128
7025
|
```
|
|
7129
7026
|
|
|
7130
7027
|
See also: [ArcadeLifecycleStatus](./services.md#interface-arcadelifecyclestatus), [ArcadeRejectionClassification](./services.md#interface-arcaderejectionclassification)
|
|
@@ -7140,7 +7037,7 @@ Returns `'retry'` when the request was rate-limited and the caller should retry,
|
|
|
7140
7037
|
`'notFound'` for 404, `'badStatus'` for other non-200 codes.
|
|
7141
7038
|
|
|
7142
7039
|
```ts
|
|
7143
|
-
export function classifyMerklePathResponse(status: number, statusText: string, retry: number): "retry" | "notFound" | "badStatus" | "ok"
|
|
7040
|
+
export function classifyMerklePathResponse(status: number, statusText: string, retry: number): "retry" | "notFound" | "badStatus" | "ok"
|
|
7144
7041
|
```
|
|
7145
7042
|
|
|
7146
7043
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -7154,7 +7051,7 @@ batch callers can finish classifying every candidate before deciding whether
|
|
|
7154
7051
|
a destructive operation is safe.
|
|
7155
7052
|
|
|
7156
7053
|
```ts
|
|
7157
|
-
export async function classifyOutputUtxo(services: UtxoServices, output: TableOutput): Promise<OutputUtxoClassification>
|
|
7054
|
+
export async function classifyOutputUtxo(services: UtxoServices, output: TableOutput): Promise<OutputUtxoClassification>
|
|
7158
7055
|
```
|
|
7159
7056
|
|
|
7160
7057
|
See also: [OutputUtxoClassification](./services.md#interface-outpututxoclassification), [TableOutput](./storage.md#interface-tableoutput)
|
|
@@ -7165,7 +7062,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7165
7062
|
##### Function: containsControlCharacter
|
|
7166
7063
|
|
|
7167
7064
|
```ts
|
|
7168
|
-
export function containsControlCharacter(value: string): boolean
|
|
7065
|
+
export function containsControlCharacter(value: string): boolean
|
|
7169
7066
|
```
|
|
7170
7067
|
|
|
7171
7068
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -7176,7 +7073,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7176
7073
|
Computes "target" value for 4 byte Bitcoin block header "bits" value.
|
|
7177
7074
|
|
|
7178
7075
|
```ts
|
|
7179
|
-
export function convertBitsToTarget(bits: number | number[]): BigNumber
|
|
7076
|
+
export function convertBitsToTarget(bits: number | number[]): BigNumber
|
|
7180
7077
|
```
|
|
7181
7078
|
|
|
7182
7079
|
Returns
|
|
@@ -7196,7 +7093,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7196
7093
|
Computes "chainWork" value for 4 byte Bitcoin block header "bits" value.
|
|
7197
7094
|
|
|
7198
7095
|
```ts
|
|
7199
|
-
export function convertBitsToWork(bits: number | number[]): string
|
|
7096
|
+
export function convertBitsToWork(bits: number | number[]): string
|
|
7200
7097
|
```
|
|
7201
7098
|
|
|
7202
7099
|
Returns
|
|
@@ -7278,31 +7175,18 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7278
7175
|
##### Function: convertWocToBlockHeaderHex
|
|
7279
7176
|
|
|
7280
7177
|
```ts
|
|
7281
|
-
export function convertWocToBlockHeaderHex(woc: WocHeader): BlockHeader
|
|
7178
|
+
export function convertWocToBlockHeaderHex(woc: WocHeader): BlockHeader
|
|
7282
7179
|
```
|
|
7283
7180
|
|
|
7284
7181
|
See also: [BlockHeader](./client.md#interface-blockheader), [WocHeader](./services.md#interface-wocheader)
|
|
7285
7182
|
|
|
7286
7183
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7287
7184
|
|
|
7288
|
-
---
|
|
7289
|
-
##### Function: copyMerklePath
|
|
7290
|
-
|
|
7291
|
-
```ts
|
|
7292
|
-
export function copyMerklePath(txid: string, value: unknown): {
|
|
7293
|
-
merklePath: MerklePath;
|
|
7294
|
-
root: string;
|
|
7295
|
-
index: number;
|
|
7296
|
-
}
|
|
7297
|
-
```
|
|
7298
|
-
|
|
7299
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7300
|
-
|
|
7301
7185
|
---
|
|
7302
7186
|
##### Function: copyRawTransactionBytes
|
|
7303
7187
|
|
|
7304
7188
|
```ts
|
|
7305
|
-
export function copyRawTransactionBytes(value: unknown, name = "rawTx"): number[]
|
|
7189
|
+
export function copyRawTransactionBytes(value: unknown, name = "rawTx"): number[]
|
|
7306
7190
|
```
|
|
7307
7191
|
|
|
7308
7192
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -7311,7 +7195,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7311
7195
|
##### Function: copyValidatedBlockHeader
|
|
7312
7196
|
|
|
7313
7197
|
```ts
|
|
7314
|
-
export function copyValidatedBlockHeader(value: unknown, requireProofOfWork = false, requireHeaderFormat = true): BlockHeader
|
|
7198
|
+
export function copyValidatedBlockHeader(value: unknown, requireProofOfWork = false, requireHeaderFormat = true): BlockHeader
|
|
7315
7199
|
```
|
|
7316
7200
|
|
|
7317
7201
|
See also: [BlockHeader](./client.md#interface-blockheader)
|
|
@@ -7322,7 +7206,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7322
7206
|
##### Function: createAndStartDefaultChaintracks
|
|
7323
7207
|
|
|
7324
7208
|
```ts
|
|
7325
|
-
export function createAndStartDefaultChaintracks<TStorage extends ChaintracksOptions["storage"]>(args: DefaultChaintracksArguments, createOptions: (...args: DefaultChaintracksArguments) => ChaintracksOptions): CreatedChaintracks<TStorage>
|
|
7209
|
+
export function createAndStartDefaultChaintracks<TStorage extends ChaintracksOptions["storage"]>(args: DefaultChaintracksArguments, createOptions: (...args: DefaultChaintracksArguments) => ChaintracksOptions): CreatedChaintracks<TStorage>
|
|
7326
7210
|
```
|
|
7327
7211
|
|
|
7328
7212
|
See also: [ChaintracksOptions](./services.md#interface-chaintracksoptions), [CreatedChaintracks](./services.md#interface-createdchaintracks), [DefaultChaintracksArguments](./services.md#type-defaultchaintracksarguments)
|
|
@@ -7333,7 +7217,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7333
7217
|
##### Function: createAndStartDefaultKnexChaintracks
|
|
7334
7218
|
|
|
7335
7219
|
```ts
|
|
7336
|
-
export function createAndStartDefaultKnexChaintracks<TStorage extends ChaintracksOptions["storage"]>(args: DefaultKnexChaintracksArguments, createOptions: (...args: DefaultKnexChaintracksArguments) => ChaintracksOptions): CreatedChaintracks<TStorage>
|
|
7220
|
+
export function createAndStartDefaultKnexChaintracks<TStorage extends ChaintracksOptions["storage"]>(args: DefaultKnexChaintracksArguments, createOptions: (...args: DefaultKnexChaintracksArguments) => ChaintracksOptions): CreatedChaintracks<TStorage>
|
|
7337
7221
|
```
|
|
7338
7222
|
|
|
7339
7223
|
See also: [ChaintracksOptions](./services.md#interface-chaintracksoptions), [CreatedChaintracks](./services.md#interface-createdchaintracks), [DefaultKnexChaintracksArguments](./services.md#type-defaultknexchaintracksarguments)
|
|
@@ -7346,7 +7230,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7346
7230
|
Builds the current Chaintracks schema. Exported so dialect DDL can be regression-tested without a live server.
|
|
7347
7231
|
|
|
7348
7232
|
```ts
|
|
7349
|
-
export function createChaintracksInitialSchema(knex: Knex): Knex.SchemaBuilder
|
|
7233
|
+
export function createChaintracksInitialSchema(knex: Knex): Knex.SchemaBuilder
|
|
7350
7234
|
```
|
|
7351
7235
|
|
|
7352
7236
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -7355,7 +7239,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7355
7239
|
##### Function: createDefaultBulkFileDataManager
|
|
7356
7240
|
|
|
7357
7241
|
```ts
|
|
7358
|
-
export function createDefaultBulkFileDataManager(params: ResolvedDefaultChaintracksParams): BulkFileDataManager
|
|
7242
|
+
export function createDefaultBulkFileDataManager(params: ResolvedDefaultChaintracksParams): BulkFileDataManager
|
|
7359
7243
|
```
|
|
7360
7244
|
|
|
7361
7245
|
See also: [BulkFileDataManager](./services.md#class-bulkfiledatamanager), [ResolvedDefaultChaintracksParams](./services.md#interface-resolveddefaultchaintracksparams)
|
|
@@ -7382,7 +7266,7 @@ check proves it), this branch can be removed and browsers can share the v2
|
|
|
7382
7266
|
default. Node runtimes are unchanged.
|
|
7383
7267
|
|
|
7384
7268
|
```ts
|
|
7385
|
-
export function createDefaultChaintracksClient(chain: Exclude<Chain, "mock">): ChaintracksClientApi
|
|
7269
|
+
export function createDefaultChaintracksClient(chain: Exclude<Chain, "mock">): ChaintracksClientApi
|
|
7386
7270
|
```
|
|
7387
7271
|
|
|
7388
7272
|
See also: [Chain](./client.md#type-chain), [ChaintracksClientApi](./services.md#interface-chaintracksclientapi)
|
|
@@ -7393,7 +7277,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7393
7277
|
##### Function: createDefaultChaintracksStorageOptions
|
|
7394
7278
|
|
|
7395
7279
|
```ts
|
|
7396
|
-
export function createDefaultChaintracksStorageOptions(params: ResolvedDefaultChaintracksParams)
|
|
7280
|
+
export function createDefaultChaintracksStorageOptions(params: ResolvedDefaultChaintracksParams)
|
|
7397
7281
|
```
|
|
7398
7282
|
|
|
7399
7283
|
See also: [ResolvedDefaultChaintracksParams](./services.md#interface-resolveddefaultchaintracksparams)
|
|
@@ -7404,7 +7288,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7404
7288
|
##### Function: createDefaultIdbChaintracksOptions
|
|
7405
7289
|
|
|
7406
7290
|
```ts
|
|
7407
|
-
export function createDefaultIdbChaintracksOptions(...args: DefaultChaintracksArguments): ChaintracksOptions
|
|
7291
|
+
export function createDefaultIdbChaintracksOptions(...args: DefaultChaintracksArguments): ChaintracksOptions
|
|
7408
7292
|
```
|
|
7409
7293
|
|
|
7410
7294
|
See also: [ChaintracksOptions](./services.md#interface-chaintracksoptions), [DefaultChaintracksArguments](./services.md#type-defaultchaintracksarguments)
|
|
@@ -7415,7 +7299,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7415
7299
|
##### Function: createDefaultKnexChaintracksOptions
|
|
7416
7300
|
|
|
7417
7301
|
```ts
|
|
7418
|
-
export function createDefaultKnexChaintracksOptions(...args: DefaultKnexChaintracksArguments): ChaintracksOptions
|
|
7302
|
+
export function createDefaultKnexChaintracksOptions(...args: DefaultKnexChaintracksArguments): ChaintracksOptions
|
|
7419
7303
|
```
|
|
7420
7304
|
|
|
7421
7305
|
See also: [ChaintracksOptions](./services.md#interface-chaintracksoptions), [DefaultKnexChaintracksArguments](./services.md#type-defaultknexchaintracksarguments)
|
|
@@ -7431,7 +7315,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7431
7315
|
##### Function: createDefaultNoDbChaintracksOptions
|
|
7432
7316
|
|
|
7433
7317
|
```ts
|
|
7434
|
-
export function createDefaultNoDbChaintracksOptions(...args: DefaultChaintracksArguments): ChaintracksOptions
|
|
7318
|
+
export function createDefaultNoDbChaintracksOptions(...args: DefaultChaintracksArguments): ChaintracksOptions
|
|
7435
7319
|
```
|
|
7436
7320
|
|
|
7437
7321
|
See also: [ChaintracksOptions](./services.md#interface-chaintracksoptions), [DefaultChaintracksArguments](./services.md#type-defaultchaintracksarguments)
|
|
@@ -7454,7 +7338,7 @@ export function createDefaultWalletServicesOptions(...[chain, arcCallbackUrl, ar
|
|
|
7454
7338
|
arcadeUrl?: string,
|
|
7455
7339
|
arcadeApiKey?: string,
|
|
7456
7340
|
arcadeCallbackToken?: string
|
|
7457
|
-
]): WalletServicesOptions
|
|
7341
|
+
]): WalletServicesOptions
|
|
7458
7342
|
```
|
|
7459
7343
|
|
|
7460
7344
|
See also: [Chain](./client.md#type-chain), [ChaintracksClientApi](./services.md#interface-chaintracksclientapi), [WalletServicesOptions](./client.md#interface-walletservicesoptions)
|
|
@@ -7472,7 +7356,7 @@ export async function createIdbChaintracks(...args: DefaultChaintracksArguments)
|
|
|
7472
7356
|
storage: ChaintracksStorageIdb;
|
|
7473
7357
|
chaintracks: Chaintracks;
|
|
7474
7358
|
available: Promise<void>;
|
|
7475
|
-
}>
|
|
7359
|
+
}>
|
|
7476
7360
|
```
|
|
7477
7361
|
|
|
7478
7362
|
See also: [Chain](./client.md#type-chain), [Chaintracks](./services.md#class-chaintracks), [ChaintracksFetchApi](./services.md#interface-chaintracksfetchapi), [ChaintracksStorageIdb](./services.md#class-chaintracksstorageidb), [DefaultChaintracksArguments](./services.md#type-defaultchaintracksarguments)
|
|
@@ -7490,7 +7374,7 @@ export async function createKnexChaintracks(...args: DefaultKnexChaintracksArgum
|
|
|
7490
7374
|
storage: ChaintracksStorageKnex;
|
|
7491
7375
|
chaintracks: Chaintracks;
|
|
7492
7376
|
available: Promise<void>;
|
|
7493
|
-
}>
|
|
7377
|
+
}>
|
|
7494
7378
|
```
|
|
7495
7379
|
|
|
7496
7380
|
See also: [Chain](./client.md#type-chain), [Chaintracks](./services.md#class-chaintracks), [ChaintracksFetchApi](./services.md#interface-chaintracksfetchapi), [ChaintracksStorageKnex](./services.md#class-chaintracksstorageknex), [DefaultKnexChaintracksArguments](./services.md#type-defaultknexchaintracksarguments)
|
|
@@ -7508,7 +7392,7 @@ export async function createNoDbChaintracks(...args: DefaultChaintracksArguments
|
|
|
7508
7392
|
storage: ChaintracksStorageNoDb;
|
|
7509
7393
|
chaintracks: Chaintracks;
|
|
7510
7394
|
available: Promise<void>;
|
|
7511
|
-
}>
|
|
7395
|
+
}>
|
|
7512
7396
|
```
|
|
7513
7397
|
|
|
7514
7398
|
See also: [Chain](./client.md#type-chain), [Chaintracks](./services.md#class-chaintracks), [ChaintracksFetchApi](./services.md#interface-chaintracksfetchapi), [ChaintracksStorageNoDb](./services.md#class-chaintracksstoragenodb), [DefaultChaintracksArguments](./services.md#type-defaultchaintracksarguments)
|
|
@@ -7519,7 +7403,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7519
7403
|
##### Function: createStopHandler
|
|
7520
7404
|
|
|
7521
7405
|
```ts
|
|
7522
|
-
export function createStopHandler(markOk: () => void, isOpen: () => boolean, markClosed: () => void, close: () => void, markDone: () => void): () => void
|
|
7406
|
+
export function createStopHandler(markOk: () => void, isOpen: () => boolean, markClosed: () => void, close: () => void, markDone: () => void): () => void
|
|
7523
7407
|
```
|
|
7524
7408
|
|
|
7525
7409
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -7532,7 +7416,7 @@ Deserialize a BaseBlockHeader from an 80 byte buffer
|
|
|
7532
7416
|
```ts
|
|
7533
7417
|
export function deserializeBaseBlockHeader(buffer: number[] | Uint8Array, offset = 0): BaseBlockHeader {
|
|
7534
7418
|
validateByteWindow(buffer, offset, 80);
|
|
7535
|
-
const reader = ReaderUint8Array.makeReader(buffer, offset);
|
|
7419
|
+
const reader = Utils.ReaderUint8Array.makeReader(buffer, offset);
|
|
7536
7420
|
const header: BaseBlockHeader = {
|
|
7537
7421
|
version: reader.readUInt32LE(),
|
|
7538
7422
|
previousHash: asString(reader.read(32).reverse()),
|
|
@@ -7553,7 +7437,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7553
7437
|
##### Function: deserializeBaseBlockHeaders
|
|
7554
7438
|
|
|
7555
7439
|
```ts
|
|
7556
|
-
export function deserializeBaseBlockHeaders(buffer: number[] | Uint8Array, offset = 0, count?: number | undefined): BaseBlockHeader[]
|
|
7440
|
+
export function deserializeBaseBlockHeaders(buffer: number[] | Uint8Array, offset = 0, count?: number | undefined): BaseBlockHeader[]
|
|
7557
7441
|
```
|
|
7558
7442
|
|
|
7559
7443
|
See also: [BaseBlockHeader](./client.md#interface-baseblockheader)
|
|
@@ -7564,7 +7448,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7564
7448
|
##### Function: deserializeBlockHeader
|
|
7565
7449
|
|
|
7566
7450
|
```ts
|
|
7567
|
-
export function deserializeBlockHeader(buffer: number[] | Uint8Array, height: number, offset = 0): BlockHeader
|
|
7451
|
+
export function deserializeBlockHeader(buffer: number[] | Uint8Array, height: number, offset = 0): BlockHeader
|
|
7568
7452
|
```
|
|
7569
7453
|
|
|
7570
7454
|
See also: [BlockHeader](./client.md#interface-blockheader)
|
|
@@ -7575,7 +7459,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7575
7459
|
##### Function: deserializeBlockHeaders
|
|
7576
7460
|
|
|
7577
7461
|
```ts
|
|
7578
|
-
export function deserializeBlockHeaders(firstHeight: number, buffer: number[] | Uint8Array, offset = 0, count?: number | undefined): BlockHeader[]
|
|
7462
|
+
export function deserializeBlockHeaders(firstHeight: number, buffer: number[] | Uint8Array, offset = 0, count?: number | undefined): BlockHeader[]
|
|
7579
7463
|
```
|
|
7580
7464
|
|
|
7581
7465
|
See also: [BlockHeader](./client.md#interface-blockheader)
|
|
@@ -7674,33 +7558,18 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7674
7558
|
##### Function: getBeefForTxid
|
|
7675
7559
|
|
|
7676
7560
|
```ts
|
|
7677
|
-
export async function getBeefForTxid(services: Services, txid: string): Promise<Beef>
|
|
7561
|
+
export async function getBeefForTxid(services: Services, txid: string): Promise<Beef>
|
|
7678
7562
|
```
|
|
7679
7563
|
|
|
7680
7564
|
See also: [Services](./services.md#class-services)
|
|
7681
7565
|
|
|
7682
7566
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7683
7567
|
|
|
7684
|
-
---
|
|
7685
|
-
##### Function: getCanonicalMerklePath
|
|
7686
|
-
|
|
7687
|
-
Obtain a canonical proof with provider failover when the service supports
|
|
7688
|
-
it. Custom WalletServices implementations without the optional failover
|
|
7689
|
-
method still fail closed after validating their single lookup.
|
|
7690
|
-
|
|
7691
|
-
```ts
|
|
7692
|
-
export async function getCanonicalMerklePath(services: WalletServices, chaintracker: ChainTracker, txid: string): Promise<GetMerklePathResult>
|
|
7693
|
-
```
|
|
7694
|
-
|
|
7695
|
-
See also: [GetMerklePathResult](./client.md#interface-getmerklepathresult), [WalletServices](./client.md#interface-walletservices)
|
|
7696
|
-
|
|
7697
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7698
|
-
|
|
7699
7568
|
---
|
|
7700
7569
|
##### Function: getExchangeRatesIo
|
|
7701
7570
|
|
|
7702
7571
|
```ts
|
|
7703
|
-
export async function getExchangeRatesIo(key: string, symbols?: string[], fetchClient?: typeof fetch): Promise<ExchangeRatesIoApi>
|
|
7572
|
+
export async function getExchangeRatesIo(key: string, symbols?: string[], fetchClient?: typeof fetch): Promise<ExchangeRatesIoApi>
|
|
7704
7573
|
```
|
|
7705
7574
|
|
|
7706
7575
|
See also: [ExchangeRatesIoApi](./services.md#interface-exchangeratesioapi)
|
|
@@ -7711,7 +7580,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7711
7580
|
##### Function: getWhatsOnChainBlockHeaderByHash
|
|
7712
7581
|
|
|
7713
7582
|
```ts
|
|
7714
|
-
export async function getWhatsOnChainBlockHeaderByHash(hash: string, chain: Chain = "main", apiKey?: string): Promise<BlockHeader | undefined>
|
|
7583
|
+
export async function getWhatsOnChainBlockHeaderByHash(hash: string, chain: Chain = "main", apiKey?: string): Promise<BlockHeader | undefined>
|
|
7715
7584
|
```
|
|
7716
7585
|
|
|
7717
7586
|
See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain)
|
|
@@ -7729,7 +7598,7 @@ export function handlePostRawTxErrorResponse(r: PostTxResultForTxid, nne: () =>
|
|
|
7729
7598
|
statusText?: unknown;
|
|
7730
7599
|
status?: unknown;
|
|
7731
7600
|
ok?: boolean;
|
|
7732
|
-
}): void
|
|
7601
|
+
}): void
|
|
7733
7602
|
```
|
|
7734
7603
|
|
|
7735
7604
|
See also: [PostTxResultForTxid](./client.md#interface-posttxresultfortxid)
|
|
@@ -7743,7 +7612,7 @@ Decide whether a caught error is retryable for script-hash history calls.
|
|
|
7743
7612
|
If not retryable, sets `r.error` and returns false.
|
|
7744
7613
|
|
|
7745
7614
|
```ts
|
|
7746
|
-
export function handleScriptHashHistoryCatch(r: GetScriptHashHistoryResult, error_: unknown, _url: string, methodName: string, retry: number, maxRetry: number): boolean
|
|
7615
|
+
export function handleScriptHashHistoryCatch(r: GetScriptHashHistoryResult, error_: unknown, _url: string, methodName: string, retry: number, maxRetry: number): boolean
|
|
7747
7616
|
```
|
|
7748
7617
|
|
|
7749
7618
|
See also: [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult)
|
|
@@ -7761,7 +7630,7 @@ Returns:
|
|
|
7761
7630
|
- `'ok'` — response was successful, continue parsing
|
|
7762
7631
|
|
|
7763
7632
|
```ts
|
|
7764
|
-
export function handleScriptHashHistoryResponse(r: GetScriptHashHistoryResult, response: ScriptHashHistoryResponse, methodName: string, retry: number): "continue" | "return" | "ok"
|
|
7633
|
+
export function handleScriptHashHistoryResponse(r: GetScriptHashHistoryResult, response: ScriptHashHistoryResponse, methodName: string, retry: number): "continue" | "return" | "ok"
|
|
7765
7634
|
```
|
|
7766
7635
|
|
|
7767
7636
|
See also: [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [ScriptHashHistoryResponse](./services.md#interface-scripthashhistoryresponse)
|
|
@@ -7775,7 +7644,7 @@ Decide whether the ECONNRESET error is retryable and, if not, set `r.error`.
|
|
|
7775
7644
|
Returns true when the caller should retry, false when it should return.
|
|
7776
7645
|
|
|
7777
7646
|
```ts
|
|
7778
|
-
export function handleUtxoConnReset(r: GetUtxoStatusResult, error_: unknown, _url: string, retry: number, maxRetry: number): boolean
|
|
7647
|
+
export function handleUtxoConnReset(r: GetUtxoStatusResult, error_: unknown, _url: string, retry: number, maxRetry: number): boolean
|
|
7779
7648
|
```
|
|
7780
7649
|
|
|
7781
7650
|
See also: [GetUtxoStatusResult](./client.md#interface-getutxostatusresult)
|
|
@@ -7786,7 +7655,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7786
7655
|
##### Function: isArcAcceptedTxStatus
|
|
7787
7656
|
|
|
7788
7657
|
```ts
|
|
7789
|
-
export function isArcAcceptedTxStatus(txStatus: string | undefined): boolean
|
|
7658
|
+
export function isArcAcceptedTxStatus(txStatus: string | undefined): boolean
|
|
7790
7659
|
```
|
|
7791
7660
|
|
|
7792
7661
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -7795,7 +7664,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7795
7664
|
##### Function: isArcDoubleSpendTxStatus
|
|
7796
7665
|
|
|
7797
7666
|
```ts
|
|
7798
|
-
export function isArcDoubleSpendTxStatus(txStatus: string | undefined): boolean
|
|
7667
|
+
export function isArcDoubleSpendTxStatus(txStatus: string | undefined): boolean
|
|
7799
7668
|
```
|
|
7800
7669
|
|
|
7801
7670
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -7804,7 +7673,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7804
7673
|
##### Function: isArcInvalidTxStatus
|
|
7805
7674
|
|
|
7806
7675
|
```ts
|
|
7807
|
-
export function isArcInvalidTxStatus(txStatus: string | undefined): boolean
|
|
7676
|
+
export function isArcInvalidTxStatus(txStatus: string | undefined): boolean
|
|
7808
7677
|
```
|
|
7809
7678
|
|
|
7810
7679
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -7813,7 +7682,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7813
7682
|
##### Function: isArcServiceErrorStatus
|
|
7814
7683
|
|
|
7815
7684
|
```ts
|
|
7816
|
-
export function isArcServiceErrorStatus(status: number | undefined, detail?: string): boolean
|
|
7685
|
+
export function isArcServiceErrorStatus(status: number | undefined, detail?: string): boolean
|
|
7817
7686
|
```
|
|
7818
7687
|
|
|
7819
7688
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -7948,7 +7817,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7948
7817
|
Returns true if work1 is more work (greater than) work2
|
|
7949
7818
|
|
|
7950
7819
|
```ts
|
|
7951
|
-
export function isMoreWork(work1: string, work2: string): boolean
|
|
7820
|
+
export function isMoreWork(work1: string, work2: string): boolean
|
|
7952
7821
|
```
|
|
7953
7822
|
|
|
7954
7823
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -7957,7 +7826,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7957
7826
|
##### Function: isValidFiatRate
|
|
7958
7827
|
|
|
7959
7828
|
```ts
|
|
7960
|
-
export function isValidFiatRate(value: unknown): value is number
|
|
7829
|
+
export function isValidFiatRate(value: unknown): value is number
|
|
7961
7830
|
```
|
|
7962
7831
|
|
|
7963
7832
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -7966,7 +7835,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7966
7835
|
##### Function: makeMerklePathNote
|
|
7967
7836
|
|
|
7968
7837
|
```ts
|
|
7969
|
-
export function makeMerklePathNote(what: MerklePathNoteWhat, name: string, extra: Partial<MerklePathNote> = {}): MerklePathNote
|
|
7838
|
+
export function makeMerklePathNote(what: MerklePathNoteWhat, name: string, extra: Partial<MerklePathNote> = {}): MerklePathNote
|
|
7970
7839
|
```
|
|
7971
7840
|
|
|
7972
7841
|
See also: [MerklePathNote](./services.md#interface-merklepathnote), [MerklePathNoteWhat](./services.md#type-merklepathnotewhat)
|
|
@@ -7977,7 +7846,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7977
7846
|
##### Function: makePostBeefServiceError
|
|
7978
7847
|
|
|
7979
7848
|
```ts
|
|
7980
|
-
export function makePostBeefServiceError(providerName: string, txids: string[], what: "postBeefServiceError" | "postBeefServiceTimeout", timeoutMs?: number): PostBeefResult
|
|
7849
|
+
export function makePostBeefServiceError(providerName: string, txids: string[], what: "postBeefServiceError" | "postBeefServiceTimeout", timeoutMs?: number): PostBeefResult
|
|
7981
7850
|
```
|
|
7982
7851
|
|
|
7983
7852
|
See also: [PostBeefResult](./client.md#interface-postbeefresult)
|
|
@@ -7988,7 +7857,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7988
7857
|
##### Function: mapWithConcurrency
|
|
7989
7858
|
|
|
7990
7859
|
```ts
|
|
7991
|
-
export async function mapWithConcurrency<T, R>(values: T[], maxConcurrency: number, worker: (value: T, index: number) => Promise<R>): Promise<R[]>
|
|
7860
|
+
export async function mapWithConcurrency<T, R>(values: T[], maxConcurrency: number, worker: (value: T, index: number) => Promise<R>): Promise<R[]>
|
|
7992
7861
|
```
|
|
7993
7862
|
|
|
7994
7863
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -7999,7 +7868,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7999
7868
|
Snapshot security-relevant ARC/Arcade constructor configuration exactly once.
|
|
8000
7869
|
|
|
8001
7870
|
```ts
|
|
8002
|
-
export function normalizeArcProviderConfig(config: string | ArcConfig | undefined, defaultDeploymentId: () => string): NormalizedArcProviderConfig
|
|
7871
|
+
export function normalizeArcProviderConfig(config: string | ArcConfig | undefined, defaultDeploymentId: () => string): NormalizedArcProviderConfig
|
|
8003
7872
|
```
|
|
8004
7873
|
|
|
8005
7874
|
See also: [ArcConfig](./services.md#interface-arcconfig), [NormalizedArcProviderConfig](./services.md#interface-normalizedarcproviderconfig)
|
|
@@ -8012,7 +7881,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8012
7881
|
Normalize and snapshot a complete validator request before asynchronous work.
|
|
8013
7882
|
|
|
8014
7883
|
```ts
|
|
8015
|
-
export function normalizeBulkFileDataValidationRequest(request: unknown): BulkFileDataValidationRequest
|
|
7884
|
+
export function normalizeBulkFileDataValidationRequest(request: unknown): BulkFileDataValidationRequest
|
|
8016
7885
|
```
|
|
8017
7886
|
|
|
8018
7887
|
See also: [BulkFileDataValidationRequest](./services.md#interface-bulkfiledatavalidationrequest)
|
|
@@ -8023,7 +7892,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8023
7892
|
##### Function: normalizeBulkHeaderFileInfo
|
|
8024
7893
|
|
|
8025
7894
|
```ts
|
|
8026
|
-
export function normalizeBulkHeaderFileInfo(value: unknown, allowStoredBoolean = false): BulkHeaderFileInfo
|
|
7895
|
+
export function normalizeBulkHeaderFileInfo(value: unknown, allowStoredBoolean = false): BulkHeaderFileInfo
|
|
8027
7896
|
```
|
|
8028
7897
|
|
|
8029
7898
|
See also: [BulkHeaderFileInfo](./services.md#interface-bulkheaderfileinfo)
|
|
@@ -8034,7 +7903,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8034
7903
|
##### Function: normalizeBulkHeaderFileSequence
|
|
8035
7904
|
|
|
8036
7905
|
```ts
|
|
8037
|
-
export function normalizeBulkHeaderFileSequence(files: unknown, allowStoredBoolean = false): BulkHeaderFileInfo[]
|
|
7906
|
+
export function normalizeBulkHeaderFileSequence(files: unknown, allowStoredBoolean = false): BulkHeaderFileInfo[]
|
|
8038
7907
|
```
|
|
8039
7908
|
|
|
8040
7909
|
See also: [BulkHeaderFileInfo](./services.md#interface-bulkheaderfileinfo)
|
|
@@ -8045,7 +7914,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8045
7914
|
##### Function: normalizeBulkHeaderFilesInfo
|
|
8046
7915
|
|
|
8047
7916
|
```ts
|
|
8048
|
-
export function normalizeBulkHeaderFilesInfo(value: unknown): BulkHeaderFilesInfo
|
|
7917
|
+
export function normalizeBulkHeaderFilesInfo(value: unknown): BulkHeaderFilesInfo
|
|
8049
7918
|
```
|
|
8050
7919
|
|
|
8051
7920
|
See also: [BulkHeaderFilesInfo](./services.md#interface-bulkheaderfilesinfo)
|
|
@@ -8056,7 +7925,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8056
7925
|
##### Function: normalizeFiatCurrencies
|
|
8057
7926
|
|
|
8058
7927
|
```ts
|
|
8059
|
-
export function normalizeFiatCurrencies(value: unknown, extras: readonly FiatCurrencyCode[] = []): FiatCurrencyCode[]
|
|
7928
|
+
export function normalizeFiatCurrencies(value: unknown, extras: readonly FiatCurrencyCode[] = []): FiatCurrencyCode[]
|
|
8060
7929
|
```
|
|
8061
7930
|
|
|
8062
7931
|
See also: [FiatCurrencyCode](./client.md#type-fiatcurrencycode)
|
|
@@ -8067,7 +7936,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8067
7936
|
##### Function: normalizeFiatCurrency
|
|
8068
7937
|
|
|
8069
7938
|
```ts
|
|
8070
|
-
export function normalizeFiatCurrency(value: unknown, name = "currency"): FiatCurrencyCode
|
|
7939
|
+
export function normalizeFiatCurrency(value: unknown, name = "currency"): FiatCurrencyCode
|
|
8071
7940
|
```
|
|
8072
7941
|
|
|
8073
7942
|
See also: [FiatCurrencyCode](./client.md#type-fiatcurrencycode)
|
|
@@ -8078,7 +7947,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8078
7947
|
##### Function: normalizeFiatExchangeRates
|
|
8079
7948
|
|
|
8080
7949
|
```ts
|
|
8081
|
-
export function normalizeFiatExchangeRates(value: unknown, required: readonly FiatCurrencyCode[], now = Date.now()): FiatExchangeRates
|
|
7950
|
+
export function normalizeFiatExchangeRates(value: unknown, required: readonly FiatCurrencyCode[], now = Date.now()): FiatExchangeRates
|
|
8082
7951
|
```
|
|
8083
7952
|
|
|
8084
7953
|
See also: [FiatCurrencyCode](./client.md#type-fiatcurrencycode), [FiatExchangeRates](./client.md#interface-fiatexchangerates)
|
|
@@ -8089,7 +7958,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8089
7958
|
##### Function: normalizeFiatRate
|
|
8090
7959
|
|
|
8091
7960
|
```ts
|
|
8092
|
-
export function normalizeFiatRate(value: unknown, currency: string): number
|
|
7961
|
+
export function normalizeFiatRate(value: unknown, currency: string): number
|
|
8093
7962
|
```
|
|
8094
7963
|
|
|
8095
7964
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -8098,7 +7967,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8098
7967
|
##### Function: normalizeFiatRateTimestamps
|
|
8099
7968
|
|
|
8100
7969
|
```ts
|
|
8101
|
-
export function normalizeFiatRateTimestamps(value: unknown, now = Date.now()): Record<string, Date> | undefined
|
|
7970
|
+
export function normalizeFiatRateTimestamps(value: unknown, now = Date.now()): Record<string, Date> | undefined
|
|
8102
7971
|
```
|
|
8103
7972
|
|
|
8104
7973
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -8107,7 +7976,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8107
7976
|
##### Function: normalizeFiatTimestamp
|
|
8108
7977
|
|
|
8109
7978
|
```ts
|
|
8110
|
-
export function normalizeFiatTimestamp(value: unknown, now = Date.now()): Date
|
|
7979
|
+
export function normalizeFiatTimestamp(value: unknown, now = Date.now()): Date
|
|
8111
7980
|
```
|
|
8112
7981
|
|
|
8113
7982
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -8116,7 +7985,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8116
7985
|
##### Function: normalizePostRawHex
|
|
8117
7986
|
|
|
8118
7987
|
```ts
|
|
8119
|
-
export function normalizePostRawHex(value: unknown, maximumBytes: number, name = "rawTx"): string
|
|
7988
|
+
export function normalizePostRawHex(value: unknown, maximumBytes: number, name = "rawTx"): string
|
|
8120
7989
|
```
|
|
8121
7990
|
|
|
8122
7991
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -8125,7 +7994,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8125
7994
|
##### Function: normalizePostTxids
|
|
8126
7995
|
|
|
8127
7996
|
```ts
|
|
8128
|
-
export function normalizePostTxids(value: unknown, name = "txids", allowEmpty = false): string[]
|
|
7997
|
+
export function normalizePostTxids(value: unknown, name = "txids", allowEmpty = false): string[]
|
|
8129
7998
|
```
|
|
8130
7999
|
|
|
8131
8000
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -8134,7 +8003,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8134
8003
|
##### Function: normalizeTxid
|
|
8135
8004
|
|
|
8136
8005
|
```ts
|
|
8137
|
-
export function normalizeTxid(value: unknown, name = "txid"): string
|
|
8006
|
+
export function normalizeTxid(value: unknown, name = "txid"): string
|
|
8138
8007
|
```
|
|
8139
8008
|
|
|
8140
8009
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -8143,7 +8012,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8143
8012
|
##### Function: normalizeWalletOutpoint
|
|
8144
8013
|
|
|
8145
8014
|
```ts
|
|
8146
|
-
export function normalizeWalletOutpoint(value: unknown): string | undefined
|
|
8015
|
+
export function normalizeWalletOutpoint(value: unknown): string | undefined
|
|
8147
8016
|
```
|
|
8148
8017
|
|
|
8149
8018
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -8159,7 +8028,7 @@ export function parseFileLink(file: string): {
|
|
|
8159
8028
|
} | "latest";
|
|
8160
8029
|
sourceUrl: string;
|
|
8161
8030
|
fileName: string;
|
|
8162
|
-
} | undefined
|
|
8031
|
+
} | undefined
|
|
8163
8032
|
```
|
|
8164
8033
|
|
|
8165
8034
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -8175,7 +8044,7 @@ export function populateUtxoDetails(r: GetUtxoStatusResult, result: Array<{
|
|
|
8175
8044
|
value: number;
|
|
8176
8045
|
height: number;
|
|
8177
8046
|
tx_pos: number;
|
|
8178
|
-
}>, outpoint?: string): void
|
|
8047
|
+
}>, outpoint?: string): void
|
|
8179
8048
|
```
|
|
8180
8049
|
|
|
8181
8050
|
See also: [GetUtxoStatusResult](./client.md#interface-getutxostatusresult)
|
|
@@ -8188,7 +8057,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8188
8057
|
Credential-free public Arcade host for supported networks.
|
|
8189
8058
|
|
|
8190
8059
|
```ts
|
|
8191
|
-
export function publicArcadeUrl(chain: Chain): string | undefined
|
|
8060
|
+
export function publicArcadeUrl(chain: Chain): string | undefined
|
|
8192
8061
|
```
|
|
8193
8062
|
|
|
8194
8063
|
See also: [Chain](./client.md#type-chain)
|
|
@@ -8199,7 +8068,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8199
8068
|
##### Function: readUInt32BE
|
|
8200
8069
|
|
|
8201
8070
|
```ts
|
|
8202
|
-
export function readUInt32BE(a: number[] | Uint8Array, offset: number): number
|
|
8071
|
+
export function readUInt32BE(a: number[] | Uint8Array, offset: number): number
|
|
8203
8072
|
```
|
|
8204
8073
|
|
|
8205
8074
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -8208,7 +8077,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8208
8077
|
##### Function: readUInt32LE
|
|
8209
8078
|
|
|
8210
8079
|
```ts
|
|
8211
|
-
export function readUInt32LE(a: number[] | Uint8Array, offset: number): number
|
|
8080
|
+
export function readUInt32LE(a: number[] | Uint8Array, offset: number): number
|
|
8212
8081
|
```
|
|
8213
8082
|
|
|
8214
8083
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -8220,7 +8089,7 @@ Convert an internal tri-state classification to the historical boolean
|
|
|
8220
8089
|
contract only when a provider supplied a conclusive answer.
|
|
8221
8090
|
|
|
8222
8091
|
```ts
|
|
8223
|
-
export function requireConclusiveUtxo(classification: OutputUtxoClassification): boolean
|
|
8092
|
+
export function requireConclusiveUtxo(classification: OutputUtxoClassification): boolean
|
|
8224
8093
|
```
|
|
8225
8094
|
|
|
8226
8095
|
See also: [OutputUtxoClassification](./services.md#interface-outpututxoclassification)
|
|
@@ -8231,7 +8100,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8231
8100
|
##### Function: resolveDefaultChaintracksArguments
|
|
8232
8101
|
|
|
8233
8102
|
```ts
|
|
8234
|
-
export function resolveDefaultChaintracksArguments(args: DefaultChaintracksArguments): ResolvedDefaultChaintracksParams
|
|
8103
|
+
export function resolveDefaultChaintracksArguments(args: DefaultChaintracksArguments): ResolvedDefaultChaintracksParams
|
|
8235
8104
|
```
|
|
8236
8105
|
|
|
8237
8106
|
See also: [DefaultChaintracksArguments](./services.md#type-defaultchaintracksarguments), [ResolvedDefaultChaintracksParams](./services.md#interface-resolveddefaultchaintracksparams)
|
|
@@ -8242,7 +8111,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8242
8111
|
##### Function: resolveDefaultKnexChaintracksArguments
|
|
8243
8112
|
|
|
8244
8113
|
```ts
|
|
8245
|
-
export function resolveDefaultKnexChaintracksArguments(args: DefaultKnexChaintracksArguments): ResolvedDefaultKnexChaintracksParams
|
|
8114
|
+
export function resolveDefaultKnexChaintracksArguments(args: DefaultKnexChaintracksArguments): ResolvedDefaultKnexChaintracksParams
|
|
8246
8115
|
```
|
|
8247
8116
|
|
|
8248
8117
|
See also: [DefaultKnexChaintracksArguments](./services.md#type-defaultknexchaintracksarguments), [ResolvedDefaultKnexChaintracksParams](./services.md#interface-resolveddefaultknexchaintracksparams)
|
|
@@ -8255,7 +8124,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8255
8124
|
Convert an untrusted diagnostic to bounded, single-line text suitable for logs and status APIs.
|
|
8256
8125
|
|
|
8257
8126
|
```ts
|
|
8258
|
-
export function safeDiagnostic(value: unknown, maximum = 512): string
|
|
8127
|
+
export function safeDiagnostic(value: unknown, maximum = 512): string
|
|
8259
8128
|
```
|
|
8260
8129
|
|
|
8261
8130
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -8264,7 +8133,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8264
8133
|
##### Function: selectBulkHeaderFiles
|
|
8265
8134
|
|
|
8266
8135
|
```ts
|
|
8267
|
-
export function selectBulkHeaderFiles(files: BulkHeaderFileInfo[], chain: Chain, maxPerFile: number): BulkHeaderFileInfo[]
|
|
8136
|
+
export function selectBulkHeaderFiles(files: BulkHeaderFileInfo[], chain: Chain, maxPerFile: number): BulkHeaderFileInfo[]
|
|
8268
8137
|
```
|
|
8269
8138
|
|
|
8270
8139
|
See also: [BulkHeaderFileInfo](./services.md#interface-bulkheaderfileinfo), [Chain](./client.md#type-chain)
|
|
@@ -8283,7 +8152,7 @@ the block hash for the header.
|
|
|
8283
8152
|
export function serializeBaseBlockHeader(header: BaseBlockHeader, buffer?: number[], offset?: number): number[] {
|
|
8284
8153
|
const validated = copyBaseHeaderData(header);
|
|
8285
8154
|
validateBaseBlockHeaderFormat(validated);
|
|
8286
|
-
const writer = new Writer();
|
|
8155
|
+
const writer = new Utils.Writer();
|
|
8287
8156
|
writer.writeUInt32LE(validated.version);
|
|
8288
8157
|
writer.write(asArray(validated.previousHash).reverse());
|
|
8289
8158
|
writer.write(asArray(validated.merkleRoot).reverse());
|
|
@@ -8318,7 +8187,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8318
8187
|
##### Function: serializeBaseBlockHeaders
|
|
8319
8188
|
|
|
8320
8189
|
```ts
|
|
8321
|
-
export function serializeBaseBlockHeaders(headers: BlockHeader[]): Uint8Array
|
|
8190
|
+
export function serializeBaseBlockHeaders(headers: BlockHeader[]): Uint8Array
|
|
8322
8191
|
```
|
|
8323
8192
|
|
|
8324
8193
|
See also: [BlockHeader](./client.md#interface-blockheader)
|
|
@@ -8334,7 +8203,7 @@ Computes sha256 hash of file contents read as bytes with no encoding.
|
|
|
8334
8203
|
export async function sha256HashOfBinaryFile(fs: ChaintracksFsApi, filepath: string, bufferSize = 80000): Promise<{
|
|
8335
8204
|
hash: string;
|
|
8336
8205
|
length: number;
|
|
8337
|
-
}>
|
|
8206
|
+
}>
|
|
8338
8207
|
```
|
|
8339
8208
|
|
|
8340
8209
|
See also: [ChaintracksFsApi](./services.md#interface-chaintracksfsapi)
|
|
@@ -8360,7 +8229,7 @@ diagnostics. The optional legacy array mode is bounded for older custom
|
|
|
8360
8229
|
WalletServices implementations; ordinary providers return one path.
|
|
8361
8230
|
|
|
8362
8231
|
```ts
|
|
8363
|
-
export function snapshotMerklePathResult(value: unknown, allowLegacyArray = false, providerName?: string): SnapshotMerklePathResult
|
|
8232
|
+
export function snapshotMerklePathResult(value: unknown, allowLegacyArray = false, providerName?: string): SnapshotMerklePathResult
|
|
8364
8233
|
```
|
|
8365
8234
|
|
|
8366
8235
|
See also: [SnapshotMerklePathResult](./services.md#interface-snapshotmerklepathresult)
|
|
@@ -8371,7 +8240,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8371
8240
|
##### Function: snapshotPostBeefRequest
|
|
8372
8241
|
|
|
8373
8242
|
```ts
|
|
8374
|
-
export function snapshotPostBeefRequest(beef: Beef, txids: string[]): ValidatedPostBeefRequest
|
|
8243
|
+
export function snapshotPostBeefRequest(beef: Beef, txids: string[]): ValidatedPostBeefRequest
|
|
8375
8244
|
```
|
|
8376
8245
|
|
|
8377
8246
|
See also: [ValidatedPostBeefRequest](./services.md#interface-validatedpostbeefrequest)
|
|
@@ -8382,7 +8251,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8382
8251
|
##### Function: startChaintracks
|
|
8383
8252
|
|
|
8384
8253
|
```ts
|
|
8385
|
-
export function startChaintracks<TStorage extends ChaintracksOptions["storage"]>(params: ResolvedDefaultChaintracksParams, options: ChaintracksOptions): CreatedChaintracks<TStorage>
|
|
8254
|
+
export function startChaintracks<TStorage extends ChaintracksOptions["storage"]>(params: ResolvedDefaultChaintracksParams, options: ChaintracksOptions): CreatedChaintracks<TStorage>
|
|
8386
8255
|
```
|
|
8387
8256
|
|
|
8388
8257
|
See also: [ChaintracksOptions](./services.md#interface-chaintracksoptions), [CreatedChaintracks](./services.md#interface-createdchaintracks), [ResolvedDefaultChaintracksParams](./services.md#interface-resolveddefaultchaintracksparams)
|
|
@@ -8395,7 +8264,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8395
8264
|
Arcade broadcaster / ARC endpoint for stn, or `undefined` when unset.
|
|
8396
8265
|
|
|
8397
8266
|
```ts
|
|
8398
|
-
export function stnArcadeUrl(): string | undefined
|
|
8267
|
+
export function stnArcadeUrl(): string | undefined
|
|
8399
8268
|
```
|
|
8400
8269
|
|
|
8401
8270
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -8407,7 +8276,7 @@ ChainTracks service URL for stn. Falls back to the configured Arcade host's
|
|
|
8407
8276
|
legacy-compatible path when STN_CHAINTRACKS_URL is unset.
|
|
8408
8277
|
|
|
8409
8278
|
```ts
|
|
8410
|
-
export function stnChaintracksUrl(): string
|
|
8279
|
+
export function stnChaintracksUrl(): string
|
|
8411
8280
|
```
|
|
8412
8281
|
|
|
8413
8282
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -8418,7 +8287,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8418
8287
|
Subtract Buffer encoded chainwork values
|
|
8419
8288
|
|
|
8420
8289
|
```ts
|
|
8421
|
-
export function subWork(work1: string, work2: string): string
|
|
8290
|
+
export function subWork(work1: string, work2: string): string
|
|
8422
8291
|
```
|
|
8423
8292
|
|
|
8424
8293
|
Returns
|
|
@@ -8454,7 +8323,7 @@ the block hash for the header.
|
|
|
8454
8323
|
|
|
8455
8324
|
```ts
|
|
8456
8325
|
export function toBinaryBaseBlockHeader(header: BaseBlockHeader): number[] {
|
|
8457
|
-
const writer = new Writer();
|
|
8326
|
+
const writer = new Utils.Writer();
|
|
8458
8327
|
writer.writeUInt32LE(header.version);
|
|
8459
8328
|
writer.writeReverse(asArray(header.previousHash));
|
|
8460
8329
|
writer.writeReverse(asArray(header.merkleRoot));
|
|
@@ -8478,7 +8347,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8478
8347
|
##### Function: toDefaultChaintracksArguments
|
|
8479
8348
|
|
|
8480
8349
|
```ts
|
|
8481
|
-
export function toDefaultChaintracksArguments(params: ResolvedDefaultChaintracksParams): DefaultChaintracksArguments
|
|
8350
|
+
export function toDefaultChaintracksArguments(params: ResolvedDefaultChaintracksParams): DefaultChaintracksArguments
|
|
8482
8351
|
```
|
|
8483
8352
|
|
|
8484
8353
|
See also: [DefaultChaintracksArguments](./services.md#type-defaultchaintracksarguments), [ResolvedDefaultChaintracksParams](./services.md#interface-resolveddefaultchaintracksparams)
|
|
@@ -8489,7 +8358,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8489
8358
|
##### Function: toDefaultKnexChaintracksArguments
|
|
8490
8359
|
|
|
8491
8360
|
```ts
|
|
8492
|
-
export function toDefaultKnexChaintracksArguments(params: ResolvedDefaultKnexChaintracksParams): DefaultKnexChaintracksArguments
|
|
8361
|
+
export function toDefaultKnexChaintracksArguments(params: ResolvedDefaultKnexChaintracksParams): DefaultKnexChaintracksArguments
|
|
8493
8362
|
```
|
|
8494
8363
|
|
|
8495
8364
|
See also: [DefaultKnexChaintracksArguments](./services.md#type-defaultknexchaintracksarguments), [ResolvedDefaultKnexChaintracksParams](./services.md#interface-resolveddefaultknexchaintracksparams)
|
|
@@ -8502,7 +8371,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8502
8371
|
Arcade broadcaster / ARC endpoint for tstn, or `undefined` when `TSTN_ARCADE_URL` is unset.
|
|
8503
8372
|
|
|
8504
8373
|
```ts
|
|
8505
|
-
export function tstnArcadeUrl(): string | undefined
|
|
8374
|
+
export function tstnArcadeUrl(): string | undefined
|
|
8506
8375
|
```
|
|
8507
8376
|
|
|
8508
8377
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -8514,7 +8383,7 @@ ChainTracks service URL for tstn. Falls back to `${TSTN_ARCADE_URL}/chaintracks/
|
|
|
8514
8383
|
`TSTN_CHAINTRACKS_URL` is unset (mirrors the ttn layout). Throws when neither is configured.
|
|
8515
8384
|
|
|
8516
8385
|
```ts
|
|
8517
|
-
export function tstnChaintracksUrl(): string
|
|
8386
|
+
export function tstnChaintracksUrl(): string
|
|
8518
8387
|
```
|
|
8519
8388
|
|
|
8520
8389
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -8523,7 +8392,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8523
8392
|
##### Function: updateChaintracksFiatExchangeRates
|
|
8524
8393
|
|
|
8525
8394
|
```ts
|
|
8526
|
-
export async function updateChaintracksFiatExchangeRates(targetCurrencies: string[], options: WalletServicesOptions): Promise<FiatExchangeRates>
|
|
8395
|
+
export async function updateChaintracksFiatExchangeRates(targetCurrencies: string[], options: WalletServicesOptions): Promise<FiatExchangeRates>
|
|
8527
8396
|
```
|
|
8528
8397
|
|
|
8529
8398
|
See also: [FiatExchangeRates](./client.md#interface-fiatexchangerates), [WalletServicesOptions](./client.md#interface-walletservicesoptions)
|
|
@@ -8534,7 +8403,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8534
8403
|
##### Function: updateExchangeratesapi
|
|
8535
8404
|
|
|
8536
8405
|
```ts
|
|
8537
|
-
export async function updateExchangeratesapi(targetCurrencies: string[], options: WalletServicesOptions): Promise<FiatExchangeRates>
|
|
8406
|
+
export async function updateExchangeratesapi(targetCurrencies: string[], options: WalletServicesOptions): Promise<FiatExchangeRates>
|
|
8538
8407
|
```
|
|
8539
8408
|
|
|
8540
8409
|
See also: [FiatExchangeRates](./client.md#interface-fiatexchangerates), [WalletServicesOptions](./client.md#interface-walletservicesoptions)
|
|
@@ -8547,7 +8416,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8547
8416
|
Hash map of known valid bulk header files by their `fileHash`.
|
|
8548
8417
|
|
|
8549
8418
|
```ts
|
|
8550
|
-
export function validBulkHeaderFilesByFileHash(): Record<string, BulkHeaderFileInfo>
|
|
8419
|
+
export function validBulkHeaderFilesByFileHash(): Record<string, BulkHeaderFileInfo>
|
|
8551
8420
|
```
|
|
8552
8421
|
|
|
8553
8422
|
See also: [BulkHeaderFileInfo](./services.md#interface-bulkheaderfileinfo)
|
|
@@ -8564,7 +8433,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8564
8433
|
Throws Error if blockHash is in the dirtyHashes list.
|
|
8565
8434
|
|
|
8566
8435
|
```ts
|
|
8567
|
-
export function validateAgainstDirtyHashes(blockHash: string): void
|
|
8436
|
+
export function validateAgainstDirtyHashes(blockHash: string): void
|
|
8568
8437
|
```
|
|
8569
8438
|
|
|
8570
8439
|
See also: [blockHash](./services.md#function-blockhash)
|
|
@@ -8572,12 +8441,12 @@ See also: [blockHash](./services.md#function-blockhash)
|
|
|
8572
8441
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8573
8442
|
|
|
8574
8443
|
---
|
|
8575
|
-
##### Function:
|
|
8444
|
+
##### Function: validateArcadeTxData
|
|
8576
8445
|
|
|
8577
|
-
Validate and snapshot
|
|
8446
|
+
Validate and snapshot the untrusted Arcade `GET /tx/{txid}` response.
|
|
8578
8447
|
|
|
8579
8448
|
```ts
|
|
8580
|
-
export function
|
|
8449
|
+
export function validateArcadeTxData(value: unknown, expectedTxid: string, responseStatus = 200): ArcMinerGetTxData
|
|
8581
8450
|
```
|
|
8582
8451
|
|
|
8583
8452
|
See also: [ArcMinerGetTxData](./services.md#interface-arcminergettxdata)
|
|
@@ -8591,7 +8460,7 @@ Validates the exact data representation of an unpositioned 80-byte block
|
|
|
8591
8460
|
header before it reaches a chain lookup, queue, or serializer.
|
|
8592
8461
|
|
|
8593
8462
|
```ts
|
|
8594
|
-
export function validateBaseBlockHeaderFormat(header: BaseBlockHeader): void
|
|
8463
|
+
export function validateBaseBlockHeaderFormat(header: BaseBlockHeader): void
|
|
8595
8464
|
```
|
|
8596
8465
|
|
|
8597
8466
|
See also: [BaseBlockHeader](./client.md#interface-baseblockheader)
|
|
@@ -8608,7 +8477,7 @@ Validate headers contained in an array of bytes. The headers must be consecutive
|
|
|
8608
8477
|
export function validateBufferOfHeaders(buffer: Uint8Array, previousHash: string, offset = 0, count = -1, previousChainWork?: string): {
|
|
8609
8478
|
lastHeaderHash: string;
|
|
8610
8479
|
lastChainWork: string | undefined;
|
|
8611
|
-
}
|
|
8480
|
+
}
|
|
8612
8481
|
```
|
|
8613
8482
|
|
|
8614
8483
|
Returns
|
|
@@ -8634,7 +8503,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8634
8503
|
Validates the contents of a bulk header file.
|
|
8635
8504
|
|
|
8636
8505
|
```ts
|
|
8637
|
-
export async function validateBulkFileData(bf: BulkHeaderFileInfo, prevHash: string, prevChainWork: string, fetch?: ChaintracksFetchApi): Promise<BulkHeaderFileInfo>
|
|
8506
|
+
export async function validateBulkFileData(bf: BulkHeaderFileInfo, prevHash: string, prevChainWork: string, fetch?: ChaintracksFetchApi): Promise<BulkHeaderFileInfo>
|
|
8638
8507
|
```
|
|
8639
8508
|
|
|
8640
8509
|
See also: [BulkHeaderFileInfo](./services.md#interface-bulkheaderfileinfo), [ChaintracksFetchApi](./services.md#interface-chaintracksfetchapi)
|
|
@@ -8656,28 +8525,13 @@ Argument Details
|
|
|
8656
8525
|
|
|
8657
8526
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8658
8527
|
|
|
8659
|
-
---
|
|
8660
|
-
##### Function: validateCanonicalMerklePathResult
|
|
8661
|
-
|
|
8662
|
-
Reject proof-provider results unless at least one returned path proves the
|
|
8663
|
-
requested transaction against the active chain. Invalid paths are removed
|
|
8664
|
-
before the result is returned so a stale path cannot precede a valid one.
|
|
8665
|
-
|
|
8666
|
-
```ts
|
|
8667
|
-
export async function validateCanonicalMerklePathResult(txid: string, result: GetMerklePathResult, chaintracker: ChainTracker): Promise<void>
|
|
8668
|
-
```
|
|
8669
|
-
|
|
8670
|
-
See also: [GetMerklePathResult](./client.md#interface-getmerklepathresult)
|
|
8671
|
-
|
|
8672
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8673
|
-
|
|
8674
8528
|
---
|
|
8675
8529
|
##### Function: validateGenesisHeader
|
|
8676
8530
|
|
|
8677
8531
|
Verifies that buffer begins with valid genesis block header for the specified chain.
|
|
8678
8532
|
|
|
8679
8533
|
```ts
|
|
8680
|
-
export function validateGenesisHeader(buffer: Uint8Array, chain: Chain): void
|
|
8534
|
+
export function validateGenesisHeader(buffer: Uint8Array, chain: Chain): void
|
|
8681
8535
|
```
|
|
8682
8536
|
|
|
8683
8537
|
See also: [Chain](./client.md#type-chain)
|
|
@@ -8690,7 +8544,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8690
8544
|
Ensures that a header has a valid proof-of-work target and hash.
|
|
8691
8545
|
|
|
8692
8546
|
```ts
|
|
8693
|
-
export function validateHeaderDifficulty(hash: number[] | Uint8Array, bits: number)
|
|
8547
|
+
export function validateHeaderDifficulty(hash: number[] | Uint8Array, bits: number)
|
|
8694
8548
|
```
|
|
8695
8549
|
|
|
8696
8550
|
Returns
|
|
@@ -8708,7 +8562,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8708
8562
|
##### Function: validateHeaderFormat
|
|
8709
8563
|
|
|
8710
8564
|
```ts
|
|
8711
|
-
export function validateHeaderFormat(header: BlockHeader): void
|
|
8565
|
+
export function validateHeaderFormat(header: BlockHeader): void
|
|
8712
8566
|
```
|
|
8713
8567
|
|
|
8714
8568
|
See also: [BlockHeader](./client.md#interface-blockheader)
|
|
@@ -8745,7 +8599,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8745
8599
|
##### Function: validateMerklePathResult
|
|
8746
8600
|
|
|
8747
8601
|
```ts
|
|
8748
|
-
export function validateMerklePathResult(requestedTxid: unknown, result: GetMerklePathResult, requireProofOfWork = false, requireHeaderFormat = true): ValidatedMerklePathResult
|
|
8602
|
+
export function validateMerklePathResult(requestedTxid: unknown, result: GetMerklePathResult, requireProofOfWork = false, requireHeaderFormat = true): ValidatedMerklePathResult
|
|
8749
8603
|
```
|
|
8750
8604
|
|
|
8751
8605
|
See also: [GetMerklePathResult](./client.md#interface-getmerklepathresult), [ValidatedMerklePathResult](./services.md#interface-validatedmerklepathresult)
|
|
@@ -8756,7 +8610,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8756
8610
|
##### Function: validatePostBeefResult
|
|
8757
8611
|
|
|
8758
8612
|
```ts
|
|
8759
|
-
export function validatePostBeefResult(value: unknown, expectedTxids: string[], configuredProviderName: string, allowInternalTimeoutNote = false): PostBeefResult
|
|
8613
|
+
export function validatePostBeefResult(value: unknown, expectedTxids: string[], configuredProviderName: string, allowInternalTimeoutNote = false): PostBeefResult
|
|
8760
8614
|
```
|
|
8761
8615
|
|
|
8762
8616
|
See also: [PostBeefResult](./client.md#interface-postbeefresult)
|
|
@@ -8767,7 +8621,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8767
8621
|
##### Function: validatePostBeefResultOrServiceError
|
|
8768
8622
|
|
|
8769
8623
|
```ts
|
|
8770
|
-
export function validatePostBeefResultOrServiceError(value: unknown, expectedTxids: string[], configuredProviderName: string): PostBeefResult
|
|
8624
|
+
export function validatePostBeefResultOrServiceError(value: unknown, expectedTxids: string[], configuredProviderName: string): PostBeefResult
|
|
8771
8625
|
```
|
|
8772
8626
|
|
|
8773
8627
|
See also: [PostBeefResult](./client.md#interface-postbeefresult)
|
|
@@ -8778,7 +8632,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8778
8632
|
##### Function: validatePostTxResult
|
|
8779
8633
|
|
|
8780
8634
|
```ts
|
|
8781
|
-
export function validatePostTxResult(value: unknown, expectedTxid: string, configuredProviderName: string): PostTxResultForTxid
|
|
8635
|
+
export function validatePostTxResult(value: unknown, expectedTxid: string, configuredProviderName: string): PostTxResultForTxid
|
|
8782
8636
|
```
|
|
8783
8637
|
|
|
8784
8638
|
See also: [PostTxResultForTxid](./client.md#interface-posttxresultfortxid)
|
|
@@ -8789,7 +8643,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8789
8643
|
##### Function: validatePostTxResultOrServiceError
|
|
8790
8644
|
|
|
8791
8645
|
```ts
|
|
8792
|
-
export function validatePostTxResultOrServiceError(value: unknown, expectedTxid: string, configuredProviderName: string): PostTxResultForTxid
|
|
8646
|
+
export function validatePostTxResultOrServiceError(value: unknown, expectedTxid: string, configuredProviderName: string): PostTxResultForTxid
|
|
8793
8647
|
```
|
|
8794
8648
|
|
|
8795
8649
|
See also: [PostTxResultForTxid](./client.md#interface-posttxresultfortxid)
|
|
@@ -8802,7 +8656,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8802
8656
|
Snapshot and bind a raw-transaction provider result to its requested txid.
|
|
8803
8657
|
|
|
8804
8658
|
```ts
|
|
8805
|
-
export function validateRawTxResult(value: unknown, expectedTxid: string, providerName?: string): GetRawTxResult
|
|
8659
|
+
export function validateRawTxResult(value: unknown, expectedTxid: string, providerName?: string): GetRawTxResult
|
|
8806
8660
|
```
|
|
8807
8661
|
|
|
8808
8662
|
See also: [GetRawTxResult](./client.md#interface-getrawtxresult)
|
|
@@ -8813,7 +8667,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8813
8667
|
##### Function: validateScriptHash
|
|
8814
8668
|
|
|
8815
8669
|
```ts
|
|
8816
|
-
export function validateScriptHash(output: string, outputFormat?: GetUtxoStatusOutputFormat): string
|
|
8670
|
+
export function validateScriptHash(output: string, outputFormat?: GetUtxoStatusOutputFormat): string
|
|
8817
8671
|
```
|
|
8818
8672
|
|
|
8819
8673
|
See also: [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat)
|
|
@@ -8826,7 +8680,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8826
8680
|
Validate and own a script-history result before it contributes competing transaction IDs.
|
|
8827
8681
|
|
|
8828
8682
|
```ts
|
|
8829
|
-
export function validateScriptHashHistoryResult(value: unknown, configuredProviderName?: string): GetScriptHashHistoryResult
|
|
8683
|
+
export function validateScriptHashHistoryResult(value: unknown, configuredProviderName?: string): GetScriptHashHistoryResult
|
|
8830
8684
|
```
|
|
8831
8685
|
|
|
8832
8686
|
See also: [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult)
|
|
@@ -8841,7 +8695,7 @@ can influence wallet transaction state. Provider names may be replaced with
|
|
|
8841
8695
|
a locally configured name so remote data cannot forge durable attribution.
|
|
8842
8696
|
|
|
8843
8697
|
```ts
|
|
8844
|
-
export function validateStatusForTxidsResult(value: unknown, requestedTxids: readonly string[], providerName?: string): GetStatusForTxidsResult
|
|
8698
|
+
export function validateStatusForTxidsResult(value: unknown, requestedTxids: readonly string[], providerName?: string): GetStatusForTxidsResult
|
|
8845
8699
|
```
|
|
8846
8700
|
|
|
8847
8701
|
See also: [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult)
|
|
@@ -8854,7 +8708,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8854
8708
|
Validate, bind, and own a UTXO-oracle result before wallet state uses it.
|
|
8855
8709
|
|
|
8856
8710
|
```ts
|
|
8857
|
-
export function validateUtxoStatusResult(value: unknown, expectedOutpoint?: string, configuredProviderName?: string): GetUtxoStatusResult
|
|
8711
|
+
export function validateUtxoStatusResult(value: unknown, expectedOutpoint?: string, configuredProviderName?: string): GetUtxoStatusResult
|
|
8858
8712
|
```
|
|
8859
8713
|
|
|
8860
8714
|
See also: [GetUtxoStatusResult](./client.md#interface-getutxostatusresult)
|
|
@@ -8865,7 +8719,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8865
8719
|
##### Function: validateWocChainInfo
|
|
8866
8720
|
|
|
8867
8721
|
```ts
|
|
8868
|
-
export function validateWocChainInfo(value: unknown, expectedChain: Chain): WocChainInfo
|
|
8722
|
+
export function validateWocChainInfo(value: unknown, expectedChain: Chain): WocChainInfo
|
|
8869
8723
|
```
|
|
8870
8724
|
|
|
8871
8725
|
See also: [Chain](./client.md#type-chain), [WocChainInfo](./services.md#interface-wocchaininfo)
|
|
@@ -8876,7 +8730,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8876
8730
|
##### Function: wocGetHeadersHeaderToBlockHeader
|
|
8877
8731
|
|
|
8878
8732
|
```ts
|
|
8879
|
-
export function wocGetHeadersHeaderToBlockHeader(h: WocGetHeadersHeader): BlockHeader
|
|
8733
|
+
export function wocGetHeadersHeaderToBlockHeader(h: WocGetHeadersHeader): BlockHeader
|
|
8880
8734
|
```
|
|
8881
8735
|
|
|
8882
8736
|
See also: [BlockHeader](./client.md#interface-blockheader), [WocGetHeadersHeader](./services.md#interface-wocgetheadersheader)
|
|
@@ -8887,7 +8741,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8887
8741
|
##### Function: workBNtoBuffer
|
|
8888
8742
|
|
|
8889
8743
|
```ts
|
|
8890
|
-
export function workBNtoBuffer(work: BigNumber): string
|
|
8744
|
+
export function workBNtoBuffer(work: BigNumber): string
|
|
8891
8745
|
```
|
|
8892
8746
|
|
|
8893
8747
|
Returns
|
|
@@ -8905,7 +8759,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8905
8759
|
##### Function: writeUInt32BE
|
|
8906
8760
|
|
|
8907
8761
|
```ts
|
|
8908
|
-
export function writeUInt32BE(n: number, a: number[] | Uint8Array, offset: number): number
|
|
8762
|
+
export function writeUInt32BE(n: number, a: number[] | Uint8Array, offset: number): number
|
|
8909
8763
|
```
|
|
8910
8764
|
|
|
8911
8765
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -8914,7 +8768,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8914
8768
|
##### Function: writeUInt32LE
|
|
8915
8769
|
|
|
8916
8770
|
```ts
|
|
8917
|
-
export function writeUInt32LE(n: number, a: number[] | Uint8Array, offset: number): number
|
|
8771
|
+
export function writeUInt32LE(n: number, a: number[] | Uint8Array, offset: number): number
|
|
8918
8772
|
```
|
|
8919
8773
|
|
|
8920
8774
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -9179,7 +9033,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
9179
9033
|
##### Variable: MAX_POST_BEEF_TXIDS
|
|
9180
9034
|
|
|
9181
9035
|
```ts
|
|
9182
|
-
MAX_POST_BEEF_TXIDS = MAXIMUM_SEND_WITH_TRANSACTIONS
|
|
9036
|
+
MAX_POST_BEEF_TXIDS = Validation.MAXIMUM_SEND_WITH_TRANSACTIONS
|
|
9183
9037
|
```
|
|
9184
9038
|
|
|
9185
9039
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|