This commit is contained in:
hatim boufnichel 2022-11-21 23:12:38 +01:00
parent 96b619c886
commit 4fd8c0d71d
31 changed files with 2734 additions and 2004 deletions

View file

@ -1,4 +1,4 @@
// @generated by protobuf-ts 2.8.1 with parameter long_type_number
// @generated by protobuf-ts 2.8.1
// @generated from protobuf file "invoices.proto" (package "invoicesrpc", syntax proto3)
// tslint:disable
import { Invoice } from "./lightning.js";
@ -59,7 +59,7 @@ export interface AddHoldInvoiceRequest {
*
* @generated from protobuf field: int64 value = 3;
*/
value: number;
value: bigint;
/**
*
* The value of this invoice in millisatoshis
@ -68,7 +68,7 @@ export interface AddHoldInvoiceRequest {
*
* @generated from protobuf field: int64 value_msat = 10;
*/
valueMsat: number;
valueMsat: bigint;
/**
*
* Hash (SHA-256) of a description of the payment. Used if the description of
@ -83,7 +83,7 @@ export interface AddHoldInvoiceRequest {
*
* @generated from protobuf field: int64 expiry = 5;
*/
expiry: number;
expiry: bigint;
/**
* Fallback on-chain address.
*
@ -95,7 +95,7 @@ export interface AddHoldInvoiceRequest {
*
* @generated from protobuf field: uint64 cltv_expiry = 7;
*/
cltvExpiry: number;
cltvExpiry: bigint;
/**
*
* Route hints that can each be individually used to assist in reaching the
@ -133,7 +133,7 @@ export interface AddHoldInvoiceResp {
*
* @generated from protobuf field: uint64 add_index = 2;
*/
addIndex: number;
addIndex: bigint;
/**
*
* The payment address of the generated invoice. This value should be used
@ -316,18 +316,18 @@ class AddHoldInvoiceRequest$Type extends MessageType<AddHoldInvoiceRequest> {
super("invoicesrpc.AddHoldInvoiceRequest", [
{ no: 1, name: "memo", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
{ no: 3, name: "value", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
{ no: 10, name: "value_msat", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
{ no: 3, name: "value", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 10, name: "value_msat", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 4, name: "description_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
{ no: 5, name: "expiry", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
{ no: 5, name: "expiry", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 6, name: "fallback_addr", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 7, name: "cltv_expiry", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
{ no: 7, name: "cltv_expiry", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 8, name: "route_hints", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => RouteHint },
{ no: 9, name: "private", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
]);
}
create(value?: PartialMessage<AddHoldInvoiceRequest>): AddHoldInvoiceRequest {
const message = { memo: "", hash: new Uint8Array(0), value: 0, valueMsat: 0, descriptionHash: new Uint8Array(0), expiry: 0, fallbackAddr: "", cltvExpiry: 0, routeHints: [], private: false };
const message = { memo: "", hash: new Uint8Array(0), value: 0n, valueMsat: 0n, descriptionHash: new Uint8Array(0), expiry: 0n, fallbackAddr: "", cltvExpiry: 0n, routeHints: [], private: false };
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
reflectionMergePartial<AddHoldInvoiceRequest>(this, message, value);
@ -345,22 +345,22 @@ class AddHoldInvoiceRequest$Type extends MessageType<AddHoldInvoiceRequest> {
message.hash = reader.bytes();
break;
case /* int64 value */ 3:
message.value = reader.int64().toNumber();
message.value = reader.int64().toBigInt();
break;
case /* int64 value_msat */ 10:
message.valueMsat = reader.int64().toNumber();
message.valueMsat = reader.int64().toBigInt();
break;
case /* bytes description_hash */ 4:
message.descriptionHash = reader.bytes();
break;
case /* int64 expiry */ 5:
message.expiry = reader.int64().toNumber();
message.expiry = reader.int64().toBigInt();
break;
case /* string fallback_addr */ 6:
message.fallbackAddr = reader.string();
break;
case /* uint64 cltv_expiry */ 7:
message.cltvExpiry = reader.uint64().toNumber();
message.cltvExpiry = reader.uint64().toBigInt();
break;
case /* repeated lnrpc.RouteHint route_hints */ 8:
message.routeHints.push(RouteHint.internalBinaryRead(reader, reader.uint32(), options));
@ -387,22 +387,22 @@ class AddHoldInvoiceRequest$Type extends MessageType<AddHoldInvoiceRequest> {
if (message.hash.length)
writer.tag(2, WireType.LengthDelimited).bytes(message.hash);
/* int64 value = 3; */
if (message.value !== 0)
if (message.value !== 0n)
writer.tag(3, WireType.Varint).int64(message.value);
/* int64 value_msat = 10; */
if (message.valueMsat !== 0)
if (message.valueMsat !== 0n)
writer.tag(10, WireType.Varint).int64(message.valueMsat);
/* bytes description_hash = 4; */
if (message.descriptionHash.length)
writer.tag(4, WireType.LengthDelimited).bytes(message.descriptionHash);
/* int64 expiry = 5; */
if (message.expiry !== 0)
if (message.expiry !== 0n)
writer.tag(5, WireType.Varint).int64(message.expiry);
/* string fallback_addr = 6; */
if (message.fallbackAddr !== "")
writer.tag(6, WireType.LengthDelimited).string(message.fallbackAddr);
/* uint64 cltv_expiry = 7; */
if (message.cltvExpiry !== 0)
if (message.cltvExpiry !== 0n)
writer.tag(7, WireType.Varint).uint64(message.cltvExpiry);
/* repeated lnrpc.RouteHint route_hints = 8; */
for (let i = 0; i < message.routeHints.length; i++)
@ -425,12 +425,12 @@ class AddHoldInvoiceResp$Type extends MessageType<AddHoldInvoiceResp> {
constructor() {
super("invoicesrpc.AddHoldInvoiceResp", [
{ no: 1, name: "payment_request", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "add_index", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
{ no: 2, name: "add_index", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 3, name: "payment_addr", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
]);
}
create(value?: PartialMessage<AddHoldInvoiceResp>): AddHoldInvoiceResp {
const message = { paymentRequest: "", addIndex: 0, paymentAddr: new Uint8Array(0) };
const message = { paymentRequest: "", addIndex: 0n, paymentAddr: new Uint8Array(0) };
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
reflectionMergePartial<AddHoldInvoiceResp>(this, message, value);
@ -445,7 +445,7 @@ class AddHoldInvoiceResp$Type extends MessageType<AddHoldInvoiceResp> {
message.paymentRequest = reader.string();
break;
case /* uint64 add_index */ 2:
message.addIndex = reader.uint64().toNumber();
message.addIndex = reader.uint64().toBigInt();
break;
case /* bytes payment_addr */ 3:
message.paymentAddr = reader.bytes();
@ -466,7 +466,7 @@ class AddHoldInvoiceResp$Type extends MessageType<AddHoldInvoiceResp> {
if (message.paymentRequest !== "")
writer.tag(1, WireType.LengthDelimited).string(message.paymentRequest);
/* uint64 add_index = 2; */
if (message.addIndex !== 0)
if (message.addIndex !== 0n)
writer.tag(2, WireType.Varint).uint64(message.addIndex);
/* bytes payment_addr = 3; */
if (message.paymentAddr.length)