@1sat/wallet-toolbox 0.0.53 → 0.0.55

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.
@@ -64,17 +64,22 @@ export declare function buildTransferOrdinals(ctx: OneSatContext, request: Trans
64
64
  export declare function buildListOrdinal(ctx: OneSatContext, request: ListOrdinalRequest): Promise<CreateActionArgs | {
65
65
  error: string;
66
66
  }>;
67
- /** Input for listOrdinals skill */
68
- export interface ListOrdinalsInput {
67
+ /** Input for getOrdinals skill */
68
+ export interface GetOrdinalsInput {
69
69
  /** Max number of ordinals to return */
70
70
  limit?: number;
71
71
  /** Offset for pagination */
72
72
  offset?: number;
73
73
  }
74
+ /** Result from getOrdinals skill */
75
+ export interface GetOrdinalsResult {
76
+ outputs: WalletOutput[];
77
+ BEEF?: number[];
78
+ }
74
79
  /**
75
- * List ordinals from the wallet.
80
+ * Get ordinals from the wallet with BEEF for spending.
76
81
  */
77
- export declare const listOrdinals: Skill<ListOrdinalsInput, WalletOutput[]>;
82
+ export declare const getOrdinals: Skill<GetOrdinalsInput, GetOrdinalsResult>;
78
83
  /** Input for deriveCancelAddress skill */
79
84
  export interface DeriveCancelAddressInput {
80
85
  /** Outpoint of the ordinal listing */
@@ -108,5 +113,5 @@ export declare const cancelListing: Skill<CancelListingInput, OrdinalOperationRe
108
113
  */
109
114
  export declare const purchaseOrdinal: Skill<PurchaseOrdinalRequest, OrdinalOperationResponse>;
110
115
  /** All ordinals skills for registry */
111
- export declare const ordinalsSkills: (Skill<ListOrdinalsInput, WalletOutput[]> | Skill<DeriveCancelAddressInput, string> | Skill<TransferOrdinalsRequest, OrdinalOperationResponse> | Skill<ListOrdinalRequest, OrdinalOperationResponse> | Skill<CancelListingInput, OrdinalOperationResponse> | Skill<PurchaseOrdinalRequest, OrdinalOperationResponse>)[];
116
+ export declare const ordinalsSkills: (Skill<GetOrdinalsInput, GetOrdinalsResult> | Skill<DeriveCancelAddressInput, string> | Skill<TransferOrdinalsRequest, OrdinalOperationResponse> | Skill<ListOrdinalRequest, OrdinalOperationResponse> | Skill<CancelListingInput, OrdinalOperationResponse> | Skill<PurchaseOrdinalRequest, OrdinalOperationResponse>)[];
112
117
  export {};
@@ -203,7 +203,6 @@ 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: [],
207
206
  });
208
207
  }
209
208
  }
@@ -258,17 +257,17 @@ export async function buildListOrdinal(ctx, request) {
258
257
  };
259
258
  }
260
259
  /**
261
- * List ordinals from the wallet.
260
+ * Get ordinals from the wallet with BEEF for spending.
262
261
  */
263
- export const listOrdinals = {
262
+ export const getOrdinals = {
264
263
  meta: {
265
- name: "listOrdinals",
266
- description: "List ordinals/inscriptions from the wallet",
264
+ name: "getOrdinals",
265
+ description: "Get ordinals/inscriptions from the wallet with BEEF for spending",
267
266
  category: "ordinals",
268
267
  inputSchema: {
269
268
  type: "object",
270
269
  properties: {
271
- limit: { type: "integer", description: "Max number of ordinals to return (default: 100)" },
270
+ limit: { type: "integer", description: "Max ordinals to return (default: 100)" },
272
271
  offset: { type: "integer", description: "Offset for pagination (default: 0)" },
273
272
  },
274
273
  },
@@ -278,10 +277,14 @@ export const listOrdinals = {
278
277
  basket: ORDINALS_BASKET,
279
278
  includeTags: true,
280
279
  includeCustomInstructions: true,
280
+ include: 'entire transactions',
281
281
  limit: input.limit ?? 100,
282
282
  offset: input.offset ?? 0,
283
283
  });
284
- return result.outputs;
284
+ return {
285
+ outputs: result.outputs,
286
+ BEEF: result.BEEF,
287
+ };
285
288
  },
286
289
  };
287
290
  /**
@@ -334,18 +337,6 @@ export const transferOrdinals = {
334
337
  },
335
338
  },
336
339
  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));
349
340
  try {
350
341
  const params = await buildTransferOrdinals(ctx, input);
351
342
  if ("error" in params) {
@@ -739,7 +730,7 @@ export const purchaseOrdinal = {
739
730
  // ============================================================================
740
731
  /** All ordinals skills for registry */
741
732
  export const ordinalsSkills = [
742
- listOrdinals,
733
+ getOrdinals,
743
734
  deriveCancelAddress,
744
735
  transferOrdinals,
745
736
  listOrdinal,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1sat/wallet-toolbox",
3
- "version": "0.0.53",
3
+ "version": "0.0.55",
4
4
  "description": "BSV wallet library extending @bsv/wallet-toolbox with 1Sat Ordinals protocol support",
5
5
  "author": "1Sat Team",
6
6
  "license": "MIT",
@@ -45,7 +45,7 @@
45
45
  "fflate": "^0.8.2"
46
46
  },
47
47
  "peerDependencies": {
48
- "@bsv/wallet-toolbox-mobile": "npm:@bopen-io/wallet-toolbox-mobile@^1.7.20-idb-fix.29"
48
+ "@bsv/wallet-toolbox-mobile": "npm:@bopen-io/wallet-toolbox-mobile@^1.7.20-idb-fix.30"
49
49
  },
50
50
  "peerDependenciesMeta": {
51
51
  "@bsv/wallet-toolbox-mobile": {
@@ -54,8 +54,8 @@
54
54
  },
55
55
  "devDependencies": {
56
56
  "@biomejs/biome": "^1.9.4",
57
- "@bsv/wallet-toolbox": "npm:@bopen-io/wallet-toolbox@^1.7.20-idb-fix.29",
58
- "@bsv/wallet-toolbox-mobile": "npm:@bopen-io/wallet-toolbox-mobile@^1.7.20-idb-fix.29",
57
+ "@bsv/wallet-toolbox": "npm:@bopen-io/wallet-toolbox@^1.7.20-idb-fix.30",
58
+ "@bsv/wallet-toolbox-mobile": "npm:@bopen-io/wallet-toolbox-mobile@^1.7.20-idb-fix.30",
59
59
  "@types/bun": "^1.3.4",
60
60
  "@types/chrome": "^0.1.32",
61
61
  "typescript": "^5.9.3"