From 8e794da021e9328b511c1d3136e8b35ca7c2decf Mon Sep 17 00:00:00 2001 From: rsercano Date: Sat, 5 Dec 2020 11:45:21 +0300 Subject: [PATCH] feat: new grpc call for subscribing alerts and low balance alert (#864) --- docs/api.md | 75 ++ lib/Logger.ts | 3 + lib/Xud.ts | 5 + lib/alerts/Alerts.ts | 58 ++ lib/alerts/consts.ts | 2 + lib/alerts/types.ts | 19 + lib/cli/commands/streamalerts.ts | 78 +++ lib/cli/commands/streamorders.ts | 27 +- lib/cli/utils.ts | 31 + lib/connextclient/ConnextClient.ts | 19 + lib/constants/enums.ts | 9 + lib/grpc/GrpcService.ts | 31 +- lib/lndclient/LndClient.ts | 16 +- lib/proto/annotations_grpc_pb.js | 2 +- lib/proto/xudp2p_grpc_pb.js | 2 +- lib/proto/xudrpc.swagger.json | 88 +++ lib/proto/xudrpc_grpc_pb.d.ts | 15 + lib/proto/xudrpc_grpc_pb.js | 34 + lib/proto/xudrpc_pb.d.ts | 107 +++ lib/proto/xudrpc_pb.js | 624 +++++++++++++++++ lib/service/Service.ts | 23 + lib/service/types.ts | 2 + lib/swaps/SwapClient.ts | 25 +- proto/xudrpc.proto | 41 ++ test/integration/Service.spec.ts | 37 + test/jest/LndClient.spec.ts | 159 ++++- test/simulation/xudrpc/xudrpc.pb.go | 1014 ++++++++++++++++++--------- 27 files changed, 2168 insertions(+), 378 deletions(-) create mode 100644 lib/alerts/Alerts.ts create mode 100644 lib/alerts/consts.ts create mode 100644 lib/alerts/types.ts create mode 100644 lib/cli/commands/streamalerts.ts diff --git a/docs/api.md b/docs/api.md index 40231ec6b..b2c58a173 100644 --- a/docs/api.md +++ b/docs/api.md @@ -7,7 +7,9 @@ - [AddCurrencyResponse](#xudrpc.AddCurrencyResponse) - [AddPairRequest](#xudrpc.AddPairRequest) - [AddPairResponse](#xudrpc.AddPairResponse) + - [Alert](#xudrpc.Alert) - [Balance](#xudrpc.Balance) + - [BalanceAlert](#xudrpc.BalanceAlert) - [BanRequest](#xudrpc.BanRequest) - [BanResponse](#xudrpc.BanResponse) - [Chain](#xudrpc.Chain) @@ -75,6 +77,7 @@ - [SetLogLevelResponse](#xudrpc.SetLogLevelResponse) - [ShutdownRequest](#xudrpc.ShutdownRequest) - [ShutdownResponse](#xudrpc.ShutdownResponse) + - [SubscribeAlertsRequest](#xudrpc.SubscribeAlertsRequest) - [SubscribeOrdersRequest](#xudrpc.SubscribeOrdersRequest) - [SubscribeSwapsAcceptedRequest](#xudrpc.SubscribeSwapsAcceptedRequest) - [SubscribeSwapsRequest](#xudrpc.SubscribeSwapsRequest) @@ -95,6 +98,8 @@ - [WithdrawRequest](#xudrpc.WithdrawRequest) - [WithdrawResponse](#xudrpc.WithdrawResponse) + - [Alert.AlertType](#xudrpc.Alert.AlertType) + - [BalanceAlert.Side](#xudrpc.BalanceAlert.Side) - [Currency.SwapClient](#xudrpc.Currency.SwapClient) - [ListOrdersRequest.Owner](#xudrpc.ListOrdersRequest.Owner) - [LogLevel](#xudrpc.LogLevel) @@ -151,6 +156,23 @@ + + +### Alert + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| type | [Alert.AlertType](#xudrpc.Alert.AlertType) | | | +| message | [string](#string) | | The human readable alert message. | +| balance_alert | [BalanceAlert](#xudrpc.BalanceAlert) | | | + + + + + + ### Balance @@ -171,6 +193,25 @@ + + +### BalanceAlert + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| total_balance | [uint64](#uint64) | | The total balance. | +| side | [BalanceAlert.Side](#xudrpc.BalanceAlert.Side) | | | +| bound | [uint32](#uint32) | | The bound of the low balance in percentage. | +| side_balance | [uint64](#uint64) | | The current side balance. | +| currency | [string](#string) | | The currency of the alert. | + + + + + + ### BanRequest @@ -1201,6 +1242,16 @@ + + +### SubscribeAlertsRequest + + + + + + + ### SubscribeOrdersRequest @@ -1523,6 +1574,29 @@ + + +### Alert.AlertType +The type of the alert. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| LOW_TRADING_BALANCE | 0 | | + + + + + +### BalanceAlert.Side +The side of the low balance. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| REMOTE | 0 | | +| LOCAL | 1 | | + + + ### Currency.SwapClient @@ -1628,6 +1702,7 @@ The primary service for interacting with a running xud node. | RemovePair | [RemovePairRequest](#xudrpc.RemovePairRequest) | [RemovePairResponse](#xudrpc.RemovePairResponse) | Removes a trading pair from the list of currently supported trading pair. This call will effectively cancel any standing orders for that trading pair. Peers are informed when a pair is no longer supported so that they will know to stop sending orders for it. shell: xucli removepair <pair_id> | | SetLogLevel | [SetLogLevelRequest](#xudrpc.SetLogLevelRequest) | [SetLogLevelResponse](#xudrpc.SetLogLevelResponse) | Set the logging level. shell: xucli loglevel <level> | | Shutdown | [ShutdownRequest](#xudrpc.ShutdownRequest) | [ShutdownResponse](#xudrpc.ShutdownResponse) | Begin gracefully shutting down xud. shell: xucli shutdown | +| SubscribeAlerts | [SubscribeAlertsRequest](#xudrpc.SubscribeAlertsRequest) | [Alert](#xudrpc.Alert) stream | Subscribes to alerts such as low balance. | | SubscribeOrders | [SubscribeOrdersRequest](#xudrpc.SubscribeOrdersRequest) | [OrderUpdate](#xudrpc.OrderUpdate) stream | Subscribes to orders being added to and removed from the order book. This call allows the client to maintain an up-to-date view of the order book. For example, an exchange that wants to show its users a real time view of the orders available to them would subscribe to this streaming call to be alerted as new orders are added and expired orders are removed. | | SubscribeSwapFailures | [SubscribeSwapsRequest](#xudrpc.SubscribeSwapsRequest) | [SwapFailure](#xudrpc.SwapFailure) stream | Subscribes to failed swaps. By default, only swaps that are initiated by a remote peer are transmitted unless a flag is set to include swaps initiated by the local node. This call allows the client to get real-time notifications when swap attempts are failing. It can be used for status monitoring, debugging, and testing purposes. | | SubscribeSwaps | [SubscribeSwapsRequest](#xudrpc.SubscribeSwapsRequest) | [SwapSuccess](#xudrpc.SwapSuccess) stream | Subscribes to completed swaps. By default, only swaps that are initiated by a remote peer are transmitted unless a flag is set to include swaps initiated by the local node. This call allows the client to get real-time notifications when its orders are filled by a peer. It can be used for tracking order executions, updating balances, and informing a trader when one of their orders is settled through the Exchange Union network. | diff --git a/lib/Logger.ts b/lib/Logger.ts index 280770c5b..7f09f8fc4 100644 --- a/lib/Logger.ts +++ b/lib/Logger.ts @@ -45,6 +45,7 @@ export enum Context { Http = 'HTTP', Backup = 'BACKUP', Service = 'SERVICE', + Alerts = 'ALERTS', } type Loggers = { @@ -58,6 +59,7 @@ type Loggers = { swaps: Logger, http: Logger, service: Logger, + alerts: Logger, }; class Logger { @@ -133,6 +135,7 @@ class Logger { swaps: new Logger({ ...object, context: Context.Swaps }), http: new Logger({ ...object, context: Context.Http }), service: new Logger({ ...object, context: Context.Service }), + alerts: new Logger({ ...object, context: Context.Alerts }), }; } diff --git a/lib/Xud.ts b/lib/Xud.ts index 490e252c0..b820de98f 100644 --- a/lib/Xud.ts +++ b/lib/Xud.ts @@ -20,6 +20,7 @@ import SwapClientManager from './swaps/SwapClientManager'; import Swaps from './swaps/Swaps'; import { createSimnetChannels } from './utils/simnet-connext-channels'; import { UnitConverter } from './utils/UnitConverter'; +import Alerts from './alerts/Alerts'; const version: string = require('../package.json').version; @@ -46,6 +47,7 @@ class Xud extends EventEmitter { private swapClientManager?: SwapClientManager; private unitConverter?: UnitConverter; private simnetChannels$?: Subscription; + private alerts!: Alerts; /** * Create an Exchange Union daemon. @@ -203,6 +205,8 @@ class Xud extends EventEmitter { // initialize pool and start listening/connecting only once other components are initialized await this.pool.init(); + this.alerts = new Alerts({ swapClientManager: this.swapClientManager, logger: loggers.alerts }); + this.service = new Service({ version, nodeKey, @@ -212,6 +216,7 @@ class Xud extends EventEmitter { swaps: this.swaps, logger: loggers.service, shutdown: this.beginShutdown, + alerts: this.alerts, }); this.service.on('logLevel', (level) => { diff --git a/lib/alerts/Alerts.ts b/lib/alerts/Alerts.ts new file mode 100644 index 000000000..59480c63d --- /dev/null +++ b/lib/alerts/Alerts.ts @@ -0,0 +1,58 @@ +import { EventEmitter } from 'events'; +import { BalanceAlert } from './types'; +import SwapClientManager from '../swaps/SwapClientManager'; +import { MIN_BALANCE_ALERT_THRESHOLD_IN_MS } from './consts'; +import Logger from '../Logger'; +import { AlertType, ChannelSide } from '../constants/enums'; +import { satsToCoinsStr } from '../cli/utils'; + +interface Alerts { + on(event: 'alert', listener: (alert: any) => void): this; + emit(event: 'alert', alert: any): boolean; +} + +// TODO this class still requires a cleanup if alert is not being thrown anymore after a while +/** + * This class works as a middleware for thrown alerts from xud's main flow. Each alert will be caught here + * and re-thrown if last thrown time was before the minimum threshold that set in consts.ts + */ +class Alerts extends EventEmitter { + private alerts = new Map(); + private logger: Logger; + + constructor({ swapClientManager, logger }: {swapClientManager: SwapClientManager, logger: Logger}) { + super(); + this.logger = logger; + this.listenLowTradingBalanceAlerts(swapClientManager); + } + + private listenLowTradingBalanceAlerts(swapClientManager: SwapClientManager) { + const lndClients = swapClientManager.getLndClientsMap().values(); + for (const lndClient of lndClients) { + lndClient.on('lowTradingBalance', this.onLowTradingBalance); + } + swapClientManager.connextClient?.on('lowTradingBalance', this.onLowTradingBalance); + } + + private onLowTradingBalance = (balanceAlert: BalanceAlert) => { + const stringRepresentation = JSON.stringify(balanceAlert); + this.logger.trace(`received low trading balance alert ${stringRepresentation}`); + if (this.alerts.get(stringRepresentation) === undefined || this.checkAlertThreshold(stringRepresentation)) { + this.logger.trace(`triggering low balance alert ${stringRepresentation}`); + + balanceAlert.message = `${ChannelSide[balanceAlert.side || 0]} trading balance (${satsToCoinsStr(balanceAlert.sideBalance || 0)} ${balanceAlert.currency}) is lower than 10% of trading capacity (${satsToCoinsStr(balanceAlert.totalBalance || 0)} ${balanceAlert.currency})`; + balanceAlert.type = AlertType.LowTradingBalance; + + this.alerts.set(stringRepresentation, Date.now()); + this.emit('alert', balanceAlert); + } + } + + private checkAlertThreshold(stringRepresentation: string) { + const lastThrownTime = this.alerts.get(stringRepresentation) || 0; + const passedTime = Date.now() - lastThrownTime; + return passedTime > MIN_BALANCE_ALERT_THRESHOLD_IN_MS; + } +} + +export default Alerts; diff --git a/lib/alerts/consts.ts b/lib/alerts/consts.ts new file mode 100644 index 000000000..e29bb7c76 --- /dev/null +++ b/lib/alerts/consts.ts @@ -0,0 +1,2 @@ +/** The minimum time in miliseconds to be passed to rethrow a balance alert. */ +export const MIN_BALANCE_ALERT_THRESHOLD_IN_MS = 10000; diff --git a/lib/alerts/types.ts b/lib/alerts/types.ts new file mode 100644 index 000000000..e99dd6390 --- /dev/null +++ b/lib/alerts/types.ts @@ -0,0 +1,19 @@ +import { AlertType, ChannelSide } from '../constants/enums'; + +export type BalanceAlert = Alert & { + /** The total balance of the channel when the alert is triggered. */ + totalBalance: number; + /** The side of the balance either local or remote. */ + side: ChannelSide; + /** The balance that triggered the alert. */ + sideBalance: number; + /** The alert threshold in percentage, e.g. 10 means %10. */ + bound: number; + /** The currency of the channel. */ + currency: string; +}; + +export type Alert = { + type: AlertType; + message: string; +}; diff --git a/lib/cli/commands/streamalerts.ts b/lib/cli/commands/streamalerts.ts new file mode 100644 index 000000000..be05e0eef --- /dev/null +++ b/lib/cli/commands/streamalerts.ts @@ -0,0 +1,78 @@ +import { Arguments, Argv } from 'yargs'; +import { XudClient } from '../../proto/xudrpc_grpc_pb'; +import * as xudrpc from '../../proto/xudrpc_pb'; +import { loadXudClient } from '../command'; +import { AlertType, ChannelSide } from '../../constants/enums'; +import { onStreamError, waitForClient } from '../utils'; +import moment from 'moment'; + +export const command = 'streamalerts'; + +export const describe = 'stream alert notifications from xud'; + +export const builder = (argv: Argv) => argv + .option('pretty', { + type: 'boolean', + }) + .example('$0 streamalerts -j', 'prints alert payload in a JSON structure') + .example('$0 streamalerts', 'prints alert message only'); + +export const handler = async (argv: Arguments) => { + await ensureConnection(argv, true); +}; + +let client: XudClient; + +const ensureConnection = async (argv: Arguments, printError?: boolean) => { + if (!client) { + client = await loadXudClient(argv); + } + + waitForClient(client, argv, ensureConnection, streamalerts, printError); +}; + +const structAlertJson = (alertObject: xudrpc.Alert.AsObject) => { + const result: {type: string, payload: { + totalBalance?: number, + side?: string, + bound?: number, + sideBalance?: number, + channelPoint?: string, + currency?: string, + } | undefined } = { + type: AlertType[alertObject.type], + payload: undefined, + }; + + if (alertObject.type === xudrpc.Alert.AlertType.LOW_TRADING_BALANCE) { + result.payload = { + totalBalance: alertObject.balanceAlert?.totalBalance, + side: ChannelSide[alertObject.balanceAlert?.side || 0], + sideBalance: alertObject.balanceAlert?.sideBalance, + bound: alertObject.balanceAlert?.bound, + currency: alertObject.balanceAlert?.currency, + }; + } + + return result; +}; + +const streamalerts = (argv: Arguments) => { + const request = new xudrpc.SubscribeAlertsRequest(); + const alertsSubscription = client.subscribeAlerts(request); + + alertsSubscription.on('data', (alert: xudrpc.Alert) => { + if (argv.json) { + console.log(JSON.stringify(structAlertJson(alert.toObject()), undefined, 2)); + } else { + console.log(`(${moment()}) ${AlertType[alert.getType()]}: ${alert.getMessage()}`); + } + }); + alertsSubscription.on('end', reconnect.bind(undefined, argv)); + alertsSubscription.on('error', onStreamError.bind(undefined, ensureConnection.bind(undefined, argv))); +}; + +const reconnect = async (argv: Arguments) => { + console.log('Stream has closed, trying to reconnect'); + await ensureConnection(argv, false); +}; diff --git a/lib/cli/commands/streamorders.ts b/lib/cli/commands/streamorders.ts index d987a3111..e4ff418ee 100644 --- a/lib/cli/commands/streamorders.ts +++ b/lib/cli/commands/streamorders.ts @@ -1,9 +1,8 @@ -import { ServiceError, status } from 'grpc'; import { Arguments, Argv } from 'yargs'; import { XudClient } from '../../proto/xudrpc_grpc_pb'; import * as xudrpc from '../../proto/xudrpc_pb'; -import { setTimeoutPromise } from '../../utils/utils'; import { loadXudClient } from '../command'; +import { onStreamError, waitForClient } from '../utils'; export const command = 'streamorders [existing]'; @@ -26,20 +25,8 @@ const ensureConnection = async (argv: Arguments, printError?: boolean) => { if (!client) { client = await loadXudClient(argv); } - client.waitForReady(Date.now() + 3000, (error: Error | null) => { - if (error) { - if (error.message === 'Failed to connect before the deadline') { - console.error(`could not connect to xud at ${argv.rpchost}:${argv.rpcport}, is xud running?`); - process.exit(1); - } - if (printError) console.error(`${error.name}: ${error.message}`); - setTimeout(ensureConnection.bind(undefined, argv, printError), 3000); - } else { - console.log('Successfully connected, subscribing for orders'); - streamOrders(argv); - } - }); + waitForClient(client, argv, ensureConnection, streamOrders, printError); }; const streamOrders = (argv: Arguments) => { @@ -57,15 +44,7 @@ const streamOrders = (argv: Arguments) => { // adding end, close, error events only once, // since they'll be thrown for three of subscriptions in the corresponding cases, catching once is enough. ordersSubscription.on('end', reconnect.bind(undefined, argv)); - ordersSubscription.on('error', async (err: ServiceError) => { - if (err.code === status.UNIMPLEMENTED) { - console.error("xud is locked, run 'xucli unlock', 'xucli create', or 'xucli restore' then try again"); - process.exit(1); - } - console.warn(`Unexpected error occured: ${err.message}, reconnecting in 1 second`); - await setTimeoutPromise(1000); - await ensureConnection(argv); - }); + ordersSubscription.on('error', onStreamError.bind(undefined, ensureConnection.bind(undefined, argv))); const swapsRequest = new xudrpc.SubscribeSwapsRequest(); swapsRequest.setIncludeTaker(true); diff --git a/lib/cli/utils.ts b/lib/cli/utils.ts index ad1a17532..8294678b1 100644 --- a/lib/cli/utils.ts +++ b/lib/cli/utils.ts @@ -2,6 +2,10 @@ import colors from 'colors/safe'; import { accessSync, watch } from 'fs'; import os from 'os'; import path from 'path'; +import { XudClient } from '../proto/xudrpc_grpc_pb'; +import { Arguments } from 'yargs'; +import { ServiceError, status } from 'grpc'; +import { setTimeoutPromise } from '../utils/utils'; const SATOSHIS_PER_COIN = 10 ** 8; @@ -100,3 +104,30 @@ be recovered with it and must be backed up and recovered separately. Keep it \ somewhere safe, it is your ONLY backup in case of data loss. `); } + +export const waitForClient = (client: XudClient, argv: Arguments, ensureConnection: Function, successCallback: Function, printError?: boolean) => { + client.waitForReady(Date.now() + 3000, (error: Error | null) => { + if (error) { + if (error.message === 'Failed to connect before the deadline') { + console.error(`could not connect to xud at ${argv.rpchost}:${argv.rpcport}, is xud running?`); + process.exit(1); + } + + if (printError) console.error(`${error.name}: ${error.message}`); + setTimeout(ensureConnection.bind(undefined, argv, printError), 3000); + } else { + console.log('Successfully connected, streaming'); + successCallback(argv); + } + }); +}; + +export const onStreamError = async (ensureConnection: Function, err: ServiceError) => { + if (err.code === status.UNIMPLEMENTED) { + console.error("xud is locked, run 'xucli unlock', 'xucli create', or 'xucli restore' then try again"); + process.exit(1); + } + console.warn(`Unexpected error occured: ${err.message}, reconnecting in 1 second`); + await setTimeoutPromise(1000); + await ensureConnection(); +}; diff --git a/lib/connextclient/ConnextClient.ts b/lib/connextclient/ConnextClient.ts index d6ac809d3..595b42f91 100644 --- a/lib/connextclient/ConnextClient.ts +++ b/lib/connextclient/ConnextClient.ts @@ -39,6 +39,7 @@ import { parseResponseBody } from '../utils/utils'; import { Observable, fromEvent, from, combineLatest, defer, timer } from 'rxjs'; import { take, pluck, timeout, filter, catchError, mergeMapTo } from 'rxjs/operators'; import { sha256 } from '@ethersproject/solidity'; +import { BalanceAlert } from '../alerts/types'; interface ConnextClient { on(event: 'preimage', listener: (preimageRequest: ProvidePreimageEvent) => void): void; @@ -46,6 +47,7 @@ interface ConnextClient { on(event: 'htlcAccepted', listener: (rHash: string, amount: number, currency: string) => void): this; on(event: 'connectionVerified', listener: (swapClientInfo: SwapClientInfo) => void): this; on(event: 'depositConfirmed', listener: (hash: string) => void): this; + on(event: 'lowTradingBalance', listener: (alert: BalanceAlert) => void): this; once(event: 'initialized', listener: () => void): this; emit(event: 'htlcAccepted', rHash: string, amount: number, currency: string): boolean; emit(event: 'connectionVerified', swapClientInfo: SwapClientInfo): boolean; @@ -53,6 +55,7 @@ interface ConnextClient { emit(event: 'preimage', preimageRequest: ProvidePreimageEvent): void; emit(event: 'transferReceived', transferReceivedRequest: TransferReceivedEvent): void; emit(event: 'depositConfirmed', hash: string): void; + emit(event: 'lowTradingBalance', alert: BalanceAlert): boolean; } /** @@ -335,6 +338,22 @@ class ConnextClient extends SwapClient { channelBalancePromises.push(this.channelBalance(currency)); } await Promise.all(channelBalancePromises); + + for (const [currency] of this.tokenAddresses) { + const remoteBalance = this.inboundAmounts.get(currency) || 0; + const localBalance = this.outboundAmounts.get(currency) || 0; + const totalBalance = remoteBalance + localBalance; + const alertThreshold = totalBalance * 0.1; + + this.checkLowBalance( + remoteBalance, + localBalance, + totalBalance, + alertThreshold, + currency, + this.emit.bind(this), + ); + } } catch (e) { this.logger.error('failed to update total outbound capacity', e); } diff --git a/lib/constants/enums.ts b/lib/constants/enums.ts index e86a12080..1d74a1bfa 100644 --- a/lib/constants/enums.ts +++ b/lib/constants/enums.ts @@ -180,3 +180,12 @@ export enum DisconnectionReason { AuthFailureInvalidSignature = 12, WireProtocolErr = 13, } + +export enum AlertType { + LowTradingBalance = 0, +} + +export enum ChannelSide { + Remote, + Local, +} diff --git a/lib/grpc/GrpcService.ts b/lib/grpc/GrpcService.ts index 7a581cba5..0e8073bd2 100644 --- a/lib/grpc/GrpcService.ts +++ b/lib/grpc/GrpcService.ts @@ -2,7 +2,7 @@ import grpc, { ServerWritableStream, status } from 'grpc'; import { fromEvent } from 'rxjs'; import { take } from 'rxjs/operators'; -import { SwapFailureReason } from '../constants/enums'; +import { AlertType, SwapFailureReason } from '../constants/enums'; import { LndInfo } from '../lndclient/types'; import { isOwnOrder, Order, OrderPortion, PlaceOrderEventType, PlaceOrderResult } from '../orderbook/types'; import * as xudrpc from '../proto/xudrpc_pb'; @@ -10,6 +10,7 @@ import Service from '../service/Service'; import { ServiceOrder, ServicePlaceOrderEvent } from '../service/types'; import { SwapAccepted, SwapFailure, SwapSuccess } from '../swaps/types'; import getGrpcError from './getGrpcError'; +import { BalanceAlert } from '../alerts/types'; /** * Creates an xudrpc Order message from an [[Order]]. @@ -904,6 +905,34 @@ class GrpcService { } } + /* + * See [[Service.subscribeAlerts]] + */ + public subscribeAlerts: grpc.handleServerStreamingCall = (call) => { + if (!this.isReady(this.service, call)) { + return; + } + + const cancelled$ = getCancelled$(call); + this.service.subscribeAlerts((serviceAlert: any) => { + const alert = new xudrpc.Alert(); + alert.setType(serviceAlert.type as number); + alert.setMessage(serviceAlert.message); + if (serviceAlert.type === AlertType.LowTradingBalance) { + const balanceServiceAlert = serviceAlert as BalanceAlert; + const balanceAlert = new xudrpc.BalanceAlert(); + balanceAlert.setBound(balanceServiceAlert.bound); + balanceAlert.setSide(balanceServiceAlert.side as number); + balanceAlert.setSideBalance(balanceServiceAlert.sideBalance); + balanceAlert.setTotalBalance(balanceServiceAlert.totalBalance); + balanceAlert.setCurrency(balanceServiceAlert.currency); + alert.setBalanceAlert(balanceAlert); + } + call.write(alert); + }, cancelled$); + this.addStream(call); + } + /* * See [[Service.subscribeOrders]] */ diff --git a/lib/lndclient/LndClient.ts b/lib/lndclient/LndClient.ts index 583fca8b5..74266aa56 100644 --- a/lib/lndclient/LndClient.ts +++ b/lib/lndclient/LndClient.ts @@ -21,6 +21,7 @@ import { deriveChild } from '../utils/seedutil'; import { base64ToHex, hexToUint8Array } from '../utils/utils'; import errors from './errors'; import { Chain, ChannelCount, ClientMethods, LndClientConfig, LndInfo } from './types'; +import { BalanceAlert } from '../alerts/types'; interface LndClient { on(event: 'connectionVerified', listener: (swapClientInfo: SwapClientInfo) => void): this; @@ -28,6 +29,7 @@ interface LndClient { on(event: 'channelBackup', listener: (channelBackup: Uint8Array) => void): this; on(event: 'channelBackupEnd', listener: () => void): this; on(event: 'locked', listener: () => void): this; + on(event: 'lowTradingBalance', listener: (alert: BalanceAlert) => void): this; once(event: 'initialized', listener: () => void): this; @@ -37,6 +39,7 @@ interface LndClient { emit(event: 'channelBackupEnd'): boolean; emit(event: 'locked'): boolean; emit(event: 'initialized'): boolean; + emit(event: 'lowTradingBalance', alert: BalanceAlert): boolean; } const GRPC_CLIENT_OPTIONS = { @@ -239,7 +242,18 @@ class LndClient extends SwapClient { } protected updateCapacity = async () => { - await this.channelBalance().catch(async (err) => { + await this.channelBalance().then(() => { + const totalBalance = this.totalOutboundAmount + this.totalInboundAmount; + const alertThreshold = totalBalance * 0.1; + this.checkLowBalance( + this.totalInboundAmount, + this.totalOutboundAmount, + totalBalance, + alertThreshold, + this.currency, + this.emit.bind(this), + ); + }).catch(async (err) => { this.logger.error('failed to update total outbound capacity', err); }); } diff --git a/lib/proto/annotations_grpc_pb.js b/lib/proto/annotations_grpc_pb.js index 97b3a2461..51b4d6959 100644 --- a/lib/proto/annotations_grpc_pb.js +++ b/lib/proto/annotations_grpc_pb.js @@ -1 +1 @@ -// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/lib/proto/xudp2p_grpc_pb.js b/lib/proto/xudp2p_grpc_pb.js index 97b3a2461..51b4d6959 100644 --- a/lib/proto/xudp2p_grpc_pb.js +++ b/lib/proto/xudp2p_grpc_pb.js @@ -1 +1 @@ -// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file +// GENERATED CODE -- NO SERVICES IN PROTO diff --git a/lib/proto/xudrpc.swagger.json b/lib/proto/xudrpc.swagger.json index ccdc5b3dc..01d5c93d4 100644 --- a/lib/proto/xudrpc.swagger.json +++ b/lib/proto/xudrpc.swagger.json @@ -636,6 +636,23 @@ ] } }, + "/v1/subscribealerts": { + "get": { + "summary": "Subscribes to alerts such as low balance.", + "operationId": "SubscribeAlerts", + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "$ref": "#/x-stream-definitions/xudrpcAlert" + } + } + }, + "tags": [ + "Xud" + ] + } + }, "/v1/subscribeorders": { "get": { "summary": "Subscribes to orders being added to and removed from the order book. This call allows the client\nto maintain an up-to-date view of the order book. For example, an exchange that wants to show\nits users a real time view of the orders available to them would subscribe to this streaming\ncall to be alerted as new orders are added and expired orders are removed.", @@ -870,6 +887,23 @@ } }, "definitions": { + "AlertAlertType": { + "type": "string", + "enum": [ + "LOW_TRADING_BALANCE" + ], + "default": "LOW_TRADING_BALANCE", + "description": "The type of the alert." + }, + "BalanceAlertSide": { + "type": "string", + "enum": [ + "REMOTE", + "LOCAL" + ], + "default": "REMOTE", + "description": "The side of the low balance." + }, "CurrencySwapClient": { "type": "string", "enum": [ @@ -943,6 +977,21 @@ "xudrpcAddPairResponse": { "type": "object" }, + "xudrpcAlert": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/AlertAlertType" + }, + "message": { + "type": "string", + "description": "The human readable alert message." + }, + "balance_alert": { + "$ref": "#/definitions/xudrpcBalanceAlert" + } + } + }, "xudrpcBalance": { "type": "object", "properties": { @@ -978,6 +1027,33 @@ } } }, + "xudrpcBalanceAlert": { + "type": "object", + "properties": { + "total_balance": { + "type": "string", + "format": "uint64", + "description": "The total balance." + }, + "side": { + "$ref": "#/definitions/BalanceAlertSide" + }, + "bound": { + "type": "integer", + "format": "int64", + "description": "The bound of the low balance in percentage." + }, + "side_balance": { + "type": "string", + "format": "uint64", + "description": "The current side balance." + }, + "currency": { + "type": "string", + "description": "The currency of the alert." + } + } + }, "xudrpcBanRequest": { "type": "object", "properties": { @@ -2100,6 +2176,18 @@ } }, "x-stream-definitions": { + "xudrpcAlert": { + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/xudrpcAlert" + }, + "error": { + "$ref": "#/definitions/runtimeStreamError" + } + }, + "title": "Stream result of xudrpcAlert" + }, "xudrpcOrderUpdate": { "type": "object", "properties": { diff --git a/lib/proto/xudrpc_grpc_pb.d.ts b/lib/proto/xudrpc_grpc_pb.d.ts index 22051652c..23d9f31aa 100644 --- a/lib/proto/xudrpc_grpc_pb.d.ts +++ b/lib/proto/xudrpc_grpc_pb.d.ts @@ -101,6 +101,7 @@ interface IXudService extends grpc.ServiceDefinition; responseDeserialize: grpc.deserialize; } +interface IXudService_ISubscribeAlerts extends grpc.MethodDefinition { + path: string; // "/xudrpc.Xud/SubscribeAlerts" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} interface IXudService_ISubscribeOrders extends grpc.MethodDefinition { path: string; // "/xudrpc.Xud/SubscribeOrders" requestStream: boolean; // false @@ -447,6 +457,7 @@ export interface IXudServer { removePair: grpc.handleUnaryCall; setLogLevel: grpc.handleUnaryCall; shutdown: grpc.handleUnaryCall; + subscribeAlerts: grpc.handleServerStreamingCall; subscribeOrders: grpc.handleServerStreamingCall; subscribeSwapFailures: grpc.handleServerStreamingCall; subscribeSwaps: grpc.handleServerStreamingCall; @@ -535,6 +546,8 @@ export interface IXudClient { shutdown(request: xudrpc_pb.ShutdownRequest, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ShutdownResponse) => void): grpc.ClientUnaryCall; shutdown(request: xudrpc_pb.ShutdownRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ShutdownResponse) => void): grpc.ClientUnaryCall; shutdown(request: xudrpc_pb.ShutdownRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ShutdownResponse) => void): grpc.ClientUnaryCall; + subscribeAlerts(request: xudrpc_pb.SubscribeAlertsRequest, options?: Partial): grpc.ClientReadableStream; + subscribeAlerts(request: xudrpc_pb.SubscribeAlertsRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; subscribeOrders(request: xudrpc_pb.SubscribeOrdersRequest, options?: Partial): grpc.ClientReadableStream; subscribeOrders(request: xudrpc_pb.SubscribeOrdersRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; subscribeSwapFailures(request: xudrpc_pb.SubscribeSwapsRequest, options?: Partial): grpc.ClientReadableStream; @@ -636,6 +649,8 @@ export class XudClient extends grpc.Client implements IXudClient { public shutdown(request: xudrpc_pb.ShutdownRequest, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ShutdownResponse) => void): grpc.ClientUnaryCall; public shutdown(request: xudrpc_pb.ShutdownRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ShutdownResponse) => void): grpc.ClientUnaryCall; public shutdown(request: xudrpc_pb.ShutdownRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ShutdownResponse) => void): grpc.ClientUnaryCall; + public subscribeAlerts(request: xudrpc_pb.SubscribeAlertsRequest, options?: Partial): grpc.ClientReadableStream; + public subscribeAlerts(request: xudrpc_pb.SubscribeAlertsRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; public subscribeOrders(request: xudrpc_pb.SubscribeOrdersRequest, options?: Partial): grpc.ClientReadableStream; public subscribeOrders(request: xudrpc_pb.SubscribeOrdersRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; public subscribeSwapFailures(request: xudrpc_pb.SubscribeSwapsRequest, options?: Partial): grpc.ClientReadableStream; diff --git a/lib/proto/xudrpc_grpc_pb.js b/lib/proto/xudrpc_grpc_pb.js index 8d359ad92..1303cde7f 100644 --- a/lib/proto/xudrpc_grpc_pb.js +++ b/lib/proto/xudrpc_grpc_pb.js @@ -59,6 +59,17 @@ function deserialize_xudrpc_AddPairResponse(buffer_arg) { return xudrpc_pb.AddPairResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_xudrpc_Alert(arg) { + if (!(arg instanceof xudrpc_pb.Alert)) { + throw new Error('Expected argument of type xudrpc.Alert'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_xudrpc_Alert(buffer_arg) { + return xudrpc_pb.Alert.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_xudrpc_BanRequest(arg) { if (!(arg instanceof xudrpc_pb.BanRequest)) { throw new Error('Expected argument of type xudrpc.BanRequest'); @@ -631,6 +642,17 @@ function deserialize_xudrpc_ShutdownResponse(buffer_arg) { return xudrpc_pb.ShutdownResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_xudrpc_SubscribeAlertsRequest(arg) { + if (!(arg instanceof xudrpc_pb.SubscribeAlertsRequest)) { + throw new Error('Expected argument of type xudrpc.SubscribeAlertsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_xudrpc_SubscribeAlertsRequest(buffer_arg) { + return xudrpc_pb.SubscribeAlertsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_xudrpc_SubscribeOrdersRequest(arg) { if (!(arg instanceof xudrpc_pb.SubscribeOrdersRequest)) { throw new Error('Expected argument of type xudrpc.SubscribeOrdersRequest'); @@ -1212,6 +1234,18 @@ var XudService = exports.XudService = { responseSerialize: serialize_xudrpc_ShutdownResponse, responseDeserialize: deserialize_xudrpc_ShutdownResponse, }, + // Subscribes to alerts such as low balance. + subscribeAlerts: { + path: '/xudrpc.Xud/SubscribeAlerts', + requestStream: false, + responseStream: true, + requestType: xudrpc_pb.SubscribeAlertsRequest, + responseType: xudrpc_pb.Alert, + requestSerialize: serialize_xudrpc_SubscribeAlertsRequest, + requestDeserialize: deserialize_xudrpc_SubscribeAlertsRequest, + responseSerialize: serialize_xudrpc_Alert, + responseDeserialize: deserialize_xudrpc_Alert, + }, // Subscribes to orders being added to and removed from the order book. This call allows the client // to maintain an up-to-date view of the order book. For example, an exchange that wants to show // its users a real time view of the orders available to them would subscribe to this streaming diff --git a/lib/proto/xudrpc_pb.d.ts b/lib/proto/xudrpc_pb.d.ts index bd4afaa62..3999dc547 100644 --- a/lib/proto/xudrpc_pb.d.ts +++ b/lib/proto/xudrpc_pb.d.ts @@ -65,6 +65,53 @@ export namespace AddPairResponse { } } +export class Alert extends jspb.Message { + getType(): Alert.AlertType; + setType(value: Alert.AlertType): void; + + getMessage(): string; + setMessage(value: string): void; + + + hasBalanceAlert(): boolean; + clearBalanceAlert(): void; + getBalanceAlert(): BalanceAlert | undefined; + setBalanceAlert(value?: BalanceAlert): void; + + + getPayloadCase(): Alert.PayloadCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Alert.AsObject; + static toObject(includeInstance: boolean, msg: Alert): Alert.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Alert, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Alert; + static deserializeBinaryFromReader(message: Alert, reader: jspb.BinaryReader): Alert; +} + +export namespace Alert { + export type AsObject = { + type: Alert.AlertType, + message: string, + balanceAlert?: BalanceAlert.AsObject, + } + + export enum AlertType { + LOW_TRADING_BALANCE = 0, + } + + + export enum PayloadCase { + PAYLOAD_NOT_SET = 0, + + BALANCE_ALERT = 3, + + } + +} + export class Balance extends jspb.Message { getTotalBalance(): number; setTotalBalance(value: number): void; @@ -106,6 +153,49 @@ export namespace Balance { } } +export class BalanceAlert extends jspb.Message { + getTotalBalance(): number; + setTotalBalance(value: number): void; + + getSide(): BalanceAlert.Side; + setSide(value: BalanceAlert.Side): void; + + getBound(): number; + setBound(value: number): void; + + getSideBalance(): number; + setSideBalance(value: number): void; + + getCurrency(): string; + setCurrency(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BalanceAlert.AsObject; + static toObject(includeInstance: boolean, msg: BalanceAlert): BalanceAlert.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BalanceAlert, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BalanceAlert; + static deserializeBinaryFromReader(message: BalanceAlert, reader: jspb.BinaryReader): BalanceAlert; +} + +export namespace BalanceAlert { + export type AsObject = { + totalBalance: number, + side: BalanceAlert.Side, + bound: number, + sideBalance: number, + currency: string, + } + + export enum Side { + REMOTE = 0, + LOCAL = 1, + } + +} + export class BanRequest extends jspb.Message { getNodeIdentifier(): string; setNodeIdentifier(value: string): void; @@ -1861,6 +1951,23 @@ export namespace SubscribeOrdersRequest { } } +export class SubscribeAlertsRequest extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SubscribeAlertsRequest.AsObject; + static toObject(includeInstance: boolean, msg: SubscribeAlertsRequest): SubscribeAlertsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SubscribeAlertsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SubscribeAlertsRequest; + static deserializeBinaryFromReader(message: SubscribeAlertsRequest, reader: jspb.BinaryReader): SubscribeAlertsRequest; +} + +export namespace SubscribeAlertsRequest { + export type AsObject = { + } +} + export class SubscribeSwapsAcceptedRequest extends jspb.Message { serializeBinary(): Uint8Array; diff --git a/lib/proto/xudrpc_pb.js b/lib/proto/xudrpc_pb.js index fd01ace0c..c190e4abc 100644 --- a/lib/proto/xudrpc_pb.js +++ b/lib/proto/xudrpc_pb.js @@ -16,7 +16,11 @@ goog.object.extend(proto, annotations_pb); goog.exportSymbol('proto.xudrpc.AddCurrencyResponse', null, global); goog.exportSymbol('proto.xudrpc.AddPairRequest', null, global); goog.exportSymbol('proto.xudrpc.AddPairResponse', null, global); +goog.exportSymbol('proto.xudrpc.Alert', null, global); +goog.exportSymbol('proto.xudrpc.Alert.AlertType', null, global); goog.exportSymbol('proto.xudrpc.Balance', null, global); +goog.exportSymbol('proto.xudrpc.BalanceAlert', null, global); +goog.exportSymbol('proto.xudrpc.BalanceAlert.Side', null, global); goog.exportSymbol('proto.xudrpc.BanRequest', null, global); goog.exportSymbol('proto.xudrpc.BanResponse', null, global); goog.exportSymbol('proto.xudrpc.Chain', null, global); @@ -84,6 +88,7 @@ goog.exportSymbol('proto.xudrpc.SetLogLevelRequest', null, global); goog.exportSymbol('proto.xudrpc.SetLogLevelResponse', null, global); goog.exportSymbol('proto.xudrpc.ShutdownRequest', null, global); goog.exportSymbol('proto.xudrpc.ShutdownResponse', null, global); +goog.exportSymbol('proto.xudrpc.SubscribeAlertsRequest', null, global); goog.exportSymbol('proto.xudrpc.SubscribeOrdersRequest', null, global); goog.exportSymbol('proto.xudrpc.SubscribeSwapsAcceptedRequest', null, global); goog.exportSymbol('proto.xudrpc.SubscribeSwapsRequest', null, global); @@ -504,6 +509,251 @@ proto.xudrpc.AddPairResponse.serializeBinaryToWriter = function(message, writer) +/** + * 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.xudrpc.Alert = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.xudrpc.Alert.oneofGroups_); +}; +goog.inherits(proto.xudrpc.Alert, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.xudrpc.Alert.displayName = 'proto.xudrpc.Alert'; +} +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.xudrpc.Alert.oneofGroups_ = [[3]]; + +/** + * @enum {number} + */ +proto.xudrpc.Alert.PayloadCase = { + PAYLOAD_NOT_SET: 0, + BALANCE_ALERT: 3 +}; + +/** + * @return {proto.xudrpc.Alert.PayloadCase} + */ +proto.xudrpc.Alert.prototype.getPayloadCase = function() { + return /** @type {proto.xudrpc.Alert.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.xudrpc.Alert.oneofGroups_[0])); +}; + + + +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.xudrpc.Alert.prototype.toObject = function(opt_includeInstance) { + return proto.xudrpc.Alert.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.xudrpc.Alert} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.xudrpc.Alert.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + message: jspb.Message.getFieldWithDefault(msg, 2, ""), + balanceAlert: (f = msg.getBalanceAlert()) && proto.xudrpc.BalanceAlert.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.xudrpc.Alert} + */ +proto.xudrpc.Alert.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.xudrpc.Alert; + return proto.xudrpc.Alert.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.xudrpc.Alert} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.xudrpc.Alert} + */ +proto.xudrpc.Alert.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.xudrpc.Alert.AlertType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 3: + var value = new proto.xudrpc.BalanceAlert; + reader.readMessage(value,proto.xudrpc.BalanceAlert.deserializeBinaryFromReader); + msg.setBalanceAlert(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.xudrpc.Alert.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.xudrpc.Alert.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.xudrpc.Alert} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.xudrpc.Alert.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getBalanceAlert(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.xudrpc.BalanceAlert.serializeBinaryToWriter + ); + } +}; + + +/** + * @enum {number} + */ +proto.xudrpc.Alert.AlertType = { + LOW_TRADING_BALANCE: 0 +}; + +/** + * optional AlertType type = 1; + * @return {!proto.xudrpc.Alert.AlertType} + */ +proto.xudrpc.Alert.prototype.getType = function() { + return /** @type {!proto.xudrpc.Alert.AlertType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.xudrpc.Alert.AlertType} value */ +proto.xudrpc.Alert.prototype.setType = function(value) { + jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.xudrpc.Alert.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.xudrpc.Alert.prototype.setMessage = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional BalanceAlert balance_alert = 3; + * @return {?proto.xudrpc.BalanceAlert} + */ +proto.xudrpc.Alert.prototype.getBalanceAlert = function() { + return /** @type{?proto.xudrpc.BalanceAlert} */ ( + jspb.Message.getWrapperField(this, proto.xudrpc.BalanceAlert, 3)); +}; + + +/** @param {?proto.xudrpc.BalanceAlert|undefined} value */ +proto.xudrpc.Alert.prototype.setBalanceAlert = function(value) { + jspb.Message.setOneofWrapperField(this, 3, proto.xudrpc.Alert.oneofGroups_[0], value); +}; + + +proto.xudrpc.Alert.prototype.clearBalanceAlert = function() { + this.setBalanceAlert(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.xudrpc.Alert.prototype.hasBalanceAlert = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -781,6 +1031,264 @@ proto.xudrpc.Balance.prototype.setUnconfirmedWalletBalance = 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.xudrpc.BalanceAlert = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.xudrpc.BalanceAlert, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.xudrpc.BalanceAlert.displayName = 'proto.xudrpc.BalanceAlert'; +} + + +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.xudrpc.BalanceAlert.prototype.toObject = function(opt_includeInstance) { + return proto.xudrpc.BalanceAlert.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.xudrpc.BalanceAlert} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.xudrpc.BalanceAlert.toObject = function(includeInstance, msg) { + var f, obj = { + totalBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), + side: jspb.Message.getFieldWithDefault(msg, 2, 0), + bound: jspb.Message.getFieldWithDefault(msg, 3, 0), + sideBalance: jspb.Message.getFieldWithDefault(msg, 4, 0), + currency: 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.xudrpc.BalanceAlert} + */ +proto.xudrpc.BalanceAlert.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.xudrpc.BalanceAlert; + return proto.xudrpc.BalanceAlert.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.xudrpc.BalanceAlert} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.xudrpc.BalanceAlert} + */ +proto.xudrpc.BalanceAlert.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotalBalance(value); + break; + case 2: + var value = /** @type {!proto.xudrpc.BalanceAlert.Side} */ (reader.readEnum()); + msg.setSide(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBound(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSideBalance(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setCurrency(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.xudrpc.BalanceAlert.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.xudrpc.BalanceAlert.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.xudrpc.BalanceAlert} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.xudrpc.BalanceAlert.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotalBalance(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getSide(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getBound(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getSideBalance(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getCurrency(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.xudrpc.BalanceAlert.Side = { + REMOTE: 0, + LOCAL: 1 +}; + +/** + * optional uint64 total_balance = 1; + * @return {number} + */ +proto.xudrpc.BalanceAlert.prototype.getTotalBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.xudrpc.BalanceAlert.prototype.setTotalBalance = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional Side side = 2; + * @return {!proto.xudrpc.BalanceAlert.Side} + */ +proto.xudrpc.BalanceAlert.prototype.getSide = function() { + return /** @type {!proto.xudrpc.BalanceAlert.Side} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {!proto.xudrpc.BalanceAlert.Side} value */ +proto.xudrpc.BalanceAlert.prototype.setSide = function(value) { + jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional uint32 bound = 3; + * @return {number} + */ +proto.xudrpc.BalanceAlert.prototype.getBound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.xudrpc.BalanceAlert.prototype.setBound = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 side_balance = 4; + * @return {number} + */ +proto.xudrpc.BalanceAlert.prototype.getSideBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.xudrpc.BalanceAlert.prototype.setSideBalance = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string currency = 5; + * @return {string} + */ +proto.xudrpc.BalanceAlert.prototype.getCurrency = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** @param {string} value */ +proto.xudrpc.BalanceAlert.prototype.setCurrency = function(value) { + jspb.Message.setProto3StringField(this, 5, value); +}; + + + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -12537,6 +13045,122 @@ proto.xudrpc.SubscribeOrdersRequest.prototype.setExisting = 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.xudrpc.SubscribeAlertsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.xudrpc.SubscribeAlertsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.xudrpc.SubscribeAlertsRequest.displayName = 'proto.xudrpc.SubscribeAlertsRequest'; +} + + +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.xudrpc.SubscribeAlertsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.xudrpc.SubscribeAlertsRequest.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.xudrpc.SubscribeAlertsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.xudrpc.SubscribeAlertsRequest.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.xudrpc.SubscribeAlertsRequest} + */ +proto.xudrpc.SubscribeAlertsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.xudrpc.SubscribeAlertsRequest; + return proto.xudrpc.SubscribeAlertsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.xudrpc.SubscribeAlertsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.xudrpc.SubscribeAlertsRequest} + */ +proto.xudrpc.SubscribeAlertsRequest.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.xudrpc.SubscribeAlertsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.xudrpc.SubscribeAlertsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.xudrpc.SubscribeAlertsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.xudrpc.SubscribeAlertsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a diff --git a/lib/service/Service.ts b/lib/service/Service.ts index f9ded99a7..87be0d16b 100644 --- a/lib/service/Service.ts +++ b/lib/service/Service.ts @@ -20,6 +20,7 @@ import commitHash from '../Version'; import errors from './errors'; import { NodeIdentifier, ServiceComponents, ServiceOrder, ServiceOrderSidesArrays, ServicePlaceOrderEvent, ServiceTrade, XudInfo } from './types'; import NodeKey from 'lib/nodekey/NodeKey'; +import Alerts from '../alerts/Alerts'; /** Functions to check argument validity and throw [[INVALID_ARGUMENT]] when invalid. */ const argChecks = { @@ -71,6 +72,7 @@ class Service extends EventEmitter { private swaps: Swaps; private logger: Logger; private nodekey: NodeKey; + private alerts: Alerts; /** Create an instance of available RPC methods and bind all exposed functions. */ constructor(components: ServiceComponents) { @@ -83,6 +85,7 @@ class Service extends EventEmitter { this.swaps = components.swaps; this.logger = components.logger; this.nodekey = components.nodeKey; + this.alerts = components.alerts; this.version = components.version; } @@ -704,6 +707,26 @@ class Service extends EventEmitter { const nodePubKey = isNodePubKey(args.nodeIdentifier) ? args.nodeIdentifier : this.pool.resolveAlias(args.nodeIdentifier); return this.pool.discoverNodes(nodePubKey); } + /* + * Subscribe to alerts. + */ + public subscribeAlerts = (callback: (payload: any) => void, cancelled$: Observable) => { + const observables: Observable[] = []; + observables.push(fromEvent(this.alerts, 'alert')); + + const mergedObservable$ = this.getMergedObservable$(observables, cancelled$); + + mergedObservable$.subscribe({ + next: (alert) => { + callback(alert); + }, + error: this.logger.error, + }); + } + + private getMergedObservable$(observables: Observable[], cancelled$: Observable) { + return merge(...observables).pipe(takeUntil(cancelled$)); + } /* * Subscribe to orders being added to the order book. diff --git a/lib/service/types.ts b/lib/service/types.ts index 816e00865..28c005d87 100644 --- a/lib/service/types.ts +++ b/lib/service/types.ts @@ -8,6 +8,7 @@ import Pool from '../p2p/Pool'; import SwapClientManager from '../swaps/SwapClientManager'; import Swaps from '../swaps/Swaps'; import NodeKey from '../nodekey/NodeKey'; +import Alerts from '../alerts/Alerts'; /** * The components required by the API service layer. @@ -21,6 +22,7 @@ export type ServiceComponents = { swaps: Swaps; logger: Logger; nodeKey: NodeKey; + alerts: Alerts; /** The function to be called to shutdown the parent process */ shutdown: () => void; }; diff --git a/lib/swaps/SwapClient.ts b/lib/swaps/SwapClient.ts index a60b22d37..cf369885b 100644 --- a/lib/swaps/SwapClient.ts +++ b/lib/swaps/SwapClient.ts @@ -1,5 +1,5 @@ import { EventEmitter } from 'events'; -import { SwapClientType } from '../constants/enums'; +import { ChannelSide, SwapClientType } from '../constants/enums'; import Logger from '../Logger'; import { setTimeoutPromise } from '../utils/utils'; import { CloseChannelParams, OpenChannelParams, Route, SwapCapacities, SwapDeal } from './types'; @@ -223,6 +223,29 @@ abstract class SwapClient extends EventEmitter { } } + protected checkLowBalance = (remoteBalance: number, localBalance: number, totalBalance: number, + alertThreshold: number, currency: string, emit: Function) => { + if (97998189 < alertThreshold) { + emit('lowTradingBalance', { + totalBalance, + currency, + side: ChannelSide.Local, + sideBalance: localBalance, + bound: 10, + }); + } + + if (remoteBalance < alertThreshold) { + emit('lowTradingBalance', { + totalBalance, + currency, + side: ChannelSide.Remote, + sideBalance: remoteBalance, + bound: 10, + }); + } + } + private updateCapacityTimerCallback = async () => { if (this.isConnected()) { await this.updateCapacity(); diff --git a/proto/xudrpc.proto b/proto/xudrpc.proto index c53c746c7..312581bf5 100644 --- a/proto/xudrpc.proto +++ b/proto/xudrpc.proto @@ -285,6 +285,13 @@ service Xud { }; } + /* Subscribes to alerts such as low balance. */ + rpc SubscribeAlerts(SubscribeAlertsRequest) returns (stream Alert) { + option (google.api.http) = { + get: "/v1/subscribealerts" + }; + } + /* Subscribes to orders being added to and removed from the order book. This call allows the client * to maintain an up-to-date view of the order book. For example, an exchange that wants to show * its users a real time view of the orders available to them would subscribe to this streaming @@ -392,6 +399,20 @@ message AddPairRequest { } message AddPairResponse {} +message Alert { + // The type of the alert. + enum AlertType { + LOW_TRADING_BALANCE = 0; + } + AlertType type = 1 [json_name = "type"]; + // The human readable alert message. + string message = 2 [json_name = "message"]; + // The structured payload. + oneof payload { + BalanceAlert balance_alert = 3 [json_name = "balance_alert"]; + } +} + message Balance { // Total balance denominated in satoshis. uint64 total_balance = 1 [json_name = "total_balance"]; @@ -407,6 +428,23 @@ message Balance { uint64 unconfirmed_wallet_balance = 6 [json_name = "unconfirmed_wallet_balance"]; } +message BalanceAlert { + // The total balance. + uint64 total_balance = 1 [json_name = "total_balance"]; + // The side of the low balance. + enum Side { + REMOTE = 0; + LOCAL = 1; + } + Side side = 2 [json_name = "side"]; + // The bound of the low balance in percentage. + uint32 bound = 3 [json_name = "bound"]; + // The current side balance. + uint64 side_balance = 4 [json_name = "side_balance"]; + // The currency of the alert. + string currency = 5 [json_name = "currency"]; +} + message BanRequest { // The node pub key or alias of the node to ban. string node_identifier = 1 [json_name = "node_identifier"]; @@ -851,6 +889,9 @@ message SubscribeOrdersRequest { bool existing = 1 [json_name = "existing"]; } +message SubscribeAlertsRequest { +} + message SubscribeSwapsAcceptedRequest { } message SubscribeSwapsRequest { diff --git a/test/integration/Service.spec.ts b/test/integration/Service.spec.ts index 128511dbc..b1d90c7a8 100644 --- a/test/integration/Service.spec.ts +++ b/test/integration/Service.spec.ts @@ -5,6 +5,9 @@ import p2pErrors from '../../lib/p2p/errors'; import Service from '../../lib/service/Service'; import Xud from '../../lib/Xud'; import { getTempDir } from '../utils'; +import { TestScheduler } from 'rxjs/testing'; +import { Observable } from 'rxjs'; +import { BalanceAlert } from '../../lib/alerts/types'; chai.use(chaiAsPromised); @@ -186,4 +189,38 @@ describe('API Service', () => { }); await expect(shutdownPromise).to.be.fulfilled; }); + + let testScheduler: TestScheduler; + + describe('getMergedObservable$', () => { + beforeEach(() => { + testScheduler = new TestScheduler((actual, expected) => { + expect(actual).to.deep.equal(expected); + }); + }); + + it('should continue without cancelled$', async () => { + testScheduler.run(({ cold, expectObservable }) => { + const firstLowBalanceEvent = cold('-a--b---c---') as Observable; + const secondLowBalanceEvent = cold('--a-b|') as Observable; + const cancelled = cold('-') as Observable; + + const lowBalanceObservables: Observable[] = [firstLowBalanceEvent, secondLowBalanceEvent]; + const finalObservable = service['getMergedObservable$'](lowBalanceObservables, cancelled); + expectObservable(finalObservable).toBe('-aa-(bb)c---'); + }); + }); + + it('should cancelled with cancelled$', async () => { + testScheduler.run(({ cold, expectObservable }) => { + const firstLowBalanceEvent = cold('-a--b---c---') as Observable; + const secondLowBalanceEvent = cold('--a-b|') as Observable; + const cancelled = cold('---a') as Observable; + + const lowBalanceObservables: Observable[] = [firstLowBalanceEvent, secondLowBalanceEvent]; + const finalObservable = service['getMergedObservable$'](lowBalanceObservables, cancelled); + expectObservable(finalObservable).toBe('-aa|'); + }); + }); + }); }); diff --git a/test/jest/LndClient.spec.ts b/test/jest/LndClient.spec.ts index c2aee5fa7..a7912e162 100644 --- a/test/jest/LndClient.spec.ts +++ b/test/jest/LndClient.spec.ts @@ -2,7 +2,7 @@ import LndClient from '../../lib/lndclient/LndClient'; import { LndClientConfig } from '../../lib/lndclient/types'; import Logger from '../../lib/Logger'; import { getValidDeal } from '../utils'; -import { SwapRole } from '../../lib/constants/enums'; +import { ChannelSide, SwapRole } from '../../lib/constants/enums'; import { ClientStatus } from '../../lib/swaps/SwapClient'; const openChannelSyncResponse = { @@ -282,4 +282,161 @@ describe('LndClient', () => { expect(lnd['maxChannelInboundAmount']).toEqual(295); }); }); + + describe('checkLowBalance', () => { + test('emits lowTradingBalance on local balance is less than alert threshold of total balance ', async () => { + const emit = jest.fn().mockImplementation(); + const totalBalance = 120; + const localBalance = 10; + const alertThreshold = totalBalance * 0.1; + const remoteBalance = 110; + + const currency = 'BTC'; + lnd['checkLowBalance']( + remoteBalance, + localBalance, + totalBalance, + alertThreshold, + currency, + emit, + ); + + expect(emit).toHaveBeenCalledTimes(1); + expect(emit).toHaveBeenCalledWith('lowTradingBalance', { + totalBalance, + currency, + side: ChannelSide.Local, + sideBalance: localBalance, + bound: 10, + }); + }); + test('emits lowBalance on local balance is less than alert threshold of total balance ', async () => { + const emit = jest.fn().mockImplementation(); + const totalBalance = 120; + const localBalance = 10; + const alertThreshold = totalBalance * 0.1; + const remoteBalance = 110; + + const currency = 'BTC'; + lnd['checkLowBalance']( + remoteBalance, + localBalance, + totalBalance, + alertThreshold, + currency, + emit, + ); + + expect(emit).toHaveBeenCalledTimes(1); + expect(emit).toHaveBeenCalledWith('lowTradingBalance', { + totalBalance, + currency, + side: ChannelSide.Local, + sideBalance: localBalance, + bound: 10, + }); + }); + test('dont emit on local balance equals alert threshold of total balance ', async () => { + const emit = jest.fn().mockImplementation(); + const totalBalance = 120; + const localBalance = 12; + const alertThreshold = totalBalance * 0.1; + const remoteBalance = 110; + + const currency = 'BTC'; + lnd['checkLowBalance']( + remoteBalance, + localBalance, + totalBalance, + alertThreshold, + currency, + emit, + ); + + expect(emit).toHaveBeenCalledTimes(0); + }); + test('dont emit on local balance is higher than alert threshold of total balance ', async () => { + const emit = jest.fn().mockImplementation(); + const totalBalance = 120; + const localBalance = 12.5; + const alertThreshold = totalBalance * 0.1; + const remoteBalance = 110; + + const currency = 'BTC'; + lnd['checkLowBalance']( + remoteBalance, + localBalance, + totalBalance, + alertThreshold, + currency, + emit, + ); + + expect(emit).toHaveBeenCalledTimes(0); + }); + test('emits on remote balance is less than alert threshold of total balance ', async () => { + const emit = jest.fn().mockImplementation(); + const totalBalance = 120; + const localBalance = 110; + const alertThreshold = totalBalance * 0.1; + const remoteBalance = 10; + + const currency = 'BTC'; + lnd['checkLowBalance']( + remoteBalance, + localBalance, + totalBalance, + alertThreshold, + currency, + emit, + ); + + expect(emit).toHaveBeenCalledTimes(1); + expect(emit).toHaveBeenCalledWith('lowTradingBalance', { + totalBalance, + currency, + side: ChannelSide.Remote, + sideBalance: remoteBalance, + bound: 10, + }); + }); + test('dont emit on remote balance equals alert threshold of total balance ', async () => { + const emit = jest.fn().mockImplementation(); + const totalBalance = 120; + const localBalance = 110; + const alertThreshold = totalBalance * 0.1; + const remoteBalance = 12; + + const currency = 'BTC'; + lnd['checkLowBalance']( + remoteBalance, + localBalance, + totalBalance, + alertThreshold, + currency, + emit, + ); + + expect(emit).toHaveBeenCalledTimes(0); + }); + test('dont emit on remote balance is higher than alert threshold of total balance ', async () => { + const emit = jest.fn().mockImplementation(); + const totalBalance = 120; + const localBalance = 110; + const alertThreshold = totalBalance * 0.1; + const remoteBalance = 12.5; + + const currency = 'BTC'; + lnd['checkLowBalance']( + remoteBalance, + localBalance, + totalBalance, + alertThreshold, + currency, + emit, + ); + + expect(emit).toHaveBeenCalledTimes(0); + }); + }); }); diff --git a/test/simulation/xudrpc/xudrpc.pb.go b/test/simulation/xudrpc/xudrpc.pb.go index 2c4caacab..8846dfc34 100644 --- a/test/simulation/xudrpc/xudrpc.pb.go +++ b/test/simulation/xudrpc/xudrpc.pb.go @@ -119,6 +119,55 @@ func (LogLevel) EnumDescriptor() ([]byte, []int) { return fileDescriptor_6960a02cc0a63cf6, []int{2} } +// The type of the alert. +type Alert_AlertType int32 + +const ( + Alert_LOW_TRADING_BALANCE Alert_AlertType = 0 +) + +var Alert_AlertType_name = map[int32]string{ + 0: "LOW_TRADING_BALANCE", +} + +var Alert_AlertType_value = map[string]int32{ + "LOW_TRADING_BALANCE": 0, +} + +func (x Alert_AlertType) String() string { + return proto.EnumName(Alert_AlertType_name, int32(x)) +} + +func (Alert_AlertType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_6960a02cc0a63cf6, []int{3, 0} +} + +// The side of the low balance. +type BalanceAlert_Side int32 + +const ( + BalanceAlert_REMOTE BalanceAlert_Side = 0 + BalanceAlert_LOCAL BalanceAlert_Side = 1 +) + +var BalanceAlert_Side_name = map[int32]string{ + 0: "REMOTE", + 1: "LOCAL", +} + +var BalanceAlert_Side_value = map[string]int32{ + "REMOTE": 0, + "LOCAL": 1, +} + +func (x BalanceAlert_Side) String() string { + return proto.EnumName(BalanceAlert_Side_name, int32(x)) +} + +func (BalanceAlert_Side) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_6960a02cc0a63cf6, []int{5, 0} +} + type Currency_SwapClient int32 const ( @@ -141,7 +190,7 @@ func (x Currency_SwapClient) String() string { } func (Currency_SwapClient) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{16, 0} + return fileDescriptor_6960a02cc0a63cf6, []int{18, 0} } type ListOrdersRequest_Owner int32 @@ -169,7 +218,7 @@ func (x ListOrdersRequest_Owner) String() string { } func (ListOrdersRequest_Owner) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{32, 0} + return fileDescriptor_6960a02cc0a63cf6, []int{34, 0} } type AddCurrencyResponse struct { @@ -283,6 +332,90 @@ func (m *AddPairResponse) XXX_DiscardUnknown() { var xxx_messageInfo_AddPairResponse proto.InternalMessageInfo +type Alert struct { + Type Alert_AlertType `protobuf:"varint,1,opt,name=type,proto3,enum=xudrpc.Alert_AlertType" json:"type,omitempty"` + // The human readable alert message. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + // The structured payload. + // + // Types that are valid to be assigned to Payload: + // *Alert_BalanceAlert + Payload isAlert_Payload `protobuf_oneof:"payload"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Alert) Reset() { *m = Alert{} } +func (m *Alert) String() string { return proto.CompactTextString(m) } +func (*Alert) ProtoMessage() {} +func (*Alert) Descriptor() ([]byte, []int) { + return fileDescriptor_6960a02cc0a63cf6, []int{3} +} + +func (m *Alert) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Alert.Unmarshal(m, b) +} +func (m *Alert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Alert.Marshal(b, m, deterministic) +} +func (m *Alert) XXX_Merge(src proto.Message) { + xxx_messageInfo_Alert.Merge(m, src) +} +func (m *Alert) XXX_Size() int { + return xxx_messageInfo_Alert.Size(m) +} +func (m *Alert) XXX_DiscardUnknown() { + xxx_messageInfo_Alert.DiscardUnknown(m) +} + +var xxx_messageInfo_Alert proto.InternalMessageInfo + +func (m *Alert) GetType() Alert_AlertType { + if m != nil { + return m.Type + } + return Alert_LOW_TRADING_BALANCE +} + +func (m *Alert) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +type isAlert_Payload interface { + isAlert_Payload() +} + +type Alert_BalanceAlert struct { + BalanceAlert *BalanceAlert `protobuf:"bytes,3,opt,name=balance_alert,proto3,oneof"` +} + +func (*Alert_BalanceAlert) isAlert_Payload() {} + +func (m *Alert) GetPayload() isAlert_Payload { + if m != nil { + return m.Payload + } + return nil +} + +func (m *Alert) GetBalanceAlert() *BalanceAlert { + if x, ok := m.GetPayload().(*Alert_BalanceAlert); ok { + return x.BalanceAlert + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Alert) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Alert_BalanceAlert)(nil), + } +} + type Balance struct { // Total balance denominated in satoshis. TotalBalance uint64 `protobuf:"varint,1,opt,name=total_balance,proto3" json:"total_balance,omitempty"` @@ -305,7 +438,7 @@ func (m *Balance) Reset() { *m = Balance{} } func (m *Balance) String() string { return proto.CompactTextString(m) } func (*Balance) ProtoMessage() {} func (*Balance) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{3} + return fileDescriptor_6960a02cc0a63cf6, []int{4} } func (m *Balance) XXX_Unmarshal(b []byte) error { @@ -368,6 +501,81 @@ func (m *Balance) GetUnconfirmedWalletBalance() uint64 { return 0 } +type BalanceAlert struct { + // The total balance. + TotalBalance uint64 `protobuf:"varint,1,opt,name=total_balance,proto3" json:"total_balance,omitempty"` + Side BalanceAlert_Side `protobuf:"varint,2,opt,name=side,proto3,enum=xudrpc.BalanceAlert_Side" json:"side,omitempty"` + // The bound of the low balance in percentage. + Bound uint32 `protobuf:"varint,3,opt,name=bound,proto3" json:"bound,omitempty"` + // The current side balance. + SideBalance uint64 `protobuf:"varint,4,opt,name=side_balance,proto3" json:"side_balance,omitempty"` + // The currency of the alert. + Currency string `protobuf:"bytes,5,opt,name=currency,proto3" json:"currency,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BalanceAlert) Reset() { *m = BalanceAlert{} } +func (m *BalanceAlert) String() string { return proto.CompactTextString(m) } +func (*BalanceAlert) ProtoMessage() {} +func (*BalanceAlert) Descriptor() ([]byte, []int) { + return fileDescriptor_6960a02cc0a63cf6, []int{5} +} + +func (m *BalanceAlert) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BalanceAlert.Unmarshal(m, b) +} +func (m *BalanceAlert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BalanceAlert.Marshal(b, m, deterministic) +} +func (m *BalanceAlert) XXX_Merge(src proto.Message) { + xxx_messageInfo_BalanceAlert.Merge(m, src) +} +func (m *BalanceAlert) XXX_Size() int { + return xxx_messageInfo_BalanceAlert.Size(m) +} +func (m *BalanceAlert) XXX_DiscardUnknown() { + xxx_messageInfo_BalanceAlert.DiscardUnknown(m) +} + +var xxx_messageInfo_BalanceAlert proto.InternalMessageInfo + +func (m *BalanceAlert) GetTotalBalance() uint64 { + if m != nil { + return m.TotalBalance + } + return 0 +} + +func (m *BalanceAlert) GetSide() BalanceAlert_Side { + if m != nil { + return m.Side + } + return BalanceAlert_REMOTE +} + +func (m *BalanceAlert) GetBound() uint32 { + if m != nil { + return m.Bound + } + return 0 +} + +func (m *BalanceAlert) GetSideBalance() uint64 { + if m != nil { + return m.SideBalance + } + return 0 +} + +func (m *BalanceAlert) GetCurrency() string { + if m != nil { + return m.Currency + } + return "" +} + type BanRequest struct { // The node pub key or alias of the node to ban. NodeIdentifier string `protobuf:"bytes,1,opt,name=node_identifier,proto3" json:"node_identifier,omitempty"` @@ -380,7 +588,7 @@ func (m *BanRequest) Reset() { *m = BanRequest{} } func (m *BanRequest) String() string { return proto.CompactTextString(m) } func (*BanRequest) ProtoMessage() {} func (*BanRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{4} + return fileDescriptor_6960a02cc0a63cf6, []int{6} } func (m *BanRequest) XXX_Unmarshal(b []byte) error { @@ -418,7 +626,7 @@ func (m *BanResponse) Reset() { *m = BanResponse{} } func (m *BanResponse) String() string { return proto.CompactTextString(m) } func (*BanResponse) ProtoMessage() {} func (*BanResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{5} + return fileDescriptor_6960a02cc0a63cf6, []int{7} } func (m *BanResponse) XXX_Unmarshal(b []byte) error { @@ -453,7 +661,7 @@ func (m *Chain) Reset() { *m = Chain{} } func (m *Chain) String() string { return proto.CompactTextString(m) } func (*Chain) ProtoMessage() {} func (*Chain) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{6} + return fileDescriptor_6960a02cc0a63cf6, []int{8} } func (m *Chain) XXX_Unmarshal(b []byte) error { @@ -506,7 +714,7 @@ func (m *Channels) Reset() { *m = Channels{} } func (m *Channels) String() string { return proto.CompactTextString(m) } func (*Channels) ProtoMessage() {} func (*Channels) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{7} + return fileDescriptor_6960a02cc0a63cf6, []int{9} } func (m *Channels) XXX_Unmarshal(b []byte) error { @@ -567,7 +775,7 @@ func (m *ChangePasswordRequest) Reset() { *m = ChangePasswordRequest{} } func (m *ChangePasswordRequest) String() string { return proto.CompactTextString(m) } func (*ChangePasswordRequest) ProtoMessage() {} func (*ChangePasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{8} + return fileDescriptor_6960a02cc0a63cf6, []int{10} } func (m *ChangePasswordRequest) XXX_Unmarshal(b []byte) error { @@ -612,7 +820,7 @@ func (m *ChangePasswordResponse) Reset() { *m = ChangePasswordResponse{} func (m *ChangePasswordResponse) String() string { return proto.CompactTextString(m) } func (*ChangePasswordResponse) ProtoMessage() {} func (*ChangePasswordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{9} + return fileDescriptor_6960a02cc0a63cf6, []int{11} } func (m *ChangePasswordResponse) XXX_Unmarshal(b []byte) error { @@ -658,7 +866,7 @@ func (m *CloseChannelRequest) Reset() { *m = CloseChannelRequest{} } func (m *CloseChannelRequest) String() string { return proto.CompactTextString(m) } func (*CloseChannelRequest) ProtoMessage() {} func (*CloseChannelRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{10} + return fileDescriptor_6960a02cc0a63cf6, []int{12} } func (m *CloseChannelRequest) XXX_Unmarshal(b []byte) error { @@ -733,7 +941,7 @@ func (m *CloseChannelResponse) Reset() { *m = CloseChannelResponse{} } func (m *CloseChannelResponse) String() string { return proto.CompactTextString(m) } func (*CloseChannelResponse) ProtoMessage() {} func (*CloseChannelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{11} + return fileDescriptor_6960a02cc0a63cf6, []int{13} } func (m *CloseChannelResponse) XXX_Unmarshal(b []byte) error { @@ -773,7 +981,7 @@ func (m *ConnectRequest) Reset() { *m = ConnectRequest{} } func (m *ConnectRequest) String() string { return proto.CompactTextString(m) } func (*ConnectRequest) ProtoMessage() {} func (*ConnectRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{12} + return fileDescriptor_6960a02cc0a63cf6, []int{14} } func (m *ConnectRequest) XXX_Unmarshal(b []byte) error { @@ -811,7 +1019,7 @@ func (m *ConnectResponse) Reset() { *m = ConnectResponse{} } func (m *ConnectResponse) String() string { return proto.CompactTextString(m) } func (*ConnectResponse) ProtoMessage() {} func (*ConnectResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{13} + return fileDescriptor_6960a02cc0a63cf6, []int{15} } func (m *ConnectResponse) XXX_Unmarshal(b []byte) error { @@ -845,7 +1053,7 @@ func (m *CreateNodeRequest) Reset() { *m = CreateNodeRequest{} } func (m *CreateNodeRequest) String() string { return proto.CompactTextString(m) } func (*CreateNodeRequest) ProtoMessage() {} func (*CreateNodeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{14} + return fileDescriptor_6960a02cc0a63cf6, []int{16} } func (m *CreateNodeRequest) XXX_Unmarshal(b []byte) error { @@ -889,7 +1097,7 @@ func (m *CreateNodeResponse) Reset() { *m = CreateNodeResponse{} } func (m *CreateNodeResponse) String() string { return proto.CompactTextString(m) } func (*CreateNodeResponse) ProtoMessage() {} func (*CreateNodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{15} + return fileDescriptor_6960a02cc0a63cf6, []int{17} } func (m *CreateNodeResponse) XXX_Unmarshal(b []byte) error { @@ -953,7 +1161,7 @@ func (m *Currency) Reset() { *m = Currency{} } func (m *Currency) String() string { return proto.CompactTextString(m) } func (*Currency) ProtoMessage() {} func (*Currency) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{16} + return fileDescriptor_6960a02cc0a63cf6, []int{18} } func (m *Currency) XXX_Unmarshal(b []byte) error { @@ -1014,7 +1222,7 @@ func (m *DepositRequest) Reset() { *m = DepositRequest{} } func (m *DepositRequest) String() string { return proto.CompactTextString(m) } func (*DepositRequest) ProtoMessage() {} func (*DepositRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{17} + return fileDescriptor_6960a02cc0a63cf6, []int{19} } func (m *DepositRequest) XXX_Unmarshal(b []byte) error { @@ -1054,7 +1262,7 @@ func (m *DepositResponse) Reset() { *m = DepositResponse{} } func (m *DepositResponse) String() string { return proto.CompactTextString(m) } func (*DepositResponse) ProtoMessage() {} func (*DepositResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{18} + return fileDescriptor_6960a02cc0a63cf6, []int{20} } func (m *DepositResponse) XXX_Unmarshal(b []byte) error { @@ -1094,7 +1302,7 @@ func (m *DiscoverNodesRequest) Reset() { *m = DiscoverNodesRequest{} } func (m *DiscoverNodesRequest) String() string { return proto.CompactTextString(m) } func (*DiscoverNodesRequest) ProtoMessage() {} func (*DiscoverNodesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{19} + return fileDescriptor_6960a02cc0a63cf6, []int{21} } func (m *DiscoverNodesRequest) XXX_Unmarshal(b []byte) error { @@ -1133,7 +1341,7 @@ func (m *DiscoverNodesResponse) Reset() { *m = DiscoverNodesResponse{} } func (m *DiscoverNodesResponse) String() string { return proto.CompactTextString(m) } func (*DiscoverNodesResponse) ProtoMessage() {} func (*DiscoverNodesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{20} + return fileDescriptor_6960a02cc0a63cf6, []int{22} } func (m *DiscoverNodesResponse) XXX_Unmarshal(b []byte) error { @@ -1179,7 +1387,7 @@ func (m *ExecuteSwapRequest) Reset() { *m = ExecuteSwapRequest{} } func (m *ExecuteSwapRequest) String() string { return proto.CompactTextString(m) } func (*ExecuteSwapRequest) ProtoMessage() {} func (*ExecuteSwapRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{21} + return fileDescriptor_6960a02cc0a63cf6, []int{23} } func (m *ExecuteSwapRequest) XXX_Unmarshal(b []byte) error { @@ -1241,7 +1449,7 @@ func (m *GetBalanceRequest) Reset() { *m = GetBalanceRequest{} } func (m *GetBalanceRequest) String() string { return proto.CompactTextString(m) } func (*GetBalanceRequest) ProtoMessage() {} func (*GetBalanceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{22} + return fileDescriptor_6960a02cc0a63cf6, []int{24} } func (m *GetBalanceRequest) XXX_Unmarshal(b []byte) error { @@ -1281,7 +1489,7 @@ func (m *GetBalanceResponse) Reset() { *m = GetBalanceResponse{} } func (m *GetBalanceResponse) String() string { return proto.CompactTextString(m) } func (*GetBalanceResponse) ProtoMessage() {} func (*GetBalanceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{23} + return fileDescriptor_6960a02cc0a63cf6, []int{25} } func (m *GetBalanceResponse) XXX_Unmarshal(b []byte) error { @@ -1319,7 +1527,7 @@ func (m *GetInfoRequest) Reset() { *m = GetInfoRequest{} } func (m *GetInfoRequest) String() string { return proto.CompactTextString(m) } func (*GetInfoRequest) ProtoMessage() {} func (*GetInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{24} + return fileDescriptor_6960a02cc0a63cf6, []int{26} } func (m *GetInfoRequest) XXX_Unmarshal(b []byte) error { @@ -1369,7 +1577,7 @@ func (m *GetInfoResponse) Reset() { *m = GetInfoResponse{} } func (m *GetInfoResponse) String() string { return proto.CompactTextString(m) } func (*GetInfoResponse) ProtoMessage() {} func (*GetInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{25} + return fileDescriptor_6960a02cc0a63cf6, []int{27} } func (m *GetInfoResponse) XXX_Unmarshal(b []byte) error { @@ -1477,7 +1685,7 @@ func (m *GetMnemonicRequest) Reset() { *m = GetMnemonicRequest{} } func (m *GetMnemonicRequest) String() string { return proto.CompactTextString(m) } func (*GetMnemonicRequest) ProtoMessage() {} func (*GetMnemonicRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{26} + return fileDescriptor_6960a02cc0a63cf6, []int{28} } func (m *GetMnemonicRequest) XXX_Unmarshal(b []byte) error { @@ -1509,7 +1717,7 @@ func (m *GetMnemonicResponse) Reset() { *m = GetMnemonicResponse{} } func (m *GetMnemonicResponse) String() string { return proto.CompactTextString(m) } func (*GetMnemonicResponse) ProtoMessage() {} func (*GetMnemonicResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{27} + return fileDescriptor_6960a02cc0a63cf6, []int{29} } func (m *GetMnemonicResponse) XXX_Unmarshal(b []byte) error { @@ -1549,7 +1757,7 @@ func (m *GetNodeInfoRequest) Reset() { *m = GetNodeInfoRequest{} } func (m *GetNodeInfoRequest) String() string { return proto.CompactTextString(m) } func (*GetNodeInfoRequest) ProtoMessage() {} func (*GetNodeInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{28} + return fileDescriptor_6960a02cc0a63cf6, []int{30} } func (m *GetNodeInfoRequest) XXX_Unmarshal(b []byte) error { @@ -1592,7 +1800,7 @@ func (m *GetNodeInfoResponse) Reset() { *m = GetNodeInfoResponse{} } func (m *GetNodeInfoResponse) String() string { return proto.CompactTextString(m) } func (*GetNodeInfoResponse) ProtoMessage() {} func (*GetNodeInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{29} + return fileDescriptor_6960a02cc0a63cf6, []int{31} } func (m *GetNodeInfoResponse) XXX_Unmarshal(b []byte) error { @@ -1637,7 +1845,7 @@ func (m *ListCurrenciesRequest) Reset() { *m = ListCurrenciesRequest{} } func (m *ListCurrenciesRequest) String() string { return proto.CompactTextString(m) } func (*ListCurrenciesRequest) ProtoMessage() {} func (*ListCurrenciesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{30} + return fileDescriptor_6960a02cc0a63cf6, []int{32} } func (m *ListCurrenciesRequest) XXX_Unmarshal(b []byte) error { @@ -1670,7 +1878,7 @@ func (m *ListCurrenciesResponse) Reset() { *m = ListCurrenciesResponse{} func (m *ListCurrenciesResponse) String() string { return proto.CompactTextString(m) } func (*ListCurrenciesResponse) ProtoMessage() {} func (*ListCurrenciesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{31} + return fileDescriptor_6960a02cc0a63cf6, []int{33} } func (m *ListCurrenciesResponse) XXX_Unmarshal(b []byte) error { @@ -1716,7 +1924,7 @@ func (m *ListOrdersRequest) Reset() { *m = ListOrdersRequest{} } func (m *ListOrdersRequest) String() string { return proto.CompactTextString(m) } func (*ListOrdersRequest) ProtoMessage() {} func (*ListOrdersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{32} + return fileDescriptor_6960a02cc0a63cf6, []int{34} } func (m *ListOrdersRequest) XXX_Unmarshal(b []byte) error { @@ -1777,7 +1985,7 @@ func (m *ListOrdersResponse) Reset() { *m = ListOrdersResponse{} } func (m *ListOrdersResponse) String() string { return proto.CompactTextString(m) } func (*ListOrdersResponse) ProtoMessage() {} func (*ListOrdersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{33} + return fileDescriptor_6960a02cc0a63cf6, []int{35} } func (m *ListOrdersResponse) XXX_Unmarshal(b []byte) error { @@ -1815,7 +2023,7 @@ func (m *ListPairsRequest) Reset() { *m = ListPairsRequest{} } func (m *ListPairsRequest) String() string { return proto.CompactTextString(m) } func (*ListPairsRequest) ProtoMessage() {} func (*ListPairsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{34} + return fileDescriptor_6960a02cc0a63cf6, []int{36} } func (m *ListPairsRequest) XXX_Unmarshal(b []byte) error { @@ -1848,7 +2056,7 @@ func (m *ListPairsResponse) Reset() { *m = ListPairsResponse{} } func (m *ListPairsResponse) String() string { return proto.CompactTextString(m) } func (*ListPairsResponse) ProtoMessage() {} func (*ListPairsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{35} + return fileDescriptor_6960a02cc0a63cf6, []int{37} } func (m *ListPairsResponse) XXX_Unmarshal(b []byte) error { @@ -1886,7 +2094,7 @@ func (m *ListPeersRequest) Reset() { *m = ListPeersRequest{} } func (m *ListPeersRequest) String() string { return proto.CompactTextString(m) } func (*ListPeersRequest) ProtoMessage() {} func (*ListPeersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{36} + return fileDescriptor_6960a02cc0a63cf6, []int{38} } func (m *ListPeersRequest) XXX_Unmarshal(b []byte) error { @@ -1919,7 +2127,7 @@ func (m *ListPeersResponse) Reset() { *m = ListPeersResponse{} } func (m *ListPeersResponse) String() string { return proto.CompactTextString(m) } func (*ListPeersResponse) ProtoMessage() {} func (*ListPeersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{37} + return fileDescriptor_6960a02cc0a63cf6, []int{39} } func (m *ListPeersResponse) XXX_Unmarshal(b []byte) error { @@ -1964,7 +2172,7 @@ func (m *LndInfo) Reset() { *m = LndInfo{} } func (m *LndInfo) String() string { return proto.CompactTextString(m) } func (*LndInfo) ProtoMessage() {} func (*LndInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{38} + return fileDescriptor_6960a02cc0a63cf6, []int{40} } func (m *LndInfo) XXX_Unmarshal(b []byte) error { @@ -2048,7 +2256,7 @@ func (m *NodeIdentifier) Reset() { *m = NodeIdentifier{} } func (m *NodeIdentifier) String() string { return proto.CompactTextString(m) } func (*NodeIdentifier) ProtoMessage() {} func (*NodeIdentifier) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{39} + return fileDescriptor_6960a02cc0a63cf6, []int{41} } func (m *NodeIdentifier) XXX_Unmarshal(b []byte) error { @@ -2103,7 +2311,7 @@ func (m *OpenChannelRequest) Reset() { *m = OpenChannelRequest{} } func (m *OpenChannelRequest) String() string { return proto.CompactTextString(m) } func (*OpenChannelRequest) ProtoMessage() {} func (*OpenChannelRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{40} + return fileDescriptor_6960a02cc0a63cf6, []int{42} } func (m *OpenChannelRequest) XXX_Unmarshal(b []byte) error { @@ -2171,7 +2379,7 @@ func (m *OpenChannelResponse) Reset() { *m = OpenChannelResponse{} } func (m *OpenChannelResponse) String() string { return proto.CompactTextString(m) } func (*OpenChannelResponse) ProtoMessage() {} func (*OpenChannelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{41} + return fileDescriptor_6960a02cc0a63cf6, []int{43} } func (m *OpenChannelResponse) XXX_Unmarshal(b []byte) error { @@ -2229,7 +2437,7 @@ func (m *Order) Reset() { *m = Order{} } func (m *Order) String() string { return proto.CompactTextString(m) } func (*Order) ProtoMessage() {} func (*Order) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{42} + return fileDescriptor_6960a02cc0a63cf6, []int{44} } func (m *Order) XXX_Unmarshal(b []byte) error { @@ -2340,7 +2548,7 @@ func (m *OrderRemoval) Reset() { *m = OrderRemoval{} } func (m *OrderRemoval) String() string { return proto.CompactTextString(m) } func (*OrderRemoval) ProtoMessage() {} func (*OrderRemoval) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{43} + return fileDescriptor_6960a02cc0a63cf6, []int{45} } func (m *OrderRemoval) XXX_Unmarshal(b []byte) error { @@ -2410,7 +2618,7 @@ func (m *Orders) Reset() { *m = Orders{} } func (m *Orders) String() string { return proto.CompactTextString(m) } func (*Orders) ProtoMessage() {} func (*Orders) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{44} + return fileDescriptor_6960a02cc0a63cf6, []int{46} } func (m *Orders) XXX_Unmarshal(b []byte) error { @@ -2459,7 +2667,7 @@ func (m *OrdersCount) Reset() { *m = OrdersCount{} } func (m *OrdersCount) String() string { return proto.CompactTextString(m) } func (*OrdersCount) ProtoMessage() {} func (*OrdersCount) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{45} + return fileDescriptor_6960a02cc0a63cf6, []int{47} } func (m *OrdersCount) XXX_Unmarshal(b []byte) error { @@ -2508,7 +2716,7 @@ func (m *OrderUpdate) Reset() { *m = OrderUpdate{} } func (m *OrderUpdate) String() string { return proto.CompactTextString(m) } func (*OrderUpdate) ProtoMessage() {} func (*OrderUpdate) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{46} + return fileDescriptor_6960a02cc0a63cf6, []int{48} } func (m *OrderUpdate) XXX_Unmarshal(b []byte) error { @@ -2600,7 +2808,7 @@ func (m *Peer) Reset() { *m = Peer{} } func (m *Peer) String() string { return proto.CompactTextString(m) } func (*Peer) ProtoMessage() {} func (*Peer) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{47} + return fileDescriptor_6960a02cc0a63cf6, []int{49} } func (m *Peer) XXX_Unmarshal(b []byte) error { @@ -2702,7 +2910,7 @@ func (m *PlaceOrderRequest) Reset() { *m = PlaceOrderRequest{} } func (m *PlaceOrderRequest) String() string { return proto.CompactTextString(m) } func (*PlaceOrderRequest) ProtoMessage() {} func (*PlaceOrderRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{48} + return fileDescriptor_6960a02cc0a63cf6, []int{50} } func (m *PlaceOrderRequest) XXX_Unmarshal(b []byte) error { @@ -2790,7 +2998,7 @@ func (m *PlaceOrderResponse) Reset() { *m = PlaceOrderResponse{} } func (m *PlaceOrderResponse) String() string { return proto.CompactTextString(m) } func (*PlaceOrderResponse) ProtoMessage() {} func (*PlaceOrderResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{49} + return fileDescriptor_6960a02cc0a63cf6, []int{51} } func (m *PlaceOrderResponse) XXX_Unmarshal(b []byte) error { @@ -2855,7 +3063,7 @@ func (m *PlaceOrderEvent) Reset() { *m = PlaceOrderEvent{} } func (m *PlaceOrderEvent) String() string { return proto.CompactTextString(m) } func (*PlaceOrderEvent) ProtoMessage() {} func (*PlaceOrderEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{50} + return fileDescriptor_6960a02cc0a63cf6, []int{52} } func (m *PlaceOrderEvent) XXX_Unmarshal(b []byte) error { @@ -2963,7 +3171,7 @@ func (m *ConnextInfo) Reset() { *m = ConnextInfo{} } func (m *ConnextInfo) String() string { return proto.CompactTextString(m) } func (*ConnextInfo) ProtoMessage() {} func (*ConnextInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{51} + return fileDescriptor_6960a02cc0a63cf6, []int{53} } func (m *ConnextInfo) XXX_Unmarshal(b []byte) error { @@ -3024,7 +3232,7 @@ func (m *RemoveCurrencyRequest) Reset() { *m = RemoveCurrencyRequest{} } func (m *RemoveCurrencyRequest) String() string { return proto.CompactTextString(m) } func (*RemoveCurrencyRequest) ProtoMessage() {} func (*RemoveCurrencyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{52} + return fileDescriptor_6960a02cc0a63cf6, []int{54} } func (m *RemoveCurrencyRequest) XXX_Unmarshal(b []byte) error { @@ -3062,7 +3270,7 @@ func (m *RemoveCurrencyResponse) Reset() { *m = RemoveCurrencyResponse{} func (m *RemoveCurrencyResponse) String() string { return proto.CompactTextString(m) } func (*RemoveCurrencyResponse) ProtoMessage() {} func (*RemoveCurrencyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{53} + return fileDescriptor_6960a02cc0a63cf6, []int{55} } func (m *RemoveCurrencyResponse) XXX_Unmarshal(b []byte) error { @@ -3098,7 +3306,7 @@ func (m *RemoveOrderRequest) Reset() { *m = RemoveOrderRequest{} } func (m *RemoveOrderRequest) String() string { return proto.CompactTextString(m) } func (*RemoveOrderRequest) ProtoMessage() {} func (*RemoveOrderRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{54} + return fileDescriptor_6960a02cc0a63cf6, []int{56} } func (m *RemoveOrderRequest) XXX_Unmarshal(b []byte) error { @@ -3152,7 +3360,7 @@ func (m *RemoveOrderResponse) Reset() { *m = RemoveOrderResponse{} } func (m *RemoveOrderResponse) String() string { return proto.CompactTextString(m) } func (*RemoveOrderResponse) ProtoMessage() {} func (*RemoveOrderResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{55} + return fileDescriptor_6960a02cc0a63cf6, []int{57} } func (m *RemoveOrderResponse) XXX_Unmarshal(b []byte) error { @@ -3211,7 +3419,7 @@ func (m *RemoveAllOrdersRequest) Reset() { *m = RemoveAllOrdersRequest{} func (m *RemoveAllOrdersRequest) String() string { return proto.CompactTextString(m) } func (*RemoveAllOrdersRequest) ProtoMessage() {} func (*RemoveAllOrdersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{56} + return fileDescriptor_6960a02cc0a63cf6, []int{58} } func (m *RemoveAllOrdersRequest) XXX_Unmarshal(b []byte) error { @@ -3246,7 +3454,7 @@ func (m *RemoveAllOrdersResponse) Reset() { *m = RemoveAllOrdersResponse func (m *RemoveAllOrdersResponse) String() string { return proto.CompactTextString(m) } func (*RemoveAllOrdersResponse) ProtoMessage() {} func (*RemoveAllOrdersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{57} + return fileDescriptor_6960a02cc0a63cf6, []int{59} } func (m *RemoveAllOrdersResponse) XXX_Unmarshal(b []byte) error { @@ -3293,7 +3501,7 @@ func (m *RemovePairRequest) Reset() { *m = RemovePairRequest{} } func (m *RemovePairRequest) String() string { return proto.CompactTextString(m) } func (*RemovePairRequest) ProtoMessage() {} func (*RemovePairRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{58} + return fileDescriptor_6960a02cc0a63cf6, []int{60} } func (m *RemovePairRequest) XXX_Unmarshal(b []byte) error { @@ -3331,7 +3539,7 @@ func (m *RemovePairResponse) Reset() { *m = RemovePairResponse{} } func (m *RemovePairResponse) String() string { return proto.CompactTextString(m) } func (*RemovePairResponse) ProtoMessage() {} func (*RemovePairResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{59} + return fileDescriptor_6960a02cc0a63cf6, []int{61} } func (m *RemovePairResponse) XXX_Unmarshal(b []byte) error { @@ -3371,7 +3579,7 @@ func (m *RestoreNodeRequest) Reset() { *m = RestoreNodeRequest{} } func (m *RestoreNodeRequest) String() string { return proto.CompactTextString(m) } func (*RestoreNodeRequest) ProtoMessage() {} func (*RestoreNodeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{60} + return fileDescriptor_6960a02cc0a63cf6, []int{62} } func (m *RestoreNodeRequest) XXX_Unmarshal(b []byte) error { @@ -3434,7 +3642,7 @@ func (m *RestoreNodeResponse) Reset() { *m = RestoreNodeResponse{} } func (m *RestoreNodeResponse) String() string { return proto.CompactTextString(m) } func (*RestoreNodeResponse) ProtoMessage() {} func (*RestoreNodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{61} + return fileDescriptor_6960a02cc0a63cf6, []int{63} } func (m *RestoreNodeResponse) XXX_Unmarshal(b []byte) error { @@ -3480,7 +3688,7 @@ func (m *SetLogLevelRequest) Reset() { *m = SetLogLevelRequest{} } func (m *SetLogLevelRequest) String() string { return proto.CompactTextString(m) } func (*SetLogLevelRequest) ProtoMessage() {} func (*SetLogLevelRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{62} + return fileDescriptor_6960a02cc0a63cf6, []int{64} } func (m *SetLogLevelRequest) XXX_Unmarshal(b []byte) error { @@ -3518,7 +3726,7 @@ func (m *SetLogLevelResponse) Reset() { *m = SetLogLevelResponse{} } func (m *SetLogLevelResponse) String() string { return proto.CompactTextString(m) } func (*SetLogLevelResponse) ProtoMessage() {} func (*SetLogLevelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{63} + return fileDescriptor_6960a02cc0a63cf6, []int{65} } func (m *SetLogLevelResponse) XXX_Unmarshal(b []byte) error { @@ -3549,7 +3757,7 @@ func (m *ShutdownRequest) Reset() { *m = ShutdownRequest{} } func (m *ShutdownRequest) String() string { return proto.CompactTextString(m) } func (*ShutdownRequest) ProtoMessage() {} func (*ShutdownRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{64} + return fileDescriptor_6960a02cc0a63cf6, []int{66} } func (m *ShutdownRequest) XXX_Unmarshal(b []byte) error { @@ -3580,7 +3788,7 @@ func (m *ShutdownResponse) Reset() { *m = ShutdownResponse{} } func (m *ShutdownResponse) String() string { return proto.CompactTextString(m) } func (*ShutdownResponse) ProtoMessage() {} func (*ShutdownResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{65} + return fileDescriptor_6960a02cc0a63cf6, []int{67} } func (m *ShutdownResponse) XXX_Unmarshal(b []byte) error { @@ -3613,7 +3821,7 @@ func (m *SubscribeOrdersRequest) Reset() { *m = SubscribeOrdersRequest{} func (m *SubscribeOrdersRequest) String() string { return proto.CompactTextString(m) } func (*SubscribeOrdersRequest) ProtoMessage() {} func (*SubscribeOrdersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{66} + return fileDescriptor_6960a02cc0a63cf6, []int{68} } func (m *SubscribeOrdersRequest) XXX_Unmarshal(b []byte) error { @@ -3641,6 +3849,37 @@ func (m *SubscribeOrdersRequest) GetExisting() bool { return false } +type SubscribeAlertsRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SubscribeAlertsRequest) Reset() { *m = SubscribeAlertsRequest{} } +func (m *SubscribeAlertsRequest) String() string { return proto.CompactTextString(m) } +func (*SubscribeAlertsRequest) ProtoMessage() {} +func (*SubscribeAlertsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_6960a02cc0a63cf6, []int{69} +} + +func (m *SubscribeAlertsRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SubscribeAlertsRequest.Unmarshal(m, b) +} +func (m *SubscribeAlertsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SubscribeAlertsRequest.Marshal(b, m, deterministic) +} +func (m *SubscribeAlertsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubscribeAlertsRequest.Merge(m, src) +} +func (m *SubscribeAlertsRequest) XXX_Size() int { + return xxx_messageInfo_SubscribeAlertsRequest.Size(m) +} +func (m *SubscribeAlertsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SubscribeAlertsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SubscribeAlertsRequest proto.InternalMessageInfo + type SubscribeSwapsAcceptedRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -3651,7 +3890,7 @@ func (m *SubscribeSwapsAcceptedRequest) Reset() { *m = SubscribeSwapsAcc func (m *SubscribeSwapsAcceptedRequest) String() string { return proto.CompactTextString(m) } func (*SubscribeSwapsAcceptedRequest) ProtoMessage() {} func (*SubscribeSwapsAcceptedRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{67} + return fileDescriptor_6960a02cc0a63cf6, []int{70} } func (m *SubscribeSwapsAcceptedRequest) XXX_Unmarshal(b []byte) error { @@ -3685,7 +3924,7 @@ func (m *SubscribeSwapsRequest) Reset() { *m = SubscribeSwapsRequest{} } func (m *SubscribeSwapsRequest) String() string { return proto.CompactTextString(m) } func (*SubscribeSwapsRequest) ProtoMessage() {} func (*SubscribeSwapsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{68} + return fileDescriptor_6960a02cc0a63cf6, []int{71} } func (m *SubscribeSwapsRequest) XXX_Unmarshal(b []byte) error { @@ -3745,7 +3984,7 @@ func (m *SwapAccepted) Reset() { *m = SwapAccepted{} } func (m *SwapAccepted) String() string { return proto.CompactTextString(m) } func (*SwapAccepted) ProtoMessage() {} func (*SwapAccepted) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{69} + return fileDescriptor_6960a02cc0a63cf6, []int{72} } func (m *SwapAccepted) XXX_Unmarshal(b []byte) error { @@ -3863,7 +4102,7 @@ func (m *SwapFailure) Reset() { *m = SwapFailure{} } func (m *SwapFailure) String() string { return proto.CompactTextString(m) } func (*SwapFailure) ProtoMessage() {} func (*SwapFailure) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{70} + return fileDescriptor_6960a02cc0a63cf6, []int{73} } func (m *SwapFailure) XXX_Unmarshal(b []byte) error { @@ -3955,7 +4194,7 @@ func (m *SwapSuccess) Reset() { *m = SwapSuccess{} } func (m *SwapSuccess) String() string { return proto.CompactTextString(m) } func (*SwapSuccess) ProtoMessage() {} func (*SwapSuccess) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{71} + return fileDescriptor_6960a02cc0a63cf6, []int{74} } func (m *SwapSuccess) XXX_Unmarshal(b []byte) error { @@ -4099,7 +4338,7 @@ func (m *Trade) Reset() { *m = Trade{} } func (m *Trade) String() string { return proto.CompactTextString(m) } func (*Trade) ProtoMessage() {} func (*Trade) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{72} + return fileDescriptor_6960a02cc0a63cf6, []int{75} } func (m *Trade) XXX_Unmarshal(b []byte) error { @@ -4202,7 +4441,7 @@ func (m *TradeHistoryRequest) Reset() { *m = TradeHistoryRequest{} } func (m *TradeHistoryRequest) String() string { return proto.CompactTextString(m) } func (*TradeHistoryRequest) ProtoMessage() {} func (*TradeHistoryRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{73} + return fileDescriptor_6960a02cc0a63cf6, []int{76} } func (m *TradeHistoryRequest) XXX_Unmarshal(b []byte) error { @@ -4241,7 +4480,7 @@ func (m *TradeHistoryResponse) Reset() { *m = TradeHistoryResponse{} } func (m *TradeHistoryResponse) String() string { return proto.CompactTextString(m) } func (*TradeHistoryResponse) ProtoMessage() {} func (*TradeHistoryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{74} + return fileDescriptor_6960a02cc0a63cf6, []int{77} } func (m *TradeHistoryResponse) XXX_Unmarshal(b []byte) error { @@ -4287,7 +4526,7 @@ func (m *TradingLimits) Reset() { *m = TradingLimits{} } func (m *TradingLimits) String() string { return proto.CompactTextString(m) } func (*TradingLimits) ProtoMessage() {} func (*TradingLimits) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{75} + return fileDescriptor_6960a02cc0a63cf6, []int{78} } func (m *TradingLimits) XXX_Unmarshal(b []byte) error { @@ -4349,7 +4588,7 @@ func (m *TradingLimitsRequest) Reset() { *m = TradingLimitsRequest{} } func (m *TradingLimitsRequest) String() string { return proto.CompactTextString(m) } func (*TradingLimitsRequest) ProtoMessage() {} func (*TradingLimitsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{76} + return fileDescriptor_6960a02cc0a63cf6, []int{79} } func (m *TradingLimitsRequest) XXX_Unmarshal(b []byte) error { @@ -4389,7 +4628,7 @@ func (m *TradingLimitsResponse) Reset() { *m = TradingLimitsResponse{} } func (m *TradingLimitsResponse) String() string { return proto.CompactTextString(m) } func (*TradingLimitsResponse) ProtoMessage() {} func (*TradingLimitsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{77} + return fileDescriptor_6960a02cc0a63cf6, []int{80} } func (m *TradingLimitsResponse) XXX_Unmarshal(b []byte) error { @@ -4431,7 +4670,7 @@ func (m *UnbanRequest) Reset() { *m = UnbanRequest{} } func (m *UnbanRequest) String() string { return proto.CompactTextString(m) } func (*UnbanRequest) ProtoMessage() {} func (*UnbanRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{78} + return fileDescriptor_6960a02cc0a63cf6, []int{81} } func (m *UnbanRequest) XXX_Unmarshal(b []byte) error { @@ -4476,7 +4715,7 @@ func (m *UnbanResponse) Reset() { *m = UnbanResponse{} } func (m *UnbanResponse) String() string { return proto.CompactTextString(m) } func (*UnbanResponse) ProtoMessage() {} func (*UnbanResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{79} + return fileDescriptor_6960a02cc0a63cf6, []int{82} } func (m *UnbanResponse) XXX_Unmarshal(b []byte) error { @@ -4510,7 +4749,7 @@ func (m *UnlockNodeRequest) Reset() { *m = UnlockNodeRequest{} } func (m *UnlockNodeRequest) String() string { return proto.CompactTextString(m) } func (*UnlockNodeRequest) ProtoMessage() {} func (*UnlockNodeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{80} + return fileDescriptor_6960a02cc0a63cf6, []int{83} } func (m *UnlockNodeRequest) XXX_Unmarshal(b []byte) error { @@ -4552,7 +4791,7 @@ func (m *UnlockNodeResponse) Reset() { *m = UnlockNodeResponse{} } func (m *UnlockNodeResponse) String() string { return proto.CompactTextString(m) } func (*UnlockNodeResponse) ProtoMessage() {} func (*UnlockNodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{81} + return fileDescriptor_6960a02cc0a63cf6, []int{84} } func (m *UnlockNodeResponse) XXX_Unmarshal(b []byte) error { @@ -4608,7 +4847,7 @@ func (m *WithdrawRequest) Reset() { *m = WithdrawRequest{} } func (m *WithdrawRequest) String() string { return proto.CompactTextString(m) } func (*WithdrawRequest) ProtoMessage() {} func (*WithdrawRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{82} + return fileDescriptor_6960a02cc0a63cf6, []int{85} } func (m *WithdrawRequest) XXX_Unmarshal(b []byte) error { @@ -4676,7 +4915,7 @@ func (m *WithdrawResponse) Reset() { *m = WithdrawResponse{} } func (m *WithdrawResponse) String() string { return proto.CompactTextString(m) } func (*WithdrawResponse) ProtoMessage() {} func (*WithdrawResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6960a02cc0a63cf6, []int{83} + return fileDescriptor_6960a02cc0a63cf6, []int{86} } func (m *WithdrawResponse) XXX_Unmarshal(b []byte) error { @@ -4708,12 +4947,16 @@ func init() { proto.RegisterEnum("xudrpc.OrderSide", OrderSide_name, OrderSide_value) proto.RegisterEnum("xudrpc.Role", Role_name, Role_value) proto.RegisterEnum("xudrpc.LogLevel", LogLevel_name, LogLevel_value) + proto.RegisterEnum("xudrpc.Alert_AlertType", Alert_AlertType_name, Alert_AlertType_value) + proto.RegisterEnum("xudrpc.BalanceAlert_Side", BalanceAlert_Side_name, BalanceAlert_Side_value) proto.RegisterEnum("xudrpc.Currency_SwapClient", Currency_SwapClient_name, Currency_SwapClient_value) proto.RegisterEnum("xudrpc.ListOrdersRequest_Owner", ListOrdersRequest_Owner_name, ListOrdersRequest_Owner_value) proto.RegisterType((*AddCurrencyResponse)(nil), "xudrpc.AddCurrencyResponse") proto.RegisterType((*AddPairRequest)(nil), "xudrpc.AddPairRequest") proto.RegisterType((*AddPairResponse)(nil), "xudrpc.AddPairResponse") + proto.RegisterType((*Alert)(nil), "xudrpc.Alert") proto.RegisterType((*Balance)(nil), "xudrpc.Balance") + proto.RegisterType((*BalanceAlert)(nil), "xudrpc.BalanceAlert") proto.RegisterType((*BanRequest)(nil), "xudrpc.BanRequest") proto.RegisterType((*BanResponse)(nil), "xudrpc.BanResponse") proto.RegisterType((*Chain)(nil), "xudrpc.Chain") @@ -4782,6 +5025,7 @@ func init() { proto.RegisterType((*ShutdownRequest)(nil), "xudrpc.ShutdownRequest") proto.RegisterType((*ShutdownResponse)(nil), "xudrpc.ShutdownResponse") proto.RegisterType((*SubscribeOrdersRequest)(nil), "xudrpc.SubscribeOrdersRequest") + proto.RegisterType((*SubscribeAlertsRequest)(nil), "xudrpc.SubscribeAlertsRequest") proto.RegisterType((*SubscribeSwapsAcceptedRequest)(nil), "xudrpc.SubscribeSwapsAcceptedRequest") proto.RegisterType((*SubscribeSwapsRequest)(nil), "xudrpc.SubscribeSwapsRequest") proto.RegisterType((*SwapAccepted)(nil), "xudrpc.SwapAccepted") @@ -4805,268 +5049,280 @@ func init() { func init() { proto.RegisterFile("xudrpc.proto", fileDescriptor_6960a02cc0a63cf6) } var fileDescriptor_6960a02cc0a63cf6 = []byte{ - // 4162 bytes of a gzipped FileDescriptorProto + // 4367 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x3b, 0x4d, 0x8f, 0x1c, 0x49, - 0x56, 0x9d, 0xd5, 0x5d, 0xdd, 0xd5, 0xaf, 0x3e, 0x3b, 0xfa, 0xc3, 0xe5, 0x1a, 0xcf, 0x8c, 0x37, - 0x18, 0x8f, 0x3c, 0x9e, 0x59, 0xdb, 0x78, 0x58, 0x66, 0xc7, 0x8b, 0x47, 0xd3, 0xdd, 0xee, 0x1d, - 0x7b, 0xa6, 0xd7, 0xb6, 0xb2, 0xed, 0xb1, 0x59, 0xc1, 0xa6, 0xb2, 0x32, 0xc3, 0xdd, 0x89, 0xb3, - 0x33, 0x6b, 0x32, 0xb3, 0xdc, 0x36, 0x5c, 0xd0, 0x8a, 0x13, 0x1c, 0x38, 0x20, 0xce, 0x70, 0x42, - 0x48, 0x20, 0xae, 0x9c, 0x90, 0x38, 0x73, 0xe5, 0x00, 0x02, 0x2e, 0x48, 0xfc, 0x02, 0xc4, 0x15, - 0x09, 0xbd, 0xf8, 0xc8, 0x88, 0xc8, 0xcc, 0xea, 0xb5, 0x57, 0xc0, 0xad, 0xe2, 0xc5, 0xcb, 0xf7, - 0x22, 0xde, 0x57, 0xbc, 0xf7, 0x22, 0x0a, 0x7a, 0xaf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a1, 0x2d, 0xa2, 0x92, 0xd8, 0x71, 0x4f, 0xad, 0x08, 0xb1, 0x5c, 0x31, - 0x45, 0xff, 0xcd, 0x81, 0x35, 0xe9, 0x5d, 0x68, 0x83, 0x79, 0xe1, 0x17, 0x73, 0x75, 0x78, 0xca, - 0x11, 0xf9, 0x04, 0x3a, 0xb2, 0xc8, 0xc8, 0xe5, 0xe6, 0xb4, 0x39, 0x49, 0xb8, 0x5b, 0x62, 0x90, - 0x2b, 0xb0, 0xca, 0x53, 0x77, 0x11, 0x25, 0xbb, 0xb7, 0xfa, 0x06, 0x6e, 0x94, 0xb8, 0x72, 0x12, - 0xb3, 0xcb, 0x69, 0x9c, 0x06, 0x2f, 0x4e, 0x58, 0x74, 0x7c, 0x52, 0xc8, 0xc0, 0x69, 0x82, 0xca, - 0x60, 0xdb, 0x36, 0x82, 0xad, 0x11, 0xbe, 0x57, 0xed, 0xf0, 0x5d, 0x46, 0xba, 0x35, 0x23, 0xd2, - 0xd1, 0xaf, 0x61, 0xc0, 0xfd, 0x51, 0xe7, 0xc1, 0xd5, 0x30, 0xef, 0x34, 0x84, 0xf9, 0x92, 0x56, - 0xcb, 0xa4, 0xf5, 0x17, 0x0e, 0x90, 0x87, 0x33, 0x96, 0xfc, 0x9f, 0xa4, 0xe0, 0x3a, 0x95, 0x5e, - 0xb6, 0x52, 0xe9, 0xcb, 0xd0, 0x9d, 0xcd, 0xf3, 0x13, 0x4f, 0x4e, 0x8a, 0x03, 0xdd, 0x04, 0xa9, - 0x64, 0xbb, 0xad, 0x93, 0xed, 0x3b, 0xb0, 0x69, 0xad, 0x53, 0x9a, 0xc3, 0x87, 0x30, 0xb0, 0x93, - 0x6a, 0xb9, 0xce, 0x0a, 0x94, 0xfe, 0x7d, 0x0b, 0xda, 0xdc, 0x68, 0xb9, 0xfd, 0x65, 0x91, 0x2c, - 0x84, 0x1d, 0x57, 0x0c, 0xac, 0x04, 0xa3, 0x65, 0x27, 0x18, 0x66, 0xcc, 0x58,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4b, 0xcd, 0x93, 0x92, 0xc5, - 0x98, 0xb3, 0x20, 0x74, 0xc4, 0x59, 0x20, 0x86, 0xbc, 0x90, 0x42, 0x29, 0xcb, 0xa7, 0x40, 0x5a, - 0xca, 0xf6, 0x4b, 0x22, 0x2d, 0xe5, 0xea, 0x9b, 0x21, 0x4b, 0xca, 0x32, 0x26, 0xa2, 0x84, 0x7e, - 0x06, 0xfd, 0xa7, 0xfc, 0x35, 0x9c, 0x7c, 0x80, 0xa2, 0x29, 0xdb, 0xef, 0x57, 0x34, 0xe5, 0xca, - 0x4b, 0x15, 0x7a, 0x89, 0x53, 0xde, 0xa1, 0x1b, 0x48, 0x59, 0xbc, 0xac, 0x0b, 0x05, 0x0a, 0xd2, - 0xff, 0x1d, 0xe8, 0x5b, 0x6f, 0x4d, 0x48, 0xb9, 0xf9, 0xa6, 0x47, 0x2c, 0x93, 0x77, 0x17, 0xcc, - 0x36, 0xf1, 0x0a, 0x25, 0x0a, 0x7f, 0x9d, 0x82, 0xbc, 0x9e, 0x01, 0xe8, 0x37, 0x1b, 0xda, 0x5d, - 0x6a, 0xef, 0x44, 0xb4, 0xbb, 0xd4, 0x9f, 0x78, 0xd0, 0x4d, 0xce, 0xa2, 0x4f, 0xba, 0xc2, 0x8c, - 0x04, 0xad, 0x43, 0x58, 0x93, 0xaf, 0x13, 0xb4, 0x7c, 0xec, 0x27, 0x1a, 0x5a, 0x3e, 0x95, 0x67, - 0x0c, 0x74, 0xc4, 0x09, 0x02, 0xe9, 0x20, 0xc1, 0x08, 0x49, 0xfc, 0x16, 0x74, 0x8d, 0xab, 0x7d, - 0x62, 0xae, 0xa6, 0xf2, 0x0a, 0x40, 0x7b, 0x64, 0xc3, 0x5b, 0x00, 0xba, 0xc5, 0x29, 0x0f, 0x48, - 0x0f, 0x29, 0xab, 0xbe, 0x86, 0xa4, 0xae, 0xee, 0xee, 0x2d, 0xea, 0x95, 0x07, 0x01, 0x16, 0xf5, - 0xea, 0x65, 0xbf, 0x4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 0xf4, 0xf9, 0xba, 0xe8, 0xfc, 0xb3, + 0xc4, 0x8d, 0x52, 0x6a, 0x93, 0x38, 0x72, 0x02, 0x3f, 0x1d, 0x59, 0x57, 0xea, 0x74, 0xfe, 0x05, + 0x30, 0xfe, 0x18, 0xfa, 0xfb, 0x71, 0x14, 0x11, 0x2f, 0x93, 0x6b, 0x1f, 0x43, 0x9b, 0x2d, 0x72, + 0x91, 0x04, 0x62, 0xd1, 0xf9, 0x98, 0x26, 0xe1, 0x9c, 0x5a, 0xa8, 0xf0, 0x36, 0xac, 0xef, 0x27, + 0xc4, 0xcd, 0xc8, 0x41, 0xec, 0x13, 0x8d, 0x47, 0xc1, 0x6a, 0xf9, 0x18, 0xff, 0x89, 0x05, 0x48, + 0xff, 0x42, 0x4c, 0xf9, 0x57, 0xa0, 0x97, 0x12, 0xe2, 0x3b, 0xa7, 0x11, 0x39, 0x8d, 0xa3, 0xc0, + 0x13, 0x13, 0xee, 0x52, 0xe0, 0x37, 0x02, 0x86, 0x3e, 0x82, 0x61, 0x10, 0x05, 0x59, 0xe0, 0x86, + 0xc1, 0xef, 0x10, 0xdf, 0x09, 0x23, 0x3f, 0x1d, 0xd5, 0xf8, 0xc2, 0x34, 0xf8, 0x34, 0xf2, 0x53, + 0x74, 0x1b, 0x36, 0x74, 0x52, 0x8f, 0x4e, 0xfb, 0x75, 0x26, 0x4c, 0x81, 0x34, 0xd4, 0x3e, 0xc7, + 0xe0, 0x7f, 0xb2, 0xa0, 0x2d, 0x77, 0x35, 0xc3, 0xac, 0x56, 0xc1, 0xac, 0xf7, 0xa0, 0x93, 0x9e, + 0xb9, 0x73, 0xc7, 0x0b, 0x03, 0x12, 0x65, 0x22, 0x99, 0xbc, 0x27, 0x93, 0x89, 0x64, 0x71, 0xeb, + 0xe8, 0xcc, 0x9d, 0xef, 0x33, 0x12, 0x5b, 0xa7, 0xe7, 0xa9, 0xea, 0x25, 0x89, 0x1c, 0xd7, 0xf7, + 0x13, 0x92, 0xa6, 0x6c, 0x4a, 0x6b, 0xb6, 0x09, 0xa4, 0x99, 0xd4, 0x27, 0x5e, 0x70, 0xea, 0x86, + 0xce, 0x3c, 0x74, 0x3d, 0x92, 0x8a, 0xa0, 0x29, 0x40, 0x31, 0x06, 0x50, 0x82, 0x50, 0x0b, 0xea, + 0xd3, 0x83, 0xfb, 0xc3, 0x15, 0xd4, 0x81, 0xd6, 0xfe, 0xe1, 0xc1, 0xc1, 0xe4, 0xf9, 0x93, 0x61, + 0x8d, 0xda, 0xf8, 0x3e, 0x99, 0xc7, 0x69, 0xa0, 0xdb, 0x78, 0xd9, 0xf2, 0xf0, 0x4d, 0x18, 0xe4, + 0xd4, 0xc2, 0x36, 0x23, 0x68, 0xc9, 0xc9, 0x72, 0x6a, 0x39, 0xa4, 0x0e, 0x78, 0x3f, 0x48, 0xbd, + 0xf8, 0x15, 0x49, 0xa8, 0x35, 0xd3, 0x77, 0xcf, 0x5b, 0x3f, 0x84, 0xad, 0x02, 0x07, 0x21, 0xf4, + 0x12, 0xac, 0x45, 0x8b, 0x53, 0x87, 0xd2, 0xa7, 0x22, 0xff, 0x28, 0x00, 0xfe, 0x03, 0x0b, 0xd0, + 0xe4, 0x35, 0xf1, 0x16, 0x19, 0xa1, 0xeb, 0xd7, 0x16, 0x16, 0x27, 0x3e, 0x49, 0x9c, 0x20, 0x77, + 0x3c, 0x39, 0x66, 0x99, 0xc9, 0x0d, 0x18, 0x4a, 0xe4, 0x3c, 0x31, 0xa4, 0x49, 0x64, 0x4e, 0x48, + 0xe2, 0xcc, 0x17, 0x33, 0xe7, 0x25, 0x39, 0x17, 0x16, 0x31, 0x60, 0x94, 0xf3, 0x77, 0x0b, 0x37, + 0xca, 0x82, 0xec, 0x5c, 0xa4, 0xfc, 0x7c, 0x4c, 0x63, 0xe0, 0x01, 0xc9, 0xc4, 0x36, 0xf2, 0x36, + 0x3a, 0xfe, 0x0b, 0x0b, 0x90, 0xfe, 0x85, 0x58, 0xf2, 0x7d, 0x68,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 0xc6, 0x35, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -5323,6 +5579,8 @@ type XudClient interface { // Begin gracefully shutting down xud. // shell: xucli shutdown Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*ShutdownResponse, error) + // Subscribes to alerts such as low balance. + SubscribeAlerts(ctx context.Context, in *SubscribeAlertsRequest, opts ...grpc.CallOption) (Xud_SubscribeAlertsClient, error) // Subscribes to orders being added to and removed from the order book. This call allows the client // to maintain an up-to-date view of the order book. For example, an exchange that wants to show // its users a real time view of the orders available to them would subscribe to this streaming @@ -5621,8 +5879,40 @@ func (c *xudClient) Shutdown(ctx context.Context, in *ShutdownRequest, opts ...g return out, nil } +func (c *xudClient) SubscribeAlerts(ctx context.Context, in *SubscribeAlertsRequest, opts ...grpc.CallOption) (Xud_SubscribeAlertsClient, error) { + stream, err := c.cc.NewStream(ctx, &_Xud_serviceDesc.Streams[1], "/xudrpc.Xud/SubscribeAlerts", opts...) + if err != nil { + return nil, err + } + x := &xudSubscribeAlertsClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Xud_SubscribeAlertsClient interface { + Recv() (*Alert, error) + grpc.ClientStream +} + +type xudSubscribeAlertsClient struct { + grpc.ClientStream +} + +func (x *xudSubscribeAlertsClient) Recv() (*Alert, error) { + m := new(Alert) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func (c *xudClient) SubscribeOrders(ctx context.Context, in *SubscribeOrdersRequest, opts ...grpc.CallOption) (Xud_SubscribeOrdersClient, error) { - stream, err := c.cc.NewStream(ctx, &_Xud_serviceDesc.Streams[1], "/xudrpc.Xud/SubscribeOrders", opts...) + stream, err := c.cc.NewStream(ctx, &_Xud_serviceDesc.Streams[2], "/xudrpc.Xud/SubscribeOrders", opts...) if err != nil { return nil, err } @@ -5654,7 +5944,7 @@ func (x *xudSubscribeOrdersClient) Recv() (*OrderUpdate, error) { } func (c *xudClient) SubscribeSwapFailures(ctx context.Context, in *SubscribeSwapsRequest, opts ...grpc.CallOption) (Xud_SubscribeSwapFailuresClient, error) { - stream, err := c.cc.NewStream(ctx, &_Xud_serviceDesc.Streams[2], "/xudrpc.Xud/SubscribeSwapFailures", opts...) + stream, err := c.cc.NewStream(ctx, &_Xud_serviceDesc.Streams[3], "/xudrpc.Xud/SubscribeSwapFailures", opts...) if err != nil { return nil, err } @@ -5686,7 +5976,7 @@ func (x *xudSubscribeSwapFailuresClient) Recv() (*SwapFailure, error) { } func (c *xudClient) SubscribeSwaps(ctx context.Context, in *SubscribeSwapsRequest, opts ...grpc.CallOption) (Xud_SubscribeSwapsClient, error) { - stream, err := c.cc.NewStream(ctx, &_Xud_serviceDesc.Streams[3], "/xudrpc.Xud/SubscribeSwaps", opts...) + stream, err := c.cc.NewStream(ctx, &_Xud_serviceDesc.Streams[4], "/xudrpc.Xud/SubscribeSwaps", opts...) if err != nil { return nil, err } @@ -5718,7 +6008,7 @@ func (x *xudSubscribeSwapsClient) Recv() (*SwapSuccess, error) { } func (c *xudClient) SubscribeSwapsAccepted(ctx context.Context, in *SubscribeSwapsAcceptedRequest, opts ...grpc.CallOption) (Xud_SubscribeSwapsAcceptedClient, error) { - stream, err := c.cc.NewStream(ctx, &_Xud_serviceDesc.Streams[4], "/xudrpc.Xud/SubscribeSwapsAccepted", opts...) + stream, err := c.cc.NewStream(ctx, &_Xud_serviceDesc.Streams[5], "/xudrpc.Xud/SubscribeSwapsAccepted", opts...) if err != nil { return nil, err } @@ -5883,6 +6173,8 @@ type XudServer interface { // Begin gracefully shutting down xud. // shell: xucli shutdown Shutdown(context.Context, *ShutdownRequest) (*ShutdownResponse, error) + // Subscribes to alerts such as low balance. + SubscribeAlerts(*SubscribeAlertsRequest, Xud_SubscribeAlertsServer) error // Subscribes to orders being added to and removed from the order book. This call allows the client // to maintain an up-to-date view of the order book. For example, an exchange that wants to show // its users a real time view of the orders available to them would subscribe to this streaming @@ -6391,6 +6683,27 @@ func _Xud_Shutdown_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Xud_SubscribeAlerts_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SubscribeAlertsRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(XudServer).SubscribeAlerts(m, &xudSubscribeAlertsServer{stream}) +} + +type Xud_SubscribeAlertsServer interface { + Send(*Alert) error + grpc.ServerStream +} + +type xudSubscribeAlertsServer struct { + grpc.ServerStream +} + +func (x *xudSubscribeAlertsServer) Send(m *Alert) error { + return x.ServerStream.SendMsg(m) +} + func _Xud_SubscribeOrders_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(SubscribeOrdersRequest) if err := stream.RecvMsg(m); err != nil { @@ -6674,6 +6987,11 @@ var _Xud_serviceDesc = grpc.ServiceDesc{ Handler: _Xud_PlaceOrder_Handler, ServerStreams: true, }, + { + StreamName: "SubscribeAlerts", + Handler: _Xud_SubscribeAlerts_Handler, + ServerStreams: true, + }, { StreamName: "SubscribeOrders", Handler: _Xud_SubscribeOrders_Handler,