@unicitylabs/sphere-sdk 0.5.1 → 0.5.2

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.
Files changed (43) hide show
  1. package/dist/connect/index.cjs +3 -1
  2. package/dist/connect/index.cjs.map +1 -1
  3. package/dist/connect/index.js +3 -1
  4. package/dist/connect/index.js.map +1 -1
  5. package/dist/core/index.cjs +615 -275
  6. package/dist/core/index.cjs.map +1 -1
  7. package/dist/core/index.d.cts +49 -2
  8. package/dist/core/index.d.ts +49 -2
  9. package/dist/core/index.js +615 -275
  10. package/dist/core/index.js.map +1 -1
  11. package/dist/impl/browser/connect/index.cjs +3 -1
  12. package/dist/impl/browser/connect/index.cjs.map +1 -1
  13. package/dist/impl/browser/connect/index.js +3 -1
  14. package/dist/impl/browser/connect/index.js.map +1 -1
  15. package/dist/impl/browser/index.cjs +5 -2
  16. package/dist/impl/browser/index.cjs.map +1 -1
  17. package/dist/impl/browser/index.js +5 -2
  18. package/dist/impl/browser/index.js.map +1 -1
  19. package/dist/impl/browser/ipfs.cjs +3 -1
  20. package/dist/impl/browser/ipfs.cjs.map +1 -1
  21. package/dist/impl/browser/ipfs.js +3 -1
  22. package/dist/impl/browser/ipfs.js.map +1 -1
  23. package/dist/impl/nodejs/connect/index.cjs +3 -1
  24. package/dist/impl/nodejs/connect/index.cjs.map +1 -1
  25. package/dist/impl/nodejs/connect/index.js +3 -1
  26. package/dist/impl/nodejs/connect/index.js.map +1 -1
  27. package/dist/impl/nodejs/index.cjs +5 -2
  28. package/dist/impl/nodejs/index.cjs.map +1 -1
  29. package/dist/impl/nodejs/index.d.cts +6 -0
  30. package/dist/impl/nodejs/index.d.ts +6 -0
  31. package/dist/impl/nodejs/index.js +5 -2
  32. package/dist/impl/nodejs/index.js.map +1 -1
  33. package/dist/index.cjs +617 -275
  34. package/dist/index.cjs.map +1 -1
  35. package/dist/index.d.cts +118 -3
  36. package/dist/index.d.ts +118 -3
  37. package/dist/index.js +616 -275
  38. package/dist/index.js.map +1 -1
  39. package/dist/l1/index.cjs +3 -1
  40. package/dist/l1/index.cjs.map +1 -1
  41. package/dist/l1/index.js +3 -1
  42. package/dist/l1/index.js.map +1 -1
  43. package/package.json +1 -1
@@ -1065,6 +1065,12 @@ interface HistoryRecord {
1065
1065
  recipientNametag?: string;
1066
1066
  /** Optional memo/message attached to the transfer */
1067
1067
  memo?: string;
1068
+ /** All token IDs in a combined transfer (V6 bundle breakdown) */
1069
+ tokenIds?: Array<{
1070
+ id: string;
1071
+ amount: string;
1072
+ source: 'split' | 'direct';
1073
+ }>;
1068
1074
  }
1069
1075
  /**
1070
1076
  * Storage result types
@@ -1065,6 +1065,12 @@ interface HistoryRecord {
1065
1065
  recipientNametag?: string;
1066
1066
  /** Optional memo/message attached to the transfer */
1067
1067
  memo?: string;
1068
+ /** All token IDs in a combined transfer (V6 bundle breakdown) */
1069
+ tokenIds?: Array<{
1070
+ id: string;
1071
+ amount: string;
1072
+ source: 'split' | 'direct';
1073
+ }>;
1068
1074
  }
1069
1075
  /**
1070
1076
  * Storage result types
@@ -61,7 +61,9 @@ var STORAGE_KEYS_ADDRESS = {
61
61
  /** Group chat: processed event IDs for deduplication */
62
62
  GROUP_CHAT_PROCESSED_EVENTS: "group_chat_processed_events",
63
63
  /** Processed V5 split group IDs for Nostr re-delivery dedup */
64
- PROCESSED_SPLIT_GROUP_IDS: "processed_split_group_ids"
64
+ PROCESSED_SPLIT_GROUP_IDS: "processed_split_group_ids",
65
+ /** Processed V6 combined transfer IDs for Nostr re-delivery dedup */
66
+ PROCESSED_COMBINED_TRANSFER_IDS: "processed_combined_transfer_ids"
65
67
  };
66
68
  var STORAGE_KEYS = {
67
69
  ...STORAGE_KEYS_GLOBAL,
@@ -1562,12 +1564,13 @@ var NostrTransportProvider = class {
1562
1564
  async sendTokenTransfer(recipientPubkey, payload) {
1563
1565
  this.ensureReady();
1564
1566
  const content = "token_transfer:" + JSON.stringify(payload);
1567
+ const uniqueD = `token-transfer-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
1565
1568
  const event = await this.createEncryptedEvent(
1566
1569
  EVENT_KINDS.TOKEN_TRANSFER,
1567
1570
  content,
1568
1571
  [
1569
1572
  ["p", recipientPubkey],
1570
- ["d", "token-transfer"],
1573
+ ["d", uniqueD],
1571
1574
  ["type", "token_transfer"]
1572
1575
  ]
1573
1576
  );