@galoymoney/client
Advanced tools
Comparing version 0.1.53 to 0.1.54
@@ -5,3 +5,3 @@ import bolt11 from "bolt11"; | ||
export declare const getHashFromInvoice: (invoice: string) => string | undefined; | ||
export declare type Network = "mainnet" | "testnet" | "regtest"; | ||
export declare type Network = "mainnet" | "signet" | "regtest"; | ||
export declare enum PaymentType { | ||
@@ -8,0 +8,0 @@ Lightning = "lightning", |
@@ -11,2 +11,14 @@ "use strict"; | ||
var lnurl_pay_1 = require("lnurl-pay"); | ||
var parseNetwork = function (network) { | ||
if (network === "mainnet") { | ||
return bitcoinjs_lib_1.networks.bitcoin; | ||
} | ||
else if (network === "signet") { | ||
return bitcoinjs_lib_1.networks.testnet; | ||
} | ||
else if (network === "regtest") { | ||
return bitcoinjs_lib_1.networks.regtest; | ||
} | ||
return bitcoinjs_lib_1.networks.bitcoin; | ||
}; | ||
var getDescription = function (decoded) { | ||
@@ -173,3 +185,3 @@ var _a; | ||
!(lnProtocol.match(/^lnbc/iu) && !lnProtocol.match(/^lnbcrt/iu))) || | ||
(network === "testnet" && !lnProtocol.match(/^lntb/iu)) || | ||
(network === "signet" && !lnProtocol.match(/^lntb/iu)) || | ||
(network === "regtest" && !lnProtocol.match(/^lnbcrt/iu))) { | ||
@@ -240,3 +252,3 @@ return { | ||
// will throw if address is not valid | ||
bitcoinjs_lib_1.address.toOutputScript(path, bitcoinjs_lib_1.networks[network === "mainnet" ? "bitcoin" : network]); | ||
bitcoinjs_lib_1.address.toOutputScript(path, parseNetwork(network)); | ||
return { | ||
@@ -243,0 +255,0 @@ valid: true, |
@@ -5,3 +5,3 @@ import bolt11 from "bolt11"; | ||
export declare const getHashFromInvoice: (invoice: string) => string | undefined; | ||
export declare type Network = "mainnet" | "testnet" | "regtest"; | ||
export declare type Network = "mainnet" | "signet" | "regtest"; | ||
export declare type PaymentType = "lightning" | "onchain" | "intraledger" | "lnurl"; | ||
@@ -8,0 +8,0 @@ export interface ValidPaymentResponse { |
@@ -11,2 +11,14 @@ "use strict"; | ||
var lnurl_pay_1 = require("lnurl-pay"); | ||
var parseNetwork = function (network) { | ||
if (network === "mainnet") { | ||
return bitcoinjs_lib_1.networks.bitcoin; | ||
} | ||
else if (network === "signet") { | ||
return bitcoinjs_lib_1.networks.testnet; | ||
} | ||
else if (network === "regtest") { | ||
return bitcoinjs_lib_1.networks.regtest; | ||
} | ||
return bitcoinjs_lib_1.networks.bitcoin; | ||
}; | ||
var getDescription = function (decoded) { | ||
@@ -103,3 +115,3 @@ var _a; | ||
!(lnProtocol.match(/^lnbc/iu) && !lnProtocol.match(/^lnbcrt/iu))) || | ||
(network === "testnet" && !lnProtocol.match(/^lntb/iu)) || | ||
(network === "signet" && !lnProtocol.match(/^lntb/iu)) || | ||
(network === "regtest" && !lnProtocol.match(/^lnbcrt/iu))) { | ||
@@ -174,3 +186,3 @@ return { | ||
// will throw if address is not valid | ||
bitcoinjs_lib_1.address.toOutputScript(path, bitcoinjs_lib_1.networks[network === "mainnet" ? "bitcoin" : network]); | ||
bitcoinjs_lib_1.address.toOutputScript(path, parseNetwork(network)); | ||
return { | ||
@@ -177,0 +189,0 @@ valid: true, |
{ | ||
"name": "@galoymoney/client", | ||
"main": "dist/index.js", | ||
"version": "0.1.53", | ||
"version": "0.1.54", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/galoymoney/galoy-client", |
@@ -22,3 +22,3 @@ # Galoy Client | ||
destination: "username or invoice or bitcoin address", | ||
network: "mainnet", // or testnet or regtest | ||
network: "mainnet", // or signet or regtest | ||
pubKey: "nodePubKey", | ||
@@ -25,0 +25,0 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
555192
9972