applesauce-wallet 0.0.0-next-20250310173615 → 0.0.0-next-20250310180212
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.
|
@@ -8,6 +8,10 @@ export type HistoryDetails = {
|
|
|
8
8
|
amount: number;
|
|
9
9
|
/** An array of token event ids created */
|
|
10
10
|
created: string[];
|
|
11
|
+
/** The mint that was spent from */
|
|
12
|
+
mint?: string;
|
|
13
|
+
/** The fee paid */
|
|
14
|
+
fee?: number;
|
|
11
15
|
};
|
|
12
16
|
export declare const HistoryDetailsSymbol: unique symbol;
|
|
13
17
|
/** returns an array of redeemed event ids in a history event */
|
package/dist/helpers/history.js
CHANGED
|
@@ -24,8 +24,11 @@ export function getHistoryDetails(history) {
|
|
|
24
24
|
const amount = parseInt(amountStr);
|
|
25
25
|
if (!Number.isFinite(amount))
|
|
26
26
|
throw new Error("Failed to parse amount");
|
|
27
|
+
const mint = tags.find((t) => t[0] === "mint")?.[1];
|
|
28
|
+
const feeStr = tags.find((t) => t[0] === "fee")?.[1];
|
|
29
|
+
const fee = feeStr ? parseInt(feeStr) : undefined;
|
|
27
30
|
const created = tags.filter((t) => isETag(t) && t[3] === "created").map((t) => t[1]);
|
|
28
|
-
return { direction, amount, created };
|
|
31
|
+
return { direction, amount, created, mint, fee };
|
|
29
32
|
});
|
|
30
33
|
}
|
|
31
34
|
/** Decrypts a wallet history event */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "applesauce-wallet",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-20250310180212",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"applesauce-core": "0.0.0-next-
|
|
45
|
+
"applesauce-core": "0.0.0-next-20250310180212",
|
|
46
46
|
"nostr-tools": "^2.10.4",
|
|
47
47
|
"rxjs": "^7.8.1"
|
|
48
48
|
},
|