@unicitylabs/sphere-sdk 0.5.0 → 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 +5 -1
  2. package/dist/connect/index.cjs.map +1 -1
  3. package/dist/connect/index.js +5 -1
  4. package/dist/connect/index.js.map +1 -1
  5. package/dist/core/index.cjs +813 -309
  6. package/dist/core/index.cjs.map +1 -1
  7. package/dist/core/index.d.cts +71 -2
  8. package/dist/core/index.d.ts +71 -2
  9. package/dist/core/index.js +813 -309
  10. package/dist/core/index.js.map +1 -1
  11. package/dist/impl/browser/connect/index.cjs +5 -1
  12. package/dist/impl/browser/connect/index.cjs.map +1 -1
  13. package/dist/impl/browser/connect/index.js +5 -1
  14. package/dist/impl/browser/connect/index.js.map +1 -1
  15. package/dist/impl/browser/index.cjs +7 -2
  16. package/dist/impl/browser/index.cjs.map +1 -1
  17. package/dist/impl/browser/index.js +7 -2
  18. package/dist/impl/browser/index.js.map +1 -1
  19. package/dist/impl/browser/ipfs.cjs +5 -1
  20. package/dist/impl/browser/ipfs.cjs.map +1 -1
  21. package/dist/impl/browser/ipfs.js +5 -1
  22. package/dist/impl/browser/ipfs.js.map +1 -1
  23. package/dist/impl/nodejs/connect/index.cjs +5 -1
  24. package/dist/impl/nodejs/connect/index.cjs.map +1 -1
  25. package/dist/impl/nodejs/connect/index.js +5 -1
  26. package/dist/impl/nodejs/connect/index.js.map +1 -1
  27. package/dist/impl/nodejs/index.cjs +7 -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 +7 -2
  32. package/dist/impl/nodejs/index.js.map +1 -1
  33. package/dist/index.cjs +815 -309
  34. package/dist/index.cjs.map +1 -1
  35. package/dist/index.d.cts +144 -3
  36. package/dist/index.d.ts +144 -3
  37. package/dist/index.js +814 -309
  38. package/dist/index.js.map +1 -1
  39. package/dist/l1/index.cjs +5 -1
  40. package/dist/l1/index.cjs.map +1 -1
  41. package/dist/l1/index.js +5 -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
@@ -59,7 +59,11 @@ var STORAGE_KEYS_ADDRESS = {
59
59
  /** Group chat: members for this address */
60
60
  GROUP_CHAT_MEMBERS: "group_chat_members",
61
61
  /** Group chat: processed event IDs for deduplication */
62
- GROUP_CHAT_PROCESSED_EVENTS: "group_chat_processed_events"
62
+ GROUP_CHAT_PROCESSED_EVENTS: "group_chat_processed_events",
63
+ /** Processed V5 split group IDs for Nostr re-delivery dedup */
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"
63
67
  };
64
68
  var STORAGE_KEYS = {
65
69
  ...STORAGE_KEYS_GLOBAL,
@@ -1560,12 +1564,13 @@ var NostrTransportProvider = class {
1560
1564
  async sendTokenTransfer(recipientPubkey, payload) {
1561
1565
  this.ensureReady();
1562
1566
  const content = "token_transfer:" + JSON.stringify(payload);
1567
+ const uniqueD = `token-transfer-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
1563
1568
  const event = await this.createEncryptedEvent(
1564
1569
  EVENT_KINDS.TOKEN_TRANSFER,
1565
1570
  content,
1566
1571
  [
1567
1572
  ["p", recipientPubkey],
1568
- ["d", "token-transfer"],
1573
+ ["d", uniqueD],
1569
1574
  ["type", "token_transfer"]
1570
1575
  ]
1571
1576
  );