diff --git a/package.json b/package.json index 2934fa5b66..4174f76398 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "dependencies": { "@bitcoinerlab/secp256k1": "^1.1.1", - "@getalby/sdk": "^3.6.0", + "@getalby/sdk": "^3.8.2", "@headlessui/react": "^1.7.18", "@lightninglabs/lnc-web": "^0.3.1-alpha", "@noble/ciphers": "^0.5.1", diff --git a/src/app/components/TransactionsTable/TransactionModal.tsx b/src/app/components/TransactionsTable/TransactionModal.tsx index 3b2d9589ea..900d73dbc1 100644 --- a/src/app/components/TransactionsTable/TransactionModal.tsx +++ b/src/app/components/TransactionsTable/TransactionModal.tsx @@ -3,6 +3,7 @@ import { PopiconsArrowUpSolid, PopiconsChevronBottomLine, PopiconsChevronTopLine, + PopiconsXSolid, } from "@popicons/react"; import dayjs from "dayjs"; import { useEffect, useState } from "react"; @@ -56,17 +57,43 @@ export default function TransactionModal({
{getTransactionType(transaction) == "outgoing" ? ( -
- -
+ transaction.state === "pending" ? ( +
+ +
+ ) : transaction.state === "failed" ? ( +
+ +
+ ) : ( +
+ +
+ ) ) : (
- +
)}
-

- {transaction.type == "received" ? t("received") : t("sent")} + +

+ {transaction.type == "received" + ? t("received") + : t( + transaction.state === "settled" + ? "sent" + : transaction.state === "pending" + ? "sending" + : transaction.state === "failed" + ? "failed" + : "sent" + )}

@@ -76,6 +103,8 @@ export default function TransactionModal({ "text-3xl font-medium", transaction.type == "received" ? "text-green-600 dark:text-emerald-500" + : transaction.state == "failed" + ? "text-red-400 dark:text-rose-600" : "text-orange-600 dark:text-amber-600" )} > diff --git a/src/app/components/TransactionsTable/index.test.tsx b/src/app/components/TransactionsTable/index.test.tsx index cf29b6bf12..8e8089de80 100644 --- a/src/app/components/TransactionsTable/index.test.tsx +++ b/src/app/components/TransactionsTable/index.test.tsx @@ -22,7 +22,7 @@ const transactions: Props = { { timestamp: 1656573909064, createdAt: "1656573909064", - date: "5 days ago", + timeAgo: "5 days ago", description: "Polar Invoice for bob", host: "https://openai.com/dall-e-2/", id: "1", @@ -49,7 +49,7 @@ const invoices: Props = { totalAmountFiat: "$13.02", preimage: "", title: "lambo lambo", - date: "4 days ago", + timeAgo: "4 days ago", }, { id: "lnbcrt6543210n1p3tadjepp5rv6ufq4vumg66l9gcyxqhy89n6w90mx0mh6gcj0sawrf6xuep5ssdq5g9kxy7fqd9h8vmmfvdjscqzpgxqyz5vqsp5f9yzxeqjw33ule4rffuh0py32gjjsx8z48cd4xjl8ej3rn7zdtdq9qyyssqe6qvkfe260myc9ypgs5n63xzwcx82fderg8p5ysh6c2fvpz5xu4ksvhs5av0wwestk5pmucmhk8lpjhmy7wqyq9c29xgm9na2q5xv5spy5kukj", @@ -59,7 +59,7 @@ const invoices: Props = { totalAmountFiat: "$127.80", preimage: "", title: "Alby invoice", - date: "6 days ago", + timeAgo: "6 days ago", }, ], }; @@ -74,7 +74,7 @@ const invoicesWithBoostagram: Props = { totalAmountFiat: "$13.02", preimage: "", title: "lambo lambo", - date: "4 days ago", + timeAgo: "4 days ago", }, { id: "lnbcrt888880n1p3tad30pp56j6g34wctydrfx4wwdwj3schell8uqug6jnlehlkpw02mdfd9wlqdq0v36k6urvd9hxwuccqzpgxqyz5vqsp5995q4egstsvnyetwvpax6jw8q0fnn4tyz3gp35k3yex29emhsylq9qyyssq0yxpx6peyn4vsepwj3l68w9sc5dqnkt07zff6aw4kqvcfs0fpu4jpfh929w6vqrgtjfkmrlwghq4s9t4mnwrh4dlkm6wjem5uq8eu4gpwqln0j", @@ -84,7 +84,7 @@ const invoicesWithBoostagram: Props = { totalAmountFiat: "$17.36", preimage: "", title: "dumplings", - date: "5 days ago", + timeAgo: "5 days ago", boostagram: { app_name: "Fountain", name: "Friedemann", diff --git a/src/app/components/TransactionsTable/index.tsx b/src/app/components/TransactionsTable/index.tsx index 75f2bec035..d12a6b8043 100644 --- a/src/app/components/TransactionsTable/index.tsx +++ b/src/app/components/TransactionsTable/index.tsx @@ -1,5 +1,9 @@ import Loading from "@components/Loading"; -import { PopiconsArrowDownSolid, PopiconsArrowUpSolid } from "@popicons/react"; +import { + PopiconsArrowDownSolid, + PopiconsArrowUpSolid, + PopiconsXSolid, +} from "@popicons/react"; import { useState } from "react"; import { useTranslation } from "react-i18next"; @@ -60,25 +64,50 @@ export default function TransactionsTable({
{type == "outgoing" ? ( -
- -
+ tx.state === "pending" ? ( +
+ +
+ ) : tx.state === "failed" ? ( +
+ +
+ ) : ( +
+ +
+ ) ) : (
- +
)}
-

+

{tx.title || tx.boostagram?.message || - (type == "incoming" ? t("received") : t("sent"))} + (type == "incoming" + ? t("received") + : t( + tx.state === "settled" + ? "sent" + : tx.state === "pending" + ? "sending" + : tx.state === "failed" + ? "failed" + : "sent" + ))}

- {tx.date} + {tx.timeAgo}

@@ -88,6 +117,8 @@ export default function TransactionsTable({ "text-sm", type == "incoming" ? "text-green-600 dark:text-emerald-500" + : tx.state == "failed" + ? "text-red-600 dark:text-rose-500" : "text-orange-600 dark:text-amber-600" )} > diff --git a/src/app/hooks/useTransactions.ts b/src/app/hooks/useTransactions.ts index f7b24d7377..c3839a294c 100644 --- a/src/app/hooks/useTransactions.ts +++ b/src/app/hooks/useTransactions.ts @@ -16,13 +16,14 @@ export const useTransactions = () => { const getTransactionsResponse = await api.getTransactions({ limit, }); - const transactions = getTransactionsResponse.transactions.map( (transaction) => ({ ...transaction, title: transaction.memo, - date: dayjs(transaction.settleDate).fromNow(), - timestamp: transaction.settleDate, + timeAgo: dayjs( + transaction.settleDate || transaction.creationDate + ).fromNow(), + timestamp: transaction.settleDate || transaction.creationDate, }) ); diff --git a/src/app/utils/payments.ts b/src/app/utils/payments.ts index 16bca621e0..4b3368d6a3 100644 --- a/src/app/utils/payments.ts +++ b/src/app/utils/payments.ts @@ -8,7 +8,7 @@ export const convertPaymentToTransaction = ( ...payment, id: `${payment.id}`, type: "sent", - date: dayjs(+payment.createdAt).fromNow(), + timeAgo: dayjs(+payment.createdAt).fromNow(), title: payment.description || payment.name, publisherLink: publisherLink || payment.location, timestamp: parseInt(payment.createdAt), diff --git a/src/common/utils/helpers.ts b/src/common/utils/helpers.ts index f104465a2d..b54e97d3c3 100644 --- a/src/common/utils/helpers.ts +++ b/src/common/utils/helpers.ts @@ -68,7 +68,7 @@ export function mergeTransactions( payments: ConnectorTransaction[] ): ConnectorTransaction[] { const mergedTransactions = [...invoices, ...payments].sort((a, b) => { - return b.settleDate - a.settleDate; + return (b.settleDate ?? 0) - (a.settleDate ?? 0); }); return mergedTransactions; diff --git a/src/extension/background-script/actions/ln/getTransactions.ts b/src/extension/background-script/actions/ln/getTransactions.ts index 341014be6f..62f71715c5 100644 --- a/src/extension/background-script/actions/ln/getTransactions.ts +++ b/src/extension/background-script/actions/ln/getTransactions.ts @@ -10,9 +10,8 @@ const getTransactions = async (message: MessageGetTransactions) => { try { const result = await connector.getTransactions(); - let transactions: ConnectorTransaction[] = result.data.transactions - .filter((transaction) => transaction.settled) - .map((transaction) => { + let transactions: ConnectorTransaction[] = result.data.transactions.map( + (transaction) => { const boostagram = utils.getBoostagramFromInvoiceCustomRecords( transaction.custom_records ); @@ -21,7 +20,8 @@ const getTransactions = async (message: MessageGetTransactions) => { boostagram, paymentHash: transaction.payment_hash, }; - }); + } + ); if (limit) { transactions = transactions.slice(0, limit); diff --git a/src/extension/background-script/connectors/alby.ts b/src/extension/background-script/connectors/alby.ts index fada7ec0a2..8542b60a69 100644 --- a/src/extension/background-script/connectors/alby.ts +++ b/src/extension/background-script/connectors/alby.ts @@ -113,19 +113,22 @@ export default class Alby implements Connector { client.invoices({}) )) as Invoice[]; - const transactions: ConnectorTransaction[] = invoicesResponse.map( - (invoice, index): ConnectorTransaction => ({ - custom_records: invoice.custom_records, - id: `${invoice.payment_request}-${index}`, - memo: invoice.comment || invoice.memo, - preimage: invoice.preimage ?? "", - payment_hash: invoice.payment_hash, - settled: invoice.settled, - settleDate: new Date(invoice.settled_at).getTime(), - totalAmount: invoice.amount, - type: invoice.type == "incoming" ? "received" : "sent", - }) - ); + const transactions: ConnectorTransaction[] = invoicesResponse + .map( + (invoice, index): ConnectorTransaction => ({ + custom_records: invoice.custom_records, + id: `${invoice.payment_request}-${index}`, + memo: invoice.comment || invoice.memo, + preimage: invoice.preimage ?? "", + payment_hash: invoice.payment_hash, + settled: invoice.settled, + settleDate: new Date(invoice.settled_at).getTime(), + creationDate: new Date(invoice.created_at).getTime(), + totalAmount: invoice.amount, + type: invoice.type == "incoming" ? "received" : "sent", + }) + ) + .filter((transaction) => transaction.settled); return { data: { diff --git a/src/extension/background-script/connectors/commando.ts b/src/extension/background-script/connectors/commando.ts index 9a627a49a5..1e723ee28b 100644 --- a/src/extension/background-script/connectors/commando.ts +++ b/src/extension/background-script/connectors/commando.ts @@ -4,6 +4,7 @@ import LnMessage from "lnmessage"; import { v4 as uuidv4 } from "uuid"; import { Account } from "~/types"; +import lightningPayReq from "bolt11-signet"; import { mergeTransactions } from "~/common/utils/helpers"; import Connector, { CheckPaymentArgs, @@ -238,18 +239,28 @@ export default class Commando implements Connector { .then((resp) => { const parsed = resp as CommandoListInvoicesResponse; return parsed.invoices - .map( - (invoice, index): ConnectorTransaction => ({ + .map((invoice, index): ConnectorTransaction => { + const decoded = invoice.bolt11 + ? lightningPayReq.decode(invoice.bolt11) + : null; + + const creationDate = + decoded && decoded.timestamp + ? decoded.timestamp * 1000 + : new Date(0).getTime(); + + return { id: invoice.label, memo: invoice.description, settled: invoice.status === "paid", + creationDate: creationDate, preimage: invoice.payment_preimage, payment_hash: invoice.payment_hash, settleDate: invoice.paid_at * 1000, type: "received", totalAmount: Math.floor(invoice.amount_received_msat / 1000), - }) - ) + }; + }) .filter((invoice) => invoice.settled); }); } @@ -261,7 +272,7 @@ export default class Commando implements Connector { const transactions: ConnectorTransaction[] = mergeTransactions( incomingInvoicesResponse, outgoingInvoicesResponse - ); + ).filter((transaction) => transaction.settled); return { data: { @@ -280,18 +291,28 @@ export default class Commando implements Connector { .then((resp) => { const parsed = resp as CommandoListSendPaysResponse; return parsed.payments - .map( - (payment, index): ConnectorTransaction => ({ + .map((payment, index): ConnectorTransaction => { + const decoded = payment.bolt11 + ? lightningPayReq.decode(payment.bolt11) + : null; + + const creationDate = + decoded && decoded.timestamp + ? decoded.timestamp * 1000 + : new Date(0).getTime(); + + return { id: `${payment.id}`, memo: payment.description ?? "", settled: payment.status === "complete", preimage: payment.payment_preimage, + creationDate: creationDate, payment_hash: payment.payment_hash, settleDate: payment.created_at * 1000, type: "sent", totalAmount: payment.amount_sent_msat / 1000, - }) - ) + }; + }) .filter((payment) => payment.settled); }); } diff --git a/src/extension/background-script/connectors/connector.interface.ts b/src/extension/background-script/connectors/connector.interface.ts index 7531d30688..4349e6b934 100644 --- a/src/extension/background-script/connectors/connector.interface.ts +++ b/src/extension/background-script/connectors/connector.interface.ts @@ -31,10 +31,12 @@ export interface ConnectorTransaction { /** * Settle date in UNIX milliseconds */ - settleDate: number; + settleDate: number | null; + creationDate: number; totalAmount: number; displayAmount?: [number, ACCOUNT_CURRENCIES]; type: "received" | "sent"; + state?: "settled" | "pending" | "failed"; } export interface MakeInvoiceArgs { diff --git a/src/extension/background-script/connectors/galoy.ts b/src/extension/background-script/connectors/galoy.ts index 4bf71ef0c9..ff2d2121b1 100644 --- a/src/extension/background-script/connectors/galoy.ts +++ b/src/extension/background-script/connectors/galoy.ts @@ -238,7 +238,7 @@ class Galoy implements Connector { ); } - transactions.push({ + const transaction: ConnectorTransaction = { id: edge.cursor, memo: tx.memo || paymentRequestDescription, preimage: @@ -246,10 +246,15 @@ class Galoy implements Connector { payment_hash: tx.initiationVia.paymentHash || "", settled: tx.status === "SUCCESS", settleDate: createdAtDate.getTime(), + creationDate: createdAtDate.getTime(), totalAmount: absSettlementAmount, type: transactionType, displayAmount, - }); + }; + + if (transaction.settled) { + transactions.push(transaction); + } } } diff --git a/src/extension/background-script/connectors/lawallet.ts b/src/extension/background-script/connectors/lawallet.ts index 999059686a..a489d0616a 100644 --- a/src/extension/background-script/connectors/lawallet.ts +++ b/src/extension/background-script/connectors/lawallet.ts @@ -112,12 +112,14 @@ export default class LaWallet implements Connector { } ); - const transactions = _transactions.map((event) => { - return { - ...event, - kind: event.kind as EventKind, - }; - }) as Event[]; + const transactions: Event[] = _transactions + .map((event) => { + return { + ...event, + kind: event.kind as EventKind, + }; + }) + .sort((a, b) => b.created_at - a.created_at); const parsedTransactions: ConnectorTransaction[] = await Promise.all( transactions.map( @@ -127,8 +129,8 @@ export default class LaWallet implements Connector { return { data: { - transactions: parsedTransactions.sort( - (a, b) => b.settleDate - a.settleDate + transactions: parsedTransactions.filter( + (transaction) => transaction.settled ), }, }; @@ -476,6 +478,7 @@ export async function parseTransaction( preimage: await extractPreimage(event, privateKey), settled: true, settleDate: event.created_at * 1000, + creationDate: event.created_at * 1000, totalAmount: content.tokens.BTC / 1000, type: event.tags[1][1] === userPubkey ? "received" : "sent", custom_records: {}, diff --git a/src/extension/background-script/connectors/lnbits.ts b/src/extension/background-script/connectors/lnbits.ts index d5440ec611..59cdc015ad 100644 --- a/src/extension/background-script/connectors/lnbits.ts +++ b/src/extension/background-script/connectors/lnbits.ts @@ -122,8 +122,14 @@ class LnBits implements Connector { webhook_status: string; }[] ) => { - const transactions: ConnectorTransaction[] = data.map( - (transaction, index): ConnectorTransaction => { + const transactions: ConnectorTransaction[] = data + .map((transaction, index): ConnectorTransaction => { + const decoded = lightningPayReq.decode(transaction.bolt11); + + const creationDate = decoded.timestamp + ? decoded.timestamp * 1000 + : new Date(0).getTime(); + return { id: `${transaction.checking_id}-${index}`, memo: transaction.memo, @@ -135,11 +141,12 @@ class LnBits implements Connector { payment_hash: transaction.payment_hash, settled: !transaction.pending, settleDate: transaction.time * 1000, + creationDate: creationDate, totalAmount: Math.abs(Math.floor(transaction.amount / 1000)), type: transaction.amount > 0 ? "received" : "sent", }; - } - ); + }) + .filter((transaction) => transaction.settled); return { data: { diff --git a/src/extension/background-script/connectors/lnc.ts b/src/extension/background-script/connectors/lnc.ts index fb93faee18..136467b70c 100644 --- a/src/extension/background-script/connectors/lnc.ts +++ b/src/extension/background-script/connectors/lnc.ts @@ -266,6 +266,7 @@ class Lnc implements Connector { preimage: invoice.rPreimage.toString(), settled: invoice.state === "SETTLED", settleDate: parseInt(invoice.settleDate) * 1000, + creationDate: parseInt(invoice.creationDate) * 1000, totalAmount: parseInt(invoice.value), type: "received", }; @@ -282,7 +283,7 @@ class Lnc implements Connector { const transactions: ConnectorTransaction[] = mergeTransactions( incomingInvoices, outgoingInvoices - ); + ).filter((transaction) => transaction.settled); return { data: { @@ -313,6 +314,7 @@ class Lnc implements Connector { payment_hash: payment.paymentHash, settled: true, settleDate: parseInt(payment.creationTimeNs) / 1_000_000, + creationDate: parseInt(payment.creationTimeNs) / 1_000_000, totalAmount: parseInt(payment.valueSat), type: "sent", }; diff --git a/src/extension/background-script/connectors/lnd.ts b/src/extension/background-script/connectors/lnd.ts index f9fef3e3a3..0160a06aee 100644 --- a/src/extension/background-script/connectors/lnd.ts +++ b/src/extension/background-script/connectors/lnd.ts @@ -467,6 +467,7 @@ class Lnd implements Connector { payment_hash: utils.base64ToHex(invoice.r_hash), settled: invoice.settled, settleDate: parseInt(invoice.settle_date) * 1000, + creationDate: parseInt(invoice.creation_date) * 1000, totalAmount: parseInt(invoice.value), type: "received", custom_records, @@ -484,7 +485,7 @@ class Lnd implements Connector { const transactions: ConnectorTransaction[] = mergeTransactions( invoices, payments - ); + ).filter((transaction) => transaction.settled); return { data: { @@ -533,6 +534,7 @@ class Lnd implements Connector { payment_hash: payment.payment_hash, settled: true, settleDate: parseInt(payment.creation_date) * 1000, + creationDate: parseInt(payment.creation_date) * 1000, totalAmount: payment.value_sat, type: "sent", }; diff --git a/src/extension/background-script/connectors/lndhub.ts b/src/extension/background-script/connectors/lndhub.ts index 0286a61a17..24243e599d 100644 --- a/src/extension/background-script/connectors/lndhub.ts +++ b/src/extension/background-script/connectors/lndhub.ts @@ -105,23 +105,22 @@ export default class LndHub implements Connector { }[] >("GET", "/getuserinvoices", undefined); - const invoices: ConnectorTransaction[] = data - .map( - (invoice, index): ConnectorTransaction => ({ - custom_records: invoice.custom_records, - id: `${invoice.payment_request}-${index}`, - memo: invoice.description, - preimage: "", // lndhub doesn't support preimage (yet) - payment_hash: invoice.payment_hash, - settled: invoice.ispaid, - settleDate: invoice.timestamp * 1000, - totalAmount: invoice.amt, - type: "received", - }) - ) - .sort((a, b) => { - return b.settleDate - a.settleDate; - }); + data.sort((a, b) => b.timestamp - a.timestamp); + + const invoices: ConnectorTransaction[] = data.map( + (invoice, index): ConnectorTransaction => ({ + custom_records: invoice.custom_records, + id: `${invoice.payment_request}-${index}`, + memo: invoice.description, + preimage: "", // lndhub doesn't support preimage (yet) + payment_hash: invoice.payment_hash, + settled: invoice.ispaid, + settleDate: invoice.timestamp * 1000, + creationDate: invoice.timestamp * 1000, + totalAmount: invoice.amt, + type: "received", + }) + ); return invoices; } @@ -133,7 +132,7 @@ export default class LndHub implements Connector { const transactions: ConnectorTransaction[] = mergeTransactions( incomingInvoices, outgoingInvoices - ); + ).filter((transaction) => transaction.settled); return { data: { @@ -176,6 +175,7 @@ export default class LndHub implements Connector { ), settled: true, settleDate: transaction.timestamp * 1000, + creationDate: transaction.timestamp * 1000, totalAmount: transaction.value, type: "sent", }) diff --git a/src/extension/background-script/connectors/nwc.ts b/src/extension/background-script/connectors/nwc.ts index e70aaaaabe..51b5fbbb59 100644 --- a/src/extension/background-script/connectors/nwc.ts +++ b/src/extension/background-script/connectors/nwc.ts @@ -88,10 +88,9 @@ class NWCConnector implements Connector { async getTransactions(): Promise { const listTransactionsResponse = await this.nwc.listTransactions({ - unpaid: false, limit: 50, // restricted by relay max event payload size + unpaid_outgoing: true, }); - const transactions: ConnectorTransaction[] = listTransactionsResponse.transactions.map( (transaction, index): ConnectorTransaction => ({ @@ -99,13 +98,15 @@ class NWCConnector implements Connector { memo: transaction.description, preimage: transaction.preimage, payment_hash: transaction.payment_hash, - settled: true, + settled: transaction.state == "settled", settleDate: transaction.settled_at * 1000, + creationDate: transaction.created_at * 1000, totalAmount: Math.floor(transaction.amount / 1000), type: transaction.type == "incoming" ? "received" : "sent", custom_records: this.tlvToCustomRecords( transaction.metadata?.["tlv_records"] as TLVRecord[] | undefined ), + state: transaction.state, }) ); return { diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json index 359e843e17..e796b0dc85 100644 --- a/src/i18n/locales/en/translation.json +++ b/src/i18n/locales/en/translation.json @@ -1253,6 +1253,8 @@ "payment_hash": "Payment Hash", "received": "Received", "sent": "Sent", + "sending": "Sending", + "failed": "Failed", "date_time": "Date & Time", "boostagram": { "sender": "Sender", diff --git a/src/types.ts b/src/types.ts index 60ffc958ac..03d65b44a0 100644 --- a/src/types.ts +++ b/src/types.ts @@ -771,7 +771,7 @@ export type Transaction = { boostagram?: Invoice["boostagram"]; createdAt?: string; currency?: string; - date: string; + timeAgo: string; paymentHash?: string; description?: string; host?: string; @@ -787,6 +787,7 @@ export type Transaction = { type?: "sent" | "received"; value?: string; publisherLink?: string; // either the invoice URL if on PublisherSingleView, or the internal link to Publisher + state?: "settled" | "pending" | "failed"; }; export interface DbPayment { @@ -958,7 +959,8 @@ export interface Invoice { memo?: string; type: "received" | "sent"; settled: boolean; - settleDate: number; + settleDate: number | null; + creationDate: number; totalAmount: number; totalAmountFiat?: string; displayAmount?: [number, ACCOUNT_CURRENCIES]; diff --git a/yarn.lock b/yarn.lock index 4c2c951bb3..cca4ab4dee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -675,13 +675,13 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.52.0.tgz#78fe5f117840f69dc4a353adf9b9cd926353378c" integrity sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA== -"@getalby/sdk@^3.6.0": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@getalby/sdk/-/sdk-3.6.0.tgz#3ca47b9e150621bfb57228c0cbb8edb3b14c9394" - integrity sha512-ZpaxoZJO/71th1uaTt6viBnHn6RKTK+oCPH04sCTig+bn17cj1PAozrlIokHDQpTkkoegz6wx5w4nX+8aoSVSA== +"@getalby/sdk@^3.8.2": + version "3.8.2" + resolved "https://registry.yarnpkg.com/@getalby/sdk/-/sdk-3.8.2.tgz#84a184c46fdebf18652d6c06b92f07ed36129d3d" + integrity sha512-0F4ub/e+t93V9wzR5Vr+Xdfhhy5kK+ZKls/J3yX2YBT27X1Rd3QIPLCTUFCb4RaV6a/e17aZAVJF8Af7r9BeAg== dependencies: - eventemitter3 "^5.0.1" - nostr-tools "^1.17.0" + emittery "^1.0.3" + nostr-tools "2.9.4" "@headlessui/react@^1.7.18": version "1.7.18" @@ -1079,6 +1079,13 @@ dependencies: "@noble/hashes" "1.3.1" +"@noble/curves@1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35" + integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw== + dependencies: + "@noble/hashes" "1.3.2" + "@noble/curves@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.0.tgz#f05771ef64da724997f69ee1261b2417a49522d6" @@ -1098,6 +1105,11 @@ resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz" integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== +"@noble/hashes@1.3.2", "@noble/hashes@^1.1.5": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" + integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== + "@noble/hashes@1.3.3", "@noble/hashes@^1.3.1", "@noble/hashes@~1.3.2": version "1.3.3" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699" @@ -1108,11 +1120,6 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== -"@noble/hashes@^1.1.5": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" - integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== - "@noble/hashes@^1.2.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.0.tgz#085fd70f6d7d9d109671090ccae1d3bec62554a1" @@ -4196,6 +4203,11 @@ emittery@^0.13.1: resolved "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz" integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== +emittery@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-1.0.3.tgz#c9d2a9c689870f15251bb13b31c67715c26d69ac" + integrity sha512-tJdCJitoy2lrC2ldJcqN4vkqJ00lT+tOWNT1hBJjO/3FDMJa5TTIiYGCKGkn/WfCyOzUMObeohbVTj00fhiLiA== + emoji-log@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/emoji-log/-/emoji-log-1.0.2.tgz" @@ -7268,6 +7280,20 @@ normalize-range@^0.1.2: resolved "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz" integrity "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==" +nostr-tools@2.9.4: + version "2.9.4" + resolved "https://registry.yarnpkg.com/nostr-tools/-/nostr-tools-2.9.4.tgz#ec0e1faa95bf9e5fee30b36c842a270135f40183" + integrity sha512-Powumwkp+EWbdK1T8IsEX4daTLQhtWJvitfZ6OP2BdU1jJZvNlUp3SQB541UYw4uc9jgLbxZW6EZSdZoSfIygQ== + dependencies: + "@noble/ciphers" "^0.5.1" + "@noble/curves" "1.2.0" + "@noble/hashes" "1.3.1" + "@scure/base" "1.1.1" + "@scure/bip32" "1.3.1" + "@scure/bip39" "1.2.1" + optionalDependencies: + nostr-wasm v0.1.0 + nostr-tools@^1.17.0: version "1.17.0" resolved "https://registry.yarnpkg.com/nostr-tools/-/nostr-tools-1.17.0.tgz#b6f62e32fedfd9e68ec0a7ce57f74c44fc768e8c" @@ -7280,6 +7306,11 @@ nostr-tools@^1.17.0: "@scure/bip32" "1.3.1" "@scure/bip39" "1.2.1" +nostr-wasm@v0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/nostr-wasm/-/nostr-wasm-0.1.0.tgz#17af486745feb2b7dd29503fdd81613a24058d94" + integrity sha512-78BTryCLcLYv96ONU8Ws3Q1JzjlAt+43pWQhIl86xZmWeegYCNLPml7yQ+gG3vR6V5h4XGj+TxO+SS5dsThQIA== + npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz"