terminal: bump lnd, loop, looprpc & swapserverrpc

Bump `lnd` to version `v0.21.1-beta`, as well as `loop` to version
`v0.33.3-beta`. Additionally, we bump `looprpc` & `swapserverrpc` to
versions compatible with the new `loop` version.
This commit is contained in:
Viktor Torstensson 2026-06-22 12:07:42 +02:00
parent 650fd92259
commit 5c34be31f4
No known key found for this signature in database
GPG key ID: 961CC8259AE675D4
10 changed files with 1801 additions and 325 deletions

126
app/src/types/generated/loop_pb.d.ts generated vendored
View file

@ -3,6 +3,49 @@
import * as jspb from "google-protobuf";
import * as swapserverrpc_common_pb from "./swapserverrpc/common_pb";
import * as lnd_pb from "./lnd_pb";
export class StaticOpenChannelRequest extends jspb.Message {
hasOpenChannelRequest(): boolean;
clearOpenChannelRequest(): void;
getOpenChannelRequest(): lnd_pb.OpenChannelRequest | undefined;
setOpenChannelRequest(value?: lnd_pb.OpenChannelRequest): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): StaticOpenChannelRequest.AsObject;
static toObject(includeInstance: boolean, msg: StaticOpenChannelRequest): StaticOpenChannelRequest.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: StaticOpenChannelRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): StaticOpenChannelRequest;
static deserializeBinaryFromReader(message: StaticOpenChannelRequest, reader: jspb.BinaryReader): StaticOpenChannelRequest;
}
export namespace StaticOpenChannelRequest {
export type AsObject = {
openChannelRequest?: lnd_pb.OpenChannelRequest.AsObject,
}
}
export class StaticOpenChannelResponse extends jspb.Message {
getChannelOpenOutpoint(): string;
setChannelOpenOutpoint(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): StaticOpenChannelResponse.AsObject;
static toObject(includeInstance: boolean, msg: StaticOpenChannelResponse): StaticOpenChannelResponse.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: StaticOpenChannelResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): StaticOpenChannelResponse;
static deserializeBinaryFromReader(message: StaticOpenChannelResponse, reader: jspb.BinaryReader): StaticOpenChannelResponse;
}
export namespace StaticOpenChannelResponse {
export type AsObject = {
channelOpenOutpoint: string,
}
}
export class StopDaemonRequest extends jspb.Message {
serializeBinary(): Uint8Array;
@ -1247,6 +1290,9 @@ export class LiquidityParameters extends jspb.Message {
setEasyAutoloopExcludedPeersList(value: Array<Uint8Array | string>): void;
addEasyAutoloopExcludedPeers(value: Uint8Array | string, index?: number): Uint8Array | string;
getLoopInSource(): LoopInSourceMap[keyof LoopInSourceMap];
setLoopInSource(value: LoopInSourceMap[keyof LoopInSourceMap]): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LiquidityParameters.AsObject;
static toObject(includeInstance: boolean, msg: LiquidityParameters): LiquidityParameters.AsObject;
@ -1286,6 +1332,7 @@ export namespace LiquidityParameters {
easyAssetParamsMap: Array<[string, EasyAssetAutoloopParams.AsObject]>,
fastSwapPublication: boolean,
easyAutoloopExcludedPeersList: Array<Uint8Array | string>,
loopInSource: LoopInSourceMap[keyof LoopInSourceMap],
}
}
@ -1450,6 +1497,11 @@ export class SuggestSwapsResponse extends jspb.Message {
setLoopInList(value: Array<LoopInRequest>): void;
addLoopIn(value?: LoopInRequest, index?: number): LoopInRequest;
clearStaticLoopInList(): void;
getStaticLoopInList(): Array<StaticAddressLoopInRequest>;
setStaticLoopInList(value: Array<StaticAddressLoopInRequest>): void;
addStaticLoopIn(value?: StaticAddressLoopInRequest, index?: number): StaticAddressLoopInRequest;
clearDisqualifiedList(): void;
getDisqualifiedList(): Array<Disqualified>;
setDisqualifiedList(value: Array<Disqualified>): void;
@ -1469,6 +1521,7 @@ export namespace SuggestSwapsResponse {
export type AsObject = {
loopOutList: Array<LoopOutRequest.AsObject>,
loopInList: Array<LoopInRequest.AsObject>,
staticLoopInList: Array<StaticAddressLoopInRequest.AsObject>,
disqualifiedList: Array<Disqualified.AsObject>,
}
}
@ -1921,9 +1974,9 @@ export namespace Utxo {
export class WithdrawDepositsRequest extends jspb.Message {
clearOutpointsList(): void;
getOutpointsList(): Array<OutPoint>;
setOutpointsList(value: Array<OutPoint>): void;
addOutpoints(value?: OutPoint, index?: number): OutPoint;
getOutpointsList(): Array<lnd_pb.OutPoint>;
setOutpointsList(value: Array<lnd_pb.OutPoint>): void;
addOutpoints(value?: lnd_pb.OutPoint, index?: number): lnd_pb.OutPoint;
getAll(): boolean;
setAll(value: boolean): void;
@ -1949,7 +2002,7 @@ export class WithdrawDepositsRequest extends jspb.Message {
export namespace WithdrawDepositsRequest {
export type AsObject = {
outpointsList: Array<OutPoint.AsObject>,
outpointsList: Array<lnd_pb.OutPoint.AsObject>,
all: boolean,
destAddr: string,
satPerVbyte: string,
@ -1981,36 +2034,6 @@ export namespace WithdrawDepositsResponse {
}
}
export class OutPoint extends jspb.Message {
getTxidBytes(): Uint8Array | string;
getTxidBytes_asU8(): Uint8Array;
getTxidBytes_asB64(): string;
setTxidBytes(value: Uint8Array | string): void;
getTxidStr(): string;
setTxidStr(value: string): void;
getOutputIndex(): number;
setOutputIndex(value: number): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): OutPoint.AsObject;
static toObject(includeInstance: boolean, msg: OutPoint): OutPoint.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: OutPoint, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): OutPoint;
static deserializeBinaryFromReader(message: OutPoint, reader: jspb.BinaryReader): OutPoint;
}
export namespace OutPoint {
export type AsObject = {
txidBytes: Uint8Array | string,
txidStr: string,
outputIndex: number,
}
}
export class ListStaticAddressDepositsRequest extends jspb.Message {
getStateFilter(): DepositStateMap[keyof DepositStateMap];
setStateFilter(value: DepositStateMap[keyof DepositStateMap]): void;
@ -2179,6 +2202,9 @@ export class StaticAddressSummaryResponse extends jspb.Message {
getValueHtlcTimeoutSweepsSatoshis(): string;
setValueHtlcTimeoutSweepsSatoshis(value: string): void;
getValueChannelsOpened(): string;
setValueChannelsOpened(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): StaticAddressSummaryResponse.AsObject;
static toObject(includeInstance: boolean, msg: StaticAddressSummaryResponse): StaticAddressSummaryResponse.AsObject;
@ -2200,6 +2226,7 @@ export namespace StaticAddressSummaryResponse {
valueWithdrawnSatoshis: string,
valueLoopedInSatoshis: string,
valueHtlcTimeoutSweepsSatoshis: string,
valueChannelsOpened: string,
}
}
@ -2318,6 +2345,21 @@ export class StaticAddressLoopInSwap extends jspb.Message {
setDepositsList(value: Array<Deposit>): void;
addDeposits(value?: Deposit, index?: number): Deposit;
getInitiationTime(): string;
setInitiationTime(value: string): void;
getLastUpdateTime(): string;
setLastUpdateTime(value: string): void;
getCostServer(): string;
setCostServer(value: string): void;
getCostOnchain(): string;
setCostOnchain(value: string): void;
getCostOffchain(): string;
setCostOffchain(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): StaticAddressLoopInSwap.AsObject;
static toObject(includeInstance: boolean, msg: StaticAddressLoopInSwap): StaticAddressLoopInSwap.AsObject;
@ -2336,6 +2378,11 @@ export namespace StaticAddressLoopInSwap {
swapAmountSatoshis: string,
paymentRequestAmountSatoshis: string,
depositsList: Array<Deposit.AsObject>,
initiationTime: string,
lastUpdateTime: string,
costServer: string,
costOnchain: string,
costOffchain: string,
}
}
@ -2661,6 +2708,13 @@ export interface FailureReasonMap {
export const FailureReason: FailureReasonMap;
export interface LoopInSourceMap {
LOOP_IN_SOURCE_WALLET: 0;
LOOP_IN_SOURCE_STATIC_ADDRESS: 1;
}
export const LoopInSource: LoopInSourceMap;
export interface LiquidityRuleTypeMap {
UNKNOWN: 0;
THRESHOLD: 1;
@ -2683,6 +2737,8 @@ export interface AutoReasonMap {
AUTO_REASON_LIQUIDITY_OK: 11;
AUTO_REASON_BUDGET_INSUFFICIENT: 12;
AUTO_REASON_FEE_INSUFFICIENT: 13;
AUTO_REASON_STATIC_LOOP_IN_NO_CANDIDATE: 14;
AUTO_REASON_CUSTOM_CHANNEL_DATA: 15;
}
export const AutoReason: AutoReasonMap;
@ -2699,6 +2755,8 @@ export interface DepositStateMap {
PUBLISH_EXPIRED: 8;
WAIT_FOR_EXPIRY_SWEEP: 9;
EXPIRED: 10;
OPENING_CHANNEL: 11;
CHANNEL_PUBLISHED: 12;
}
export const DepositState: DepositStateMap;

File diff suppressed because it is too large Load diff

View file

@ -292,6 +292,15 @@ type SwapClientStaticAddressLoopIn = {
readonly responseType: typeof loop_pb.StaticAddressLoopInResponse;
};
type SwapClientStaticOpenChannel = {
readonly methodName: string;
readonly service: typeof SwapClient;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof loop_pb.StaticOpenChannelRequest;
readonly responseType: typeof loop_pb.StaticOpenChannelResponse;
};
export class SwapClient {
static readonly serviceName: string;
static readonly LoopOut: SwapClientLoopOut;
@ -326,6 +335,7 @@ export class SwapClient {
static readonly ListStaticAddressSwaps: SwapClientListStaticAddressSwaps;
static readonly GetStaticAddressSummary: SwapClientGetStaticAddressSummary;
static readonly StaticAddressLoopIn: SwapClientStaticAddressLoopIn;
static readonly StaticOpenChannel: SwapClientStaticOpenChannel;
}
export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
@ -640,5 +650,14 @@ export class SwapClientClient {
requestMessage: loop_pb.StaticAddressLoopInRequest,
callback: (error: ServiceError|null, responseMessage: loop_pb.StaticAddressLoopInResponse|null) => void
): UnaryResponse;
staticOpenChannel(
requestMessage: loop_pb.StaticOpenChannelRequest,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: loop_pb.StaticOpenChannelResponse|null) => void
): UnaryResponse;
staticOpenChannel(
requestMessage: loop_pb.StaticOpenChannelRequest,
callback: (error: ServiceError|null, responseMessage: loop_pb.StaticOpenChannelResponse|null) => void
): UnaryResponse;
}

View file

@ -298,6 +298,15 @@ SwapClient.StaticAddressLoopIn = {
responseType: loop_pb.StaticAddressLoopInResponse
};
SwapClient.StaticOpenChannel = {
methodName: "StaticOpenChannel",
service: SwapClient,
requestStream: false,
responseStream: false,
requestType: loop_pb.StaticOpenChannelRequest,
responseType: loop_pb.StaticOpenChannelResponse
};
exports.SwapClient = SwapClient;
function SwapClientClient(serviceHost, options) {
@ -1305,5 +1314,36 @@ SwapClientClient.prototype.staticAddressLoopIn = function staticAddressLoopIn(re
};
};
SwapClientClient.prototype.staticOpenChannel = function staticOpenChannel(requestMessage, metadata, callback) {
if (arguments.length === 2) {
callback = arguments[1];
}
var client = grpc.unary(SwapClient.StaticOpenChannel, {
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;

View file

@ -1098,6 +1098,21 @@ export class SubscribeNotificationsResponse extends jspb.Message {
getUnfinishedSwap(): ServerUnfinishedSwapNotification | undefined;
setUnfinishedSwap(value?: ServerUnfinishedSwapNotification): void;
hasStaticLoopInRiskAccepted(): boolean;
clearStaticLoopInRiskAccepted(): void;
getStaticLoopInRiskAccepted(): ServerStaticLoopInRiskAcceptedNotification | undefined;
setStaticLoopInRiskAccepted(value?: ServerStaticLoopInRiskAcceptedNotification): void;
hasStaticLoopInRiskRejected(): boolean;
clearStaticLoopInRiskRejected(): void;
getStaticLoopInRiskRejected(): ServerStaticLoopInRiskRejectedNotification | undefined;
setStaticLoopInRiskRejected(value?: ServerStaticLoopInRiskRejectedNotification): void;
hasHtlcConfirmed(): boolean;
clearHtlcConfirmed(): void;
getHtlcConfirmed(): ServerHtlcConfirmedNotification | undefined;
setHtlcConfirmed(value?: ServerHtlcConfirmedNotification): void;
getNotificationCase(): SubscribeNotificationsResponse.NotificationCase;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SubscribeNotificationsResponse.AsObject;
@ -1114,6 +1129,9 @@ export namespace SubscribeNotificationsResponse {
reservationNotification?: swapserverrpc_reservation_pb.ServerReservationNotification.AsObject,
staticLoopInSweep?: ServerStaticLoopInSweepNotification.AsObject,
unfinishedSwap?: ServerUnfinishedSwapNotification.AsObject,
staticLoopInRiskAccepted?: ServerStaticLoopInRiskAcceptedNotification.AsObject,
staticLoopInRiskRejected?: ServerStaticLoopInRiskRejectedNotification.AsObject,
htlcConfirmed?: ServerHtlcConfirmedNotification.AsObject,
}
export enum NotificationCase {
@ -1121,6 +1139,9 @@ export namespace SubscribeNotificationsResponse {
RESERVATION_NOTIFICATION = 1,
STATIC_LOOP_IN_SWEEP = 2,
UNFINISHED_SWAP = 3,
STATIC_LOOP_IN_RISK_ACCEPTED = 4,
STATIC_LOOP_IN_RISK_REJECTED = 5,
HTLC_CONFIRMED = 6,
}
}
@ -1161,6 +1182,50 @@ export namespace ServerStaticLoopInSweepNotification {
}
}
export class ServerStaticLoopInRiskAcceptedNotification extends jspb.Message {
getSwapHash(): Uint8Array | string;
getSwapHash_asU8(): Uint8Array;
getSwapHash_asB64(): string;
setSwapHash(value: Uint8Array | string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ServerStaticLoopInRiskAcceptedNotification.AsObject;
static toObject(includeInstance: boolean, msg: ServerStaticLoopInRiskAcceptedNotification): ServerStaticLoopInRiskAcceptedNotification.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: ServerStaticLoopInRiskAcceptedNotification, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ServerStaticLoopInRiskAcceptedNotification;
static deserializeBinaryFromReader(message: ServerStaticLoopInRiskAcceptedNotification, reader: jspb.BinaryReader): ServerStaticLoopInRiskAcceptedNotification;
}
export namespace ServerStaticLoopInRiskAcceptedNotification {
export type AsObject = {
swapHash: Uint8Array | string,
}
}
export class ServerStaticLoopInRiskRejectedNotification extends jspb.Message {
getSwapHash(): Uint8Array | string;
getSwapHash_asU8(): Uint8Array;
getSwapHash_asB64(): string;
setSwapHash(value: Uint8Array | string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ServerStaticLoopInRiskRejectedNotification.AsObject;
static toObject(includeInstance: boolean, msg: ServerStaticLoopInRiskRejectedNotification): ServerStaticLoopInRiskRejectedNotification.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: ServerStaticLoopInRiskRejectedNotification, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ServerStaticLoopInRiskRejectedNotification;
static deserializeBinaryFromReader(message: ServerStaticLoopInRiskRejectedNotification, reader: jspb.BinaryReader): ServerStaticLoopInRiskRejectedNotification;
}
export namespace ServerStaticLoopInRiskRejectedNotification {
export type AsObject = {
swapHash: Uint8Array | string,
}
}
export class ServerUnfinishedSwapNotification extends jspb.Message {
getSwapHash(): Uint8Array | string;
getSwapHash_asU8(): Uint8Array;
@ -1187,6 +1252,40 @@ export namespace ServerUnfinishedSwapNotification {
}
}
export class ServerHtlcConfirmedNotification extends jspb.Message {
getSwapHash(): Uint8Array | string;
getSwapHash_asU8(): Uint8Array;
getSwapHash_asB64(): string;
setSwapHash(value: Uint8Array | string): void;
getHtlcOutpoint(): string;
setHtlcOutpoint(value: string): void;
getHtlcAddress(): string;
setHtlcAddress(value: string): void;
getSatPerVbyte(): number;
setSatPerVbyte(value: number): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ServerHtlcConfirmedNotification.AsObject;
static toObject(includeInstance: boolean, msg: ServerHtlcConfirmedNotification): ServerHtlcConfirmedNotification.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: ServerHtlcConfirmedNotification, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ServerHtlcConfirmedNotification;
static deserializeBinaryFromReader(message: ServerHtlcConfirmedNotification, reader: jspb.BinaryReader): ServerHtlcConfirmedNotification;
}
export namespace ServerHtlcConfirmedNotification {
export type AsObject = {
swapHash: Uint8Array | string,
htlcOutpoint: string,
htlcAddress: string,
satPerVbyte: number,
}
}
export interface ProtocolVersionMap {
LEGACY: 0;
MULTI_LOOP_OUT: 1;

View file

@ -46,6 +46,7 @@ goog.exportSymbol('proto.looprpc.ReportRoutingResultRes', null, global);
goog.exportSymbol('proto.looprpc.RouteCancel', null, global);
goog.exportSymbol('proto.looprpc.RoutePaymentType', null, global);
goog.exportSymbol('proto.looprpc.RoutingPlugin', null, global);
goog.exportSymbol('proto.looprpc.ServerHtlcConfirmedNotification', null, global);
goog.exportSymbol('proto.looprpc.ServerLoopInQuoteRequest', null, global);
goog.exportSymbol('proto.looprpc.ServerLoopInQuoteResponse', null, global);
goog.exportSymbol('proto.looprpc.ServerLoopInRequest', null, global);
@ -64,6 +65,8 @@ goog.exportSymbol('proto.looprpc.ServerProbeRequest', null, global);
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.ServerStaticLoopInRiskAcceptedNotification', null, global);
goog.exportSymbol('proto.looprpc.ServerStaticLoopInRiskRejectedNotification', null, global);
goog.exportSymbol('proto.looprpc.ServerStaticLoopInSweepNotification', null, global);
goog.exportSymbol('proto.looprpc.ServerSwapState', null, global);
goog.exportSymbol('proto.looprpc.ServerUnfinishedSwapNotification', null, global);
@ -851,6 +854,48 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.looprpc.ServerStaticLoopInSweepNotification.displayName = 'proto.looprpc.ServerStaticLoopInSweepNotification';
}
/**
* 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.ServerStaticLoopInRiskAcceptedNotification = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.looprpc.ServerStaticLoopInRiskAcceptedNotification, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.looprpc.ServerStaticLoopInRiskAcceptedNotification.displayName = 'proto.looprpc.ServerStaticLoopInRiskAcceptedNotification';
}
/**
* 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.ServerStaticLoopInRiskRejectedNotification = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.looprpc.ServerStaticLoopInRiskRejectedNotification, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.looprpc.ServerStaticLoopInRiskRejectedNotification.displayName = 'proto.looprpc.ServerStaticLoopInRiskRejectedNotification';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -872,6 +917,27 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.looprpc.ServerUnfinishedSwapNotification.displayName = 'proto.looprpc.ServerUnfinishedSwapNotification';
}
/**
* 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.ServerHtlcConfirmedNotification = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.looprpc.ServerHtlcConfirmedNotification, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.looprpc.ServerHtlcConfirmedNotification.displayName = 'proto.looprpc.ServerHtlcConfirmedNotification';
}
@ -8546,7 +8612,7 @@ proto.looprpc.SubscribeNotificationsRequest.prototype.setVersion = function(valu
* @private {!Array<!Array<number>>}
* @const
*/
proto.looprpc.SubscribeNotificationsResponse.oneofGroups_ = [[1,2,3]];
proto.looprpc.SubscribeNotificationsResponse.oneofGroups_ = [[1,2,3,4,5,6]];
/**
* @enum {number}
@ -8555,7 +8621,10 @@ proto.looprpc.SubscribeNotificationsResponse.NotificationCase = {
NOTIFICATION_NOT_SET: 0,
RESERVATION_NOTIFICATION: 1,
STATIC_LOOP_IN_SWEEP: 2,
UNFINISHED_SWAP: 3
UNFINISHED_SWAP: 3,
STATIC_LOOP_IN_RISK_ACCEPTED: 4,
STATIC_LOOP_IN_RISK_REJECTED: 5,
HTLC_CONFIRMED: 6
};
/**
@ -8598,7 +8667,10 @@ proto.looprpc.SubscribeNotificationsResponse.toObject = function(includeInstance
var f, obj = {
reservationNotification: (f = msg.getReservationNotification()) && swapserverrpc_reservation_pb.ServerReservationNotification.toObject(includeInstance, f),
staticLoopInSweep: (f = msg.getStaticLoopInSweep()) && proto.looprpc.ServerStaticLoopInSweepNotification.toObject(includeInstance, f),
unfinishedSwap: (f = msg.getUnfinishedSwap()) && proto.looprpc.ServerUnfinishedSwapNotification.toObject(includeInstance, f)
unfinishedSwap: (f = msg.getUnfinishedSwap()) && proto.looprpc.ServerUnfinishedSwapNotification.toObject(includeInstance, f),
staticLoopInRiskAccepted: (f = msg.getStaticLoopInRiskAccepted()) && proto.looprpc.ServerStaticLoopInRiskAcceptedNotification.toObject(includeInstance, f),
staticLoopInRiskRejected: (f = msg.getStaticLoopInRiskRejected()) && proto.looprpc.ServerStaticLoopInRiskRejectedNotification.toObject(includeInstance, f),
htlcConfirmed: (f = msg.getHtlcConfirmed()) && proto.looprpc.ServerHtlcConfirmedNotification.toObject(includeInstance, f)
};
if (includeInstance) {
@ -8650,6 +8722,21 @@ proto.looprpc.SubscribeNotificationsResponse.deserializeBinaryFromReader = funct
reader.readMessage(value,proto.looprpc.ServerUnfinishedSwapNotification.deserializeBinaryFromReader);
msg.setUnfinishedSwap(value);
break;
case 4:
var value = new proto.looprpc.ServerStaticLoopInRiskAcceptedNotification;
reader.readMessage(value,proto.looprpc.ServerStaticLoopInRiskAcceptedNotification.deserializeBinaryFromReader);
msg.setStaticLoopInRiskAccepted(value);
break;
case 5:
var value = new proto.looprpc.ServerStaticLoopInRiskRejectedNotification;
reader.readMessage(value,proto.looprpc.ServerStaticLoopInRiskRejectedNotification.deserializeBinaryFromReader);
msg.setStaticLoopInRiskRejected(value);
break;
case 6:
var value = new proto.looprpc.ServerHtlcConfirmedNotification;
reader.readMessage(value,proto.looprpc.ServerHtlcConfirmedNotification.deserializeBinaryFromReader);
msg.setHtlcConfirmed(value);
break;
default:
reader.skipField();
break;
@ -8703,6 +8790,30 @@ proto.looprpc.SubscribeNotificationsResponse.serializeBinaryToWriter = function(
proto.looprpc.ServerUnfinishedSwapNotification.serializeBinaryToWriter
);
}
f = message.getStaticLoopInRiskAccepted();
if (f != null) {
writer.writeMessage(
4,
f,
proto.looprpc.ServerStaticLoopInRiskAcceptedNotification.serializeBinaryToWriter
);
}
f = message.getStaticLoopInRiskRejected();
if (f != null) {
writer.writeMessage(
5,
f,
proto.looprpc.ServerStaticLoopInRiskRejectedNotification.serializeBinaryToWriter
);
}
f = message.getHtlcConfirmed();
if (f != null) {
writer.writeMessage(
6,
f,
proto.looprpc.ServerHtlcConfirmedNotification.serializeBinaryToWriter
);
}
};
@ -8817,6 +8928,117 @@ proto.looprpc.SubscribeNotificationsResponse.prototype.hasUnfinishedSwap = funct
};
/**
* optional ServerStaticLoopInRiskAcceptedNotification static_loop_in_risk_accepted = 4;
* @return {?proto.looprpc.ServerStaticLoopInRiskAcceptedNotification}
*/
proto.looprpc.SubscribeNotificationsResponse.prototype.getStaticLoopInRiskAccepted = function() {
return /** @type{?proto.looprpc.ServerStaticLoopInRiskAcceptedNotification} */ (
jspb.Message.getWrapperField(this, proto.looprpc.ServerStaticLoopInRiskAcceptedNotification, 4));
};
/**
* @param {?proto.looprpc.ServerStaticLoopInRiskAcceptedNotification|undefined} value
* @return {!proto.looprpc.SubscribeNotificationsResponse} returns this
*/
proto.looprpc.SubscribeNotificationsResponse.prototype.setStaticLoopInRiskAccepted = function(value) {
return jspb.Message.setOneofWrapperField(this, 4, proto.looprpc.SubscribeNotificationsResponse.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.looprpc.SubscribeNotificationsResponse} returns this
*/
proto.looprpc.SubscribeNotificationsResponse.prototype.clearStaticLoopInRiskAccepted = function() {
return this.setStaticLoopInRiskAccepted(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.looprpc.SubscribeNotificationsResponse.prototype.hasStaticLoopInRiskAccepted = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional ServerStaticLoopInRiskRejectedNotification static_loop_in_risk_rejected = 5;
* @return {?proto.looprpc.ServerStaticLoopInRiskRejectedNotification}
*/
proto.looprpc.SubscribeNotificationsResponse.prototype.getStaticLoopInRiskRejected = function() {
return /** @type{?proto.looprpc.ServerStaticLoopInRiskRejectedNotification} */ (
jspb.Message.getWrapperField(this, proto.looprpc.ServerStaticLoopInRiskRejectedNotification, 5));
};
/**
* @param {?proto.looprpc.ServerStaticLoopInRiskRejectedNotification|undefined} value
* @return {!proto.looprpc.SubscribeNotificationsResponse} returns this
*/
proto.looprpc.SubscribeNotificationsResponse.prototype.setStaticLoopInRiskRejected = function(value) {
return jspb.Message.setOneofWrapperField(this, 5, proto.looprpc.SubscribeNotificationsResponse.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.looprpc.SubscribeNotificationsResponse} returns this
*/
proto.looprpc.SubscribeNotificationsResponse.prototype.clearStaticLoopInRiskRejected = function() {
return this.setStaticLoopInRiskRejected(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.looprpc.SubscribeNotificationsResponse.prototype.hasStaticLoopInRiskRejected = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* optional ServerHtlcConfirmedNotification htlc_confirmed = 6;
* @return {?proto.looprpc.ServerHtlcConfirmedNotification}
*/
proto.looprpc.SubscribeNotificationsResponse.prototype.getHtlcConfirmed = function() {
return /** @type{?proto.looprpc.ServerHtlcConfirmedNotification} */ (
jspb.Message.getWrapperField(this, proto.looprpc.ServerHtlcConfirmedNotification, 6));
};
/**
* @param {?proto.looprpc.ServerHtlcConfirmedNotification|undefined} value
* @return {!proto.looprpc.SubscribeNotificationsResponse} returns this
*/
proto.looprpc.SubscribeNotificationsResponse.prototype.setHtlcConfirmed = function(value) {
return jspb.Message.setOneofWrapperField(this, 6, proto.looprpc.SubscribeNotificationsResponse.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.looprpc.SubscribeNotificationsResponse} returns this
*/
proto.looprpc.SubscribeNotificationsResponse.prototype.clearHtlcConfirmed = function() {
return this.setHtlcConfirmed(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.looprpc.SubscribeNotificationsResponse.prototype.hasHtlcConfirmed = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* List of repeated fields within this message type.
@ -9122,6 +9344,314 @@ proto.looprpc.ServerStaticLoopInSweepNotification.prototype.clearPrevoutInfoList
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.looprpc.ServerStaticLoopInRiskAcceptedNotification.prototype.toObject = function(opt_includeInstance) {
return proto.looprpc.ServerStaticLoopInRiskAcceptedNotification.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.looprpc.ServerStaticLoopInRiskAcceptedNotification} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.looprpc.ServerStaticLoopInRiskAcceptedNotification.toObject = function(includeInstance, msg) {
var f, obj = {
swapHash: msg.getSwapHash_asB64()
};
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.ServerStaticLoopInRiskAcceptedNotification}
*/
proto.looprpc.ServerStaticLoopInRiskAcceptedNotification.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.looprpc.ServerStaticLoopInRiskAcceptedNotification;
return proto.looprpc.ServerStaticLoopInRiskAcceptedNotification.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.looprpc.ServerStaticLoopInRiskAcceptedNotification} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.looprpc.ServerStaticLoopInRiskAcceptedNotification}
*/
proto.looprpc.ServerStaticLoopInRiskAcceptedNotification.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;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.looprpc.ServerStaticLoopInRiskAcceptedNotification.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.looprpc.ServerStaticLoopInRiskAcceptedNotification.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.ServerStaticLoopInRiskAcceptedNotification} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.looprpc.ServerStaticLoopInRiskAcceptedNotification.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSwapHash_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
};
/**
* optional bytes swap_hash = 1;
* @return {!(string|Uint8Array)}
*/
proto.looprpc.ServerStaticLoopInRiskAcceptedNotification.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.ServerStaticLoopInRiskAcceptedNotification.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.ServerStaticLoopInRiskAcceptedNotification.prototype.getSwapHash_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getSwapHash()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.looprpc.ServerStaticLoopInRiskAcceptedNotification} returns this
*/
proto.looprpc.ServerStaticLoopInRiskAcceptedNotification.prototype.setSwapHash = function(value) {
return jspb.Message.setProto3BytesField(this, 1, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.looprpc.ServerStaticLoopInRiskRejectedNotification.prototype.toObject = function(opt_includeInstance) {
return proto.looprpc.ServerStaticLoopInRiskRejectedNotification.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.looprpc.ServerStaticLoopInRiskRejectedNotification} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.looprpc.ServerStaticLoopInRiskRejectedNotification.toObject = function(includeInstance, msg) {
var f, obj = {
swapHash: msg.getSwapHash_asB64()
};
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.ServerStaticLoopInRiskRejectedNotification}
*/
proto.looprpc.ServerStaticLoopInRiskRejectedNotification.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.looprpc.ServerStaticLoopInRiskRejectedNotification;
return proto.looprpc.ServerStaticLoopInRiskRejectedNotification.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.looprpc.ServerStaticLoopInRiskRejectedNotification} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.looprpc.ServerStaticLoopInRiskRejectedNotification}
*/
proto.looprpc.ServerStaticLoopInRiskRejectedNotification.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;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.looprpc.ServerStaticLoopInRiskRejectedNotification.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.looprpc.ServerStaticLoopInRiskRejectedNotification.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.ServerStaticLoopInRiskRejectedNotification} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.looprpc.ServerStaticLoopInRiskRejectedNotification.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSwapHash_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
};
/**
* optional bytes swap_hash = 1;
* @return {!(string|Uint8Array)}
*/
proto.looprpc.ServerStaticLoopInRiskRejectedNotification.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.ServerStaticLoopInRiskRejectedNotification.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.ServerStaticLoopInRiskRejectedNotification.prototype.getSwapHash_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getSwapHash()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.looprpc.ServerStaticLoopInRiskRejectedNotification} returns this
*/
proto.looprpc.ServerStaticLoopInRiskRejectedNotification.prototype.setSwapHash = function(value) {
return jspb.Message.setProto3BytesField(this, 1, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
@ -9303,6 +9833,250 @@ proto.looprpc.ServerUnfinishedSwapNotification.prototype.setIsLoopIn = function(
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.looprpc.ServerHtlcConfirmedNotification.prototype.toObject = function(opt_includeInstance) {
return proto.looprpc.ServerHtlcConfirmedNotification.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.looprpc.ServerHtlcConfirmedNotification} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.looprpc.ServerHtlcConfirmedNotification.toObject = function(includeInstance, msg) {
var f, obj = {
swapHash: msg.getSwapHash_asB64(),
htlcOutpoint: jspb.Message.getFieldWithDefault(msg, 2, ""),
htlcAddress: jspb.Message.getFieldWithDefault(msg, 3, ""),
satPerVbyte: jspb.Message.getFieldWithDefault(msg, 4, 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.ServerHtlcConfirmedNotification}
*/
proto.looprpc.ServerHtlcConfirmedNotification.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.looprpc.ServerHtlcConfirmedNotification;
return proto.looprpc.ServerHtlcConfirmedNotification.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.looprpc.ServerHtlcConfirmedNotification} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.looprpc.ServerHtlcConfirmedNotification}
*/
proto.looprpc.ServerHtlcConfirmedNotification.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.setHtlcOutpoint(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setHtlcAddress(value);
break;
case 4:
var value = /** @type {number} */ (reader.readUint32());
msg.setSatPerVbyte(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.looprpc.ServerHtlcConfirmedNotification.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.looprpc.ServerHtlcConfirmedNotification.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.ServerHtlcConfirmedNotification} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.looprpc.ServerHtlcConfirmedNotification.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSwapHash_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getHtlcOutpoint();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getHtlcAddress();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getSatPerVbyte();
if (f !== 0) {
writer.writeUint32(
4,
f
);
}
};
/**
* optional bytes swap_hash = 1;
* @return {!(string|Uint8Array)}
*/
proto.looprpc.ServerHtlcConfirmedNotification.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.ServerHtlcConfirmedNotification.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.ServerHtlcConfirmedNotification.prototype.getSwapHash_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getSwapHash()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.looprpc.ServerHtlcConfirmedNotification} returns this
*/
proto.looprpc.ServerHtlcConfirmedNotification.prototype.setSwapHash = function(value) {
return jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional string htlc_outpoint = 2;
* @return {string}
*/
proto.looprpc.ServerHtlcConfirmedNotification.prototype.getHtlcOutpoint = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.looprpc.ServerHtlcConfirmedNotification} returns this
*/
proto.looprpc.ServerHtlcConfirmedNotification.prototype.setHtlcOutpoint = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string htlc_address = 3;
* @return {string}
*/
proto.looprpc.ServerHtlcConfirmedNotification.prototype.getHtlcAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.looprpc.ServerHtlcConfirmedNotification} returns this
*/
proto.looprpc.ServerHtlcConfirmedNotification.prototype.setHtlcAddress = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional uint32 sat_per_vbyte = 4;
* @return {number}
*/
proto.looprpc.ServerHtlcConfirmedNotification.prototype.getSatPerVbyte = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {number} value
* @return {!proto.looprpc.ServerHtlcConfirmedNotification} returns this
*/
proto.looprpc.ServerHtlcConfirmedNotification.prototype.setSatPerVbyte = function(value) {
return jspb.Message.setProto3IntField(this, 4, value);
};
/**
* @enum {number}
*/

10
go.mod
View file

@ -24,15 +24,15 @@ require (
github.com/lightninglabs/lightning-node-connect/mailbox v1.0.2-0.20250610182311-2f1d46ef18b7
github.com/lightninglabs/lightning-terminal/autopilotserverrpc v0.0.3
github.com/lightninglabs/lndclient v0.21.0-1
github.com/lightninglabs/loop v0.31.8-beta
github.com/lightninglabs/loop/looprpc v1.0.13
github.com/lightninglabs/loop/swapserverrpc v1.0.20
github.com/lightninglabs/loop v0.33.3-beta
github.com/lightninglabs/loop/looprpc v1.0.14
github.com/lightninglabs/loop/swapserverrpc v1.0.21
github.com/lightninglabs/pool v0.7.1-beta
github.com/lightninglabs/pool/auctioneerrpc v1.1.3
github.com/lightninglabs/pool/poolrpc v1.0.1
github.com/lightninglabs/taproot-assets v0.8.0
github.com/lightninglabs/taproot-assets/taprpc v1.1.0
github.com/lightningnetwork/lnd v0.21.0-beta
github.com/lightningnetwork/lnd v0.21.1-beta
github.com/lightningnetwork/lnd/cert v1.2.2
github.com/lightningnetwork/lnd/clock v1.1.1
github.com/lightningnetwork/lnd/fn v1.2.5
@ -40,7 +40,7 @@ require (
github.com/lightningnetwork/lnd/kvdb v1.4.16
github.com/lightningnetwork/lnd/sqldb/v2 v2.0.0-20260326184657-f7cc56305bae
github.com/lightningnetwork/lnd/tlv v1.3.2
github.com/lightningnetwork/lnd/tor v1.1.6
github.com/lightningnetwork/lnd/tor v1.1.7
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f
github.com/mwitkow/grpc-proxy v0.0.0-20230212185441-f345521cb9c9
github.com/ory/dockertest/v3 v3.10.0

20
go.sum
View file

@ -1144,12 +1144,12 @@ github.com/lightninglabs/lightning-node-connect/mailbox v1.0.2-0.20250610182311-
github.com/lightninglabs/lightning-node-connect/mailbox v1.0.2-0.20250610182311-2f1d46ef18b7/go.mod h1:cQA5pybYbERkMlE8j49LITZZozQZIXABbWJLIpMWnus=
github.com/lightninglabs/lndclient v0.21.0-1 h1:NuyccCK7tbMaH7hhqtewcx+qeBel4/RLJrlnQ/lMkkY=
github.com/lightninglabs/lndclient v0.21.0-1/go.mod h1:RUIcfPr82HrvZr3pu9f8nbD5v6VFbm+KgExqNNp5bE4=
github.com/lightninglabs/loop v0.31.8-beta h1:9vYO5kDLrtQ9Mx41r0dAcVmZM1aQmkaDWwLUK1qOAes=
github.com/lightninglabs/loop v0.31.8-beta/go.mod h1:WHtv21ZYDuYrPWTIXlvAW3x78LPW7LFDCEOYsS1LBzU=
github.com/lightninglabs/loop/looprpc v1.0.13 h1:bOWDp+XnG28wP9Q8ZXvhhVuAQ7yYhuvPIfJk68GVLWk=
github.com/lightninglabs/loop/looprpc v1.0.13/go.mod h1:+m2HQ5gfMpoq449gyTsub/e3dKrOzAR6iWY11NV610M=
github.com/lightninglabs/loop/swapserverrpc v1.0.20 h1:/svfGdnwXE0++IvcNc50zjnpLPcJcvf+i2zPDhrAITo=
github.com/lightninglabs/loop/swapserverrpc v1.0.20/go.mod h1:nIgLTTEZ/fdWi9UVjNZ8XkkDMZI9wcEEVkEl9Wltyb4=
github.com/lightninglabs/loop v0.33.3-beta h1:L8wYQZIrz9Xpsre0eSGEfO0ahthr7sVjLzDBxaedx7w=
github.com/lightninglabs/loop v0.33.3-beta/go.mod h1:nQIASE+Y6X5x7I0RY9hH/Q748+Oi90OdqibpwYAnAKE=
github.com/lightninglabs/loop/looprpc v1.0.14 h1:9gaAVGplNZMyalLV8qxILXDD9F8QSgdtOgrtOFw60V4=
github.com/lightninglabs/loop/looprpc v1.0.14/go.mod h1:vUYOyRjWWKSnCrFyugiXuS90eC/FajYoTY3OE18cRNo=
github.com/lightninglabs/loop/swapserverrpc v1.0.21 h1:MI8LhS7jtjqI6b7AcE/kHO9WKGVxiWCMmt302dBsM6A=
github.com/lightninglabs/loop/swapserverrpc v1.0.21/go.mod h1:c0rJiM9TiZ7gr/snaALWixTf3UU1GNWZ9sYASTTHSZk=
github.com/lightninglabs/migrate/v4 v4.18.2-9023d66a-fork-pr-2.0.20251211093704-71c1eef09789 h1:7kX7vUgHUazAHcCJ6uzBDa4/2MEGEbMEfa01GtfqmTQ=
github.com/lightninglabs/migrate/v4 v4.18.2-9023d66a-fork-pr-2.0.20251211093704-71c1eef09789/go.mod h1:99BKpIi6ruaaXRM1A77eqZ+FWPQ3cfRa+ZVy5bmWMaY=
github.com/lightninglabs/neutrino v0.17.1 h1:lNhgq7ix/N81R6oATroP/kHMzH1qzVVF2dEGcTlN2t4=
@ -1170,8 +1170,8 @@ github.com/lightninglabs/taproot-assets/taprpc v1.1.0 h1:Oum7ddGygrEaT+NHqpaQI8U
github.com/lightninglabs/taproot-assets/taprpc v1.1.0/go.mod h1:X7XP753o8xCgjVI2mRu1Tvpyk3k4uybGDMFhpF6IRxI=
github.com/lightningnetwork/lightning-onion v1.3.0 h1:FqILgHjD6euc/Muo1VOzZ4+XDPuFnw6EYROBq0rR/5c=
github.com/lightningnetwork/lightning-onion v1.3.0/go.mod h1:nP85zMHG7c0si/eHBbSQpuDCtnIXfSvFrK3tW6YWzmU=
github.com/lightningnetwork/lnd v0.21.0-beta h1:bDP5UH15E7DVGTztsmBPQLqgyilq5EXDrglvQFmRc3U=
github.com/lightningnetwork/lnd v0.21.0-beta/go.mod h1:HcKq9DyxbVEZXuR28TIyGbIIgAjANCxI+N6dqOnRBAA=
github.com/lightningnetwork/lnd v0.21.1-beta h1:XYr8CRY3EB5bQ8I43/6QbOZP1dRi/XI6dwzTHlS2jxQ=
github.com/lightningnetwork/lnd v0.21.1-beta/go.mod h1:iqqf8Cyq0F7ssUftb17+Y644OWVg2OMOpvWSyzympXs=
github.com/lightningnetwork/lnd/actor v0.0.6 h1:Ge8N2wivARG+27qJBwTlB0vwsypStZYZy8vk4Zl38sU=
github.com/lightningnetwork/lnd/actor v0.0.6/go.mod h1:YAsoniSbY/cAM9HTVNfZLvt7RI6swDxy6wzPspTcMZg=
github.com/lightningnetwork/lnd/cert v1.2.2 h1:71YK6hogeJtxSxw2teq3eGeuy4rHGKcFf0d0Uy4qBjI=
@ -1196,8 +1196,8 @@ github.com/lightningnetwork/lnd/ticker v1.1.1 h1:J/b6N2hibFtC7JLV77ULQp++QLtCwT6
github.com/lightningnetwork/lnd/ticker v1.1.1/go.mod h1:waPTRAAcwtu7Ji3+3k+u/xH5GHovTsCoSVpho0KDvdA=
github.com/lightningnetwork/lnd/tlv v1.3.2 h1:MO4FCk7F4k5xPMqVZF6Nb/kOpxlwPrUQpYjmyKny5s0=
github.com/lightningnetwork/lnd/tlv v1.3.2/go.mod h1:pJuiBj1ecr1WWLOtcZ+2+hu9Ey25aJWFIsjmAoPPnmc=
github.com/lightningnetwork/lnd/tor v1.1.6 h1:WHUumk7WgU6BUFsqHuqszI9P6nfhMeIG+rjJBlVE6OE=
github.com/lightningnetwork/lnd/tor v1.1.6/go.mod h1:qSRB8llhAK+a6kaTPWOLLXSZc6Hg8ZC0mq1sUQ/8JfI=
github.com/lightningnetwork/lnd/tor v1.1.7 h1:BfY1KQGz3LVaeaAGI4XYGYCwDQR1ADFD1P/uXsS2dQc=
github.com/lightningnetwork/lnd/tor v1.1.7/go.mod h1:DANQ6QCQBiR+CqrM+mKudgkMy6CR/RS4ALDbjb2W4FU=
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 h1:sjOGyegMIhvgfq5oaue6Td+hxZuf3tDC8lAPrFldqFw=
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796/go.mod h1:3p7ZTf9V1sNPI5H8P3NkTFF4LuwMdPl2DodF60qAKqY=
github.com/ltcsuite/ltcutil v0.0.0-20181217130922-17f3b04680b6/go.mod h1:8Vg/LTOO0KYa/vlHWJ6XZAevPQThGH5sufO0Hrou/lA=

View file

@ -1,6 +1,7 @@
syntax = "proto3";
import "swapserverrpc/common.proto";
import "lnd.proto";
package looprpc;
@ -206,13 +207,34 @@ service SwapClient {
rpc GetStaticAddressSummary (StaticAddressSummaryRequest)
returns (StaticAddressSummaryResponse);
/* loop:`static`
/* loop:`static in`
StaticAddressLoopIn initiates a static address loop-in swap.
*/
rpc StaticAddressLoopIn (StaticAddressLoopInRequest)
returns (StaticAddressLoopInResponse);
/* loop:`static openchannel`
StaticOpenChannel opens a channel funded by selected static address
deposits.
*/
rpc StaticOpenChannel (StaticOpenChannelRequest)
returns (StaticOpenChannelResponse);
}
message StaticOpenChannelRequest {
// Wrap lnd's request so Loop can extend this RPC with Loop-specific fields
// without diverging from the upstream API surface.
lnrpc.OpenChannelRequest open_channel_request = 1;
}
message StaticOpenChannelResponse {
/*
The outpoint of the channel opening transaction in the format
"txid:output_index".
*/
string channel_open_outpoint = 1;
};
message StopDaemonRequest {
}
@ -1170,6 +1192,18 @@ message GetInfoResponse {
message GetLiquidityParamsRequest {
}
enum LoopInSource {
/*
Use the legacy wallet-funded loop-in flow.
*/
LOOP_IN_SOURCE_WALLET = 0;
/*
Use deposited static-address funds for loop-in autoloops.
*/
LOOP_IN_SOURCE_STATIC_ADDRESS = 1;
}
message LiquidityParameters {
/*
A set of liquidity rules that describe the desired liquidity balance.
@ -1348,6 +1382,11 @@ message LiquidityParameters {
considered for easy autoloop swaps.
*/
repeated bytes easy_autoloop_excluded_peers = 27;
/*
Selects which source autoloop uses for loop-in rules.
*/
LoopInSource loop_in_source = 28;
}
message EasyAssetAutoloopParams {
@ -1504,6 +1543,18 @@ enum AutoReason {
the portion of total swap amount that we allow fees to consume.
*/
AUTO_REASON_FEE_INSUFFICIENT = 13;
/*
No static loop-in candidate indicates that static loop-in autoloop was
selected, but no full-deposit static candidate fit the rule.
*/
AUTO_REASON_STATIC_LOOP_IN_NO_CANDIDATE = 14;
/*
Custom channel data indicates that the target channel carries custom
channel data and is excluded from the standard autoloop planner.
*/
AUTO_REASON_CUSTOM_CHANNEL_DATA = 15;
}
message Disqualified {
@ -1534,6 +1585,11 @@ message SuggestSwapsResponse {
*/
repeated LoopInRequest loop_in = 3;
/*
The set of recommended static-address loop in swaps.
*/
repeated StaticAddressLoopInRequest static_loop_in = 4;
/*
Disqualified contains the set of channels that swaps are not recommended
for.
@ -1771,7 +1827,7 @@ message WithdrawDepositsRequest {
/*
The outpoints of the deposits to withdraw.
*/
repeated OutPoint outpoints = 1;
repeated lnrpc.OutPoint outpoints = 1;
/*
If set to true, all deposits will be withdrawn.
@ -1810,23 +1866,6 @@ message WithdrawDepositsResponse {
string address = 2;
}
message OutPoint {
/*
Raw bytes representing the transaction id.
*/
bytes txid_bytes = 1;
/*
Reversed, hex-encoded string representing the transaction id.
*/
string txid_str = 2;
/*
The index of the output on the transaction.
*/
uint32 output_index = 3;
}
message ListStaticAddressDepositsRequest {
/*
Filters the list of all stored deposits by deposit state.
@ -1914,6 +1953,11 @@ message StaticAddressSummaryResponse {
The total value of all htlc timeout sweeps that the client swept.
*/
int64 value_htlc_timeout_sweeps_satoshis = 9 [jstype = JS_STRING];
/*
The total value of all deposits that have been used for channel openings.
*/
int64 value_channels_opened = 10 [jstype = JS_STRING];
}
enum DepositState {
@ -1982,6 +2026,18 @@ enum DepositState {
has been sufficiently confirmed.
*/
EXPIRED = 10;
/*
OPENING_CHANNEL indicates that the channel open in which the deposit was
used is in progress.
*/
OPENING_CHANNEL = 11;
/*
CHANNEL_PUBLISHED indicates that the channel open was finalized and
published and that it should be managed from lnd from now on.
*/
CHANNEL_PUBLISHED = 12;
}
message Deposit {
@ -2087,6 +2143,31 @@ message StaticAddressLoopInSwap {
The deposits that were used for this swap.
*/
repeated Deposit deposits = 6;
/*
Initiation time of the swap.
*/
int64 initiation_time = 7 [jstype = JS_STRING];
/*
Last update time of the swap.
*/
int64 last_update_time = 8 [jstype = JS_STRING];
/*
Swap server cost.
*/
int64 cost_server = 9 [jstype = JS_STRING];
/*
On-chain transaction cost.
*/
int64 cost_onchain = 10 [jstype = JS_STRING];
/*
Off-chain routing fees.
*/
int64 cost_offchain = 11 [jstype = JS_STRING];
}
enum StaticAddressLoopInSwapState {

View file

@ -679,6 +679,11 @@ message SubscribeNotificationsResponse {
ServerReservationNotification reservation_notification = 1;
ServerStaticLoopInSweepNotification static_loop_in_sweep = 2;
ServerUnfinishedSwapNotification unfinished_swap = 3;
ServerStaticLoopInRiskAcceptedNotification
static_loop_in_risk_accepted = 4;
ServerStaticLoopInRiskRejectedNotification
static_loop_in_risk_rejected = 5;
ServerHtlcConfirmedNotification htlc_confirmed = 6;
}
}
@ -699,6 +704,22 @@ message ServerStaticLoopInSweepNotification {
repeated PrevoutInfo prevout_info = 4;
}
// ServerStaticLoopInRiskAcceptedNotification tells the client that the server
// has accepted confirmation risk for a static loop-in and will start attempting
// the off-chain swap payment.
message ServerStaticLoopInRiskAcceptedNotification {
// The swap hash the accepted risk belongs to.
bytes swap_hash = 1;
}
// ServerStaticLoopInRiskRejectedNotification tells the client that the server
// will not continue waiting for confirmation risk acceptance for a static
// loop-in.
message ServerStaticLoopInRiskRejectedNotification {
// The swap hash the rejected risk wait belongs to.
bytes swap_hash = 1;
}
// ServerUnfinishedSwapNotification notifies the client about an unfinished
// swap that needs attention. This is useful in client data loss scenarios to
// help the client recover the swap.
@ -709,3 +730,20 @@ message ServerUnfinishedSwapNotification {
// Whether the swap is a loop in or loop out.
bool is_loop_in = 2;
}
// ServerHtlcConfirmedNotification is a notification from the server to the
// client that the on-chain HTLC for a loop out swap has been confirmed.
message ServerHtlcConfirmedNotification {
// The swap hash of the loop out swap.
bytes swap_hash = 1;
// htlc_outpoint is the outpoint of the confirmed HTLC in the format
// "txid:output_index".
string htlc_outpoint = 2;
// htlc_address is the address of the confirmed HTLC output.
string htlc_address = 3;
// sat_per_vbyte is the requested recovery sweep fee rate.
uint32 sat_per_vbyte = 4;
}