@1sat/wallet-toolbox 0.0.48 → 0.0.50

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.
@@ -219,7 +219,7 @@ export const unlockBsv = {
219
219
  },
220
220
  ],
221
221
  lockTime: maxUntil,
222
- options: { signAndProcess: false, noSend: true },
222
+ options: { signAndProcess: false },
223
223
  });
224
224
  if ("error" in createResult && createResult.error) {
225
225
  return { error: String(createResult.error) };
@@ -270,7 +270,6 @@ export const unlockBsv = {
270
270
  const signResult = await ctx.wallet.signAction({
271
271
  reference: createResult.signableTransaction.reference,
272
272
  spends,
273
- options: { noSend: false },
274
273
  });
275
274
  if ("error" in signResult) {
276
275
  return { error: String(signResult.error) };
@@ -338,9 +338,15 @@ export const transferOrdinals = {
338
338
  if ("error" in params) {
339
339
  return params;
340
340
  }
341
+ console.log("[transferOrdinals] params:", JSON.stringify({
342
+ description: params.description,
343
+ inputBEEF: params.inputBEEF ? `[${params.inputBEEF.length} bytes]` : "undefined",
344
+ inputs: params.inputs,
345
+ outputs: params.outputs?.map(o => ({ ...o, lockingScript: o.lockingScript?.slice(0, 20) + "..." })),
346
+ }, null, 2));
341
347
  const createResult = await ctx.wallet.createAction({
342
348
  ...params,
343
- options: { signAndProcess: false, randomizeOutputs: false, noSend: true },
349
+ options: { signAndProcess: false, randomizeOutputs: false },
344
350
  });
345
351
  if (!createResult.signableTransaction) {
346
352
  return { error: "no-signable-transaction" };
@@ -363,7 +369,6 @@ export const transferOrdinals = {
363
369
  const signResult = await ctx.wallet.signAction({
364
370
  reference: createResult.signableTransaction.reference,
365
371
  spends,
366
- options: { noSend: false },
367
372
  });
368
373
  if ("error" in signResult) {
369
374
  return { error: String(signResult.error) };
@@ -405,7 +410,7 @@ export const listOrdinal = {
405
410
  }
406
411
  const createResult = await ctx.wallet.createAction({
407
412
  ...params,
408
- options: { signAndProcess: false, randomizeOutputs: false, noSend: true },
413
+ options: { signAndProcess: false, randomizeOutputs: false },
409
414
  });
410
415
  if (!createResult.signableTransaction) {
411
416
  return { error: "no-signable-transaction" };
@@ -421,7 +426,6 @@ export const listOrdinal = {
421
426
  const signResult = await ctx.wallet.signAction({
422
427
  reference: createResult.signableTransaction.reference,
423
428
  spends: { 0: { unlockingScript: unlocking } },
424
- options: { noSend: false },
425
429
  });
426
430
  if ("error" in signResult) {
427
431
  return { error: String(signResult.error) };
@@ -492,7 +496,7 @@ export const cancelListing = {
492
496
  customInstructions: JSON.stringify({ protocolID, keyID, ...(listingName && { name: listingName }) }),
493
497
  },
494
498
  ],
495
- options: { signAndProcess: false, randomizeOutputs: false, noSend: true },
499
+ options: { signAndProcess: false, randomizeOutputs: false },
496
500
  });
497
501
  if ("error" in createResult && createResult.error) {
498
502
  return { error: String(createResult.error) };
@@ -546,7 +550,6 @@ export const cancelListing = {
546
550
  spends: {
547
551
  0: { unlockingScript: unlockingScript.toHex() },
548
552
  },
549
- options: { noSend: false },
550
553
  });
551
554
  if ("error" in signResult) {
552
555
  return { error: String(signResult.error) };
@@ -675,7 +678,7 @@ export const purchaseOrdinal = {
675
678
  },
676
679
  ],
677
680
  outputs,
678
- options: { signAndProcess: false, randomizeOutputs: false, noSend: true },
681
+ options: { signAndProcess: false, randomizeOutputs: false },
679
682
  });
680
683
  if ("error" in createResult && createResult.error) {
681
684
  return { error: String(createResult.error) };
@@ -690,7 +693,6 @@ export const purchaseOrdinal = {
690
693
  spends: {
691
694
  0: { unlockingScript: unlockingScript.toHex() },
692
695
  },
693
- options: { noSend: false },
694
696
  });
695
697
  if ("error" in signResult) {
696
698
  return { error: String(signResult.error) };
@@ -153,7 +153,6 @@ export const sweepBsv = {
153
153
  }
154
154
  // If no amount specified, no outputs - wallet creates change for everything
155
155
  // Step 1: Create action to get the signable transaction
156
- // noSend: true bypasses spendable check for external inputs
157
156
  const createResult = await ctx.wallet.createAction({
158
157
  description: amount
159
158
  ? `Sweep ${amount} sats`
@@ -161,7 +160,7 @@ export const sweepBsv = {
161
160
  inputBEEF: beefData,
162
161
  inputs: inputDescriptors,
163
162
  outputs,
164
- options: { signAndProcess: false, noSend: true },
163
+ options: { signAndProcess: false },
165
164
  });
166
165
  if ("error" in createResult && createResult.error) {
167
166
  return { error: String(createResult.error) };
@@ -202,11 +201,9 @@ export const sweepBsv = {
202
201
  }
203
202
  }
204
203
  // Step 3: Complete the action with our signatures
205
- // Override noSend to false to ensure broadcast (createAction used noSend:true to bypass spendable check)
206
204
  const signResult = await ctx.wallet.signAction({
207
205
  reference: createResult.signableTransaction.reference,
208
206
  spends,
209
- options: { noSend: false },
210
207
  });
211
208
  if ("error" in signResult) {
212
209
  return { error: String(signResult.error) };
@@ -281,10 +278,7 @@ export const sweepOrdinals = {
281
278
  const additionalBeef = await ctx.services.getBeefForTxid(txids[i]);
282
279
  firstBeef.mergeBeef(additionalBeef);
283
280
  }
284
- console.log(`[sweepOrdinals] Merged BEEF valid=${firstBeef.isValid()}, txs=${firstBeef.txs.length}, bumps=${firstBeef.bumps.length}`);
285
- for (const btx of firstBeef.txs) {
286
- console.log(`[sweepOrdinals] tx ${btx.txid.slice(0, 16)}... bumpIndex=${btx.bumpIndex}`);
287
- }
281
+ console.log(`[sweepOrdinals] Merged BEEF valid=${firstBeef.isValid()}, txs=${firstBeef.txs.length}`);
288
282
  // Build input descriptors
289
283
  const inputDescriptors = inputs.map((input) => {
290
284
  const [txid, voutStr] = input.outpoint.split("_");
@@ -339,7 +333,7 @@ export const sweepOrdinals = {
339
333
  inputBEEF: beefData,
340
334
  inputs: inputDescriptors,
341
335
  outputs,
342
- options: { signAndProcess: false, randomizeOutputs: false, noSend: true },
336
+ options: { signAndProcess: false, randomizeOutputs: false },
343
337
  };
344
338
  console.log(`[sweepOrdinals] === CREATE ACTION ARGS ===`);
345
339
  console.log(`[sweepOrdinals] description: ${createActionArgs.description}`);
@@ -433,11 +427,9 @@ export const sweepOrdinals = {
433
427
  }
434
428
  }
435
429
  // Complete the action with our signatures
436
- // Override noSend to false to ensure broadcast (createAction used noSend:true to bypass spendable check)
437
430
  const signResult = await ctx.wallet.signAction({
438
431
  reference: createResult.signableTransaction.reference,
439
432
  spends,
440
- options: { noSend: false },
441
433
  });
442
434
  if ("error" in signResult) {
443
435
  return { error: String(signResult.error) };
@@ -614,7 +606,7 @@ export const sweepBsv21 = {
614
606
  inputBEEF: beefData,
615
607
  inputs: inputDescriptors,
616
608
  outputs,
617
- options: { signAndProcess: false, randomizeOutputs: false, noSend: true },
609
+ options: { signAndProcess: false, randomizeOutputs: false },
618
610
  });
619
611
  if ("error" in createResult && createResult.error) {
620
612
  return { error: String(createResult.error) };
@@ -648,11 +640,9 @@ export const sweepBsv21 = {
648
640
  }
649
641
  }
650
642
  // Complete the action with our signatures
651
- // Override noSend to false to ensure broadcast (createAction used noSend:true to bypass spendable check)
652
643
  const signResult = await ctx.wallet.signAction({
653
644
  reference: createResult.signableTransaction.reference,
654
645
  spends,
655
- options: { noSend: false },
656
646
  });
657
647
  if ("error" in signResult) {
658
648
  return { error: String(signResult.error) };
@@ -293,7 +293,7 @@ export const sendBsv21 = {
293
293
  inputDescription: "Token input",
294
294
  })),
295
295
  outputs,
296
- options: { signAndProcess: false, randomizeOutputs: false, noSend: true },
296
+ options: { signAndProcess: false, randomizeOutputs: false },
297
297
  });
298
298
  if ("error" in createResult && createResult.error) {
299
299
  return { error: String(createResult.error) };
@@ -304,7 +304,6 @@ export const sendBsv21 = {
304
304
  const signResult = await ctx.wallet.signAction({
305
305
  reference: createResult.signableTransaction.reference,
306
306
  spends: {},
307
- options: { noSend: false },
308
307
  });
309
308
  if ("error" in signResult) {
310
309
  return { error: String(signResult.error) };
@@ -437,7 +436,7 @@ export const purchaseBsv21 = {
437
436
  },
438
437
  ],
439
438
  outputs,
440
- options: { signAndProcess: false, randomizeOutputs: false, noSend: true },
439
+ options: { signAndProcess: false, randomizeOutputs: false },
441
440
  });
442
441
  if ("error" in createResult && createResult.error) {
443
442
  return { error: String(createResult.error) };
@@ -452,7 +451,6 @@ export const purchaseBsv21 = {
452
451
  spends: {
453
452
  0: { unlockingScript: unlockingScript.toHex() },
454
453
  },
455
- options: { noSend: false },
456
454
  });
457
455
  if ("error" in signResult) {
458
456
  return { error: String(signResult.error) };
@@ -157,6 +157,7 @@ export async function createWebWallet(config) {
157
157
  unprovenAttemptsLimitMain: 144,
158
158
  });
159
159
  monitor.addDefaultTasks();
160
+ console.log("[createWebWallet] Monitor created with tasks:", monitor["_tasks"].map((t) => t.name));
160
161
  // Helper to sync to remote backup using public updateBackups API
161
162
  const syncToBackup = async (context) => {
162
163
  if (storage.getBackupStores().length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1sat/wallet-toolbox",
3
- "version": "0.0.48",
3
+ "version": "0.0.50",
4
4
  "description": "BSV wallet library extending @bsv/wallet-toolbox with 1Sat Ordinals protocol support",
5
5
  "author": "1Sat Team",
6
6
  "license": "MIT",