@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.
- package/dist/connect/index.cjs +3 -1
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +3 -1
- package/dist/connect/index.js.map +1 -1
- package/dist/core/index.cjs +615 -275
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +49 -2
- package/dist/core/index.d.ts +49 -2
- package/dist/core/index.js +615 -275
- package/dist/core/index.js.map +1 -1
- package/dist/impl/browser/connect/index.cjs +3 -1
- package/dist/impl/browser/connect/index.cjs.map +1 -1
- package/dist/impl/browser/connect/index.js +3 -1
- package/dist/impl/browser/connect/index.js.map +1 -1
- package/dist/impl/browser/index.cjs +5 -2
- package/dist/impl/browser/index.cjs.map +1 -1
- package/dist/impl/browser/index.js +5 -2
- package/dist/impl/browser/index.js.map +1 -1
- package/dist/impl/browser/ipfs.cjs +3 -1
- package/dist/impl/browser/ipfs.cjs.map +1 -1
- package/dist/impl/browser/ipfs.js +3 -1
- package/dist/impl/browser/ipfs.js.map +1 -1
- package/dist/impl/nodejs/connect/index.cjs +3 -1
- package/dist/impl/nodejs/connect/index.cjs.map +1 -1
- package/dist/impl/nodejs/connect/index.js +3 -1
- package/dist/impl/nodejs/connect/index.js.map +1 -1
- package/dist/impl/nodejs/index.cjs +5 -2
- package/dist/impl/nodejs/index.cjs.map +1 -1
- package/dist/impl/nodejs/index.d.cts +6 -0
- package/dist/impl/nodejs/index.d.ts +6 -0
- package/dist/impl/nodejs/index.js +5 -2
- package/dist/impl/nodejs/index.js.map +1 -1
- package/dist/index.cjs +617 -275
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +118 -3
- package/dist/index.d.ts +118 -3
- package/dist/index.js +616 -275
- package/dist/index.js.map +1 -1
- package/dist/l1/index.cjs +3 -1
- package/dist/l1/index.cjs.map +1 -1
- package/dist/l1/index.js +3 -1
- package/dist/l1/index.js.map +1 -1
- 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",
|
|
1573
|
+
["d", uniqueD],
|
|
1571
1574
|
["type", "token_transfer"]
|
|
1572
1575
|
]
|
|
1573
1576
|
);
|