@bsv/wallet-toolbox 1.1.13 → 1.1.14
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/README.md +8 -2
- package/docs/client.md +453 -346
- package/docs/open-rpc/index.html +46 -0
- package/docs/services.md +236 -211
- package/docs/setup.md +20 -4
- package/docs/storage.md +30 -5
- package/docs/wallet.md +453 -346
- package/out/src/Setup.d.ts.map +1 -1
- package/out/src/Setup.js.map +1 -1
- package/out/src/SetupClient.d.ts +9 -0
- package/out/src/SetupClient.d.ts.map +1 -1
- package/out/src/SetupClient.js +19 -3
- package/out/src/SetupClient.js.map +1 -1
- package/out/src/Wallet.d.ts +6 -0
- package/out/src/Wallet.d.ts.map +1 -1
- package/out/src/Wallet.js +57 -0
- package/out/src/Wallet.js.map +1 -1
- package/out/src/sdk/WalletServices.interfaces.d.ts +18 -13
- package/out/src/sdk/WalletServices.interfaces.d.ts.map +1 -1
- package/out/src/services/Services.d.ts +4 -11
- package/out/src/services/Services.d.ts.map +1 -1
- package/out/src/services/Services.js +19 -37
- package/out/src/services/Services.js.map +1 -1
- package/out/src/services/__tests/ARC.test.d.ts +2 -0
- package/out/src/services/__tests/ARC.test.d.ts.map +1 -0
- package/out/src/services/__tests/ARC.test.js +98 -0
- package/out/src/services/__tests/ARC.test.js.map +1 -0
- package/out/src/services/__tests/arcServices.test.d.ts +2 -0
- package/out/src/services/__tests/arcServices.test.d.ts.map +1 -0
- package/out/src/services/__tests/arcServices.test.js +7 -0
- package/out/src/services/__tests/arcServices.test.js.map +1 -0
- package/out/src/services/__tests/postBeef.test.js +45 -7
- package/out/src/services/__tests/postBeef.test.js.map +1 -1
- package/out/src/services/createDefaultWalletServicesOptions.d.ts +1 -0
- package/out/src/services/createDefaultWalletServicesOptions.d.ts.map +1 -1
- package/out/src/services/createDefaultWalletServicesOptions.js +16 -4
- package/out/src/services/createDefaultWalletServicesOptions.js.map +1 -1
- package/out/src/services/providers/ARC.d.ts +91 -0
- package/out/src/services/providers/ARC.d.ts.map +1 -0
- package/out/src/services/providers/ARC.js +192 -0
- package/out/src/services/providers/ARC.js.map +1 -0
- package/out/src/services/providers/SdkWhatsOnChain.d.ts +21 -0
- package/out/src/services/providers/SdkWhatsOnChain.d.ts.map +1 -0
- package/out/src/services/providers/SdkWhatsOnChain.js +67 -0
- package/out/src/services/providers/SdkWhatsOnChain.js.map +1 -0
- package/out/src/services/providers/WhatsOnChain.d.ts +35 -0
- package/out/src/services/providers/WhatsOnChain.d.ts.map +1 -0
- package/out/src/services/providers/WhatsOnChain.js +266 -0
- package/out/src/services/providers/WhatsOnChain.js.map +1 -0
- package/out/src/services/providers/__tests/WhatsOnChain.test.d.ts +2 -0
- package/out/src/services/providers/__tests/WhatsOnChain.test.d.ts.map +1 -0
- package/out/src/services/providers/__tests/WhatsOnChain.test.js +176 -0
- package/out/src/services/providers/__tests/WhatsOnChain.test.js.map +1 -0
- package/out/src/storage/methods/createAction.d.ts.map +1 -1
- package/out/src/storage/methods/createAction.js +9 -2
- package/out/src/storage/methods/createAction.js.map +1 -1
- package/out/src/storage/methods/generateChange.d.ts +12 -1
- package/out/src/storage/methods/generateChange.d.ts.map +1 -1
- package/out/src/storage/methods/generateChange.js +24 -1
- package/out/src/storage/methods/generateChange.js.map +1 -1
- package/out/src/storage/methods/processAction.d.ts.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 +0 -1
- package/out/src/storage/schema/entities/__tests/ProvenTxTests.test.js.map +1 -1
- package/out/src/storage/sync/StorageMySQLDojoReader.js +1 -1
- package/out/src/storage/sync/StorageMySQLDojoReader.js.map +1 -1
- package/out/src/utility/utilityHelpers.js +1 -1
- package/out/src/utility/utilityHelpers.js.map +1 -1
- package/out/test/Wallet/StorageClient/storageClient.man.test.js +22 -3
- package/out/test/Wallet/StorageClient/storageClient.man.test.js.map +1 -1
- package/out/test/Wallet/sync/Wallet.updateWalletLegacyTestData.man.test.js +40 -0
- package/out/test/Wallet/sync/Wallet.updateWalletLegacyTestData.man.test.js.map +1 -1
- package/out/test/services/Services.test.js +0 -31
- package/out/test/services/Services.test.js.map +1 -1
- package/out/test/utils/TestUtilsWalletStorage.d.ts +26 -18
- package/out/test/utils/TestUtilsWalletStorage.d.ts.map +1 -1
- package/out/test/utils/TestUtilsWalletStorage.js +135 -27
- package/out/test/utils/TestUtilsWalletStorage.js.map +1 -1
- package/out/test/wallet/list/listActions2.test.js +36 -2
- package/out/test/wallet/list/listActions2.test.js.map +1 -1
- package/out/tsconfig.all.tsbuildinfo +1 -1
- package/package.json +5 -7
- package/src/Setup.ts +0 -1
- package/src/SetupClient.ts +26 -6
- package/src/Wallet.ts +66 -2
- package/src/sdk/WalletServices.interfaces.ts +19 -14
- package/src/services/Services.ts +23 -62
- package/src/services/__tests/ARC.test.ts +110 -0
- package/src/services/__tests/arcServices.test.ts +8 -0
- package/src/services/__tests/postBeef.test.ts +47 -9
- package/src/services/createDefaultWalletServicesOptions.ts +19 -6
- package/src/services/providers/ARC.ts +289 -0
- package/src/services/providers/SdkWhatsOnChain.ts +96 -0
- package/src/services/providers/WhatsOnChain.ts +369 -0
- package/src/services/providers/__tests/WhatsOnChain.test.ts +227 -0
- package/src/storage/methods/createAction.ts +26 -4
- package/src/storage/methods/generateChange.ts +42 -2
- package/src/storage/methods/processAction.ts +2 -1
- package/src/storage/schema/entities/__tests/ProvenTxTests.test.ts +0 -1
- package/src/storage/sync/StorageMySQLDojoReader.ts +1 -1
- package/src/utility/utilityHelpers.ts +1 -1
- package/test/Wallet/StorageClient/storageClient.man.test.ts +30 -4
- package/test/Wallet/sync/Wallet.updateWalletLegacyTestData.man.test.ts +54 -0
- package/test/services/Services.test.ts +0 -30
- package/test/utils/TestUtilsWalletStorage.ts +175 -45
- package/test/wallet/list/listActions2.test.ts +4 -7
- package/out/src/services/__tests/postBeefToArcTaal.test.d.ts +0 -2
- package/out/src/services/__tests/postBeefToArcTaal.test.d.ts.map +0 -1
- package/out/src/services/__tests/postBeefToArcTaal.test.js +0 -479
- package/out/src/services/__tests/postBeefToArcTaal.test.js.map +0 -1
- package/out/src/services/__tests/postTxs.test.d.ts +0 -2
- package/out/src/services/__tests/postTxs.test.d.ts.map +0 -1
- package/out/src/services/__tests/postTxs.test.js +0 -28
- package/out/src/services/__tests/postTxs.test.js.map +0 -1
- package/out/src/services/providers/arcServices.d.ts +0 -62
- package/out/src/services/providers/arcServices.d.ts.map +0 -1
- package/out/src/services/providers/arcServices.js +0 -375
- package/out/src/services/providers/arcServices.js.map +0 -1
- package/out/src/services/providers/whatsonchain.d.ts +0 -17
- package/out/src/services/providers/whatsonchain.d.ts.map +0 -1
- package/out/src/services/providers/whatsonchain.js +0 -130
- package/out/src/services/providers/whatsonchain.js.map +0 -1
- package/out/test/examples/README.man.test.d.ts +0 -2
- package/out/test/examples/README.man.test.d.ts.map +0 -1
- package/out/test/examples/README.man.test.js +0 -47
- package/out/test/examples/README.man.test.js.map +0 -1
- package/src/services/__tests/postBeefToArcTaal.test.ts +0 -487
- package/src/services/__tests/postTxs.test.ts +0 -28
- package/src/services/providers/arcServices.ts +0 -578
- package/src/services/providers/whatsonchain.ts +0 -170
- package/test/examples/README.man.test.ts +0 -53
package/docs/client.md
CHANGED
|
@@ -14,109 +14,132 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
14
14
|
|
|
15
15
|
| | | |
|
|
16
16
|
| --- | --- | --- |
|
|
17
|
-
| [
|
|
18
|
-
| [
|
|
19
|
-
| [
|
|
20
|
-
| [
|
|
21
|
-
| [
|
|
22
|
-
| [
|
|
23
|
-
| [
|
|
24
|
-
| [
|
|
25
|
-
| [
|
|
26
|
-
| [
|
|
27
|
-
| [
|
|
28
|
-
| [
|
|
29
|
-
| [
|
|
30
|
-
| [
|
|
31
|
-
| [
|
|
32
|
-
| [
|
|
33
|
-
| [
|
|
34
|
-
| [
|
|
35
|
-
| [
|
|
36
|
-
| [
|
|
37
|
-
| [
|
|
38
|
-
| [
|
|
39
|
-
| [
|
|
40
|
-
| [
|
|
41
|
-
| [
|
|
42
|
-
| [
|
|
43
|
-
| [
|
|
44
|
-
| [
|
|
45
|
-
| [
|
|
46
|
-
| [
|
|
47
|
-
| [
|
|
48
|
-
| [
|
|
49
|
-
| [
|
|
50
|
-
| [
|
|
51
|
-
| [
|
|
52
|
-
| [
|
|
53
|
-
| [
|
|
54
|
-
| [
|
|
55
|
-
| [
|
|
56
|
-
| [
|
|
57
|
-
| [
|
|
58
|
-
| [
|
|
59
|
-
| [
|
|
60
|
-
| [
|
|
61
|
-
| [
|
|
62
|
-
| [
|
|
63
|
-
| [
|
|
64
|
-
| [
|
|
65
|
-
| [
|
|
66
|
-
| [
|
|
67
|
-
| [
|
|
17
|
+
| [ArcConfig](#interface-arcconfig) | [PostBeefResultForTxidApi](#interface-postbeefresultfortxidapi) | [TableProvenTx](#interface-tableproventx) |
|
|
18
|
+
| [ArcMinerGetTxData](#interface-arcminergettxdata) | [PostReqsToNetworkDetails](#interface-postreqstonetworkdetails) | [TableProvenTxReq](#interface-tableproventxreq) |
|
|
19
|
+
| [AuthId](#interface-authid) | [PostReqsToNetworkResult](#interface-postreqstonetworkresult) | [TableProvenTxReqDynamics](#interface-tableproventxreqdynamics) |
|
|
20
|
+
| [BaseBlockHeader](#interface-baseblockheader) | [PostTxResultForTxid](#interface-posttxresultfortxid) | [TableSettings](#interface-tablesettings) |
|
|
21
|
+
| [BlockHeader](#interface-blockheader) | [PostTxResultForTxidError](#interface-posttxresultfortxiderror) | [TableSyncState](#interface-tablesyncstate) |
|
|
22
|
+
| [BsvExchangeRate](#interface-bsvexchangerate) | [PostTxsResult](#interface-posttxsresult) | [TableTransaction](#interface-tabletransaction) |
|
|
23
|
+
| [CertOpsWallet](#interface-certopswallet) | [ProcessSyncChunkResult](#interface-processsyncchunkresult) | [TableTxLabel](#interface-tabletxlabel) |
|
|
24
|
+
| [CommitNewTxResults](#interface-commitnewtxresults) | [ProvenOrRawTx](#interface-provenorrawtx) | [TableTxLabelMap](#interface-tabletxlabelmap) |
|
|
25
|
+
| [EntitySyncMap](#interface-entitysyncmap) | [ProvenTxFromTxidResult](#interface-proventxfromtxidresult) | [TableUser](#interface-tableuser) |
|
|
26
|
+
| [EntityTimeStamp](#interface-entitytimestamp) | [ProvenTxReqHistory](#interface-proventxreqhistory) | [TaskPurgeParams](#interface-taskpurgeparams) |
|
|
27
|
+
| [ExchangeRatesIoApi](#interface-exchangeratesioapi) | [ProvenTxReqHistorySummaryApi](#interface-proventxreqhistorysummaryapi) | [TrxToken](#interface-trxtoken) |
|
|
28
|
+
| [FiatExchangeRates](#interface-fiatexchangerates) | [ProvenTxReqNotify](#interface-proventxreqnotify) | [TscMerkleProofApi](#interface-tscmerkleproofapi) |
|
|
29
|
+
| [FindCertificateFieldsArgs](#interface-findcertificatefieldsargs) | [PurgeParams](#interface-purgeparams) | [TxScriptOffsets](#interface-txscriptoffsets) |
|
|
30
|
+
| [FindCertificatesArgs](#interface-findcertificatesargs) | [PurgeResults](#interface-purgeresults) | [UpdateProvenTxReqWithNewProvenTxArgs](#interface-updateproventxreqwithnewproventxargs) |
|
|
31
|
+
| [FindCommissionsArgs](#interface-findcommissionsargs) | [RequestSyncChunkArgs](#interface-requestsyncchunkargs) | [UpdateProvenTxReqWithNewProvenTxResult](#interface-updateproventxreqwithnewproventxresult) |
|
|
32
|
+
| [FindForUserSincePagedArgs](#interface-findforusersincepagedargs) | [ScriptTemplateParamsBRC29](#interface-scripttemplateparamsbrc29) | [ValidAbortActionArgs](#interface-validabortactionargs) |
|
|
33
|
+
| [FindMonitorEventsArgs](#interface-findmonitoreventsargs) | [ScriptTemplateUnlock](#interface-scripttemplateunlock) | [ValidAcquireCertificateArgs](#interface-validacquirecertificateargs) |
|
|
34
|
+
| [FindOutputBasketsArgs](#interface-findoutputbasketsargs) | [SetupEnv](#interface-setupenv) | [ValidAcquireDirectCertificateArgs](#interface-validacquiredirectcertificateargs) |
|
|
35
|
+
| [FindOutputTagMapsArgs](#interface-findoutputtagmapsargs) | [SetupWallet](#interface-setupwallet) | [ValidAcquireIssuanceCertificateArgs](#interface-validacquireissuancecertificateargs) |
|
|
36
|
+
| [FindOutputTagsArgs](#interface-findoutputtagsargs) | [SetupWalletArgs](#interface-setupwalletargs) | [ValidBasketInsertion](#interface-validbasketinsertion) |
|
|
37
|
+
| [FindOutputsArgs](#interface-findoutputsargs) | [SetupWalletClient](#interface-setupwalletclient) | [ValidCreateActionArgs](#interface-validcreateactionargs) |
|
|
38
|
+
| [FindPartialSincePagedArgs](#interface-findpartialsincepagedargs) | [SetupWalletClientArgs](#interface-setupwalletclientargs) | [ValidCreateActionInput](#interface-validcreateactioninput) |
|
|
39
|
+
| [FindProvenTxReqsArgs](#interface-findproventxreqsargs) | [StorageCreateActionResult](#interface-storagecreateactionresult) | [ValidCreateActionOptions](#interface-validcreateactionoptions) |
|
|
40
|
+
| [FindProvenTxsArgs](#interface-findproventxsargs) | [StorageCreateTransactionSdkInput](#interface-storagecreatetransactionsdkinput) | [ValidCreateActionOutput](#interface-validcreateactionoutput) |
|
|
41
|
+
| [FindSincePagedArgs](#interface-findsincepagedargs) | [StorageCreateTransactionSdkOutput](#interface-storagecreatetransactionsdkoutput) | [ValidDiscoverByAttributesArgs](#interface-validdiscoverbyattributesargs) |
|
|
42
|
+
| [FindSyncStatesArgs](#interface-findsyncstatesargs) | [StorageFeeModel](#interface-storagefeemodel) | [ValidDiscoverByIdentityKeyArgs](#interface-validdiscoverbyidentitykeyargs) |
|
|
43
|
+
| [FindTransactionsArgs](#interface-findtransactionsargs) | [StorageGetBeefOptions](#interface-storagegetbeefoptions) | [ValidInternalizeActionArgs](#interface-validinternalizeactionargs) |
|
|
44
|
+
| [FindTxLabelMapsArgs](#interface-findtxlabelmapsargs) | [StorageIdentity](#interface-storageidentity) | [ValidInternalizeOutput](#interface-validinternalizeoutput) |
|
|
45
|
+
| [FindTxLabelsArgs](#interface-findtxlabelsargs) | [StorageInternalizeActionResult](#interface-storageinternalizeactionresult) | [ValidListActionsArgs](#interface-validlistactionsargs) |
|
|
46
|
+
| [FindUsersArgs](#interface-findusersargs) | [StorageProcessActionArgs](#interface-storageprocessactionargs) | [ValidListCertificatesArgs](#interface-validlistcertificatesargs) |
|
|
47
|
+
| [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput) | [StorageProcessActionResults](#interface-storageprocessactionresults) | [ValidListOutputsArgs](#interface-validlistoutputsargs) |
|
|
48
|
+
| [GenerateChangeSdkChangeOutput](#interface-generatechangesdkchangeoutput) | [StorageProvenOrReq](#interface-storageprovenorreq) | [ValidProcessActionArgs](#interface-validprocessactionargs) |
|
|
49
|
+
| [GenerateChangeSdkInput](#interface-generatechangesdkinput) | [StorageProviderOptions](#interface-storageprovideroptions) | [ValidProcessActionOptions](#interface-validprocessactionoptions) |
|
|
50
|
+
| [GenerateChangeSdkOutput](#interface-generatechangesdkoutput) | [StorageReaderOptions](#interface-storagereaderoptions) | [ValidProveCertificateArgs](#interface-validprovecertificateargs) |
|
|
51
|
+
| [GenerateChangeSdkParams](#interface-generatechangesdkparams) | [StorageReaderWriterOptions](#interface-storagereaderwriteroptions) | [ValidRelinquishCertificateArgs](#interface-validrelinquishcertificateargs) |
|
|
52
|
+
| [GenerateChangeSdkResult](#interface-generatechangesdkresult) | [StorageSyncReader](#interface-storagesyncreader) | [ValidRelinquishOutputArgs](#interface-validrelinquishoutputargs) |
|
|
53
|
+
| [GenerateChangeSdkStorageChange](#interface-generatechangesdkstoragechange) | [StorageSyncReaderOptions](#interface-storagesyncreaderoptions) | [ValidSignActionArgs](#interface-validsignactionargs) |
|
|
54
|
+
| [GetMerklePathResult](#interface-getmerklepathresult) | [StorageSyncReaderWriter](#interface-storagesyncreaderwriter) | [ValidSignActionOptions](#interface-validsignactionoptions) |
|
|
55
|
+
| [GetRawTxResult](#interface-getrawtxresult) | [SyncChunk](#interface-syncchunk) | [ValidWalletPayment](#interface-validwalletpayment) |
|
|
56
|
+
| [GetReqsAndBeefDetail](#interface-getreqsandbeefdetail) | [SyncError](#interface-syncerror) | [ValidWalletSignerArgs](#interface-validwalletsignerargs) |
|
|
57
|
+
| [GetReqsAndBeefResult](#interface-getreqsandbeefresult) | [SyncMap](#interface-syncmap) | [ValidateGenerateChangeSdkParamsResult](#interface-validategeneratechangesdkparamsresult) |
|
|
58
|
+
| [GetUtxoStatusDetails](#interface-getutxostatusdetails) | [TableCertificate](#interface-tablecertificate) | [WalletArgs](#interface-walletargs) |
|
|
59
|
+
| [GetUtxoStatusResult](#interface-getutxostatusresult) | [TableCertificateField](#interface-tablecertificatefield) | [WalletServices](#interface-walletservices) |
|
|
60
|
+
| [KeyPair](#interface-keypair) | [TableCertificateX](#interface-tablecertificatex) | [WalletServicesOptions](#interface-walletservicesoptions) |
|
|
61
|
+
| [KeyPairAddress](#interface-keypairaddress) | [TableCommission](#interface-tablecommission) | [WalletSigner](#interface-walletsigner) |
|
|
62
|
+
| [MonitorOptions](#interface-monitoroptions) | [TableMonitorEvent](#interface-tablemonitorevent) | [WalletStorage](#interface-walletstorage) |
|
|
63
|
+
| [OutPoint](#interface-outpoint) | [TableOutput](#interface-tableoutput) | [WalletStorageProvider](#interface-walletstorageprovider) |
|
|
64
|
+
| [Paged](#interface-paged) | [TableOutputBasket](#interface-tableoutputbasket) | [WalletStorageReader](#interface-walletstoragereader) |
|
|
65
|
+
| [PendingSignAction](#interface-pendingsignaction) | [TableOutputTag](#interface-tableoutputtag) | [WalletStorageSync](#interface-walletstoragesync) |
|
|
66
|
+
| [PendingStorageInput](#interface-pendingstorageinput) | [TableOutputTagMap](#interface-tableoutputtagmap) | [WalletStorageWriter](#interface-walletstoragewriter) |
|
|
67
|
+
| [PostBeefResult](#interface-postbeefresult) | [TableOutputX](#interface-tableoutputx) | [XValidCreateActionOutput](#interface-xvalidcreateactionoutput) |
|
|
68
68
|
|
|
69
69
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
70
70
|
|
|
71
71
|
---
|
|
72
72
|
|
|
73
|
-
##### Interface:
|
|
73
|
+
##### Interface: ArcConfig
|
|
74
|
+
|
|
75
|
+
Configuration options for the ARC broadcaster.
|
|
74
76
|
|
|
75
77
|
```ts
|
|
76
|
-
export interface
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
merklePath: string;
|
|
84
|
-
timestamp: string;
|
|
85
|
-
txid: string;
|
|
86
|
-
txStatus: string;
|
|
78
|
+
export interface ArcConfig {
|
|
79
|
+
apiKey?: string;
|
|
80
|
+
httpClient?: HttpClient;
|
|
81
|
+
deploymentId?: string;
|
|
82
|
+
callbackUrl?: string;
|
|
83
|
+
callbackToken?: string;
|
|
84
|
+
headers?: Record<string, string>;
|
|
87
85
|
}
|
|
88
86
|
```
|
|
89
87
|
|
|
90
|
-
|
|
88
|
+
###### Property apiKey
|
|
91
89
|
|
|
92
|
-
|
|
93
|
-
##### Interface: ArcMinerPostBeefDataApi
|
|
90
|
+
Authentication token for the ARC API
|
|
94
91
|
|
|
95
92
|
```ts
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
93
|
+
apiKey?: string
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
###### Property callbackToken
|
|
97
|
+
|
|
98
|
+
default access token for notification callback endpoint. It will be used as a Authorization header for the http callback
|
|
99
|
+
|
|
100
|
+
```ts
|
|
101
|
+
callbackToken?: string
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
###### Property callbackUrl
|
|
105
|
+
|
|
106
|
+
notification callback endpoint for proofs and double spend notification
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
callbackUrl?: string
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
###### Property deploymentId
|
|
113
|
+
|
|
114
|
+
Deployment id used annotating api calls in XDeployment-ID header - this value will be randomly generated if not set
|
|
115
|
+
|
|
116
|
+
```ts
|
|
117
|
+
deploymentId?: string
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
###### Property headers
|
|
121
|
+
|
|
122
|
+
additional headers to be attached to all tx submissions.
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
headers?: Record<string, string>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
###### Property httpClient
|
|
129
|
+
|
|
130
|
+
The HTTP client used to make requests to the ARC API.
|
|
131
|
+
|
|
132
|
+
```ts
|
|
133
|
+
httpClient?: HttpClient
|
|
111
134
|
```
|
|
112
135
|
|
|
113
136
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
114
137
|
|
|
115
138
|
---
|
|
116
|
-
##### Interface:
|
|
139
|
+
##### Interface: ArcMinerGetTxData
|
|
117
140
|
|
|
118
141
|
```ts
|
|
119
|
-
export interface
|
|
142
|
+
export interface ArcMinerGetTxData {
|
|
120
143
|
status: number;
|
|
121
144
|
title: string;
|
|
122
145
|
blockHash: string;
|
|
@@ -132,19 +155,6 @@ export interface ArcMinerPostTxsData {
|
|
|
132
155
|
|
|
133
156
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
134
157
|
|
|
135
|
-
---
|
|
136
|
-
##### Interface: ArcServiceConfig
|
|
137
|
-
|
|
138
|
-
```ts
|
|
139
|
-
export interface ArcServiceConfig {
|
|
140
|
-
name: string;
|
|
141
|
-
url: string;
|
|
142
|
-
arcConfig: ArcConfig;
|
|
143
|
-
}
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
147
|
-
|
|
148
158
|
---
|
|
149
159
|
##### Interface: AuthId
|
|
150
160
|
|
|
@@ -757,6 +767,10 @@ export interface GenerateChangeSdkResult {
|
|
|
757
767
|
size: number;
|
|
758
768
|
fee: number;
|
|
759
769
|
satsPerKb: number;
|
|
770
|
+
maxPossibleSatoshisAdjustment?: {
|
|
771
|
+
fixedOutputIndex: number;
|
|
772
|
+
satoshis: number;
|
|
773
|
+
};
|
|
760
774
|
}
|
|
761
775
|
```
|
|
762
776
|
|
|
@@ -1242,13 +1256,17 @@ export interface PostTxResultForTxid {
|
|
|
1242
1256
|
txid: string;
|
|
1243
1257
|
status: "success" | "error";
|
|
1244
1258
|
alreadyKnown?: boolean;
|
|
1259
|
+
doubleSpend?: boolean;
|
|
1245
1260
|
blockHash?: string;
|
|
1246
1261
|
blockHeight?: number;
|
|
1247
1262
|
merklePath?: MerklePath;
|
|
1248
|
-
|
|
1263
|
+
competingTxs?: string[];
|
|
1264
|
+
data?: object | string | PostTxResultForTxidError;
|
|
1249
1265
|
}
|
|
1250
1266
|
```
|
|
1251
1267
|
|
|
1268
|
+
See also: [PostTxResultForTxidError](./client.md#interface-posttxresultfortxiderror)
|
|
1269
|
+
|
|
1252
1270
|
###### Property alreadyKnown
|
|
1253
1271
|
|
|
1254
1272
|
if true, the transaction was already known to this service. Usually treat as a success.
|
|
@@ -1259,6 +1277,15 @@ Potentially stop posting to additional transaction processors.
|
|
|
1259
1277
|
alreadyKnown?: boolean
|
|
1260
1278
|
```
|
|
1261
1279
|
|
|
1280
|
+
###### Property doubleSpend
|
|
1281
|
+
|
|
1282
|
+
service indicated this broadcast double spends at least one input
|
|
1283
|
+
`competingTxs` may be an array of txids that were first seen spends of at least one input.
|
|
1284
|
+
|
|
1285
|
+
```ts
|
|
1286
|
+
doubleSpend?: boolean
|
|
1287
|
+
```
|
|
1288
|
+
|
|
1262
1289
|
###### Property status
|
|
1263
1290
|
|
|
1264
1291
|
'success' - The transaction was accepted for processing
|
|
@@ -1269,6 +1296,19 @@ status: "success" | "error"
|
|
|
1269
1296
|
|
|
1270
1297
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1271
1298
|
|
|
1299
|
+
---
|
|
1300
|
+
##### Interface: PostTxResultForTxidError
|
|
1301
|
+
|
|
1302
|
+
```ts
|
|
1303
|
+
export interface PostTxResultForTxidError {
|
|
1304
|
+
status?: string;
|
|
1305
|
+
detail?: string;
|
|
1306
|
+
more?: object;
|
|
1307
|
+
}
|
|
1308
|
+
```
|
|
1309
|
+
|
|
1310
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1311
|
+
|
|
1272
1312
|
---
|
|
1273
1313
|
##### Interface: PostTxsResult
|
|
1274
1314
|
|
|
@@ -1598,6 +1638,7 @@ export interface SetupEnv {
|
|
|
1598
1638
|
chain: sdk.Chain;
|
|
1599
1639
|
identityKey: string;
|
|
1600
1640
|
identityKey2: string;
|
|
1641
|
+
filePath: string | undefined;
|
|
1601
1642
|
taalApiKey: string;
|
|
1602
1643
|
devKeys: Record<string, string>;
|
|
1603
1644
|
mySQLConnection: string;
|
|
@@ -1623,6 +1664,14 @@ A map of public keys (identity keys, hex strings) to private keys (hex strings).
|
|
|
1623
1664
|
devKeys: Record<string, string>
|
|
1624
1665
|
```
|
|
1625
1666
|
|
|
1667
|
+
###### Property filePath
|
|
1668
|
+
|
|
1669
|
+
Filepath to sqlite file to be used for identityKey wallet.
|
|
1670
|
+
|
|
1671
|
+
```ts
|
|
1672
|
+
filePath: string | undefined
|
|
1673
|
+
```
|
|
1674
|
+
|
|
1626
1675
|
###### Property identityKey
|
|
1627
1676
|
|
|
1628
1677
|
The user's primary identity key (public key).
|
|
@@ -3554,6 +3603,17 @@ export interface ValidWalletSignerArgs {
|
|
|
3554
3603
|
|
|
3555
3604
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3556
3605
|
|
|
3606
|
+
---
|
|
3607
|
+
##### Interface: ValidateGenerateChangeSdkParamsResult
|
|
3608
|
+
|
|
3609
|
+
```ts
|
|
3610
|
+
export interface ValidateGenerateChangeSdkParamsResult {
|
|
3611
|
+
hasMaxPossibleOutput?: number;
|
|
3612
|
+
}
|
|
3613
|
+
```
|
|
3614
|
+
|
|
3615
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3616
|
+
|
|
3557
3617
|
---
|
|
3558
3618
|
##### Interface: WalletArgs
|
|
3559
3619
|
|
|
@@ -3587,7 +3647,6 @@ export interface WalletServices {
|
|
|
3587
3647
|
getFiatExchangeRate(currency: "USD" | "GBP" | "EUR", base?: "USD" | "GBP" | "EUR"): Promise<number>;
|
|
3588
3648
|
getRawTx(txid: string, useNext?: boolean): Promise<GetRawTxResult>;
|
|
3589
3649
|
getMerklePath(txid: string, useNext?: boolean): Promise<GetMerklePathResult>;
|
|
3590
|
-
postTxs(beef: Beef, txids: string[]): Promise<PostTxsResult[]>;
|
|
3591
3650
|
postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult[]>;
|
|
3592
3651
|
getUtxoStatus(output: string, outputFormat?: GetUtxoStatusOutputFormat, useNext?: boolean): Promise<GetUtxoStatusResult>;
|
|
3593
3652
|
hashToHeader(hash: string): Promise<sdk.BlockHeader>;
|
|
@@ -3595,7 +3654,7 @@ export interface WalletServices {
|
|
|
3595
3654
|
}
|
|
3596
3655
|
```
|
|
3597
3656
|
|
|
3598
|
-
See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [PostBeefResult](./client.md#interface-postbeefresult)
|
|
3657
|
+
See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [PostBeefResult](./client.md#interface-postbeefresult)
|
|
3599
3658
|
|
|
3600
3659
|
###### Property chain
|
|
3601
3660
|
|
|
@@ -3788,10 +3847,12 @@ export interface WalletServicesOptions {
|
|
|
3788
3847
|
exchangeratesapiKey?: string;
|
|
3789
3848
|
chaintracksFiatExchangeRatesUrl?: string;
|
|
3790
3849
|
chaintracks?: ChaintracksServiceClient;
|
|
3850
|
+
arcUrl: string;
|
|
3851
|
+
arcConfig: ArcConfig;
|
|
3791
3852
|
}
|
|
3792
3853
|
```
|
|
3793
3854
|
|
|
3794
|
-
See also: [BsvExchangeRate](./client.md#interface-bsvexchangerate), [Chain](./client.md#type-chain), [FiatExchangeRates](./client.md#interface-fiatexchangerates)
|
|
3855
|
+
See also: [ArcConfig](./services.md#interface-arcconfig), [BsvExchangeRate](./client.md#interface-bsvexchangerate), [Chain](./client.md#type-chain), [FiatExchangeRates](./client.md#interface-fiatexchangerates)
|
|
3795
3856
|
|
|
3796
3857
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3797
3858
|
|
|
@@ -3981,22 +4042,23 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
3981
4042
|
|
|
3982
4043
|
| | | |
|
|
3983
4044
|
| --- | --- | --- |
|
|
3984
|
-
| [
|
|
3985
|
-
| [
|
|
3986
|
-
| [
|
|
3987
|
-
| [
|
|
3988
|
-
| [
|
|
3989
|
-
| [
|
|
3990
|
-
| [
|
|
3991
|
-
| [
|
|
3992
|
-
| [
|
|
3993
|
-
| [
|
|
3994
|
-
| [
|
|
3995
|
-
| [
|
|
3996
|
-
| [
|
|
3997
|
-
| [
|
|
3998
|
-
| [
|
|
3999
|
-
| [
|
|
4045
|
+
| [ARC](#class-arc) | [PrivilegedKeyManager](#class-privilegedkeymanager) | [WERR_BAD_REQUEST](#class-werr_bad_request) |
|
|
4046
|
+
| [CertOps](#class-certops) | [ScriptTemplateBRC29](#class-scripttemplatebrc29) | [WERR_INSUFFICIENT_FUNDS](#class-werr_insufficient_funds) |
|
|
4047
|
+
| [EntityBase](#class-entitybase) | [SdkWhatsOnChain](#class-sdkwhatsonchain) | [WERR_INTERNAL](#class-werr_internal) |
|
|
4048
|
+
| [EntityCertificate](#class-entitycertificate) | [ServiceCollection](#class-servicecollection) | [WERR_INVALID_OPERATION](#class-werr_invalid_operation) |
|
|
4049
|
+
| [EntityCertificateField](#class-entitycertificatefield) | [Services](#class-services) | [WERR_INVALID_PARAMETER](#class-werr_invalid_parameter) |
|
|
4050
|
+
| [EntityCommission](#class-entitycommission) | [SetupClient](#class-setupclient) | [WERR_INVALID_PUBLIC_KEY](#class-werr_invalid_public_key) |
|
|
4051
|
+
| [EntityOutput](#class-entityoutput) | [StorageClient](#class-storageclient) | [WERR_MISSING_PARAMETER](#class-werr_missing_parameter) |
|
|
4052
|
+
| [EntityOutputBasket](#class-entityoutputbasket) | [StorageProvider](#class-storageprovider) | [WERR_NETWORK_CHAIN](#class-werr_network_chain) |
|
|
4053
|
+
| [EntityOutputTag](#class-entityoutputtag) | [StorageReader](#class-storagereader) | [WERR_NOT_ACTIVE](#class-werr_not_active) |
|
|
4054
|
+
| [EntityOutputTagMap](#class-entityoutputtagmap) | [StorageReaderWriter](#class-storagereaderwriter) | [WERR_NOT_IMPLEMENTED](#class-werr_not_implemented) |
|
|
4055
|
+
| [EntityProvenTx](#class-entityproventx) | [StorageSyncReader](#class-storagesyncreader) | [WERR_UNAUTHORIZED](#class-werr_unauthorized) |
|
|
4056
|
+
| [EntityProvenTxReq](#class-entityproventxreq) | [TaskCheckForProofs](#class-taskcheckforproofs) | [Wallet](#class-wallet) |
|
|
4057
|
+
| [EntitySyncState](#class-entitysyncstate) | [TaskClock](#class-taskclock) | [WalletError](#class-walleterror) |
|
|
4058
|
+
| [EntityTransaction](#class-entitytransaction) | [TaskFailAbandoned](#class-taskfailabandoned) | [WalletMonitorTask](#class-walletmonitortask) |
|
|
4059
|
+
| [EntityTxLabel](#class-entitytxlabel) | [TaskNewHeader](#class-tasknewheader) | [WalletSigner](#class-walletsigner) |
|
|
4060
|
+
| [EntityTxLabelMap](#class-entitytxlabelmap) | [TaskPurge](#class-taskpurge) | [WalletStorageManager](#class-walletstoragemanager) |
|
|
4061
|
+
| [EntityUser](#class-entityuser) | [TaskReviewStatus](#class-taskreviewstatus) | [WhatsOnChain](#class-whatsonchain) |
|
|
4000
4062
|
| [MergeEntity](#class-mergeentity) | [TaskSendWaiting](#class-tasksendwaiting) | |
|
|
4001
4063
|
| [Monitor](#class-monitor) | [TaskSyncWhenIdle](#class-tasksyncwhenidle) | |
|
|
4002
4064
|
|
|
@@ -4004,6 +4066,99 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
4004
4066
|
|
|
4005
4067
|
---
|
|
4006
4068
|
|
|
4069
|
+
##### Class: ARC
|
|
4070
|
+
|
|
4071
|
+
Represents an ARC transaction broadcaster.
|
|
4072
|
+
|
|
4073
|
+
```ts
|
|
4074
|
+
export default class ARC {
|
|
4075
|
+
readonly URL: string;
|
|
4076
|
+
readonly apiKey: string | undefined;
|
|
4077
|
+
readonly deploymentId: string;
|
|
4078
|
+
readonly callbackUrl: string | undefined;
|
|
4079
|
+
readonly callbackToken: string | undefined;
|
|
4080
|
+
readonly headers: Record<string, string> | undefined;
|
|
4081
|
+
constructor(URL: string, config?: ArcConfig);
|
|
4082
|
+
constructor(URL: string, apiKey?: string);
|
|
4083
|
+
constructor(URL: string, config?: string | ArcConfig)
|
|
4084
|
+
async postRawTx(rawTx: HexString, txids?: string[]): Promise<sdk.PostTxResultForTxid>
|
|
4085
|
+
async postBeef(beef: Beef, txids: string[]): Promise<sdk.PostBeefResult>
|
|
4086
|
+
async getTxData(txid: string): Promise<ArcMinerGetTxData>
|
|
4087
|
+
}
|
|
4088
|
+
```
|
|
4089
|
+
|
|
4090
|
+
See also: [ArcConfig](./services.md#interface-arcconfig), [ArcMinerGetTxData](./services.md#interface-arcminergettxdata), [PostBeefResult](./client.md#interface-postbeefresult), [PostTxResultForTxid](./client.md#interface-posttxresultfortxid)
|
|
4091
|
+
|
|
4092
|
+
###### Constructor
|
|
4093
|
+
|
|
4094
|
+
Constructs an instance of the ARC broadcaster.
|
|
4095
|
+
|
|
4096
|
+
```ts
|
|
4097
|
+
constructor(URL: string, config?: ArcConfig)
|
|
4098
|
+
```
|
|
4099
|
+
See also: [ArcConfig](./services.md#interface-arcconfig)
|
|
4100
|
+
|
|
4101
|
+
Argument Details
|
|
4102
|
+
|
|
4103
|
+
+ **URL**
|
|
4104
|
+
+ The URL endpoint for the ARC API.
|
|
4105
|
+
+ **config**
|
|
4106
|
+
+ Configuration options for the ARC broadcaster.
|
|
4107
|
+
|
|
4108
|
+
###### Constructor
|
|
4109
|
+
|
|
4110
|
+
Constructs an instance of the ARC broadcaster.
|
|
4111
|
+
|
|
4112
|
+
```ts
|
|
4113
|
+
constructor(URL: string, apiKey?: string)
|
|
4114
|
+
```
|
|
4115
|
+
|
|
4116
|
+
Argument Details
|
|
4117
|
+
|
|
4118
|
+
+ **URL**
|
|
4119
|
+
+ The URL endpoint for the ARC API.
|
|
4120
|
+
+ **apiKey**
|
|
4121
|
+
+ The API key used for authorization with the ARC API.
|
|
4122
|
+
|
|
4123
|
+
###### Method getTxData
|
|
4124
|
+
|
|
4125
|
+
This seems to only work for recently submitted txids...but that's all we need to complete postBeef!
|
|
4126
|
+
|
|
4127
|
+
```ts
|
|
4128
|
+
async getTxData(txid: string): Promise<ArcMinerGetTxData>
|
|
4129
|
+
```
|
|
4130
|
+
See also: [ArcMinerGetTxData](./services.md#interface-arcminergettxdata)
|
|
4131
|
+
|
|
4132
|
+
###### Method postBeef
|
|
4133
|
+
|
|
4134
|
+
ARC does not natively support a postBeef end-point aware of multiple txids of interest in the Beef.
|
|
4135
|
+
|
|
4136
|
+
It does process multiple new transactions, however, which allows results for all txids of interest
|
|
4137
|
+
to be collected by the `/v1/tx/${txid}` endpoint.
|
|
4138
|
+
|
|
4139
|
+
```ts
|
|
4140
|
+
async postBeef(beef: Beef, txids: string[]): Promise<sdk.PostBeefResult>
|
|
4141
|
+
```
|
|
4142
|
+
See also: [PostBeefResult](./client.md#interface-postbeefresult)
|
|
4143
|
+
|
|
4144
|
+
###### Method postRawTx
|
|
4145
|
+
|
|
4146
|
+
The ARC '/v1/tx' endpoint, as of 2025-02-17 supports all of the following hex string formats:
|
|
4147
|
+
1. Single serialized raw transaction.
|
|
4148
|
+
2. Single EF serialized raw transaction (untested).
|
|
4149
|
+
3. V1 serialized Beef (results returned reflect only the last transaction in the beef)
|
|
4150
|
+
|
|
4151
|
+
The ARC '/v1/tx' endpoint, as of 2025-02-17 DOES NOT support the following hex string formats:
|
|
4152
|
+
1. V2 serialized Beef
|
|
4153
|
+
|
|
4154
|
+
```ts
|
|
4155
|
+
async postRawTx(rawTx: HexString, txids?: string[]): Promise<sdk.PostTxResultForTxid>
|
|
4156
|
+
```
|
|
4157
|
+
See also: [PostTxResultForTxid](./client.md#interface-posttxresultfortxid)
|
|
4158
|
+
|
|
4159
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4160
|
+
|
|
4161
|
+
---
|
|
4007
4162
|
##### Class: CertOps
|
|
4008
4163
|
|
|
4009
4164
|
```ts
|
|
@@ -5263,6 +5418,41 @@ unlockLength = 108
|
|
|
5263
5418
|
|
|
5264
5419
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5265
5420
|
|
|
5421
|
+
---
|
|
5422
|
+
##### Class: SdkWhatsOnChain
|
|
5423
|
+
|
|
5424
|
+
Represents a chain tracker based on What's On Chain .
|
|
5425
|
+
|
|
5426
|
+
```ts
|
|
5427
|
+
export default class SdkWhatsOnChain implements ChainTracker {
|
|
5428
|
+
readonly network: string;
|
|
5429
|
+
readonly apiKey: string;
|
|
5430
|
+
protected readonly URL: string;
|
|
5431
|
+
protected readonly httpClient: HttpClient;
|
|
5432
|
+
constructor(network: "main" | "test" | "stn" = "main", config: WhatsOnChainConfig = {})
|
|
5433
|
+
async isValidRootForHeight(root: string, height: number): Promise<boolean>
|
|
5434
|
+
async currentHeight(): Promise<number>
|
|
5435
|
+
protected getHttpHeaders(): Record<string, string>
|
|
5436
|
+
}
|
|
5437
|
+
```
|
|
5438
|
+
|
|
5439
|
+
###### Constructor
|
|
5440
|
+
|
|
5441
|
+
Constructs an instance of the WhatsOnChain ChainTracker.
|
|
5442
|
+
|
|
5443
|
+
```ts
|
|
5444
|
+
constructor(network: "main" | "test" | "stn" = "main", config: WhatsOnChainConfig = {})
|
|
5445
|
+
```
|
|
5446
|
+
|
|
5447
|
+
Argument Details
|
|
5448
|
+
|
|
5449
|
+
+ **network**
|
|
5450
|
+
+ The BSV network to use when calling the WhatsOnChain API.
|
|
5451
|
+
+ **config**
|
|
5452
|
+
+ Configuration options for the WhatsOnChain ChainTracker.
|
|
5453
|
+
|
|
5454
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5455
|
+
|
|
5266
5456
|
---
|
|
5267
5457
|
##### Class: ServiceCollection
|
|
5268
5458
|
|
|
@@ -5302,9 +5492,10 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
5302
5492
|
export class Services implements sdk.WalletServices {
|
|
5303
5493
|
static createDefaultOptions(chain: sdk.Chain): sdk.WalletServicesOptions
|
|
5304
5494
|
options: sdk.WalletServicesOptions;
|
|
5495
|
+
whatsonchain: WhatsOnChain;
|
|
5496
|
+
arc: ARC;
|
|
5305
5497
|
getMerklePathServices: ServiceCollection<sdk.GetMerklePathService>;
|
|
5306
5498
|
getRawTxServices: ServiceCollection<sdk.GetRawTxService>;
|
|
5307
|
-
postTxsServices: ServiceCollection<sdk.PostTxsService>;
|
|
5308
5499
|
postBeefServices: ServiceCollection<sdk.PostBeefService>;
|
|
5309
5500
|
getUtxoStatusServices: ServiceCollection<sdk.GetUtxoStatusService>;
|
|
5310
5501
|
updateFiatExchangeRateServices: ServiceCollection<sdk.UpdateFiatExchangeRateService>;
|
|
@@ -5315,11 +5506,9 @@ export class Services implements sdk.WalletServices {
|
|
|
5315
5506
|
async getFiatExchangeRate(currency: "USD" | "GBP" | "EUR", base?: "USD" | "GBP" | "EUR"): Promise<number>
|
|
5316
5507
|
get getProofsCount()
|
|
5317
5508
|
get getRawTxsCount()
|
|
5318
|
-
get postTxsServicesCount()
|
|
5319
5509
|
get postBeefServicesCount()
|
|
5320
5510
|
get getUtxoStatsCount()
|
|
5321
5511
|
async getUtxoStatus(output: string, outputFormat?: sdk.GetUtxoStatusOutputFormat, useNext?: boolean): Promise<sdk.GetUtxoStatusResult>
|
|
5322
|
-
async postTxs(beef: Beef, txids: string[]): Promise<sdk.PostTxsResult[]>
|
|
5323
5512
|
async postBeef(beef: Beef, txids: string[]): Promise<sdk.PostBeefResult[]>
|
|
5324
5513
|
async getRawTx(txid: string, useNext?: boolean): Promise<sdk.GetRawTxResult>
|
|
5325
5514
|
async invokeChaintracksWithRetry<R>(method: () => Promise<R>): Promise<R>
|
|
@@ -5333,18 +5522,7 @@ export class Services implements sdk.WalletServices {
|
|
|
5333
5522
|
}
|
|
5334
5523
|
```
|
|
5335
5524
|
|
|
5336
|
-
See also: [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), [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), [
|
|
5337
|
-
|
|
5338
|
-
###### Method postTxs
|
|
5339
|
-
|
|
5340
|
-
The beef must contain at least each rawTx for each txid.
|
|
5341
|
-
Some services may require input transactions as well.
|
|
5342
|
-
These will be fetched if missing, greatly extending the service response time.
|
|
5343
|
-
|
|
5344
|
-
```ts
|
|
5345
|
-
async postTxs(beef: Beef, txids: string[]): Promise<sdk.PostTxsResult[]>
|
|
5346
|
-
```
|
|
5347
|
-
See also: [PostTxsResult](./client.md#interface-posttxsresult)
|
|
5525
|
+
See also: [ARC](./services.md#class-arc), [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), [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)
|
|
5348
5526
|
|
|
5349
5527
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5350
5528
|
|
|
@@ -5396,6 +5574,9 @@ DEV_KEYS = '{
|
|
|
5396
5574
|
const identityKey2 = chain === "main"
|
|
5397
5575
|
? process.env.MY_MAIN_IDENTITY2
|
|
5398
5576
|
: process.env.MY_TEST_IDENTITY2;
|
|
5577
|
+
const filePath = chain === "main"
|
|
5578
|
+
? process.env.MY_MAIN_FILEPATH
|
|
5579
|
+
: process.env.MY_TEST_FILEPATH;
|
|
5399
5580
|
const DEV_KEYS = process.env.DEV_KEYS || "{}";
|
|
5400
5581
|
const mySQLConnection = process.env.MYSQL_CONNECTION || "{}";
|
|
5401
5582
|
const taalApiKey = verifyTruthy(chain === "main"
|
|
@@ -5407,6 +5588,7 @@ DEV_KEYS = '{
|
|
|
5407
5588
|
chain,
|
|
5408
5589
|
identityKey,
|
|
5409
5590
|
identityKey2,
|
|
5591
|
+
filePath,
|
|
5410
5592
|
taalApiKey,
|
|
5411
5593
|
devKeys: JSON.parse(DEV_KEYS) as Record<string, string>,
|
|
5412
5594
|
mySQLConnection
|
|
@@ -5454,9 +5636,8 @@ DEV_KEYS = '{
|
|
|
5454
5636
|
}
|
|
5455
5637
|
static async createWalletClient(args: SetupWalletClientArgs): Promise<SetupWalletClient> {
|
|
5456
5638
|
const wo = await SetupClient.createWallet(args);
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
const endpointUrl = args.endpointUrl || "https://staging-dojo.babbage.systems";
|
|
5639
|
+
const endpointUrl = args.endpointUrl ||
|
|
5640
|
+
`https://${args.env.chain !== "main" ? "staging-" : ""}storage.babbage.systems`;
|
|
5460
5641
|
const client = new StorageClient(wo.wallet, endpointUrl);
|
|
5461
5642
|
await wo.storage.addWalletStorageProvider(client);
|
|
5462
5643
|
await wo.storage.makeAvailable();
|
|
@@ -5537,7 +5718,7 @@ DEV_KEYS = '{
|
|
|
5537
5718
|
}
|
|
5538
5719
|
```
|
|
5539
5720
|
|
|
5540
|
-
See also: [Chain](./client.md#type-chain), [KeyPairAddress](./setup.md#interface-keypairaddress), [Monitor](./monitor.md#class-monitor), [PrivilegedKeyManager](./client.md#class-privilegedkeymanager), [ScriptTemplateUnlock](./client.md#interface-scripttemplateunlock), [Services](./services.md#class-services), [Setup](./setup.md#class-setup), [SetupEnv](./setup.md#interface-setupenv), [SetupWallet](./setup.md#interface-setupwallet), [SetupWalletArgs](./setup.md#interface-setupwalletargs), [SetupWalletClient](./setup.md#interface-setupwalletclient), [SetupWalletClientArgs](./setup.md#interface-setupwalletclientargs), [StorageClient](./storage.md#class-storageclient), [WERR_INVALID_OPERATION](./client.md#class-werr_invalid_operation), [
|
|
5721
|
+
See also: [Chain](./client.md#type-chain), [KeyPairAddress](./setup.md#interface-keypairaddress), [Monitor](./monitor.md#class-monitor), [PrivilegedKeyManager](./client.md#class-privilegedkeymanager), [ScriptTemplateUnlock](./client.md#interface-scripttemplateunlock), [Services](./services.md#class-services), [Setup](./setup.md#class-setup), [SetupEnv](./setup.md#interface-setupenv), [SetupWallet](./setup.md#interface-setupwallet), [SetupWalletArgs](./setup.md#interface-setupwalletargs), [SetupWalletClient](./setup.md#interface-setupwalletclient), [SetupWalletClientArgs](./setup.md#interface-setupwalletclientargs), [StorageClient](./storage.md#class-storageclient), [WERR_INVALID_OPERATION](./client.md#class-werr_invalid_operation), [Wallet](./client.md#class-wallet), [WalletStorageManager](./storage.md#class-walletstoragemanager), [createAction](./storage.md#function-createaction), [verifyTruthy](./client.md#function-verifytruthy)
|
|
5541
5722
|
|
|
5542
5723
|
###### Method createWallet
|
|
5543
5724
|
|
|
@@ -5606,6 +5787,9 @@ static getEnv(chain: sdk.Chain): SetupEnv {
|
|
|
5606
5787
|
const identityKey2 = chain === "main"
|
|
5607
5788
|
? process.env.MY_MAIN_IDENTITY2
|
|
5608
5789
|
: process.env.MY_TEST_IDENTITY2;
|
|
5790
|
+
const filePath = chain === "main"
|
|
5791
|
+
? process.env.MY_MAIN_FILEPATH
|
|
5792
|
+
: process.env.MY_TEST_FILEPATH;
|
|
5609
5793
|
const DEV_KEYS = process.env.DEV_KEYS || "{}";
|
|
5610
5794
|
const mySQLConnection = process.env.MYSQL_CONNECTION || "{}";
|
|
5611
5795
|
const taalApiKey = verifyTruthy(chain === "main"
|
|
@@ -5617,6 +5801,7 @@ static getEnv(chain: sdk.Chain): SetupEnv {
|
|
|
5617
5801
|
chain,
|
|
5618
5802
|
identityKey,
|
|
5619
5803
|
identityKey2,
|
|
5804
|
+
filePath,
|
|
5620
5805
|
taalApiKey,
|
|
5621
5806
|
devKeys: JSON.parse(DEV_KEYS) as Record<string, string>,
|
|
5622
5807
|
mySQLConnection
|
|
@@ -7151,6 +7336,7 @@ export class Wallet implements WalletInterface, ProtoWallet {
|
|
|
7151
7336
|
async getHeaderForHeight(args: GetHeaderArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<GetHeaderResult>
|
|
7152
7337
|
async getNetwork(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<GetNetworkResult>
|
|
7153
7338
|
async getVersion(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<GetVersionResult>
|
|
7339
|
+
async sweepTo(toWallet: Wallet): Promise<void>
|
|
7154
7340
|
}
|
|
7155
7341
|
```
|
|
7156
7342
|
|
|
@@ -7194,6 +7380,20 @@ Argument Details
|
|
|
7194
7380
|
+ **newKnownTxids**
|
|
7195
7381
|
+ Optional. Additional new txids known to be valid by the caller to be merged.
|
|
7196
7382
|
|
|
7383
|
+
###### Method sweepTo
|
|
7384
|
+
|
|
7385
|
+
Transfer all possible satoshis held by this wallet to `toWallet`.
|
|
7386
|
+
|
|
7387
|
+
```ts
|
|
7388
|
+
async sweepTo(toWallet: Wallet): Promise<void>
|
|
7389
|
+
```
|
|
7390
|
+
See also: [Wallet](./client.md#class-wallet)
|
|
7391
|
+
|
|
7392
|
+
Argument Details
|
|
7393
|
+
|
|
7394
|
+
+ **toWallet**
|
|
7395
|
+
+ wallet which will receive this wallet's satoshis.
|
|
7396
|
+
|
|
7197
7397
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7198
7398
|
|
|
7199
7399
|
---
|
|
@@ -7479,49 +7679,100 @@ Argument Details
|
|
|
7479
7679
|
|
|
7480
7680
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7481
7681
|
|
|
7682
|
+
---
|
|
7683
|
+
##### Class: WhatsOnChain
|
|
7684
|
+
|
|
7685
|
+
```ts
|
|
7686
|
+
export class WhatsOnChain extends SdkWhatsOnChain {
|
|
7687
|
+
constructor(chain: sdk.Chain = "main", config: WhatsOnChainConfig = {})
|
|
7688
|
+
async getTxPropagation(txid: string): Promise<number>
|
|
7689
|
+
async getRawTx(txid: string): Promise<string | undefined>
|
|
7690
|
+
async getRawTxResult(txid: string): Promise<sdk.GetRawTxResult>
|
|
7691
|
+
async postRawTx(rawTx: HexString): Promise<string>
|
|
7692
|
+
async getMerklePath(txid: string, services: sdk.WalletServices): Promise<sdk.GetMerklePathResult>
|
|
7693
|
+
async updateBsvExchangeRate(rate?: sdk.BsvExchangeRate, updateMsecs?: number): Promise<sdk.BsvExchangeRate>
|
|
7694
|
+
async getUtxoStatus(output: string, outputFormat?: sdk.GetUtxoStatusOutputFormat): Promise<sdk.GetUtxoStatusResult>
|
|
7695
|
+
}
|
|
7696
|
+
```
|
|
7697
|
+
|
|
7698
|
+
See also: [BsvExchangeRate](./client.md#interface-bsvexchangerate), [Chain](./client.md#type-chain), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [SdkWhatsOnChain](./services.md#class-sdkwhatsonchain), [WalletServices](./client.md#interface-walletservices)
|
|
7699
|
+
|
|
7700
|
+
###### Method getRawTx
|
|
7701
|
+
|
|
7702
|
+
May return undefined for unmined transactions that are in the mempool.
|
|
7703
|
+
|
|
7704
|
+
```ts
|
|
7705
|
+
async getRawTx(txid: string): Promise<string | undefined>
|
|
7706
|
+
```
|
|
7707
|
+
|
|
7708
|
+
Returns
|
|
7709
|
+
|
|
7710
|
+
raw transaction as hex string or undefined if txid not found in mined block.
|
|
7711
|
+
|
|
7712
|
+
###### Method getTxPropagation
|
|
7713
|
+
|
|
7714
|
+
2025-02-16 throwing internal server error 500.
|
|
7715
|
+
|
|
7716
|
+
```ts
|
|
7717
|
+
async getTxPropagation(txid: string): Promise<number>
|
|
7718
|
+
```
|
|
7719
|
+
|
|
7720
|
+
###### Method postRawTx
|
|
7721
|
+
|
|
7722
|
+
```ts
|
|
7723
|
+
async postRawTx(rawTx: HexString): Promise<string>
|
|
7724
|
+
```
|
|
7725
|
+
|
|
7726
|
+
Returns
|
|
7727
|
+
|
|
7728
|
+
txid returned by transaction processor of transaction broadcast
|
|
7729
|
+
|
|
7730
|
+
Argument Details
|
|
7731
|
+
|
|
7732
|
+
+ **rawTx**
|
|
7733
|
+
+ raw transaction to broadcast as hex string
|
|
7734
|
+
|
|
7735
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7736
|
+
|
|
7482
7737
|
---
|
|
7483
7738
|
#### Functions
|
|
7484
7739
|
|
|
7485
7740
|
| | | |
|
|
7486
7741
|
| --- | --- | --- |
|
|
7487
|
-
| [acquireDirectCertificate](#function-acquiredirectcertificate) | [
|
|
7488
|
-
| [
|
|
7489
|
-
| [
|
|
7490
|
-
| [
|
|
7491
|
-
| [
|
|
7492
|
-
| [
|
|
7493
|
-
| [
|
|
7494
|
-
| [
|
|
7495
|
-
| [
|
|
7496
|
-
| [
|
|
7497
|
-
| [completeSignedTransaction](#function-completesignedtransaction) | [
|
|
7498
|
-
| [
|
|
7499
|
-
| [
|
|
7500
|
-
| [createAction](#function-createaction) | [
|
|
7501
|
-
| [
|
|
7502
|
-
| [
|
|
7503
|
-
| [
|
|
7504
|
-
| [
|
|
7505
|
-
| [
|
|
7506
|
-
| [
|
|
7507
|
-
| [
|
|
7508
|
-
| [
|
|
7509
|
-
| [
|
|
7510
|
-
| [
|
|
7511
|
-
| [
|
|
7512
|
-
| [
|
|
7513
|
-
| [
|
|
7514
|
-
| [
|
|
7515
|
-
| [
|
|
7516
|
-
| [
|
|
7517
|
-
| [
|
|
7518
|
-
| [
|
|
7519
|
-
| [
|
|
7520
|
-
| [
|
|
7521
|
-
| [lockScriptWithKeyOffsetFromPubKey](#function-lockscriptwithkeyoffsetfrompubkey) | [validateBasketInsertion](#function-validatebasketinsertion) | [verifyOptionalHexString](#function-verifyoptionalhexstring) |
|
|
7522
|
-
| [makeAtomicBeef](#function-makeatomicbeef) | [validateCreateActionArgs](#function-validatecreateactionargs) | [verifyTruthy](#function-verifytruthy) |
|
|
7523
|
-
| [makeAtomicBeef](#function-makeatomicbeef) | [validateCreateActionInput](#function-validatecreateactioninput) | [wait](#function-wait) |
|
|
7524
|
-
| [makeErrorResult](#function-makeerrorresult) | [validateCreateActionOptions](#function-validatecreateactionoptions) | |
|
|
7742
|
+
| [acquireDirectCertificate](#function-acquiredirectcertificate) | [offsetPubKey](#function-offsetpubkey) | [validateInteger](#function-validateinteger) |
|
|
7743
|
+
| [arcDefaultUrl](#function-arcdefaulturl) | [optionalArraysEqual](#function-optionalarraysequal) | [validateInternalizeActionArgs](#function-validateinternalizeactionargs) |
|
|
7744
|
+
| [arraysEqual](#function-arraysequal) | [parseTxScriptOffsets](#function-parsetxscriptoffsets) | [validateInternalizeOutput](#function-validateinternalizeoutput) |
|
|
7745
|
+
| [asArray](#function-asarray) | [parseWalletOutpoint](#function-parsewalletoutpoint) | [validateListActionsArgs](#function-validatelistactionsargs) |
|
|
7746
|
+
| [asBsvSdkPrivateKey](#function-asbsvsdkprivatekey) | [processAction](#function-processaction) | [validateListCertificatesArgs](#function-validatelistcertificatesargs) |
|
|
7747
|
+
| [asBsvSdkPublickKey](#function-asbsvsdkpublickkey) | [processAction](#function-processaction) | [validateListOutputsArgs](#function-validatelistoutputsargs) |
|
|
7748
|
+
| [asBsvSdkScript](#function-asbsvsdkscript) | [proveCertificate](#function-provecertificate) | [validateOptionalInteger](#function-validateoptionalinteger) |
|
|
7749
|
+
| [asBsvSdkTx](#function-asbsvsdktx) | [randomBytes](#function-randombytes) | [validateOptionalOutpointString](#function-validateoptionaloutpointstring) |
|
|
7750
|
+
| [asString](#function-asstring) | [randomBytesBase64](#function-randombytesbase64) | [validateOriginator](#function-validateoriginator) |
|
|
7751
|
+
| [attemptToPostReqsToNetwork](#function-attempttopostreqstonetwork) | [randomBytesHex](#function-randombyteshex) | [validateOutpointString](#function-validateoutpointstring) |
|
|
7752
|
+
| [completeSignedTransaction](#function-completesignedtransaction) | [sha256Hash](#function-sha256hash) | [validatePositiveIntegerOrZero](#function-validatepositiveintegerorzero) |
|
|
7753
|
+
| [completeSignedTransaction](#function-completesignedtransaction) | [signAction](#function-signaction) | [validateProveCertificateArgs](#function-validateprovecertificateargs) |
|
|
7754
|
+
| [convertProofToMerklePath](#function-convertprooftomerklepath) | [stampLog](#function-stamplog) | [validateRelinquishCertificateArgs](#function-validaterelinquishcertificateargs) |
|
|
7755
|
+
| [createAction](#function-createaction) | [stampLogFormat](#function-stamplogformat) | [validateRelinquishOutputArgs](#function-validaterelinquishoutputargs) |
|
|
7756
|
+
| [createAction](#function-createaction) | [toBinaryBaseBlockHeader](#function-tobinarybaseblockheader) | [validateSatoshis](#function-validatesatoshis) |
|
|
7757
|
+
| [createDefaultWalletServicesOptions](#function-createdefaultwalletservicesoptions) | [toWalletNetwork](#function-towalletnetwork) | [validateScriptHash](#function-validatescripthash) |
|
|
7758
|
+
| [createStorageServiceChargeScript](#function-createstorageservicechargescript) | [transactionInputSize](#function-transactioninputsize) | [validateSecondsSinceEpoch](#function-validatesecondssinceepoch) |
|
|
7759
|
+
| [createSyncMap](#function-createsyncmap) | [transactionOutputSize](#function-transactionoutputsize) | [validateSignActionArgs](#function-validatesignactionargs) |
|
|
7760
|
+
| [doubleSha256BE](#function-doublesha256be) | [transactionSize](#function-transactionsize) | [validateSignActionOptions](#function-validatesignactionoptions) |
|
|
7761
|
+
| [doubleSha256HashLE](#function-doublesha256hashle) | [updateChaintracksFiatExchangeRates](#function-updatechaintracksfiatexchangerates) | [validateStorageFeeModel](#function-validatestoragefeemodel) |
|
|
7762
|
+
| [generateChangeSdk](#function-generatechangesdk) | [updateExchangeratesapi](#function-updateexchangeratesapi) | [validateStringLength](#function-validatestringlength) |
|
|
7763
|
+
| [generateChangeSdkMakeStorage](#function-generatechangesdkmakestorage) | [validateAbortActionArgs](#function-validateabortactionargs) | [validateWalletPayment](#function-validatewalletpayment) |
|
|
7764
|
+
| [getBeefForTransaction](#function-getbeeffortransaction) | [validateAcquireCertificateArgs](#function-validateacquirecertificateargs) | [varUintSize](#function-varuintsize) |
|
|
7765
|
+
| [getExchangeRatesIo](#function-getexchangeratesio) | [validateAcquireDirectCertificateArgs](#function-validateacquiredirectcertificateargs) | [verifyHexString](#function-verifyhexstring) |
|
|
7766
|
+
| [getIdentityKey](#function-getidentitykey) | [validateAcquireIssuanceCertificateArgs](#function-validateacquireissuancecertificateargs) | [verifyId](#function-verifyid) |
|
|
7767
|
+
| [getSyncChunk](#function-getsyncchunk) | [validateBasketInsertion](#function-validatebasketinsertion) | [verifyInteger](#function-verifyinteger) |
|
|
7768
|
+
| [internalizeAction](#function-internalizeaction) | [validateCreateActionArgs](#function-validatecreateactionargs) | [verifyNumber](#function-verifynumber) |
|
|
7769
|
+
| [internalizeAction](#function-internalizeaction) | [validateCreateActionInput](#function-validatecreateactioninput) | [verifyOne](#function-verifyone) |
|
|
7770
|
+
| [isHexString](#function-ishexstring) | [validateCreateActionOptions](#function-validatecreateactionoptions) | [verifyOneOrNone](#function-verifyoneornone) |
|
|
7771
|
+
| [listCertificates](#function-listcertificates) | [validateCreateActionOutput](#function-validatecreateactionoutput) | [verifyOptionalHexString](#function-verifyoptionalhexstring) |
|
|
7772
|
+
| [lockScriptWithKeyOffsetFromPubKey](#function-lockscriptwithkeyoffsetfrompubkey) | [validateDiscoverByAttributesArgs](#function-validatediscoverbyattributesargs) | [verifyTruthy](#function-verifytruthy) |
|
|
7773
|
+
| [makeAtomicBeef](#function-makeatomicbeef) | [validateDiscoverByIdentityKeyArgs](#function-validatediscoverbyidentitykeyargs) | [wait](#function-wait) |
|
|
7774
|
+
| [makeAtomicBeef](#function-makeatomicbeef) | [validateGenerateChangeSdkParams](#function-validategeneratechangesdkparams) | |
|
|
7775
|
+
| [maxDate](#function-maxdate) | [validateGenerateChangeSdkResult](#function-validategeneratechangesdkresult) | |
|
|
7525
7776
|
|
|
7526
7777
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7527
7778
|
|
|
@@ -7537,6 +7788,17 @@ See also: [AuthId](./client.md#interface-authid), [ValidAcquireDirectCertificate
|
|
|
7537
7788
|
|
|
7538
7789
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7539
7790
|
|
|
7791
|
+
---
|
|
7792
|
+
##### Function: arcDefaultUrl
|
|
7793
|
+
|
|
7794
|
+
```ts
|
|
7795
|
+
export function arcDefaultUrl(chain: sdk.Chain): string
|
|
7796
|
+
```
|
|
7797
|
+
|
|
7798
|
+
See also: [Chain](./client.md#type-chain)
|
|
7799
|
+
|
|
7800
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7801
|
+
|
|
7540
7802
|
---
|
|
7541
7803
|
##### Function: arraysEqual
|
|
7542
7804
|
|
|
@@ -7885,45 +8147,6 @@ See also: [CertOpsWallet](./client.md#interface-certopswallet)
|
|
|
7885
8147
|
|
|
7886
8148
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7887
8149
|
|
|
7888
|
-
---
|
|
7889
|
-
##### Function: getMerklePathFromTaalARC
|
|
7890
|
-
|
|
7891
|
-
```ts
|
|
7892
|
-
export async function getMerklePathFromTaalARC(txid: string, config: ArcServiceConfig, services: sdk.WalletServices): Promise<sdk.GetMerklePathResult>
|
|
7893
|
-
```
|
|
7894
|
-
|
|
7895
|
-
See also: [ArcServiceConfig](./services.md#interface-arcserviceconfig), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [WalletServices](./client.md#interface-walletservices)
|
|
7896
|
-
|
|
7897
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7898
|
-
|
|
7899
|
-
---
|
|
7900
|
-
##### Function: getMerklePathFromWhatsOnChainTsc
|
|
7901
|
-
|
|
7902
|
-
WhatOnChain.com has their own "hash/pos/R/L" proof format and a more TSC compliant proof format.
|
|
7903
|
-
|
|
7904
|
-
The "/proof/tsc" endpoint is much closer to the TSC specification. It provides "index" directly and each node is just the provided hash value.
|
|
7905
|
-
The "targetType" is unspecified and thus defaults to block header hash, requiring a Chaintracks lookup to get the merkleRoot...
|
|
7906
|
-
Duplicate hash values are provided in full instead of being replaced by "*".
|
|
7907
|
-
|
|
7908
|
-
```ts
|
|
7909
|
-
export async function getMerklePathFromWhatsOnChainTsc(txid: string, chain: sdk.Chain, services: sdk.WalletServices): Promise<sdk.GetMerklePathResult>
|
|
7910
|
-
```
|
|
7911
|
-
|
|
7912
|
-
See also: [Chain](./client.md#type-chain), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [WalletServices](./client.md#interface-walletservices)
|
|
7913
|
-
|
|
7914
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7915
|
-
|
|
7916
|
-
---
|
|
7917
|
-
##### Function: getRawTxFromWhatsOnChain
|
|
7918
|
-
|
|
7919
|
-
```ts
|
|
7920
|
-
export async function getRawTxFromWhatsOnChain(txid: string, chain: sdk.Chain): Promise<sdk.GetRawTxResult>
|
|
7921
|
-
```
|
|
7922
|
-
|
|
7923
|
-
See also: [Chain](./client.md#type-chain), [GetRawTxResult](./client.md#interface-getrawtxresult)
|
|
7924
|
-
|
|
7925
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7926
|
-
|
|
7927
8150
|
---
|
|
7928
8151
|
##### Function: getSyncChunk
|
|
7929
8152
|
|
|
@@ -7937,28 +8160,6 @@ See also: [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [S
|
|
|
7937
8160
|
|
|
7938
8161
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7939
8162
|
|
|
7940
|
-
---
|
|
7941
|
-
##### Function: getTaalArcServiceConfig
|
|
7942
|
-
|
|
7943
|
-
```ts
|
|
7944
|
-
export function getTaalArcServiceConfig(chain: sdk.Chain, apiKey: string): ArcServiceConfig
|
|
7945
|
-
```
|
|
7946
|
-
|
|
7947
|
-
See also: [ArcServiceConfig](./services.md#interface-arcserviceconfig), [Chain](./client.md#type-chain)
|
|
7948
|
-
|
|
7949
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7950
|
-
|
|
7951
|
-
---
|
|
7952
|
-
##### Function: getUtxoStatusFromWhatsOnChain
|
|
7953
|
-
|
|
7954
|
-
```ts
|
|
7955
|
-
export async function getUtxoStatusFromWhatsOnChain(output: string, chain: sdk.Chain, outputFormat?: sdk.GetUtxoStatusOutputFormat): Promise<sdk.GetUtxoStatusResult>
|
|
7956
|
-
```
|
|
7957
|
-
|
|
7958
|
-
See also: [Chain](./client.md#type-chain), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult)
|
|
7959
|
-
|
|
7960
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7961
|
-
|
|
7962
8163
|
---
|
|
7963
8164
|
##### Function: internalizeAction
|
|
7964
8165
|
|
|
@@ -8081,61 +8282,6 @@ export function makeAtomicBeef(tx: BsvTransaction, beef: number[] | Beef): numbe
|
|
|
8081
8282
|
|
|
8082
8283
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8083
8284
|
|
|
8084
|
-
---
|
|
8085
|
-
##### Function: makeErrorResult
|
|
8086
|
-
|
|
8087
|
-
```ts
|
|
8088
|
-
export function makeErrorResult(error: sdk.WalletError, miner: ArcServiceConfig, beef: number[], txids: string[], dd?: ArcMinerPostBeefDataApi): sdk.PostBeefResult
|
|
8089
|
-
```
|
|
8090
|
-
|
|
8091
|
-
See also: [ArcMinerPostBeefDataApi](./services.md#interface-arcminerpostbeefdataapi), [ArcServiceConfig](./services.md#interface-arcserviceconfig), [PostBeefResult](./client.md#interface-postbeefresult), [WalletError](./client.md#class-walleterror)
|
|
8092
|
-
|
|
8093
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8094
|
-
|
|
8095
|
-
---
|
|
8096
|
-
##### Function: makeGetMerklePathFromTaalARC
|
|
8097
|
-
|
|
8098
|
-
```ts
|
|
8099
|
-
export function makeGetMerklePathFromTaalARC(config: ArcServiceConfig): sdk.GetMerklePathService
|
|
8100
|
-
```
|
|
8101
|
-
|
|
8102
|
-
See also: [ArcServiceConfig](./services.md#interface-arcserviceconfig), [GetMerklePathService](./client.md#type-getmerklepathservice)
|
|
8103
|
-
|
|
8104
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8105
|
-
|
|
8106
|
-
---
|
|
8107
|
-
##### Function: makePostBeefResult
|
|
8108
|
-
|
|
8109
|
-
```ts
|
|
8110
|
-
export function makePostBeefResult(dd: ArcMinerPostBeefDataApi, miner: ArcServiceConfig, beef: number[], txids: string[]): sdk.PostBeefResult
|
|
8111
|
-
```
|
|
8112
|
-
|
|
8113
|
-
See also: [ArcMinerPostBeefDataApi](./services.md#interface-arcminerpostbeefdataapi), [ArcServiceConfig](./services.md#interface-arcserviceconfig), [PostBeefResult](./client.md#interface-postbeefresult)
|
|
8114
|
-
|
|
8115
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8116
|
-
|
|
8117
|
-
---
|
|
8118
|
-
##### Function: makePostBeefToTaalARC
|
|
8119
|
-
|
|
8120
|
-
```ts
|
|
8121
|
-
export function makePostBeefToTaalARC(config: ArcServiceConfig): sdk.PostBeefService
|
|
8122
|
-
```
|
|
8123
|
-
|
|
8124
|
-
See also: [ArcServiceConfig](./services.md#interface-arcserviceconfig), [PostBeefService](./client.md#type-postbeefservice)
|
|
8125
|
-
|
|
8126
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8127
|
-
|
|
8128
|
-
---
|
|
8129
|
-
##### Function: makePostTxsToTaalARC
|
|
8130
|
-
|
|
8131
|
-
```ts
|
|
8132
|
-
export function makePostTxsToTaalARC(config: ArcServiceConfig): sdk.PostTxsService
|
|
8133
|
-
```
|
|
8134
|
-
|
|
8135
|
-
See also: [ArcServiceConfig](./services.md#interface-arcserviceconfig), [PostTxsService](./client.md#type-posttxsservice)
|
|
8136
|
-
|
|
8137
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8138
|
-
|
|
8139
8285
|
---
|
|
8140
8286
|
##### Function: maxDate
|
|
8141
8287
|
|
|
@@ -8189,44 +8335,6 @@ export function parseWalletOutpoint(outpoint: string): {
|
|
|
8189
8335
|
|
|
8190
8336
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8191
8337
|
|
|
8192
|
-
---
|
|
8193
|
-
##### Function: postBeefToArcMiner
|
|
8194
|
-
|
|
8195
|
-
```ts
|
|
8196
|
-
export async function postBeefToArcMiner(beef: Beef | number[], txids: string[], config: ArcServiceConfig): Promise<sdk.PostBeefResult>
|
|
8197
|
-
```
|
|
8198
|
-
|
|
8199
|
-
See also: [ArcServiceConfig](./services.md#interface-arcserviceconfig), [PostBeefResult](./client.md#interface-postbeefresult)
|
|
8200
|
-
|
|
8201
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8202
|
-
|
|
8203
|
-
---
|
|
8204
|
-
##### Function: postBeefToTaalArcMiner
|
|
8205
|
-
|
|
8206
|
-
```ts
|
|
8207
|
-
export async function postBeefToTaalArcMiner(beef: Beef, txids: string[], config: ArcServiceConfig, services: sdk.WalletServices): Promise<sdk.PostBeefResult>
|
|
8208
|
-
```
|
|
8209
|
-
|
|
8210
|
-
See also: [ArcServiceConfig](./services.md#interface-arcserviceconfig), [PostBeefResult](./client.md#interface-postbeefresult), [WalletServices](./client.md#interface-walletservices)
|
|
8211
|
-
|
|
8212
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8213
|
-
|
|
8214
|
-
---
|
|
8215
|
-
##### Function: postTxsToTaalArcMiner
|
|
8216
|
-
|
|
8217
|
-
```ts
|
|
8218
|
-
export async function postTxsToTaalArcMiner(beef: Beef, txids: string[], config: ArcServiceConfig, services: sdk.WalletServices): Promise<sdk.PostTxsResult>
|
|
8219
|
-
```
|
|
8220
|
-
|
|
8221
|
-
See also: [ArcServiceConfig](./services.md#interface-arcserviceconfig), [PostTxsResult](./client.md#interface-posttxsresult), [WalletServices](./client.md#interface-walletservices)
|
|
8222
|
-
|
|
8223
|
-
Argument Details
|
|
8224
|
-
|
|
8225
|
-
+ **txs**
|
|
8226
|
-
+ All transactions must have source transactions. Will just source locking scripts and satoshis do?? toHexEF() is used.
|
|
8227
|
-
|
|
8228
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8229
|
-
|
|
8230
8338
|
---
|
|
8231
8339
|
##### Function: processAction
|
|
8232
8340
|
|
|
@@ -8475,17 +8583,6 @@ Argument Details
|
|
|
8475
8583
|
|
|
8476
8584
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8477
8585
|
|
|
8478
|
-
---
|
|
8479
|
-
##### Function: updateBsvExchangeRate
|
|
8480
|
-
|
|
8481
|
-
```ts
|
|
8482
|
-
export async function updateBsvExchangeRate(rate?: sdk.BsvExchangeRate, updateMsecs?: number): Promise<sdk.BsvExchangeRate>
|
|
8483
|
-
```
|
|
8484
|
-
|
|
8485
|
-
See also: [BsvExchangeRate](./client.md#interface-bsvexchangerate)
|
|
8486
|
-
|
|
8487
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8488
|
-
|
|
8489
8586
|
---
|
|
8490
8587
|
##### Function: updateChaintracksFiatExchangeRates
|
|
8491
8588
|
|
|
@@ -8643,10 +8740,10 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8643
8740
|
##### Function: validateGenerateChangeSdkParams
|
|
8644
8741
|
|
|
8645
8742
|
```ts
|
|
8646
|
-
export function validateGenerateChangeSdkParams(params: GenerateChangeSdkParams)
|
|
8743
|
+
export function validateGenerateChangeSdkParams(params: GenerateChangeSdkParams): ValidateGenerateChangeSdkParamsResult
|
|
8647
8744
|
```
|
|
8648
8745
|
|
|
8649
|
-
See also: [GenerateChangeSdkParams](./storage.md#interface-generatechangesdkparams)
|
|
8746
|
+
See also: [GenerateChangeSdkParams](./storage.md#interface-generatechangesdkparams), [ValidateGenerateChangeSdkParamsResult](./storage.md#interface-validategeneratechangesdkparamsresult)
|
|
8650
8747
|
|
|
8651
8748
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8652
8749
|
|
|
@@ -9140,10 +9237,10 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
9140
9237
|
##### Type: GetMerklePathService
|
|
9141
9238
|
|
|
9142
9239
|
```ts
|
|
9143
|
-
export type GetMerklePathService = (txid: string,
|
|
9240
|
+
export type GetMerklePathService = (txid: string, services: WalletServices) => Promise<GetMerklePathResult>
|
|
9144
9241
|
```
|
|
9145
9242
|
|
|
9146
|
-
See also: [
|
|
9243
|
+
See also: [GetMerklePathResult](./client.md#interface-getmerklepathresult), [WalletServices](./client.md#interface-walletservices)
|
|
9147
9244
|
|
|
9148
9245
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
9149
9246
|
|
|
@@ -9171,10 +9268,10 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
9171
9268
|
##### Type: GetUtxoStatusService
|
|
9172
9269
|
|
|
9173
9270
|
```ts
|
|
9174
|
-
export type GetUtxoStatusService = (output: string,
|
|
9271
|
+
export type GetUtxoStatusService = (output: string, outputFormat?: GetUtxoStatusOutputFormat) => Promise<GetUtxoStatusResult>
|
|
9175
9272
|
```
|
|
9176
9273
|
|
|
9177
|
-
See also: [
|
|
9274
|
+
See also: [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult)
|
|
9178
9275
|
|
|
9179
9276
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
9180
9277
|
|
|
@@ -9193,10 +9290,10 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
9193
9290
|
##### Type: PostBeefService
|
|
9194
9291
|
|
|
9195
9292
|
```ts
|
|
9196
|
-
export type PostBeefService = (beef: Beef, txids: string[]
|
|
9293
|
+
export type PostBeefService = (beef: Beef, txids: string[]) => Promise<PostBeefResult>
|
|
9197
9294
|
```
|
|
9198
9295
|
|
|
9199
|
-
See also: [PostBeefResult](./client.md#interface-postbeefresult)
|
|
9296
|
+
See also: [PostBeefResult](./client.md#interface-postbeefresult)
|
|
9200
9297
|
|
|
9201
9298
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
9202
9299
|
|
|
@@ -9324,6 +9421,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
9324
9421
|
| [ProvenTxReqNonTerminalStatus](#variable-proventxreqnonterminalstatus) |
|
|
9325
9422
|
| [ProvenTxReqTerminalStatus](#variable-proventxreqterminalstatus) |
|
|
9326
9423
|
| [brc29ProtocolID](#variable-brc29protocolid) |
|
|
9424
|
+
| [maxPossibleSatoshis](#variable-maxpossiblesatoshis) |
|
|
9327
9425
|
| [outputColumnsWithoutLockingScript](#variable-outputcolumnswithoutlockingscript) |
|
|
9328
9426
|
| [transactionColumnsWithoutRawTx](#variable-transactioncolumnswithoutrawtx) |
|
|
9329
9427
|
|
|
@@ -9375,6 +9473,15 @@ brc29ProtocolID: WalletProtocol = [2, "3241645161d8"]
|
|
|
9375
9473
|
|
|
9376
9474
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
9377
9475
|
|
|
9476
|
+
---
|
|
9477
|
+
##### Variable: maxPossibleSatoshis
|
|
9478
|
+
|
|
9479
|
+
```ts
|
|
9480
|
+
maxPossibleSatoshis = 2099999999999999
|
|
9481
|
+
```
|
|
9482
|
+
|
|
9483
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
9484
|
+
|
|
9378
9485
|
---
|
|
9379
9486
|
##### Variable: outputColumnsWithoutLockingScript
|
|
9380
9487
|
|