commit 28d1c188e11a87d744975010db5553621879cf38
parent 6694d39692f20dc6d2d2a2d74a84db2b3449599e
Author: triesap <triesap@radroots.dev>
Date: Mon, 3 Nov 2025 08:28:44 +0000
utils-nostr: add events and trade bindings dependencies. normalize listing tag emission by stringifying dynamic values to enforce consistent tag types
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/utils-nostr/package.json b/utils-nostr/package.json
@@ -32,6 +32,8 @@
"typescript": "5.8.3"
},
"dependencies": {
+ "@radroots/events-bindings": "*",
+ "@radroots/trade-bindings": "*",
"@radroots/utils": "*",
"@noble/curves": "^1.6.0",
"@noble/hashes": "^1.4.0",
diff --git a/utils-nostr/src/events/listing/tags.ts b/utils-nostr/src/events/listing/tags.ts
@@ -48,7 +48,7 @@ export const tag_listing_image = (opts: NostrEventTagImage): NostrEventTag => {
export const tags_listing = (opts: RadrootsListing): NostrEventTags => {
const { d_tag, product, quantities, prices } = opts;
const tags: NostrEventTags = [[`d`, d_tag]];
- for (const [k, v] of Object.entries(product)) if (v) tags.push([k, v]);
+ for (const [k, v] of Object.entries(product)) if (v) tags.push([k, String(v)]);
for (const quantity of quantities) {
tags.push(tag_listing_quantity(quantity));
}