@bsv/wallet-toolbox 1.3.8 → 1.3.9
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 +1360 -133
- package/docs/storage.md +14 -10
- package/docs/wallet.md +1346 -119
- package/out/src/Wallet.js.map +1 -1
- package/out/src/index.client.d.ts +2 -0
- package/out/src/index.client.d.ts.map +1 -1
- package/out/src/index.client.js +2 -0
- package/out/src/index.client.js.map +1 -1
- package/out/src/sdk/WalletStorage.interfaces.d.ts +14 -0
- package/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -1
- package/out/src/storage/StorageIdb.d.ts +5 -1
- package/out/src/storage/StorageIdb.d.ts.map +1 -1
- package/out/src/storage/StorageIdb.js +7 -3
- package/out/src/storage/StorageIdb.js.map +1 -1
- package/out/src/storage/WalletStorageManager.d.ts +1 -0
- package/out/src/storage/WalletStorageManager.d.ts.map +1 -1
- package/out/src/storage/WalletStorageManager.js +40 -0
- package/out/src/storage/WalletStorageManager.js.map +1 -1
- package/out/src/storage/__test/adminStats.man.test.js.map +1 -1
- package/out/src/storage/index.all.d.ts +1 -0
- package/out/src/storage/index.all.d.ts.map +1 -1
- package/out/src/storage/index.all.js +1 -0
- package/out/src/storage/index.all.js.map +1 -1
- package/out/src/storage/index.client.d.ts +1 -0
- package/out/src/storage/index.client.d.ts.map +1 -1
- package/out/src/storage/index.client.js +1 -0
- package/out/src/storage/index.client.js.map +1 -1
- package/out/test/Wallet/local/localWallet2.man.test.js +58 -38
- package/out/test/Wallet/local/localWallet2.man.test.js.map +1 -1
- package/out/test/Wallet/support/operations.man.test.js +5 -3
- package/out/test/Wallet/support/operations.man.test.js.map +1 -1
- package/out/test/utils/localWalletMethods.d.ts +7 -2
- package/out/test/utils/localWalletMethods.d.ts.map +1 -1
- package/out/test/utils/localWalletMethods.js +19 -0
- package/out/test/utils/localWalletMethods.js.map +1 -1
- package/out/tsconfig.all.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/Wallet.ts +2 -2
- package/src/index.client.ts +2 -0
- package/src/sdk/WalletStorage.interfaces.ts +16 -0
- package/src/storage/StorageIdb.ts +8 -4
- package/src/storage/WalletStorageManager.ts +41 -0
- package/src/storage/__test/adminStats.man.test.ts +8 -8
- package/src/storage/index.all.ts +1 -0
- package/src/storage/index.client.ts +1 -0
- package/test/Wallet/local/localWallet2.man.test.ts +66 -42
- package/test/Wallet/support/operations.man.test.ts +5 -3
- package/test/utils/localWalletMethods.ts +34 -2
package/docs/client.md
CHANGED
|
@@ -14,65 +14,69 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
14
14
|
|
|
15
15
|
| | | |
|
|
16
16
|
| --- | --- | --- |
|
|
17
|
-
| [ArcConfig](#interface-arcconfig) | [
|
|
18
|
-
| [ArcMinerGetTxData](#interface-arcminergettxdata) | [
|
|
19
|
-
| [AuthId](#interface-authid) | [
|
|
20
|
-
| [AuthPayload](#interface-authpayload) | [
|
|
21
|
-
| [BaseBlockHeader](#interface-baseblockheader) | [
|
|
22
|
-
| [BaseBlockHeader](#interface-baseblockheader) | [
|
|
23
|
-
| [BitailsConfig](#interface-bitailsconfig) | [
|
|
24
|
-
| [BitailsMerkleProof](#interface-bitailsmerkleproof) | [
|
|
25
|
-
| [BlockHeader](#interface-blockheader) | [
|
|
26
|
-
| [BlockHeader](#interface-blockheader) | [
|
|
27
|
-
| [BsvExchangeRate](#interface-bsvexchangerate) | [
|
|
28
|
-
| [CertOpsWallet](#interface-certopswallet) | [
|
|
29
|
-
| [Certifier](#interface-certifier) | [
|
|
30
|
-
| [CommitNewTxResults](#interface-commitnewtxresults) | [
|
|
31
|
-
| [CompleteAuthResponse](#interface-completeauthresponse) | [
|
|
32
|
-
| [CreateActionResultX](#interface-createactionresultx) | [
|
|
33
|
-
| [EntitySyncMap](#interface-entitysyncmap) | [
|
|
34
|
-
| [EntityTimeStamp](#interface-entitytimestamp) | [
|
|
35
|
-
| [ExchangeRatesIoApi](#interface-exchangeratesioapi) | [
|
|
36
|
-
| [ExtendedVerifiableCertificate](#interface-extendedverifiablecertificate) | [
|
|
37
|
-
| [FiatExchangeRates](#interface-fiatexchangerates) | [
|
|
38
|
-
| [FindCertificateFieldsArgs](#interface-findcertificatefieldsargs) | [
|
|
39
|
-
| [FindCertificatesArgs](#interface-findcertificatesargs) | [
|
|
40
|
-
| [FindCommissionsArgs](#interface-findcommissionsargs) | [
|
|
41
|
-
| [FindForUserSincePagedArgs](#interface-findforusersincepagedargs) | [
|
|
42
|
-
| [FindMonitorEventsArgs](#interface-findmonitoreventsargs) | [
|
|
43
|
-
| [FindOutputBasketsArgs](#interface-findoutputbasketsargs) | [
|
|
44
|
-
| [FindOutputTagMapsArgs](#interface-findoutputtagmapsargs) | [
|
|
45
|
-
| [FindOutputTagsArgs](#interface-findoutputtagsargs) | [
|
|
46
|
-
| [FindOutputsArgs](#interface-findoutputsargs) | [
|
|
47
|
-
| [FindPartialSincePagedArgs](#interface-findpartialsincepagedargs) | [
|
|
48
|
-
| [FindProvenTxReqsArgs](#interface-findproventxreqsargs) | [
|
|
49
|
-
| [FindProvenTxsArgs](#interface-findproventxsargs) | [
|
|
50
|
-
| [FindSincePagedArgs](#interface-findsincepagedargs) | [
|
|
51
|
-
| [FindSyncStatesArgs](#interface-findsyncstatesargs) | [
|
|
52
|
-
| [FindTransactionsArgs](#interface-findtransactionsargs) | [
|
|
53
|
-
| [FindTxLabelMapsArgs](#interface-findtxlabelmapsargs) | [
|
|
54
|
-
| [FindTxLabelsArgs](#interface-findtxlabelsargs) | [
|
|
55
|
-
| [FindUsersArgs](#interface-findusersargs) | [
|
|
56
|
-
| [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput) | [
|
|
57
|
-
| [GenerateChangeSdkChangeOutput](#interface-generatechangesdkchangeoutput) | [
|
|
58
|
-
| [GenerateChangeSdkInput](#interface-generatechangesdkinput) | [
|
|
59
|
-
| [GenerateChangeSdkOutput](#interface-generatechangesdkoutput) | [
|
|
60
|
-
| [GenerateChangeSdkParams](#interface-generatechangesdkparams) | [
|
|
61
|
-
| [GenerateChangeSdkResult](#interface-generatechangesdkresult) | [
|
|
62
|
-
| [GenerateChangeSdkStorageChange](#interface-generatechangesdkstoragechange) | [
|
|
63
|
-
| [GetMerklePathResult](#interface-getmerklepathresult) | [
|
|
64
|
-
| [GetRawTxResult](#interface-getrawtxresult) | [
|
|
65
|
-
| [GetReqsAndBeefDetail](#interface-getreqsandbeefdetail) | [
|
|
66
|
-
| [GetReqsAndBeefResult](#interface-getreqsandbeefresult) | [
|
|
67
|
-
| [GetScriptHashHistory](#interface-getscripthashhistory) | [
|
|
68
|
-
| [GetScriptHashHistoryResult](#interface-getscripthashhistoryresult) | [
|
|
69
|
-
| [GetStatusForTxidsResult](#interface-getstatusfortxidsresult) | [
|
|
70
|
-
| [GetUtxoStatusDetails](#interface-getutxostatusdetails) | [
|
|
71
|
-
| [GetUtxoStatusResult](#interface-getutxostatusresult) | [
|
|
72
|
-
| [KeyPair](#interface-keypair) | [
|
|
73
|
-
| [
|
|
74
|
-
| [
|
|
75
|
-
| [
|
|
17
|
+
| [ArcConfig](#interface-arcconfig) | [PendingSignAction](#interface-pendingsignaction) | [TableOutputX](#interface-tableoutputx) |
|
|
18
|
+
| [ArcMinerGetTxData](#interface-arcminergettxdata) | [PendingStorageInput](#interface-pendingstorageinput) | [TableProvenTx](#interface-tableproventx) |
|
|
19
|
+
| [AuthId](#interface-authid) | [PermissionRequest](#interface-permissionrequest) | [TableProvenTxReq](#interface-tableproventxreq) |
|
|
20
|
+
| [AuthPayload](#interface-authpayload) | [PermissionToken](#interface-permissiontoken) | [TableProvenTxReqDynamics](#interface-tableproventxreqdynamics) |
|
|
21
|
+
| [BaseBlockHeader](#interface-baseblockheader) | [PermissionsManagerConfig](#interface-permissionsmanagerconfig) | [TableSettings](#interface-tablesettings) |
|
|
22
|
+
| [BaseBlockHeader](#interface-baseblockheader) | [PostBeefResult](#interface-postbeefresult) | [TableSyncState](#interface-tablesyncstate) |
|
|
23
|
+
| [BitailsConfig](#interface-bitailsconfig) | [PostBeefResultForTxidApi](#interface-postbeefresultfortxidapi) | [TableTransaction](#interface-tabletransaction) |
|
|
24
|
+
| [BitailsMerkleProof](#interface-bitailsmerkleproof) | [PostReqsToNetworkDetails](#interface-postreqstonetworkdetails) | [TableTxLabel](#interface-tabletxlabel) |
|
|
25
|
+
| [BlockHeader](#interface-blockheader) | [PostReqsToNetworkResult](#interface-postreqstonetworkresult) | [TableTxLabelMap](#interface-tabletxlabelmap) |
|
|
26
|
+
| [BlockHeader](#interface-blockheader) | [PostTxResultForTxid](#interface-posttxresultfortxid) | [TableUser](#interface-tableuser) |
|
|
27
|
+
| [BsvExchangeRate](#interface-bsvexchangerate) | [PostTxResultForTxidError](#interface-posttxresultfortxiderror) | [TaskPurgeParams](#interface-taskpurgeparams) |
|
|
28
|
+
| [CertOpsWallet](#interface-certopswallet) | [PostTxsResult](#interface-posttxsresult) | [TrustSettings](#interface-trustsettings) |
|
|
29
|
+
| [Certifier](#interface-certifier) | [ProcessSyncChunkResult](#interface-processsyncchunkresult) | [TrxToken](#interface-trxtoken) |
|
|
30
|
+
| [CommitNewTxResults](#interface-commitnewtxresults) | [Profile](#interface-profile) | [TscMerkleProofApi](#interface-tscmerkleproofapi) |
|
|
31
|
+
| [CompleteAuthResponse](#interface-completeauthresponse) | [ProvenOrRawTx](#interface-provenorrawtx) | [TxScriptOffsets](#interface-txscriptoffsets) |
|
|
32
|
+
| [CreateActionResultX](#interface-createactionresultx) | [ProvenTxFromTxidResult](#interface-proventxfromtxidresult) | [UMPToken](#interface-umptoken) |
|
|
33
|
+
| [EntitySyncMap](#interface-entitysyncmap) | [ProvenTxReqHistory](#interface-proventxreqhistory) | [UMPTokenInteractor](#interface-umptokeninteractor) |
|
|
34
|
+
| [EntityTimeStamp](#interface-entitytimestamp) | [ProvenTxReqHistorySummaryApi](#interface-proventxreqhistorysummaryapi) | [UpdateProvenTxReqWithNewProvenTxArgs](#interface-updateproventxreqwithnewproventxargs) |
|
|
35
|
+
| [ExchangeRatesIoApi](#interface-exchangeratesioapi) | [ProvenTxReqNotify](#interface-proventxreqnotify) | [UpdateProvenTxReqWithNewProvenTxResult](#interface-updateproventxreqwithnewproventxresult) |
|
|
36
|
+
| [ExtendedVerifiableCertificate](#interface-extendedverifiablecertificate) | [PurgeParams](#interface-purgeparams) | [ValidAbortActionArgs](#interface-validabortactionargs) |
|
|
37
|
+
| [FiatExchangeRates](#interface-fiatexchangerates) | [PurgeResults](#interface-purgeresults) | [ValidAcquireCertificateArgs](#interface-validacquirecertificateargs) |
|
|
38
|
+
| [FindCertificateFieldsArgs](#interface-findcertificatefieldsargs) | [RequestSyncChunkArgs](#interface-requestsyncchunkargs) | [ValidAcquireDirectCertificateArgs](#interface-validacquiredirectcertificateargs) |
|
|
39
|
+
| [FindCertificatesArgs](#interface-findcertificatesargs) | [ReviewActionResult](#interface-reviewactionresult) | [ValidAcquireIssuanceCertificateArgs](#interface-validacquireissuancecertificateargs) |
|
|
40
|
+
| [FindCommissionsArgs](#interface-findcommissionsargs) | [ScriptTemplateParamsBRC29](#interface-scripttemplateparamsbrc29) | [ValidBasketInsertion](#interface-validbasketinsertion) |
|
|
41
|
+
| [FindForUserSincePagedArgs](#interface-findforusersincepagedargs) | [ScriptTemplateUnlock](#interface-scripttemplateunlock) | [ValidCreateActionArgs](#interface-validcreateactionargs) |
|
|
42
|
+
| [FindMonitorEventsArgs](#interface-findmonitoreventsargs) | [SetupClientWalletArgs](#interface-setupclientwalletargs) | [ValidCreateActionInput](#interface-validcreateactioninput) |
|
|
43
|
+
| [FindOutputBasketsArgs](#interface-findoutputbasketsargs) | [SetupClientWalletClientArgs](#interface-setupclientwalletclientargs) | [ValidCreateActionOptions](#interface-validcreateactionoptions) |
|
|
44
|
+
| [FindOutputTagMapsArgs](#interface-findoutputtagmapsargs) | [SetupWallet](#interface-setupwallet) | [ValidCreateActionOutput](#interface-validcreateactionoutput) |
|
|
45
|
+
| [FindOutputTagsArgs](#interface-findoutputtagsargs) | [SetupWalletClient](#interface-setupwalletclient) | [ValidDiscoverByAttributesArgs](#interface-validdiscoverbyattributesargs) |
|
|
46
|
+
| [FindOutputsArgs](#interface-findoutputsargs) | [SetupWalletIdb](#interface-setupwalletidb) | [ValidDiscoverByIdentityKeyArgs](#interface-validdiscoverbyidentitykeyargs) |
|
|
47
|
+
| [FindPartialSincePagedArgs](#interface-findpartialsincepagedargs) | [SetupWalletIdbArgs](#interface-setupwalletidbargs) | [ValidInternalizeActionArgs](#interface-validinternalizeactionargs) |
|
|
48
|
+
| [FindProvenTxReqsArgs](#interface-findproventxreqsargs) | [SignActionResultX](#interface-signactionresultx) | [ValidInternalizeOutput](#interface-validinternalizeoutput) |
|
|
49
|
+
| [FindProvenTxsArgs](#interface-findproventxsargs) | [StartAuthResponse](#interface-startauthresponse) | [ValidListActionsArgs](#interface-validlistactionsargs) |
|
|
50
|
+
| [FindSincePagedArgs](#interface-findsincepagedargs) | [StatusForTxidResult](#interface-statusfortxidresult) | [ValidListCertificatesArgs](#interface-validlistcertificatesargs) |
|
|
51
|
+
| [FindSyncStatesArgs](#interface-findsyncstatesargs) | [StorageAdminStats](#interface-storageadminstats) | [ValidListOutputsArgs](#interface-validlistoutputsargs) |
|
|
52
|
+
| [FindTransactionsArgs](#interface-findtransactionsargs) | [StorageCreateActionResult](#interface-storagecreateactionresult) | [ValidProcessActionArgs](#interface-validprocessactionargs) |
|
|
53
|
+
| [FindTxLabelMapsArgs](#interface-findtxlabelmapsargs) | [StorageCreateTransactionSdkInput](#interface-storagecreatetransactionsdkinput) | [ValidProcessActionOptions](#interface-validprocessactionoptions) |
|
|
54
|
+
| [FindTxLabelsArgs](#interface-findtxlabelsargs) | [StorageCreateTransactionSdkOutput](#interface-storagecreatetransactionsdkoutput) | [ValidProveCertificateArgs](#interface-validprovecertificateargs) |
|
|
55
|
+
| [FindUsersArgs](#interface-findusersargs) | [StorageFeeModel](#interface-storagefeemodel) | [ValidRelinquishCertificateArgs](#interface-validrelinquishcertificateargs) |
|
|
56
|
+
| [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput) | [StorageGetBeefOptions](#interface-storagegetbeefoptions) | [ValidRelinquishOutputArgs](#interface-validrelinquishoutputargs) |
|
|
57
|
+
| [GenerateChangeSdkChangeOutput](#interface-generatechangesdkchangeoutput) | [StorageIdbOptions](#interface-storageidboptions) | [ValidSignActionArgs](#interface-validsignactionargs) |
|
|
58
|
+
| [GenerateChangeSdkInput](#interface-generatechangesdkinput) | [StorageIdbSchema](#interface-storageidbschema) | [ValidSignActionOptions](#interface-validsignactionoptions) |
|
|
59
|
+
| [GenerateChangeSdkOutput](#interface-generatechangesdkoutput) | [StorageIdentity](#interface-storageidentity) | [ValidWalletPayment](#interface-validwalletpayment) |
|
|
60
|
+
| [GenerateChangeSdkParams](#interface-generatechangesdkparams) | [StorageInternalizeActionResult](#interface-storageinternalizeactionresult) | [ValidWalletSignerArgs](#interface-validwalletsignerargs) |
|
|
61
|
+
| [GenerateChangeSdkResult](#interface-generatechangesdkresult) | [StorageProcessActionArgs](#interface-storageprocessactionargs) | [ValidateGenerateChangeSdkParamsResult](#interface-validategeneratechangesdkparamsresult) |
|
|
62
|
+
| [GenerateChangeSdkStorageChange](#interface-generatechangesdkstoragechange) | [StorageProcessActionResults](#interface-storageprocessactionresults) | [WalletArgs](#interface-walletargs) |
|
|
63
|
+
| [GetMerklePathResult](#interface-getmerklepathresult) | [StorageProvenOrReq](#interface-storageprovenorreq) | [WalletBalance](#interface-walletbalance) |
|
|
64
|
+
| [GetRawTxResult](#interface-getrawtxresult) | [StorageProviderOptions](#interface-storageprovideroptions) | [WalletPermissionsManagerCallbacks](#interface-walletpermissionsmanagercallbacks) |
|
|
65
|
+
| [GetReqsAndBeefDetail](#interface-getreqsandbeefdetail) | [StorageReaderOptions](#interface-storagereaderoptions) | [WalletServices](#interface-walletservices) |
|
|
66
|
+
| [GetReqsAndBeefResult](#interface-getreqsandbeefresult) | [StorageReaderWriterOptions](#interface-storagereaderwriteroptions) | [WalletServicesOptions](#interface-walletservicesoptions) |
|
|
67
|
+
| [GetScriptHashHistory](#interface-getscripthashhistory) | [StorageSyncReaderOptions](#interface-storagesyncreaderoptions) | [WalletSettings](#interface-walletsettings) |
|
|
68
|
+
| [GetScriptHashHistoryResult](#interface-getscripthashhistoryresult) | [SyncChunk](#interface-syncchunk) | [WalletSettingsManagerConfig](#interface-walletsettingsmanagerconfig) |
|
|
69
|
+
| [GetStatusForTxidsResult](#interface-getstatusfortxidsresult) | [SyncError](#interface-syncerror) | [WalletSigner](#interface-walletsigner) |
|
|
70
|
+
| [GetUtxoStatusDetails](#interface-getutxostatusdetails) | [SyncMap](#interface-syncmap) | [WalletStorage](#interface-walletstorage) |
|
|
71
|
+
| [GetUtxoStatusResult](#interface-getutxostatusresult) | [TableCertificate](#interface-tablecertificate) | [WalletStorageInfo](#interface-walletstorageinfo) |
|
|
72
|
+
| [KeyPair](#interface-keypair) | [TableCertificateField](#interface-tablecertificatefield) | [WalletStorageProvider](#interface-walletstorageprovider) |
|
|
73
|
+
| [KeyPairAddress](#interface-keypairaddress) | [TableCertificateX](#interface-tablecertificatex) | [WalletStorageReader](#interface-walletstoragereader) |
|
|
74
|
+
| [ListActionsSpecOp](#interface-listactionsspecop) | [TableCommission](#interface-tablecommission) | [WalletStorageSync](#interface-walletstoragesync) |
|
|
75
|
+
| [ListOutputsSpecOp](#interface-listoutputsspecop) | [TableMonitorEvent](#interface-tablemonitorevent) | [WalletStorageSyncReader](#interface-walletstoragesyncreader) |
|
|
76
|
+
| [LiveBlockHeader](#interface-liveblockheader) | [TableOutput](#interface-tableoutput) | [WalletStorageWriter](#interface-walletstoragewriter) |
|
|
77
|
+
| [MonitorOptions](#interface-monitoroptions) | [TableOutputBasket](#interface-tableoutputbasket) | [WalletTheme](#interface-wallettheme) |
|
|
78
|
+
| [OutPoint](#interface-outpoint) | [TableOutputTag](#interface-tableoutputtag) | [XValidCreateActionOutput](#interface-xvalidcreateactionoutput) |
|
|
79
|
+
| [Paged](#interface-paged) | [TableOutputTagMap](#interface-tableoutputtagmap) | |
|
|
76
80
|
|
|
77
81
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
78
82
|
|
|
@@ -1370,6 +1374,85 @@ export interface KeyPair {
|
|
|
1370
1374
|
|
|
1371
1375
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1372
1376
|
|
|
1377
|
+
---
|
|
1378
|
+
##### Interface: KeyPairAddress
|
|
1379
|
+
|
|
1380
|
+
```ts
|
|
1381
|
+
export interface KeyPairAddress {
|
|
1382
|
+
privateKey: PrivateKey;
|
|
1383
|
+
publicKey: PublicKey;
|
|
1384
|
+
address: string;
|
|
1385
|
+
}
|
|
1386
|
+
```
|
|
1387
|
+
|
|
1388
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1389
|
+
|
|
1390
|
+
---
|
|
1391
|
+
##### Interface: ListActionsSpecOp
|
|
1392
|
+
|
|
1393
|
+
```ts
|
|
1394
|
+
export interface ListActionsSpecOp {
|
|
1395
|
+
name: string;
|
|
1396
|
+
labelsToIntercept?: string[];
|
|
1397
|
+
setStatusFilter?: () => sdk.TransactionStatus[];
|
|
1398
|
+
postProcess?: (s: StorageProvider, auth: sdk.AuthId, vargs: sdk.ValidListActionsArgs, specOpLabels: string[], txs: Partial<TableTransaction>[]) => Promise<void>;
|
|
1399
|
+
}
|
|
1400
|
+
```
|
|
1401
|
+
|
|
1402
|
+
See also: [AuthId](./client.md#interface-authid), [StorageProvider](./storage.md#class-storageprovider), [TableTransaction](./storage.md#interface-tabletransaction), [TransactionStatus](./client.md#type-transactionstatus), [ValidListActionsArgs](./client.md#interface-validlistactionsargs)
|
|
1403
|
+
|
|
1404
|
+
###### Property labelsToIntercept
|
|
1405
|
+
|
|
1406
|
+
undefined to intercept no labels from vargs,
|
|
1407
|
+
empty array to intercept all labels,
|
|
1408
|
+
or an explicit array of labels to intercept.
|
|
1409
|
+
|
|
1410
|
+
```ts
|
|
1411
|
+
labelsToIntercept?: string[]
|
|
1412
|
+
```
|
|
1413
|
+
|
|
1414
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1415
|
+
|
|
1416
|
+
---
|
|
1417
|
+
##### Interface: ListOutputsSpecOp
|
|
1418
|
+
|
|
1419
|
+
```ts
|
|
1420
|
+
export interface ListOutputsSpecOp {
|
|
1421
|
+
name: string;
|
|
1422
|
+
useBasket?: string;
|
|
1423
|
+
ignoreLimit?: boolean;
|
|
1424
|
+
includeOutputScripts?: boolean;
|
|
1425
|
+
includeSpent?: boolean;
|
|
1426
|
+
resultFromTags?: (s: StorageProvider, auth: sdk.AuthId, vargs: ValidListOutputsArgs, specOpTags: string[]) => Promise<ListOutputsResult>;
|
|
1427
|
+
resultFromOutputs?: (s: StorageProvider, auth: sdk.AuthId, vargs: ValidListOutputsArgs, specOpTags: string[], outputs: TableOutput[]) => Promise<ListOutputsResult>;
|
|
1428
|
+
filterOutputs?: (s: StorageProvider, auth: sdk.AuthId, vargs: ValidListOutputsArgs, specOpTags: string[], outputs: TableOutput[]) => Promise<TableOutput[]>;
|
|
1429
|
+
tagsToIntercept?: string[];
|
|
1430
|
+
tagsParamsCount?: number;
|
|
1431
|
+
}
|
|
1432
|
+
```
|
|
1433
|
+
|
|
1434
|
+
See also: [AuthId](./client.md#interface-authid), [StorageProvider](./storage.md#class-storageprovider), [TableOutput](./storage.md#interface-tableoutput), [ValidListOutputsArgs](./client.md#interface-validlistoutputsargs)
|
|
1435
|
+
|
|
1436
|
+
###### Property tagsParamsCount
|
|
1437
|
+
|
|
1438
|
+
How many positional tags to intercept.
|
|
1439
|
+
|
|
1440
|
+
```ts
|
|
1441
|
+
tagsParamsCount?: number
|
|
1442
|
+
```
|
|
1443
|
+
|
|
1444
|
+
###### Property tagsToIntercept
|
|
1445
|
+
|
|
1446
|
+
undefined to intercept no tags from vargs,
|
|
1447
|
+
empty array to intercept all tags,
|
|
1448
|
+
or an explicit array of tags to intercept.
|
|
1449
|
+
|
|
1450
|
+
```ts
|
|
1451
|
+
tagsToIntercept?: string[]
|
|
1452
|
+
```
|
|
1453
|
+
|
|
1454
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1455
|
+
|
|
1373
1456
|
---
|
|
1374
1457
|
##### Interface: LiveBlockHeader
|
|
1375
1458
|
|
|
@@ -2517,6 +2600,254 @@ export interface ScriptTemplateUnlock {
|
|
|
2517
2600
|
|
|
2518
2601
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2519
2602
|
|
|
2603
|
+
---
|
|
2604
|
+
##### Interface: SetupClientWalletArgs
|
|
2605
|
+
|
|
2606
|
+
Arguments used by `createWallet` to construct a `SetupWallet`.
|
|
2607
|
+
|
|
2608
|
+
Extension `SetupWalletClientArgs` used by `createWalletClient` to construct a `SetupWalletClient`.
|
|
2609
|
+
|
|
2610
|
+
Extension `SetupWalletIdbArgs` used by `createWalletIdb` to construct a `SetupWalletIdb`.
|
|
2611
|
+
|
|
2612
|
+
```ts
|
|
2613
|
+
export interface SetupClientWalletArgs {
|
|
2614
|
+
chain: sdk.Chain;
|
|
2615
|
+
rootKeyHex: string;
|
|
2616
|
+
privilegedKeyGetter?: () => Promise<PrivateKey>;
|
|
2617
|
+
active?: sdk.WalletStorageProvider;
|
|
2618
|
+
backups?: sdk.WalletStorageProvider[];
|
|
2619
|
+
taalApiKey?: string;
|
|
2620
|
+
}
|
|
2621
|
+
```
|
|
2622
|
+
|
|
2623
|
+
See also: [Chain](./client.md#type-chain), [WalletStorageProvider](./client.md#interface-walletstorageprovider)
|
|
2624
|
+
|
|
2625
|
+
###### Property active
|
|
2626
|
+
|
|
2627
|
+
Optional. Active wallet storage. Can be added later.
|
|
2628
|
+
|
|
2629
|
+
```ts
|
|
2630
|
+
active?: sdk.WalletStorageProvider
|
|
2631
|
+
```
|
|
2632
|
+
See also: [WalletStorageProvider](./client.md#interface-walletstorageprovider)
|
|
2633
|
+
|
|
2634
|
+
###### Property backups
|
|
2635
|
+
|
|
2636
|
+
Optional. One or more storage providers managed as backup destinations. Can be added later.
|
|
2637
|
+
|
|
2638
|
+
```ts
|
|
2639
|
+
backups?: sdk.WalletStorageProvider[]
|
|
2640
|
+
```
|
|
2641
|
+
See also: [WalletStorageProvider](./client.md#interface-walletstorageprovider)
|
|
2642
|
+
|
|
2643
|
+
###### Property privilegedKeyGetter
|
|
2644
|
+
|
|
2645
|
+
Optional. The privileged private key getter used to initialize the `PrivilegedKeyManager`.
|
|
2646
|
+
Defaults to undefined.
|
|
2647
|
+
|
|
2648
|
+
```ts
|
|
2649
|
+
privilegedKeyGetter?: () => Promise<PrivateKey>
|
|
2650
|
+
```
|
|
2651
|
+
|
|
2652
|
+
###### Property rootKeyHex
|
|
2653
|
+
|
|
2654
|
+
The non-privileged private key used to initialize the `KeyDeriver` and determine the `identityKey`.
|
|
2655
|
+
|
|
2656
|
+
```ts
|
|
2657
|
+
rootKeyHex: string
|
|
2658
|
+
```
|
|
2659
|
+
|
|
2660
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2661
|
+
|
|
2662
|
+
---
|
|
2663
|
+
##### Interface: SetupClientWalletClientArgs
|
|
2664
|
+
|
|
2665
|
+
Extension `SetupWalletClientArgs` of `SetupWalletArgs` is used by `createWalletClient`
|
|
2666
|
+
to construct a `SetupWalletClient`.
|
|
2667
|
+
|
|
2668
|
+
```ts
|
|
2669
|
+
export interface SetupClientWalletClientArgs extends SetupClientWalletArgs {
|
|
2670
|
+
endpointUrl?: string;
|
|
2671
|
+
}
|
|
2672
|
+
```
|
|
2673
|
+
|
|
2674
|
+
See also: [SetupClientWalletArgs](./setup.md#interface-setupclientwalletargs)
|
|
2675
|
+
|
|
2676
|
+
###### Property endpointUrl
|
|
2677
|
+
|
|
2678
|
+
The endpoint URL of a service hosting the `StorageServer` JSON-RPC service to
|
|
2679
|
+
which a `StorageClient` instance should connect to function as
|
|
2680
|
+
the active storage provider of the newly created wallet.
|
|
2681
|
+
|
|
2682
|
+
```ts
|
|
2683
|
+
endpointUrl?: string
|
|
2684
|
+
```
|
|
2685
|
+
|
|
2686
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2687
|
+
|
|
2688
|
+
---
|
|
2689
|
+
##### Interface: SetupWallet
|
|
2690
|
+
|
|
2691
|
+
When creating a BRC-100 compatible `Wallet`, many components come into play.
|
|
2692
|
+
|
|
2693
|
+
All of the `createWallet` functions in the `Setup` and `SetupClient` classes return
|
|
2694
|
+
an object with direct access to each component to facilitate experimentation, testing
|
|
2695
|
+
and customization.
|
|
2696
|
+
|
|
2697
|
+
```ts
|
|
2698
|
+
export interface SetupWallet {
|
|
2699
|
+
rootKey: PrivateKey;
|
|
2700
|
+
identityKey: string;
|
|
2701
|
+
keyDeriver: KeyDeriver;
|
|
2702
|
+
chain: sdk.Chain;
|
|
2703
|
+
storage: WalletStorageManager;
|
|
2704
|
+
services: Services;
|
|
2705
|
+
monitor: Monitor;
|
|
2706
|
+
wallet: Wallet;
|
|
2707
|
+
}
|
|
2708
|
+
```
|
|
2709
|
+
|
|
2710
|
+
See also: [Chain](./client.md#type-chain), [Monitor](./monitor.md#class-monitor), [Services](./services.md#class-services), [Wallet](./client.md#class-wallet), [WalletStorageManager](./storage.md#class-walletstoragemanager)
|
|
2711
|
+
|
|
2712
|
+
###### Property chain
|
|
2713
|
+
|
|
2714
|
+
The chain ('main' or 'test') which the wallet accesses.
|
|
2715
|
+
|
|
2716
|
+
```ts
|
|
2717
|
+
chain: sdk.Chain
|
|
2718
|
+
```
|
|
2719
|
+
See also: [Chain](./client.md#type-chain)
|
|
2720
|
+
|
|
2721
|
+
###### Property identityKey
|
|
2722
|
+
|
|
2723
|
+
The pubilc key associated with the `rootKey` which also serves as the wallet's identity.
|
|
2724
|
+
|
|
2725
|
+
```ts
|
|
2726
|
+
identityKey: string
|
|
2727
|
+
```
|
|
2728
|
+
|
|
2729
|
+
###### Property keyDeriver
|
|
2730
|
+
|
|
2731
|
+
The `KeyDeriver` component used by the wallet for key derivation and cryptographic functions.
|
|
2732
|
+
|
|
2733
|
+
```ts
|
|
2734
|
+
keyDeriver: KeyDeriver
|
|
2735
|
+
```
|
|
2736
|
+
|
|
2737
|
+
###### Property monitor
|
|
2738
|
+
|
|
2739
|
+
The background task `Monitor` component available to the wallet to offload tasks
|
|
2740
|
+
that speed up wallet operations and maintain data integrity.
|
|
2741
|
+
|
|
2742
|
+
```ts
|
|
2743
|
+
monitor: Monitor
|
|
2744
|
+
```
|
|
2745
|
+
See also: [Monitor](./monitor.md#class-monitor)
|
|
2746
|
+
|
|
2747
|
+
###### Property rootKey
|
|
2748
|
+
|
|
2749
|
+
The rootKey of the `KeyDeriver`. The private key from which other keys are derived.
|
|
2750
|
+
|
|
2751
|
+
```ts
|
|
2752
|
+
rootKey: PrivateKey
|
|
2753
|
+
```
|
|
2754
|
+
|
|
2755
|
+
###### Property services
|
|
2756
|
+
|
|
2757
|
+
The network `Services` component which provides the wallet with access to external services hosted
|
|
2758
|
+
on the public network.
|
|
2759
|
+
|
|
2760
|
+
```ts
|
|
2761
|
+
services: Services
|
|
2762
|
+
```
|
|
2763
|
+
See also: [Services](./services.md#class-services)
|
|
2764
|
+
|
|
2765
|
+
###### Property storage
|
|
2766
|
+
|
|
2767
|
+
The `WalletStorageManager` that manages all the configured storage providers (active and backups)
|
|
2768
|
+
accessed by the wallet.
|
|
2769
|
+
|
|
2770
|
+
```ts
|
|
2771
|
+
storage: WalletStorageManager
|
|
2772
|
+
```
|
|
2773
|
+
See also: [WalletStorageManager](./storage.md#class-walletstoragemanager)
|
|
2774
|
+
|
|
2775
|
+
###### Property wallet
|
|
2776
|
+
|
|
2777
|
+
The actual BRC-100 `Wallet` to which all the other properties and components contribute.
|
|
2778
|
+
|
|
2779
|
+
Note that internally, the wallet is itself linked to all these properties and components.
|
|
2780
|
+
They are included in this interface to facilitate access after wallet construction for
|
|
2781
|
+
experimentation, testing and customization. Any changes made to the configuration of these
|
|
2782
|
+
components after construction may disrupt the normal operation of the wallet.
|
|
2783
|
+
|
|
2784
|
+
```ts
|
|
2785
|
+
wallet: Wallet
|
|
2786
|
+
```
|
|
2787
|
+
See also: [Wallet](./client.md#class-wallet)
|
|
2788
|
+
|
|
2789
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2790
|
+
|
|
2791
|
+
---
|
|
2792
|
+
##### Interface: SetupWalletClient
|
|
2793
|
+
|
|
2794
|
+
Extension `SetupWalletClient` of `SetupWallet` is returned by `createWalletClient`
|
|
2795
|
+
|
|
2796
|
+
```ts
|
|
2797
|
+
export interface SetupWalletClient extends SetupWallet {
|
|
2798
|
+
endpointUrl: string;
|
|
2799
|
+
}
|
|
2800
|
+
```
|
|
2801
|
+
|
|
2802
|
+
See also: [SetupWallet](./setup.md#interface-setupwallet)
|
|
2803
|
+
|
|
2804
|
+
###### Property endpointUrl
|
|
2805
|
+
|
|
2806
|
+
The endpoint URL of the service hosting the `StorageServer` JSON-RPC service to
|
|
2807
|
+
which a `StorageClient` instance is connected to function as
|
|
2808
|
+
the active storage provider of the wallet.
|
|
2809
|
+
|
|
2810
|
+
```ts
|
|
2811
|
+
endpointUrl: string
|
|
2812
|
+
```
|
|
2813
|
+
|
|
2814
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2815
|
+
|
|
2816
|
+
---
|
|
2817
|
+
##### Interface: SetupWalletIdb
|
|
2818
|
+
|
|
2819
|
+
```ts
|
|
2820
|
+
export interface SetupWalletIdb extends SetupWallet {
|
|
2821
|
+
activeStorage: StorageIdb;
|
|
2822
|
+
userId: number;
|
|
2823
|
+
rootKey: PrivateKey;
|
|
2824
|
+
identityKey: string;
|
|
2825
|
+
keyDeriver: KeyDeriver;
|
|
2826
|
+
chain: sdk.Chain;
|
|
2827
|
+
storage: WalletStorageManager;
|
|
2828
|
+
services: Services;
|
|
2829
|
+
monitor: Monitor;
|
|
2830
|
+
wallet: Wallet;
|
|
2831
|
+
}
|
|
2832
|
+
```
|
|
2833
|
+
|
|
2834
|
+
See also: [Chain](./client.md#type-chain), [Monitor](./monitor.md#class-monitor), [Services](./services.md#class-services), [SetupWallet](./setup.md#interface-setupwallet), [StorageIdb](./storage.md#class-storageidb), [Wallet](./client.md#class-wallet), [WalletStorageManager](./storage.md#class-walletstoragemanager)
|
|
2835
|
+
|
|
2836
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2837
|
+
|
|
2838
|
+
---
|
|
2839
|
+
##### Interface: SetupWalletIdbArgs
|
|
2840
|
+
|
|
2841
|
+
```ts
|
|
2842
|
+
export interface SetupWalletIdbArgs extends SetupClientWalletArgs {
|
|
2843
|
+
databaseName: string;
|
|
2844
|
+
}
|
|
2845
|
+
```
|
|
2846
|
+
|
|
2847
|
+
See also: [SetupClientWalletArgs](./setup.md#interface-setupclientwalletargs)
|
|
2848
|
+
|
|
2849
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2850
|
+
|
|
2520
2851
|
---
|
|
2521
2852
|
##### Interface: SignActionResultX
|
|
2522
2853
|
|
|
@@ -2820,6 +3151,175 @@ trustSelf?: "known"
|
|
|
2820
3151
|
|
|
2821
3152
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2822
3153
|
|
|
3154
|
+
---
|
|
3155
|
+
##### Interface: StorageIdbOptions
|
|
3156
|
+
|
|
3157
|
+
```ts
|
|
3158
|
+
export interface StorageIdbOptions extends StorageProviderOptions {
|
|
3159
|
+
}
|
|
3160
|
+
```
|
|
3161
|
+
|
|
3162
|
+
See also: [StorageProviderOptions](./storage.md#interface-storageprovideroptions)
|
|
3163
|
+
|
|
3164
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3165
|
+
|
|
3166
|
+
---
|
|
3167
|
+
##### Interface: StorageIdbSchema
|
|
3168
|
+
|
|
3169
|
+
```ts
|
|
3170
|
+
export interface StorageIdbSchema {
|
|
3171
|
+
certificates: {
|
|
3172
|
+
key: number;
|
|
3173
|
+
value: TableCertificate;
|
|
3174
|
+
indexes: {
|
|
3175
|
+
userId: number;
|
|
3176
|
+
userId_type_certifier_serialNumber: [
|
|
3177
|
+
number,
|
|
3178
|
+
Base64String,
|
|
3179
|
+
PubKeyHex,
|
|
3180
|
+
Base64String
|
|
3181
|
+
];
|
|
3182
|
+
};
|
|
3183
|
+
};
|
|
3184
|
+
certificateFields: {
|
|
3185
|
+
key: number;
|
|
3186
|
+
value: TableCertificateField;
|
|
3187
|
+
indexes: {
|
|
3188
|
+
userId: number;
|
|
3189
|
+
certificateId: number;
|
|
3190
|
+
};
|
|
3191
|
+
};
|
|
3192
|
+
commissions: {
|
|
3193
|
+
key: number;
|
|
3194
|
+
value: TableCommission;
|
|
3195
|
+
indexes: {
|
|
3196
|
+
userId: number;
|
|
3197
|
+
transactionId: number;
|
|
3198
|
+
};
|
|
3199
|
+
};
|
|
3200
|
+
monitorEvents: {
|
|
3201
|
+
key: number;
|
|
3202
|
+
value: TableMonitorEvent;
|
|
3203
|
+
};
|
|
3204
|
+
outputs: {
|
|
3205
|
+
key: number;
|
|
3206
|
+
value: TableOutput;
|
|
3207
|
+
indexes: {
|
|
3208
|
+
userId: number;
|
|
3209
|
+
transactionId: number;
|
|
3210
|
+
basketId: number;
|
|
3211
|
+
spentBy: string;
|
|
3212
|
+
transactionId_vout_userId: [
|
|
3213
|
+
number,
|
|
3214
|
+
number,
|
|
3215
|
+
number
|
|
3216
|
+
];
|
|
3217
|
+
};
|
|
3218
|
+
};
|
|
3219
|
+
outputBaskets: {
|
|
3220
|
+
key: number;
|
|
3221
|
+
value: TableOutputBasket;
|
|
3222
|
+
indexes: {
|
|
3223
|
+
userId: number;
|
|
3224
|
+
name_userId: [
|
|
3225
|
+
string,
|
|
3226
|
+
number
|
|
3227
|
+
];
|
|
3228
|
+
};
|
|
3229
|
+
};
|
|
3230
|
+
outputTags: {
|
|
3231
|
+
key: number;
|
|
3232
|
+
value: TableOutputTag;
|
|
3233
|
+
indexes: {
|
|
3234
|
+
userId: number;
|
|
3235
|
+
tag_userId: [
|
|
3236
|
+
string,
|
|
3237
|
+
number
|
|
3238
|
+
];
|
|
3239
|
+
};
|
|
3240
|
+
};
|
|
3241
|
+
outputTagMaps: {
|
|
3242
|
+
key: number;
|
|
3243
|
+
value: TableOutputTagMap;
|
|
3244
|
+
indexes: {
|
|
3245
|
+
outputTagId: number;
|
|
3246
|
+
outputId: number;
|
|
3247
|
+
};
|
|
3248
|
+
};
|
|
3249
|
+
provenTxs: {
|
|
3250
|
+
key: number;
|
|
3251
|
+
value: TableProvenTx;
|
|
3252
|
+
indexes: {
|
|
3253
|
+
txid: HexString;
|
|
3254
|
+
};
|
|
3255
|
+
};
|
|
3256
|
+
provenTxReqs: {
|
|
3257
|
+
key: number;
|
|
3258
|
+
value: TableProvenTxReq;
|
|
3259
|
+
indexes: {
|
|
3260
|
+
provenTxId: number;
|
|
3261
|
+
txid: HexString;
|
|
3262
|
+
status: ProvenTxReqStatus;
|
|
3263
|
+
batch: string;
|
|
3264
|
+
};
|
|
3265
|
+
};
|
|
3266
|
+
syncStates: {
|
|
3267
|
+
key: number;
|
|
3268
|
+
value: TableSyncState;
|
|
3269
|
+
indexes: {
|
|
3270
|
+
userId: number;
|
|
3271
|
+
refNum: string;
|
|
3272
|
+
status: SyncStatus;
|
|
3273
|
+
};
|
|
3274
|
+
};
|
|
3275
|
+
settings: {
|
|
3276
|
+
key: number;
|
|
3277
|
+
value: TableSettings;
|
|
3278
|
+
indexes: Record<string, never>;
|
|
3279
|
+
};
|
|
3280
|
+
transactions: {
|
|
3281
|
+
key: number;
|
|
3282
|
+
value: TableTransaction;
|
|
3283
|
+
indexes: {
|
|
3284
|
+
userId: number;
|
|
3285
|
+
provenTxId: number;
|
|
3286
|
+
reference: string;
|
|
3287
|
+
status: TransactionStatus;
|
|
3288
|
+
};
|
|
3289
|
+
};
|
|
3290
|
+
txLabels: {
|
|
3291
|
+
key: number;
|
|
3292
|
+
value: TableTxLabel;
|
|
3293
|
+
indexes: {
|
|
3294
|
+
userId: number;
|
|
3295
|
+
label_userId: [
|
|
3296
|
+
string,
|
|
3297
|
+
number
|
|
3298
|
+
];
|
|
3299
|
+
};
|
|
3300
|
+
};
|
|
3301
|
+
txLabelMaps: {
|
|
3302
|
+
key: number;
|
|
3303
|
+
value: TableTxLabelMap;
|
|
3304
|
+
indexes: {
|
|
3305
|
+
transactionId: number;
|
|
3306
|
+
txLabelId: number;
|
|
3307
|
+
};
|
|
3308
|
+
};
|
|
3309
|
+
users: {
|
|
3310
|
+
key: number;
|
|
3311
|
+
value: TableUser;
|
|
3312
|
+
indexes: {
|
|
3313
|
+
identityKey: string;
|
|
3314
|
+
};
|
|
3315
|
+
};
|
|
3316
|
+
}
|
|
3317
|
+
```
|
|
3318
|
+
|
|
3319
|
+
See also: [ProvenTxReqStatus](./client.md#type-proventxreqstatus), [SyncStatus](./client.md#type-syncstatus), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCommission](./storage.md#interface-tablecommission), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [TransactionStatus](./client.md#type-transactionstatus)
|
|
3320
|
+
|
|
3321
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3322
|
+
|
|
2823
3323
|
---
|
|
2824
3324
|
##### Interface: StorageIdentity
|
|
2825
3325
|
|
|
@@ -4822,10 +5322,11 @@ export interface WalletStorage {
|
|
|
4822
5322
|
insertCertificate(certificate: TableCertificateX): Promise<number>;
|
|
4823
5323
|
relinquishCertificate(args: RelinquishCertificateArgs): Promise<number>;
|
|
4824
5324
|
relinquishOutput(args: RelinquishOutputArgs): Promise<number>;
|
|
5325
|
+
getStores(): WalletStorageInfo[];
|
|
4825
5326
|
}
|
|
4826
5327
|
```
|
|
4827
5328
|
|
|
4828
|
-
See also: [AuthId](./client.md#interface-authid), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [StorageCreateActionResult](./client.md#interface-storagecreateactionresult), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableUser](./storage.md#interface-tableuser), [ValidCreateActionArgs](./client.md#interface-validcreateactionargs), [ValidListCertificatesArgs](./client.md#interface-validlistcertificatesargs), [WalletServices](./client.md#interface-walletservices), [createAction](./storage.md#function-createaction), [internalizeAction](./storage.md#function-internalizeaction), [listActions](./storage.md#function-listactions), [listCertificates](./storage.md#function-listcertificates), [listOutputs](./storage.md#function-listoutputs), [processAction](./storage.md#function-processaction)
|
|
5329
|
+
See also: [AuthId](./client.md#interface-authid), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [StorageCreateActionResult](./client.md#interface-storagecreateactionresult), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableUser](./storage.md#interface-tableuser), [ValidCreateActionArgs](./client.md#interface-validcreateactionargs), [ValidListCertificatesArgs](./client.md#interface-validlistcertificatesargs), [WalletServices](./client.md#interface-walletservices), [WalletStorageInfo](./client.md#interface-walletstorageinfo), [createAction](./storage.md#function-createaction), [internalizeAction](./storage.md#function-internalizeaction), [listActions](./storage.md#function-listactions), [listCertificates](./storage.md#function-listcertificates), [listOutputs](./storage.md#function-listoutputs), [processAction](./storage.md#function-processaction)
|
|
4829
5330
|
|
|
4830
5331
|
###### Method isStorageProvider
|
|
4831
5332
|
|
|
@@ -4839,6 +5340,26 @@ false
|
|
|
4839
5340
|
|
|
4840
5341
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4841
5342
|
|
|
5343
|
+
---
|
|
5344
|
+
##### Interface: WalletStorageInfo
|
|
5345
|
+
|
|
5346
|
+
Snapshot of the current state of a storage provider configured for an `WalletStorageManager`.
|
|
5347
|
+
|
|
5348
|
+
```ts
|
|
5349
|
+
export interface WalletStorageInfo {
|
|
5350
|
+
isActive: boolean;
|
|
5351
|
+
isEnabled: boolean;
|
|
5352
|
+
isBackup: boolean;
|
|
5353
|
+
isConflicting: boolean;
|
|
5354
|
+
userId: number;
|
|
5355
|
+
storageIdentityKey: string;
|
|
5356
|
+
storageName: string;
|
|
5357
|
+
storageClass: string;
|
|
5358
|
+
}
|
|
5359
|
+
```
|
|
5360
|
+
|
|
5361
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5362
|
+
|
|
4842
5363
|
---
|
|
4843
5364
|
##### Interface: WalletStorageProvider
|
|
4844
5365
|
|
|
@@ -4991,29 +5512,30 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
4991
5512
|
|
|
4992
5513
|
| | | |
|
|
4993
5514
|
| --- | --- | --- |
|
|
4994
|
-
| [ARC](#class-arc) | [
|
|
4995
|
-
| [AuthMethodInteractor](#class-authmethodinteractor) | [
|
|
4996
|
-
| [Bitails](#class-bitails) | [
|
|
4997
|
-
| [CWIStyleWalletManager](#class-cwistylewalletmanager) | [
|
|
4998
|
-
| [EntityBase](#class-entitybase) | [
|
|
5515
|
+
| [ARC](#class-arc) | [ScriptTemplateBRC29](#class-scripttemplatebrc29) | [WERR_BAD_REQUEST](#class-werr_bad_request) |
|
|
5516
|
+
| [AuthMethodInteractor](#class-authmethodinteractor) | [SdkWhatsOnChain](#class-sdkwhatsonchain) | [WERR_BROADCAST_UNAVAILABLE](#class-werr_broadcast_unavailable) |
|
|
5517
|
+
| [Bitails](#class-bitails) | [ServiceCollection](#class-servicecollection) | [WERR_INSUFFICIENT_FUNDS](#class-werr_insufficient_funds) |
|
|
5518
|
+
| [CWIStyleWalletManager](#class-cwistylewalletmanager) | [Services](#class-services) | [WERR_INTERNAL](#class-werr_internal) |
|
|
5519
|
+
| [EntityBase](#class-entitybase) | [SetupClient](#class-setupclient) | [WERR_INVALID_OPERATION](#class-werr_invalid_operation) |
|
|
4999
5520
|
| [EntityCertificate](#class-entitycertificate) | [SimpleWalletManager](#class-simplewalletmanager) | [WERR_INVALID_PARAMETER](#class-werr_invalid_parameter) |
|
|
5000
5521
|
| [EntityCertificateField](#class-entitycertificatefield) | [StorageClient](#class-storageclient) | [WERR_INVALID_PUBLIC_KEY](#class-werr_invalid_public_key) |
|
|
5001
|
-
| [EntityCommission](#class-entitycommission) | [
|
|
5002
|
-
| [EntityOutput](#class-entityoutput) | [
|
|
5003
|
-
| [EntityOutputBasket](#class-entityoutputbasket) | [
|
|
5004
|
-
| [EntityOutputTag](#class-entityoutputtag) | [
|
|
5005
|
-
| [EntityOutputTagMap](#class-entityoutputtagmap) | [
|
|
5006
|
-
| [EntityProvenTx](#class-entityproventx) | [
|
|
5007
|
-
| [EntityProvenTxReq](#class-entityproventxreq) | [
|
|
5008
|
-
| [EntitySyncState](#class-entitysyncstate) | [
|
|
5009
|
-
| [EntityTransaction](#class-entitytransaction) | [
|
|
5010
|
-
| [EntityTxLabel](#class-entitytxlabel) | [
|
|
5011
|
-
| [EntityTxLabelMap](#class-entitytxlabelmap) | [
|
|
5012
|
-
| [EntityUser](#class-entityuser) | [
|
|
5013
|
-
| [MergeEntity](#class-mergeentity) | [
|
|
5014
|
-
| [Monitor](#class-monitor) | [
|
|
5015
|
-
| [OverlayUMPTokenInteractor](#class-overlayumptokeninteractor) | [
|
|
5016
|
-
| [PersonaIDInteractor](#class-personaidinteractor) | [
|
|
5522
|
+
| [EntityCommission](#class-entitycommission) | [StorageIdb](#class-storageidb) | [WERR_MISSING_PARAMETER](#class-werr_missing_parameter) |
|
|
5523
|
+
| [EntityOutput](#class-entityoutput) | [StorageProvider](#class-storageprovider) | [WERR_NETWORK_CHAIN](#class-werr_network_chain) |
|
|
5524
|
+
| [EntityOutputBasket](#class-entityoutputbasket) | [StorageReader](#class-storagereader) | [WERR_NOT_ACTIVE](#class-werr_not_active) |
|
|
5525
|
+
| [EntityOutputTag](#class-entityoutputtag) | [StorageReaderWriter](#class-storagereaderwriter) | [WERR_NOT_IMPLEMENTED](#class-werr_not_implemented) |
|
|
5526
|
+
| [EntityOutputTagMap](#class-entityoutputtagmap) | [StorageSyncReader](#class-storagesyncreader) | [WERR_REVIEW_ACTIONS](#class-werr_review_actions) |
|
|
5527
|
+
| [EntityProvenTx](#class-entityproventx) | [TaskCheckForProofs](#class-taskcheckforproofs) | [WERR_UNAUTHORIZED](#class-werr_unauthorized) |
|
|
5528
|
+
| [EntityProvenTxReq](#class-entityproventxreq) | [TaskCheckNoSends](#class-taskchecknosends) | [Wallet](#class-wallet) |
|
|
5529
|
+
| [EntitySyncState](#class-entitysyncstate) | [TaskClock](#class-taskclock) | [WalletAuthenticationManager](#class-walletauthenticationmanager) |
|
|
5530
|
+
| [EntityTransaction](#class-entitytransaction) | [TaskFailAbandoned](#class-taskfailabandoned) | [WalletError](#class-walleterror) |
|
|
5531
|
+
| [EntityTxLabel](#class-entitytxlabel) | [TaskNewHeader](#class-tasknewheader) | [WalletMonitorTask](#class-walletmonitortask) |
|
|
5532
|
+
| [EntityTxLabelMap](#class-entitytxlabelmap) | [TaskPurge](#class-taskpurge) | [WalletPermissionsManager](#class-walletpermissionsmanager) |
|
|
5533
|
+
| [EntityUser](#class-entityuser) | [TaskReviewStatus](#class-taskreviewstatus) | [WalletSettingsManager](#class-walletsettingsmanager) |
|
|
5534
|
+
| [MergeEntity](#class-mergeentity) | [TaskSendWaiting](#class-tasksendwaiting) | [WalletSigner](#class-walletsigner) |
|
|
5535
|
+
| [Monitor](#class-monitor) | [TaskSyncWhenIdle](#class-tasksyncwhenidle) | [WalletStorageManager](#class-walletstoragemanager) |
|
|
5536
|
+
| [OverlayUMPTokenInteractor](#class-overlayumptokeninteractor) | [TaskUnFail](#class-taskunfail) | [WhatsOnChain](#class-whatsonchain) |
|
|
5537
|
+
| [PersonaIDInteractor](#class-personaidinteractor) | [TwilioPhoneInteractor](#class-twiliophoneinteractor) | |
|
|
5538
|
+
| [PrivilegedKeyManager](#class-privilegedkeymanager) | [WABClient](#class-wabclient) | |
|
|
5017
5539
|
|
|
5018
5540
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5019
5541
|
|
|
@@ -6932,6 +7454,272 @@ Argument Details
|
|
|
6932
7454
|
|
|
6933
7455
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6934
7456
|
|
|
7457
|
+
---
|
|
7458
|
+
##### Class: SetupClient
|
|
7459
|
+
|
|
7460
|
+
The 'Setup` class provides static setup functions to construct BRC-100 compatible
|
|
7461
|
+
wallets in a variety of configurations.
|
|
7462
|
+
|
|
7463
|
+
It serves as a starting point for experimentation and customization.
|
|
7464
|
+
|
|
7465
|
+
```ts
|
|
7466
|
+
export abstract class SetupClient {
|
|
7467
|
+
static async createWallet(args: SetupClientWalletArgs): Promise<SetupWallet> {
|
|
7468
|
+
const chain = args.chain;
|
|
7469
|
+
const rootKey = PrivateKey.fromHex(args.rootKeyHex);
|
|
7470
|
+
const identityKey = rootKey.toPublicKey().toString();
|
|
7471
|
+
const keyDeriver = new KeyDeriver(rootKey);
|
|
7472
|
+
const storage = new WalletStorageManager(identityKey, args.active, args.backups);
|
|
7473
|
+
if (storage.canMakeAvailable())
|
|
7474
|
+
await storage.makeAvailable();
|
|
7475
|
+
const serviceOptions = Services.createDefaultOptions(chain);
|
|
7476
|
+
serviceOptions.taalApiKey = args.taalApiKey;
|
|
7477
|
+
const services = new Services(serviceOptions);
|
|
7478
|
+
const monopts = Monitor.createDefaultWalletMonitorOptions(chain, storage, services);
|
|
7479
|
+
const monitor = new Monitor(monopts);
|
|
7480
|
+
monitor.addDefaultTasks();
|
|
7481
|
+
const privilegedKeyManager = args.privilegedKeyGetter
|
|
7482
|
+
? new sdk.PrivilegedKeyManager(args.privilegedKeyGetter)
|
|
7483
|
+
: undefined;
|
|
7484
|
+
const wallet = new Wallet({
|
|
7485
|
+
chain,
|
|
7486
|
+
keyDeriver,
|
|
7487
|
+
storage,
|
|
7488
|
+
services,
|
|
7489
|
+
monitor,
|
|
7490
|
+
privilegedKeyManager
|
|
7491
|
+
});
|
|
7492
|
+
const r: SetupWallet = {
|
|
7493
|
+
rootKey,
|
|
7494
|
+
identityKey,
|
|
7495
|
+
keyDeriver,
|
|
7496
|
+
chain,
|
|
7497
|
+
storage,
|
|
7498
|
+
services,
|
|
7499
|
+
monitor,
|
|
7500
|
+
wallet
|
|
7501
|
+
};
|
|
7502
|
+
return r;
|
|
7503
|
+
}
|
|
7504
|
+
static async createWalletClientNoEnv(args: {
|
|
7505
|
+
chain: sdk.Chain;
|
|
7506
|
+
rootKeyHex: string;
|
|
7507
|
+
storageUrl?: string;
|
|
7508
|
+
privilegedKeyGetter?: () => Promise<PrivateKey>;
|
|
7509
|
+
}): Promise<Wallet>
|
|
7510
|
+
static async createWalletClient(args: SetupClientWalletClientArgs): Promise<SetupWalletClient> {
|
|
7511
|
+
const wo = await SetupClient.createWallet(args);
|
|
7512
|
+
const endpointUrl = args.endpointUrl || `https://${args.chain !== "main" ? "staging-" : ""}storage.babbage.systems`;
|
|
7513
|
+
const client = new StorageClient(wo.wallet, endpointUrl);
|
|
7514
|
+
await wo.storage.addWalletStorageProvider(client);
|
|
7515
|
+
await wo.storage.makeAvailable();
|
|
7516
|
+
return {
|
|
7517
|
+
...wo,
|
|
7518
|
+
endpointUrl
|
|
7519
|
+
};
|
|
7520
|
+
}
|
|
7521
|
+
static getKeyPair(priv?: string | PrivateKey): KeyPairAddress {
|
|
7522
|
+
if (priv === undefined)
|
|
7523
|
+
priv = PrivateKey.fromRandom();
|
|
7524
|
+
else if (typeof priv === "string")
|
|
7525
|
+
priv = new PrivateKey(priv, "hex");
|
|
7526
|
+
const pub = PublicKey.fromPrivateKey(priv);
|
|
7527
|
+
const address = pub.toAddress();
|
|
7528
|
+
return { privateKey: priv, publicKey: pub, address };
|
|
7529
|
+
}
|
|
7530
|
+
static getLockP2PKH(address: string): LockingScript {
|
|
7531
|
+
const p2pkh = new P2PKH();
|
|
7532
|
+
const lock = p2pkh.lock(address);
|
|
7533
|
+
return lock;
|
|
7534
|
+
}
|
|
7535
|
+
static getUnlockP2PKH(priv: PrivateKey, satoshis: number): sdk.ScriptTemplateUnlock {
|
|
7536
|
+
const p2pkh = new P2PKH();
|
|
7537
|
+
const lock = SetupClient.getLockP2PKH(SetupClient.getKeyPair(priv).address);
|
|
7538
|
+
const unlock = p2pkh.unlock(priv, "all", false, satoshis, lock);
|
|
7539
|
+
return unlock;
|
|
7540
|
+
}
|
|
7541
|
+
static createP2PKHOutputs(outputs: {
|
|
7542
|
+
address: string;
|
|
7543
|
+
satoshis: number;
|
|
7544
|
+
outputDescription?: string;
|
|
7545
|
+
basket?: string;
|
|
7546
|
+
tags?: string[];
|
|
7547
|
+
}[]): CreateActionOutput[] {
|
|
7548
|
+
const os: CreateActionOutput[] = [];
|
|
7549
|
+
const count = outputs.length;
|
|
7550
|
+
for (let i = 0; i < count; i++) {
|
|
7551
|
+
const o = outputs[i];
|
|
7552
|
+
os.push({
|
|
7553
|
+
basket: o.basket,
|
|
7554
|
+
tags: o.tags,
|
|
7555
|
+
satoshis: o.satoshis,
|
|
7556
|
+
lockingScript: SetupClient.getLockP2PKH(o.address).toHex(),
|
|
7557
|
+
outputDescription: o.outputDescription || `p2pkh ${i}`
|
|
7558
|
+
});
|
|
7559
|
+
}
|
|
7560
|
+
return os;
|
|
7561
|
+
}
|
|
7562
|
+
static async createP2PKHOutputsAction(wallet: WalletInterface, outputs: {
|
|
7563
|
+
address: string;
|
|
7564
|
+
satoshis: number;
|
|
7565
|
+
outputDescription?: string;
|
|
7566
|
+
basket?: string;
|
|
7567
|
+
tags?: string[];
|
|
7568
|
+
}[], options?: CreateActionOptions): Promise<{
|
|
7569
|
+
cr: CreateActionResult;
|
|
7570
|
+
outpoints: string[] | undefined;
|
|
7571
|
+
}> {
|
|
7572
|
+
const os = SetupClient.createP2PKHOutputs(outputs);
|
|
7573
|
+
const createArgs: CreateActionArgs = {
|
|
7574
|
+
description: `createP2PKHOutputs`,
|
|
7575
|
+
outputs: os,
|
|
7576
|
+
options: {
|
|
7577
|
+
...options,
|
|
7578
|
+
randomizeOutputs: false
|
|
7579
|
+
}
|
|
7580
|
+
};
|
|
7581
|
+
const cr = await wallet.createAction(createArgs);
|
|
7582
|
+
let outpoints: string[] | undefined;
|
|
7583
|
+
if (cr.txid) {
|
|
7584
|
+
outpoints = os.map((o, i) => `${cr.txid}.${i}`);
|
|
7585
|
+
}
|
|
7586
|
+
return { cr, outpoints };
|
|
7587
|
+
}
|
|
7588
|
+
static async fundWalletFromP2PKHOutpoints(wallet: WalletInterface, outpoints: string[], p2pkhKey: KeyPairAddress, inputBEEF?: BEEF) {
|
|
7589
|
+
}
|
|
7590
|
+
static async createWalletIdb(args: SetupWalletIdbArgs): Promise<SetupWalletIdb> {
|
|
7591
|
+
const wo = await SetupClient.createWallet(args);
|
|
7592
|
+
const activeStorage = await SetupClient.createStorageIdb(args);
|
|
7593
|
+
await wo.storage.addWalletStorageProvider(activeStorage);
|
|
7594
|
+
const { user, isNew } = await activeStorage.findOrInsertUser(wo.identityKey);
|
|
7595
|
+
const userId = user.userId;
|
|
7596
|
+
const r: SetupWalletIdb = {
|
|
7597
|
+
...wo,
|
|
7598
|
+
activeStorage,
|
|
7599
|
+
userId
|
|
7600
|
+
};
|
|
7601
|
+
return r;
|
|
7602
|
+
}
|
|
7603
|
+
static async createStorageIdb(args: SetupWalletIdbArgs): Promise<StorageIdb>
|
|
7604
|
+
}
|
|
7605
|
+
```
|
|
7606
|
+
|
|
7607
|
+
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), [SetupClientWalletArgs](./setup.md#interface-setupclientwalletargs), [SetupClientWalletClientArgs](./setup.md#interface-setupclientwalletclientargs), [SetupWallet](./setup.md#interface-setupwallet), [SetupWalletClient](./setup.md#interface-setupwalletclient), [SetupWalletIdb](./setup.md#interface-setupwalletidb), [SetupWalletIdbArgs](./setup.md#interface-setupwalletidbargs), [StorageClient](./storage.md#class-storageclient), [StorageIdb](./storage.md#class-storageidb), [Wallet](./client.md#class-wallet), [WalletStorageManager](./storage.md#class-walletstoragemanager), [createAction](./storage.md#function-createaction)
|
|
7608
|
+
|
|
7609
|
+
###### Method createStorageIdb
|
|
7610
|
+
|
|
7611
|
+
```ts
|
|
7612
|
+
static async createStorageIdb(args: SetupWalletIdbArgs): Promise<StorageIdb>
|
|
7613
|
+
```
|
|
7614
|
+
See also: [SetupWalletIdbArgs](./setup.md#interface-setupwalletidbargs), [StorageIdb](./storage.md#class-storageidb)
|
|
7615
|
+
|
|
7616
|
+
Returns
|
|
7617
|
+
|
|
7618
|
+
- `Knex` based storage provider for a wallet. May be used for either active storage or backup storage.
|
|
7619
|
+
|
|
7620
|
+
###### Method createWallet
|
|
7621
|
+
|
|
7622
|
+
Create a `Wallet`. Storage can optionally be provided or configured later.
|
|
7623
|
+
|
|
7624
|
+
The following components are configured: KeyDeriver, WalletStorageManager, WalletService, WalletStorage.
|
|
7625
|
+
Optionally, PrivilegedKeyManager is also configured.
|
|
7626
|
+
|
|
7627
|
+
```ts
|
|
7628
|
+
static async createWallet(args: SetupClientWalletArgs): Promise<SetupWallet> {
|
|
7629
|
+
const chain = args.chain;
|
|
7630
|
+
const rootKey = PrivateKey.fromHex(args.rootKeyHex);
|
|
7631
|
+
const identityKey = rootKey.toPublicKey().toString();
|
|
7632
|
+
const keyDeriver = new KeyDeriver(rootKey);
|
|
7633
|
+
const storage = new WalletStorageManager(identityKey, args.active, args.backups);
|
|
7634
|
+
if (storage.canMakeAvailable())
|
|
7635
|
+
await storage.makeAvailable();
|
|
7636
|
+
const serviceOptions = Services.createDefaultOptions(chain);
|
|
7637
|
+
serviceOptions.taalApiKey = args.taalApiKey;
|
|
7638
|
+
const services = new Services(serviceOptions);
|
|
7639
|
+
const monopts = Monitor.createDefaultWalletMonitorOptions(chain, storage, services);
|
|
7640
|
+
const monitor = new Monitor(monopts);
|
|
7641
|
+
monitor.addDefaultTasks();
|
|
7642
|
+
const privilegedKeyManager = args.privilegedKeyGetter
|
|
7643
|
+
? new sdk.PrivilegedKeyManager(args.privilegedKeyGetter)
|
|
7644
|
+
: undefined;
|
|
7645
|
+
const wallet = new Wallet({
|
|
7646
|
+
chain,
|
|
7647
|
+
keyDeriver,
|
|
7648
|
+
storage,
|
|
7649
|
+
services,
|
|
7650
|
+
monitor,
|
|
7651
|
+
privilegedKeyManager
|
|
7652
|
+
});
|
|
7653
|
+
const r: SetupWallet = {
|
|
7654
|
+
rootKey,
|
|
7655
|
+
identityKey,
|
|
7656
|
+
keyDeriver,
|
|
7657
|
+
chain,
|
|
7658
|
+
storage,
|
|
7659
|
+
services,
|
|
7660
|
+
monitor,
|
|
7661
|
+
wallet
|
|
7662
|
+
};
|
|
7663
|
+
return r;
|
|
7664
|
+
}
|
|
7665
|
+
```
|
|
7666
|
+
See also: [Monitor](./monitor.md#class-monitor), [PrivilegedKeyManager](./client.md#class-privilegedkeymanager), [Services](./services.md#class-services), [SetupClientWalletArgs](./setup.md#interface-setupclientwalletargs), [SetupWallet](./setup.md#interface-setupwallet), [Wallet](./client.md#class-wallet), [WalletStorageManager](./storage.md#class-walletstoragemanager)
|
|
7667
|
+
|
|
7668
|
+
###### Method createWalletClientNoEnv
|
|
7669
|
+
|
|
7670
|
+
Setup a new `Wallet` without requiring a .env file.
|
|
7671
|
+
|
|
7672
|
+
```ts
|
|
7673
|
+
static async createWalletClientNoEnv(args: {
|
|
7674
|
+
chain: sdk.Chain;
|
|
7675
|
+
rootKeyHex: string;
|
|
7676
|
+
storageUrl?: string;
|
|
7677
|
+
privilegedKeyGetter?: () => Promise<PrivateKey>;
|
|
7678
|
+
}): Promise<Wallet>
|
|
7679
|
+
```
|
|
7680
|
+
See also: [Chain](./client.md#type-chain), [Wallet](./client.md#class-wallet)
|
|
7681
|
+
|
|
7682
|
+
Argument Details
|
|
7683
|
+
|
|
7684
|
+
+ **args.chain**
|
|
7685
|
+
+ 'main' or 'test'
|
|
7686
|
+
+ **args.rootKeyHex**
|
|
7687
|
+
+ Root private key for wallet's key deriver.
|
|
7688
|
+
+ **args.storageUrl**
|
|
7689
|
+
+ Optional. `StorageClient` and `chain` compatible endpoint URL.
|
|
7690
|
+
+ **args.privilegedKeyGetter**
|
|
7691
|
+
+ Optional. Method that will return the privileged `PrivateKey`, on demand.
|
|
7692
|
+
|
|
7693
|
+
###### Method createWalletIdb
|
|
7694
|
+
|
|
7695
|
+
Adds `indexedDB` based storage to a `Wallet` configured by `SetupClient.createWalletOnly`
|
|
7696
|
+
|
|
7697
|
+
```ts
|
|
7698
|
+
static async createWalletIdb(args: SetupWalletIdbArgs): Promise<SetupWalletIdb> {
|
|
7699
|
+
const wo = await SetupClient.createWallet(args);
|
|
7700
|
+
const activeStorage = await SetupClient.createStorageIdb(args);
|
|
7701
|
+
await wo.storage.addWalletStorageProvider(activeStorage);
|
|
7702
|
+
const { user, isNew } = await activeStorage.findOrInsertUser(wo.identityKey);
|
|
7703
|
+
const userId = user.userId;
|
|
7704
|
+
const r: SetupWalletIdb = {
|
|
7705
|
+
...wo,
|
|
7706
|
+
activeStorage,
|
|
7707
|
+
userId
|
|
7708
|
+
};
|
|
7709
|
+
return r;
|
|
7710
|
+
}
|
|
7711
|
+
```
|
|
7712
|
+
See also: [SetupClient](./setup.md#class-setupclient), [SetupWalletIdb](./setup.md#interface-setupwalletidb), [SetupWalletIdbArgs](./setup.md#interface-setupwalletidbargs)
|
|
7713
|
+
|
|
7714
|
+
Argument Details
|
|
7715
|
+
|
|
7716
|
+
+ **args.databaseName**
|
|
7717
|
+
+ Name for this storage. For MySQL, the schema name within the MySQL instance.
|
|
7718
|
+
+ **args.chain**
|
|
7719
|
+
+ Which chain this wallet is on: 'main' or 'test'. Defaults to 'test'.
|
|
7720
|
+
|
|
7721
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7722
|
+
|
|
6935
7723
|
---
|
|
6936
7724
|
##### Class: SimpleWalletManager
|
|
6937
7725
|
|
|
@@ -7780,6 +8568,268 @@ See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
|
7780
8568
|
|
|
7781
8569
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7782
8570
|
|
|
8571
|
+
---
|
|
8572
|
+
##### Class: StorageIdb
|
|
8573
|
+
|
|
8574
|
+
This class implements the `StorageProvider` interface using IndexedDB,
|
|
8575
|
+
via the promises wrapper package `idb`.
|
|
8576
|
+
|
|
8577
|
+
```ts
|
|
8578
|
+
export class StorageIdb extends StorageProvider implements sdk.WalletStorageProvider {
|
|
8579
|
+
dbName: string;
|
|
8580
|
+
db?: IDBPDatabase<StorageIdbSchema>;
|
|
8581
|
+
constructor(options: StorageIdbOptions)
|
|
8582
|
+
async migrate(storageName: string, storageIdentityKey: string): Promise<string>
|
|
8583
|
+
async verifyDB(storageName?: string, storageIdentityKey?: string): Promise<IDBPDatabase<StorageIdbSchema>>
|
|
8584
|
+
toDbTrx(stores: string[], mode: "readonly" | "readwrite", trx?: sdk.TrxToken): IDBPTransaction<StorageIdbSchema, string[], "readwrite" | "readonly">
|
|
8585
|
+
async readSettings(trx?: sdk.TrxToken): Promise<TableSettings>
|
|
8586
|
+
async initDB(storageName?: string, storageIdentityKey?: string): Promise<IDBPDatabase<StorageIdbSchema>>
|
|
8587
|
+
async reviewStatus(args: {
|
|
8588
|
+
agedLimit: Date;
|
|
8589
|
+
trx?: sdk.TrxToken;
|
|
8590
|
+
}): Promise<{
|
|
8591
|
+
log: string;
|
|
8592
|
+
}>
|
|
8593
|
+
async purgeData(params: sdk.PurgeParams, trx?: sdk.TrxToken): Promise<sdk.PurgeResults>
|
|
8594
|
+
async allocateChangeInput(userId: number, basketId: number, targetSatoshis: number, exactSatoshis: number | undefined, excludeSending: boolean, transactionId: number): Promise<TableOutput | undefined>
|
|
8595
|
+
async getProvenOrRawTx(txid: string, trx?: sdk.TrxToken): Promise<sdk.ProvenOrRawTx>
|
|
8596
|
+
async getRawTxOfKnownValidTransaction(txid?: string, offset?: number, length?: number, trx?: sdk.TrxToken): Promise<number[] | undefined>
|
|
8597
|
+
async getLabelsForTransactionId(transactionId?: number, trx?: sdk.TrxToken): Promise<TableTxLabel[]>
|
|
8598
|
+
async getTagsForOutputId(outputId: number, trx?: sdk.TrxToken): Promise<TableOutputTag[]>
|
|
8599
|
+
async listActions(auth: sdk.AuthId, vargs: sdk.ValidListActionsArgs): Promise<ListActionsResult>
|
|
8600
|
+
async listOutputs(auth: sdk.AuthId, vargs: sdk.ValidListOutputsArgs): Promise<ListOutputsResult>
|
|
8601
|
+
async countChangeInputs(userId: number, basketId: number, excludeSending: boolean): Promise<number>
|
|
8602
|
+
async findCertificatesAuth(auth: sdk.AuthId, args: sdk.FindCertificatesArgs): Promise<TableCertificateX[]>
|
|
8603
|
+
async findOutputBasketsAuth(auth: sdk.AuthId, args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>
|
|
8604
|
+
async findOutputsAuth(auth: sdk.AuthId, args: sdk.FindOutputsArgs): Promise<TableOutput[]>
|
|
8605
|
+
async insertCertificateAuth(auth: sdk.AuthId, certificate: TableCertificateX): Promise<number>
|
|
8606
|
+
async dropAllData(): Promise<void>
|
|
8607
|
+
async filterOutputTagMaps(args: sdk.FindOutputTagMapsArgs, filtered: (v: TableOutputTagMap) => void, userId?: number): Promise<void>
|
|
8608
|
+
async findOutputTagMaps(args: sdk.FindOutputTagMapsArgs): Promise<TableOutputTagMap[]>
|
|
8609
|
+
async filterProvenTxReqs(args: sdk.FindProvenTxReqsArgs, filtered: (v: TableProvenTxReq) => void, userId?: number): Promise<void>
|
|
8610
|
+
async findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>
|
|
8611
|
+
async filterProvenTxs(args: sdk.FindProvenTxsArgs, filtered: (v: TableProvenTx) => void, userId?: number): Promise<void>
|
|
8612
|
+
async findProvenTxs(args: sdk.FindProvenTxsArgs): Promise<TableProvenTx[]>
|
|
8613
|
+
async filterTxLabelMaps(args: sdk.FindTxLabelMapsArgs, filtered: (v: TableTxLabelMap) => void, userId?: number): Promise<void>
|
|
8614
|
+
async findTxLabelMaps(args: sdk.FindTxLabelMapsArgs): Promise<TableTxLabelMap[]>
|
|
8615
|
+
async countOutputTagMaps(args: sdk.FindOutputTagMapsArgs): Promise<number>
|
|
8616
|
+
async countProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<number>
|
|
8617
|
+
async countProvenTxs(args: sdk.FindProvenTxsArgs): Promise<number>
|
|
8618
|
+
async countTxLabelMaps(args: sdk.FindTxLabelMapsArgs): Promise<number>
|
|
8619
|
+
async insertCertificate(certificate: TableCertificateX, trx?: sdk.TrxToken): Promise<number>
|
|
8620
|
+
async insertCertificateField(certificateField: TableCertificateField, trx?: sdk.TrxToken): Promise<void>
|
|
8621
|
+
async insertCommission(commission: TableCommission, trx?: sdk.TrxToken): Promise<number>
|
|
8622
|
+
async insertMonitorEvent(event: TableMonitorEvent, trx?: sdk.TrxToken): Promise<number>
|
|
8623
|
+
async insertOutput(output: TableOutput, trx?: sdk.TrxToken): Promise<number>
|
|
8624
|
+
async insertOutputBasket(basket: TableOutputBasket, trx?: sdk.TrxToken): Promise<number>
|
|
8625
|
+
async insertOutputTag(tag: TableOutputTag, trx?: sdk.TrxToken): Promise<number>
|
|
8626
|
+
async insertOutputTagMap(tagMap: TableOutputTagMap, trx?: sdk.TrxToken): Promise<void>
|
|
8627
|
+
async insertProvenTx(tx: TableProvenTx, trx?: sdk.TrxToken): Promise<number>
|
|
8628
|
+
async insertProvenTxReq(tx: TableProvenTxReq, trx?: sdk.TrxToken): Promise<number>
|
|
8629
|
+
async insertSyncState(syncState: TableSyncState, trx?: sdk.TrxToken): Promise<number>
|
|
8630
|
+
async insertTransaction(tx: TableTransaction, trx?: sdk.TrxToken): Promise<number>
|
|
8631
|
+
async insertTxLabel(label: TableTxLabel, trx?: sdk.TrxToken): Promise<number>
|
|
8632
|
+
async insertTxLabelMap(labelMap: TableTxLabelMap, trx?: sdk.TrxToken): Promise<void>
|
|
8633
|
+
async insertUser(user: TableUser, trx?: sdk.TrxToken): Promise<number>
|
|
8634
|
+
async updateIdb<T>(id: number | number[], update: Partial<T>, keyProp: string, storeName: string, trx?: sdk.TrxToken): Promise<number>
|
|
8635
|
+
async updateIdbKey<T>(key: (number | string)[], update: Partial<T>, keyProps: string[], storeName: string, trx?: sdk.TrxToken): Promise<number>
|
|
8636
|
+
async updateCertificate(id: number, update: Partial<TableCertificate>, trx?: sdk.TrxToken): Promise<number>
|
|
8637
|
+
async updateCertificateField(certificateId: number, fieldName: string, update: Partial<TableCertificateField>, trx?: sdk.TrxToken): Promise<number>
|
|
8638
|
+
async updateCommission(id: number, update: Partial<TableCommission>, trx?: sdk.TrxToken): Promise<number>
|
|
8639
|
+
async updateMonitorEvent(id: number, update: Partial<TableMonitorEvent>, trx?: sdk.TrxToken): Promise<number>
|
|
8640
|
+
async updateOutput(id: number, update: Partial<TableOutput>, trx?: sdk.TrxToken): Promise<number>
|
|
8641
|
+
async updateOutputBasket(id: number, update: Partial<TableOutputBasket>, trx?: sdk.TrxToken): Promise<number>
|
|
8642
|
+
async updateOutputTag(id: number, update: Partial<TableOutputTag>, trx?: sdk.TrxToken): Promise<number>
|
|
8643
|
+
async updateProvenTx(id: number, update: Partial<TableProvenTx>, trx?: sdk.TrxToken): Promise<number>
|
|
8644
|
+
async updateProvenTxReq(id: number | number[], update: Partial<TableProvenTxReq>, trx?: sdk.TrxToken): Promise<number>
|
|
8645
|
+
async updateSyncState(id: number, update: Partial<TableSyncState>, trx?: sdk.TrxToken): Promise<number>
|
|
8646
|
+
async updateTransaction(id: number | number[], update: Partial<TableTransaction>, trx?: sdk.TrxToken): Promise<number>
|
|
8647
|
+
async updateTxLabel(id: number, update: Partial<TableTxLabel>, trx?: sdk.TrxToken): Promise<number>
|
|
8648
|
+
async updateUser(id: number, update: Partial<TableUser>, trx?: sdk.TrxToken): Promise<number>
|
|
8649
|
+
async updateOutputTagMap(outputId: number, tagId: number, update: Partial<TableOutputTagMap>, trx?: sdk.TrxToken): Promise<number>
|
|
8650
|
+
async updateTxLabelMap(transactionId: number, txLabelId: number, update: Partial<TableTxLabelMap>, trx?: sdk.TrxToken): Promise<number>
|
|
8651
|
+
async destroy(): Promise<void>
|
|
8652
|
+
allStores: string[] = [
|
|
8653
|
+
"certificates",
|
|
8654
|
+
"certificate_fields",
|
|
8655
|
+
"commissions",
|
|
8656
|
+
"monitor_events",
|
|
8657
|
+
"outputs",
|
|
8658
|
+
"output_baskets",
|
|
8659
|
+
"output_tags",
|
|
8660
|
+
"output_tags_map",
|
|
8661
|
+
"proven_txs",
|
|
8662
|
+
"proven_tx_reqs",
|
|
8663
|
+
"sync_states",
|
|
8664
|
+
"transactions",
|
|
8665
|
+
"tx_labels",
|
|
8666
|
+
"tx_labels_map",
|
|
8667
|
+
"users"
|
|
8668
|
+
];
|
|
8669
|
+
async transaction<T>(scope: (trx: sdk.TrxToken) => Promise<T>, trx?: sdk.TrxToken): Promise<T>
|
|
8670
|
+
async filterCertificateFields(args: sdk.FindCertificateFieldsArgs, filtered: (v: TableCertificateField) => void): Promise<void>
|
|
8671
|
+
async findCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<TableCertificateField[]>
|
|
8672
|
+
async filterCertificates(args: sdk.FindCertificatesArgs, filtered: (v: TableCertificateX) => void): Promise<void>
|
|
8673
|
+
async findCertificates(args: sdk.FindCertificatesArgs): Promise<TableCertificateX[]>
|
|
8674
|
+
async filterCommissions(args: sdk.FindCommissionsArgs, filtered: (v: TableCommission) => void): Promise<void>
|
|
8675
|
+
async findCommissions(args: sdk.FindCommissionsArgs): Promise<TableCommission[]>
|
|
8676
|
+
async filterMonitorEvents(args: sdk.FindMonitorEventsArgs, filtered: (v: TableMonitorEvent) => void): Promise<void>
|
|
8677
|
+
async findMonitorEvents(args: sdk.FindMonitorEventsArgs): Promise<TableMonitorEvent[]>
|
|
8678
|
+
async filterOutputBaskets(args: sdk.FindOutputBasketsArgs, filtered: (v: TableOutputBasket) => void): Promise<void>
|
|
8679
|
+
async findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>
|
|
8680
|
+
async filterOutputs(args: sdk.FindOutputsArgs, filtered: (v: TableOutput) => void, tagIds?: number[], isQueryModeAll?: boolean): Promise<void>
|
|
8681
|
+
async findOutputs(args: sdk.FindOutputsArgs, tagIds?: number[], isQueryModeAll?: boolean): Promise<TableOutput[]>
|
|
8682
|
+
async filterOutputTags(args: sdk.FindOutputTagsArgs, filtered: (v: TableOutputTag) => void): Promise<void>
|
|
8683
|
+
async findOutputTags(args: sdk.FindOutputTagsArgs): Promise<TableOutputTag[]>
|
|
8684
|
+
async filterSyncStates(args: sdk.FindSyncStatesArgs, filtered: (v: TableSyncState) => void): Promise<void>
|
|
8685
|
+
async findSyncStates(args: sdk.FindSyncStatesArgs): Promise<TableSyncState[]>
|
|
8686
|
+
async filterTransactions(args: sdk.FindTransactionsArgs, filtered: (v: TableTransaction) => void, labelIds?: number[], isQueryModeAll?: boolean): Promise<void>
|
|
8687
|
+
async findTransactions(args: sdk.FindTransactionsArgs, labelIds?: number[], isQueryModeAll?: boolean): Promise<TableTransaction[]>
|
|
8688
|
+
async filterTxLabels(args: sdk.FindTxLabelsArgs, filtered: (v: TableTxLabel) => void): Promise<void>
|
|
8689
|
+
async findTxLabels(args: sdk.FindTxLabelsArgs): Promise<TableTxLabel[]>
|
|
8690
|
+
async filterUsers(args: sdk.FindUsersArgs, filtered: (v: TableUser) => void): Promise<void>
|
|
8691
|
+
async findUsers(args: sdk.FindUsersArgs): Promise<TableUser[]>
|
|
8692
|
+
async countCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<number>
|
|
8693
|
+
async countCertificates(args: sdk.FindCertificatesArgs): Promise<number>
|
|
8694
|
+
async countCommissions(args: sdk.FindCommissionsArgs): Promise<number>
|
|
8695
|
+
async countMonitorEvents(args: sdk.FindMonitorEventsArgs): Promise<number>
|
|
8696
|
+
async countOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<number>
|
|
8697
|
+
async countOutputs(args: sdk.FindOutputsArgs, tagIds?: number[], isQueryModeAll?: boolean): Promise<number>
|
|
8698
|
+
async countOutputTags(args: sdk.FindOutputTagsArgs): Promise<number>
|
|
8699
|
+
async countSyncStates(args: sdk.FindSyncStatesArgs): Promise<number>
|
|
8700
|
+
async countTransactions(args: sdk.FindTransactionsArgs, labelIds?: number[], isQueryModeAll?: boolean): Promise<number>
|
|
8701
|
+
async countTxLabels(args: sdk.FindTxLabelsArgs): Promise<number>
|
|
8702
|
+
async countUsers(args: sdk.FindUsersArgs): Promise<number>
|
|
8703
|
+
async getProvenTxsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTx[]>
|
|
8704
|
+
async getProvenTxReqsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTxReq[]>
|
|
8705
|
+
async getTxLabelMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableTxLabelMap[]>
|
|
8706
|
+
async getOutputTagMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableOutputTagMap[]>
|
|
8707
|
+
async verifyReadyForDatabaseAccess(trx?: sdk.TrxToken): Promise<DBType>
|
|
8708
|
+
validateEntity<T extends sdk.EntityTimeStamp>(entity: T, dateFields?: string[], booleanFields?: string[]): T
|
|
8709
|
+
validateEntities<T extends sdk.EntityTimeStamp>(entities: T[], dateFields?: string[], booleanFields?: string[]): T[]
|
|
8710
|
+
validatePartialForUpdate<T extends sdk.EntityTimeStamp>(update: Partial<T>, dateFields?: string[], booleanFields?: string[]): Partial<T>
|
|
8711
|
+
async validateEntityForInsert<T extends sdk.EntityTimeStamp>(entity: T, trx?: sdk.TrxToken, dateFields?: string[], booleanFields?: string[]): Promise<any>
|
|
8712
|
+
async validateRawTransaction(t: TableTransaction, trx?: sdk.TrxToken): Promise<void>
|
|
8713
|
+
async adminStats(adminIdentityKey: string): Promise<StorageAdminStats>
|
|
8714
|
+
}
|
|
8715
|
+
```
|
|
8716
|
+
|
|
8717
|
+
See also: [AuthId](./client.md#interface-authid), [DBType](./storage.md#type-dbtype), [EntityTimeStamp](./client.md#interface-entitytimestamp), [FindCertificateFieldsArgs](./client.md#interface-findcertificatefieldsargs), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindCommissionsArgs](./client.md#interface-findcommissionsargs), [FindForUserSincePagedArgs](./client.md#interface-findforusersincepagedargs), [FindMonitorEventsArgs](./client.md#interface-findmonitoreventsargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputTagMapsArgs](./client.md#interface-findoutputtagmapsargs), [FindOutputTagsArgs](./client.md#interface-findoutputtagsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [FindProvenTxsArgs](./client.md#interface-findproventxsargs), [FindSyncStatesArgs](./client.md#interface-findsyncstatesargs), [FindTransactionsArgs](./client.md#interface-findtransactionsargs), [FindTxLabelMapsArgs](./client.md#interface-findtxlabelmapsargs), [FindTxLabelsArgs](./client.md#interface-findtxlabelsargs), [FindUsersArgs](./client.md#interface-findusersargs), [ProvenOrRawTx](./client.md#interface-provenorrawtx), [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [StorageAdminStats](./storage.md#interface-storageadminstats), [StorageIdbOptions](./storage.md#interface-storageidboptions), [StorageIdbSchema](./storage.md#interface-storageidbschema), [StorageProvider](./storage.md#class-storageprovider), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableCommission](./storage.md#interface-tablecommission), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [TrxToken](./client.md#interface-trxtoken), [ValidListActionsArgs](./client.md#interface-validlistactionsargs), [ValidListOutputsArgs](./client.md#interface-validlistoutputsargs), [WalletStorageProvider](./client.md#interface-walletstorageprovider), [listActions](./storage.md#function-listactions), [listOutputs](./storage.md#function-listoutputs), [purgeData](./storage.md#function-purgedata), [reviewStatus](./storage.md#function-reviewstatus)
|
|
8718
|
+
|
|
8719
|
+
###### Method allocateChangeInput
|
|
8720
|
+
|
|
8721
|
+
Proceeds in three stages:
|
|
8722
|
+
1. Find an output that exactly funds the transaction (if exactSatoshis is not undefined).
|
|
8723
|
+
2. Find an output that overfunds by the least amount (targetSatoshis).
|
|
8724
|
+
3. Find an output that comes as close to funding as possible (targetSatoshis).
|
|
8725
|
+
4. Return undefined if no output is found.
|
|
8726
|
+
|
|
8727
|
+
Outputs must belong to userId and basketId and have spendable true.
|
|
8728
|
+
Their corresponding transaction must have status of 'completed', 'unproven', or 'sending' (if excludeSending is false).
|
|
8729
|
+
|
|
8730
|
+
```ts
|
|
8731
|
+
async allocateChangeInput(userId: number, basketId: number, targetSatoshis: number, exactSatoshis: number | undefined, excludeSending: boolean, transactionId: number): Promise<TableOutput | undefined>
|
|
8732
|
+
```
|
|
8733
|
+
See also: [TableOutput](./storage.md#interface-tableoutput)
|
|
8734
|
+
|
|
8735
|
+
Returns
|
|
8736
|
+
|
|
8737
|
+
next funding output to add to transaction or undefined if there are none.
|
|
8738
|
+
|
|
8739
|
+
###### Method migrate
|
|
8740
|
+
|
|
8741
|
+
This method must be called at least once before any other method accesses the database,
|
|
8742
|
+
and each time the schema may have updated.
|
|
8743
|
+
|
|
8744
|
+
If the database has already been created in this context, `storageName` and `storageIdentityKey`
|
|
8745
|
+
are ignored.
|
|
8746
|
+
|
|
8747
|
+
```ts
|
|
8748
|
+
async migrate(storageName: string, storageIdentityKey: string): Promise<string>
|
|
8749
|
+
```
|
|
8750
|
+
|
|
8751
|
+
###### Method readSettings
|
|
8752
|
+
|
|
8753
|
+
Called by `makeAvailable` to return storage `TableSettings`.
|
|
8754
|
+
Since this is the first async method that must be called by all clients,
|
|
8755
|
+
it is where async initialization occurs.
|
|
8756
|
+
|
|
8757
|
+
After initialization, cached settings are returned.
|
|
8758
|
+
|
|
8759
|
+
```ts
|
|
8760
|
+
async readSettings(trx?: sdk.TrxToken): Promise<TableSettings>
|
|
8761
|
+
```
|
|
8762
|
+
See also: [TableSettings](./storage.md#interface-tablesettings), [TrxToken](./client.md#interface-trxtoken)
|
|
8763
|
+
|
|
8764
|
+
###### Method toDbTrx
|
|
8765
|
+
|
|
8766
|
+
Convert the standard optional `TrxToken` parameter into either a direct knex database instance,
|
|
8767
|
+
or a Knex.Transaction as appropriate.
|
|
8768
|
+
|
|
8769
|
+
```ts
|
|
8770
|
+
toDbTrx(stores: string[], mode: "readonly" | "readwrite", trx?: sdk.TrxToken): IDBPTransaction<StorageIdbSchema, string[], "readwrite" | "readonly">
|
|
8771
|
+
```
|
|
8772
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema), [TrxToken](./client.md#interface-trxtoken)
|
|
8773
|
+
|
|
8774
|
+
###### Method validateEntities
|
|
8775
|
+
|
|
8776
|
+
Helper to force uniform behavior across database engines.
|
|
8777
|
+
Use to process all arrays of records with time stamps retreived from database.
|
|
8778
|
+
|
|
8779
|
+
```ts
|
|
8780
|
+
validateEntities<T extends sdk.EntityTimeStamp>(entities: T[], dateFields?: string[], booleanFields?: string[]): T[]
|
|
8781
|
+
```
|
|
8782
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
8783
|
+
|
|
8784
|
+
Returns
|
|
8785
|
+
|
|
8786
|
+
input `entities` array with contained values validated.
|
|
8787
|
+
|
|
8788
|
+
###### Method validateEntity
|
|
8789
|
+
|
|
8790
|
+
Helper to force uniform behavior across database engines.
|
|
8791
|
+
Use to process all individual records with time stamps or number[] retreived from database.
|
|
8792
|
+
|
|
8793
|
+
```ts
|
|
8794
|
+
validateEntity<T extends sdk.EntityTimeStamp>(entity: T, dateFields?: string[], booleanFields?: string[]): T
|
|
8795
|
+
```
|
|
8796
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
8797
|
+
|
|
8798
|
+
###### Method validateEntityForInsert
|
|
8799
|
+
|
|
8800
|
+
Helper to force uniform behavior across database engines.
|
|
8801
|
+
Use to process new entities being inserted into the database.
|
|
8802
|
+
|
|
8803
|
+
```ts
|
|
8804
|
+
async validateEntityForInsert<T extends sdk.EntityTimeStamp>(entity: T, trx?: sdk.TrxToken, dateFields?: string[], booleanFields?: string[]): Promise<any>
|
|
8805
|
+
```
|
|
8806
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp), [TrxToken](./client.md#interface-trxtoken)
|
|
8807
|
+
|
|
8808
|
+
###### Method validatePartialForUpdate
|
|
8809
|
+
|
|
8810
|
+
Helper to force uniform behavior across database engines.
|
|
8811
|
+
Use to process the update template for entities being updated.
|
|
8812
|
+
|
|
8813
|
+
```ts
|
|
8814
|
+
validatePartialForUpdate<T extends sdk.EntityTimeStamp>(update: Partial<T>, dateFields?: string[], booleanFields?: string[]): Partial<T>
|
|
8815
|
+
```
|
|
8816
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
8817
|
+
|
|
8818
|
+
###### Method verifyDB
|
|
8819
|
+
|
|
8820
|
+
Following initial database initialization, this method verfies that db is ready for use.
|
|
8821
|
+
|
|
8822
|
+
```ts
|
|
8823
|
+
async verifyDB(storageName?: string, storageIdentityKey?: string): Promise<IDBPDatabase<StorageIdbSchema>>
|
|
8824
|
+
```
|
|
8825
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
8826
|
+
|
|
8827
|
+
Throws
|
|
8828
|
+
|
|
8829
|
+
`WERR_INVALID_OPERATION` if the database has not been initialized by a call to `migrate`.
|
|
8830
|
+
|
|
8831
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8832
|
+
|
|
7783
8833
|
---
|
|
7784
8834
|
##### Class: StorageProvider
|
|
7785
8835
|
|
|
@@ -8903,8 +9953,8 @@ export class Wallet implements WalletInterface, ProtoWallet {
|
|
|
8903
9953
|
async proveCertificate(args: ProveCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ProveCertificateResult>
|
|
8904
9954
|
async discoverByIdentityKey(args: DiscoverByIdentityKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<DiscoverCertificatesResult>
|
|
8905
9955
|
async discoverByAttributes(args: DiscoverByAttributesArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<DiscoverCertificatesResult>
|
|
8906
|
-
verifyReturnedTxidOnly(beef: Beef): Beef
|
|
8907
|
-
verifyReturnedTxidOnlyAtomicBEEF(beef: AtomicBEEF): AtomicBEEF
|
|
9956
|
+
verifyReturnedTxidOnly(beef: Beef, knownTxids?: string[]): Beef
|
|
9957
|
+
verifyReturnedTxidOnlyAtomicBEEF(beef: AtomicBEEF, knownTxids?: string[]): AtomicBEEF
|
|
8908
9958
|
verifyReturnedTxidOnlyBEEF(beef: BEEF): BEEF
|
|
8909
9959
|
async createAction(args: CreateActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<CreateActionResult>
|
|
8910
9960
|
async signAction(args: SignActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<SignActionResult>
|
|
@@ -9872,10 +10922,11 @@ export class WalletStorageManager implements sdk.WalletStorage {
|
|
|
9872
10922
|
}>
|
|
9873
10923
|
async updateBackups(activeSync?: sdk.WalletStorageSync): Promise<string>
|
|
9874
10924
|
async setActive(storageIdentityKey: string): Promise<string>
|
|
10925
|
+
getStores(): sdk.WalletStorageInfo[]
|
|
9875
10926
|
}
|
|
9876
10927
|
```
|
|
9877
10928
|
|
|
9878
|
-
See also: [AuthId](./client.md#interface-authid), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [StorageCreateActionResult](./client.md#interface-storagecreateactionresult), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [StorageProvider](./storage.md#class-storageprovider), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableUser](./storage.md#interface-tableuser), [ValidCreateActionArgs](./client.md#interface-validcreateactionargs), [ValidListActionsArgs](./client.md#interface-validlistactionsargs), [ValidListCertificatesArgs](./client.md#interface-validlistcertificatesargs), [ValidListOutputsArgs](./client.md#interface-validlistoutputsargs), [WalletServices](./client.md#interface-walletservices), [WalletStorage](./client.md#interface-walletstorage), [WalletStorageProvider](./client.md#interface-walletstorageprovider), [WalletStorageReader](./client.md#interface-walletstoragereader), [WalletStorageSync](./client.md#interface-walletstoragesync), [WalletStorageSyncReader](./client.md#interface-walletstoragesyncreader), [WalletStorageWriter](./client.md#interface-walletstoragewriter), [createAction](./storage.md#function-createaction), [internalizeAction](./storage.md#function-internalizeaction), [listActions](./storage.md#function-listactions), [listCertificates](./storage.md#function-listcertificates), [listOutputs](./storage.md#function-listoutputs), [processAction](./storage.md#function-processaction)
|
|
10929
|
+
See also: [AuthId](./client.md#interface-authid), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [StorageCreateActionResult](./client.md#interface-storagecreateactionresult), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [StorageProvider](./storage.md#class-storageprovider), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableUser](./storage.md#interface-tableuser), [ValidCreateActionArgs](./client.md#interface-validcreateactionargs), [ValidListActionsArgs](./client.md#interface-validlistactionsargs), [ValidListCertificatesArgs](./client.md#interface-validlistcertificatesargs), [ValidListOutputsArgs](./client.md#interface-validlistoutputsargs), [WalletServices](./client.md#interface-walletservices), [WalletStorage](./client.md#interface-walletstorage), [WalletStorageInfo](./client.md#interface-walletstorageinfo), [WalletStorageProvider](./client.md#interface-walletstorageprovider), [WalletStorageReader](./client.md#interface-walletstoragereader), [WalletStorageSync](./client.md#interface-walletstoragesync), [WalletStorageSyncReader](./client.md#interface-walletstoragesyncreader), [WalletStorageWriter](./client.md#interface-walletstoragewriter), [createAction](./storage.md#function-createaction), [internalizeAction](./storage.md#function-internalizeaction), [listActions](./storage.md#function-listactions), [listCertificates](./storage.md#function-listcertificates), [listOutputs](./storage.md#function-listoutputs), [processAction](./storage.md#function-processaction)
|
|
9879
10930
|
|
|
9880
10931
|
###### Property _active
|
|
9881
10932
|
|
|
@@ -10154,8 +11205,8 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
10154
11205
|
|
|
10155
11206
|
| | | |
|
|
10156
11207
|
| --- | --- | --- |
|
|
10157
|
-
| [acquireDirectCertificate](#function-acquiredirectcertificate) | [
|
|
10158
|
-
| [arcDefaultUrl](#function-arcdefaulturl) | [
|
|
11208
|
+
| [acquireDirectCertificate](#function-acquiredirectcertificate) | [listCertificates](#function-listcertificates) | [validateCreateActionOutput](#function-validatecreateactionoutput) |
|
|
11209
|
+
| [arcDefaultUrl](#function-arcdefaulturl) | [listOutputsIdb](#function-listoutputsidb) | [validateDiscoverByAttributesArgs](#function-validatediscoverbyattributesargs) |
|
|
10159
11210
|
| [arraysEqual](#function-arraysequal) | [lockScriptWithKeyOffsetFromPubKey](#function-lockscriptwithkeyoffsetfrompubkey) | [validateDiscoverByIdentityKeyArgs](#function-validatediscoverbyidentitykeyargs) |
|
|
10160
11211
|
| [asArray](#function-asarray) | [makeAtomicBeef](#function-makeatomicbeef) | [validateGenerateChangeSdkParams](#function-validategeneratechangesdkparams) |
|
|
10161
11212
|
| [asBsvSdkPrivateKey](#function-asbsvsdkprivatekey) | [makeAtomicBeef](#function-makeatomicbeef) | [validateGenerateChangeSdkResult](#function-validategeneratechangesdkresult) |
|
|
@@ -10168,29 +11219,31 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
10168
11219
|
| [completeSignedTransaction](#function-completesignedtransaction) | [processAction](#function-processaction) | [validateOptionalInteger](#function-validateoptionalinteger) |
|
|
10169
11220
|
| [completeSignedTransaction](#function-completesignedtransaction) | [processAction](#function-processaction) | [validateOptionalOutpointString](#function-validateoptionaloutpointstring) |
|
|
10170
11221
|
| [convertProofToMerklePath](#function-convertprooftomerklepath) | [proveCertificate](#function-provecertificate) | [validateOriginator](#function-validateoriginator) |
|
|
10171
|
-
| [createAction](#function-createaction) | [
|
|
10172
|
-
| [createAction](#function-createaction) | [
|
|
10173
|
-
| [createDefaultWalletServicesOptions](#function-createdefaultwalletservicesoptions) | [
|
|
10174
|
-
| [createStorageServiceChargeScript](#function-createstorageservicechargescript) | [
|
|
10175
|
-
| [createSyncMap](#function-createsyncmap) | [
|
|
10176
|
-
| [doubleSha256BE](#function-doublesha256be) | [
|
|
10177
|
-
| [doubleSha256HashLE](#function-doublesha256hashle) | [
|
|
10178
|
-
| [generateChangeSdk](#function-generatechangesdk) | [
|
|
10179
|
-
| [generateChangeSdkMakeStorage](#function-generatechangesdkmakestorage) | [
|
|
10180
|
-
| [getBeefForTransaction](#function-getbeeffortransaction) | [
|
|
10181
|
-
| [getExchangeRatesIo](#function-getexchangeratesio) | [
|
|
10182
|
-
| [getIdentityKey](#function-getidentitykey) | [
|
|
10183
|
-
| [getProofs](#function-getproofs) | [
|
|
10184
|
-
| [getSyncChunk](#function-getsyncchunk) | [
|
|
10185
|
-
| [internalizeAction](#function-internalizeaction) | [
|
|
10186
|
-
| [internalizeAction](#function-internalizeaction) | [
|
|
10187
|
-
| [isBaseBlockHeader](#function-isbaseblockheader) | [
|
|
10188
|
-
| [isBlockHeader](#function-isblockheader) | [
|
|
10189
|
-
| [isCreateActionSpecOp](#function-iscreateactionspecop) | [
|
|
10190
|
-
| [isHexString](#function-ishexstring) | [
|
|
10191
|
-
| [isListActionsSpecOp](#function-islistactionsspecop) | [
|
|
10192
|
-
| [isListOutputsSpecOp](#function-islistoutputsspecop) | [
|
|
10193
|
-
| [isLive](#function-islive) | [
|
|
11222
|
+
| [createAction](#function-createaction) | [purgeDataIdb](#function-purgedataidb) | [validateOutpointString](#function-validateoutpointstring) |
|
|
11223
|
+
| [createAction](#function-createaction) | [randomBytes](#function-randombytes) | [validatePositiveIntegerOrZero](#function-validatepositiveintegerorzero) |
|
|
11224
|
+
| [createDefaultWalletServicesOptions](#function-createdefaultwalletservicesoptions) | [randomBytesBase64](#function-randombytesbase64) | [validateProveCertificateArgs](#function-validateprovecertificateargs) |
|
|
11225
|
+
| [createStorageServiceChargeScript](#function-createstorageservicechargescript) | [randomBytesHex](#function-randombyteshex) | [validateRelinquishCertificateArgs](#function-validaterelinquishcertificateargs) |
|
|
11226
|
+
| [createSyncMap](#function-createsyncmap) | [reviewStatusIdb](#function-reviewstatusidb) | [validateRelinquishOutputArgs](#function-validaterelinquishoutputargs) |
|
|
11227
|
+
| [doubleSha256BE](#function-doublesha256be) | [setDisableDoubleSpendCheckForTest](#function-setdisabledoublespendcheckfortest) | [validateSatoshis](#function-validatesatoshis) |
|
|
11228
|
+
| [doubleSha256HashLE](#function-doublesha256hashle) | [sha256Hash](#function-sha256hash) | [validateScriptHash](#function-validatescripthash) |
|
|
11229
|
+
| [generateChangeSdk](#function-generatechangesdk) | [signAction](#function-signaction) | [validateSecondsSinceEpoch](#function-validatesecondssinceepoch) |
|
|
11230
|
+
| [generateChangeSdkMakeStorage](#function-generatechangesdkmakestorage) | [stampLog](#function-stamplog) | [validateSignActionArgs](#function-validatesignactionargs) |
|
|
11231
|
+
| [getBeefForTransaction](#function-getbeeffortransaction) | [stampLogFormat](#function-stamplogformat) | [validateSignActionOptions](#function-validatesignactionoptions) |
|
|
11232
|
+
| [getExchangeRatesIo](#function-getexchangeratesio) | [toBinaryBaseBlockHeader](#function-tobinarybaseblockheader) | [validateStorageFeeModel](#function-validatestoragefeemodel) |
|
|
11233
|
+
| [getIdentityKey](#function-getidentitykey) | [toWalletNetwork](#function-towalletnetwork) | [validateStringLength](#function-validatestringlength) |
|
|
11234
|
+
| [getProofs](#function-getproofs) | [transactionInputSize](#function-transactioninputsize) | [validateWalletPayment](#function-validatewalletpayment) |
|
|
11235
|
+
| [getSyncChunk](#function-getsyncchunk) | [transactionOutputSize](#function-transactionoutputsize) | [varUintSize](#function-varuintsize) |
|
|
11236
|
+
| [internalizeAction](#function-internalizeaction) | [transactionSize](#function-transactionsize) | [verifyHexString](#function-verifyhexstring) |
|
|
11237
|
+
| [internalizeAction](#function-internalizeaction) | [updateChaintracksFiatExchangeRates](#function-updatechaintracksfiatexchangerates) | [verifyId](#function-verifyid) |
|
|
11238
|
+
| [isBaseBlockHeader](#function-isbaseblockheader) | [updateExchangeratesapi](#function-updateexchangeratesapi) | [verifyInteger](#function-verifyinteger) |
|
|
11239
|
+
| [isBlockHeader](#function-isblockheader) | [validateAbortActionArgs](#function-validateabortactionargs) | [verifyNumber](#function-verifynumber) |
|
|
11240
|
+
| [isCreateActionSpecOp](#function-iscreateactionspecop) | [validateAcquireCertificateArgs](#function-validateacquirecertificateargs) | [verifyOne](#function-verifyone) |
|
|
11241
|
+
| [isHexString](#function-ishexstring) | [validateAcquireDirectCertificateArgs](#function-validateacquiredirectcertificateargs) | [verifyOneOrNone](#function-verifyoneornone) |
|
|
11242
|
+
| [isListActionsSpecOp](#function-islistactionsspecop) | [validateAcquireIssuanceCertificateArgs](#function-validateacquireissuancecertificateargs) | [verifyOptionalHexString](#function-verifyoptionalhexstring) |
|
|
11243
|
+
| [isListOutputsSpecOp](#function-islistoutputsspecop) | [validateBasketInsertion](#function-validatebasketinsertion) | [verifyTruthy](#function-verifytruthy) |
|
|
11244
|
+
| [isLive](#function-islive) | [validateCreateActionArgs](#function-validatecreateactionargs) | [wait](#function-wait) |
|
|
11245
|
+
| [isLiveBlockHeader](#function-isliveblockheader) | [validateCreateActionInput](#function-validatecreateactioninput) | |
|
|
11246
|
+
| [listActionsIdb](#function-listactionsidb) | [validateCreateActionOptions](#function-validatecreateactionoptions) | |
|
|
10194
11247
|
|
|
10195
11248
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
10196
11249
|
|
|
@@ -10396,10 +11449,10 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
10396
11449
|
##### Function: createAction
|
|
10397
11450
|
|
|
10398
11451
|
```ts
|
|
10399
|
-
export async function createAction(
|
|
11452
|
+
export async function createAction(wallet: Wallet, auth: sdk.AuthId, vargs: sdk.ValidCreateActionArgs): Promise<CreateActionResultX>
|
|
10400
11453
|
```
|
|
10401
11454
|
|
|
10402
|
-
See also: [AuthId](./client.md#interface-authid), [
|
|
11455
|
+
See also: [AuthId](./client.md#interface-authid), [CreateActionResultX](./client.md#interface-createactionresultx), [ValidCreateActionArgs](./client.md#interface-validcreateactionargs), [Wallet](./client.md#class-wallet)
|
|
10403
11456
|
|
|
10404
11457
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
10405
11458
|
|
|
@@ -10407,10 +11460,10 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
10407
11460
|
##### Function: createAction
|
|
10408
11461
|
|
|
10409
11462
|
```ts
|
|
10410
|
-
export async function createAction(
|
|
11463
|
+
export async function createAction(storage: StorageProvider, auth: sdk.AuthId, vargs: sdk.ValidCreateActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<sdk.StorageCreateActionResult>
|
|
10411
11464
|
```
|
|
10412
11465
|
|
|
10413
|
-
See also: [AuthId](./client.md#interface-authid), [
|
|
11466
|
+
See also: [AuthId](./client.md#interface-authid), [StorageCreateActionResult](./client.md#interface-storagecreateactionresult), [StorageProvider](./storage.md#class-storageprovider), [ValidCreateActionArgs](./client.md#interface-validcreateactionargs)
|
|
10414
11467
|
|
|
10415
11468
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
10416
11469
|
|
|
@@ -10650,13 +11703,13 @@ When the transaction already exists, the description is updated. The isOutgoing
|
|
|
10650
11703
|
|
|
10651
11704
|
"wallet payment" Merge Rules:
|
|
10652
11705
|
1. Targetting an existing change "default" basket output results in a no-op. No error. No alterations made.
|
|
10653
|
-
2. Targetting a previously "custom" non-change output converts it into a change output. This alters the transaction's `
|
|
11706
|
+
2. Targetting a previously "custom" non-change output converts it into a change output. This alters the transaction's `amount`, and the wallet balance.
|
|
10654
11707
|
|
|
10655
11708
|
```ts
|
|
10656
|
-
export async function internalizeAction(
|
|
11709
|
+
export async function internalizeAction(wallet: Wallet, auth: sdk.AuthId, args: InternalizeActionArgs): Promise<InternalizeActionResult>
|
|
10657
11710
|
```
|
|
10658
11711
|
|
|
10659
|
-
See also: [AuthId](./client.md#interface-authid), [
|
|
11712
|
+
See also: [AuthId](./client.md#interface-authid), [Wallet](./client.md#class-wallet)
|
|
10660
11713
|
|
|
10661
11714
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
10662
11715
|
|
|
@@ -10686,13 +11739,13 @@ When the transaction already exists, the description is updated. The isOutgoing
|
|
|
10686
11739
|
|
|
10687
11740
|
"wallet payment" Merge Rules:
|
|
10688
11741
|
1. Targetting an existing change "default" basket output results in a no-op. No error. No alterations made.
|
|
10689
|
-
2. Targetting a previously "custom" non-change output converts it into a change output. This alters the transaction's `
|
|
11742
|
+
2. Targetting a previously "custom" non-change output converts it into a change output. This alters the transaction's `satoshis`, and the wallet balance.
|
|
10690
11743
|
|
|
10691
11744
|
```ts
|
|
10692
|
-
export async function internalizeAction(
|
|
11745
|
+
export async function internalizeAction(storage: StorageProvider, auth: sdk.AuthId, args: InternalizeActionArgs): Promise<InternalizeActionResult>
|
|
10693
11746
|
```
|
|
10694
11747
|
|
|
10695
|
-
See also: [AuthId](./client.md#interface-authid), [
|
|
11748
|
+
See also: [AuthId](./client.md#interface-authid), [StorageProvider](./storage.md#class-storageprovider)
|
|
10696
11749
|
|
|
10697
11750
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
10698
11751
|
|
|
@@ -10819,6 +11872,17 @@ See also: [BaseBlockHeader](./services.md#interface-baseblockheader), [BlockHead
|
|
|
10819
11872
|
|
|
10820
11873
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
10821
11874
|
|
|
11875
|
+
---
|
|
11876
|
+
##### Function: listActionsIdb
|
|
11877
|
+
|
|
11878
|
+
```ts
|
|
11879
|
+
export async function listActionsIdb(storage: StorageIdb, auth: sdk.AuthId, vargs: sdk.ValidListActionsArgs): Promise<ListActionsResult>
|
|
11880
|
+
```
|
|
11881
|
+
|
|
11882
|
+
See also: [AuthId](./client.md#interface-authid), [StorageIdb](./storage.md#class-storageidb), [ValidListActionsArgs](./client.md#interface-validlistactionsargs)
|
|
11883
|
+
|
|
11884
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
11885
|
+
|
|
10822
11886
|
---
|
|
10823
11887
|
##### Function: listCertificates
|
|
10824
11888
|
|
|
@@ -10830,6 +11894,17 @@ See also: [AuthId](./client.md#interface-authid), [StorageProvider](./storage.md
|
|
|
10830
11894
|
|
|
10831
11895
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
10832
11896
|
|
|
11897
|
+
---
|
|
11898
|
+
##### Function: listOutputsIdb
|
|
11899
|
+
|
|
11900
|
+
```ts
|
|
11901
|
+
export async function listOutputsIdb(storage: StorageIdb, auth: sdk.AuthId, vargs: sdk.ValidListOutputsArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ListOutputsResult>
|
|
11902
|
+
```
|
|
11903
|
+
|
|
11904
|
+
See also: [AuthId](./client.md#interface-authid), [StorageIdb](./storage.md#class-storageidb), [ValidListOutputsArgs](./client.md#interface-validlistoutputsargs)
|
|
11905
|
+
|
|
11906
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
11907
|
+
|
|
10833
11908
|
---
|
|
10834
11909
|
##### Function: lockScriptWithKeyOffsetFromPubKey
|
|
10835
11910
|
|
|
@@ -10930,10 +12005,10 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
10930
12005
|
##### Function: processAction
|
|
10931
12006
|
|
|
10932
12007
|
```ts
|
|
10933
|
-
export async function processAction(
|
|
12008
|
+
export async function processAction(prior: PendingSignAction | undefined, wallet: Wallet, auth: sdk.AuthId, vargs: sdk.ValidProcessActionArgs): Promise<sdk.StorageProcessActionResults>
|
|
10934
12009
|
```
|
|
10935
12010
|
|
|
10936
|
-
See also: [AuthId](./client.md#interface-authid), [
|
|
12011
|
+
See also: [AuthId](./client.md#interface-authid), [PendingSignAction](./client.md#interface-pendingsignaction), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [ValidProcessActionArgs](./client.md#interface-validprocessactionargs), [Wallet](./client.md#class-wallet)
|
|
10937
12012
|
|
|
10938
12013
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
10939
12014
|
|
|
@@ -10941,10 +12016,10 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
10941
12016
|
##### Function: processAction
|
|
10942
12017
|
|
|
10943
12018
|
```ts
|
|
10944
|
-
export async function processAction(
|
|
12019
|
+
export async function processAction(storage: StorageProvider, auth: sdk.AuthId, args: sdk.StorageProcessActionArgs): Promise<sdk.StorageProcessActionResults>
|
|
10945
12020
|
```
|
|
10946
12021
|
|
|
10947
|
-
See also: [AuthId](./client.md#interface-authid), [
|
|
12022
|
+
See also: [AuthId](./client.md#interface-authid), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [StorageProvider](./storage.md#class-storageprovider)
|
|
10948
12023
|
|
|
10949
12024
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
10950
12025
|
|
|
@@ -10959,6 +12034,17 @@ See also: [AuthId](./client.md#interface-authid), [ValidProveCertificateArgs](./
|
|
|
10959
12034
|
|
|
10960
12035
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
10961
12036
|
|
|
12037
|
+
---
|
|
12038
|
+
##### Function: purgeDataIdb
|
|
12039
|
+
|
|
12040
|
+
```ts
|
|
12041
|
+
export async function purgeDataIdb(storage: StorageIdb, params: sdk.PurgeParams, trx?: sdk.TrxToken): Promise<sdk.PurgeResults>
|
|
12042
|
+
```
|
|
12043
|
+
|
|
12044
|
+
See also: [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [StorageIdb](./storage.md#class-storageidb), [TrxToken](./client.md#interface-trxtoken)
|
|
12045
|
+
|
|
12046
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12047
|
+
|
|
10962
12048
|
---
|
|
10963
12049
|
##### Function: randomBytes
|
|
10964
12050
|
|
|
@@ -10998,6 +12084,28 @@ count cryptographically secure random bytes as hex encoded string
|
|
|
10998
12084
|
|
|
10999
12085
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
11000
12086
|
|
|
12087
|
+
---
|
|
12088
|
+
##### Function: reviewStatusIdb
|
|
12089
|
+
|
|
12090
|
+
Looks for unpropagated state:
|
|
12091
|
+
|
|
12092
|
+
1. set transactions to 'failed' if not already failed and provenTxReq with matching txid has status of 'invalid'.
|
|
12093
|
+
2. sets transactions to 'completed' if provenTx with matching txid exists and current provenTxId is null.
|
|
12094
|
+
3. sets outputs to spendable true, spentBy undefined if spentBy is a transaction with status 'failed'.
|
|
12095
|
+
|
|
12096
|
+
```ts
|
|
12097
|
+
export async function reviewStatusIdb(storage: StorageIdb, args: {
|
|
12098
|
+
agedLimit: Date;
|
|
12099
|
+
trx?: sdk.TrxToken;
|
|
12100
|
+
}): Promise<{
|
|
12101
|
+
log: string;
|
|
12102
|
+
}>
|
|
12103
|
+
```
|
|
12104
|
+
|
|
12105
|
+
See also: [StorageIdb](./storage.md#class-storageidb), [TrxToken](./client.md#interface-trxtoken)
|
|
12106
|
+
|
|
12107
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12108
|
+
|
|
11001
12109
|
---
|
|
11002
12110
|
##### Function: setDisableDoubleSpendCheckForTest
|
|
11003
12111
|
|
|
@@ -12119,16 +13227,17 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
12119
13227
|
|
|
12120
13228
|
| | |
|
|
12121
13229
|
| --- | --- |
|
|
12122
|
-
| [DEFAULT_PROFILE_ID](#variable-default_profile_id) | [
|
|
12123
|
-
| [DEFAULT_SETTINGS](#variable-default_settings) | [
|
|
12124
|
-
| [PBKDF2_NUM_ROUNDS](#variable-pbkdf2_num_rounds) | [
|
|
12125
|
-
| [ProvenTxReqNonTerminalStatus](#variable-proventxreqnonterminalstatus) | [
|
|
12126
|
-
| [ProvenTxReqTerminalStatus](#variable-proventxreqterminalstatus) | [
|
|
12127
|
-
| [TESTNET_DEFAULT_SETTINGS](#variable-testnet_default_settings) | [
|
|
12128
|
-
| [brc29ProtocolID](#variable-brc29protocolid) | [
|
|
12129
|
-
| [
|
|
12130
|
-
| [
|
|
12131
|
-
| [
|
|
13230
|
+
| [DEFAULT_PROFILE_ID](#variable-default_profile_id) | [parseResults](#variable-parseresults) |
|
|
13231
|
+
| [DEFAULT_SETTINGS](#variable-default_settings) | [queryOverlay](#variable-queryoverlay) |
|
|
13232
|
+
| [PBKDF2_NUM_ROUNDS](#variable-pbkdf2_num_rounds) | [specOpFailedActions](#variable-specopfailedactions) |
|
|
13233
|
+
| [ProvenTxReqNonTerminalStatus](#variable-proventxreqnonterminalstatus) | [specOpInvalidChange](#variable-specopinvalidchange) |
|
|
13234
|
+
| [ProvenTxReqTerminalStatus](#variable-proventxreqterminalstatus) | [specOpNoSendActions](#variable-specopnosendactions) |
|
|
13235
|
+
| [TESTNET_DEFAULT_SETTINGS](#variable-testnet_default_settings) | [specOpSetWalletChangeParams](#variable-specopsetwalletchangeparams) |
|
|
13236
|
+
| [brc29ProtocolID](#variable-brc29protocolid) | [specOpThrowReviewActions](#variable-specopthrowreviewactions) |
|
|
13237
|
+
| [getBasketToSpecOp](#variable-getbaskettospecop) | [specOpWalletBalance](#variable-specopwalletbalance) |
|
|
13238
|
+
| [getLabelToSpecOp](#variable-getlabeltospecop) | [transactionColumnsWithoutRawTx](#variable-transactioncolumnswithoutrawtx) |
|
|
13239
|
+
| [maxPossibleSatoshis](#variable-maxpossiblesatoshis) | [transformVerifiableCertificatesWithTrust](#variable-transformverifiablecertificateswithtrust) |
|
|
13240
|
+
| [outputColumnsWithoutLockingScript](#variable-outputcolumnswithoutlockingscript) | |
|
|
12132
13241
|
|
|
12133
13242
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12134
13243
|
|
|
@@ -12244,6 +13353,124 @@ brc29ProtocolID: WalletProtocol = [2, "3241645161d8"]
|
|
|
12244
13353
|
|
|
12245
13354
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12246
13355
|
|
|
13356
|
+
---
|
|
13357
|
+
##### Variable: getBasketToSpecOp
|
|
13358
|
+
|
|
13359
|
+
```ts
|
|
13360
|
+
getBasketToSpecOp: () => Record<string, ListOutputsSpecOp> = () => {
|
|
13361
|
+
return {
|
|
13362
|
+
[sdk.specOpWalletBalance]: {
|
|
13363
|
+
name: "totalOutputsIsWalletBalance",
|
|
13364
|
+
useBasket: "default",
|
|
13365
|
+
ignoreLimit: true,
|
|
13366
|
+
resultFromOutputs: async (s: StorageProvider, auth: sdk.AuthId, vargs: ValidListOutputsArgs, specOpTags: string[], outputs: TableOutput[]): Promise<ListOutputsResult> => {
|
|
13367
|
+
let totalOutputs = 0;
|
|
13368
|
+
for (const o of outputs)
|
|
13369
|
+
totalOutputs += o.satoshis;
|
|
13370
|
+
return { totalOutputs, outputs: [] };
|
|
13371
|
+
}
|
|
13372
|
+
},
|
|
13373
|
+
[sdk.specOpInvalidChange]: {
|
|
13374
|
+
name: "invalidChangeOutputs",
|
|
13375
|
+
useBasket: "default",
|
|
13376
|
+
ignoreLimit: true,
|
|
13377
|
+
includeOutputScripts: true,
|
|
13378
|
+
includeSpent: false,
|
|
13379
|
+
tagsToIntercept: ["release", "all"],
|
|
13380
|
+
filterOutputs: async (s: StorageProvider, auth: sdk.AuthId, vargs: ValidListOutputsArgs, specOpTags: string[], outputs: TableOutput[]): Promise<TableOutput[]> => {
|
|
13381
|
+
const filteredOutputs: TableOutput[] = [];
|
|
13382
|
+
const services = s.getServices();
|
|
13383
|
+
for (const o of outputs) {
|
|
13384
|
+
await s.validateOutputScript(o);
|
|
13385
|
+
let ok: boolean | undefined = false;
|
|
13386
|
+
if (o.lockingScript && o.lockingScript.length > 0) {
|
|
13387
|
+
ok = await services.isUtxo(o);
|
|
13388
|
+
}
|
|
13389
|
+
else {
|
|
13390
|
+
ok = undefined;
|
|
13391
|
+
}
|
|
13392
|
+
if (ok === false) {
|
|
13393
|
+
filteredOutputs.push(o);
|
|
13394
|
+
}
|
|
13395
|
+
}
|
|
13396
|
+
if (specOpTags.indexOf("release") >= 0) {
|
|
13397
|
+
for (const o of filteredOutputs) {
|
|
13398
|
+
await s.updateOutput(o.outputId, { spendable: false });
|
|
13399
|
+
o.spendable = false;
|
|
13400
|
+
}
|
|
13401
|
+
}
|
|
13402
|
+
return filteredOutputs;
|
|
13403
|
+
}
|
|
13404
|
+
},
|
|
13405
|
+
[sdk.specOpSetWalletChangeParams]: {
|
|
13406
|
+
name: "setWalletChangeParams",
|
|
13407
|
+
tagsParamsCount: 2,
|
|
13408
|
+
resultFromTags: async (s: StorageProvider, auth: sdk.AuthId, vargs: ValidListOutputsArgs, specOpTags: string[]): Promise<ListOutputsResult> => {
|
|
13409
|
+
if (specOpTags.length !== 2)
|
|
13410
|
+
throw new sdk.WERR_INVALID_PARAMETER("numberOfDesiredUTXOs and minimumDesiredUTXOValue", "valid");
|
|
13411
|
+
const numberOfDesiredUTXOs: number = verifyInteger(Number(specOpTags[0]));
|
|
13412
|
+
const minimumDesiredUTXOValue: number = verifyInteger(Number(specOpTags[1]));
|
|
13413
|
+
const basket = verifyOne(await s.findOutputBaskets({
|
|
13414
|
+
partial: { userId: verifyId(auth.userId), name: "default" }
|
|
13415
|
+
}));
|
|
13416
|
+
await s.updateOutputBasket(basket.basketId, {
|
|
13417
|
+
numberOfDesiredUTXOs,
|
|
13418
|
+
minimumDesiredUTXOValue
|
|
13419
|
+
});
|
|
13420
|
+
return { totalOutputs: 0, outputs: [] };
|
|
13421
|
+
}
|
|
13422
|
+
}
|
|
13423
|
+
};
|
|
13424
|
+
}
|
|
13425
|
+
```
|
|
13426
|
+
|
|
13427
|
+
See also: [AuthId](./client.md#interface-authid), [ListOutputsSpecOp](./storage.md#interface-listoutputsspecop), [StorageProvider](./storage.md#class-storageprovider), [TableOutput](./storage.md#interface-tableoutput), [ValidListOutputsArgs](./client.md#interface-validlistoutputsargs), [WERR_INVALID_PARAMETER](./client.md#class-werr_invalid_parameter), [specOpInvalidChange](./client.md#variable-specopinvalidchange), [specOpSetWalletChangeParams](./client.md#variable-specopsetwalletchangeparams), [specOpWalletBalance](./client.md#variable-specopwalletbalance), [verifyId](./client.md#function-verifyid), [verifyInteger](./client.md#function-verifyinteger), [verifyOne](./client.md#function-verifyone)
|
|
13428
|
+
|
|
13429
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
13430
|
+
|
|
13431
|
+
---
|
|
13432
|
+
##### Variable: getLabelToSpecOp
|
|
13433
|
+
|
|
13434
|
+
```ts
|
|
13435
|
+
getLabelToSpecOp: () => Record<string, ListActionsSpecOp> = () => {
|
|
13436
|
+
return {
|
|
13437
|
+
[sdk.specOpNoSendActions]: {
|
|
13438
|
+
name: "noSendActions",
|
|
13439
|
+
labelsToIntercept: ["abort"],
|
|
13440
|
+
setStatusFilter: () => ["nosend"],
|
|
13441
|
+
postProcess: async (s: StorageProvider, auth: sdk.AuthId, vargs: sdk.ValidListActionsArgs, specOpLabels: string[], txs: Partial<TableTransaction>[]): Promise<void> => {
|
|
13442
|
+
if (specOpLabels.indexOf("abort") >= 0) {
|
|
13443
|
+
for (const tx of txs) {
|
|
13444
|
+
if (tx.status === "nosend") {
|
|
13445
|
+
await s.abortAction(auth, { reference: tx.reference! });
|
|
13446
|
+
tx.status = "failed";
|
|
13447
|
+
}
|
|
13448
|
+
}
|
|
13449
|
+
}
|
|
13450
|
+
}
|
|
13451
|
+
},
|
|
13452
|
+
[sdk.specOpFailedActions]: {
|
|
13453
|
+
name: "failedActions",
|
|
13454
|
+
labelsToIntercept: ["unfail"],
|
|
13455
|
+
setStatusFilter: () => ["failed"],
|
|
13456
|
+
postProcess: async (s: StorageProvider, auth: sdk.AuthId, vargs: sdk.ValidListActionsArgs, specOpLabels: string[], txs: Partial<TableTransaction>[]): Promise<void> => {
|
|
13457
|
+
if (specOpLabels.indexOf("unfail") >= 0) {
|
|
13458
|
+
for (const tx of txs) {
|
|
13459
|
+
if (tx.status === "failed") {
|
|
13460
|
+
await s.updateTransaction(tx.transactionId!, { status: "unfail" });
|
|
13461
|
+
}
|
|
13462
|
+
}
|
|
13463
|
+
}
|
|
13464
|
+
}
|
|
13465
|
+
}
|
|
13466
|
+
};
|
|
13467
|
+
}
|
|
13468
|
+
```
|
|
13469
|
+
|
|
13470
|
+
See also: [AuthId](./client.md#interface-authid), [ListActionsSpecOp](./storage.md#interface-listactionsspecop), [StorageProvider](./storage.md#class-storageprovider), [TableTransaction](./storage.md#interface-tabletransaction), [ValidListActionsArgs](./client.md#interface-validlistactionsargs), [specOpFailedActions](./client.md#variable-specopfailedactions), [specOpNoSendActions](./client.md#variable-specopnosendactions)
|
|
13471
|
+
|
|
13472
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
13473
|
+
|
|
12247
13474
|
---
|
|
12248
13475
|
##### Variable: maxPossibleSatoshis
|
|
12249
13476
|
|