@1sat/wallet-browser 0.0.18 → 0.0.19

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.
@@ -1,76 +1,30 @@
1
- /**
2
- * Factory for creating web wallets.
3
- *
4
- * This consolidates the common wallet setup used by both yours-wallet
5
- * (browser extension) and 1sat-website (React app).
6
- */
7
- import { OneSatServices } from '@1sat/client';
8
- import { PrivateKey } from '@bsv/sdk';
1
+ import type { OneSatServices } from '@1sat/client';
2
+ import type { PrivateKey } from '@bsv/sdk';
9
3
  import { Monitor, StorageClient, Wallet, WalletStorageManager } from '@bsv/wallet-toolbox/out/src/index.client.js';
10
- import { type FullSyncResult, type FullSyncStage } from './fullSync';
11
4
  import type { MonitorEvent } from './types';
12
- type Chain = 'main' | 'test';
13
- /**
14
- * Configuration for creating a web wallet.
15
- */
16
5
  export interface WebWalletConfig {
17
- /** Private key - can be PrivateKey instance, WIF string, or hex string */
18
6
  privateKey: PrivateKey | string;
19
- /** Network: 'main' or 'test' */
20
- chain: Chain;
21
- /** Fee model. Default: { model: 'sat/kb', value: 100 } */
7
+ chain: 'main' | 'test';
22
8
  feeModel?: {
23
9
  model: 'sat/kb';
24
10
  value: number;
25
11
  };
26
- /** Remote storage URL. If provided, attempts to connect for cloud backup. */
27
- remoteStorageUrl?: string;
28
- /** Unique identifier for this storage instance. Must be persisted by the consuming application and reused across sessions. Different devices should use different values to isolate sync state. */
12
+ activeRemote?: string;
13
+ backups?: string[];
29
14
  storageIdentityKey: string;
30
- /** Callback when a transaction is broadcasted (called after remote sync if connected) */
15
+ connectionTimeout?: number;
31
16
  onTransactionBroadcasted?: (txid: string) => void;
32
- /** Callback when a transaction is proven (called after remote sync if connected) */
33
17
  onTransactionProven?: (txid: string, blockHeight: number) => void;
34
- /** Typed monitor event callback for structured lifecycle events */
35
18
  onMonitorEvent?: (event: MonitorEvent) => void;
36
19
  }
37
- /**
38
- * Result of wallet creation.
39
- */
40
20
  export interface WebWalletResult {
41
- /** Wallet instance */
42
21
  wallet: Wallet;
43
- /** 1Sat services for API access */
44
22
  services: OneSatServices;
45
- /** Monitor for transaction lifecycle (not started - call monitor.startTasks() when ready) */
46
- monitor: Monitor;
47
- /** Cleanup function - stops monitor, destroys wallet */
23
+ monitor?: Monitor;
48
24
  destroy: () => Promise<void>;
49
- /** Full sync with remote backup (only available if remoteStorageUrl was provided and connected) */
50
- fullSync?: (onProgress?: (stage: FullSyncStage, message: string) => void) => Promise<FullSyncResult>;
51
- /** Storage manager (for debugging/diagnostics) */
52
25
  storage: WalletStorageManager;
53
- /** Remote storage client (for debugging/diagnostics, undefined if not connected) */
54
26
  remoteStorage?: StorageClient;
27
+ migrateRemote: (url: string) => Promise<void>;
55
28
  }
56
- /**
57
- * Create a web wallet with storage, services, and monitor.
58
- *
59
- * @example
60
- * ```typescript
61
- * const { wallet, services, monitor, destroy } = await createWebWallet({
62
- * privateKey: identityWif,
63
- * chain: 'main',
64
- * storageIdentityKey: 'device-unique-id',
65
- * });
66
- *
67
- * // Wire up monitor callbacks
68
- * monitor.onTransactionProven = async (status) => console.log('Proven:', status.txid);
69
- *
70
- * // Start monitor when ready
71
- * monitor.startTasks();
72
- * ```
73
- */
74
29
  export declare function createWebWallet(config: WebWalletConfig): Promise<WebWalletResult>;
