@bsv/wallet-toolbox 1.3.22 → 1.3.23
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/mobile/out/src/WalletPermissionsManager.d.ts.map +1 -1
- package/mobile/out/src/WalletPermissionsManager.js.map +1 -1
- package/mobile/out/src/index.mobile.d.ts +0 -2
- package/mobile/out/src/index.mobile.d.ts.map +1 -1
- package/mobile/out/src/index.mobile.js +0 -2
- package/mobile/out/src/index.mobile.js.map +1 -1
- package/mobile/out/src/storage/StorageIdb.d.ts +2 -1
- package/mobile/out/src/storage/StorageIdb.d.ts.map +1 -1
- package/mobile/out/src/storage/StorageIdb.js +63 -29
- package/mobile/out/src/storage/StorageIdb.js.map +1 -1
- package/mobile/out/src/storage/StorageProvider.d.ts +2 -1
- package/mobile/out/src/storage/StorageProvider.d.ts.map +1 -1
- package/mobile/out/src/storage/StorageProvider.js +75 -40
- package/mobile/out/src/storage/StorageProvider.js.map +1 -1
- package/mobile/out/src/storage/StorageReader.d.ts +2 -1
- package/mobile/out/src/storage/StorageReader.d.ts.map +1 -1
- package/mobile/out/src/storage/StorageReader.js +45 -11
- package/mobile/out/src/storage/StorageReader.js.map +1 -1
- package/mobile/out/src/storage/StorageReaderWriter.d.ts +2 -1
- package/mobile/out/src/storage/StorageReaderWriter.d.ts.map +1 -1
- package/mobile/out/src/storage/StorageReaderWriter.js +29 -29
- package/mobile/out/src/storage/StorageReaderWriter.js.map +1 -1
- package/mobile/out/src/storage/StorageSyncReader.d.ts +2 -1
- package/mobile/out/src/storage/StorageSyncReader.d.ts.map +1 -1
- package/mobile/out/src/storage/StorageSyncReader.js +36 -3
- package/mobile/out/src/storage/StorageSyncReader.js.map +1 -1
- package/mobile/out/src/storage/index.mobile.d.ts +1 -1
- package/mobile/out/src/storage/index.mobile.js +1 -1
- package/mobile/out/src/storage/remoting/StorageClient.d.ts.map +1 -1
- package/mobile/out/src/storage/remoting/StorageClient.js.map +1 -1
- package/mobile/out/src/storage/remoting/StorageMobile.d.ts +283 -0
- package/mobile/out/src/storage/remoting/StorageMobile.d.ts.map +1 -0
- package/mobile/out/src/storage/remoting/StorageMobile.js +477 -0
- package/mobile/out/src/storage/remoting/StorageMobile.js.map +1 -0
- package/mobile/package-lock.json +5 -6
- package/mobile/package.json +1 -1
- package/out/src/WalletPermissionsManager.d.ts.map +1 -1
- package/out/src/WalletPermissionsManager.js.map +1 -1
- package/out/src/index.mobile.d.ts +0 -2
- package/out/src/index.mobile.d.ts.map +1 -1
- package/out/src/index.mobile.js +0 -2
- package/out/src/index.mobile.js.map +1 -1
- package/out/src/storage/StorageIdb.d.ts +2 -1
- package/out/src/storage/StorageIdb.d.ts.map +1 -1
- package/out/src/storage/StorageIdb.js +63 -29
- package/out/src/storage/StorageIdb.js.map +1 -1
- package/out/src/storage/StorageKnex.d.ts +1 -1
- package/out/src/storage/StorageKnex.d.ts.map +1 -1
- package/out/src/storage/StorageKnex.js +10 -6
- package/out/src/storage/StorageKnex.js.map +1 -1
- package/out/src/storage/StorageProvider.d.ts +2 -1
- package/out/src/storage/StorageProvider.d.ts.map +1 -1
- package/out/src/storage/StorageProvider.js +75 -40
- package/out/src/storage/StorageProvider.js.map +1 -1
- package/out/src/storage/StorageReader.d.ts +2 -1
- package/out/src/storage/StorageReader.d.ts.map +1 -1
- package/out/src/storage/StorageReader.js +45 -11
- package/out/src/storage/StorageReader.js.map +1 -1
- package/out/src/storage/StorageReaderWriter.d.ts +2 -1
- package/out/src/storage/StorageReaderWriter.d.ts.map +1 -1
- package/out/src/storage/StorageReaderWriter.js +29 -29
- package/out/src/storage/StorageReaderWriter.js.map +1 -1
- package/out/src/storage/StorageSyncReader.d.ts +2 -1
- package/out/src/storage/StorageSyncReader.d.ts.map +1 -1
- package/out/src/storage/StorageSyncReader.js +36 -3
- package/out/src/storage/StorageSyncReader.js.map +1 -1
- package/out/src/storage/index.mobile.d.ts +1 -1
- package/out/src/storage/index.mobile.js +1 -1
- package/out/src/storage/remoting/StorageClient.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageClient.js.map +1 -1
- package/out/src/storage/remoting/StorageMobile.d.ts +283 -0
- package/out/src/storage/remoting/StorageMobile.d.ts.map +1 -0
- package/out/src/storage/remoting/StorageMobile.js +477 -0
- package/out/src/storage/remoting/StorageMobile.js.map +1 -0
- package/out/tsconfig.all.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/WalletPermissionsManager.ts +19 -8
- package/src/index.mobile.ts +0 -2
- package/src/storage/StorageIdb.ts +4 -5
- package/src/storage/StorageKnex.ts +7 -6
- package/src/storage/StorageProvider.ts +5 -9
- package/src/storage/StorageReader.ts +4 -7
- package/src/storage/StorageReaderWriter.ts +4 -8
- package/src/storage/StorageSyncReader.ts +2 -19
- package/src/storage/index.mobile.ts +1 -1
- package/src/storage/remoting/StorageClient.ts +0 -1
- package/src/storage/remoting/StorageMobile.ts +527 -0
- package/tsconfig.all.json +2 -1
- package/tsconfig.client.json +6 -0
- package/tsconfig.mobile.json +6 -0
package/package.json
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
WalletInterface,
|
|
3
|
+
Utils,
|
|
4
|
+
PushDrop,
|
|
5
|
+
LockingScript,
|
|
6
|
+
Transaction,
|
|
7
|
+
WalletProtocol,
|
|
8
|
+
Base64String,
|
|
9
|
+
PubKeyHex
|
|
10
|
+
} from '@bsv/sdk'
|
|
2
11
|
import { validateCreateActionArgs } from './sdk'
|
|
3
12
|
|
|
4
13
|
////// TODO: ADD SUPPORT FOR ADMIN COUNTERPARTIES BASED ON WALLET STORAGE
|
|
@@ -1576,7 +1585,7 @@ export class WalletPermissionsManager implements WalletInterface {
|
|
|
1576
1585
|
* @param params.basket Optional basket name to filter by
|
|
1577
1586
|
* @returns Array of permission tokens that match the filter criteria
|
|
1578
1587
|
*/
|
|
1579
|
-
public async listBasketAccess(params: { originator?: string
|
|
1588
|
+
public async listBasketAccess(params: { originator?: string; basket?: string } = {}): Promise<PermissionToken[]> {
|
|
1580
1589
|
const basketName = BASKET_MAP.basket
|
|
1581
1590
|
const tags: string[] = []
|
|
1582
1591
|
|
|
@@ -1708,12 +1717,14 @@ export class WalletPermissionsManager implements WalletInterface {
|
|
|
1708
1717
|
* @param verifier Optional verifier to filter by
|
|
1709
1718
|
* @returns Array of permission tokens that match the filter criteria
|
|
1710
1719
|
*/
|
|
1711
|
-
public async listCertificateAccess(
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1720
|
+
public async listCertificateAccess(
|
|
1721
|
+
params: {
|
|
1722
|
+
originator?: string
|
|
1723
|
+
privileged?: boolean
|
|
1724
|
+
certType?: Base64String
|
|
1725
|
+
verifier?: PubKeyHex
|
|
1726
|
+
} = {}
|
|
1727
|
+
): Promise<PermissionToken[]> {
|
|
1717
1728
|
const basketName = BASKET_MAP.certificate
|
|
1718
1729
|
const tags: string[] = []
|
|
1719
1730
|
|
package/src/index.mobile.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { deleteDB, IDBPCursorWithValue, IDBPDatabase, IDBPTransaction, openDB } from 'idb'
|
|
2
2
|
import { ListActionsResult, ListOutputsResult } from '@bsv/sdk'
|
|
3
3
|
import {
|
|
4
|
-
sdk,
|
|
5
4
|
TableCertificate,
|
|
6
5
|
TableCertificateField,
|
|
7
6
|
TableCertificateX,
|
|
@@ -18,10 +17,10 @@ import {
|
|
|
18
17
|
TableTransaction,
|
|
19
18
|
TableTxLabel,
|
|
20
19
|
TableTxLabelMap,
|
|
21
|
-
TableUser
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} from '../
|
|
20
|
+
TableUser
|
|
21
|
+
} from './schema/tables'
|
|
22
|
+
import * as sdk from '../sdk/index'
|
|
23
|
+
import { verifyOne, verifyOneOrNone } from '../utility/utilityHelpers'
|
|
25
24
|
import { StorageAdminStats, StorageProvider, StorageProviderOptions } from './StorageProvider'
|
|
26
25
|
import { StorageIdbSchema } from './schema/StorageIdbSchema'
|
|
27
26
|
import { DBType } from './StorageReader'
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ListActionsResult, ListOutputsResult
|
|
1
|
+
import { ListActionsResult, ListOutputsResult } from '@bsv/sdk'
|
|
2
2
|
import { sdk, verifyOne, verifyOneOrNone, verifyTruthy } from '../index.all'
|
|
3
3
|
import {
|
|
4
|
-
KnexMigrations,
|
|
5
4
|
outputColumnsWithoutLockingScript,
|
|
6
5
|
TableCertificate,
|
|
7
6
|
TableCertificateField,
|
|
@@ -12,7 +11,6 @@ import {
|
|
|
12
11
|
TableOutputBasket,
|
|
13
12
|
TableOutputTag,
|
|
14
13
|
TableOutputTagMap,
|
|
15
|
-
TableOutputX,
|
|
16
14
|
TableProvenTx,
|
|
17
15
|
TableProvenTxReq,
|
|
18
16
|
TableSettings,
|
|
@@ -22,8 +20,8 @@ import {
|
|
|
22
20
|
TableTxLabelMap,
|
|
23
21
|
TableUser,
|
|
24
22
|
transactionColumnsWithoutRawTx
|
|
25
|
-
} from './
|
|
26
|
-
|
|
23
|
+
} from './schema/tables'
|
|
24
|
+
import { KnexMigrations } from './schema/KnexMigrations'
|
|
27
25
|
import { Knex } from 'knex'
|
|
28
26
|
import { StorageAdminStats, StorageProvider, StorageProviderOptions } from './StorageProvider'
|
|
29
27
|
import { purgeData } from './methods/purgeData'
|
|
@@ -797,7 +795,10 @@ export class StorageKnex extends StorageProvider implements sdk.WalletStoragePro
|
|
|
797
795
|
for (let i = 0; i < count; i++) {
|
|
798
796
|
try {
|
|
799
797
|
const r = await this.knex.migrate.down(config)
|
|
800
|
-
|
|
798
|
+
if (!r) {
|
|
799
|
+
console.error(`Migration returned falsy result await this.knex.migrate.down(config)`)
|
|
800
|
+
break
|
|
801
|
+
}
|
|
801
802
|
} catch (eu: unknown) {
|
|
802
803
|
break
|
|
803
804
|
}
|
|
@@ -14,9 +14,6 @@ import {
|
|
|
14
14
|
AbortActionArgs
|
|
15
15
|
} from '@bsv/sdk'
|
|
16
16
|
import {
|
|
17
|
-
asArray,
|
|
18
|
-
asString,
|
|
19
|
-
sdk,
|
|
20
17
|
TableCertificateX,
|
|
21
18
|
TableMonitorEvent,
|
|
22
19
|
TableOutput,
|
|
@@ -26,12 +23,11 @@ import {
|
|
|
26
23
|
TableProvenTxReq,
|
|
27
24
|
TableProvenTxReqDynamics,
|
|
28
25
|
TableTransaction,
|
|
29
|
-
TableTxLabel
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} from '../index.client'
|
|
26
|
+
TableTxLabel
|
|
27
|
+
} from './schema/tables'
|
|
28
|
+
import { verifyId, verifyOne, verifyOneOrNone, verifyTruthy } from '../utility/utilityHelpers'
|
|
29
|
+
import * as sdk from '../sdk/index'
|
|
30
|
+
import { asArray, asString } from '../utility/utilityHelpers.noBuffer'
|
|
35
31
|
import { getBeefForTransaction } from './methods/getBeefForTransaction'
|
|
36
32
|
import { GetReqsAndBeefDetail, GetReqsAndBeefResult, processAction } from './methods/processAction'
|
|
37
33
|
import { attemptToPostReqsToNetwork, PostReqsToNetworkResult } from './methods/attemptToPostReqsToNetwork'
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
sdk,
|
|
3
|
-
TableCertificate,
|
|
4
2
|
TableCertificateField,
|
|
5
3
|
TableCertificateX,
|
|
6
4
|
TableCommission,
|
|
@@ -16,11 +14,10 @@ import {
|
|
|
16
14
|
TableTransaction,
|
|
17
15
|
TableTxLabel,
|
|
18
16
|
TableTxLabelMap,
|
|
19
|
-
TableUser
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} from '../index.client'
|
|
17
|
+
TableUser
|
|
18
|
+
} from './schema/tables'
|
|
19
|
+
import * as sdk from '../sdk/index'
|
|
20
|
+
import { validateSecondsSinceEpoch, verifyOneOrNone, verifyTruthy } from '../utility/utilityHelpers'
|
|
24
21
|
import { getSyncChunk } from './methods/getSyncChunk'
|
|
25
22
|
|
|
26
23
|
/**
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
randomBytesBase64,
|
|
3
|
-
sdk,
|
|
4
2
|
TableCertificate,
|
|
5
3
|
TableCertificateField,
|
|
6
4
|
TableCommission,
|
|
@@ -15,12 +13,10 @@ import {
|
|
|
15
13
|
TableTransaction,
|
|
16
14
|
TableTxLabel,
|
|
17
15
|
TableTxLabelMap,
|
|
18
|
-
TableUser
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
verifyTruthy
|
|
23
|
-
} from '../index.client'
|
|
16
|
+
TableUser
|
|
17
|
+
} from './schema/tables'
|
|
18
|
+
import { randomBytesBase64, verifyOneOrNone, verifyId, verifyOne } from '../utility/utilityHelpers'
|
|
19
|
+
import * as sdk from '../sdk/index'
|
|
24
20
|
import { createSyncMap } from './schema/entities'
|
|
25
21
|
import { StorageReader, StorageReaderOptions } from './StorageReader'
|
|
26
22
|
|
|
@@ -1,22 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
TableCertificate,
|
|
4
|
-
TableCertificateField,
|
|
5
|
-
TableCertificateX,
|
|
6
|
-
TableCommission,
|
|
7
|
-
TableOutput,
|
|
8
|
-
TableOutputBasket,
|
|
9
|
-
TableOutputTag,
|
|
10
|
-
TableOutputTagMap,
|
|
11
|
-
TableProvenTx,
|
|
12
|
-
TableProvenTxReq,
|
|
13
|
-
TableSettings,
|
|
14
|
-
TableSyncState,
|
|
15
|
-
TableTransaction,
|
|
16
|
-
TableTxLabel,
|
|
17
|
-
TableTxLabelMap,
|
|
18
|
-
TableUser
|
|
19
|
-
} from '../index.client'
|
|
1
|
+
import * as sdk from '../sdk/index'
|
|
2
|
+
import { TableSettings } from '../storage/schema/tables/TableSettings'
|
|
20
3
|
import { StorageReader } from './StorageReader'
|
|
21
4
|
|
|
22
5
|
/**
|