@galoymoney/client
Advanced tools
Comparing version 0.1.43 to 0.1.44
@@ -20,2 +20,4 @@ import bolt11 from "bolt11"; | ||
export declare const lightningInvoiceHasExpired: (payReq: bolt11.PaymentRequestObject) => boolean; | ||
export declare const getLightningInvoiceExpiryTime: (payReq: bolt11.PaymentRequestObject) => number; | ||
export declare const decodeInvoiceString: (invoice: string) => bolt11.PaymentRequestObject; | ||
declare type ParsePaymentDestinationArgs = { | ||
@@ -22,0 +24,0 @@ destination: string; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parsePaymentDestination = exports.lightningInvoiceHasExpired = exports.getHashFromInvoice = exports.getDestination = exports.getDescription = void 0; | ||
exports.parsePaymentDestination = exports.decodeInvoiceString = exports.getLightningInvoiceExpiryTime = exports.lightningInvoiceHasExpired = exports.getHashFromInvoice = exports.getDestination = exports.getDescription = void 0; | ||
var bolt11_1 = __importDefault(require("bolt11")); | ||
@@ -35,2 +35,10 @@ var url_1 = __importDefault(require("url")); | ||
exports.lightningInvoiceHasExpired = lightningInvoiceHasExpired; | ||
var getLightningInvoiceExpiryTime = function (payReq) { | ||
return (payReq === null || payReq === void 0 ? void 0 : payReq.timeExpireDate) || NaN; | ||
}; | ||
exports.getLightningInvoiceExpiryTime = getLightningInvoiceExpiryTime; | ||
var decodeInvoiceString = function (invoice) { | ||
return bolt11_1.default.decode(invoice); | ||
}; | ||
exports.decodeInvoiceString = decodeInvoiceString; | ||
// from https://github.com/bitcoin/bips/blob/master/bip-0020.mediawiki#Transfer%20amount/size | ||
@@ -37,0 +45,0 @@ var reAmount = /^(([\d.]+)(X(\d+))?|x([\da-f]*)(\.([\da-f]*))?(X([\da-f]+))?)$/iu; |
@@ -144,2 +144,4 @@ declare const _default: { | ||
addAmount: string; | ||
expired: string; | ||
expiresIn: string; | ||
}; | ||
@@ -146,0 +148,0 @@ ScanningQRCodeScreen: { |
@@ -541,3 +541,5 @@ "use strict"; | ||
shareInvoice: "Share Invoice", | ||
addAmount: "Request Specific Amount" | ||
addAmount: "Request Specific Amount", | ||
expired: "The invoice has expired", | ||
expiresIn: "Expires in", | ||
}, | ||
@@ -544,0 +546,0 @@ ScanningQRCodeScreen: { |
@@ -144,2 +144,4 @@ declare const _default: { | ||
addAmount: string; | ||
expired: string; | ||
expiresIn: string; | ||
}; | ||
@@ -146,0 +148,0 @@ ScanningQRCodeScreen: { |
@@ -524,3 +524,5 @@ "use strict"; | ||
shareInvoice: "Compartir factura", | ||
addAmount: "Solicitar Monto Específico" | ||
addAmount: "Solicitar Monto Específico", | ||
expired: "La factura ha expirado", | ||
expiresIn: "Expira en", | ||
}, | ||
@@ -527,0 +529,0 @@ ScanningQRCodeScreen: { |
{ | ||
"name": "@galoymoney/client", | ||
"main": "dist/index.js", | ||
"version": "0.1.43", | ||
"version": "0.1.44", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/galoymoney/galoy-client", |
545541
9669