75
- export {};
76
30
  //# sourceMappingURL=createWebWallet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createWebWallet.d.ts","sourceRoot":"","sources":["../src/createWebWallet.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAc,UAAU,EAAwB,MAAM,UAAU,CAAA;AAEvE,OAAO,EACN,OAAO,EAEP,aAAa,EAGb,MAAM,EACN,oBAAoB,EACpB,MAAM,6CAA6C,CAAA;AACpD,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAY,MAAM,YAAY,CAAA;AAC9E,OAAO,KAAK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AE,oBAAoB,CAAA;IAC7B,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAC7C;AAED,wBAAsB,eAAe,CACpC,MAAM,EAAE,eAAe,GACrB,OAAO,CAAC,eAAe,CAAC,CA6D1B"}
@@ -1,272 +1,61 @@
1
- /**
2
- * Factory for creating web wallets.
3
- *
4
- * This consolidates the common wallet setup used by both yours-wallet
5
- * (browser extension) and 1sat-website (React app).
6
- */
7
- import { OneSatServices } from '@1sat/client';
8
- import { KeyDeriver, PrivateKey } from '@bsv/sdk';
1
+ import { createWalletCore, DEFAULT_FEE_MODEL, } from '@1sat/wallet';
9
2
  import { Monitor, Services, StorageClient, StorageIdb, StorageProvider, Wallet, WalletStorageManager, } from '@bsv/wallet-toolbox/out/src/index.client.js';
10
- import { fullSync } from './fullSync';
11
- // Default database name for IndexedDB storage
12
3
  const DEFAULT_DATABASE_NAME = 'wallet';
