@bsv/wallet-toolbox 1.2.30 → 1.2.31
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/docs/client.md +159 -69
- package/docs/services.md +32 -2
- package/docs/storage.md +0 -15
- package/docs/wallet.md +159 -69
- package/out/src/sdk/WalletServices.interfaces.d.ts +37 -0
- package/out/src/sdk/WalletServices.interfaces.d.ts.map +1 -1
- package/out/src/sdk/WalletStorage.interfaces.d.ts +0 -7
- package/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -1
- package/out/src/services/Services.d.ts +2 -0
- package/out/src/services/Services.d.ts.map +1 -1
- package/out/src/services/Services.js +24 -0
- package/out/src/services/Services.js.map +1 -1
- package/out/src/services/providers/WhatsOnChain.d.ts +22 -0
- package/out/src/services/providers/WhatsOnChain.d.ts.map +1 -1
- package/out/src/services/providers/WhatsOnChain.js +60 -0
- package/out/src/services/providers/WhatsOnChain.js.map +1 -1
- package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts +0 -7
- package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts.map +1 -1
- package/out/src/storage/methods/attemptToPostReqsToNetwork.js +27 -34
- package/out/src/storage/methods/attemptToPostReqsToNetwork.js.map +1 -1
- package/out/src/storage/methods/processAction.js +1 -1
- package/out/src/storage/methods/processAction.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/ProvenTxTests.test.js +5 -0
- package/out/src/storage/schema/entities/__tests/ProvenTxTests.test.js.map +1 -1
- package/out/test/Wallet/local/localWallet2.man.test.js +1 -2
- package/out/test/Wallet/local/localWallet2.man.test.js.map +1 -1
- package/out/test/services/Services.test.js +21 -0
- package/out/test/services/Services.test.js.map +1 -1
- package/out/tsconfig.all.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/sdk/WalletServices.interfaces.ts +41 -0
- package/src/sdk/WalletStorage.interfaces.ts +0 -4
- package/src/services/Services.ts +29 -0
- package/src/services/providers/WhatsOnChain.ts +74 -0
- package/src/storage/methods/attemptToPostReqsToNetwork.ts +28 -39
- package/src/storage/methods/processAction.ts +1 -1
- package/src/storage/schema/entities/__tests/ProvenTxTests.test.ts +6 -0
- package/test/Wallet/local/localWallet2.man.test.ts +0 -1
- package/test/services/Services.test.ts +21 -0
package/docs/client.md
CHANGED
|
@@ -46,34 +46,35 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
46
46
|
| [FindProvenTxReqsArgs](#interface-findproventxreqsargs) | [SetupWalletSQLiteArgs](#interface-setupwalletsqliteargs) | [ValidInternalizeOutput](#interface-validinternalizeoutput) |
|
|
47
47
|
| [FindProvenTxsArgs](#interface-findproventxsargs) | [SignActionResultX](#interface-signactionresultx) | [ValidListActionsArgs](#interface-validlistactionsargs) |
|
|
48
48
|
| [FindSincePagedArgs](#interface-findsincepagedargs) | [StartAuthResponse](#interface-startauthresponse) | [ValidListCertificatesArgs](#interface-validlistcertificatesargs) |
|
|
49
|
-
| [FindSyncStatesArgs](#interface-findsyncstatesargs) | [
|
|
50
|
-
| [FindTransactionsArgs](#interface-findtransactionsargs) | [
|
|
51
|
-
| [FindTxLabelMapsArgs](#interface-findtxlabelmapsargs) | [
|
|
52
|
-
| [FindTxLabelsArgs](#interface-findtxlabelsargs) | [
|
|
53
|
-
| [FindUsersArgs](#interface-findusersargs) | [
|
|
54
|
-
| [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput) | [
|
|
55
|
-
| [GenerateChangeSdkChangeOutput](#interface-generatechangesdkchangeoutput) | [
|
|
56
|
-
| [GenerateChangeSdkInput](#interface-generatechangesdkinput) | [
|
|
57
|
-
| [GenerateChangeSdkOutput](#interface-generatechangesdkoutput) | [
|
|
58
|
-
| [GenerateChangeSdkParams](#interface-generatechangesdkparams) | [
|
|
59
|
-
| [GenerateChangeSdkResult](#interface-generatechangesdkresult) | [
|
|
60
|
-
| [GenerateChangeSdkStorageChange](#interface-generatechangesdkstoragechange) | [
|
|
61
|
-
| [GetMerklePathResult](#interface-getmerklepathresult) | [
|
|
62
|
-
| [GetRawTxResult](#interface-getrawtxresult) | [
|
|
63
|
-
| [GetReqsAndBeefDetail](#interface-getreqsandbeefdetail) | [
|
|
64
|
-
| [GetReqsAndBeefResult](#interface-getreqsandbeefresult) | [
|
|
65
|
-
| [GetScriptHashHistory](#interface-getscripthashhistory) | [
|
|
66
|
-
| [GetScriptHashHistoryResult](#interface-getscripthashhistoryresult) | [
|
|
67
|
-
| [
|
|
68
|
-
| [
|
|
69
|
-
| [
|
|
70
|
-
| [
|
|
71
|
-
| [
|
|
72
|
-
| [
|
|
73
|
-
| [
|
|
74
|
-
| [
|
|
75
|
-
| [
|
|
76
|
-
| [
|
|
49
|
+
| [FindSyncStatesArgs](#interface-findsyncstatesargs) | [StatusForTxidResult](#interface-statusfortxidresult) | [ValidListOutputsArgs](#interface-validlistoutputsargs) |
|
|
50
|
+
| [FindTransactionsArgs](#interface-findtransactionsargs) | [StorageCreateActionResult](#interface-storagecreateactionresult) | [ValidProcessActionArgs](#interface-validprocessactionargs) |
|
|
51
|
+
| [FindTxLabelMapsArgs](#interface-findtxlabelmapsargs) | [StorageCreateTransactionSdkInput](#interface-storagecreatetransactionsdkinput) | [ValidProcessActionOptions](#interface-validprocessactionoptions) |
|
|
52
|
+
| [FindTxLabelsArgs](#interface-findtxlabelsargs) | [StorageCreateTransactionSdkOutput](#interface-storagecreatetransactionsdkoutput) | [ValidProveCertificateArgs](#interface-validprovecertificateargs) |
|
|
53
|
+
| [FindUsersArgs](#interface-findusersargs) | [StorageFeeModel](#interface-storagefeemodel) | [ValidRelinquishCertificateArgs](#interface-validrelinquishcertificateargs) |
|
|
54
|
+
| [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput) | [StorageGetBeefOptions](#interface-storagegetbeefoptions) | [ValidRelinquishOutputArgs](#interface-validrelinquishoutputargs) |
|
|
55
|
+
| [GenerateChangeSdkChangeOutput](#interface-generatechangesdkchangeoutput) | [StorageIdentity](#interface-storageidentity) | [ValidSignActionArgs](#interface-validsignactionargs) |
|
|
56
|
+
| [GenerateChangeSdkInput](#interface-generatechangesdkinput) | [StorageInternalizeActionResult](#interface-storageinternalizeactionresult) | [ValidSignActionOptions](#interface-validsignactionoptions) |
|
|
57
|
+
| [GenerateChangeSdkOutput](#interface-generatechangesdkoutput) | [StorageKnexOptions](#interface-storageknexoptions) | [ValidWalletPayment](#interface-validwalletpayment) |
|
|
58
|
+
| [GenerateChangeSdkParams](#interface-generatechangesdkparams) | [StorageProcessActionArgs](#interface-storageprocessactionargs) | [ValidWalletSignerArgs](#interface-validwalletsignerargs) |
|
|
59
|
+
| [GenerateChangeSdkResult](#interface-generatechangesdkresult) | [StorageProcessActionResults](#interface-storageprocessactionresults) | [ValidateGenerateChangeSdkParamsResult](#interface-validategeneratechangesdkparamsresult) |
|
|
60
|
+
| [GenerateChangeSdkStorageChange](#interface-generatechangesdkstoragechange) | [StorageProvenOrReq](#interface-storageprovenorreq) | [WalletArgs](#interface-walletargs) |
|
|
61
|
+
| [GetMerklePathResult](#interface-getmerklepathresult) | [StorageProviderOptions](#interface-storageprovideroptions) | [WalletBalance](#interface-walletbalance) |
|
|
62
|
+
| [GetRawTxResult](#interface-getrawtxresult) | [StorageReaderOptions](#interface-storagereaderoptions) | [WalletPermissionsManagerCallbacks](#interface-walletpermissionsmanagercallbacks) |
|
|
63
|
+
| [GetReqsAndBeefDetail](#interface-getreqsandbeefdetail) | [StorageReaderWriterOptions](#interface-storagereaderwriteroptions) | [WalletServices](#interface-walletservices) |
|
|
64
|
+
| [GetReqsAndBeefResult](#interface-getreqsandbeefresult) | [StorageSyncReaderOptions](#interface-storagesyncreaderoptions) | [WalletServicesOptions](#interface-walletservicesoptions) |
|
|
65
|
+
| [GetScriptHashHistory](#interface-getscripthashhistory) | [SyncChunk](#interface-syncchunk) | [WalletSettings](#interface-walletsettings) |
|
|
66
|
+
| [GetScriptHashHistoryResult](#interface-getscripthashhistoryresult) | [SyncError](#interface-syncerror) | [WalletSettingsManagerConfig](#interface-walletsettingsmanagerconfig) |
|
|
67
|
+
| [GetStatusForTxidsResult](#interface-getstatusfortxidsresult) | [SyncMap](#interface-syncmap) | [WalletSigner](#interface-walletsigner) |
|
|
68
|
+
| [GetUtxoStatusDetails](#interface-getutxostatusdetails) | [TableCertificate](#interface-tablecertificate) | [WalletStorage](#interface-walletstorage) |
|
|
69
|
+
| [GetUtxoStatusResult](#interface-getutxostatusresult) | [TableCertificateField](#interface-tablecertificatefield) | [WalletStorageProvider](#interface-walletstorageprovider) |
|
|
70
|
+
| [KeyPair](#interface-keypair) | [TableCertificateX](#interface-tablecertificatex) | [WalletStorageReader](#interface-walletstoragereader) |
|
|
71
|
+
| [KeyPairAddress](#interface-keypairaddress) | [TableCommission](#interface-tablecommission) | [WalletStorageServerOptions](#interface-walletstorageserveroptions) |
|
|
72
|
+
| [MonitorDaemonSetup](#interface-monitordaemonsetup) | [TableMonitorEvent](#interface-tablemonitorevent) | [WalletStorageSync](#interface-walletstoragesync) |
|
|
73
|
+
| [MonitorOptions](#interface-monitoroptions) | [TableOutput](#interface-tableoutput) | [WalletStorageSyncReader](#interface-walletstoragesyncreader) |
|
|
74
|
+
| [OutPoint](#interface-outpoint) | [TableOutputBasket](#interface-tableoutputbasket) | [WalletStorageWriter](#interface-walletstoragewriter) |
|
|
75
|
+
| [Paged](#interface-paged) | [TableOutputTag](#interface-tableoutputtag) | [WalletTheme](#interface-wallettheme) |
|
|
76
|
+
| [PendingSignAction](#interface-pendingsignaction) | [TableOutputTagMap](#interface-tableoutputtagmap) | [XValidCreateActionOutput](#interface-xvalidcreateactionoutput) |
|
|
77
|
+
| [PendingStorageInput](#interface-pendingstorageinput) | [TableOutputX](#interface-tableoutputx) | |
|
|
77
78
|
| [PermissionRequest](#interface-permissionrequest) | [TableProvenTx](#interface-tableproventx) | |
|
|
78
79
|
|
|
79
80
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -1109,6 +1110,39 @@ status: "success" | "error"
|
|
|
1109
1110
|
|
|
1110
1111
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1111
1112
|
|
|
1113
|
+
---
|
|
1114
|
+
##### Interface: GetStatusForTxidsResult
|
|
1115
|
+
|
|
1116
|
+
```ts
|
|
1117
|
+
export interface GetStatusForTxidsResult {
|
|
1118
|
+
name: string;
|
|
1119
|
+
status: "success" | "error";
|
|
1120
|
+
error?: sdk.WalletError;
|
|
1121
|
+
results: sdk.StatusForTxidResult[];
|
|
1122
|
+
}
|
|
1123
|
+
```
|
|
1124
|
+
|
|
1125
|
+
See also: [StatusForTxidResult](./client.md#interface-statusfortxidresult), [WalletError](./client.md#class-walleterror)
|
|
1126
|
+
|
|
1127
|
+
###### Property error
|
|
1128
|
+
|
|
1129
|
+
The first exception error that occurred during processing, if any.
|
|
1130
|
+
|
|
1131
|
+
```ts
|
|
1132
|
+
error?: sdk.WalletError
|
|
1133
|
+
```
|
|
1134
|
+
See also: [WalletError](./client.md#class-walleterror)
|
|
1135
|
+
|
|
1136
|
+
###### Property name
|
|
1137
|
+
|
|
1138
|
+
The name of the service returning these results.
|
|
1139
|
+
|
|
1140
|
+
```ts
|
|
1141
|
+
name: string
|
|
1142
|
+
```
|
|
1143
|
+
|
|
1144
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1145
|
+
|
|
1112
1146
|
---
|
|
1113
1147
|
##### Interface: GetUtxoStatusDetails
|
|
1114
1148
|
|
|
@@ -1838,10 +1872,6 @@ export interface PostReqsToNetworkDetails {
|
|
|
1838
1872
|
req: EntityProvenTxReq;
|
|
1839
1873
|
status: PostReqsToNetworkDetailsStatus;
|
|
1840
1874
|
competingTxs?: string[];
|
|
1841
|
-
spentInputs?: {
|
|
1842
|
-
vin: number;
|
|
1843
|
-
scriptHash: string;
|
|
1844
|
-
}[];
|
|
1845
1875
|
}
|
|
1846
1876
|
```
|
|
1847
1877
|
|
|
@@ -1855,17 +1885,6 @@ Any competing double spend txids reported for this txid
|
|
|
1855
1885
|
competingTxs?: string[]
|
|
1856
1886
|
```
|
|
1857
1887
|
|
|
1858
|
-
###### Property spentInputs
|
|
1859
|
-
|
|
1860
|
-
Input indices that have been spent, valid when status is 'doubleSpend'
|
|
1861
|
-
|
|
1862
|
-
```ts
|
|
1863
|
-
spentInputs?: {
|
|
1864
|
-
vin: number;
|
|
1865
|
-
scriptHash: string;
|
|
1866
|
-
}[]
|
|
1867
|
-
```
|
|
1868
|
-
|
|
1869
1888
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1870
1889
|
|
|
1871
1890
|
---
|
|
@@ -2258,10 +2277,6 @@ export interface ReviewActionResult {
|
|
|
2258
2277
|
status: ReviewActionResultStatus;
|
|
2259
2278
|
competingTxs?: string[];
|
|
2260
2279
|
competingBeef?: number[];
|
|
2261
|
-
spentInputs?: {
|
|
2262
|
-
vin: number;
|
|
2263
|
-
scriptHash: string;
|
|
2264
|
-
}[];
|
|
2265
2280
|
}
|
|
2266
2281
|
```
|
|
2267
2282
|
|
|
@@ -2283,17 +2298,6 @@ Any competing txids reported for this txid, valid when status is 'doubleSpend'.
|
|
|
2283
2298
|
competingTxs?: string[]
|
|
2284
2299
|
```
|
|
2285
2300
|
|
|
2286
|
-
###### Property spentInputs
|
|
2287
|
-
|
|
2288
|
-
Transaction input indices that have been spent, valid when status is 'doubleSpend'.
|
|
2289
|
-
|
|
2290
|
-
```ts
|
|
2291
|
-
spentInputs?: {
|
|
2292
|
-
vin: number;
|
|
2293
|
-
scriptHash: string;
|
|
2294
|
-
}[]
|
|
2295
|
-
```
|
|
2296
|
-
|
|
2297
2301
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2298
2302
|
|
|
2299
2303
|
---
|
|
@@ -2722,6 +2726,37 @@ export interface StartAuthResponse {
|
|
|
2722
2726
|
|
|
2723
2727
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2724
2728
|
|
|
2729
|
+
---
|
|
2730
|
+
##### Interface: StatusForTxidResult
|
|
2731
|
+
|
|
2732
|
+
```ts
|
|
2733
|
+
export interface StatusForTxidResult {
|
|
2734
|
+
txid: string;
|
|
2735
|
+
depth: number | undefined;
|
|
2736
|
+
status: "mined" | "known" | "unknown";
|
|
2737
|
+
}
|
|
2738
|
+
```
|
|
2739
|
+
|
|
2740
|
+
###### Property depth
|
|
2741
|
+
|
|
2742
|
+
roughly depth of block containing txid from chain tip.
|
|
2743
|
+
|
|
2744
|
+
```ts
|
|
2745
|
+
depth: number | undefined
|
|
2746
|
+
```
|
|
2747
|
+
|
|
2748
|
+
###### Property status
|
|
2749
|
+
|
|
2750
|
+
'mined' if depth > 0
|
|
2751
|
+
'known' if depth === 0
|
|
2752
|
+
'unknown' if depth === undefined, txid may be old an purged or never processed.
|
|
2753
|
+
|
|
2754
|
+
```ts
|
|
2755
|
+
status: "mined" | "known" | "unknown"
|
|
2756
|
+
```
|
|
2757
|
+
|
|
2758
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2759
|
+
|
|
2725
2760
|
---
|
|
2726
2761
|
##### Interface: StorageCreateActionResult
|
|
2727
2762
|
|
|
@@ -4564,6 +4599,7 @@ export interface WalletServices {
|
|
|
4564
4599
|
getMerklePath(txid: string, useNext?: boolean): Promise<GetMerklePathResult>;
|
|
4565
4600
|
postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult[]>;
|
|
4566
4601
|
hashOutputScript(script: string): string;
|
|
4602
|
+
getStatusForTxids(txids: string[], useNext?: boolean): Promise<sdk.GetStatusForTxidsResult>;
|
|
4567
4603
|
getUtxoStatus(output: string, outputFormat?: GetUtxoStatusOutputFormat, outpoint?: string, useNext?: boolean): Promise<GetUtxoStatusResult>;
|
|
4568
4604
|
getScriptHashHistory(hash: string, useNext?: boolean): Promise<sdk.GetScriptHashHistoryResult>;
|
|
4569
4605
|
hashToHeader(hash: string): Promise<sdk.BlockHeader>;
|
|
@@ -4571,7 +4607,7 @@ export interface WalletServices {
|
|
|
4571
4607
|
}
|
|
4572
4608
|
```
|
|
4573
4609
|
|
|
4574
|
-
See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [PostBeefResult](./client.md#interface-postbeefresult)
|
|
4610
|
+
See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [PostBeefResult](./client.md#interface-postbeefresult)
|
|
4575
4611
|
|
|
4576
4612
|
###### Property chain
|
|
4577
4613
|
|
|
@@ -4690,6 +4726,19 @@ Argument Details
|
|
|
4690
4726
|
+ **useNext**
|
|
4691
4727
|
+ optional, forces skip to next service before starting service requests cycle.
|
|
4692
4728
|
|
|
4729
|
+
###### Method getStatusForTxids
|
|
4730
|
+
|
|
4731
|
+
For an array of one or more txids, returns for each wether it is a 'known', 'mined', or 'unknown' transaction.
|
|
4732
|
+
|
|
4733
|
+
Primarily useful for determining if a recently broadcast transaction is known to the processing network.
|
|
4734
|
+
|
|
4735
|
+
Also returns the current depth from chain tip if 'mined'.
|
|
4736
|
+
|
|
4737
|
+
```ts
|
|
4738
|
+
getStatusForTxids(txids: string[], useNext?: boolean): Promise<sdk.GetStatusForTxidsResult>
|
|
4739
|
+
```
|
|
4740
|
+
See also: [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult)
|
|
4741
|
+
|
|
4693
4742
|
###### Method getUtxoStatus
|
|
4694
4743
|
|
|
4695
4744
|
Attempts to determine the UTXO status of a transaction output.
|
|
@@ -7046,6 +7095,7 @@ export class Services implements sdk.WalletServices {
|
|
|
7046
7095
|
getRawTxServices: ServiceCollection<sdk.GetRawTxService>;
|
|
7047
7096
|
postBeefServices: ServiceCollection<sdk.PostBeefService>;
|
|
7048
7097
|
getUtxoStatusServices: ServiceCollection<sdk.GetUtxoStatusService>;
|
|
7098
|
+
getStatusForTxidsServices: ServiceCollection<sdk.GetStatusForTxidsService>;
|
|
7049
7099
|
getScriptHashHistoryServices: ServiceCollection<sdk.GetScriptHashHistoryService>;
|
|
7050
7100
|
updateFiatExchangeRateServices: ServiceCollection<sdk.UpdateFiatExchangeRateService>;
|
|
7051
7101
|
chain: sdk.Chain;
|
|
@@ -7057,6 +7107,7 @@ export class Services implements sdk.WalletServices {
|
|
|
7057
7107
|
get getRawTxsCount()
|
|
7058
7108
|
get postBeefServicesCount()
|
|
7059
7109
|
get getUtxoStatsCount()
|
|
7110
|
+
async getStatusForTxids(txids: string[], useNext?: boolean): Promise<sdk.GetStatusForTxidsResult>
|
|
7060
7111
|
hashOutputScript(script: string): string
|
|
7061
7112
|
async getUtxoStatus(output: string, outputFormat?: sdk.GetUtxoStatusOutputFormat, outpoint?: string, useNext?: boolean): Promise<sdk.GetUtxoStatusResult>
|
|
7062
7113
|
async getScriptHashHistory(hash: string, useNext?: boolean): Promise<sdk.GetScriptHashHistoryResult>
|
|
@@ -7074,7 +7125,7 @@ export class Services implements sdk.WalletServices {
|
|
|
7074
7125
|
}
|
|
7075
7126
|
```
|
|
7076
7127
|
|
|
7077
|
-
See also: [ARC](./services.md#class-arc), [Bitails](./services.md#class-bitails), [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [FiatExchangeRates](./client.md#interface-fiatexchangerates), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetMerklePathService](./client.md#type-getmerklepathservice), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetRawTxService](./client.md#type-getrawtxservice), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetScriptHashHistoryService](./client.md#type-getscripthashhistoryservice), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [GetUtxoStatusService](./client.md#type-getutxostatusservice), [PostBeefResult](./client.md#interface-postbeefresult), [PostBeefService](./client.md#type-postbeefservice), [ServiceCollection](./services.md#class-servicecollection), [UpdateFiatExchangeRateService](./client.md#type-updatefiatexchangerateservice), [WalletServices](./client.md#interface-walletservices), [WalletServicesOptions](./client.md#interface-walletservicesoptions), [WhatsOnChain](./services.md#class-whatsonchain)
|
|
7128
|
+
See also: [ARC](./services.md#class-arc), [Bitails](./services.md#class-bitails), [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [FiatExchangeRates](./client.md#interface-fiatexchangerates), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetMerklePathService](./client.md#type-getmerklepathservice), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetRawTxService](./client.md#type-getrawtxservice), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetScriptHashHistoryService](./client.md#type-getscripthashhistoryservice), [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult), [GetStatusForTxidsService](./client.md#type-getstatusfortxidsservice), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [GetUtxoStatusService](./client.md#type-getutxostatusservice), [PostBeefResult](./client.md#interface-postbeefresult), [PostBeefService](./client.md#type-postbeefservice), [ServiceCollection](./services.md#class-servicecollection), [UpdateFiatExchangeRateService](./client.md#type-updatefiatexchangerateservice), [WalletServices](./client.md#interface-walletservices), [WalletServicesOptions](./client.md#interface-walletservicesoptions), [WhatsOnChain](./services.md#class-whatsonchain)
|
|
7078
7129
|
|
|
7079
7130
|
###### Method hashOutputScript
|
|
7080
7131
|
|
|
@@ -11002,6 +11053,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
11002
11053
|
export class WhatsOnChain extends SdkWhatsOnChain {
|
|
11003
11054
|
services: Services;
|
|
11004
11055
|
constructor(chain: sdk.Chain = "main", config: WhatsOnChainConfig = {}, services?: Services)
|
|
11056
|
+
async getStatusForTxids(txids: string[]): Promise<sdk.GetStatusForTxidsResult>
|
|
11005
11057
|
async getTxPropagation(txid: string): Promise<number>
|
|
11006
11058
|
async getRawTx(txid: string): Promise<string | undefined>
|
|
11007
11059
|
async getRawTxResult(txid: string): Promise<sdk.GetRawTxResult>
|
|
@@ -11016,7 +11068,7 @@ export class WhatsOnChain extends SdkWhatsOnChain {
|
|
|
11016
11068
|
}
|
|
11017
11069
|
```
|
|
11018
11070
|
|
|
11019
|
-
See also: [BsvExchangeRate](./client.md#interface-bsvexchangerate), [Chain](./client.md#type-chain), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [PostBeefResult](./client.md#interface-postbeefresult), [PostTxResultForTxid](./client.md#interface-posttxresultfortxid), [SdkWhatsOnChain](./services.md#class-sdkwhatsonchain), [Services](./services.md#class-services), [WalletServices](./client.md#interface-walletservices)
|
|
11071
|
+
See also: [BsvExchangeRate](./client.md#interface-bsvexchangerate), [Chain](./client.md#type-chain), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [PostBeefResult](./client.md#interface-postbeefresult), [PostTxResultForTxid](./client.md#interface-posttxresultfortxid), [SdkWhatsOnChain](./services.md#class-sdkwhatsonchain), [Services](./services.md#class-services), [WalletServices](./client.md#interface-walletservices)
|
|
11020
11072
|
|
|
11021
11073
|
###### Method getRawTx
|
|
11022
11074
|
|
|
@@ -11030,6 +11082,33 @@ Returns
|
|
|
11030
11082
|
|
|
11031
11083
|
raw transaction as hex string or undefined if txid not found in mined block.
|
|
11032
11084
|
|
|
11085
|
+
###### Method getStatusForTxids
|
|
11086
|
+
|
|
11087
|
+
POST
|
|
11088
|
+
https://api.whatsonchain.com/v1/bsv/main/txs/status
|
|
11089
|
+
Content-Type: application/json
|
|
11090
|
+
data: "{\"txids\":[\"6815f8014db74eab8b7f75925c68929597f1d97efa970109d990824c25e5e62b\"]}"
|
|
11091
|
+
|
|
11092
|
+
result for a mined txid:
|
|
11093
|
+
[{
|
|
11094
|
+
"txid":"294cd1ebd5689fdee03509f92c32184c0f52f037d4046af250229b97e0c8f1aa",
|
|
11095
|
+
"blockhash":"000000000000000004b5ce6670f2ff27354a1e87d0a01bf61f3307f4ccd358b5",
|
|
11096
|
+
"blockheight":612251,
|
|
11097
|
+
"blocktime":1575841517,
|
|
11098
|
+
"confirmations":278272
|
|
11099
|
+
}]
|
|
11100
|
+
|
|
11101
|
+
result for a valid recent txid:
|
|
11102
|
+
[{"txid":"6815f8014db74eab8b7f75925c68929597f1d97efa970109d990824c25e5e62b"}]
|
|
11103
|
+
|
|
11104
|
+
result for an unknown txid:
|
|
11105
|
+
[{"txid":"6815f8014db74eab8b7f75925c68929597f1d97efa970109d990824c25e5e62c","error":"unknown"}]
|
|
11106
|
+
|
|
11107
|
+
```ts
|
|
11108
|
+
async getStatusForTxids(txids: string[]): Promise<sdk.GetStatusForTxidsResult>
|
|
11109
|
+
```
|
|
11110
|
+
See also: [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult)
|
|
11111
|
+
|
|
11033
11112
|
###### Method getTxPropagation
|
|
11034
11113
|
|
|
11035
11114
|
2025-02-16 throwing internal server error 500.
|
|
@@ -12747,18 +12826,18 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
12747
12826
|
|
|
12748
12827
|
| | |
|
|
12749
12828
|
| --- | --- |
|
|
12750
|
-
| [Chain](#type-chain) | [
|
|
12751
|
-
| [DBType](#type-dbtype) | [
|
|
12752
|
-
| [DescriptionString5to2000Bytes](#type-descriptionstring5to2000bytes) | [
|
|
12753
|
-
| [EntityStorage](#type-entitystorage) | [
|
|
12754
|
-
| [GetMerklePathService](#type-getmerklepathservice) | [
|
|
12755
|
-
| [GetRawTxService](#type-getrawtxservice) | [
|
|
12756
|
-
| [GetScriptHashHistoryService](#type-getscripthashhistoryservice) | [
|
|
12829
|
+
| [Chain](#type-chain) | [PostBeefService](#type-postbeefservice) |
|
|
12830
|
+
| [DBType](#type-dbtype) | [PostReqsToNetworkDetailsStatus](#type-postreqstonetworkdetailsstatus) |
|
|
12831
|
+
| [DescriptionString5to2000Bytes](#type-descriptionstring5to2000bytes) | [PostTxsService](#type-posttxsservice) |
|
|
12832
|
+
| [EntityStorage](#type-entitystorage) | [ProvenTxReqStatus](#type-proventxreqstatus) |
|
|
12833
|
+
| [GetMerklePathService](#type-getmerklepathservice) | [ReqHistoryNote](#type-reqhistorynote) |
|
|
12834
|
+
| [GetRawTxService](#type-getrawtxservice) | [ReviewActionResultStatus](#type-reviewactionresultstatus) |
|
|
12835
|
+
| [GetScriptHashHistoryService](#type-getscripthashhistoryservice) | [ScriptHashFormat](#type-scripthashformat) |
|
|
12836
|
+
| [GetStatusForTxidsService](#type-getstatusfortxidsservice) | [StorageProvidedBy](#type-storageprovidedby) |
|
|
12757
12837
|
| [GetUtxoStatusOutputFormat](#type-getutxostatusoutputformat) | [SyncProtocolVersion](#type-syncprotocolversion) |
|
|
12758
12838
|
| [GetUtxoStatusService](#type-getutxostatusservice) | [SyncStatus](#type-syncstatus) |
|
|
12759
12839
|
| [MonitorStorage](#type-monitorstorage) | [TransactionStatus](#type-transactionstatus) |
|
|
12760
12840
|
| [PermissionEventHandler](#type-permissioneventhandler) | [UpdateFiatExchangeRateService](#type-updatefiatexchangerateservice) |
|
|
12761
|
-
| [PostBeefService](#type-postbeefservice) | |
|
|
12762
12841
|
|
|
12763
12842
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12764
12843
|
|
|
@@ -12834,6 +12913,17 @@ See also: [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistor
|
|
|
12834
12913
|
|
|
12835
12914
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12836
12915
|
|
|
12916
|
+
---
|
|
12917
|
+
##### Type: GetStatusForTxidsService
|
|
12918
|
+
|
|
12919
|
+
```ts
|
|
12920
|
+
export type GetStatusForTxidsService = (txids: string[]) => Promise<sdk.GetStatusForTxidsResult>
|
|
12921
|
+
```
|
|
12922
|
+
|
|
12923
|
+
See also: [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult)
|
|
12924
|
+
|
|
12925
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12926
|
+
|
|
12837
12927
|
---
|
|
12838
12928
|
##### Type: GetUtxoStatusOutputFormat
|
|
12839
12929
|
|
package/docs/services.md
CHANGED
|
@@ -410,6 +410,7 @@ export class Services implements sdk.WalletServices {
|
|
|
410
410
|
getRawTxServices: ServiceCollection<sdk.GetRawTxService>;
|
|
411
411
|
postBeefServices: ServiceCollection<sdk.PostBeefService>;
|
|
412
412
|
getUtxoStatusServices: ServiceCollection<sdk.GetUtxoStatusService>;
|
|
413
|
+
getStatusForTxidsServices: ServiceCollection<sdk.GetStatusForTxidsService>;
|
|
413
414
|
getScriptHashHistoryServices: ServiceCollection<sdk.GetScriptHashHistoryService>;
|
|
414
415
|
updateFiatExchangeRateServices: ServiceCollection<sdk.UpdateFiatExchangeRateService>;
|
|
415
416
|
chain: sdk.Chain;
|
|
@@ -421,6 +422,7 @@ export class Services implements sdk.WalletServices {
|
|
|
421
422
|
get getRawTxsCount()
|
|
422
423
|
get postBeefServicesCount()
|
|
423
424
|
get getUtxoStatsCount()
|
|
425
|
+
async getStatusForTxids(txids: string[], useNext?: boolean): Promise<sdk.GetStatusForTxidsResult>
|
|
424
426
|
hashOutputScript(script: string): string
|
|
425
427
|
async getUtxoStatus(output: string, outputFormat?: sdk.GetUtxoStatusOutputFormat, outpoint?: string, useNext?: boolean): Promise<sdk.GetUtxoStatusResult>
|
|
426
428
|
async getScriptHashHistory(hash: string, useNext?: boolean): Promise<sdk.GetScriptHashHistoryResult>
|
|
@@ -438,7 +440,7 @@ export class Services implements sdk.WalletServices {
|
|
|
438
440
|
}
|
|
439
441
|
```
|
|
440
442
|
|
|
441
|
-
See also: [ARC](./services.md#class-arc), [Bitails](./services.md#class-bitails), [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [FiatExchangeRates](./client.md#interface-fiatexchangerates), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetMerklePathService](./client.md#type-getmerklepathservice), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetRawTxService](./client.md#type-getrawtxservice), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetScriptHashHistoryService](./client.md#type-getscripthashhistoryservice), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [GetUtxoStatusService](./client.md#type-getutxostatusservice), [PostBeefResult](./client.md#interface-postbeefresult), [PostBeefService](./client.md#type-postbeefservice), [ServiceCollection](./services.md#class-servicecollection), [UpdateFiatExchangeRateService](./client.md#type-updatefiatexchangerateservice), [WalletServices](./client.md#interface-walletservices), [WalletServicesOptions](./client.md#interface-walletservicesoptions), [WhatsOnChain](./services.md#class-whatsonchain)
|
|
443
|
+
See also: [ARC](./services.md#class-arc), [Bitails](./services.md#class-bitails), [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [FiatExchangeRates](./client.md#interface-fiatexchangerates), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetMerklePathService](./client.md#type-getmerklepathservice), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetRawTxService](./client.md#type-getrawtxservice), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetScriptHashHistoryService](./client.md#type-getscripthashhistoryservice), [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult), [GetStatusForTxidsService](./client.md#type-getstatusfortxidsservice), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [GetUtxoStatusService](./client.md#type-getutxostatusservice), [PostBeefResult](./client.md#interface-postbeefresult), [PostBeefService](./client.md#type-postbeefservice), [ServiceCollection](./services.md#class-servicecollection), [UpdateFiatExchangeRateService](./client.md#type-updatefiatexchangerateservice), [WalletServices](./client.md#interface-walletservices), [WalletServicesOptions](./client.md#interface-walletservicesoptions), [WhatsOnChain](./services.md#class-whatsonchain)
|
|
442
444
|
|
|
443
445
|
###### Method hashOutputScript
|
|
444
446
|
|
|
@@ -464,6 +466,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
464
466
|
export class WhatsOnChain extends SdkWhatsOnChain {
|
|
465
467
|
services: Services;
|
|
466
468
|
constructor(chain: sdk.Chain = "main", config: WhatsOnChainConfig = {}, services?: Services)
|
|
469
|
+
async getStatusForTxids(txids: string[]): Promise<sdk.GetStatusForTxidsResult>
|
|
467
470
|
async getTxPropagation(txid: string): Promise<number>
|
|
468
471
|
async getRawTx(txid: string): Promise<string | undefined>
|
|
469
472
|
async getRawTxResult(txid: string): Promise<sdk.GetRawTxResult>
|
|
@@ -478,7 +481,7 @@ export class WhatsOnChain extends SdkWhatsOnChain {
|
|
|
478
481
|
}
|
|
479
482
|
```
|
|
480
483
|
|
|
481
|
-
See also: [BsvExchangeRate](./client.md#interface-bsvexchangerate), [Chain](./client.md#type-chain), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [PostBeefResult](./client.md#interface-postbeefresult), [PostTxResultForTxid](./client.md#interface-posttxresultfortxid), [SdkWhatsOnChain](./services.md#class-sdkwhatsonchain), [Services](./services.md#class-services), [WalletServices](./client.md#interface-walletservices)
|
|
484
|
+
See also: [BsvExchangeRate](./client.md#interface-bsvexchangerate), [Chain](./client.md#type-chain), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [PostBeefResult](./client.md#interface-postbeefresult), [PostTxResultForTxid](./client.md#interface-posttxresultfortxid), [SdkWhatsOnChain](./services.md#class-sdkwhatsonchain), [Services](./services.md#class-services), [WalletServices](./client.md#interface-walletservices)
|
|
482
485
|
|
|
483
486
|
###### Method getRawTx
|
|
484
487
|
|
|
@@ -492,6 +495,33 @@ Returns
|
|
|
492
495
|
|
|
493
496
|
raw transaction as hex string or undefined if txid not found in mined block.
|
|
494
497
|
|
|
498
|
+
###### Method getStatusForTxids
|
|
499
|
+
|
|
500
|
+
POST
|
|
501
|
+
https://api.whatsonchain.com/v1/bsv/main/txs/status
|
|
502
|
+
Content-Type: application/json
|
|
503
|
+
data: "{\"txids\":[\"6815f8014db74eab8b7f75925c68929597f1d97efa970109d990824c25e5e62b\"]}"
|
|
504
|
+
|
|
505
|
+
result for a mined txid:
|
|
506
|
+
[{
|
|
507
|
+
"txid":"294cd1ebd5689fdee03509f92c32184c0f52f037d4046af250229b97e0c8f1aa",
|
|
508
|
+
"blockhash":"000000000000000004b5ce6670f2ff27354a1e87d0a01bf61f3307f4ccd358b5",
|
|
509
|
+
"blockheight":612251,
|
|
510
|
+
"blocktime":1575841517,
|
|
511
|
+
"confirmations":278272
|
|
512
|
+
}]
|
|
513
|
+
|
|
514
|
+
result for a valid recent txid:
|
|
515
|
+
[{"txid":"6815f8014db74eab8b7f75925c68929597f1d97efa970109d990824c25e5e62b"}]
|
|
516
|
+
|
|
517
|
+
result for an unknown txid:
|
|
518
|
+
[{"txid":"6815f8014db74eab8b7f75925c68929597f1d97efa970109d990824c25e5e62c","error":"unknown"}]
|
|
519
|
+
|
|
520
|
+
```ts
|
|
521
|
+
async getStatusForTxids(txids: string[]): Promise<sdk.GetStatusForTxidsResult>
|
|
522
|
+
```
|
|
523
|
+
See also: [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult)
|
|
524
|
+
|
|
495
525
|
###### Method getTxPropagation
|
|
496
526
|
|
|
497
527
|
2025-02-16 throwing internal server error 500.
|
package/docs/storage.md
CHANGED
|
@@ -325,10 +325,6 @@ export interface PostReqsToNetworkDetails {
|
|
|
325
325
|
req: EntityProvenTxReq;
|
|
326
326
|
status: PostReqsToNetworkDetailsStatus;
|
|
327
327
|
competingTxs?: string[];
|
|
328
|
-
spentInputs?: {
|
|
329
|
-
vin: number;
|
|
330
|
-
scriptHash: string;
|
|
331
|
-
}[];
|
|
332
328
|
}
|
|
333
329
|
```
|
|
334
330
|
|
|
@@ -342,17 +338,6 @@ Any competing double spend txids reported for this txid
|
|
|
342
338
|
competingTxs?: string[]
|
|
343
339
|
```
|
|
344
340
|
|
|
345
|
-
###### Property spentInputs
|
|
346
|
-
|
|
347
|
-
Input indices that have been spent, valid when status is 'doubleSpend'
|
|
348
|
-
|
|
349
|
-
```ts
|
|
350
|
-
spentInputs?: {
|
|
351
|
-
vin: number;
|
|
352
|
-
scriptHash: string;
|
|
353
|
-
}[]
|
|
354
|
-
```
|
|
355
|
-
|
|
356
341
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
357
342
|
|
|
358
343
|
---
|