@bsv/wallet-toolbox 1.1.11 → 1.1.13
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/.github/workflows/push.yaml +2 -2
- package/README.md +3 -22
- package/docs/README.md +8 -8
- package/docs/client.md +44 -46
- package/docs/monitor.md +2 -2
- package/docs/services.md +2 -2
- package/docs/setup.md +33 -32
- package/docs/storage.md +2 -2
- package/docs/wallet.md +44 -46
- package/out/src/Setup.d.ts.map +1 -1
- package/out/src/Setup.js.map +1 -1
- package/out/src/SetupClient.d.ts +2 -2
- package/out/src/SetupClient.d.ts.map +1 -1
- package/out/src/SetupClient.js +50 -15
- package/out/src/SetupClient.js.map +1 -1
- package/out/src/services/providers/arcServices.js.map +1 -1
- package/out/src/signer/methods/createAction.js +3 -3
- package/out/src/signer/methods/createAction.js.map +1 -1
- package/out/src/signer/methods/internalizeAction.js.map +1 -1
- package/out/src/signer/methods/signAction.js +1 -1
- package/out/src/signer/methods/signAction.js.map +1 -1
- package/out/src/storage/WalletStorageManager.d.ts +2 -2
- package/out/src/storage/WalletStorageManager.js +2 -2
- package/out/src/storage/methods/createAction.js.map +1 -1
- package/out/src/storage/methods/internalizeAction.js.map +1 -1
- package/out/src/utility/ScriptTemplateBRC29.d.ts +25 -0
- package/out/src/utility/ScriptTemplateBRC29.d.ts.map +1 -0
- package/out/src/utility/{ScriptTemplateSABPPP.js → ScriptTemplateBRC29.js} +7 -8
- package/out/src/utility/ScriptTemplateBRC29.js.map +1 -0
- package/out/src/utility/index.all.d.ts +1 -1
- package/out/src/utility/index.all.d.ts.map +1 -1
- package/out/src/utility/index.all.js +1 -1
- package/out/src/utility/index.all.js.map +1 -1
- package/out/src/utility/index.client.d.ts +1 -1
- package/out/src/utility/index.client.d.ts.map +1 -1
- package/out/src/utility/index.client.js +1 -1
- package/out/src/utility/index.client.js.map +1 -1
- package/out/test/Wallet/live/walletLive.man.test.js +2 -2
- package/out/test/Wallet/live/walletLive.man.test.js.map +1 -1
- package/out/test/utils/TestUtilsWalletStorage.d.ts +1 -2
- package/out/test/utils/TestUtilsWalletStorage.d.ts.map +1 -1
- package/out/test/utils/TestUtilsWalletStorage.js +3 -5
- package/out/test/utils/TestUtilsWalletStorage.js.map +1 -1
- package/out/test/wallet/action/createAction.test.js +30 -19
- package/out/test/wallet/action/createAction.test.js.map +1 -1
- package/out/test/wallet/action/createActionToGenerateBeefs.man.test.js.map +1 -1
- package/out/tsconfig.all.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/Setup.ts +1 -0
- package/src/SetupClient.ts +20 -16
- package/src/services/providers/arcServices.ts +1 -1
- package/src/signer/methods/createAction.ts +4 -4
- package/src/signer/methods/internalizeAction.ts +1 -1
- package/src/signer/methods/signAction.ts +2 -2
- package/src/storage/WalletStorageManager.ts +2 -2
- package/src/storage/methods/createAction.ts +2 -2
- package/src/storage/methods/internalizeAction.ts +1 -1
- package/src/utility/{ScriptTemplateSABPPP.ts → ScriptTemplateBRC29.ts} +13 -14
- package/src/utility/index.all.ts +1 -1
- package/src/utility/index.client.ts +1 -1
- package/test/Wallet/live/walletLive.man.test.ts +3 -3
- package/test/utils/TestUtilsWalletStorage.ts +6 -7
- package/test/wallet/action/createAction.test.ts +35 -28
- package/test/wallet/action/createActionToGenerateBeefs.man.test.ts +2 -2
- package/out/src/utility/ScriptTemplateSABPPP.d.ts +0 -29
- package/out/src/utility/ScriptTemplateSABPPP.d.ts.map +0 -1
- package/out/src/utility/ScriptTemplateSABPPP.js.map +0 -1
|
@@ -15,7 +15,7 @@ jobs:
|
|
|
15
15
|
node-version: ${{ matrix.node-version }}
|
|
16
16
|
- name: Cache node_modules
|
|
17
17
|
id: cache-modules
|
|
18
|
-
uses: actions/cache@
|
|
18
|
+
uses: actions/cache@v4
|
|
19
19
|
with:
|
|
20
20
|
path: node_modules
|
|
21
21
|
key: ${{ matrix.node-version }}-${{ runner.OS }}-build-${{ hashFiles('package.json') }}
|
|
@@ -46,7 +46,7 @@ jobs:
|
|
|
46
46
|
NODE_AUTH_TOKEN: ${{ secrets.BSV_NPM_TOKEN }}
|
|
47
47
|
- name: Cache node_modules
|
|
48
48
|
id: cache-modules
|
|
49
|
-
uses: actions/cache@
|
|
49
|
+
uses: actions/cache@v4
|
|
50
50
|
with:
|
|
51
51
|
path: node_modules
|
|
52
52
|
key: 20.x-${{ runner.OS }}-build-${{ hashFiles('package.json') }}
|
package/README.md
CHANGED
|
@@ -2,39 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
BSV BLOCKCHAIN | BRC100 Conforming Wallet, Wallet Storage and Wallet Signer Components
|
|
4
4
|
|
|
5
|
-
The BSV Wallet Toolbox builds on the [SDK](https://bitcoin-sv.github.io/ts-sdk) to add support for:
|
|
6
|
-
|
|
7
|
-
- Persistent UTXO and transaction history management
|
|
8
|
-
- Standardized key derivation protocols.
|
|
9
|
-
|
|
10
|
-
# Table of Contents
|
|
11
|
-
|
|
12
|
-
- [Objective](#objective)
|
|
13
|
-
- [Getting Started](#getting-started)
|
|
14
|
-
- [Features \& Deliverables](#features--deliverables)
|
|
15
|
-
- [Documentation](#documentation)
|
|
16
|
-
- [Contribution Guidelines](#contribution-guidelines)
|
|
17
|
-
- [Support \& Contacts](#support--contacts)
|
|
18
|
-
- [License](#license)
|
|
19
|
-
|
|
20
5
|
## Objective
|
|
21
6
|
|
|
22
|
-
The BSV Wallet Toolbox
|
|
7
|
+
The BSV Wallet Toolbox builds on the [SDK](https://bitcoin-sv.github.io/ts-sdk).
|
|
8
|
+
|
|
9
|
+
It aims to support building sophisticated applications and services on the BSV Blockchain technology stack.
|
|
23
10
|
|
|
24
11
|
By providing interlocking building blocks for persistent storage and protocol based key derivation, it serves as an essential toolbox for developers looking to build on the BSV Blockchain.
|
|
25
12
|
|
|
26
13
|
## Documentation
|
|
27
14
|
|
|
28
15
|
[The Docs](https://bitcoin-sv.github.io/wallet-toolbox) are available here on Github pages.
|
|
29
|
-
[Example code](https://docs.bsvblockchain.org/guides/sdks/ts/examples) is available over on our gitbook.
|
|
30
16
|
|
|
31
17
|
The Toolbox is richly documented with code-level annotations. This should show up well within editors like VSCode.
|
|
32
18
|
|
|
33
|
-
|
|
34
|
-
## Features & Deliverables
|
|
35
|
-
|
|
36
|
-
- **Feature1**: Summary of feature1.
|
|
37
|
-
|
|
38
19
|
## Contribution Guidelines
|
|
39
20
|
|
|
40
21
|
We're always looking for contributors to help us improve the SDK. Whether it's bug reports, feature requests, or pull requests - all contributions are welcome.
|
package/docs/README.md
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
The documentation is split into various pages, each covering a set of related functionality. The pages are as follows:
|
|
4
4
|
|
|
5
|
-
- [
|
|
6
|
-
- [Setup](./setup.md) —
|
|
7
|
-
- [Wallet](./wallet.md) —
|
|
8
|
-
- [Client](./client.md) —
|
|
9
|
-
- [Storage](./storage.md) —
|
|
10
|
-
- [Services](./services.md) —
|
|
11
|
-
- [Monitor](./monitor.md) —
|
|
5
|
+
- [Examples](https://bitcoin-sv.github.io/wallet-toolbox-examples/) - Getting started and specialized examples.
|
|
6
|
+
- [Setup](./setup.md) — Classes supporting wallet setup, experimentation and customization.
|
|
7
|
+
- [Wallet](./wallet.md) — Top level `Wallet` class and related APIs.
|
|
8
|
+
- [Client](./client.md) — Browser deployment friendly toolbox subset.
|
|
9
|
+
- [Storage](./storage.md) — Wallet data persistent storage classes and related APIs.
|
|
10
|
+
- [Services](./services.md) — Support for abstracted external network services.
|
|
11
|
+
- [Monitor](./monitor.md) — Background task manager for wallet action validation and processing.
|
|
12
12
|
|
|
13
13
|
## Swagger
|
|
14
14
|
|
|
@@ -76,4 +76,4 @@ const rw = await wallet.internalizeAction(args)
|
|
|
76
76
|
console.log(rw.accepted)
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
[Return to Top](#bsv-wallet-toolbox-api-documentation)
|
package/docs/client.md
CHANGED
|
@@ -30,7 +30,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
30
30
|
| [FiatExchangeRates](#interface-fiatexchangerates) | [PurgeParams](#interface-purgeparams) | [TxScriptOffsets](#interface-txscriptoffsets) |
|
|
31
31
|
| [FindCertificateFieldsArgs](#interface-findcertificatefieldsargs) | [PurgeResults](#interface-purgeresults) | [UpdateProvenTxReqWithNewProvenTxArgs](#interface-updateproventxreqwithnewproventxargs) |
|
|
32
32
|
| [FindCertificatesArgs](#interface-findcertificatesargs) | [RequestSyncChunkArgs](#interface-requestsyncchunkargs) | [UpdateProvenTxReqWithNewProvenTxResult](#interface-updateproventxreqwithnewproventxresult) |
|
|
33
|
-
| [FindCommissionsArgs](#interface-findcommissionsargs) | [
|
|
33
|
+
| [FindCommissionsArgs](#interface-findcommissionsargs) | [ScriptTemplateParamsBRC29](#interface-scripttemplateparamsbrc29) | [ValidAbortActionArgs](#interface-validabortactionargs) |
|
|
34
34
|
| [FindForUserSincePagedArgs](#interface-findforusersincepagedargs) | [ScriptTemplateUnlock](#interface-scripttemplateunlock) | [ValidAcquireCertificateArgs](#interface-validacquirecertificateargs) |
|
|
35
35
|
| [FindMonitorEventsArgs](#interface-findmonitoreventsargs) | [SetupEnv](#interface-setupenv) | [ValidAcquireDirectCertificateArgs](#interface-validacquiredirectcertificateargs) |
|
|
36
36
|
| [FindOutputBasketsArgs](#interface-findoutputbasketsargs) | [SetupWallet](#interface-setupwallet) | [ValidAcquireIssuanceCertificateArgs](#interface-validacquireissuancecertificateargs) |
|
|
@@ -1560,10 +1560,10 @@ toStorageIdentityKey: string
|
|
|
1560
1560
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1561
1561
|
|
|
1562
1562
|
---
|
|
1563
|
-
##### Interface:
|
|
1563
|
+
##### Interface: ScriptTemplateParamsBRC29
|
|
1564
1564
|
|
|
1565
1565
|
```ts
|
|
1566
|
-
export interface
|
|
1566
|
+
export interface ScriptTemplateParamsBRC29 {
|
|
1567
1567
|
derivationPrefix?: string;
|
|
1568
1568
|
derivationSuffix?: string;
|
|
1569
1569
|
keyDeriver: KeyDeriverApi;
|
|
@@ -3982,7 +3982,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
3982
3982
|
| | | |
|
|
3983
3983
|
| --- | --- | --- |
|
|
3984
3984
|
| [CertOps](#class-certops) | [PrivilegedKeyManager](#class-privilegedkeymanager) | [WERR_BAD_REQUEST](#class-werr_bad_request) |
|
|
3985
|
-
| [EntityBase](#class-entitybase) | [
|
|
3985
|
+
| [EntityBase](#class-entitybase) | [ScriptTemplateBRC29](#class-scripttemplatebrc29) | [WERR_INSUFFICIENT_FUNDS](#class-werr_insufficient_funds) |
|
|
3986
3986
|
| [EntityCertificate](#class-entitycertificate) | [ServiceCollection](#class-servicecollection) | [WERR_INTERNAL](#class-werr_internal) |
|
|
3987
3987
|
| [EntityCertificateField](#class-entitycertificatefield) | [Services](#class-services) | [WERR_INVALID_OPERATION](#class-werr_invalid_operation) |
|
|
3988
3988
|
| [EntityCommission](#class-entitycommission) | [SetupClient](#class-setupclient) | [WERR_INVALID_PARAMETER](#class-werr_invalid_parameter) |
|
|
@@ -5234,27 +5234,24 @@ destroyKey(): void
|
|
|
5234
5234
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5235
5235
|
|
|
5236
5236
|
---
|
|
5237
|
-
##### Class:
|
|
5237
|
+
##### Class: ScriptTemplateBRC29
|
|
5238
5238
|
|
|
5239
5239
|
Simple Authenticated BSV P2PKH Payment Protocol
|
|
5240
5240
|
https://brc.dev/29
|
|
5241
5241
|
|
|
5242
5242
|
```ts
|
|
5243
|
-
export class
|
|
5243
|
+
export class ScriptTemplateBRC29 implements ScriptTemplate {
|
|
5244
5244
|
p2pkh: P2PKH;
|
|
5245
|
-
constructor(public params:
|
|
5245
|
+
constructor(public params: ScriptTemplateParamsBRC29)
|
|
5246
5246
|
getKeyID()
|
|
5247
5247
|
getKeyDeriver(privKey: PrivateKey | HexString): KeyDeriverApi
|
|
5248
5248
|
lock(lockerPrivKey: string, unlockerPubKey: string): LockingScript
|
|
5249
|
-
unlock(unlockerPrivKey: string, lockerPubKey: string, sourceSatoshis?: number, lockingScript?: Script):
|
|
5250
|
-
sign: (tx: Transaction, inputIndex: number) => Promise<UnlockingScript>;
|
|
5251
|
-
estimateLength: (tx?: Transaction, inputIndex?: number) => Promise<number>;
|
|
5252
|
-
}
|
|
5249
|
+
unlock(unlockerPrivKey: string, lockerPubKey: string, sourceSatoshis?: number, lockingScript?: Script): ScriptTemplateUnlock
|
|
5253
5250
|
unlockLength = 108;
|
|
5254
5251
|
}
|
|
5255
5252
|
```
|
|
5256
5253
|
|
|
5257
|
-
See also: [
|
|
5254
|
+
See also: [ScriptTemplateParamsBRC29](./client.md#interface-scripttemplateparamsbrc29), [ScriptTemplateUnlock](./client.md#interface-scripttemplateunlock)
|
|
5258
5255
|
|
|
5259
5256
|
###### Property unlockLength
|
|
5260
5257
|
|
|
@@ -5374,21 +5371,21 @@ export abstract class SetupClient {
|
|
|
5374
5371
|
const mainPrivKey2 = PrivateKey.fromRandom();
|
|
5375
5372
|
const mainIdentityKey2 = mainPrivKey2.toPublicKey().toString();
|
|
5376
5373
|
const log = `
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
}
|
|
5390
|
-
|
|
5391
|
-
|
|
5374
|
+
# .env file template for working with wallet-toolbox Setup functions.
|
|
5375
|
+
MY_TEST_IDENTITY = '${testIdentityKey1}'
|
|
5376
|
+
MY_TEST_IDENTITY2 = '${testIdentityKey2}'
|
|
5377
|
+
MY_MAIN_IDENTITY = '${mainIdentityKey1}'
|
|
5378
|
+
MY_MAIN_IDENTITY2 = '${mainIdentityKey2}'
|
|
5379
|
+
MAIN_TAAL_API_KEY='mainnet_9596de07e92300c6287e4393594ae39c'
|
|
5380
|
+
TEST_TAAL_API_KEY='testnet_0e6cf72133b43ea2d7861da2a38684e3'
|
|
5381
|
+
MYSQL_CONNECTION='{"port":3306,"host":"127.0.0.1","user":"root","password":"<your_password>","database":"<your_database>", "timezone": "Z"}'
|
|
5382
|
+
DEV_KEYS = '{
|
|
5383
|
+
"${testIdentityKey1}": "${testPrivKey1.toString()}",
|
|
5384
|
+
"${testIdentityKey2}": "${testPrivKey2.toString()}"
|
|
5385
|
+
"${mainIdentityKey1}": "${mainPrivKey1.toString()}",
|
|
5386
|
+
"${mainIdentityKey2}": "${mainPrivKey2.toString()}"
|
|
5387
|
+
}'
|
|
5388
|
+
`;
|
|
5392
5389
|
console.log(log);
|
|
5393
5390
|
return log;
|
|
5394
5391
|
}
|
|
@@ -5477,7 +5474,7 @@ export abstract class SetupClient {
|
|
|
5477
5474
|
const address = pub.toAddress();
|
|
5478
5475
|
return { privateKey: priv, publicKey: pub, address };
|
|
5479
5476
|
}
|
|
5480
|
-
static getLockP2PKH(address: string) {
|
|
5477
|
+
static getLockP2PKH(address: string): LockingScript {
|
|
5481
5478
|
const p2pkh = new P2PKH();
|
|
5482
5479
|
const lock = p2pkh.lock(address);
|
|
5483
5480
|
return lock;
|
|
@@ -5540,7 +5537,7 @@ export abstract class SetupClient {
|
|
|
5540
5537
|
}
|
|
5541
5538
|
```
|
|
5542
5539
|
|
|
5543
|
-
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), [SetupEnv](./setup.md#interface-setupenv), [SetupWallet](./setup.md#interface-setupwallet), [SetupWalletArgs](./setup.md#interface-setupwalletargs), [SetupWalletClient](./setup.md#interface-setupwalletclient), [SetupWalletClientArgs](./setup.md#interface-setupwalletclientargs), [StorageClient](./storage.md#class-storageclient), [WERR_INVALID_OPERATION](./client.md#class-werr_invalid_operation), [WERR_INVALID_PARAMETER](./client.md#class-werr_invalid_parameter), [Wallet](./client.md#class-wallet), [WalletStorageManager](./storage.md#class-walletstoragemanager), [createAction](./storage.md#function-createaction), [verifyTruthy](./client.md#function-verifytruthy)
|
|
5540
|
+
See also: [Chain](./client.md#type-chain), [KeyPairAddress](./setup.md#interface-keypairaddress), [Monitor](./monitor.md#class-monitor), [PrivilegedKeyManager](./client.md#class-privilegedkeymanager), [ScriptTemplateUnlock](./client.md#interface-scripttemplateunlock), [Services](./services.md#class-services), [Setup](./setup.md#class-setup), [SetupEnv](./setup.md#interface-setupenv), [SetupWallet](./setup.md#interface-setupwallet), [SetupWalletArgs](./setup.md#interface-setupwalletargs), [SetupWalletClient](./setup.md#interface-setupwalletclient), [SetupWalletClientArgs](./setup.md#interface-setupwalletclientargs), [StorageClient](./storage.md#class-storageclient), [WERR_INVALID_OPERATION](./client.md#class-werr_invalid_operation), [WERR_INVALID_PARAMETER](./client.md#class-werr_invalid_parameter), [Wallet](./client.md#class-wallet), [WalletStorageManager](./storage.md#class-walletstoragemanager), [createAction](./storage.md#function-createaction), [verifyTruthy](./client.md#function-verifytruthy)
|
|
5544
5541
|
|
|
5545
5542
|
###### Method createWallet
|
|
5546
5543
|
|
|
@@ -5657,25 +5654,26 @@ static makeEnv(): string {
|
|
|
5657
5654
|
const mainPrivKey2 = PrivateKey.fromRandom();
|
|
5658
5655
|
const mainIdentityKey2 = mainPrivKey2.toPublicKey().toString();
|
|
5659
5656
|
const log = `
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
}
|
|
5673
|
-
|
|
5674
|
-
|
|
5657
|
+
# .env file template for working with wallet-toolbox Setup functions.
|
|
5658
|
+
MY_TEST_IDENTITY = '${testIdentityKey1}'
|
|
5659
|
+
MY_TEST_IDENTITY2 = '${testIdentityKey2}'
|
|
5660
|
+
MY_MAIN_IDENTITY = '${mainIdentityKey1}'
|
|
5661
|
+
MY_MAIN_IDENTITY2 = '${mainIdentityKey2}'
|
|
5662
|
+
MAIN_TAAL_API_KEY='mainnet_9596de07e92300c6287e4393594ae39c'
|
|
5663
|
+
TEST_TAAL_API_KEY='testnet_0e6cf72133b43ea2d7861da2a38684e3'
|
|
5664
|
+
MYSQL_CONNECTION='{"port":3306,"host":"127.0.0.1","user":"root","password":"<your_password>","database":"<your_database>", "timezone": "Z"}'
|
|
5665
|
+
DEV_KEYS = '{
|
|
5666
|
+
"${testIdentityKey1}": "${testPrivKey1.toString()}",
|
|
5667
|
+
"${testIdentityKey2}": "${testPrivKey2.toString()}"
|
|
5668
|
+
"${mainIdentityKey1}": "${mainPrivKey1.toString()}",
|
|
5669
|
+
"${mainIdentityKey2}": "${mainPrivKey2.toString()}"
|
|
5670
|
+
}'
|
|
5671
|
+
`;
|
|
5675
5672
|
console.log(log);
|
|
5676
5673
|
return log;
|
|
5677
5674
|
}
|
|
5678
5675
|
```
|
|
5676
|
+
See also: [Setup](./setup.md#class-setup)
|
|
5679
5677
|
|
|
5680
5678
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5681
5679
|
|
|
@@ -7343,13 +7341,13 @@ The `WalletStorageManager` class delivers authentication checking storage access
|
|
|
7343
7341
|
If manages multiple `StorageBase` derived storage services: one actice, the rest as backups.
|
|
7344
7342
|
|
|
7345
7343
|
Of the storage services, one is 'active' at any one time.
|
|
7346
|
-
On startup, and whenever triggered by the wallet, `
|
|
7344
|
+
On startup, and whenever triggered by the wallet, `WalletStorageManager` runs a syncrhonization sequence:
|
|
7347
7345
|
|
|
7348
7346
|
1. While synchronizing, all other access to storage is blocked waiting.
|
|
7349
7347
|
2. The active service is confirmed, potentially triggering a resolution process if there is disagreement.
|
|
7350
7348
|
3. Changes are pushed from the active storage service to each inactive, backup service.
|
|
7351
7349
|
|
|
7352
|
-
Some storage services do not support multiple writers. `
|
|
7350
|
+
Some storage services do not support multiple writers. `WalletStorageManager` manages wait-blocking write requests
|
|
7353
7351
|
for these services.
|
|
7354
7352
|
|
|
7355
7353
|
```ts
|
package/docs/monitor.md
CHANGED
|
@@ -8,7 +8,7 @@ To function properly, a wallet must be able to perform a number of house keeping
|
|
|
8
8
|
1. Obtain and merge proofs when transactions are mined.
|
|
9
9
|
1. Detect and propagate transactions that fail due to double-spend, reorgs, or other reasons.
|
|
10
10
|
|
|
11
|
-
These tasks are the
|
|
11
|
+
These tasks are the responsibility of the [Monitor](#class-monitor) class.
|
|
12
12
|
|
|
13
13
|
[Return To Top](./README.md)
|
|
14
14
|
|
|
@@ -621,4 +621,4 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
621
621
|
#### Variables
|
|
622
622
|
|
|
623
623
|
|
|
624
|
-
<!--#endregion ts2md-api-merged-here-->
|
|
624
|
+
<!--#endregion ts2md-api-merged-here-->
|
package/docs/services.md
CHANGED
|
@@ -10,7 +10,7 @@ To function properly, a wallet makes use of a variety of services provided by th
|
|
|
10
10
|
2. Obtain block headers for proof validation.
|
|
11
11
|
3. Obtain exchange rates for UI and fee calculations.
|
|
12
12
|
|
|
13
|
-
These tasks are the
|
|
13
|
+
These tasks are the responsibility of the [Services](#class-services) class.
|
|
14
14
|
|
|
15
15
|
[Return To Top](./README.md)
|
|
16
16
|
|
|
@@ -494,4 +494,4 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
494
494
|
#### Variables
|
|
495
495
|
|
|
496
496
|
|
|
497
|
-
<!--#endregion ts2md-api-merged-here-->
|
|
497
|
+
<!--#endregion ts2md-api-merged-here-->
|
package/docs/setup.md
CHANGED
|
@@ -559,21 +559,21 @@ export abstract class SetupClient {
|
|
|
559
559
|
const mainPrivKey2 = PrivateKey.fromRandom();
|
|
560
560
|
const mainIdentityKey2 = mainPrivKey2.toPublicKey().toString();
|
|
561
561
|
const log = `
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
|
|
562
|
+
# .env file template for working with wallet-toolbox Setup functions.
|
|
563
|
+
MY_TEST_IDENTITY = '${testIdentityKey1}'
|
|
564
|
+
MY_TEST_IDENTITY2 = '${testIdentityKey2}'
|
|
565
|
+
MY_MAIN_IDENTITY = '${mainIdentityKey1}'
|
|
566
|
+
MY_MAIN_IDENTITY2 = '${mainIdentityKey2}'
|
|
567
|
+
MAIN_TAAL_API_KEY='mainnet_9596de07e92300c6287e4393594ae39c'
|
|
568
|
+
TEST_TAAL_API_KEY='testnet_0e6cf72133b43ea2d7861da2a38684e3'
|
|
569
|
+
MYSQL_CONNECTION='{"port":3306,"host":"127.0.0.1","user":"root","password":"<your_password>","database":"<your_database>", "timezone": "Z"}'
|
|
570
|
+
DEV_KEYS = '{
|
|
571
|
+
"${testIdentityKey1}": "${testPrivKey1.toString()}",
|
|
572
|
+
"${testIdentityKey2}": "${testPrivKey2.toString()}"
|
|
573
|
+
"${mainIdentityKey1}": "${mainPrivKey1.toString()}",
|
|
574
|
+
"${mainIdentityKey2}": "${mainPrivKey2.toString()}"
|
|
575
|
+
}'
|
|
576
|
+
`;
|
|
577
577
|
console.log(log);
|
|
578
578
|
return log;
|
|
579
579
|
}
|
|
@@ -662,7 +662,7 @@ export abstract class SetupClient {
|
|
|
662
662
|
const address = pub.toAddress();
|
|
663
663
|
return { privateKey: priv, publicKey: pub, address };
|
|
664
664
|
}
|
|
665
|
-
static getLockP2PKH(address: string) {
|
|
665
|
+
static getLockP2PKH(address: string): LockingScript {
|
|
666
666
|
const p2pkh = new P2PKH();
|
|
667
667
|
const lock = p2pkh.lock(address);
|
|
668
668
|
return lock;
|
|
@@ -725,7 +725,7 @@ export abstract class SetupClient {
|
|
|
725
725
|
}
|
|
726
726
|
```
|
|
727
727
|
|
|
728
|
-
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), [SetupEnv](./setup.md#interface-setupenv), [SetupWallet](./setup.md#interface-setupwallet), [SetupWalletArgs](./setup.md#interface-setupwalletargs), [SetupWalletClient](./setup.md#interface-setupwalletclient), [SetupWalletClientArgs](./setup.md#interface-setupwalletclientargs), [StorageClient](./storage.md#class-storageclient), [WERR_INVALID_OPERATION](./client.md#class-werr_invalid_operation), [WERR_INVALID_PARAMETER](./client.md#class-werr_invalid_parameter), [Wallet](./client.md#class-wallet), [WalletStorageManager](./storage.md#class-walletstoragemanager), [createAction](./storage.md#function-createaction), [verifyTruthy](./client.md#function-verifytruthy)
|
|
728
|
+
See also: [Chain](./client.md#type-chain), [KeyPairAddress](./setup.md#interface-keypairaddress), [Monitor](./monitor.md#class-monitor), [PrivilegedKeyManager](./client.md#class-privilegedkeymanager), [ScriptTemplateUnlock](./client.md#interface-scripttemplateunlock), [Services](./services.md#class-services), [Setup](./setup.md#class-setup), [SetupEnv](./setup.md#interface-setupenv), [SetupWallet](./setup.md#interface-setupwallet), [SetupWalletArgs](./setup.md#interface-setupwalletargs), [SetupWalletClient](./setup.md#interface-setupwalletclient), [SetupWalletClientArgs](./setup.md#interface-setupwalletclientargs), [StorageClient](./storage.md#class-storageclient), [WERR_INVALID_OPERATION](./client.md#class-werr_invalid_operation), [WERR_INVALID_PARAMETER](./client.md#class-werr_invalid_parameter), [Wallet](./client.md#class-wallet), [WalletStorageManager](./storage.md#class-walletstoragemanager), [createAction](./storage.md#function-createaction), [verifyTruthy](./client.md#function-verifytruthy)
|
|
729
729
|
|
|
730
730
|
###### Method createWallet
|
|
731
731
|
|
|
@@ -842,25 +842,26 @@ static makeEnv(): string {
|
|
|
842
842
|
const mainPrivKey2 = PrivateKey.fromRandom();
|
|
843
843
|
const mainIdentityKey2 = mainPrivKey2.toPublicKey().toString();
|
|
844
844
|
const log = `
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
|
|
845
|
+
# .env file template for working with wallet-toolbox Setup functions.
|
|
846
|
+
MY_TEST_IDENTITY = '${testIdentityKey1}'
|
|
847
|
+
MY_TEST_IDENTITY2 = '${testIdentityKey2}'
|
|
848
|
+
MY_MAIN_IDENTITY = '${mainIdentityKey1}'
|
|
849
|
+
MY_MAIN_IDENTITY2 = '${mainIdentityKey2}'
|
|
850
|
+
MAIN_TAAL_API_KEY='mainnet_9596de07e92300c6287e4393594ae39c'
|
|
851
|
+
TEST_TAAL_API_KEY='testnet_0e6cf72133b43ea2d7861da2a38684e3'
|
|
852
|
+
MYSQL_CONNECTION='{"port":3306,"host":"127.0.0.1","user":"root","password":"<your_password>","database":"<your_database>", "timezone": "Z"}'
|
|
853
|
+
DEV_KEYS = '{
|
|
854
|
+
"${testIdentityKey1}": "${testPrivKey1.toString()}",
|
|
855
|
+
"${testIdentityKey2}": "${testPrivKey2.toString()}"
|
|
856
|
+
"${mainIdentityKey1}": "${mainPrivKey1.toString()}",
|
|
857
|
+
"${mainIdentityKey2}": "${mainPrivKey2.toString()}"
|
|
858
|
+
}'
|
|
859
|
+
`;
|
|
860
860
|
console.log(log);
|
|
861
861
|
return log;
|
|
862
862
|
}
|
|
863
863
|
```
|
|
864
|
+
See also: [Setup](./setup.md#class-setup)
|
|
864
865
|
|
|
865
866
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
866
867
|
|
package/docs/storage.md
CHANGED
|
@@ -3478,13 +3478,13 @@ The `WalletStorageManager` class delivers authentication checking storage access
|
|
|
3478
3478
|
If manages multiple `StorageBase` derived storage services: one actice, the rest as backups.
|
|
3479
3479
|
|
|
3480
3480
|
Of the storage services, one is 'active' at any one time.
|
|
3481
|
-
On startup, and whenever triggered by the wallet, `
|
|
3481
|
+
On startup, and whenever triggered by the wallet, `WalletStorageManager` runs a syncrhonization sequence:
|
|
3482
3482
|
|
|
3483
3483
|
1. While synchronizing, all other access to storage is blocked waiting.
|
|
3484
3484
|
2. The active service is confirmed, potentially triggering a resolution process if there is disagreement.
|
|
3485
3485
|
3. Changes are pushed from the active storage service to each inactive, backup service.
|
|
3486
3486
|
|
|
3487
|
-
Some storage services do not support multiple writers. `
|
|
3487
|
+
Some storage services do not support multiple writers. `WalletStorageManager` manages wait-blocking write requests
|
|
3488
3488
|
for these services.
|
|
3489
3489
|
|
|
3490
3490
|
```ts
|
package/docs/wallet.md
CHANGED
|
@@ -29,7 +29,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
29
29
|
| [FiatExchangeRates](#interface-fiatexchangerates) | [PurgeParams](#interface-purgeparams) | [TxScriptOffsets](#interface-txscriptoffsets) |
|
|
30
30
|
| [FindCertificateFieldsArgs](#interface-findcertificatefieldsargs) | [PurgeResults](#interface-purgeresults) | [UpdateProvenTxReqWithNewProvenTxArgs](#interface-updateproventxreqwithnewproventxargs) |
|
|
31
31
|
| [FindCertificatesArgs](#interface-findcertificatesargs) | [RequestSyncChunkArgs](#interface-requestsyncchunkargs) | [UpdateProvenTxReqWithNewProvenTxResult](#interface-updateproventxreqwithnewproventxresult) |
|
|
32
|
-
| [FindCommissionsArgs](#interface-findcommissionsargs) | [
|
|
32
|
+
| [FindCommissionsArgs](#interface-findcommissionsargs) | [ScriptTemplateParamsBRC29](#interface-scripttemplateparamsbrc29) | [ValidAbortActionArgs](#interface-validabortactionargs) |
|
|
33
33
|
| [FindForUserSincePagedArgs](#interface-findforusersincepagedargs) | [ScriptTemplateUnlock](#interface-scripttemplateunlock) | [ValidAcquireCertificateArgs](#interface-validacquirecertificateargs) |
|
|
34
34
|
| [FindMonitorEventsArgs](#interface-findmonitoreventsargs) | [SetupEnv](#interface-setupenv) | [ValidAcquireDirectCertificateArgs](#interface-validacquiredirectcertificateargs) |
|
|
35
35
|
| [FindOutputBasketsArgs](#interface-findoutputbasketsargs) | [SetupWallet](#interface-setupwallet) | [ValidAcquireIssuanceCertificateArgs](#interface-validacquireissuancecertificateargs) |
|
|
@@ -1559,10 +1559,10 @@ toStorageIdentityKey: string
|
|
|
1559
1559
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1560
1560
|
|
|
1561
1561
|
---
|
|
1562
|
-
##### Interface:
|
|
1562
|
+
##### Interface: ScriptTemplateParamsBRC29
|
|
1563
1563
|
|
|
1564
1564
|
```ts
|
|
1565
|
-
export interface
|
|
1565
|
+
export interface ScriptTemplateParamsBRC29 {
|
|
1566
1566
|
derivationPrefix?: string;
|
|
1567
1567
|
derivationSuffix?: string;
|
|
1568
1568
|
keyDeriver: KeyDeriverApi;
|
|
@@ -3981,7 +3981,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
3981
3981
|
| | | |
|
|
3982
3982
|
| --- | --- | --- |
|
|
3983
3983
|
| [CertOps](#class-certops) | [PrivilegedKeyManager](#class-privilegedkeymanager) | [WERR_BAD_REQUEST](#class-werr_bad_request) |
|
|
3984
|
-
| [EntityBase](#class-entitybase) | [
|
|
3984
|
+
| [EntityBase](#class-entitybase) | [ScriptTemplateBRC29](#class-scripttemplatebrc29) | [WERR_INSUFFICIENT_FUNDS](#class-werr_insufficient_funds) |
|
|
3985
3985
|
| [EntityCertificate](#class-entitycertificate) | [ServiceCollection](#class-servicecollection) | [WERR_INTERNAL](#class-werr_internal) |
|
|
3986
3986
|
| [EntityCertificateField](#class-entitycertificatefield) | [Services](#class-services) | [WERR_INVALID_OPERATION](#class-werr_invalid_operation) |
|
|
3987
3987
|
| [EntityCommission](#class-entitycommission) | [SetupClient](#class-setupclient) | [WERR_INVALID_PARAMETER](#class-werr_invalid_parameter) |
|
|
@@ -5233,27 +5233,24 @@ destroyKey(): void
|
|
|
5233
5233
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5234
5234
|
|
|
5235
5235
|
---
|
|
5236
|
-
##### Class:
|
|
5236
|
+
##### Class: ScriptTemplateBRC29
|
|
5237
5237
|
|
|
5238
5238
|
Simple Authenticated BSV P2PKH Payment Protocol
|
|
5239
5239
|
https://brc.dev/29
|
|
5240
5240
|
|
|
5241
5241
|
```ts
|
|
5242
|
-
export class
|
|
5242
|
+
export class ScriptTemplateBRC29 implements ScriptTemplate {
|
|
5243
5243
|
p2pkh: P2PKH;
|
|
5244
|
-
constructor(public params:
|
|
5244
|
+
constructor(public params: ScriptTemplateParamsBRC29)
|
|
5245
5245
|
getKeyID()
|
|
5246
5246
|
getKeyDeriver(privKey: PrivateKey | HexString): KeyDeriverApi
|
|
5247
5247
|
lock(lockerPrivKey: string, unlockerPubKey: string): LockingScript
|
|
5248
|
-
unlock(unlockerPrivKey: string, lockerPubKey: string, sourceSatoshis?: number, lockingScript?: Script):
|
|
5249
|
-
sign: (tx: Transaction, inputIndex: number) => Promise<UnlockingScript>;
|
|
5250
|
-
estimateLength: (tx?: Transaction, inputIndex?: number) => Promise<number>;
|
|
5251
|
-
}
|
|
5248
|
+
unlock(unlockerPrivKey: string, lockerPubKey: string, sourceSatoshis?: number, lockingScript?: Script): ScriptTemplateUnlock
|
|
5252
5249
|
unlockLength = 108;
|
|
5253
5250
|
}
|
|
5254
5251
|
```
|
|
5255
5252
|
|
|
5256
|
-
See also: [
|
|
5253
|
+
See also: [ScriptTemplateParamsBRC29](./client.md#interface-scripttemplateparamsbrc29), [ScriptTemplateUnlock](./client.md#interface-scripttemplateunlock)
|
|
5257
5254
|
|
|
5258
5255
|
###### Property unlockLength
|
|
5259
5256
|
|
|
@@ -5373,21 +5370,21 @@ export abstract class SetupClient {
|
|
|
5373
5370
|
const mainPrivKey2 = PrivateKey.fromRandom();
|
|
5374
5371
|
const mainIdentityKey2 = mainPrivKey2.toPublicKey().toString();
|
|
5375
5372
|
const log = `
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
}
|
|
5389
|
-
|
|
5390
|
-
|
|
5373
|
+
# .env file template for working with wallet-toolbox Setup functions.
|
|
5374
|
+
MY_TEST_IDENTITY = '${testIdentityKey1}'
|
|
5375
|
+
MY_TEST_IDENTITY2 = '${testIdentityKey2}'
|
|
5376
|
+
MY_MAIN_IDENTITY = '${mainIdentityKey1}'
|
|
5377
|
+
MY_MAIN_IDENTITY2 = '${mainIdentityKey2}'
|
|
5378
|
+
MAIN_TAAL_API_KEY='mainnet_9596de07e92300c6287e4393594ae39c'
|
|
5379
|
+
TEST_TAAL_API_KEY='testnet_0e6cf72133b43ea2d7861da2a38684e3'
|
|
5380
|
+
MYSQL_CONNECTION='{"port":3306,"host":"127.0.0.1","user":"root","password":"<your_password>","database":"<your_database>", "timezone": "Z"}'
|
|
5381
|
+
DEV_KEYS = '{
|
|
5382
|
+
"${testIdentityKey1}": "${testPrivKey1.toString()}",
|
|
5383
|
+
"${testIdentityKey2}": "${testPrivKey2.toString()}"
|
|
5384
|
+
"${mainIdentityKey1}": "${mainPrivKey1.toString()}",
|
|
5385
|
+
"${mainIdentityKey2}": "${mainPrivKey2.toString()}"
|
|
5386
|
+
}'
|
|
5387
|
+
`;
|
|
5391
5388
|
console.log(log);
|
|
5392
5389
|
return log;
|
|
5393
5390
|
}
|
|
@@ -5476,7 +5473,7 @@ export abstract class SetupClient {
|
|
|
5476
5473
|
const address = pub.toAddress();
|
|
5477
5474
|
return { privateKey: priv, publicKey: pub, address };
|
|
5478
5475
|
}
|
|
5479
|
-
static getLockP2PKH(address: string) {
|
|
5476
|
+
static getLockP2PKH(address: string): LockingScript {
|
|
5480
5477
|
const p2pkh = new P2PKH();
|
|
5481
5478
|
const lock = p2pkh.lock(address);
|
|
5482
5479
|
return lock;
|
|
@@ -5539,7 +5536,7 @@ export abstract class SetupClient {
|
|
|
5539
5536
|
}
|
|
5540
5537
|
```
|
|
5541
5538
|
|
|
5542
|
-
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), [SetupEnv](./setup.md#interface-setupenv), [SetupWallet](./setup.md#interface-setupwallet), [SetupWalletArgs](./setup.md#interface-setupwalletargs), [SetupWalletClient](./setup.md#interface-setupwalletclient), [SetupWalletClientArgs](./setup.md#interface-setupwalletclientargs), [StorageClient](./storage.md#class-storageclient), [WERR_INVALID_OPERATION](./client.md#class-werr_invalid_operation), [WERR_INVALID_PARAMETER](./client.md#class-werr_invalid_parameter), [Wallet](./client.md#class-wallet), [WalletStorageManager](./storage.md#class-walletstoragemanager), [createAction](./storage.md#function-createaction), [verifyTruthy](./client.md#function-verifytruthy)
|
|
5539
|
+
See also: [Chain](./client.md#type-chain), [KeyPairAddress](./setup.md#interface-keypairaddress), [Monitor](./monitor.md#class-monitor), [PrivilegedKeyManager](./client.md#class-privilegedkeymanager), [ScriptTemplateUnlock](./client.md#interface-scripttemplateunlock), [Services](./services.md#class-services), [Setup](./setup.md#class-setup), [SetupEnv](./setup.md#interface-setupenv), [SetupWallet](./setup.md#interface-setupwallet), [SetupWalletArgs](./setup.md#interface-setupwalletargs), [SetupWalletClient](./setup.md#interface-setupwalletclient), [SetupWalletClientArgs](./setup.md#interface-setupwalletclientargs), [StorageClient](./storage.md#class-storageclient), [WERR_INVALID_OPERATION](./client.md#class-werr_invalid_operation), [WERR_INVALID_PARAMETER](./client.md#class-werr_invalid_parameter), [Wallet](./client.md#class-wallet), [WalletStorageManager](./storage.md#class-walletstoragemanager), [createAction](./storage.md#function-createaction), [verifyTruthy](./client.md#function-verifytruthy)
|
|
5543
5540
|
|
|
5544
5541
|
###### Method createWallet
|
|
5545
5542
|
|
|
@@ -5656,25 +5653,26 @@ static makeEnv(): string {
|
|
|
5656
5653
|
const mainPrivKey2 = PrivateKey.fromRandom();
|
|
5657
5654
|
const mainIdentityKey2 = mainPrivKey2.toPublicKey().toString();
|
|
5658
5655
|
const log = `
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
}
|
|
5672
|
-
|
|
5673
|
-
|
|
5656
|
+
# .env file template for working with wallet-toolbox Setup functions.
|
|
5657
|
+
MY_TEST_IDENTITY = '${testIdentityKey1}'
|
|
5658
|
+
MY_TEST_IDENTITY2 = '${testIdentityKey2}'
|
|
5659
|
+
MY_MAIN_IDENTITY = '${mainIdentityKey1}'
|
|
5660
|
+
MY_MAIN_IDENTITY2 = '${mainIdentityKey2}'
|
|
5661
|
+
MAIN_TAAL_API_KEY='mainnet_9596de07e92300c6287e4393594ae39c'
|
|
5662
|
+
TEST_TAAL_API_KEY='testnet_0e6cf72133b43ea2d7861da2a38684e3'
|
|
5663
|
+
MYSQL_CONNECTION='{"port":3306,"host":"127.0.0.1","user":"root","password":"<your_password>","database":"<your_database>", "timezone": "Z"}'
|
|
5664
|
+
DEV_KEYS = '{
|
|
5665
|
+
"${testIdentityKey1}": "${testPrivKey1.toString()}",
|
|
5666
|
+
"${testIdentityKey2}": "${testPrivKey2.toString()}"
|
|
5667
|
+
"${mainIdentityKey1}": "${mainPrivKey1.toString()}",
|
|
5668
|
+
"${mainIdentityKey2}": "${mainPrivKey2.toString()}"
|
|
5669
|
+
}'
|
|
5670
|
+
`;
|
|
5674
5671
|
console.log(log);
|
|
5675
5672
|
return log;
|
|
5676
5673
|
}
|
|
5677
5674
|
```
|
|
5675
|
+
See also: [Setup](./setup.md#class-setup)
|
|
5678
5676
|
|
|
5679
5677
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5680
5678
|
|
|
@@ -7342,13 +7340,13 @@ The `WalletStorageManager` class delivers authentication checking storage access
|
|
|
7342
7340
|
If manages multiple `StorageBase` derived storage services: one actice, the rest as backups.
|
|
7343
7341
|
|
|
7344
7342
|
Of the storage services, one is 'active' at any one time.
|
|
7345
|
-
On startup, and whenever triggered by the wallet, `
|
|
7343
|
+
On startup, and whenever triggered by the wallet, `WalletStorageManager` runs a syncrhonization sequence:
|
|
7346
7344
|
|
|
7347
7345
|
1. While synchronizing, all other access to storage is blocked waiting.
|
|
7348
7346
|
2. The active service is confirmed, potentially triggering a resolution process if there is disagreement.
|
|
7349
7347
|
3. Changes are pushed from the active storage service to each inactive, backup service.
|
|
7350
7348
|
|
|
7351
|
-
Some storage services do not support multiple writers. `
|
|
7349
|
+
Some storage services do not support multiple writers. `WalletStorageManager` manages wait-blocking write requests
|
|
7352
7350
|
for these services.
|
|
7353
7351
|
|
|
7354
7352
|
```ts
|
package/out/src/Setup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Setup.d.ts","sourceRoot":"","sources":["../../src/Setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,M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IAC1D,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,eAAe;IAC3D,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,WAAW;IAClD,aAAa,EAAE,WAAW,CAAA;IAC1B,MAAM,EAAE,MAAM,CAAA;IAEd,OAAO,EAAE,UAAU,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,EAAE,GAAG,CAAC,KAAK,CAAA;IAChB,OAAO,EAAE,oBAAoB,CAAA;IAC7B,QAAQ,EAAE,QAAQ,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;CACf"}
|
package/out/src/Setup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Setup.js","sourceRoot":"","sources":["../../src/Setup.ts"],"names":[],"mappings":";;;AACA,iDAOuB;AACvB,+BAA6C;AAC7C,2CAAuE;AAEvE;;;;;;;;;GASG;AACH,MAAsB,KAAM,SAAQ,0BAAW;
|
|
1
|
+
{"version":3,"file":"Setup.js","sourceRoot":"","sources":["../../src/Setup.ts"],"names":[],"mappings":";;;AACA,iDAOuB;AACvB,+BAA6C;AAC7C,2CAAuE;AAEvE;;;;;;;;;GASG;AACH,MAAsB,KAAM,SAAQ,0BAAW;IAE7C;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAC3B,IAAyB;QAEzB,MAAM,EAAE,GAAG,MAAM,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA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