13
- // Default timeout for remote storage connection
14
- const DEFAULT_REMOTE_STORAGE_TIMEOUT = 5000;
15
- // Default fee model (100 sat/kb matches yours-wallet and 1sat-indexer minimum)
16
- const DEFAULT_FEE_MODEL = { model: 'sat/kb', value: 100 };
17
- /**
18
- * Parse a private key from various input formats.
19
- * Supports PrivateKey instance, WIF string, or hex string.
20
- */
21
- function parsePrivateKey(input) {
22
- if (input instanceof PrivateKey) {
23
- return input;
24
- }
25
- // Try WIF first (starts with 5, K, L for mainnet or c for testnet)
26
- if (/^[5KLc][1-9A-HJ-NP-Za-km-z]{50,51}$/.test(input)) {
27
- return PrivateKey.fromWif(input);
28
- }
29
- // Try hex (64 characters)
30
- if (/^[0-9a-fA-F]{64}$/.test(input)) {
31
- return new PrivateKey(input);
32
- }
33
- // Last resort - try WIF anyway
34
- try {
35
- return PrivateKey.fromWif(input);
36
- }
37
- catch {
38
- throw new Error('Invalid private key format. Expected PrivateKey instance, WIF string, or 64-char hex string.');
39
- }
40
- }
41
- /**
42
- * Create a web wallet with storage, services, and monitor.
43
- *
44
- * @example
45
- * ```typescript
46
- * const { wallet, services, monitor, destroy } = await createWebWallet({
47
- * privateKey: identityWif,
48
- * chain: 'main',
49
- * storageIdentityKey: 'device-unique-id',
50
- * });
51
- *
52
- * // Wire up monitor callbacks
53
- * monitor.onTransactionProven = async (status) => console.log('Proven:', status.txid);
54
- *
55
- * // Start monitor when ready
56
- * monitor.startTasks();
57
- * ```
58
- */
59
4
  export async function createWebWallet(config) {
60
- const { chain, onMonitorEvent } = config;
61
5
  const feeModel = config.feeModel ?? DEFAULT_FEE_MODEL;
62
- const emit = (event) => {
63
- try {
64
- onMonitorEvent?.(event);
65
- }
66
- catch {
67
- // Never let event handler errors crash wallet operations
68
- }
69
- };
70
- // 1. Parse private key and create KeyDeriver
71
- const privateKey = parsePrivateKey(config.privateKey);
72
- const identityPubKey = privateKey.toPublicKey().toString();
73
- const keyDeriver = new KeyDeriver(privateKey);
74
- // 2. Create fallback services and OneSatServices
75
- const fallbackServices = new Services(chain);
76
- const oneSatServices = new OneSatServices(chain, undefined, fallbackServices);
77
- // 3. Create local storage
78
- const storageOptions = StorageProvider.createStorageBaseOptions(chain);
6
+ const storageOptions = StorageProvider.createStorageBaseOptions(config.chain);
79
7
  storageOptions.feeModel = feeModel;
80
8
  const localStorage = new StorageIdb(storageOptions);
81
9
  await localStorage.migrate(DEFAULT_DATABASE_NAME, config.storageIdentityKey);
82
- // 4. Create storage manager with local-only storage initially (empty backups)
83
- const storage = new WalletStorageManager(identityPubKey, localStorage, []);
84
- await storage.makeAvailable();
85
- // 5. Create wallet (needed before StorageClient for signing)
86
- const wallet = new Wallet({
87
- chain,
88
- keyDeriver,
89
- storage,
90
- services: oneSatServices,
10
+ const core = await createWalletCore(config, localStorage, {
11
+ Services,
12
+ StorageClient,
13
+ StorageProvider,
14
+ Wallet,
15
+ WalletStorageManager,
16
+ Monitor,
91
17
  });
92
- // 6. Attempt remote storage connection AFTER wallet exists
93
- // Push-only backup: no sync on startup, just connect for incremental backups
94
- // Use fullSync() explicitly to restore from backup when needed
95
- let remoteClient;
96
- if (config.remoteStorageUrl) {
97
- console.log(`[createWebWallet] Attempting remote storage connection to ${config.remoteStorageUrl}`);
98
- try {
99
- remoteClient = new StorageClient(wallet, config.remoteStorageUrl);
100
- const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new Error('Remote storage connection timeout')), DEFAULT_REMOTE_STORAGE_TIMEOUT));
101
- await Promise.race([remoteClient.makeAvailable(), timeoutPromise]);
102
- // Add remote to storage manager - it will partition as conflicting if another device is active
103
- await storage.addWalletStorageProvider(remoteClient);
104
- // Check if remote ended up in backup stores (active) or got partitioned (conflicting)
105
- const remoteStorageKey = remoteClient.getSettings().storageIdentityKey;
106
- const isActive = storage.getBackupStores().includes(remoteStorageKey);
107
- if (isActive) {
108
- console.log('[createWebWallet] Remote backup connected (we are active)');
109
- }
110
- else {
111
- // Another device is active - need fullSync then setActive
112
- // fullSync builds ID mappings before setActive attempts to merge
113
- console.log('[createWebWallet] Another device is active, performing full sync...');
114
- await fullSync({
115
- storage,
116
- remoteStorage: remoteClient,
117
- identityKey: identityPubKey,
118
- onProgress: (stage, msg) => {
119
- console.log(`[createWebWallet] fullSync ${stage}: ${msg}`);
120
- emit({ type: 'sync:progress', stage, message: msg });
121
- },
122
- });
123
- // Claim active status (merge now works because mappings exist from fullSync)
124
- await storage.setActive(config.storageIdentityKey, (msg) => {
125
- console.log('[createWebWallet] setActive:', msg);
126
- return msg;
127
- });
128
- console.log('[createWebWallet] Remote backup connected (now active after handoff)');
129
- }
130
- }
131
- catch (err) {
132
- const msg = err instanceof Error ? err.message : String(err);
133
- console.log('[createWebWallet] Remote backup connection failed:', msg);
134
- emit({ type: 'error', source: 'remote-storage', message: msg });
135
- remoteClient = undefined;
136
- }
137
- }
138
- // Helper to sync to remote backup using public updateBackups API
139
- const syncToBackup = async (context) => {
140
- if (storage.getBackupStores().length > 0) {
141
- await storage.updateBackups(undefined, (msg) => {
142
- console.log(`[createWebWallet] ${context}:`, msg);
143
- emit({ type: 'sync:backup', message: `${context}: ${msg}` });
144
- return msg;
145
- });
146
- }
147
- };
148
- // 8. Intercept createAction/signAction to sync after immediate broadcasts
149
- // With acceptDelayedBroadcast: false, broadcasts happen synchronously and
150
- // bypass the monitor's onTransactionBroadcasted callback. We detect broadcasts
151
- // by checking for txid in the result and sync to backup immediately.
152
- if (remoteClient) {
153
- const originalCreateAction = wallet.createAction.bind(wallet);
154
- wallet.createAction = async (args) => {
155
- const result = await originalCreateAction(args);
156
- if (result.txid) {
157
- console.log('[createWebWallet] Broadcast detected in createAction:', result.txid);
158
- syncToBackup('Backup after createAction').catch((err) => {
159
- console.warn('[createWebWallet] Failed to sync after createAction:', err);
160
- });
161
- }
162
- return result;
163
- };
164
- const originalSignAction = wallet.signAction.bind(wallet);
165
- wallet.signAction = async (args) => {
166
- const result = await originalSignAction(args);
167
- if (result.txid) {
168
- console.log('[createWebWallet] Broadcast detected in signAction:', result.txid);
169
- syncToBackup('Backup after signAction').catch((err) => {
170
- console.warn('[createWebWallet] Failed to sync after signAction:', err);
171
- });
172
- }
173
- return result;
174
- };
175
- }
176
- // 9. Create monitor (not started - consumer calls startTasks() when ready)
177
- const monitor = new Monitor({
178
- chain,
179
- services: oneSatServices,
180
- storage,
181
- chaintracks: oneSatServices.chaintracks,
182
- msecsWaitPerMerkleProofServiceReq: 500,
183
- taskRunWaitMsecs: 5000,
184
- abandonedMsecs: 300000,
185
- unprovenAttemptsLimitTest: 10,
186
- unprovenAttemptsLimitMain: 144,
187
- });
188
- monitor.addDefaultTasks();
189
- console.log('[createWebWallet] Monitor created with tasks:', monitor._tasks.map((t) => t.name));
190
- // 11. Wire up monitor callbacks - sync to remote first, then call user callbacks
191
- // Note: For delayed broadcasts, the monitor triggers these. For immediate broadcasts,
192
- // the interception in step 8 handles the sync, but these still fire for the user callback.
193
- monitor.onTransactionBroadcasted = async (result) => {
194
- console.log('[createWebWallet] Monitor detected broadcast:', result.txid);
195
- emit({ type: 'broadcast', txid: result.txid, status: 'success' });
196
- // Sync to remote backup first (if connected)
197
- // Note: For immediate broadcasts, step 8 already synced, but this is harmless
198
- if (remoteClient) {
199
- try {
200
- await syncToBackup('Backup after monitor broadcast');
201
- console.log('[createWebWallet] Synced to backup after monitor broadcast');
202
- }
203
- catch (err) {
204
- console.warn('[createWebWallet] Failed to sync after monitor broadcast:', err);
205
- }
206
- }
207
- // Then call user callback (if provided)
208
- if (result.txid && config.onTransactionBroadcasted) {
209
- try {
210
- config.onTransactionBroadcasted(result.txid);
211
- }
212
- catch (err) {
213
- console.warn('[createWebWallet] User callback error after broadcast:', err);
214
- }
215
- }
216
- };
217
- monitor.onTransactionProven = async (status) => {
218
- console.log('[createWebWallet] Transaction proven:', status.txid, 'block', status.blockHeight);
219
- emit({
220
- type: 'proven',
221
- txid: status.txid,
222
- blockHeight: status.blockHeight,
223
- blockHash: status.blockHash ?? '',
18
+ let monitor;
19
+ if (!config.activeRemote) {
20
+ monitor = new Monitor({
21
+ chain: config.chain,
22
+ services: core.services,
23
+ storage: core.storage,
24
+ chaintracks: core.services.chaintracks,
25
+ msecsWaitPerMerkleProofServiceReq: 500,
26
+ taskRunWaitMsecs: 5000,
27
+ abandonedMsecs: 300000,
28
+ unprovenAttemptsLimitTest: 10,
29
+ unprovenAttemptsLimitMain: 144,
224
30
  });
225
- // Sync to remote backup first (if connected)
226
- if (remoteClient) {
227
- try {
228
- await syncToBackup('Backup after confirmation');
229
- console.log('[createWebWallet] Synced to backup after confirmation');
230
- }
231
- catch (err) {
232
- console.warn('[createWebWallet] Failed to sync after confirmation:', err);
233
- }
31
+ monitor.addDefaultTasks();
32
+ if (config.onTransactionBroadcasted) {
33
+ monitor.onTransactionBroadcasted = async (result) => {
34
+ if (result.txid)
35
+ config.onTransactionBroadcasted(result.txid);
36
+ };
234
37
  }
235
- // Then call user callback (if provided)
236
38
  if (config.onTransactionProven) {
237
- try {
39
+ monitor.onTransactionProven = async (status) => {
238
40
  config.onTransactionProven(status.txid, status.blockHeight);
239
- }
240
- catch (err) {
241
- console.warn('[createWebWallet] User callback error after proven:', err);
242
- }
41
+ };
243
42
  }
244
- };
245
- // 12. Create cleanup function
43
+ }
246
44
  const destroy = async () => {
247
- monitor.stopTasks();
248
- await monitor.destroy();
249
- await wallet.destroy();
250
- };
251
- // 13. Create fullSync function if remote storage is connected
252
- const fullSyncFn = remoteClient
253
- ? async (onProgress) => {
254
- return fullSync({
255
- storage,
256
- remoteStorage: remoteClient,
257
- identityKey: identityPubKey,
258
- onProgress,
259
- });
45
+ if (monitor) {
46
+ monitor.stopTasks();
47
+ await monitor.destroy();
260
48
  }
261
- : undefined;
49
+ await core.destroy();
50
+ };
262
51
  return {
263
- wallet,
264
- services: oneSatServices,
52
+ wallet: core.wallet,
53
+ services: core.services,
265
54
  monitor,
266
55
  destroy,
267
- fullSync: fullSyncFn,
268
- storage,
269
- remoteStorage: remoteClient,
56
+ storage: core.storage,
57
+ remoteStorage: core.remoteClients[0],
58
+ migrateRemote: core.migrateRemote,
270
59
  };
271
60
  }
272
61
  //# sourceMappingURL=createWebWallet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createWebWallet.js","sourceRoot":"","sources":["../src/createWebWallet.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAwB,MAAM,UAAU,CAAA;AAEvE,OAAO,EACN,OAAO,EACP,QAAQ,EACR,aAAa,EACb,UAAU,EACV,eAAe,EACf,MAAM,EACN,oBAAoB,GACpB,MAAM,6CAA6C,CAAA;AACpD,OAAO,EAA2C,QAAQ,EAAE,MAAM,YAAY,CAAA;AAM9E,8CAA8C;AAC9C,MAAM,qBAAqB,GAAG,QAAQ,CAAA;AAEtC,gDAAgD;AAChD,MAAM,8BAA8B,GAAG,IAAI,CAAA;AAE3C,+EAA+E;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7B,yBAAyB,EAAE,GAAG;SAC9B,CAAC,CAAA;QACF,OAAO,CAAC,eAAe,EAAE,CAAA;QAEzB,IAAI,MAAM,CAAC,wBAAwB,EAAE,CAAC;YACrC,OAAO,CAAC,wBAAwB,GAAG,KAAK,EAAE,MAAM,EAAE,EAAE;gBACnD,IAAI,MAAM,CAAC,IAAI;oBAAE,MAAM,CAAC,wBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;YAC/D,CAAC,CAAA;QACF,CAAC;QACD,IAAI,MAAM,CAAC,mBAAmB,EAAE,CAAC;YAChC,OAAO,CAAC,mBAAmB,GAAG,KAAK,EAAE,MAAM,EAAE,EAAE;gBAC9C,MAAM,CAAC,mBAAoB,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,CAAA;YAC7D,CAAC,CAAA;QACF,CAAC;IACF,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,IAAmB,EAAE;QACzC,IAAI,OAAO,EAAE,CAAC;YACb,OAAO,CAAC,SAAS,EAAE,CAAA;YACnB,MAAM,OAAO,CAAC,OAAO,EAAE,CAAA;QACxB,CAAC;QACD,MAAM,IAAI,CAAC,OAAO,EAAE,CAAA;IACrB,CAAC,CAAA;IAED,OAAO;QACN,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,OAAO;QACP,OAAO;QACP,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;QACpC,aAAa,EAAE,IAAI,CAAC,aAAa;KACjC,CAAA;AACF,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,13 +1,6 @@
1
- /**
2
- * @1sat/wallet-browser - Browser wallet factory for 1Sat Ordinals SDK
3
- *
4
- * This package provides the browser-specific wallet factory using IndexedDB storage.
5
- */
6
1
  export * from '@1sat/wallet';
7
2
  export { createWebWallet } from './createWebWallet';
8
3
  export type { WebWalletConfig, WebWalletResult } from './createWebWallet';
9
- export { fullSync } from './fullSync';
10
- export type { FullSyncOptions, FullSyncResult, FullSyncStage } from './fullSync';
11
4
  export type { MonitorEvent } from './types';
12
5
  export { Monitor, Services, StorageClient, StorageIdb, StorageProvider, Wallet, WalletStorageManager, type sdk as walletSdk, } from '@bsv/wallet-toolbox/out/src/index.client.js';
13
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,cAAc,CAAA;AAG5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAGzE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAGhF,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAG3C,OAAO,EACN,OAAO,EACP,QAAQ,EACR,aAAa,EACb,UAAU,EACV,eAAe,EACf,MAAM,EACN,oBAAoB,EACpB,KAAK,GAAG,IAAI,SAAS,GACrB,MAAM,6CAA6C,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEzE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,OAAO,EACN,OAAO,EACP,QAAQ,EACR,aAAa,EACb,UAAU,EACV,eAAe,EACf,MAAM,EACN,oBAAoB,EACpB,KAAK,GAAG,IAAI,SAAS,GACrB,MAAM,6CAA6C,CAAA"}
package/dist/index.js CHANGED
@@ -1,14 +1,4 @@
1
- /**
2
- * @1sat/wallet-browser - Browser wallet factory for 1Sat Ordinals SDK
3
- *
4
- * This package provides the browser-specific wallet factory using IndexedDB storage.
5
- */
6
- // Re-export everything from base wallet
7
1
  export * from '@1sat/wallet';
8
- // Browser-specific factory
9
2
  export { createWebWallet } from './createWebWallet';
10
- // Full sync
11
- export { fullSync } from './fullSync';
12
- // Re-export browser toolbox utilities
13
3
  export { Monitor, Services, StorageClient, StorageIdb, StorageProvider, Wallet, WalletStorageManager, } from '@bsv/wallet-toolbox/out/src/index.client.js';
14
4
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wCAAwC;AACxC,cAAc,cAAc,CAAA;AAE5B,2BAA2B;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAGnD,YAAY;AACZ,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAMrC,sCAAsC;AACtC,OAAO,EACN,OAAO,EACP,QAAQ,EACR,aAAa,EACb,UAAU,EACV,eAAe,EACf,MAAM,EACN,oBAAoB,GAEpB,MAAM,6CAA6C,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAKnD,OAAO,EACN,OAAO,EACP,QAAQ,EACR,aAAa,EACb,UAAU,EACV,eAAe,EACf,MAAM,EACN,oBAAoB,GAEpB,MAAM,6CAA6C,CAAA"}
package/dist/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import type { FullSyncStage } from './fullSync';
2
1
  /** Typed event union emitted by the monitor and wallet lifecycle hooks. */
3
2
  export type MonitorEvent = {
4
3
  type: 'broadcast';
@@ -11,7 +10,7 @@ export type MonitorEvent = {
11
10
  blockHash: string;
12
11
  } | {
13
12
  type: 'sync:progress';
14
- stage: FullSyncStage;
13
+ stage: string;
15
14
  message: string;
16
15
  } | {
17
16
  type: 'sync:backup';
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,2EAA2E;AAC3E,MAAM,MAAM,YAAY,GACrB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACnD;IACA,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAChB,GACD;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,aAAa,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAChE;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,MAAM,MAAM,YAAY,GACrB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACnD;IACA,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAChB,GACD;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACzD;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1sat/wallet-browser",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "description": "Browser wallet factory for 1Sat Ordinals SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -20,16 +20,16 @@
20
20
  "keywords": ["1sat", "bsv", "ordinals", "wallet", "browser"],
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
- "@1sat/wallet": "0.0.23"
23
+ "@1sat/wallet": "0.0.32"
24
24
  },
25
25
  "peerDependencies": {
26
- "@1sat/client": "0.0.15",
27
- "@bsv/sdk": "^2.0.4",
28
- "@bsv/wallet-toolbox": "^2.0.20"
26
+ "@1sat/client": "0.0.17",
27
+ "@bsv/sdk": "^2.0.6",
28
+ "@bsv/wallet-toolbox": "^2.1.8"
29
29
  },
30
30
  "devDependencies": {
31
- "@bsv/sdk": "^2.0.4",
32
- "@bsv/wallet-toolbox": "^2.0.20",
31
+ "@bsv/sdk": "^2.0.6",
32
+ "@bsv/wallet-toolbox": "^2.1.8",
33
33
  "typescript": "^5.9.3"
34
34
  }
35
35
  }