@1sat/wallet-toolbox 0.0.6 → 0.0.7
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/dist/OneSatWallet.d.ts +40 -17
- package/dist/OneSatWallet.js +956 -0
- package/dist/errors.js +11 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.js +12 -93764
- package/dist/indexers/Bsv21Indexer.js +232 -0
- package/dist/indexers/CosignIndexer.js +25 -0
- package/dist/indexers/FundIndexer.js +64 -0
- package/dist/indexers/InscriptionIndexer.js +115 -0
- package/dist/indexers/LockIndexer.js +42 -0
- package/dist/indexers/MapIndexer.js +62 -0
- package/dist/indexers/OpNSIndexer.js +38 -0
- package/dist/indexers/OrdLockIndexer.js +63 -0
- package/dist/indexers/OriginIndexer.js +240 -0
- package/dist/indexers/Outpoint.js +53 -0
- package/dist/indexers/SigmaIndexer.js +133 -0
- package/dist/indexers/index.js +13 -0
- package/dist/indexers/parseAddress.js +24 -0
- package/dist/indexers/types.js +18 -0
- package/dist/services/OneSatServices.d.ts +12 -4
- package/dist/services/OneSatServices.js +231 -0
- package/dist/services/client/ArcadeClient.js +107 -0
- package/dist/services/client/BaseClient.js +125 -0
- package/dist/services/client/BeefClient.js +33 -0
- package/dist/services/client/Bsv21Client.js +65 -0
- package/dist/services/client/ChaintracksClient.js +175 -0
- package/dist/services/client/OrdfsClient.js +122 -0
- package/dist/services/client/OwnerClient.js +123 -0
- package/dist/services/client/TxoClient.js +85 -0
- package/dist/services/client/index.js +8 -0
- package/dist/services/types.js +5 -0
- package/dist/signers/ReadOnlySigner.js +47 -0
- package/dist/sync/IndexedDbSyncQueue.js +355 -0
- package/dist/sync/SqliteSyncQueue.js +197 -0
- package/dist/sync/index.js +3 -0
- package/dist/sync/types.js +4 -0
- package/package.json +5 -5
package/dist/OneSatWallet.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { Transaction, type WalletInterface } from "@bsv/sdk";
|
|
2
|
+
import type { WalletStorageManager, sdk as toolboxSdk } from "@bsv/wallet-toolbox";
|
|
3
|
+
type Chain = toolboxSdk.Chain;
|
|
4
4
|
import { Outpoint } from "./indexers/Outpoint";
|
|
5
5
|
import type { Indexer, ParseContext, Txo } from "./indexers/types";
|
|
6
6
|
import { OneSatServices } from "./services/OneSatServices";
|
|
@@ -36,11 +36,11 @@ export interface OneSatWalletEvents {
|
|
|
36
36
|
type EventCallback<T> = (event: T) => void;
|
|
37
37
|
export interface OneSatWalletArgs {
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* The underlying BRC-100 wallet to wrap.
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
wallet: WalletInterface;
|
|
42
42
|
/**
|
|
43
|
-
* The storage manager
|
|
43
|
+
* The storage manager from the wallet (needed for direct storage access).
|
|
44
44
|
*/
|
|
45
45
|
storage: WalletStorageManager;
|
|
46
46
|
/**
|
|
@@ -75,14 +75,14 @@ export interface OneSatWalletArgs {
|
|
|
75
75
|
syncBatchSize?: number;
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
-
* OneSatWallet
|
|
78
|
+
* OneSatWallet wraps a BRC-100 Wallet with 1Sat-specific indexing and services.
|
|
79
79
|
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* - A private key (full signing capability)
|
|
80
|
+
* The consumer is responsible for constructing the underlying Wallet with
|
|
81
|
+
* the appropriate storage and key derivation for their environment.
|
|
83
82
|
*/
|
|
84
|
-
export declare class OneSatWallet
|
|
85
|
-
private readonly
|
|
83
|
+
export declare class OneSatWallet implements WalletInterface {
|
|
84
|
+
private readonly wallet;
|
|
85
|
+
private readonly storage;
|
|
86
86
|
private readonly indexers;
|
|
87
87
|
readonly services: OneSatServices;
|
|
88
88
|
private owners;
|
|
@@ -98,11 +98,34 @@ export declare class OneSatWallet extends Wallet {
|
|
|
98
98
|
private processorStopRequested;
|
|
99
99
|
private streamDone;
|
|
100
100
|
constructor(args: OneSatWalletArgs);
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
getPublicKey: WalletInterface["getPublicKey"];
|
|
102
|
+
revealCounterpartyKeyLinkage: WalletInterface["revealCounterpartyKeyLinkage"];
|
|
103
|
+
revealSpecificKeyLinkage: WalletInterface["revealSpecificKeyLinkage"];
|
|
104
|
+
encrypt: WalletInterface["encrypt"];
|
|
105
|
+
decrypt: WalletInterface["decrypt"];
|
|
106
|
+
createHmac: WalletInterface["createHmac"];
|
|
107
|
+
verifyHmac: WalletInterface["verifyHmac"];
|
|
108
|
+
createSignature: WalletInterface["createSignature"];
|
|
109
|
+
verifySignature: WalletInterface["verifySignature"];
|
|
110
|
+
createAction: WalletInterface["createAction"];
|
|
111
|
+
signAction: WalletInterface["signAction"];
|
|
112
|
+
abortAction: WalletInterface["abortAction"];
|
|
113
|
+
listActions: WalletInterface["listActions"];
|
|
114
|
+
internalizeAction: WalletInterface["internalizeAction"];
|
|
115
|
+
listOutputs: WalletInterface["listOutputs"];
|
|
116
|
+
relinquishOutput: WalletInterface["relinquishOutput"];
|
|
117
|
+
acquireCertificate: WalletInterface["acquireCertificate"];
|
|
118
|
+
listCertificates: WalletInterface["listCertificates"];
|
|
119
|
+
proveCertificate: WalletInterface["proveCertificate"];
|
|
120
|
+
relinquishCertificate: WalletInterface["relinquishCertificate"];
|
|
121
|
+
discoverByIdentityKey: WalletInterface["discoverByIdentityKey"];
|
|
122
|
+
discoverByAttributes: WalletInterface["discoverByAttributes"];
|
|
123
|
+
isAuthenticated: WalletInterface["isAuthenticated"];
|
|
124
|
+
waitForAuthentication: WalletInterface["waitForAuthentication"];
|
|
125
|
+
getHeight: WalletInterface["getHeight"];
|
|
126
|
+
getHeaderForHeight: WalletInterface["getHeaderForHeight"];
|
|
127
|
+
getNetwork: WalletInterface["getNetwork"];
|
|
128
|
+
getVersion: WalletInterface["getVersion"];
|
|
106
129
|
/**
|
|
107
130
|
* Subscribe to wallet events
|
|
108
131
|
*/
|