@1sat/wallet-toolbox 0.0.20 → 0.0.21
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/wallet/factory.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { PrivateKey } from "@bsv/sdk";
|
|
8
8
|
import { Monitor, type PermissionsManagerConfig, WalletPermissionsManager } from "@bsv/wallet-toolbox-mobile/out/src/index.client.js";
|
|
9
9
|
import { OneSatServices } from "../services/OneSatServices";
|
|
10
|
-
import { type FullSyncResult } from "./fullSync";
|
|
10
|
+
import { type FullSyncResult, type FullSyncStage } from "./fullSync";
|
|
11
11
|
type Chain = "main" | "test";
|
|
12
12
|
/**
|
|
13
13
|
* Configuration for creating a web wallet.
|
|
@@ -42,7 +42,7 @@ export interface WebWalletResult {
|
|
|
42
42
|
/** Cleanup function - stops monitor, destroys wallet */
|
|
43
43
|
destroy: () => Promise<void>;
|
|
44
44
|
/** Full sync with remote backup (only available if remoteStorageUrl was provided and connected) */
|
|
45
|
-
fullSync?: () => Promise<FullSyncResult>;
|
|
45
|
+
fullSync?: (onProgress?: (stage: FullSyncStage, message: string) => void) => Promise<FullSyncResult>;
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Create a web wallet with storage, services, permissions, and monitor.
|
package/dist/wallet/factory.js
CHANGED
|
@@ -170,11 +170,12 @@ export async function createWebWallet(config) {
|
|
|
170
170
|
};
|
|
171
171
|
// 10. Create fullSync function if remote storage is connected
|
|
172
172
|
const fullSyncFn = remoteClient
|
|
173
|
-
? async () => {
|
|
173
|
+
? async (onProgress) => {
|
|
174
174
|
return fullSync({
|
|
175
175
|
storage,
|
|
176
176
|
remoteStorage: remoteClient,
|
|
177
177
|
identityKey: identityPubKey,
|
|
178
|
+
onProgress,
|
|
178
179
|
});
|
|
179
180
|
}
|
|
180
181
|
: undefined;
|