diff --git a/README.md b/README.md index 26508d4f9..c88594579 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,7 @@ versioning](#daemon-versions-packaged-with-lit). | LiT | LND | |-------------------|--------------| +| **v0.12.4-alpha** | v0.17.0-beta | | **v0.12.3-alpha** | v0.16.0-beta | | **v0.12.2-alpha** | v0.16.0-beta | | **v0.12.1-alpha** | v0.16.0-beta | @@ -151,6 +152,7 @@ The following table shows the supported combinations: | LiT | LND | Loop | Faraday | Pool | Taproot Assets | |-------------------|--------------|--------------|---------------|--------------|----------------| +| **v0.12.4-alpha** | v0.17.4-beta | v0.28.0-beta | v0.2.13-alpha | v0.6.4-beta | v0.3.3-alpha | | **v0.12.3-alpha** | v0.17.4-beta | v0.27.0-beta | v0.2.11-alpha | v0.6.4-beta | v0.3.3-alpha | | **v0.12.2-alpha** | v0.17.3-beta | v0.26.6-beta | v0.2.11-alpha | v0.6.4-beta | v0.3.2-alpha | | **v0.12.1-alpha** | v0.17.1-beta | v0.26.5-beta | v0.2.11-alpha | v0.6.4-beta | v0.3.1-alpha | diff --git a/app/src/types/generated/loop_pb.d.ts b/app/src/types/generated/loop_pb.d.ts index 2aae2b2a9..7321f38d5 100644 --- a/app/src/types/generated/loop_pb.d.ts +++ b/app/src/types/generated/loop_pb.d.ts @@ -58,6 +58,13 @@ export class LoopOutRequest extends jspb.Message { getIsExternalAddr(): boolean; setIsExternalAddr(value: boolean): void; + clearReservationIdsList(): void; + getReservationIdsList(): Array; + getReservationIdsList_asU8(): Array; + getReservationIdsList_asB64(): Array; + setReservationIdsList(value: Array): void; + addReservationIds(value: Uint8Array | string, index?: number): Uint8Array | string; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): LoopOutRequest.AsObject; static toObject(includeInstance: boolean, msg: LoopOutRequest): LoopOutRequest.AsObject; @@ -87,6 +94,7 @@ export namespace LoopOutRequest { account: string, accountAddrType: AddressTypeMap[keyof AddressTypeMap], isExternalAddr: boolean, + reservationIdsList: Array, } } @@ -1236,10 +1244,8 @@ export class ClientReservation extends jspb.Message { getAmount(): string; setAmount(value: string): void; - getTxId(): Uint8Array | string; - getTxId_asU8(): Uint8Array; - getTxId_asB64(): string; - setTxId(value: Uint8Array | string): void; + getTxId(): string; + setTxId(value: string): void; getVout(): number; setVout(value: number): void; @@ -1262,12 +1268,204 @@ export namespace ClientReservation { reservationId: Uint8Array | string, state: string, amount: string, - txId: Uint8Array | string, + txId: string, vout: number, expiry: number, } } +export class InstantOutRequest extends jspb.Message { + clearReservationIdsList(): void; + getReservationIdsList(): Array; + getReservationIdsList_asU8(): Array; + getReservationIdsList_asB64(): Array; + setReservationIdsList(value: Array): void; + addReservationIds(value: Uint8Array | string, index?: number): Uint8Array | string; + + clearOutgoingChanSetList(): void; + getOutgoingChanSetList(): Array; + setOutgoingChanSetList(value: Array): void; + addOutgoingChanSet(value: string, index?: number): string; + + getDestAddr(): string; + setDestAddr(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InstantOutRequest.AsObject; + static toObject(includeInstance: boolean, msg: InstantOutRequest): InstantOutRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InstantOutRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InstantOutRequest; + static deserializeBinaryFromReader(message: InstantOutRequest, reader: jspb.BinaryReader): InstantOutRequest; +} + +export namespace InstantOutRequest { + export type AsObject = { + reservationIdsList: Array, + outgoingChanSetList: Array, + destAddr: string, + } +} + +export class InstantOutResponse extends jspb.Message { + getInstantOutHash(): Uint8Array | string; + getInstantOutHash_asU8(): Uint8Array; + getInstantOutHash_asB64(): string; + setInstantOutHash(value: Uint8Array | string): void; + + getSweepTxId(): string; + setSweepTxId(value: string): void; + + getState(): string; + setState(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InstantOutResponse.AsObject; + static toObject(includeInstance: boolean, msg: InstantOutResponse): InstantOutResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InstantOutResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InstantOutResponse; + static deserializeBinaryFromReader(message: InstantOutResponse, reader: jspb.BinaryReader): InstantOutResponse; +} + +export namespace InstantOutResponse { + export type AsObject = { + instantOutHash: Uint8Array | string, + sweepTxId: string, + state: string, + } +} + +export class InstantOutQuoteRequest extends jspb.Message { + getAmt(): string; + setAmt(value: string): void; + + getNumReservations(): number; + setNumReservations(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InstantOutQuoteRequest.AsObject; + static toObject(includeInstance: boolean, msg: InstantOutQuoteRequest): InstantOutQuoteRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InstantOutQuoteRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InstantOutQuoteRequest; + static deserializeBinaryFromReader(message: InstantOutQuoteRequest, reader: jspb.BinaryReader): InstantOutQuoteRequest; +} + +export namespace InstantOutQuoteRequest { + export type AsObject = { + amt: string, + numReservations: number, + } +} + +export class InstantOutQuoteResponse extends jspb.Message { + getServiceFeeSat(): string; + setServiceFeeSat(value: string): void; + + getSweepFeeSat(): string; + setSweepFeeSat(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InstantOutQuoteResponse.AsObject; + static toObject(includeInstance: boolean, msg: InstantOutQuoteResponse): InstantOutQuoteResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InstantOutQuoteResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InstantOutQuoteResponse; + static deserializeBinaryFromReader(message: InstantOutQuoteResponse, reader: jspb.BinaryReader): InstantOutQuoteResponse; +} + +export namespace InstantOutQuoteResponse { + export type AsObject = { + serviceFeeSat: string, + sweepFeeSat: string, + } +} + +export class ListInstantOutsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListInstantOutsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListInstantOutsRequest): ListInstantOutsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListInstantOutsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListInstantOutsRequest; + static deserializeBinaryFromReader(message: ListInstantOutsRequest, reader: jspb.BinaryReader): ListInstantOutsRequest; +} + +export namespace ListInstantOutsRequest { + export type AsObject = { + } +} + +export class ListInstantOutsResponse extends jspb.Message { + clearSwapsList(): void; + getSwapsList(): Array; + setSwapsList(value: Array): void; + addSwaps(value?: InstantOut, index?: number): InstantOut; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListInstantOutsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListInstantOutsResponse): ListInstantOutsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListInstantOutsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListInstantOutsResponse; + static deserializeBinaryFromReader(message: ListInstantOutsResponse, reader: jspb.BinaryReader): ListInstantOutsResponse; +} + +export namespace ListInstantOutsResponse { + export type AsObject = { + swapsList: Array, + } +} + +export class InstantOut extends jspb.Message { + getSwapHash(): Uint8Array | string; + getSwapHash_asU8(): Uint8Array; + getSwapHash_asB64(): string; + setSwapHash(value: Uint8Array | string): void; + + getState(): string; + setState(value: string): void; + + getAmount(): string; + setAmount(value: string): void; + + clearReservationIdsList(): void; + getReservationIdsList(): Array; + getReservationIdsList_asU8(): Array; + getReservationIdsList_asB64(): Array; + setReservationIdsList(value: Array): void; + addReservationIds(value: Uint8Array | string, index?: number): Uint8Array | string; + + getSweepTxId(): string; + setSweepTxId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InstantOut.AsObject; + static toObject(includeInstance: boolean, msg: InstantOut): InstantOut.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InstantOut, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InstantOut; + static deserializeBinaryFromReader(message: InstantOut, reader: jspb.BinaryReader): InstantOut; +} + +export namespace InstantOut { + export type AsObject = { + swapHash: Uint8Array | string, + state: string, + amount: string, + reservationIdsList: Array, + sweepTxId: string, + } +} + export interface AddressTypeMap { ADDRESS_TYPE_UNKNOWN: 0; TAPROOT_PUBKEY: 1; @@ -1303,6 +1501,7 @@ export interface FailureReasonMap { FAILURE_REASON_INCORRECT_AMOUNT: 6; FAILURE_REASON_ABANDONED: 7; FAILURE_REASON_INSUFFICIENT_CONFIRMED_BALANCE: 8; + FAILURE_REASON_INCORRECT_HTLC_AMT_SWEPT: 9; } export const FailureReason: FailureReasonMap; diff --git a/app/src/types/generated/loop_pb.js b/app/src/types/generated/loop_pb.js index 11c6977a4..bb89093e6 100644 --- a/app/src/types/generated/loop_pb.js +++ b/app/src/types/generated/loop_pb.js @@ -27,9 +27,16 @@ goog.exportSymbol('proto.looprpc.GetInfoResponse', null, global); goog.exportSymbol('proto.looprpc.GetLiquidityParamsRequest', null, global); goog.exportSymbol('proto.looprpc.InQuoteResponse', null, global); goog.exportSymbol('proto.looprpc.InTermsResponse', null, global); +goog.exportSymbol('proto.looprpc.InstantOut', null, global); +goog.exportSymbol('proto.looprpc.InstantOutQuoteRequest', null, global); +goog.exportSymbol('proto.looprpc.InstantOutQuoteResponse', null, global); +goog.exportSymbol('proto.looprpc.InstantOutRequest', null, global); +goog.exportSymbol('proto.looprpc.InstantOutResponse', null, global); goog.exportSymbol('proto.looprpc.LiquidityParameters', null, global); goog.exportSymbol('proto.looprpc.LiquidityRule', null, global); goog.exportSymbol('proto.looprpc.LiquidityRuleType', null, global); +goog.exportSymbol('proto.looprpc.ListInstantOutsRequest', null, global); +goog.exportSymbol('proto.looprpc.ListInstantOutsResponse', null, global); goog.exportSymbol('proto.looprpc.ListReservationsRequest', null, global); goog.exportSymbol('proto.looprpc.ListReservationsResponse', null, global); goog.exportSymbol('proto.looprpc.ListSwapsFilter', null, global); @@ -81,7 +88,7 @@ if (goog.DEBUG && !COMPILED) { * @private {!Array} * @const */ -proto.looprpc.LoopOutRequest.repeatedFields_ = [11]; +proto.looprpc.LoopOutRequest.repeatedFields_ = [11,18]; @@ -128,7 +135,8 @@ proto.looprpc.LoopOutRequest.toObject = function(includeInstance, msg) { initiator: jspb.Message.getFieldWithDefault(msg, 14, ""), account: jspb.Message.getFieldWithDefault(msg, 15, ""), accountAddrType: jspb.Message.getFieldWithDefault(msg, 16, 0), - isExternalAddr: jspb.Message.getFieldWithDefault(msg, 17, false) + isExternalAddr: jspb.Message.getFieldWithDefault(msg, 17, false), + reservationIdsList: msg.getReservationIdsList_asB64() }; if (includeInstance) { @@ -233,6 +241,10 @@ proto.looprpc.LoopOutRequest.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {boolean} */ (reader.readBool()); msg.setIsExternalAddr(value); break; + case 18: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addReservationIds(value); + break; default: reader.skipField(); break; @@ -381,6 +393,13 @@ proto.looprpc.LoopOutRequest.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getReservationIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 18, + f + ); + } }; @@ -655,6 +674,59 @@ proto.looprpc.LoopOutRequest.prototype.setIsExternalAddr = function(value) { }; +/** + * repeated bytes reservation_ids = 18; + * @return {!(Array|Array)} + */ +proto.looprpc.LoopOutRequest.prototype.getReservationIdsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 18)); +}; + + +/** + * repeated bytes reservation_ids = 18; + * This is a type-conversion wrapper around `getReservationIdsList()` + * @return {!Array} + */ +proto.looprpc.LoopOutRequest.prototype.getReservationIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getReservationIdsList())); +}; + + +/** + * repeated bytes reservation_ids = 18; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getReservationIdsList()` + * @return {!Array} + */ +proto.looprpc.LoopOutRequest.prototype.getReservationIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getReservationIdsList())); +}; + + +/** @param {!(Array|Array)} value */ +proto.looprpc.LoopOutRequest.prototype.setReservationIdsList = function(value) { + jspb.Message.setField(this, 18, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + */ +proto.looprpc.LoopOutRequest.prototype.addReservationIds = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 18, value, opt_index); +}; + + +proto.looprpc.LoopOutRequest.prototype.clearReservationIdsList = function() { + this.setReservationIdsList([]); +}; + + /** * Generated by JsPbCodeGenerator. @@ -8878,7 +8950,7 @@ proto.looprpc.ClientReservation.toObject = function(includeInstance, msg) { reservationId: msg.getReservationId_asB64(), state: jspb.Message.getFieldWithDefault(msg, 2, ""), amount: jspb.Message.getFieldWithDefault(msg, 3, "0"), - txId: msg.getTxId_asB64(), + txId: jspb.Message.getFieldWithDefault(msg, 4, ""), vout: jspb.Message.getFieldWithDefault(msg, 5, 0), expiry: jspb.Message.getFieldWithDefault(msg, 6, 0) }; @@ -8930,7 +9002,7 @@ proto.looprpc.ClientReservation.deserializeBinaryFromReader = function(msg, read msg.setAmount(value); break; case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); + var value = /** @type {string} */ (reader.readString()); msg.setTxId(value); break; case 5: @@ -8991,9 +9063,9 @@ proto.looprpc.ClientReservation.serializeBinaryToWriter = function(message, writ f ); } - f = message.getTxId_asU8(); + f = message.getTxId(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 4, f ); @@ -9085,41 +9157,17 @@ proto.looprpc.ClientReservation.prototype.setAmount = function(value) { /** - * optional bytes tx_id = 4; - * @return {!(string|Uint8Array)} - */ -proto.looprpc.ClientReservation.prototype.getTxId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes tx_id = 4; - * This is a type-conversion wrapper around `getTxId()` + * optional string tx_id = 4; * @return {string} */ -proto.looprpc.ClientReservation.prototype.getTxId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxId())); -}; - - -/** - * optional bytes tx_id = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTxId()` - * @return {!Uint8Array} - */ -proto.looprpc.ClientReservation.prototype.getTxId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxId())); +proto.looprpc.ClientReservation.prototype.getTxId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; -/** @param {!(string|Uint8Array)} value */ +/** @param {string} value */ proto.looprpc.ClientReservation.prototype.setTxId = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); + jspb.Message.setProto3StringField(this, 4, value); }; @@ -9153,6 +9201,1422 @@ proto.looprpc.ClientReservation.prototype.setExpiry = function(value) { }; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.looprpc.InstantOutRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.looprpc.InstantOutRequest.repeatedFields_, null); +}; +goog.inherits(proto.looprpc.InstantOutRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.looprpc.InstantOutRequest.displayName = 'proto.looprpc.InstantOutRequest'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.looprpc.InstantOutRequest.repeatedFields_ = [1,2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.looprpc.InstantOutRequest.prototype.toObject = function(opt_includeInstance) { + return proto.looprpc.InstantOutRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.looprpc.InstantOutRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.looprpc.InstantOutRequest.toObject = function(includeInstance, msg) { + var f, obj = { + reservationIdsList: msg.getReservationIdsList_asB64(), + outgoingChanSetList: jspb.Message.getRepeatedField(msg, 2), + destAddr: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.looprpc.InstantOutRequest} + */ +proto.looprpc.InstantOutRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.looprpc.InstantOutRequest; + return proto.looprpc.InstantOutRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.looprpc.InstantOutRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.looprpc.InstantOutRequest} + */ +proto.looprpc.InstantOutRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addReservationIds(value); + break; + case 2: + var value = /** @type {!Array} */ (reader.readPackedUint64String()); + msg.setOutgoingChanSetList(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDestAddr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.looprpc.InstantOutRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.looprpc.InstantOutRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.looprpc.InstantOutRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.looprpc.InstantOutRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReservationIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } + f = message.getOutgoingChanSetList(); + if (f.length > 0) { + writer.writePackedUint64String( + 2, + f + ); + } + f = message.getDestAddr(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * repeated bytes reservation_ids = 1; + * @return {!(Array|Array)} + */ +proto.looprpc.InstantOutRequest.prototype.getReservationIdsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes reservation_ids = 1; + * This is a type-conversion wrapper around `getReservationIdsList()` + * @return {!Array} + */ +proto.looprpc.InstantOutRequest.prototype.getReservationIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getReservationIdsList())); +}; + + +/** + * repeated bytes reservation_ids = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getReservationIdsList()` + * @return {!Array} + */ +proto.looprpc.InstantOutRequest.prototype.getReservationIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getReservationIdsList())); +}; + + +/** @param {!(Array|Array)} value */ +proto.looprpc.InstantOutRequest.prototype.setReservationIdsList = function(value) { + jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + */ +proto.looprpc.InstantOutRequest.prototype.addReservationIds = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +proto.looprpc.InstantOutRequest.prototype.clearReservationIdsList = function() { + this.setReservationIdsList([]); +}; + + +/** + * repeated uint64 outgoing_chan_set = 2; + * @return {!Array} + */ +proto.looprpc.InstantOutRequest.prototype.getOutgoingChanSetList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** @param {!Array} value */ +proto.looprpc.InstantOutRequest.prototype.setOutgoingChanSetList = function(value) { + jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {!string} value + * @param {number=} opt_index + */ +proto.looprpc.InstantOutRequest.prototype.addOutgoingChanSet = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +proto.looprpc.InstantOutRequest.prototype.clearOutgoingChanSetList = function() { + this.setOutgoingChanSetList([]); +}; + + +/** + * optional string dest_addr = 3; + * @return {string} + */ +proto.looprpc.InstantOutRequest.prototype.getDestAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.looprpc.InstantOutRequest.prototype.setDestAddr = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.looprpc.InstantOutResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.looprpc.InstantOutResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.looprpc.InstantOutResponse.displayName = 'proto.looprpc.InstantOutResponse'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.looprpc.InstantOutResponse.prototype.toObject = function(opt_includeInstance) { + return proto.looprpc.InstantOutResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.looprpc.InstantOutResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.looprpc.InstantOutResponse.toObject = function(includeInstance, msg) { + var f, obj = { + instantOutHash: msg.getInstantOutHash_asB64(), + sweepTxId: jspb.Message.getFieldWithDefault(msg, 2, ""), + state: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.looprpc.InstantOutResponse} + */ +proto.looprpc.InstantOutResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.looprpc.InstantOutResponse; + return proto.looprpc.InstantOutResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.looprpc.InstantOutResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.looprpc.InstantOutResponse} + */ +proto.looprpc.InstantOutResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setInstantOutHash(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSweepTxId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.looprpc.InstantOutResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.looprpc.InstantOutResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.looprpc.InstantOutResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.looprpc.InstantOutResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstantOutHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getSweepTxId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getState(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional bytes instant_out_hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.looprpc.InstantOutResponse.prototype.getInstantOutHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes instant_out_hash = 1; + * This is a type-conversion wrapper around `getInstantOutHash()` + * @return {string} + */ +proto.looprpc.InstantOutResponse.prototype.getInstantOutHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getInstantOutHash())); +}; + + +/** + * optional bytes instant_out_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getInstantOutHash()` + * @return {!Uint8Array} + */ +proto.looprpc.InstantOutResponse.prototype.getInstantOutHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getInstantOutHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.looprpc.InstantOutResponse.prototype.setInstantOutHash = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string sweep_tx_id = 2; + * @return {string} + */ +proto.looprpc.InstantOutResponse.prototype.getSweepTxId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.looprpc.InstantOutResponse.prototype.setSweepTxId = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string state = 3; + * @return {string} + */ +proto.looprpc.InstantOutResponse.prototype.getState = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.looprpc.InstantOutResponse.prototype.setState = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.looprpc.InstantOutQuoteRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.looprpc.InstantOutQuoteRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.looprpc.InstantOutQuoteRequest.displayName = 'proto.looprpc.InstantOutQuoteRequest'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.looprpc.InstantOutQuoteRequest.prototype.toObject = function(opt_includeInstance) { + return proto.looprpc.InstantOutQuoteRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.looprpc.InstantOutQuoteRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.looprpc.InstantOutQuoteRequest.toObject = function(includeInstance, msg) { + var f, obj = { + amt: jspb.Message.getFieldWithDefault(msg, 1, "0"), + numReservations: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.looprpc.InstantOutQuoteRequest} + */ +proto.looprpc.InstantOutQuoteRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.looprpc.InstantOutQuoteRequest; + return proto.looprpc.InstantOutQuoteRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.looprpc.InstantOutQuoteRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.looprpc.InstantOutQuoteRequest} + */ +proto.looprpc.InstantOutQuoteRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAmt(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNumReservations(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.looprpc.InstantOutQuoteRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.looprpc.InstantOutQuoteRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.looprpc.InstantOutQuoteRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.looprpc.InstantOutQuoteRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmt(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 1, + f + ); + } + f = message.getNumReservations(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional uint64 amt = 1; + * @return {string} + */ +proto.looprpc.InstantOutQuoteRequest.prototype.getAmt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** @param {string} value */ +proto.looprpc.InstantOutQuoteRequest.prototype.setAmt = function(value) { + jspb.Message.setProto3StringIntField(this, 1, value); +}; + + +/** + * optional int32 num_reservations = 2; + * @return {number} + */ +proto.looprpc.InstantOutQuoteRequest.prototype.getNumReservations = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.looprpc.InstantOutQuoteRequest.prototype.setNumReservations = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.looprpc.InstantOutQuoteResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.looprpc.InstantOutQuoteResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.looprpc.InstantOutQuoteResponse.displayName = 'proto.looprpc.InstantOutQuoteResponse'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.looprpc.InstantOutQuoteResponse.prototype.toObject = function(opt_includeInstance) { + return proto.looprpc.InstantOutQuoteResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.looprpc.InstantOutQuoteResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.looprpc.InstantOutQuoteResponse.toObject = function(includeInstance, msg) { + var f, obj = { + serviceFeeSat: jspb.Message.getFieldWithDefault(msg, 1, "0"), + sweepFeeSat: jspb.Message.getFieldWithDefault(msg, 2, "0") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.looprpc.InstantOutQuoteResponse} + */ +proto.looprpc.InstantOutQuoteResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.looprpc.InstantOutQuoteResponse; + return proto.looprpc.InstantOutQuoteResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.looprpc.InstantOutQuoteResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.looprpc.InstantOutQuoteResponse} + */ +proto.looprpc.InstantOutQuoteResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readInt64String()); + msg.setServiceFeeSat(value); + break; + case 2: + var value = /** @type {string} */ (reader.readInt64String()); + msg.setSweepFeeSat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.looprpc.InstantOutQuoteResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.looprpc.InstantOutQuoteResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.looprpc.InstantOutQuoteResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.looprpc.InstantOutQuoteResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceFeeSat(); + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( + 1, + f + ); + } + f = message.getSweepFeeSat(); + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( + 2, + f + ); + } +}; + + +/** + * optional int64 service_fee_sat = 1; + * @return {string} + */ +proto.looprpc.InstantOutQuoteResponse.prototype.getServiceFeeSat = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** @param {string} value */ +proto.looprpc.InstantOutQuoteResponse.prototype.setServiceFeeSat = function(value) { + jspb.Message.setProto3StringIntField(this, 1, value); +}; + + +/** + * optional int64 sweep_fee_sat = 2; + * @return {string} + */ +proto.looprpc.InstantOutQuoteResponse.prototype.getSweepFeeSat = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +}; + + +/** @param {string} value */ +proto.looprpc.InstantOutQuoteResponse.prototype.setSweepFeeSat = function(value) { + jspb.Message.setProto3StringIntField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.looprpc.ListInstantOutsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.looprpc.ListInstantOutsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.looprpc.ListInstantOutsRequest.displayName = 'proto.looprpc.ListInstantOutsRequest'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.looprpc.ListInstantOutsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.looprpc.ListInstantOutsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.looprpc.ListInstantOutsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.looprpc.ListInstantOutsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.looprpc.ListInstantOutsRequest} + */ +proto.looprpc.ListInstantOutsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.looprpc.ListInstantOutsRequest; + return proto.looprpc.ListInstantOutsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.looprpc.ListInstantOutsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.looprpc.ListInstantOutsRequest} + */ +proto.looprpc.ListInstantOutsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.looprpc.ListInstantOutsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.looprpc.ListInstantOutsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.looprpc.ListInstantOutsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.looprpc.ListInstantOutsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.looprpc.ListInstantOutsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.looprpc.ListInstantOutsResponse.repeatedFields_, null); +}; +goog.inherits(proto.looprpc.ListInstantOutsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.looprpc.ListInstantOutsResponse.displayName = 'proto.looprpc.ListInstantOutsResponse'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.looprpc.ListInstantOutsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.looprpc.ListInstantOutsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.looprpc.ListInstantOutsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.looprpc.ListInstantOutsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.looprpc.ListInstantOutsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + swapsList: jspb.Message.toObjectList(msg.getSwapsList(), + proto.looprpc.InstantOut.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.looprpc.ListInstantOutsResponse} + */ +proto.looprpc.ListInstantOutsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.looprpc.ListInstantOutsResponse; + return proto.looprpc.ListInstantOutsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.looprpc.ListInstantOutsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.looprpc.ListInstantOutsResponse} + */ +proto.looprpc.ListInstantOutsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.looprpc.InstantOut; + reader.readMessage(value,proto.looprpc.InstantOut.deserializeBinaryFromReader); + msg.addSwaps(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.looprpc.ListInstantOutsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.looprpc.ListInstantOutsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.looprpc.ListInstantOutsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.looprpc.ListInstantOutsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSwapsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.looprpc.InstantOut.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated InstantOut swaps = 1; + * @return {!Array} + */ +proto.looprpc.ListInstantOutsResponse.prototype.getSwapsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.looprpc.InstantOut, 1)); +}; + + +/** @param {!Array} value */ +proto.looprpc.ListInstantOutsResponse.prototype.setSwapsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.looprpc.InstantOut=} opt_value + * @param {number=} opt_index + * @return {!proto.looprpc.InstantOut} + */ +proto.looprpc.ListInstantOutsResponse.prototype.addSwaps = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.looprpc.InstantOut, opt_index); +}; + + +proto.looprpc.ListInstantOutsResponse.prototype.clearSwapsList = function() { + this.setSwapsList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.looprpc.InstantOut = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.looprpc.InstantOut.repeatedFields_, null); +}; +goog.inherits(proto.looprpc.InstantOut, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.looprpc.InstantOut.displayName = 'proto.looprpc.InstantOut'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.looprpc.InstantOut.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.looprpc.InstantOut.prototype.toObject = function(opt_includeInstance) { + return proto.looprpc.InstantOut.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.looprpc.InstantOut} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.looprpc.InstantOut.toObject = function(includeInstance, msg) { + var f, obj = { + swapHash: msg.getSwapHash_asB64(), + state: jspb.Message.getFieldWithDefault(msg, 2, ""), + amount: jspb.Message.getFieldWithDefault(msg, 3, "0"), + reservationIdsList: msg.getReservationIdsList_asB64(), + sweepTxId: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.looprpc.InstantOut} + */ +proto.looprpc.InstantOut.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.looprpc.InstantOut; + return proto.looprpc.InstantOut.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.looprpc.InstantOut} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.looprpc.InstantOut} + */ +proto.looprpc.InstantOut.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSwapHash(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setState(value); + break; + case 3: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAmount(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addReservationIds(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSweepTxId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.looprpc.InstantOut.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.looprpc.InstantOut.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.looprpc.InstantOut} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.looprpc.InstantOut.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSwapHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getState(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmount(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 3, + f + ); + } + f = message.getReservationIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 4, + f + ); + } + f = message.getSweepTxId(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional bytes swap_hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.looprpc.InstantOut.prototype.getSwapHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes swap_hash = 1; + * This is a type-conversion wrapper around `getSwapHash()` + * @return {string} + */ +proto.looprpc.InstantOut.prototype.getSwapHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSwapHash())); +}; + + +/** + * optional bytes swap_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSwapHash()` + * @return {!Uint8Array} + */ +proto.looprpc.InstantOut.prototype.getSwapHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSwapHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.looprpc.InstantOut.prototype.setSwapHash = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string state = 2; + * @return {string} + */ +proto.looprpc.InstantOut.prototype.getState = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.looprpc.InstantOut.prototype.setState = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 amount = 3; + * @return {string} + */ +proto.looprpc.InstantOut.prototype.getAmount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); +}; + + +/** @param {string} value */ +proto.looprpc.InstantOut.prototype.setAmount = function(value) { + jspb.Message.setProto3StringIntField(this, 3, value); +}; + + +/** + * repeated bytes reservation_ids = 4; + * @return {!(Array|Array)} + */ +proto.looprpc.InstantOut.prototype.getReservationIdsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * repeated bytes reservation_ids = 4; + * This is a type-conversion wrapper around `getReservationIdsList()` + * @return {!Array} + */ +proto.looprpc.InstantOut.prototype.getReservationIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getReservationIdsList())); +}; + + +/** + * repeated bytes reservation_ids = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getReservationIdsList()` + * @return {!Array} + */ +proto.looprpc.InstantOut.prototype.getReservationIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getReservationIdsList())); +}; + + +/** @param {!(Array|Array)} value */ +proto.looprpc.InstantOut.prototype.setReservationIdsList = function(value) { + jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + */ +proto.looprpc.InstantOut.prototype.addReservationIds = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +proto.looprpc.InstantOut.prototype.clearReservationIdsList = function() { + this.setReservationIdsList([]); +}; + + +/** + * optional string sweep_tx_id = 5; + * @return {string} + */ +proto.looprpc.InstantOut.prototype.getSweepTxId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** @param {string} value */ +proto.looprpc.InstantOut.prototype.setSweepTxId = function(value) { + jspb.Message.setProto3StringField(this, 5, value); +}; + + /** * @enum {number} */ @@ -9193,7 +10657,8 @@ proto.looprpc.FailureReason = { FAILURE_REASON_TEMPORARY: 5, FAILURE_REASON_INCORRECT_AMOUNT: 6, FAILURE_REASON_ABANDONED: 7, - FAILURE_REASON_INSUFFICIENT_CONFIRMED_BALANCE: 8 + FAILURE_REASON_INSUFFICIENT_CONFIRMED_BALANCE: 8, + FAILURE_REASON_INCORRECT_HTLC_AMT_SWEPT: 9 }; /** diff --git a/app/src/types/generated/loop_pb_service.d.ts b/app/src/types/generated/loop_pb_service.d.ts index 5bc78a247..0f0e441f7 100644 --- a/app/src/types/generated/loop_pb_service.d.ts +++ b/app/src/types/generated/loop_pb_service.d.ts @@ -157,6 +157,33 @@ type SwapClientListReservations = { readonly responseType: typeof loop_pb.ListReservationsResponse; }; +type SwapClientInstantOut = { + readonly methodName: string; + readonly service: typeof SwapClient; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof loop_pb.InstantOutRequest; + readonly responseType: typeof loop_pb.InstantOutResponse; +}; + +type SwapClientInstantOutQuote = { + readonly methodName: string; + readonly service: typeof SwapClient; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof loop_pb.InstantOutQuoteRequest; + readonly responseType: typeof loop_pb.InstantOutQuoteResponse; +}; + +type SwapClientListInstantOuts = { + readonly methodName: string; + readonly service: typeof SwapClient; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof loop_pb.ListInstantOutsRequest; + readonly responseType: typeof loop_pb.ListInstantOutsResponse; +}; + export class SwapClient { static readonly serviceName: string; static readonly LoopOut: SwapClientLoopOut; @@ -176,6 +203,9 @@ export class SwapClient { static readonly SetLiquidityParams: SwapClientSetLiquidityParams; static readonly SuggestSwaps: SwapClientSuggestSwaps; static readonly ListReservations: SwapClientListReservations; + static readonly InstantOut: SwapClientInstantOut; + static readonly InstantOutQuote: SwapClientInstantOutQuote; + static readonly ListInstantOuts: SwapClientListInstantOuts; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -355,5 +385,32 @@ export class SwapClientClient { requestMessage: loop_pb.ListReservationsRequest, callback: (error: ServiceError|null, responseMessage: loop_pb.ListReservationsResponse|null) => void ): UnaryResponse; + instantOut( + requestMessage: loop_pb.InstantOutRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: loop_pb.InstantOutResponse|null) => void + ): UnaryResponse; + instantOut( + requestMessage: loop_pb.InstantOutRequest, + callback: (error: ServiceError|null, responseMessage: loop_pb.InstantOutResponse|null) => void + ): UnaryResponse; + instantOutQuote( + requestMessage: loop_pb.InstantOutQuoteRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: loop_pb.InstantOutQuoteResponse|null) => void + ): UnaryResponse; + instantOutQuote( + requestMessage: loop_pb.InstantOutQuoteRequest, + callback: (error: ServiceError|null, responseMessage: loop_pb.InstantOutQuoteResponse|null) => void + ): UnaryResponse; + listInstantOuts( + requestMessage: loop_pb.ListInstantOutsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: loop_pb.ListInstantOutsResponse|null) => void + ): UnaryResponse; + listInstantOuts( + requestMessage: loop_pb.ListInstantOutsRequest, + callback: (error: ServiceError|null, responseMessage: loop_pb.ListInstantOutsResponse|null) => void + ): UnaryResponse; } diff --git a/app/src/types/generated/loop_pb_service.js b/app/src/types/generated/loop_pb_service.js index 2304b88e0..064283426 100644 --- a/app/src/types/generated/loop_pb_service.js +++ b/app/src/types/generated/loop_pb_service.js @@ -163,6 +163,33 @@ SwapClient.ListReservations = { responseType: loop_pb.ListReservationsResponse }; +SwapClient.InstantOut = { + methodName: "InstantOut", + service: SwapClient, + requestStream: false, + responseStream: false, + requestType: loop_pb.InstantOutRequest, + responseType: loop_pb.InstantOutResponse +}; + +SwapClient.InstantOutQuote = { + methodName: "InstantOutQuote", + service: SwapClient, + requestStream: false, + responseStream: false, + requestType: loop_pb.InstantOutQuoteRequest, + responseType: loop_pb.InstantOutQuoteResponse +}; + +SwapClient.ListInstantOuts = { + methodName: "ListInstantOuts", + service: SwapClient, + requestStream: false, + responseStream: false, + requestType: loop_pb.ListInstantOutsRequest, + responseType: loop_pb.ListInstantOutsResponse +}; + exports.SwapClient = SwapClient; function SwapClientClient(serviceHost, options) { @@ -705,5 +732,98 @@ SwapClientClient.prototype.listReservations = function listReservations(requestM }; }; +SwapClientClient.prototype.instantOut = function instantOut(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(SwapClient.InstantOut, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +SwapClientClient.prototype.instantOutQuote = function instantOutQuote(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(SwapClient.InstantOutQuote, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +SwapClientClient.prototype.listInstantOuts = function listInstantOuts(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(SwapClient.ListInstantOuts, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + exports.SwapClientClient = SwapClientClient; diff --git a/app/src/types/generated/swapserverrpc/server_pb.d.ts b/app/src/types/generated/swapserverrpc/server_pb.d.ts index f84450ecc..ae38bf531 100644 --- a/app/src/types/generated/swapserverrpc/server_pb.d.ts +++ b/app/src/types/generated/swapserverrpc/server_pb.d.ts @@ -1111,3 +1111,9 @@ export interface RoutingPluginMap { export const RoutingPlugin: RoutingPluginMap; +export interface StaticAddressProtocolVersionMap { + V0: 0; +} + +export const StaticAddressProtocolVersion: StaticAddressProtocolVersionMap; + diff --git a/app/src/types/generated/swapserverrpc/server_pb.js b/app/src/types/generated/swapserverrpc/server_pb.js index 923a2449d..104c0d9f5 100644 --- a/app/src/types/generated/swapserverrpc/server_pb.js +++ b/app/src/types/generated/swapserverrpc/server_pb.js @@ -51,6 +51,7 @@ goog.exportSymbol('proto.looprpc.ServerProbeResponse', null, global); goog.exportSymbol('proto.looprpc.ServerPushKeyReq', null, global); goog.exportSymbol('proto.looprpc.ServerPushKeyRes', null, global); goog.exportSymbol('proto.looprpc.ServerSwapState', null, global); +goog.exportSymbol('proto.looprpc.StaticAddressProtocolVersion', null, global); goog.exportSymbol('proto.looprpc.SubscribeLoopInUpdatesResponse', null, global); goog.exportSymbol('proto.looprpc.SubscribeLoopOutUpdatesResponse', null, global); goog.exportSymbol('proto.looprpc.SubscribeUpdatesRequest', null, global); @@ -7768,4 +7769,11 @@ proto.looprpc.RoutingPlugin = { LOW_HIGH: 1 }; +/** + * @enum {number} + */ +proto.looprpc.StaticAddressProtocolVersion = { + V0: 0 +}; + goog.object.extend(exports, proto.looprpc); diff --git a/go.mod b/go.mod index 98b6c8e4d..c67239956 100644 --- a/go.mod +++ b/go.mod @@ -11,12 +11,12 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 github.com/improbable-eng/grpc-web v0.12.0 github.com/jessevdk/go-flags v1.4.0 - github.com/lightninglabs/faraday v0.2.11-alpha.0.20231003174141-945b7188032f - github.com/lightninglabs/lightning-node-connect v0.3.0-alpha.0.20240208172904-08e5d9e85972 + github.com/lightninglabs/faraday v0.2.13-alpha + github.com/lightninglabs/lightning-node-connect v0.3.1-alpha github.com/lightninglabs/lightning-terminal/autopilotserverrpc v0.0.1 - github.com/lightninglabs/lndclient v0.17.0-4 - github.com/lightninglabs/loop v0.27.0-beta - github.com/lightninglabs/loop/swapserverrpc v1.0.6 + github.com/lightninglabs/lndclient v0.17.4-1 + github.com/lightninglabs/loop v0.28.0-beta + github.com/lightninglabs/loop/swapserverrpc v1.0.7 github.com/lightninglabs/pool v0.6.4-beta.0.20231003174306-80d8854a0c4b github.com/lightninglabs/pool/auctioneerrpc v1.1.1 github.com/lightninglabs/taproot-assets v0.3.3 diff --git a/go.sum b/go.sum index 103295c86..a5070f981 100644 --- a/go.sum +++ b/go.sum @@ -1171,20 +1171,20 @@ github.com/libdns/libdns v0.2.1 h1:Wu59T7wSHRgtA0cfxC+n1c/e+O3upJGWytknkmFEDis= github.com/libdns/libdns v0.2.1/go.mod h1:yQCXzk1lEZmmCPa857bnk4TsOiqYasqpyOEeSObbb40= github.com/lightninglabs/aperture v0.1.21-beta.0.20230705004936-87bb996a4030 h1:q/BBO2awQdy/dCILXXZbBsstQ+1DpSQ/c8B8EgKqg+g= github.com/lightninglabs/aperture v0.1.21-beta.0.20230705004936-87bb996a4030/go.mod h1:Jvoen+fgoaGQZIHdchiGigu0Lwuwz8S5u5wad9IhVDU= -github.com/lightninglabs/faraday v0.2.11-alpha.0.20231003174141-945b7188032f h1:ylopWcD6U4Ma6BpmPZ7qLyLfoN9+7aL9bF+hzMeojtQ= -github.com/lightninglabs/faraday v0.2.11-alpha.0.20231003174141-945b7188032f/go.mod h1:X4gOPNkZ3BtazVg0nzXTXO7rbWqJOeI4iWI6ZcjdiU8= +github.com/lightninglabs/faraday v0.2.13-alpha h1:rpk3IM5WyyEd/wghGWpGcUyDazQhwdfkuj+D/AvDlgk= +github.com/lightninglabs/faraday v0.2.13-alpha/go.mod h1:hzuTMntsY7X3gxeBLZ6kYduZlKtXUgqtk1WnnEF0aIg= github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf h1:HZKvJUHlcXI/f/O0Avg7t8sqkPo78HFzjmeYFl6DPnc= github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf/go.mod h1:vxmQPeIQxPf6Jf9rM8R+B4rKBqLA2AjttNxkFBL2Plk= -github.com/lightninglabs/lightning-node-connect v0.3.0-alpha.0.20240208172904-08e5d9e85972 h1:jzDzTi0+LDAhlTcswF28y0A6dK0aCU9g1DOzaEJ5zEI= -github.com/lightninglabs/lightning-node-connect v0.3.0-alpha.0.20240208172904-08e5d9e85972/go.mod h1:TC+tFEPlJxU4+TU5UW/TKAfyav/+AZHHaV0nD02LVjk= +github.com/lightninglabs/lightning-node-connect v0.3.1-alpha h1:fean3EXsohrpRmrcu2KNmkxds1qg6qX19bNM8avRSLI= +github.com/lightninglabs/lightning-node-connect v0.3.1-alpha/go.mod h1:TC+tFEPlJxU4+TU5UW/TKAfyav/+AZHHaV0nD02LVjk= github.com/lightninglabs/lightning-node-connect/hashmailrpc v1.0.2 h1:Er1miPZD2XZwcfE4xoS5AILqP1mj7kqnhbBSxW9BDxY= github.com/lightninglabs/lightning-node-connect/hashmailrpc v1.0.2/go.mod h1:antQGRDRJiuyQF6l+k6NECCSImgCpwaZapATth2Chv4= -github.com/lightninglabs/lndclient v0.17.0-4 h1:2nU7kMYctGmx6NCpbWAwRt3mmlsSzb6HI41WODReYzA= -github.com/lightninglabs/lndclient v0.17.0-4/go.mod h1:oVQUAYEeuYUaoxCWjUBaa/uF0kiqEJJjEaiMhEXHH7Y= -github.com/lightninglabs/loop v0.27.0-beta h1:W+NlgliE02xozvPJ9Jxo0JcZoLYtuS8lol3uAGIaL6E= -github.com/lightninglabs/loop v0.27.0-beta/go.mod h1:/fdG2xQUs/IAwH2T78FTNJ5gkJz5v0wEo0nbmR6F+KE= -github.com/lightninglabs/loop/swapserverrpc v1.0.6 h1:gvLXYe/gqaVO6I7tD5ebp8zf9ejQoZRiB73skjZXdEU= -github.com/lightninglabs/loop/swapserverrpc v1.0.6/go.mod h1:Ml3gMwe/iTRLvu1QGGZzXcr0DYSa9sJGwKPktLaWtwE= +github.com/lightninglabs/lndclient v0.17.4-1 h1:uCLBYf1f1nOoagHuiPK9anERA86dNSlYK9/QGb410RQ= +github.com/lightninglabs/lndclient v0.17.4-1/go.mod h1:2krqTDgp3W3DLSDx9bYaT0MDrMVslGMXETViKE8J1pk= +github.com/lightninglabs/loop v0.28.0-beta h1:BFylIXD1q0grQsSuXYi6pBq0lV5pmeJ3WeOhuFF196k= +github.com/lightninglabs/loop v0.28.0-beta/go.mod h1:mI7VFSqJjUu0TxxECohpzDk9w9Ro9Jwmuk3xvxoFv+s= +github.com/lightninglabs/loop/swapserverrpc v1.0.7 h1:KlRbaFPPPGPMkpBwOGg1Z1KWaxrpugOsJKeoH/1U4tk= +github.com/lightninglabs/loop/swapserverrpc v1.0.7/go.mod h1:Ml3gMwe/iTRLvu1QGGZzXcr0DYSa9sJGwKPktLaWtwE= github.com/lightninglabs/neutrino v0.16.0 h1:YNTQG32fPR/Zg0vvJVI65OBH8l3U18LSXXtX91hx0q0= github.com/lightninglabs/neutrino v0.16.0/go.mod h1:x3OmY2wsA18+Kc3TSV2QpSUewOCiscw2mKpXgZv2kZk= github.com/lightninglabs/neutrino/cache v1.1.1 h1:TllWOSlkABhpgbWJfzsrdUaDH2fBy/54VSIB4vVqV8M= diff --git a/proto/loop.proto b/proto/loop.proto index d405c70e1..376d08982 100644 --- a/proto/loop.proto +++ b/proto/loop.proto @@ -115,6 +115,25 @@ service SwapClient { */ rpc ListReservations (ListReservationsRequest) returns (ListReservationsResponse); + + /* loop: `instantout` + InstantOut initiates an instant out swap with the given parameters. + */ + rpc InstantOut (InstantOutRequest) returns (InstantOutResponse); + + /* loop: `instantoutquote` + InstantOutQuote returns a quote for an instant out swap with the provided + parameters. + */ + rpc InstantOutQuote (InstantOutQuoteRequest) + returns (InstantOutQuoteResponse); + + /* loop: `listinstantouts` + ListInstantOuts returns a list of all currently known instant out swaps and + their current status. + */ + rpc ListInstantOuts (ListInstantOutsRequest) + returns (ListInstantOutsResponse); } message LoopOutRequest { @@ -242,6 +261,14 @@ message LoopOutRequest { associated sweep batched. */ bool is_external_addr = 17; + + /* + The reservations to use for the swap. If this field is set, loop will try + to use the instant out flow using the given reservations. If the + reservations are not sufficient, the swap will fail. The swap amount must + be equal to the sum of the amounts of the reservations. + */ + repeated bytes reservation_ids = 18; } /* @@ -554,6 +581,12 @@ enum FailureReason { wasn't published due to insufficient confirmed balance. */ FAILURE_REASON_INSUFFICIENT_CONFIRMED_BALANCE = 8; + + /* + FAILURE_REASON_INCORRECT_HTLC_AMT_SWEPT indicates that a swap + wasn't published due to insufficient confirmed balance. + */ + FAILURE_REASON_INCORRECT_HTLC_AMT_SWEPT = 9; } message ListSwapsRequest { @@ -1284,7 +1317,7 @@ message ClientReservation { /* The transaction id of the reservation. */ - bytes tx_id = 4; + string tx_id = 4; /* The vout of the reservation. */ @@ -1293,4 +1326,101 @@ message ClientReservation { The expiry of the reservation. */ uint32 expiry = 6; -} \ No newline at end of file +} + +message InstantOutRequest { + /* + The reservations to use for the swap. + */ + repeated bytes reservation_ids = 1; + + /* + A restriction on the channel set that may be used to loop out. The actual + channel(s) that will be used are selected based on the lowest routing fee + for the swap payment to the server. + */ + repeated uint64 outgoing_chan_set = 2 [jstype = JS_STRING]; + + /* + An optional address to sweep the onchain funds to. If not set, the funds + will be swept to the wallet's internal address. + */ + string dest_addr = 3; +} + +message InstantOutResponse { + /* + The hash of the swap preimage. + */ + bytes instant_out_hash = 1; + /* + The transaction id of the sweep transaction. + */ + string sweep_tx_id = 2; + /* + The state of the swap. + */ + string state = 3; +} + +message InstantOutQuoteRequest { + /* + The amount to swap in satoshis. + */ + uint64 amt = 1 [jstype = JS_STRING]; + + /* + The amount of reservations to use for the swap. + */ + int32 num_reservations = 2; +} + +message InstantOutQuoteResponse { + /* + The fee that the swap service is charging for the swap. + */ + int64 service_fee_sat = 1 [jstype = JS_STRING]; + + /* + The estimated on-chain fee that needs to be paid to publish the Sweepless + Sweep. + */ + int64 sweep_fee_sat = 2 [jstype = JS_STRING]; +} + +message ListInstantOutsRequest { +} + +message ListInstantOutsResponse { + /* + The list of all currently known instant out swaps and their status. + */ + repeated InstantOut swaps = 1; +} + +message InstantOut { + /* + The swap hash that identifies this swap. + */ + bytes swap_hash = 1; + + /* + The state the swap is in. + */ + string state = 2; + + /* + The amount of the swap. + */ + uint64 amount = 3 [jstype = JS_STRING]; + + /* + The used reservations for the swap. + */ + repeated bytes reservation_ids = 4; + + /* + The sweep transaction id of the swap. + */ + string sweep_tx_id = 5; +} diff --git a/proto/swapserverrpc/server.proto b/proto/swapserverrpc/server.proto index 1414e0aa9..20078f492 100644 --- a/proto/swapserverrpc/server.proto +++ b/proto/swapserverrpc/server.proto @@ -645,4 +645,11 @@ message FetchL402Request { // FetchL402Response is an empty response sent from the server to the client to // confirm the lnd l402. message FetchL402Response { +} + +// StaticAddressProtocolVersion represents the static address protocol version +// the client adheres to. +enum StaticAddressProtocolVersion { + // V0 is the initially released static address protocol version. + V0 = 0; } \ No newline at end of file diff --git a/terminal.go b/terminal.go index 3d0bc964d..b823035f1 100644 --- a/terminal.go +++ b/terminal.go @@ -138,7 +138,7 @@ var ( // to run LiT in remote mode. minimalCompatibleVersion = &verrpc.Version{ AppMajor: 0, - AppMinor: 16, + AppMinor: 17, AppPatch: 0, BuildTags: []string{ "signrpc", "walletrpc", "chainrpc", "invoicesrpc", diff --git a/version.go b/version.go index 820d15c35..d05b07236 100644 --- a/version.go +++ b/version.go @@ -23,7 +23,7 @@ const semanticAlphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqr const ( appMajor uint = 0 appMinor uint = 12 - appPatch uint = 3 + appPatch uint = 4 // appPreRelease MUST only contain characters from semanticAlphabet per // the semantic versioning spec.