bolt12-decoder
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -31,3 +31,3 @@ export const tagParser: { | ||
declare function fromwire_offer_currency(buffer: any): any; | ||
declare function fromwire_offer_amount(buffer: any): number | Buffer; | ||
declare function fromwire_offer_amount(buffer: any): any; | ||
declare function fromwire_offer_description(buffer: any): any; | ||
@@ -40,3 +40,3 @@ declare function fromwire_offer_features(buffer: any): any[]; | ||
declare function fromwire_offer_node_id(buffer: any): any; | ||
declare function fromwire_invoice_request_amount(buffer: any): number | Buffer; | ||
declare function fromwire_invoice_request_amount(buffer: any): any; | ||
declare function fromwire_invoice_request_features(buffer: any): any[]; | ||
@@ -49,3 +49,3 @@ declare function fromwire_invoice_request_quantity(buffer: any): number | Buffer; | ||
declare function fromwire_invoice_payment_hash(buffer: any): any; | ||
declare function fromwire_invoice_amount(buffer: any): number | Buffer; | ||
declare function fromwire_invoice_amount(buffer: any): any; | ||
declare function fromwire_invoice_fallbacks(buffer: any): { | ||
@@ -52,0 +52,0 @@ fallbacks: any[]; |
{ | ||
"name": "bolt12-decoder", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Decode BOLT12 Offers", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -48,2 +48,6 @@ import { Buffer } from 'buffer' | ||
function stripMsatSuffix(val) { | ||
return typeof val === 'string' ? val.replace('msat', '') : val.toString() | ||
} | ||
function fromwire_offer_chains(buffer) { | ||
@@ -77,3 +81,3 @@ let retarr | ||
retarr = fromwire_tu64(buffer) | ||
value['amount'] = retarr[0] | ||
value['amount'] = stripMsatSuffix(retarr[0]) | ||
buffer = retarr[1] | ||
@@ -184,3 +188,3 @@ | ||
retarr = fromwire_tu64(buffer) | ||
value['msat'] = retarr[0] | ||
value['msat'] = stripMsatSuffix(retarr[0]) | ||
buffer = retarr[1] | ||
@@ -239,3 +243,3 @@ | ||
retarr = fromwire_tu64(buffer) | ||
value['msat'] = retarr[0] | ||
value['msat'] = stripMsatSuffix(retarr[0]) | ||
buffer = retarr[1] | ||
@@ -242,0 +246,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
32555
972