@1sat/wallet-toolbox 0.0.50 → 0.0.52

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.
@@ -203,6 +203,7 @@ export async function buildTransferOrdinals(ctx, request) {
203
203
  lockingScript: new P2PKH().lock(recipientAddress).toHex(),
204
204
  satoshis: 1,
205
205
  outputDescription: "Ordinal transfer to external address",
206
+ tags: [],
206
207
  });
207
208
  }
208
209
  }
@@ -333,6 +334,18 @@ export const transferOrdinals = {
333
334
  },
334
335
  },
335
336
  async execute(ctx, input) {
337
+ console.log("[transferOrdinals] EXECUTE START - input:", JSON.stringify({
338
+ transferCount: input.transfers?.length,
339
+ hasBEEF: !!input.inputBEEF,
340
+ beefLength: input.inputBEEF?.length,
341
+ transfers: input.transfers?.map(t => ({
342
+ outpoint: t.ordinal?.outpoint,
343
+ hasAddress: !!t.address,
344
+ hasCounterparty: !!t.counterparty,
345
+ tags: t.ordinal?.tags,
346
+ customInstructions: t.ordinal?.customInstructions,
347
+ })),
348
+ }, null, 2));
336
349
  try {
337
350
  const params = await buildTransferOrdinals(ctx, input);
338
351
  if ("error" in params) {
@@ -344,6 +357,20 @@ export const transferOrdinals = {
344
357
  inputs: params.inputs,
345
358
  outputs: params.outputs?.map(o => ({ ...o, lockingScript: o.lockingScript?.slice(0, 20) + "..." })),
346
359
  }, null, 2));
360
+ // Debug: Check if BEEF contains the source transactions
361
+ try {
362
+ const { Beef } = await import("@bsv/sdk");
363
+ const beef = Beef.fromBinary(params.inputBEEF);
364
+ console.log("[transferOrdinals] BEEF tx count:", beef.txs.length);
365
+ for (const inp of params.inputs ?? []) {
366
+ const [txid] = inp.outpoint.split(".");
367
+ const sourceTx = beef.findTxid(txid);
368
+ console.log(`[transferOrdinals] Source tx for ${inp.outpoint}: ${sourceTx ? "FOUND" : "MISSING"}`);
369
+ }
370
+ }
371
+ catch (e) {
372
+ console.log("[transferOrdinals] BEEF parse error:", e);
373
+ }
347
374
  const createResult = await ctx.wallet.createAction({
348
375
  ...params,
349
376
  options: { signAndProcess: false, randomizeOutputs: false },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1sat/wallet-toolbox",
3
- "version": "0.0.50",
3
+ "version": "0.0.52",
4
4
  "description": "BSV wallet library extending @bsv/wallet-toolbox with 1Sat Ordinals protocol support",
5
5
  "author": "1Sat Team",
6
6
  "license": "MIT",
@@ -37,6 +37,7 @@
37
37
  "tester": "bun run build && bun run tester:build && bun ./tester/server.ts"
38
38
  },
39
39
  "dependencies": {
40
+ "@1sat/wallet-toolbox": "0.0.50",
40
41
  "@bopen-io/templates": "^1.1.6",
41
42
  "@bsv/sdk": "^1.10.1",
42
43
  "@msgpack/msgpack": "^3.1.3",