diff --git a/docs/api.md b/docs/api.md
index 03a2082cf..d4f87972b 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -42,8 +42,6 @@
- [ListPairsResponse](#xudrpc.ListPairsResponse)
- [ListPeersRequest](#xudrpc.ListPeersRequest)
- [ListPeersResponse](#xudrpc.ListPeersResponse)
- - [ListTradesRequest](#xudrpc.ListTradesRequest)
- - [ListTradesResponse](#xudrpc.ListTradesResponse)
- [LndInfo](#xudrpc.LndInfo)
- [NodeIdentifier](#xudrpc.NodeIdentifier)
- [OpenChannelRequest](#xudrpc.OpenChannelRequest)
@@ -75,6 +73,8 @@
- [SwapFailure](#xudrpc.SwapFailure)
- [SwapSuccess](#xudrpc.SwapSuccess)
- [Trade](#xudrpc.Trade)
+ - [TradeHistoryRequest](#xudrpc.TradeHistoryRequest)
+ - [TradeHistoryResponse](#xudrpc.TradeHistoryResponse)
- [TradingLimits](#xudrpc.TradingLimits)
- [TradingLimitsRequest](#xudrpc.TradingLimitsRequest)
- [TradingLimitsResponse](#xudrpc.TradingLimitsResponse)
@@ -89,7 +89,7 @@
- [Currency.SwapClient](#xudrpc.Currency.SwapClient)
- [ListOrdersRequest.Owner](#xudrpc.ListOrdersRequest.Owner)
- [OrderSide](#xudrpc.OrderSide)
- - [SwapSuccess.Role](#xudrpc.SwapSuccess.Role)
+ - [Role](#xudrpc.Role)
- [Xud](#xudrpc.Xud)
- [XudInit](#xudrpc.XudInit)
@@ -671,36 +671,6 @@
-
-
-### ListTradesRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| limit | [uint32](#uint32) | | The maximum number of trades to return |
-
-
-
-
-
-
-
-
-### ListTradesResponse
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| trades | [Trade](#xudrpc.Trade) | repeated | |
-
-
-
-
-
-
### LndInfo
@@ -780,7 +750,7 @@
| id | [string](#string) | | A UUID for this order. |
| node_identifier | [NodeIdentifier](#xudrpc.NodeIdentifier) | | The identifier of the node that created this order. |
| local_id | [string](#string) | | The local id for this order, if applicable. |
-| created_at | [uint64](#uint64) | | The epoch time when this order was created. |
+| created_at | [uint64](#uint64) | | The epoch time in milliseconds when this order was created. |
| side | [OrderSide](#xudrpc.OrderSide) | | Whether this order is a buy or sell |
| is_own_order | [bool](#bool) | | Whether this order is a local own order or a remote peer order. |
| hold | [uint64](#uint64) | | The quantity on hold pending swap execution. |
@@ -1190,7 +1160,7 @@
| amount_received | [uint64](#uint64) | | The amount received denominated in satoshis. |
| amount_sent | [uint64](#uint64) | | The amount sent denominated in satoshis. |
| peer_pub_key | [string](#string) | | The node pub key of the peer that executed this order. |
-| role | [SwapSuccess.Role](#xudrpc.SwapSuccess.Role) | | Our role in the swap, either MAKER or TAKER. |
+| role | [Role](#xudrpc.Role) | | Our role in the swap, either MAKER or TAKER. |
| currency_received | [string](#string) | | The ticker symbol of the currency received. |
| currency_sent | [string](#string) | | The ticker symbol of the currency sent. |
| r_preimage | [string](#string) | | The hex-encoded preimage. |
@@ -1210,10 +1180,45 @@
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| maker_order | [Order](#xudrpc.Order) | | The maker order involved in this trade. |
-| taker_order | [Order](#xudrpc.Order) | | The taker order involved in this trade. |
+| taker_order | [Order](#xudrpc.Order) | | The taker order involved in this trade. Note that when a trade occurs from a remote peer filling one of our orders, we do not receive the order (only a swap request) and this field will be empty. |
| r_hash | [string](#string) | | The payment hash involved in this trade. |
| quantity | [uint64](#uint64) | | The quantity transacted in this trade. |
| pair_id | [string](#string) | | The trading pair for this trade. |
+| price | [double](#double) | | The price used for the trade. |
+| role | [Role](#xudrpc.Role) | | Our role in the trade. |
+| executed_at | [uint64](#uint64) | | The epoch time in milliseconds that this trade was executed |
+| side | [OrderSide](#xudrpc.OrderSide) | | Whether this node was on the buy or sell side of the trade - or both in case of internal trades. |
+| counterparty | [NodeIdentifier](#xudrpc.NodeIdentifier) | | The counterparty to this trade, if applicable. |
+
+
+
+
+
+
+
+
+### TradeHistoryRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| limit | [uint32](#uint32) | | The maximum number of trades to return |
+
+
+
+
+
+
+
+
+### TradeHistoryResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| trades | [Trade](#xudrpc.Trade) | repeated | |
@@ -1410,18 +1415,20 @@
| ---- | ------ | ----------- |
| BUY | 0 | |
| SELL | 1 | |
+| BOTH | 2 | |
-
+
-### SwapSuccess.Role
+### Role
| Name | Number | Description |
| ---- | ------ | ----------- |
| TAKER | 0 | |
| MAKER | 1 | |
+| INTERNAL | 2 | |
@@ -1450,7 +1457,6 @@ The primary service for interacting with a running xud node.
| ListCurrencies | [ListCurrenciesRequest](#xudrpc.ListCurrenciesRequest) | [ListCurrenciesResponse](#xudrpc.ListCurrenciesResponse) | Gets a list of this node's supported currencies. shell: xucli listcurrencies |
| ListPairs | [ListPairsRequest](#xudrpc.ListPairsRequest) | [ListPairsResponse](#xudrpc.ListPairsResponse) | Gets a list of this nodes suported trading pairs. shell: xucli listpairs |
| ListPeers | [ListPeersRequest](#xudrpc.ListPeersRequest) | [ListPeersResponse](#xudrpc.ListPeersResponse) | Gets a list of connected peers. shell: xucli listpeers |
-| ListTrades | [ListTradesRequest](#xudrpc.ListTradesRequest) | [ListTradesResponse](#xudrpc.ListTradesResponse) | Gets a list of completed trades. shell: xucli listtrades [limit] |
| OpenChannel | [OpenChannelRequest](#xudrpc.OpenChannelRequest) | [OpenChannelResponse](#xudrpc.OpenChannelResponse) | Opens a payment channel to a peer for the specified amount and currency. shell: xucli openchannel <node_identifier> <currency> <amount> |
| PlaceOrder | [PlaceOrderRequest](#xudrpc.PlaceOrderRequest) | [PlaceOrderEvent](#xudrpc.PlaceOrderEvent) stream | Adds an order to the order book. If price is zero or unspecified a market order will get added. |
| PlaceOrderSync | [PlaceOrderRequest](#xudrpc.PlaceOrderRequest) | [PlaceOrderResponse](#xudrpc.PlaceOrderResponse) | The synchronous, non-streaming version of PlaceOrder. shell: xucli buy <quantity> <pair_id> <price> [order_id] [stream] shell: xucli sell <quantity> <pair_id> <price> [order_id] [stream] |
@@ -1462,6 +1468,7 @@ The primary service for interacting with a running xud node.
| 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. |
| 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. |
| 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. |
+| TradeHistory | [TradeHistoryRequest](#xudrpc.TradeHistoryRequest) | [TradeHistoryResponse](#xudrpc.TradeHistoryResponse) | Gets a list of completed trades. shell: xucli tradehistory [limit] |
| TradingLimits | [TradingLimitsRequest](#xudrpc.TradingLimitsRequest) | [TradingLimitsResponse](#xudrpc.TradingLimitsResponse) | Gets the trading limits for one or all currencies. shell: xucli tradinglimits [currency] |
| Unban | [UnbanRequest](#xudrpc.UnbanRequest) | [UnbanResponse](#xudrpc.UnbanResponse) | Removes a ban from a node manually and, optionally, attempts to connect to it. shell: xucli unban <node_identifier> [reconnect] |
| Withdraw | [WithdrawRequest](#xudrpc.WithdrawRequest) | [WithdrawResponse](#xudrpc.WithdrawResponse) | Withdraws a given currency from the xud wallets to a specified address. shell: xucli withdraw <amount> <currency> <destination> [fee] |
diff --git a/lib/Xud.ts b/lib/Xud.ts
index b50acec47..27fae9c9d 100644
--- a/lib/Xud.ts
+++ b/lib/Xud.ts
@@ -1,8 +1,11 @@
+import { AssertionError } from 'assert';
import { EventEmitter } from 'events';
import { promises as fs } from 'fs';
import path from 'path';
+import { Subscription } from 'rxjs';
import bootstrap from './bootstrap';
import Config from './Config';
+import { SwapClientType, XuNetwork } from './constants/enums';
import DB from './db/DB';
import GrpcServer from './grpc/GrpcServer';
import GrpcWebProxyServer from './grpc/webproxy/GrpcWebProxyServer';
@@ -15,11 +18,8 @@ import InitService from './service/InitService';
import Service from './service/Service';
import SwapClientManager from './swaps/SwapClientManager';
import Swaps from './swaps/Swaps';
-import { UnitConverter } from './utils/UnitConverter';
-import { AssertionError } from 'assert';
-import { SwapClientType, XuNetwork } from './constants/enums';
import { createSimnetChannels } from './utils/simnet-connext-channels';
-import { Subscription } from 'rxjs';
+import { UnitConverter } from './utils/UnitConverter';
const version: string = require('../package.json').version;
diff --git a/lib/cli/commands/listtrades.ts b/lib/cli/commands/listtrades.ts
deleted file mode 100644
index 6164a2882..000000000
--- a/lib/cli/commands/listtrades.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import Table, { HorizontalTable } from 'cli-table3';
-import colors from 'colors/safe';
-import { Arguments, Argv } from 'yargs';
-import { ListTradesRequest, ListTradesResponse, Trade } from '../../proto/xudrpc_pb';
-import { callback, loadXudClient } from '../command';
-import { satsToCoinsStr } from '../utils';
-
-const HEADERS = [
- colors.blue('Trading Pair'),
- colors.blue('Trade Quantity'),
- colors.blue('Price'),
- colors.blue('Order Type'),
-];
-
-const displayTrades = (trades: ListTradesResponse.AsObject) => {
- const table = new Table({ head: HEADERS }) as HorizontalTable;
- trades.tradesList.forEach((trade: Trade.AsObject) => {
- const type = trade.makerOrder ? 'maker' : 'taker';
- let price = 0;
- if (trade.makerOrder) {
- price = trade.makerOrder.price;
- } else if (trade.takerOrder) {
- price = trade.takerOrder.price;
- }
-
- table.push([
- trade.pairId,
- satsToCoinsStr(trade.quantity),
- parseFloat(price.toFixed(5)),
- type,
- ]);
- });
- console.log(colors.underline(colors.bold('\Trades:')));
- console.log(table.toString());
-};
-
-export const command = 'listtrades [limit]';
-
-export const describe = 'list completed trades';
-
-export const builder = (argv: Argv) => argv
- .option('limit', {
- description: 'the maximum number of trades to display',
- type: 'number',
- default: 15,
- })
- .example('$0 listtrades', 'list most recent trades')
- .example('$0 listtrades 50', 'list the 50 most recent trades');
-
-export const handler = async (argv: Arguments) => {
- const request = new ListTradesRequest();
- request.setLimit(argv.limit);
- (await loadXudClient(argv)).listTrades(request, callback(argv, displayTrades));
-};
diff --git a/lib/cli/commands/tradehistory.ts b/lib/cli/commands/tradehistory.ts
new file mode 100644
index 000000000..39ec9a768
--- /dev/null
+++ b/lib/cli/commands/tradehistory.ts
@@ -0,0 +1,89 @@
+import Table, { HorizontalTable } from 'cli-table3';
+import colors from 'colors/safe';
+import { Arguments, Argv } from 'yargs';
+import { Role, Trade, TradeHistoryRequest, TradeHistoryResponse, OrderSide } from '../../proto/xudrpc_pb';
+import { callback, loadXudClient } from '../command';
+import { satsToCoinsStr, trim } from '../utils';
+
+const HEADERS = [
+ colors.blue('Execution'),
+ colors.blue('Price'),
+ colors.blue('Role'),
+ colors.blue('Order Id'),
+ colors.blue('Order Id (Counterparty)'),
+ colors.blue('Swap Hash'),
+ colors.blue('Executed At'),
+];
+
+const displayTrades = (trades: TradeHistoryResponse.AsObject) => {
+ const table = new Table({ head: HEADERS }) as HorizontalTable;
+ trades.tradesList.forEach((trade: Trade.AsObject) => {
+ const [baseCurrency, quoteCurrency] = trade.pairId.split('/');
+ const counterparty = trade.counterparty?.alias || 'Self';
+ let role: string;
+ let orderId: string;
+ let counterpartyOrderId: string;
+ switch (trade.role) {
+ case Role.TAKER:
+ orderId = trim(trade.takerOrder!.id ?? '', 8);
+ counterpartyOrderId = trim(trade.makerOrder?.id ?? '', 8);
+ role = 'Taker';
+ break;
+ case Role.MAKER:
+ orderId = trim(trade.makerOrder!.id ?? '', 8);
+ counterpartyOrderId = 'N/A';
+ role = 'Maker';
+ break;
+ case Role.INTERNAL:
+ orderId = trim(trade.takerOrder?.id ?? '', 8);
+ counterpartyOrderId = trim(trade.makerOrder?.id ?? '', 8);
+ role = 'Internal';
+ break;
+ }
+ let side: string;
+ switch (trade.side) {
+ case OrderSide.BUY:
+ side = 'Buy';
+ break;
+ case OrderSide.SELL:
+ side = 'Sell';
+ break;
+ case OrderSide.BOTH:
+ side = trade.takerOrder!.side === OrderSide.BUY ? 'Buy' : 'Sell';
+ break;
+ }
+
+ const details = [
+ `${side} ${satsToCoinsStr(trade.quantity)} ${baseCurrency}`,
+ `${trade.price} ${quoteCurrency}`,
+ role,
+ orderId,
+ `${counterpartyOrderId} (${counterparty})`,
+ trim(trade.rHash, 6),
+ new Date(trade.executedAt).toLocaleString(),
+ ];
+
+ table.push(details);
+ });
+ console.log(colors.underline(colors.bold('\Trades:')));
+ console.log(table.toString());
+};
+
+export const command = 'tradehistory [limit]';
+
+export const describe = 'list completed trades';
+
+export const builder = (argv: Argv) => argv
+ .option('limit', {
+ description: 'the maximum number of trades to display',
+ type: 'number',
+ default: 15,
+ })
+ .example('$0 tradehistory', 'list most recent trades')
+ .example('$0 tradehistory 50', 'list the 50 most recent trades');
+
+export const handler = async (argv: Arguments) => {
+ const request = new TradeHistoryRequest();
+ request.setLimit(argv.limit);
+ (await loadXudClient(argv)).tradeHistory(request, callback(argv, displayTrades));
+};
diff --git a/lib/constants/enums.ts b/lib/constants/enums.ts
index 34215e4ee..80b148bc5 100644
--- a/lib/constants/enums.ts
+++ b/lib/constants/enums.ts
@@ -13,6 +13,7 @@ export enum OrderingDirection {
export enum OrderSide {
Buy,
Sell,
+ Both,
}
export enum Owner {
@@ -59,6 +60,7 @@ export const magicValsXuNetwork = {
export enum SwapRole {
Taker = 0,
Maker = 1,
+ Internal = 2,
}
export enum SwapPhase {
diff --git a/lib/db/types.ts b/lib/db/types.ts
index db417ad4e..900ef408b 100644
--- a/lib/db/types.ts
+++ b/lib/db/types.ts
@@ -1,8 +1,8 @@
import Sequelize, { DataTypeAbstract, DefineAttributeColumnOptions, DefineAttributes } from 'sequelize';
+import { ReputationEvent } from '../constants/enums';
+import { Currency, Order, Pair } from '../orderbook/types';
import { Address, NodeConnectionInfo } from '../p2p/types';
import { SwapDeal } from '../swaps/types';
-import { Currency, Pair, Order } from '../orderbook/types';
-import { ReputationEvent } from '../constants/enums';
export type SequelizeAttributes = DefineAttributes & {
[P in keyof T]: string | DataTypeAbstract | DefineAttributeColumnOptions
@@ -67,12 +67,17 @@ export type TradeFactory = {
quantity: number,
};
-export type TradeAttributes = TradeFactory;
+export type TradeAttributes = TradeFactory & {
+ makerOrder?: OrderAttributes;
+ takerOrder?: OrderAttributes;
+ SwapDeal?: SwapDealAttributes;
+};
export type TradeInstance = TradeAttributes & Sequelize.Instance & {
getMakerOrder: Sequelize.BelongsToGetAssociationMixin;
getTakerOrder: Sequelize.BelongsToGetAssociationMixin;
getSwapDeal: Sequelize.BelongsToGetAssociationMixin;
+ createdAt: Date,
};
/* Node */
diff --git a/lib/grpc/GrpcService.ts b/lib/grpc/GrpcService.ts
index 5fe806865..031f15354 100644
--- a/lib/grpc/GrpcService.ts
+++ b/lib/grpc/GrpcService.ts
@@ -1,12 +1,11 @@
/* tslint:disable no-floating-promises no-null-keyword */
import grpc, { status } from 'grpc';
-import { ServiceOrder, ServicePlaceOrderEvent } from 'lib/service/types';
import { SwapFailureReason } from '../constants/enums';
-import { CurrencyInstance, OrderInstance, TradeInstance } from '../db/types';
import { LndInfo } from '../lndclient/types';
import { isOwnOrder, Order, OrderPortion, PlaceOrderEventType, PlaceOrderResult } from '../orderbook/types';
import * as xudrpc from '../proto/xudrpc_pb';
import Service from '../service/Service';
+import { ServiceOrder, ServicePlaceOrderEvent } from '../service/types';
import { SwapFailure, SwapSuccess } from '../swaps/types';
import getGrpcError from './getGrpcError';
@@ -31,8 +30,12 @@ const createServiceOrder = (order: ServiceOrder) => {
}
grpcOrder.setNodeIdentifier(nodeIdentifier);
grpcOrder.setPairId(order.pairId);
- grpcOrder.setPrice(order.price);
- grpcOrder.setQuantity(order.quantity);
+ if (order.price) {
+ grpcOrder.setPrice(order.price);
+ }
+ if (order.quantity) {
+ grpcOrder.setQuantity(order.quantity);
+ }
grpcOrder.setSide(order.side as number);
return grpcOrder;
};
@@ -92,26 +95,6 @@ const createSwapFailure = (swapFailure: SwapFailure) => {
return grpcSwapFailure;
};
-/**
- * Creates an xudrpc Order from OrderInstance.
- */
-const getGrpcOrderFromOrderInstance = (order: OrderInstance) => {
- const grpcOrder = new xudrpc.Order();
- grpcOrder.setCreatedAt(order.createdAt);
- grpcOrder.setId(order.id);
- grpcOrder.setIsOwnOrder(order.nodeId === undefined);
- if (order.localId) {
- grpcOrder.setLocalId(order.localId);
- }
- grpcOrder.setPairId(order.pairId);
- // TODO: set peer pub key if order.nodeId has a value
- if (order.price) {
- grpcOrder.setPrice(order.price);
- }
- grpcOrder.setSide(order.isBuy ? xudrpc.OrderSide.BUY : xudrpc.OrderSide.SELL);
- return grpcOrder;
-};
-
/**
* Creates an xudrpc PlaceOrderResponse message from a [[PlaceOrderResult]].
*/
@@ -619,11 +602,13 @@ class GrpcService {
const currencies = this.service.listCurrencies();
const response = new xudrpc.ListCurrenciesResponse();
- currencies.forEach((currency: CurrencyInstance) => {
+ currencies.forEach((currency) => {
const resultCurrency = new xudrpc.Currency();
resultCurrency.setDecimalPlaces(currency.decimalPlaces);
resultCurrency.setCurrency(currency.id);
- resultCurrency.setTokenAddress(currency.tokenAddress);
+ if (currency.tokenAddress) {
+ resultCurrency.setTokenAddress(currency.tokenAddress);
+ }
resultCurrency.setSwapClient(currency.swapClient as number);
response.getCurrenciesList().push(resultCurrency);
});
@@ -653,27 +638,41 @@ class GrpcService {
}
/**
- * See [[Service.listTrades]]
+ * See [[Service.tradeHistory]]
*/
- public listTrades: grpc.handleUnaryCall = async (call, callback) => {
+ public tradeHistory: grpc.handleUnaryCall = async (call, callback) => {
if (!this.isReady(this.service, callback)) {
return;
}
try {
- const trades = await this.service.listTrades(call.request.toObject());
- const response = new xudrpc.ListTradesResponse();
- const tradesList: xudrpc.Trade[] = [];
- await Promise.all(trades.map(async (trade: TradeInstance) => {
+ const trades = await this.service.tradeHistory(call.request.toObject());
+ const response = new xudrpc.TradeHistoryResponse();
+ const tradesList: xudrpc.Trade[] = trades.map((trade) => {
const grpcTrade = new xudrpc.Trade();
- const makerOrder = await trade.getMakerOrder();
- const takerOrder = await trade.getTakerOrder();
+ grpcTrade.setMakerOrder(createServiceOrder(trade.makerOrder));
+ if (trade.takerOrder) {
+ grpcTrade.setTakerOrder(createServiceOrder(trade.takerOrder));
+ }
+ grpcTrade.setPairId(trade.pairId);
grpcTrade.setQuantity(trade.quantity);
- grpcTrade.setRHash(trade.rHash ? trade.rHash : '');
- grpcTrade.setMakerOrder(getGrpcOrderFromOrderInstance(makerOrder!));
- grpcTrade.setTakerOrder(takerOrder ? getGrpcOrderFromOrderInstance(takerOrder) : undefined);
- grpcTrade.setPairId(makerOrder!.pairId);
- tradesList.push(grpcTrade);
- }));
+ if (trade.rHash) {
+ grpcTrade.setRHash(trade.rHash);
+ }
+ grpcTrade.setPrice(trade.price);
+ grpcTrade.setSide(trade.side as number);
+ grpcTrade.setRole(trade.role as number);
+ grpcTrade.setExecutedAt(trade.executedAt);
+ if (trade.counterparty) {
+ const counterparty = new xudrpc.NodeIdentifier();
+ counterparty.setNodePubKey(trade.counterparty.nodePubKey);
+ if (trade.counterparty.alias) {
+ counterparty.setAlias(trade.counterparty.alias);
+ }
+ grpcTrade.setCounterparty(counterparty);
+ }
+
+ return grpcTrade;
+ });
response.setTradesList(tradesList);
callback(null, response);
diff --git a/lib/orderbook/OrderBookRepository.ts b/lib/orderbook/OrderBookRepository.ts
index b8700972c..5803b67df 100644
--- a/lib/orderbook/OrderBookRepository.ts
+++ b/lib/orderbook/OrderBookRepository.ts
@@ -1,6 +1,6 @@
-import * as db from '../db/types';
import Bluebird from 'bluebird';
import { Models } from '../db/DB';
+import * as db from '../db/types';
class OrderbookRepository {
@@ -59,11 +59,15 @@ class OrderbookRepository {
}
public getTrades = (limit?: number): Bluebird => {
- if (limit) {
- return this.models.Trade.findAll({ limit, order: [['createdAt', 'DESC']] });
- } else {
- return this.models.Trade.findAll({ order: [['createdAt', 'DESC']] });
- }
+ return this.models.Trade.findAll({
+ limit,
+ order: [['createdAt', 'DESC']],
+ include: [
+ { model: this.models.Order, as: 'makerOrder' },
+ { model: this.models.Order, as: 'takerOrder' },
+ { model: this.models.SwapDeal, include: [this.models.Node] },
+ ],
+ });
}
}
diff --git a/lib/orderbook/TradingPair.ts b/lib/orderbook/TradingPair.ts
index caa349085..6b85f0338 100644
--- a/lib/orderbook/TradingPair.ts
+++ b/lib/orderbook/TradingPair.ts
@@ -2,8 +2,8 @@ import assert from 'assert';
import FastPriorityQueue from 'fastpriorityqueue';
import { OrderingDirection } from '../constants/enums';
import Logger from '../Logger';
-import { isOwnOrder, Order, OwnOrder, PeerOrder, OrderMatch, MatchingResult } from './types';
import errors from './errors';
+import { isOwnOrder, MatchingResult, Order, OrderMatch, OwnOrder, PeerOrder } from './types';
/** A map between orders and their order ids. */
type OrderMap = Map;
diff --git a/lib/p2p/NodeList.ts b/lib/p2p/NodeList.ts
index efb8811a4..76573c014 100644
--- a/lib/p2p/NodeList.ts
+++ b/lib/p2p/NodeList.ts
@@ -2,9 +2,9 @@ import { EventEmitter } from 'events';
import { ReputationEvent } from '../constants/enums';
import { NodeFactory, NodeInstance, ReputationEventInstance } from '../db/types';
import addressUtils from '../utils/addressUtils';
+import { pubKeyToAlias } from '../utils/aliasUtils';
import P2PRepository from './P2PRepository';
import { Address } from './types';
-import { pubKeyToAlias } from '../utils/aliasUtils';
export const reputationEventWeight = {
[ReputationEvent.ManualBan]: Number.NEGATIVE_INFINITY,
@@ -28,8 +28,13 @@ interface NodeList {
/** Represents a list of nodes for managing network peers activity */
class NodeList extends EventEmitter {
+ /** A map of node pub keys to node instances. */
private nodes = new Map();
private bannedNodes = new Map();
+ /** A map of node ids to node instances. */
+ private nodeIdMap = new Map();
+ /** A map of node pub keys to aliases. */
+ private aliases = new Map();
private static readonly BAN_THRESHOLD = -50;
@@ -52,6 +57,20 @@ class NodeList extends EventEmitter {
this.nodes.forEach(callback);
}
+ /**
+ * Get the internal node id for a given nodePubKey.
+ */
+ public getNodeById = (nodeId: number) => {
+ return this.nodeIdMap.get(nodeId);
+ }
+
+ /**
+ * Get the alias for a given nodePubKey.
+ */
+ public getAlias = (nodePubKey: string) => {
+ return this.aliases.get(nodePubKey);
+ }
+
public getId = (nodePubKey: string) => {
return this.nodes.get(nodePubKey)?.id;
}
@@ -100,7 +119,7 @@ class NodeList extends EventEmitter {
if (node.banned) {
this.bannedNodes.set(node.nodePubKey, node);
} else {
- this.nodes.set(node.nodePubKey, node);
+ this.addNode(node);
const reputationLoadPromise = this.repository.getReputationEvents(node).then((events) => {
events.forEach(({ event }) => {
this.updateReputationScore(node, event);
@@ -118,7 +137,7 @@ class NodeList extends EventEmitter {
public createNode = async (nodeFactory: NodeFactory) => {
const node = await this.repository.addNodeIfNotExists(nodeFactory);
if (node) {
- this.nodes.set(node.nodePubKey, node);
+ this.addNode(node);
}
}
@@ -221,6 +240,13 @@ class NodeList extends EventEmitter {
node.banned = status;
return node.save();
}
+
+ private addNode = (node: NodeInstance) => {
+ const { nodePubKey } = node;
+ this.nodes.set(nodePubKey, node);
+ this.nodeIdMap.set(node.id, node);
+ this.aliases.set(nodePubKey, pubKeyToAlias(nodePubKey));
+ }
}
export default NodeList;
diff --git a/lib/p2p/Peer.ts b/lib/p2p/Peer.ts
index 9c2aac584..a42ea5e98 100644
--- a/lib/p2p/Peer.ts
+++ b/lib/p2p/Peer.ts
@@ -4,13 +4,14 @@ import { EventEmitter } from 'events';
import stringify from 'json-stable-stringify';
import net, { Socket } from 'net';
import secp256k1 from 'secp256k1';
+import { SocksClient, SocksClientOptions } from 'socks';
import { DisconnectionReason, ReputationEvent, SwapClientType } from '../constants/enums';
import Logger from '../Logger';
import NodeKey from '../nodekey/NodeKey';
import { OutgoingOrder } from '../orderbook/types';
import addressUtils from '../utils/addressUtils';
-import { ms } from '../utils/utils';
import { pubKeyToAlias } from '../utils/aliasUtils';
+import { ms } from '../utils/utils';
import errors, { errorCodes } from './errors';
import Framer from './Framer';
import Network from './Network';
@@ -19,7 +20,6 @@ import { isPacketType, isPacketTypeArray, ResponseType } from './packets/Packet'
import * as packets from './packets/types';
import Parser from './Parser';
import { Address, NodeConnectionInfo, NodeState } from './types';
-import { SocksClient, SocksClientOptions } from 'socks';
/** Key info about a peer for display purposes */
type PeerInfo = {
diff --git a/lib/p2p/Pool.ts b/lib/p2p/Pool.ts
index de833b9c2..d93bedf37 100644
--- a/lib/p2p/Pool.ts
+++ b/lib/p2p/Pool.ts
@@ -153,10 +153,18 @@ class Pool extends EventEmitter {
return this.nodeState.tokenIdentifiers[currency];
}
+ public getNodePubKeyById = (nodeId: number) => {
+ return this.nodes.getNodeById(nodeId)?.nodePubKey;
+ }
+
public getNodeId = (nodePubKey: string) => {
return this.nodes.getId(nodePubKey);
}
+ public getNodeAlias = (nodePubKey: string) => {
+ return this.nodes.getAlias(nodePubKey);
+ }
+
/**
* Initialize the Pool by connecting to known nodes and listening to incoming peer connections, if configured to do so.
*/
diff --git a/lib/proto/xudrpc.swagger.json b/lib/proto/xudrpc.swagger.json
index 752b863a0..069dfea27 100644
--- a/lib/proto/xudrpc.swagger.json
+++ b/lib/proto/xudrpc.swagger.json
@@ -281,33 +281,6 @@
]
}
},
- "/v1/listtrades": {
- "post": {
- "summary": "Gets a list of completed trades.\nshell: xucli listtrades [limit]",
- "operationId": "ListTrades",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/xudrpcListTradesResponse"
- }
- }
- },
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/xudrpcListTradesRequest"
- }
- }
- ],
- "tags": [
- "Xud"
- ]
- }
- },
"/v1/nodeinfo": {
"get": {
"summary": "Gets general information about a node.\nshell: xucli getnodeinfo \u003cnode_identifier\u003e",
@@ -683,6 +656,33 @@
]
}
},
+ "/v1/tradehistory": {
+ "post": {
+ "summary": "Gets a list of completed trades.\nshell: xucli tradehistory [limit]",
+ "operationId": "TradeHistory",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/xudrpcTradeHistoryResponse"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/xudrpcTradeHistoryRequest"
+ }
+ }
+ ],
+ "tags": [
+ "Xud"
+ ]
+ }
+ },
"/v1/tradinglimits": {
"get": {
"summary": "Gets the trading limits for one or all currencies.\nshell: xucli tradinglimits [currency]",
@@ -782,14 +782,6 @@
],
"default": "BOTH"
},
- "SwapSuccessRole": {
- "type": "string",
- "enum": [
- "TAKER",
- "MAKER"
- ],
- "default": "TAKER"
- },
"protobufAny": {
"type": "object",
"properties": {
@@ -1202,27 +1194,6 @@
}
}
},
- "xudrpcListTradesRequest": {
- "type": "object",
- "properties": {
- "limit": {
- "type": "integer",
- "format": "int64",
- "title": "The maximum number of trades to return"
- }
- }
- },
- "xudrpcListTradesResponse": {
- "type": "object",
- "properties": {
- "trades": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/xudrpcTrade"
- }
- }
- }
- },
"xudrpcLndInfo": {
"type": "object",
"properties": {
@@ -1304,7 +1275,7 @@
"created_at": {
"type": "string",
"format": "uint64",
- "description": "The epoch time when this order was created."
+ "description": "The epoch time in milliseconds when this order was created."
},
"side": {
"$ref": "#/definitions/xudrpcOrderSide",
@@ -1353,7 +1324,8 @@
"type": "string",
"enum": [
"BUY",
- "SELL"
+ "SELL",
+ "BOTH"
],
"default": "BUY"
},
@@ -1625,6 +1597,15 @@
}
}
},
+ "xudrpcRole": {
+ "type": "string",
+ "enum": [
+ "TAKER",
+ "MAKER",
+ "INTERNAL"
+ ],
+ "default": "TAKER"
+ },
"xudrpcShutdownRequest": {
"type": "object"
},
@@ -1696,7 +1677,7 @@
"description": "The node pub key of the peer that executed this order."
},
"role": {
- "$ref": "#/definitions/SwapSuccessRole",
+ "$ref": "#/definitions/xudrpcRole",
"description": "Our role in the swap, either MAKER or TAKER."
},
"currency_received": {
@@ -1727,7 +1708,7 @@
},
"taker_order": {
"$ref": "#/definitions/xudrpcOrder",
- "description": "The taker order involved in this trade."
+ "description": "The taker order involved in this trade. Note that when a trade occurs from\na remote peer filling one of our orders, we do not receive the order (only a\nswap request) and this field will be empty."
},
"r_hash": {
"type": "string",
@@ -1741,6 +1722,49 @@
"pair_id": {
"type": "string",
"description": "The trading pair for this trade."
+ },
+ "price": {
+ "type": "number",
+ "format": "double",
+ "description": "The price used for the trade."
+ },
+ "role": {
+ "$ref": "#/definitions/xudrpcRole",
+ "description": "Our role in the trade."
+ },
+ "executed_at": {
+ "type": "string",
+ "format": "uint64",
+ "title": "The epoch time in milliseconds that this trade was executed"
+ },
+ "side": {
+ "$ref": "#/definitions/xudrpcOrderSide",
+ "description": "Whether this node was on the buy or sell side of the trade - or both in case of internal trades."
+ },
+ "counterparty": {
+ "$ref": "#/definitions/xudrpcNodeIdentifier",
+ "description": "The counterparty to this trade, if applicable."
+ }
+ }
+ },
+ "xudrpcTradeHistoryRequest": {
+ "type": "object",
+ "properties": {
+ "limit": {
+ "type": "integer",
+ "format": "int64",
+ "title": "The maximum number of trades to return"
+ }
+ }
+ },
+ "xudrpcTradeHistoryResponse": {
+ "type": "object",
+ "properties": {
+ "trades": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/xudrpcTrade"
+ }
}
}
},
diff --git a/lib/proto/xudrpc_grpc_pb.d.ts b/lib/proto/xudrpc_grpc_pb.d.ts
index ede6d57a8..bfe8a8eb9 100644
--- a/lib/proto/xudrpc_grpc_pb.d.ts
+++ b/lib/proto/xudrpc_grpc_pb.d.ts
@@ -89,7 +89,6 @@ interface IXudService extends grpc.ServiceDefinition;
responseDeserialize: grpc.deserialize;
}
-interface IXudService_IListTrades extends grpc.MethodDefinition {
- path: string; // "/xudrpc.Xud/ListTrades"
- requestStream: boolean; // false
- responseStream: boolean; // false
- requestSerialize: grpc.serialize;
- requestDeserialize: grpc.deserialize;
- responseSerialize: grpc.serialize;
- responseDeserialize: grpc.deserialize;
-}
interface IXudService_IOpenChannel extends grpc.MethodDefinition {
path: string; // "/xudrpc.Xud/OpenChannel"
requestStream: boolean; // false
@@ -340,6 +331,15 @@ interface IXudService_ISubscribeSwapFailures extends grpc.MethodDefinition;
responseDeserialize: grpc.deserialize;
}
+interface IXudService_ITradeHistory extends grpc.MethodDefinition {
+ path: string; // "/xudrpc.Xud/TradeHistory"
+ requestStream: boolean; // false
+ responseStream: boolean; // false
+ requestSerialize: grpc.serialize;
+ requestDeserialize: grpc.deserialize;
+ responseSerialize: grpc.serialize;
+ responseDeserialize: grpc.deserialize;
+}
interface IXudService_ITradingLimits extends grpc.MethodDefinition {
path: string; // "/xudrpc.Xud/TradingLimits"
requestStream: boolean; // false
@@ -385,7 +385,6 @@ export interface IXudServer {
listCurrencies: grpc.handleUnaryCall;
listPairs: grpc.handleUnaryCall;
listPeers: grpc.handleUnaryCall;
- listTrades: grpc.handleUnaryCall;
openChannel: grpc.handleUnaryCall;
placeOrder: grpc.handleServerStreamingCall;
placeOrderSync: grpc.handleUnaryCall;
@@ -397,6 +396,7 @@ export interface IXudServer {
subscribeOrders: grpc.handleServerStreamingCall;
subscribeSwaps: grpc.handleServerStreamingCall;
subscribeSwapFailures: grpc.handleServerStreamingCall;
+ tradeHistory: grpc.handleUnaryCall;
tradingLimits: grpc.handleUnaryCall;
unban: grpc.handleUnaryCall;
withdraw: grpc.handleUnaryCall;
@@ -445,9 +445,6 @@ export interface IXudClient {
listPeers(request: xudrpc_pb.ListPeersRequest, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ListPeersResponse) => void): grpc.ClientUnaryCall;
listPeers(request: xudrpc_pb.ListPeersRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ListPeersResponse) => void): grpc.ClientUnaryCall;
listPeers(request: xudrpc_pb.ListPeersRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ListPeersResponse) => void): grpc.ClientUnaryCall;
- listTrades(request: xudrpc_pb.ListTradesRequest, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ListTradesResponse) => void): grpc.ClientUnaryCall;
- listTrades(request: xudrpc_pb.ListTradesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ListTradesResponse) => void): grpc.ClientUnaryCall;
- listTrades(request: xudrpc_pb.ListTradesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ListTradesResponse) => void): grpc.ClientUnaryCall;
openChannel(request: xudrpc_pb.OpenChannelRequest, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.OpenChannelResponse) => void): grpc.ClientUnaryCall;
openChannel(request: xudrpc_pb.OpenChannelRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.OpenChannelResponse) => void): grpc.ClientUnaryCall;
openChannel(request: xudrpc_pb.OpenChannelRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.OpenChannelResponse) => void): grpc.ClientUnaryCall;
@@ -477,6 +474,9 @@ export interface IXudClient {
subscribeSwaps(request: xudrpc_pb.SubscribeSwapsRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream;
subscribeSwapFailures(request: xudrpc_pb.SubscribeSwapsRequest, options?: Partial): grpc.ClientReadableStream;
subscribeSwapFailures(request: xudrpc_pb.SubscribeSwapsRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream;
+ tradeHistory(request: xudrpc_pb.TradeHistoryRequest, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.TradeHistoryResponse) => void): grpc.ClientUnaryCall;
+ tradeHistory(request: xudrpc_pb.TradeHistoryRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.TradeHistoryResponse) => void): grpc.ClientUnaryCall;
+ tradeHistory(request: xudrpc_pb.TradeHistoryRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.TradeHistoryResponse) => void): grpc.ClientUnaryCall;
tradingLimits(request: xudrpc_pb.TradingLimitsRequest, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.TradingLimitsResponse) => void): grpc.ClientUnaryCall;
tradingLimits(request: xudrpc_pb.TradingLimitsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.TradingLimitsResponse) => void): grpc.ClientUnaryCall;
tradingLimits(request: xudrpc_pb.TradingLimitsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.TradingLimitsResponse) => void): grpc.ClientUnaryCall;
@@ -532,9 +532,6 @@ export class XudClient extends grpc.Client implements IXudClient {
public listPeers(request: xudrpc_pb.ListPeersRequest, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ListPeersResponse) => void): grpc.ClientUnaryCall;
public listPeers(request: xudrpc_pb.ListPeersRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ListPeersResponse) => void): grpc.ClientUnaryCall;
public listPeers(request: xudrpc_pb.ListPeersRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ListPeersResponse) => void): grpc.ClientUnaryCall;
- public listTrades(request: xudrpc_pb.ListTradesRequest, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ListTradesResponse) => void): grpc.ClientUnaryCall;
- public listTrades(request: xudrpc_pb.ListTradesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ListTradesResponse) => void): grpc.ClientUnaryCall;
- public listTrades(request: xudrpc_pb.ListTradesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.ListTradesResponse) => void): grpc.ClientUnaryCall;
public openChannel(request: xudrpc_pb.OpenChannelRequest, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.OpenChannelResponse) => void): grpc.ClientUnaryCall;
public openChannel(request: xudrpc_pb.OpenChannelRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.OpenChannelResponse) => void): grpc.ClientUnaryCall;
public openChannel(request: xudrpc_pb.OpenChannelRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.OpenChannelResponse) => void): grpc.ClientUnaryCall;
@@ -564,6 +561,9 @@ export class XudClient extends grpc.Client implements IXudClient {
public subscribeSwaps(request: xudrpc_pb.SubscribeSwapsRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream;
public subscribeSwapFailures(request: xudrpc_pb.SubscribeSwapsRequest, options?: Partial): grpc.ClientReadableStream;
public subscribeSwapFailures(request: xudrpc_pb.SubscribeSwapsRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream;
+ public tradeHistory(request: xudrpc_pb.TradeHistoryRequest, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.TradeHistoryResponse) => void): grpc.ClientUnaryCall;
+ public tradeHistory(request: xudrpc_pb.TradeHistoryRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.TradeHistoryResponse) => void): grpc.ClientUnaryCall;
+ public tradeHistory(request: xudrpc_pb.TradeHistoryRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.TradeHistoryResponse) => void): grpc.ClientUnaryCall;
public tradingLimits(request: xudrpc_pb.TradingLimitsRequest, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.TradingLimitsResponse) => void): grpc.ClientUnaryCall;
public tradingLimits(request: xudrpc_pb.TradingLimitsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.TradingLimitsResponse) => void): grpc.ClientUnaryCall;
public tradingLimits(request: xudrpc_pb.TradingLimitsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: xudrpc_pb.TradingLimitsResponse) => void): grpc.ClientUnaryCall;
diff --git a/lib/proto/xudrpc_grpc_pb.js b/lib/proto/xudrpc_grpc_pb.js
index a05fff963..50ffb88be 100644
--- a/lib/proto/xudrpc_grpc_pb.js
+++ b/lib/proto/xudrpc_grpc_pb.js
@@ -367,28 +367,6 @@ function deserialize_xudrpc_ListPeersResponse(buffer_arg) {
return xudrpc_pb.ListPeersResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
-function serialize_xudrpc_ListTradesRequest(arg) {
- if (!(arg instanceof xudrpc_pb.ListTradesRequest)) {
- throw new Error('Expected argument of type xudrpc.ListTradesRequest');
- }
- return Buffer.from(arg.serializeBinary());
-}
-
-function deserialize_xudrpc_ListTradesRequest(buffer_arg) {
- return xudrpc_pb.ListTradesRequest.deserializeBinary(new Uint8Array(buffer_arg));
-}
-
-function serialize_xudrpc_ListTradesResponse(arg) {
- if (!(arg instanceof xudrpc_pb.ListTradesResponse)) {
- throw new Error('Expected argument of type xudrpc.ListTradesResponse');
- }
- return Buffer.from(arg.serializeBinary());
-}
-
-function deserialize_xudrpc_ListTradesResponse(buffer_arg) {
- return xudrpc_pb.ListTradesResponse.deserializeBinary(new Uint8Array(buffer_arg));
-}
-
function serialize_xudrpc_OpenChannelRequest(arg) {
if (!(arg instanceof xudrpc_pb.OpenChannelRequest)) {
throw new Error('Expected argument of type xudrpc.OpenChannelRequest');
@@ -609,6 +587,28 @@ function deserialize_xudrpc_SwapSuccess(buffer_arg) {
return xudrpc_pb.SwapSuccess.deserializeBinary(new Uint8Array(buffer_arg));
}
+function serialize_xudrpc_TradeHistoryRequest(arg) {
+ if (!(arg instanceof xudrpc_pb.TradeHistoryRequest)) {
+ throw new Error('Expected argument of type xudrpc.TradeHistoryRequest');
+ }
+ return Buffer.from(arg.serializeBinary());
+}
+
+function deserialize_xudrpc_TradeHistoryRequest(buffer_arg) {
+ return xudrpc_pb.TradeHistoryRequest.deserializeBinary(new Uint8Array(buffer_arg));
+}
+
+function serialize_xudrpc_TradeHistoryResponse(arg) {
+ if (!(arg instanceof xudrpc_pb.TradeHistoryResponse)) {
+ throw new Error('Expected argument of type xudrpc.TradeHistoryResponse');
+ }
+ return Buffer.from(arg.serializeBinary());
+}
+
+function deserialize_xudrpc_TradeHistoryResponse(buffer_arg) {
+ return xudrpc_pb.TradeHistoryResponse.deserializeBinary(new Uint8Array(buffer_arg));
+}
+
function serialize_xudrpc_TradingLimitsRequest(arg) {
if (!(arg instanceof xudrpc_pb.TradingLimitsRequest)) {
throw new Error('Expected argument of type xudrpc.TradingLimitsRequest');
@@ -937,19 +937,6 @@ var XudService = exports.XudService = {
responseSerialize: serialize_xudrpc_ListPeersResponse,
responseDeserialize: deserialize_xudrpc_ListPeersResponse,
},
- // Gets a list of completed trades.
- // shell: xucli listtrades [limit]
- listTrades: {
- path: '/xudrpc.Xud/ListTrades',
- requestStream: false,
- responseStream: false,
- requestType: xudrpc_pb.ListTradesRequest,
- responseType: xudrpc_pb.ListTradesResponse,
- requestSerialize: serialize_xudrpc_ListTradesRequest,
- requestDeserialize: deserialize_xudrpc_ListTradesRequest,
- responseSerialize: serialize_xudrpc_ListTradesResponse,
- responseDeserialize: deserialize_xudrpc_ListTradesResponse,
- },
// Opens a payment channel to a peer for the specified amount and currency.
// shell: xucli openchannel
openChannel: {
@@ -1107,6 +1094,19 @@ var XudService = exports.XudService = {
responseSerialize: serialize_xudrpc_SwapFailure,
responseDeserialize: deserialize_xudrpc_SwapFailure,
},
+ // Gets a list of completed trades.
+ // shell: xucli tradehistory [limit]
+ tradeHistory: {
+ path: '/xudrpc.Xud/TradeHistory',
+ requestStream: false,
+ responseStream: false,
+ requestType: xudrpc_pb.TradeHistoryRequest,
+ responseType: xudrpc_pb.TradeHistoryResponse,
+ requestSerialize: serialize_xudrpc_TradeHistoryRequest,
+ requestDeserialize: deserialize_xudrpc_TradeHistoryRequest,
+ responseSerialize: serialize_xudrpc_TradeHistoryResponse,
+ responseDeserialize: deserialize_xudrpc_TradeHistoryResponse,
+ },
// Gets the trading limits for one or all currencies.
// shell: xucli tradinglimits [currency]
tradingLimits: {
diff --git a/lib/proto/xudrpc_pb.d.ts b/lib/proto/xudrpc_pb.d.ts
index 044d7c2cb..1f37bbc65 100644
--- a/lib/proto/xudrpc_pb.d.ts
+++ b/lib/proto/xudrpc_pb.d.ts
@@ -866,50 +866,6 @@ export namespace ListPeersResponse {
}
}
-export class ListTradesRequest extends jspb.Message {
- getLimit(): number;
- setLimit(value: number): void;
-
-
- serializeBinary(): Uint8Array;
- toObject(includeInstance?: boolean): ListTradesRequest.AsObject;
- static toObject(includeInstance: boolean, msg: ListTradesRequest): ListTradesRequest.AsObject;
- static extensions: {[key: number]: jspb.ExtensionFieldInfo};
- static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo};
- static serializeBinaryToWriter(message: ListTradesRequest, writer: jspb.BinaryWriter): void;
- static deserializeBinary(bytes: Uint8Array): ListTradesRequest;
- static deserializeBinaryFromReader(message: ListTradesRequest, reader: jspb.BinaryReader): ListTradesRequest;
-}
-
-export namespace ListTradesRequest {
- export type AsObject = {
- limit: number,
- }
-}
-
-export class ListTradesResponse extends jspb.Message {
- clearTradesList(): void;
- getTradesList(): Array;
- setTradesList(value: Array): void;
- addTrades(value?: Trade, index?: number): Trade;
-
-
- serializeBinary(): Uint8Array;
- toObject(includeInstance?: boolean): ListTradesResponse.AsObject;
- static toObject(includeInstance: boolean, msg: ListTradesResponse): ListTradesResponse.AsObject;
- static extensions: {[key: number]: jspb.ExtensionFieldInfo};
- static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo};
- static serializeBinaryToWriter(message: ListTradesResponse, writer: jspb.BinaryWriter): void;
- static deserializeBinary(bytes: Uint8Array): ListTradesResponse;
- static deserializeBinaryFromReader(message: ListTradesResponse, reader: jspb.BinaryReader): ListTradesResponse;
-}
-
-export namespace ListTradesResponse {
- export type AsObject = {
- tradesList: Array,
- }
-}
-
export class LndInfo extends jspb.Message {
getStatus(): string;
setStatus(value: string): void;
@@ -1845,8 +1801,8 @@ export class SwapSuccess extends jspb.Message {
getPeerPubKey(): string;
setPeerPubKey(value: string): void;
- getRole(): SwapSuccess.Role;
- setRole(value: SwapSuccess.Role): void;
+ getRole(): Role;
+ setRole(value: Role): void;
getCurrencyReceived(): string;
setCurrencyReceived(value: string): void;
@@ -1881,43 +1837,12 @@ export namespace SwapSuccess {
amountReceived: number,
amountSent: number,
peerPubKey: string,
- role: SwapSuccess.Role,
+ role: Role,
currencyReceived: string,
currencySent: string,
rPreimage: string,
price: number,
}
-
- export enum Role {
- TAKER = 0,
- MAKER = 1,
- }
-
-}
-
-export class TradingLimits extends jspb.Message {
- getMaxsell(): number;
- setMaxsell(value: number): void;
-
- getMaxbuy(): number;
- setMaxbuy(value: number): void;
-
-
- serializeBinary(): Uint8Array;
- toObject(includeInstance?: boolean): TradingLimits.AsObject;
- static toObject(includeInstance: boolean, msg: TradingLimits): TradingLimits.AsObject;
- static extensions: {[key: number]: jspb.ExtensionFieldInfo};
- static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo};
- static serializeBinaryToWriter(message: TradingLimits, writer: jspb.BinaryWriter): void;
- static deserializeBinary(bytes: Uint8Array): TradingLimits;
- static deserializeBinaryFromReader(message: TradingLimits, reader: jspb.BinaryReader): TradingLimits;
-}
-
-export namespace TradingLimits {
- export type AsObject = {
- maxsell: number,
- maxbuy: number,
- }
}
export class Trade extends jspb.Message {
@@ -1942,6 +1867,24 @@ export class Trade extends jspb.Message {
getPairId(): string;
setPairId(value: string): void;
+ getPrice(): number;
+ setPrice(value: number): void;
+
+ getRole(): Role;
+ setRole(value: Role): void;
+
+ getExecutedAt(): number;
+ setExecutedAt(value: number): void;
+
+ getSide(): OrderSide;
+ setSide(value: OrderSide): void;
+
+
+ hasCounterparty(): boolean;
+ clearCounterparty(): void;
+ getCounterparty(): NodeIdentifier | undefined;
+ setCounterparty(value?: NodeIdentifier): void;
+
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Trade.AsObject;
@@ -1960,6 +1903,80 @@ export namespace Trade {
rHash: string,
quantity: number,
pairId: string,
+ price: number,
+ role: Role,
+ executedAt: number,
+ side: OrderSide,
+ counterparty?: NodeIdentifier.AsObject,
+ }
+}
+
+export class TradeHistoryRequest extends jspb.Message {
+ getLimit(): number;
+ setLimit(value: number): void;
+
+
+ serializeBinary(): Uint8Array;
+ toObject(includeInstance?: boolean): TradeHistoryRequest.AsObject;
+ static toObject(includeInstance: boolean, msg: TradeHistoryRequest): TradeHistoryRequest.AsObject;
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo};
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo};
+ static serializeBinaryToWriter(message: TradeHistoryRequest, writer: jspb.BinaryWriter): void;
+ static deserializeBinary(bytes: Uint8Array): TradeHistoryRequest;
+ static deserializeBinaryFromReader(message: TradeHistoryRequest, reader: jspb.BinaryReader): TradeHistoryRequest;
+}
+
+export namespace TradeHistoryRequest {
+ export type AsObject = {
+ limit: number,
+ }
+}
+
+export class TradeHistoryResponse extends jspb.Message {
+ clearTradesList(): void;
+ getTradesList(): Array;
+ setTradesList(value: Array): void;
+ addTrades(value?: Trade, index?: number): Trade;
+
+
+ serializeBinary(): Uint8Array;
+ toObject(includeInstance?: boolean): TradeHistoryResponse.AsObject;
+ static toObject(includeInstance: boolean, msg: TradeHistoryResponse): TradeHistoryResponse.AsObject;
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo};
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo};
+ static serializeBinaryToWriter(message: TradeHistoryResponse, writer: jspb.BinaryWriter): void;
+ static deserializeBinary(bytes: Uint8Array): TradeHistoryResponse;
+ static deserializeBinaryFromReader(message: TradeHistoryResponse, reader: jspb.BinaryReader): TradeHistoryResponse;
+}
+
+export namespace TradeHistoryResponse {
+ export type AsObject = {
+ tradesList: Array,
+ }
+}
+
+export class TradingLimits extends jspb.Message {
+ getMaxsell(): number;
+ setMaxsell(value: number): void;
+
+ getMaxbuy(): number;
+ setMaxbuy(value: number): void;
+
+
+ serializeBinary(): Uint8Array;
+ toObject(includeInstance?: boolean): TradingLimits.AsObject;
+ static toObject(includeInstance: boolean, msg: TradingLimits): TradingLimits.AsObject;
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo};
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo};
+ static serializeBinaryToWriter(message: TradingLimits, writer: jspb.BinaryWriter): void;
+ static deserializeBinary(bytes: Uint8Array): TradingLimits;
+ static deserializeBinaryFromReader(message: TradingLimits, reader: jspb.BinaryReader): TradingLimits;
+}
+
+export namespace TradingLimits {
+ export type AsObject = {
+ maxsell: number,
+ maxbuy: number,
}
}
@@ -2164,4 +2181,11 @@ export namespace WithdrawResponse {
export enum OrderSide {
BUY = 0,
SELL = 1,
+ BOTH = 2,
+}
+
+export enum Role {
+ TAKER = 0,
+ MAKER = 1,
+ INTERNAL = 2,
}
diff --git a/lib/proto/xudrpc_pb.js b/lib/proto/xudrpc_pb.js
index 74bae1dd0..3cd7d1a64 100644
--- a/lib/proto/xudrpc_pb.js
+++ b/lib/proto/xudrpc_pb.js
@@ -50,8 +50,6 @@ goog.exportSymbol('proto.xudrpc.ListPairsRequest', null, global);
goog.exportSymbol('proto.xudrpc.ListPairsResponse', null, global);
goog.exportSymbol('proto.xudrpc.ListPeersRequest', null, global);
goog.exportSymbol('proto.xudrpc.ListPeersResponse', null, global);
-goog.exportSymbol('proto.xudrpc.ListTradesRequest', null, global);
-goog.exportSymbol('proto.xudrpc.ListTradesResponse', null, global);
goog.exportSymbol('proto.xudrpc.LndInfo', null, global);
goog.exportSymbol('proto.xudrpc.NodeIdentifier', null, global);
goog.exportSymbol('proto.xudrpc.OpenChannelRequest', null, global);
@@ -75,14 +73,16 @@ goog.exportSymbol('proto.xudrpc.RemovePairRequest', null, global);
goog.exportSymbol('proto.xudrpc.RemovePairResponse', null, global);
goog.exportSymbol('proto.xudrpc.RestoreNodeRequest', null, global);
goog.exportSymbol('proto.xudrpc.RestoreNodeResponse', null, global);
+goog.exportSymbol('proto.xudrpc.Role', null, global);
goog.exportSymbol('proto.xudrpc.ShutdownRequest', null, global);
goog.exportSymbol('proto.xudrpc.ShutdownResponse', null, global);
goog.exportSymbol('proto.xudrpc.SubscribeOrdersRequest', null, global);
goog.exportSymbol('proto.xudrpc.SubscribeSwapsRequest', null, global);
goog.exportSymbol('proto.xudrpc.SwapFailure', null, global);
goog.exportSymbol('proto.xudrpc.SwapSuccess', null, global);
-goog.exportSymbol('proto.xudrpc.SwapSuccess.Role', null, global);
goog.exportSymbol('proto.xudrpc.Trade', null, global);
+goog.exportSymbol('proto.xudrpc.TradeHistoryRequest', null, global);
+goog.exportSymbol('proto.xudrpc.TradeHistoryResponse', null, global);
goog.exportSymbol('proto.xudrpc.TradingLimits', null, global);
goog.exportSymbol('proto.xudrpc.TradingLimitsRequest', null, global);
goog.exportSymbol('proto.xudrpc.TradingLimitsResponse', null, global);
@@ -5867,13 +5867,20 @@ proto.xudrpc.ListPeersResponse.prototype.clearPeersList = function() {
* @extends {jspb.Message}
* @constructor
*/
-proto.xudrpc.ListTradesRequest = function(opt_data) {
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
+proto.xudrpc.LndInfo = function(opt_data) {
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.xudrpc.LndInfo.repeatedFields_, null);
};
-goog.inherits(proto.xudrpc.ListTradesRequest, jspb.Message);
+goog.inherits(proto.xudrpc.LndInfo, jspb.Message);
if (goog.DEBUG && !COMPILED) {
- proto.xudrpc.ListTradesRequest.displayName = 'proto.xudrpc.ListTradesRequest';
+ proto.xudrpc.LndInfo.displayName = 'proto.xudrpc.LndInfo';
}
+/**
+ * List of repeated fields within this message type.
+ * @private {!Array}
+ * @const
+ */
+proto.xudrpc.LndInfo.repeatedFields_ = [3,5];
+
if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -5887,8 +5894,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
-proto.xudrpc.ListTradesRequest.prototype.toObject = function(opt_includeInstance) {
- return proto.xudrpc.ListTradesRequest.toObject(opt_includeInstance, this);
+proto.xudrpc.LndInfo.prototype.toObject = function(opt_includeInstance) {
+ return proto.xudrpc.LndInfo.toObject(opt_includeInstance, this);
};
@@ -5897,13 +5904,20 @@ proto.xudrpc.ListTradesRequest.prototype.toObject = function(opt_includeInstance
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
- * @param {!proto.xudrpc.ListTradesRequest} msg The msg instance to transform.
+ * @param {!proto.xudrpc.LndInfo} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
-proto.xudrpc.ListTradesRequest.toObject = function(includeInstance, msg) {
+proto.xudrpc.LndInfo.toObject = function(includeInstance, msg) {
var f, obj = {
- limit: jspb.Message.getFieldWithDefault(msg, 1, 0)
+ status: jspb.Message.getFieldWithDefault(msg, 1, ""),
+ channels: (f = msg.getChannels()) && proto.xudrpc.Channels.toObject(includeInstance, f),
+ chainsList: jspb.Message.toObjectList(msg.getChainsList(),
+ proto.xudrpc.Chain.toObject, includeInstance),
+ blockheight: jspb.Message.getFieldWithDefault(msg, 4, 0),
+ urisList: jspb.Message.getRepeatedField(msg, 5),
+ version: jspb.Message.getFieldWithDefault(msg, 6, ""),
+ alias: jspb.Message.getFieldWithDefault(msg, 7, "")
};
if (includeInstance) {
@@ -5917,23 +5931,23 @@ proto.xudrpc.ListTradesRequest.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.xudrpc.ListTradesRequest}
+ * @return {!proto.xudrpc.LndInfo}
*/
-proto.xudrpc.ListTradesRequest.deserializeBinary = function(bytes) {
+proto.xudrpc.LndInfo.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
- var msg = new proto.xudrpc.ListTradesRequest;
- return proto.xudrpc.ListTradesRequest.deserializeBinaryFromReader(msg, reader);
+ var msg = new proto.xudrpc.LndInfo;
+ return proto.xudrpc.LndInfo.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
- * @param {!proto.xudrpc.ListTradesRequest} msg The message object to deserialize into.
+ * @param {!proto.xudrpc.LndInfo} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.xudrpc.ListTradesRequest}
+ * @return {!proto.xudrpc.LndInfo}
*/
-proto.xudrpc.ListTradesRequest.deserializeBinaryFromReader = function(msg, reader) {
+proto.xudrpc.LndInfo.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@@ -5941,8 +5955,34 @@ proto.xudrpc.ListTradesRequest.deserializeBinaryFromReader = function(msg, reade
var field = reader.getFieldNumber();
switch (field) {
case 1:
+ var value = /** @type {string} */ (reader.readString());
+ msg.setStatus(value);
+ break;
+ case 2:
+ var value = new proto.xudrpc.Channels;
+ reader.readMessage(value,proto.xudrpc.Channels.deserializeBinaryFromReader);
+ msg.setChannels(value);
+ break;
+ case 3:
+ var value = new proto.xudrpc.Chain;
+ reader.readMessage(value,proto.xudrpc.Chain.deserializeBinaryFromReader);
+ msg.addChains(value);
+ break;
+ case 4:
var value = /** @type {number} */ (reader.readUint32());
- msg.setLimit(value);
+ msg.setBlockheight(value);
+ break;
+ case 5:
+ var value = /** @type {string} */ (reader.readString());
+ msg.addUris(value);
+ break;
+ case 6:
+ var value = /** @type {string} */ (reader.readString());
+ msg.setVersion(value);
+ break;
+ case 7:
+ var value = /** @type {string} */ (reader.readString());
+ msg.setAlias(value);
break;
default:
reader.skipField();
@@ -5957,9 +5997,9 @@ proto.xudrpc.ListTradesRequest.deserializeBinaryFromReader = function(msg, reade
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
-proto.xudrpc.ListTradesRequest.prototype.serializeBinary = function() {
+proto.xudrpc.LndInfo.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
- proto.xudrpc.ListTradesRequest.serializeBinaryToWriter(this, writer);
+ proto.xudrpc.LndInfo.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
@@ -5967,16 +6007,60 @@ proto.xudrpc.ListTradesRequest.prototype.serializeBinary = function() {
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
- * @param {!proto.xudrpc.ListTradesRequest} message
+ * @param {!proto.xudrpc.LndInfo} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
-proto.xudrpc.ListTradesRequest.serializeBinaryToWriter = function(message, writer) {
+proto.xudrpc.LndInfo.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
- f = message.getLimit();
+ f = message.getStatus();
+ if (f.length > 0) {
+ writer.writeString(
+ 1,
+ f
+ );
+ }
+ f = message.getChannels();
+ if (f != null) {
+ writer.writeMessage(
+ 2,
+ f,
+ proto.xudrpc.Channels.serializeBinaryToWriter
+ );
+ }
+ f = message.getChainsList();
+ if (f.length > 0) {
+ writer.writeRepeatedMessage(
+ 3,
+ f,
+ proto.xudrpc.Chain.serializeBinaryToWriter
+ );
+ }
+ f = message.getBlockheight();
if (f !== 0) {
writer.writeUint32(
- 1,
+ 4,
+ f
+ );
+ }
+ f = message.getUrisList();
+ if (f.length > 0) {
+ writer.writeRepeatedString(
+ 5,
+ f
+ );
+ }
+ f = message.getVersion();
+ if (f.length > 0) {
+ writer.writeString(
+ 6,
+ f
+ );
+ }
+ f = message.getAlias();
+ if (f.length > 0) {
+ writer.writeString(
+ 7,
f
);
}
@@ -5984,185 +6068,152 @@ proto.xudrpc.ListTradesRequest.serializeBinaryToWriter = function(message, write
/**
- * optional uint32 limit = 1;
- * @return {number}
+ * optional string status = 1;
+ * @return {string}
*/
-proto.xudrpc.ListTradesRequest.prototype.getLimit = function() {
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
+proto.xudrpc.LndInfo.prototype.getStatus = function() {
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
-/** @param {number} value */
-proto.xudrpc.ListTradesRequest.prototype.setLimit = function(value) {
- jspb.Message.setProto3IntField(this, 1, value);
+/** @param {string} value */
+proto.xudrpc.LndInfo.prototype.setStatus = function(value) {
+ jspb.Message.setProto3StringField(this, 1, 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
+ * optional Channels channels = 2;
+ * @return {?proto.xudrpc.Channels}
*/
-proto.xudrpc.ListTradesResponse = function(opt_data) {
- jspb.Message.initialize(this, opt_data, 0, -1, proto.xudrpc.ListTradesResponse.repeatedFields_, null);
+proto.xudrpc.LndInfo.prototype.getChannels = function() {
+ return /** @type{?proto.xudrpc.Channels} */ (
+ jspb.Message.getWrapperField(this, proto.xudrpc.Channels, 2));
};
-goog.inherits(proto.xudrpc.ListTradesResponse, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
- proto.xudrpc.ListTradesResponse.displayName = 'proto.xudrpc.ListTradesResponse';
-}
-/**
- * List of repeated fields within this message type.
- * @private {!Array}
- * @const
- */
-proto.xudrpc.ListTradesResponse.repeatedFields_ = [1];
+/** @param {?proto.xudrpc.Channels|undefined} value */
+proto.xudrpc.LndInfo.prototype.setChannels = function(value) {
+ jspb.Message.setWrapperField(this, 2, value);
+};
-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.ListTradesResponse.prototype.toObject = function(opt_includeInstance) {
- return proto.xudrpc.ListTradesResponse.toObject(opt_includeInstance, this);
+
+proto.xudrpc.LndInfo.prototype.clearChannels = function() {
+ this.setChannels(undefined);
};
/**
- * 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.ListTradesResponse} msg The msg instance to transform.
- * @return {!Object}
- * @suppress {unusedLocalVariables} f is only used for nested messages
+ * Returns whether this field is set.
+ * @return {boolean}
*/
-proto.xudrpc.ListTradesResponse.toObject = function(includeInstance, msg) {
- var f, obj = {
- tradesList: jspb.Message.toObjectList(msg.getTradesList(),
- proto.xudrpc.Trade.toObject, includeInstance)
- };
-
- if (includeInstance) {
- obj.$jspbMessageInstance = msg;
- }
- return obj;
+proto.xudrpc.LndInfo.prototype.hasChannels = function() {
+ return jspb.Message.getField(this, 2) != null;
};
-}
/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.xudrpc.ListTradesResponse}
+ * repeated Chain chains = 3;
+ * @return {!Array}
*/
-proto.xudrpc.ListTradesResponse.deserializeBinary = function(bytes) {
- var reader = new jspb.BinaryReader(bytes);
- var msg = new proto.xudrpc.ListTradesResponse;
- return proto.xudrpc.ListTradesResponse.deserializeBinaryFromReader(msg, reader);
+proto.xudrpc.LndInfo.prototype.getChainsList = function() {
+ return /** @type{!Array} */ (
+ jspb.Message.getRepeatedWrapperField(this, proto.xudrpc.Chain, 3));
};
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.xudrpc.ListTradesResponse} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.xudrpc.ListTradesResponse}
- */
-proto.xudrpc.ListTradesResponse.deserializeBinaryFromReader = function(msg, reader) {
- while (reader.nextField()) {
- if (reader.isEndGroup()) {
- break;
- }
- var field = reader.getFieldNumber();
- switch (field) {
- case 1:
- var value = new proto.xudrpc.Trade;
- reader.readMessage(value,proto.xudrpc.Trade.deserializeBinaryFromReader);
- msg.addTrades(value);
- break;
- default:
- reader.skipField();
- break;
- }
- }
- return msg;
+/** @param {!Array} value */
+proto.xudrpc.LndInfo.prototype.setChainsList = function(value) {
+ jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
+ * @param {!proto.xudrpc.Chain=} opt_value
+ * @param {number=} opt_index
+ * @return {!proto.xudrpc.Chain}
*/
-proto.xudrpc.ListTradesResponse.prototype.serializeBinary = function() {
- var writer = new jspb.BinaryWriter();
- proto.xudrpc.ListTradesResponse.serializeBinaryToWriter(this, writer);
- return writer.getResultBuffer();
+proto.xudrpc.LndInfo.prototype.addChains = function(opt_value, opt_index) {
+ return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.xudrpc.Chain, opt_index);
};
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.xudrpc.ListTradesResponse} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.xudrpc.ListTradesResponse.serializeBinaryToWriter = function(message, writer) {
- var f = undefined;
- f = message.getTradesList();
- if (f.length > 0) {
- writer.writeRepeatedMessage(
- 1,
- f,
- proto.xudrpc.Trade.serializeBinaryToWriter
- );
- }
+proto.xudrpc.LndInfo.prototype.clearChainsList = function() {
+ this.setChainsList([]);
};
/**
- * repeated Trade trades = 1;
- * @return {!Array}
+ * optional uint32 blockheight = 4;
+ * @return {number}
*/
-proto.xudrpc.ListTradesResponse.prototype.getTradesList = function() {
- return /** @type{!Array} */ (
- jspb.Message.getRepeatedWrapperField(this, proto.xudrpc.Trade, 1));
+proto.xudrpc.LndInfo.prototype.getBlockheight = function() {
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
-/** @param {!Array} value */
-proto.xudrpc.ListTradesResponse.prototype.setTradesList = function(value) {
- jspb.Message.setRepeatedWrapperField(this, 1, value);
+/** @param {number} value */
+proto.xudrpc.LndInfo.prototype.setBlockheight = function(value) {
+ jspb.Message.setProto3IntField(this, 4, value);
};
/**
- * @param {!proto.xudrpc.Trade=} opt_value
+ * repeated string uris = 5;
+ * @return {!Array}
+ */
+proto.xudrpc.LndInfo.prototype.getUrisList = function() {
+ return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5));
+};
+
+
+/** @param {!Array} value */
+proto.xudrpc.LndInfo.prototype.setUrisList = function(value) {
+ jspb.Message.setField(this, 5, value || []);
+};
+
+
+/**
+ * @param {string} value
* @param {number=} opt_index
- * @return {!proto.xudrpc.Trade}
*/
-proto.xudrpc.ListTradesResponse.prototype.addTrades = function(opt_value, opt_index) {
- return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.xudrpc.Trade, opt_index);
+proto.xudrpc.LndInfo.prototype.addUris = function(value, opt_index) {
+ jspb.Message.addToRepeatedField(this, 5, value, opt_index);
};
-proto.xudrpc.ListTradesResponse.prototype.clearTradesList = function() {
- this.setTradesList([]);
+proto.xudrpc.LndInfo.prototype.clearUrisList = function() {
+ this.setUrisList([]);
+};
+
+
+/**
+ * optional string version = 6;
+ * @return {string}
+ */
+proto.xudrpc.LndInfo.prototype.getVersion = function() {
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
+};
+
+
+/** @param {string} value */
+proto.xudrpc.LndInfo.prototype.setVersion = function(value) {
+ jspb.Message.setProto3StringField(this, 6, value);
+};
+
+
+/**
+ * optional string alias = 7;
+ * @return {string}
+ */
+proto.xudrpc.LndInfo.prototype.getAlias = function() {
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
+};
+
+
+/** @param {string} value */
+proto.xudrpc.LndInfo.prototype.setAlias = function(value) {
+ jspb.Message.setProto3StringField(this, 7, value);
};
@@ -6177,20 +6228,13 @@ proto.xudrpc.ListTradesResponse.prototype.clearTradesList = function() {
* @extends {jspb.Message}
* @constructor
*/
-proto.xudrpc.LndInfo = function(opt_data) {
- jspb.Message.initialize(this, opt_data, 0, -1, proto.xudrpc.LndInfo.repeatedFields_, null);
+proto.xudrpc.NodeIdentifier = function(opt_data) {
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
-goog.inherits(proto.xudrpc.LndInfo, jspb.Message);
+goog.inherits(proto.xudrpc.NodeIdentifier, jspb.Message);
if (goog.DEBUG && !COMPILED) {
- proto.xudrpc.LndInfo.displayName = 'proto.xudrpc.LndInfo';
+ proto.xudrpc.NodeIdentifier.displayName = 'proto.xudrpc.NodeIdentifier';
}
-/**
- * List of repeated fields within this message type.
- * @private {!Array}
- * @const
- */
-proto.xudrpc.LndInfo.repeatedFields_ = [3,5];
-
if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -6204,8 +6248,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
-proto.xudrpc.LndInfo.prototype.toObject = function(opt_includeInstance) {
- return proto.xudrpc.LndInfo.toObject(opt_includeInstance, this);
+proto.xudrpc.NodeIdentifier.prototype.toObject = function(opt_includeInstance) {
+ return proto.xudrpc.NodeIdentifier.toObject(opt_includeInstance, this);
};
@@ -6214,20 +6258,14 @@ proto.xudrpc.LndInfo.prototype.toObject = function(opt_includeInstance) {
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
- * @param {!proto.xudrpc.LndInfo} msg The msg instance to transform.
+ * @param {!proto.xudrpc.NodeIdentifier} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
-proto.xudrpc.LndInfo.toObject = function(includeInstance, msg) {
+proto.xudrpc.NodeIdentifier.toObject = function(includeInstance, msg) {
var f, obj = {
- status: jspb.Message.getFieldWithDefault(msg, 1, ""),
- channels: (f = msg.getChannels()) && proto.xudrpc.Channels.toObject(includeInstance, f),
- chainsList: jspb.Message.toObjectList(msg.getChainsList(),
- proto.xudrpc.Chain.toObject, includeInstance),
- blockheight: jspb.Message.getFieldWithDefault(msg, 4, 0),
- urisList: jspb.Message.getRepeatedField(msg, 5),
- version: jspb.Message.getFieldWithDefault(msg, 6, ""),
- alias: jspb.Message.getFieldWithDefault(msg, 7, "")
+ nodePubKey: jspb.Message.getFieldWithDefault(msg, 1, ""),
+ alias: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
@@ -6241,23 +6279,23 @@ proto.xudrpc.LndInfo.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.xudrpc.LndInfo}
+ * @return {!proto.xudrpc.NodeIdentifier}
*/
-proto.xudrpc.LndInfo.deserializeBinary = function(bytes) {
+proto.xudrpc.NodeIdentifier.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
- var msg = new proto.xudrpc.LndInfo;
- return proto.xudrpc.LndInfo.deserializeBinaryFromReader(msg, reader);
+ var msg = new proto.xudrpc.NodeIdentifier;
+ return proto.xudrpc.NodeIdentifier.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
- * @param {!proto.xudrpc.LndInfo} msg The message object to deserialize into.
+ * @param {!proto.xudrpc.NodeIdentifier} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.xudrpc.LndInfo}
+ * @return {!proto.xudrpc.NodeIdentifier}
*/
-proto.xudrpc.LndInfo.deserializeBinaryFromReader = function(msg, reader) {
+proto.xudrpc.NodeIdentifier.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@@ -6266,31 +6304,9 @@ proto.xudrpc.LndInfo.deserializeBinaryFromReader = function(msg, reader) {
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
- msg.setStatus(value);
+ msg.setNodePubKey(value);
break;
case 2:
- var value = new proto.xudrpc.Channels;
- reader.readMessage(value,proto.xudrpc.Channels.deserializeBinaryFromReader);
- msg.setChannels(value);
- break;
- case 3:
- var value = new proto.xudrpc.Chain;
- reader.readMessage(value,proto.xudrpc.Chain.deserializeBinaryFromReader);
- msg.addChains(value);
- break;
- case 4:
- var value = /** @type {number} */ (reader.readUint32());
- msg.setBlockheight(value);
- break;
- case 5:
- var value = /** @type {string} */ (reader.readString());
- msg.addUris(value);
- break;
- case 6:
- var value = /** @type {string} */ (reader.readString());
- msg.setVersion(value);
- break;
- case 7:
var value = /** @type {string} */ (reader.readString());
msg.setAlias(value);
break;
@@ -6307,9 +6323,9 @@ proto.xudrpc.LndInfo.deserializeBinaryFromReader = function(msg, reader) {
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
-proto.xudrpc.LndInfo.prototype.serializeBinary = function() {
+proto.xudrpc.NodeIdentifier.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
- proto.xudrpc.LndInfo.serializeBinaryToWriter(this, writer);
+ proto.xudrpc.NodeIdentifier.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
@@ -6317,60 +6333,23 @@ proto.xudrpc.LndInfo.prototype.serializeBinary = function() {
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
- * @param {!proto.xudrpc.LndInfo} message
+ * @param {!proto.xudrpc.NodeIdentifier} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
-proto.xudrpc.LndInfo.serializeBinaryToWriter = function(message, writer) {
+proto.xudrpc.NodeIdentifier.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
- f = message.getStatus();
+ f = message.getNodePubKey();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
- f = message.getChannels();
- if (f != null) {
- writer.writeMessage(
- 2,
- f,
- proto.xudrpc.Channels.serializeBinaryToWriter
- );
- }
- f = message.getChainsList();
- if (f.length > 0) {
- writer.writeRepeatedMessage(
- 3,
- f,
- proto.xudrpc.Chain.serializeBinaryToWriter
- );
- }
- f = message.getBlockheight();
- if (f !== 0) {
- writer.writeUint32(
- 4,
- f
- );
- }
- f = message.getUrisList();
- if (f.length > 0) {
- writer.writeRepeatedString(
- 5,
- f
- );
- }
- f = message.getVersion();
- if (f.length > 0) {
- writer.writeString(
- 6,
- f
- );
- }
f = message.getAlias();
if (f.length > 0) {
writer.writeString(
- 7,
+ 2,
f
);
}
@@ -6378,204 +6357,86 @@ proto.xudrpc.LndInfo.serializeBinaryToWriter = function(message, writer) {
/**
- * optional string status = 1;
+ * optional string node_pub_key = 1;
* @return {string}
*/
-proto.xudrpc.LndInfo.prototype.getStatus = function() {
+proto.xudrpc.NodeIdentifier.prototype.getNodePubKey = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
-proto.xudrpc.LndInfo.prototype.setStatus = function(value) {
+proto.xudrpc.NodeIdentifier.prototype.setNodePubKey = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
- * optional Channels channels = 2;
- * @return {?proto.xudrpc.Channels}
+ * optional string alias = 2;
+ * @return {string}
*/
-proto.xudrpc.LndInfo.prototype.getChannels = function() {
- return /** @type{?proto.xudrpc.Channels} */ (
- jspb.Message.getWrapperField(this, proto.xudrpc.Channels, 2));
+proto.xudrpc.NodeIdentifier.prototype.getAlias = function() {
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
-/** @param {?proto.xudrpc.Channels|undefined} value */
-proto.xudrpc.LndInfo.prototype.setChannels = function(value) {
- jspb.Message.setWrapperField(this, 2, value);
+/** @param {string} value */
+proto.xudrpc.NodeIdentifier.prototype.setAlias = function(value) {
+ jspb.Message.setProto3StringField(this, 2, value);
};
-proto.xudrpc.LndInfo.prototype.clearChannels = function() {
- this.setChannels(undefined);
-};
-
/**
- * Returns whether this field is set.
- * @return {boolean}
+ * 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.LndInfo.prototype.hasChannels = function() {
- return jspb.Message.getField(this, 2) != null;
+proto.xudrpc.OpenChannelRequest = function(opt_data) {
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
+goog.inherits(proto.xudrpc.OpenChannelRequest, jspb.Message);
+if (goog.DEBUG && !COMPILED) {
+ proto.xudrpc.OpenChannelRequest.displayName = 'proto.xudrpc.OpenChannelRequest';
+}
+if (jspb.Message.GENERATE_TO_OBJECT) {
/**
- * repeated Chain chains = 3;
- * @return {!Array}
+ * 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.LndInfo.prototype.getChainsList = function() {
- return /** @type{!Array} */ (
- jspb.Message.getRepeatedWrapperField(this, proto.xudrpc.Chain, 3));
-};
-
-
-/** @param {!Array} value */
-proto.xudrpc.LndInfo.prototype.setChainsList = function(value) {
- jspb.Message.setRepeatedWrapperField(this, 3, value);
+proto.xudrpc.OpenChannelRequest.prototype.toObject = function(opt_includeInstance) {
+ return proto.xudrpc.OpenChannelRequest.toObject(opt_includeInstance, this);
};
/**
- * @param {!proto.xudrpc.Chain=} opt_value
- * @param {number=} opt_index
- * @return {!proto.xudrpc.Chain}
+ * 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.OpenChannelRequest} msg The msg instance to transform.
+ * @return {!Object}
+ * @suppress {unusedLocalVariables} f is only used for nested messages
*/
-proto.xudrpc.LndInfo.prototype.addChains = function(opt_value, opt_index) {
- return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.xudrpc.Chain, opt_index);
-};
-
-
-proto.xudrpc.LndInfo.prototype.clearChainsList = function() {
- this.setChainsList([]);
-};
-
-
-/**
- * optional uint32 blockheight = 4;
- * @return {number}
- */
-proto.xudrpc.LndInfo.prototype.getBlockheight = function() {
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
-};
-
-
-/** @param {number} value */
-proto.xudrpc.LndInfo.prototype.setBlockheight = function(value) {
- jspb.Message.setProto3IntField(this, 4, value);
-};
-
-
-/**
- * repeated string uris = 5;
- * @return {!Array}
- */
-proto.xudrpc.LndInfo.prototype.getUrisList = function() {
- return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5));
-};
-
-
-/** @param {!Array} value */
-proto.xudrpc.LndInfo.prototype.setUrisList = function(value) {
- jspb.Message.setField(this, 5, value || []);
-};
-
-
-/**
- * @param {string} value
- * @param {number=} opt_index
- */
-proto.xudrpc.LndInfo.prototype.addUris = function(value, opt_index) {
- jspb.Message.addToRepeatedField(this, 5, value, opt_index);
-};
-
-
-proto.xudrpc.LndInfo.prototype.clearUrisList = function() {
- this.setUrisList([]);
-};
-
-
-/**
- * optional string version = 6;
- * @return {string}
- */
-proto.xudrpc.LndInfo.prototype.getVersion = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
-};
-
-
-/** @param {string} value */
-proto.xudrpc.LndInfo.prototype.setVersion = function(value) {
- jspb.Message.setProto3StringField(this, 6, value);
-};
-
-
-/**
- * optional string alias = 7;
- * @return {string}
- */
-proto.xudrpc.LndInfo.prototype.getAlias = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
-};
-
-
-/** @param {string} value */
-proto.xudrpc.LndInfo.prototype.setAlias = function(value) {
- jspb.Message.setProto3StringField(this, 7, 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.NodeIdentifier = function(opt_data) {
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.xudrpc.NodeIdentifier, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
- proto.xudrpc.NodeIdentifier.displayName = 'proto.xudrpc.NodeIdentifier';
-}
-
-
-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.NodeIdentifier.prototype.toObject = function(opt_includeInstance) {
- return proto.xudrpc.NodeIdentifier.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.NodeIdentifier} msg The msg instance to transform.
- * @return {!Object}
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.xudrpc.NodeIdentifier.toObject = function(includeInstance, msg) {
+proto.xudrpc.OpenChannelRequest.toObject = function(includeInstance, msg) {
var f, obj = {
- nodePubKey: jspb.Message.getFieldWithDefault(msg, 1, ""),
- alias: jspb.Message.getFieldWithDefault(msg, 2, "")
+ nodeIdentifier: jspb.Message.getFieldWithDefault(msg, 1, ""),
+ currency: jspb.Message.getFieldWithDefault(msg, 2, ""),
+ amount: jspb.Message.getFieldWithDefault(msg, 3, 0),
+ pushAmount: jspb.Message.getFieldWithDefault(msg, 4, 0)
};
if (includeInstance) {
@@ -6589,23 +6450,23 @@ proto.xudrpc.NodeIdentifier.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.xudrpc.NodeIdentifier}
+ * @return {!proto.xudrpc.OpenChannelRequest}
*/
-proto.xudrpc.NodeIdentifier.deserializeBinary = function(bytes) {
+proto.xudrpc.OpenChannelRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
- var msg = new proto.xudrpc.NodeIdentifier;
- return proto.xudrpc.NodeIdentifier.deserializeBinaryFromReader(msg, reader);
+ var msg = new proto.xudrpc.OpenChannelRequest;
+ return proto.xudrpc.OpenChannelRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
- * @param {!proto.xudrpc.NodeIdentifier} msg The message object to deserialize into.
+ * @param {!proto.xudrpc.OpenChannelRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.xudrpc.NodeIdentifier}
+ * @return {!proto.xudrpc.OpenChannelRequest}
*/
-proto.xudrpc.NodeIdentifier.deserializeBinaryFromReader = function(msg, reader) {
+proto.xudrpc.OpenChannelRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@@ -6614,11 +6475,19 @@ proto.xudrpc.NodeIdentifier.deserializeBinaryFromReader = function(msg, reader)
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
- msg.setNodePubKey(value);
+ msg.setNodeIdentifier(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
- msg.setAlias(value);
+ msg.setCurrency(value);
+ break;
+ case 3:
+ var value = /** @type {number} */ (reader.readUint64());
+ msg.setAmount(value);
+ break;
+ case 4:
+ var value = /** @type {number} */ (reader.readUint64());
+ msg.setPushAmount(value);
break;
default:
reader.skipField();
@@ -6633,9 +6502,9 @@ proto.xudrpc.NodeIdentifier.deserializeBinaryFromReader = function(msg, reader)
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
-proto.xudrpc.NodeIdentifier.prototype.serializeBinary = function() {
+proto.xudrpc.OpenChannelRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
- proto.xudrpc.NodeIdentifier.serializeBinaryToWriter(this, writer);
+ proto.xudrpc.OpenChannelRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
@@ -6643,59 +6512,103 @@ proto.xudrpc.NodeIdentifier.prototype.serializeBinary = function() {
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
- * @param {!proto.xudrpc.NodeIdentifier} message
+ * @param {!proto.xudrpc.OpenChannelRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
-proto.xudrpc.NodeIdentifier.serializeBinaryToWriter = function(message, writer) {
+proto.xudrpc.OpenChannelRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
- f = message.getNodePubKey();
+ f = message.getNodeIdentifier();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
- f = message.getAlias();
+ f = message.getCurrency();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
+ f = message.getAmount();
+ if (f !== 0) {
+ writer.writeUint64(
+ 3,
+ f
+ );
+ }
+ f = message.getPushAmount();
+ if (f !== 0) {
+ writer.writeUint64(
+ 4,
+ f
+ );
+ }
};
/**
- * optional string node_pub_key = 1;
+ * optional string node_identifier = 1;
* @return {string}
*/
-proto.xudrpc.NodeIdentifier.prototype.getNodePubKey = function() {
+proto.xudrpc.OpenChannelRequest.prototype.getNodeIdentifier = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
-proto.xudrpc.NodeIdentifier.prototype.setNodePubKey = function(value) {
+proto.xudrpc.OpenChannelRequest.prototype.setNodeIdentifier = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
- * optional string alias = 2;
+ * optional string currency = 2;
* @return {string}
*/
-proto.xudrpc.NodeIdentifier.prototype.getAlias = function() {
+proto.xudrpc.OpenChannelRequest.prototype.getCurrency = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
-proto.xudrpc.NodeIdentifier.prototype.setAlias = function(value) {
+proto.xudrpc.OpenChannelRequest.prototype.setCurrency = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
+/**
+ * optional uint64 amount = 3;
+ * @return {number}
+ */
+proto.xudrpc.OpenChannelRequest.prototype.getAmount = function() {
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
+};
+
+
+/** @param {number} value */
+proto.xudrpc.OpenChannelRequest.prototype.setAmount = function(value) {
+ jspb.Message.setProto3IntField(this, 3, value);
+};
+
+
+/**
+ * optional uint64 push_amount = 4;
+ * @return {number}
+ */
+proto.xudrpc.OpenChannelRequest.prototype.getPushAmount = function() {
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
+};
+
+
+/** @param {number} value */
+proto.xudrpc.OpenChannelRequest.prototype.setPushAmount = function(value) {
+ jspb.Message.setProto3IntField(this, 4, value);
+};
+
+
/**
* Generated by JsPbCodeGenerator.
@@ -6707,12 +6620,12 @@ proto.xudrpc.NodeIdentifier.prototype.setAlias = function(value) {
* @extends {jspb.Message}
* @constructor
*/
-proto.xudrpc.OpenChannelRequest = function(opt_data) {
+proto.xudrpc.OpenChannelResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
-goog.inherits(proto.xudrpc.OpenChannelRequest, jspb.Message);
+goog.inherits(proto.xudrpc.OpenChannelResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
- proto.xudrpc.OpenChannelRequest.displayName = 'proto.xudrpc.OpenChannelRequest';
+ proto.xudrpc.OpenChannelResponse.displayName = 'proto.xudrpc.OpenChannelResponse';
}
@@ -6727,8 +6640,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
-proto.xudrpc.OpenChannelRequest.prototype.toObject = function(opt_includeInstance) {
- return proto.xudrpc.OpenChannelRequest.toObject(opt_includeInstance, this);
+proto.xudrpc.OpenChannelResponse.prototype.toObject = function(opt_includeInstance) {
+ return proto.xudrpc.OpenChannelResponse.toObject(opt_includeInstance, this);
};
@@ -6737,16 +6650,13 @@ proto.xudrpc.OpenChannelRequest.prototype.toObject = function(opt_includeInstanc
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
- * @param {!proto.xudrpc.OpenChannelRequest} msg The msg instance to transform.
+ * @param {!proto.xudrpc.OpenChannelResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
-proto.xudrpc.OpenChannelRequest.toObject = function(includeInstance, msg) {
+proto.xudrpc.OpenChannelResponse.toObject = function(includeInstance, msg) {
var f, obj = {
- nodeIdentifier: jspb.Message.getFieldWithDefault(msg, 1, ""),
- currency: jspb.Message.getFieldWithDefault(msg, 2, ""),
- amount: jspb.Message.getFieldWithDefault(msg, 3, 0),
- pushAmount: jspb.Message.getFieldWithDefault(msg, 4, 0)
+
};
if (includeInstance) {
@@ -6760,243 +6670,23 @@ proto.xudrpc.OpenChannelRequest.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.xudrpc.OpenChannelRequest}
+ * @return {!proto.xudrpc.OpenChannelResponse}
*/
-proto.xudrpc.OpenChannelRequest.deserializeBinary = function(bytes) {
+proto.xudrpc.OpenChannelResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
- var msg = new proto.xudrpc.OpenChannelRequest;
- return proto.xudrpc.OpenChannelRequest.deserializeBinaryFromReader(msg, reader);
+ var msg = new proto.xudrpc.OpenChannelResponse;
+ return proto.xudrpc.OpenChannelResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
- * @param {!proto.xudrpc.OpenChannelRequest} msg The message object to deserialize into.
+ * @param {!proto.xudrpc.OpenChannelResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.xudrpc.OpenChannelRequest}
+ * @return {!proto.xudrpc.OpenChannelResponse}
*/
-proto.xudrpc.OpenChannelRequest.deserializeBinaryFromReader = function(msg, reader) {
- while (reader.nextField()) {
- if (reader.isEndGroup()) {
- break;
- }
- var field = reader.getFieldNumber();
- switch (field) {
- case 1:
- var value = /** @type {string} */ (reader.readString());
- msg.setNodeIdentifier(value);
- break;
- case 2:
- var value = /** @type {string} */ (reader.readString());
- msg.setCurrency(value);
- break;
- case 3:
- var value = /** @type {number} */ (reader.readUint64());
- msg.setAmount(value);
- break;
- case 4:
- var value = /** @type {number} */ (reader.readUint64());
- msg.setPushAmount(value);
- break;
- default:
- reader.skipField();
- break;
- }
- }
- return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.xudrpc.OpenChannelRequest.prototype.serializeBinary = function() {
- var writer = new jspb.BinaryWriter();
- proto.xudrpc.OpenChannelRequest.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.OpenChannelRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.xudrpc.OpenChannelRequest.serializeBinaryToWriter = function(message, writer) {
- var f = undefined;
- f = message.getNodeIdentifier();
- if (f.length > 0) {
- writer.writeString(
- 1,
- f
- );
- }
- f = message.getCurrency();
- if (f.length > 0) {
- writer.writeString(
- 2,
- f
- );
- }
- f = message.getAmount();
- if (f !== 0) {
- writer.writeUint64(
- 3,
- f
- );
- }
- f = message.getPushAmount();
- if (f !== 0) {
- writer.writeUint64(
- 4,
- f
- );
- }
-};
-
-
-/**
- * optional string node_identifier = 1;
- * @return {string}
- */
-proto.xudrpc.OpenChannelRequest.prototype.getNodeIdentifier = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
-};
-
-
-/** @param {string} value */
-proto.xudrpc.OpenChannelRequest.prototype.setNodeIdentifier = function(value) {
- jspb.Message.setProto3StringField(this, 1, value);
-};
-
-
-/**
- * optional string currency = 2;
- * @return {string}
- */
-proto.xudrpc.OpenChannelRequest.prototype.getCurrency = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
-};
-
-
-/** @param {string} value */
-proto.xudrpc.OpenChannelRequest.prototype.setCurrency = function(value) {
- jspb.Message.setProto3StringField(this, 2, value);
-};
-
-
-/**
- * optional uint64 amount = 3;
- * @return {number}
- */
-proto.xudrpc.OpenChannelRequest.prototype.getAmount = function() {
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
-};
-
-
-/** @param {number} value */
-proto.xudrpc.OpenChannelRequest.prototype.setAmount = function(value) {
- jspb.Message.setProto3IntField(this, 3, value);
-};
-
-
-/**
- * optional uint64 push_amount = 4;
- * @return {number}
- */
-proto.xudrpc.OpenChannelRequest.prototype.getPushAmount = function() {
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
-};
-
-
-/** @param {number} value */
-proto.xudrpc.OpenChannelRequest.prototype.setPushAmount = function(value) {
- jspb.Message.setProto3IntField(this, 4, 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.OpenChannelResponse = function(opt_data) {
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.xudrpc.OpenChannelResponse, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
- proto.xudrpc.OpenChannelResponse.displayName = 'proto.xudrpc.OpenChannelResponse';
-}
-
-
-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.OpenChannelResponse.prototype.toObject = function(opt_includeInstance) {
- return proto.xudrpc.OpenChannelResponse.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.OpenChannelResponse} msg The msg instance to transform.
- * @return {!Object}
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.xudrpc.OpenChannelResponse.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.OpenChannelResponse}
- */
-proto.xudrpc.OpenChannelResponse.deserializeBinary = function(bytes) {
- var reader = new jspb.BinaryReader(bytes);
- var msg = new proto.xudrpc.OpenChannelResponse;
- return proto.xudrpc.OpenChannelResponse.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.xudrpc.OpenChannelResponse} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.xudrpc.OpenChannelResponse}
- */
-proto.xudrpc.OpenChannelResponse.deserializeBinaryFromReader = function(msg, reader) {
+proto.xudrpc.OpenChannelResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@@ -12168,77 +11858,543 @@ proto.xudrpc.SwapFailure.serializeBinaryToWriter = function(message, writer) {
/**
- * optional string order_id = 1;
+ * optional string order_id = 1;
+ * @return {string}
+ */
+proto.xudrpc.SwapFailure.prototype.getOrderId = function() {
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
+};
+
+
+/** @param {string} value */
+proto.xudrpc.SwapFailure.prototype.setOrderId = function(value) {
+ jspb.Message.setProto3StringField(this, 1, value);
+};
+
+
+/**
+ * optional string pair_id = 2;
+ * @return {string}
+ */
+proto.xudrpc.SwapFailure.prototype.getPairId = function() {
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
+};
+
+
+/** @param {string} value */
+proto.xudrpc.SwapFailure.prototype.setPairId = function(value) {
+ jspb.Message.setProto3StringField(this, 2, value);
+};
+
+
+/**
+ * optional uint64 quantity = 3;
+ * @return {number}
+ */
+proto.xudrpc.SwapFailure.prototype.getQuantity = function() {
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
+};
+
+
+/** @param {number} value */
+proto.xudrpc.SwapFailure.prototype.setQuantity = function(value) {
+ jspb.Message.setProto3IntField(this, 3, value);
+};
+
+
+/**
+ * optional string peer_pub_key = 4;
+ * @return {string}
+ */
+proto.xudrpc.SwapFailure.prototype.getPeerPubKey = function() {
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
+};
+
+
+/** @param {string} value */
+proto.xudrpc.SwapFailure.prototype.setPeerPubKey = function(value) {
+ jspb.Message.setProto3StringField(this, 4, value);
+};
+
+
+/**
+ * optional string failure_reason = 5;
+ * @return {string}
+ */
+proto.xudrpc.SwapFailure.prototype.getFailureReason = function() {
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
+};
+
+
+/** @param {string} value */
+proto.xudrpc.SwapFailure.prototype.setFailureReason = function(value) {
+ jspb.Message.setProto3StringField(this, 5, 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.SwapSuccess = function(opt_data) {
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
+};
+goog.inherits(proto.xudrpc.SwapSuccess, jspb.Message);
+if (goog.DEBUG && !COMPILED) {
+ proto.xudrpc.SwapSuccess.displayName = 'proto.xudrpc.SwapSuccess';
+}
+
+
+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.SwapSuccess.prototype.toObject = function(opt_includeInstance) {
+ return proto.xudrpc.SwapSuccess.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.SwapSuccess} msg The msg instance to transform.
+ * @return {!Object}
+ * @suppress {unusedLocalVariables} f is only used for nested messages
+ */
+proto.xudrpc.SwapSuccess.toObject = function(includeInstance, msg) {
+ var f, obj = {
+ orderId: jspb.Message.getFieldWithDefault(msg, 1, ""),
+ localId: jspb.Message.getFieldWithDefault(msg, 2, ""),
+ pairId: jspb.Message.getFieldWithDefault(msg, 3, ""),
+ quantity: jspb.Message.getFieldWithDefault(msg, 4, 0),
+ rHash: jspb.Message.getFieldWithDefault(msg, 5, ""),
+ amountReceived: jspb.Message.getFieldWithDefault(msg, 8, 0),
+ amountSent: jspb.Message.getFieldWithDefault(msg, 9, 0),
+ peerPubKey: jspb.Message.getFieldWithDefault(msg, 10, ""),
+ role: jspb.Message.getFieldWithDefault(msg, 11, 0),
+ currencyReceived: jspb.Message.getFieldWithDefault(msg, 12, ""),
+ currencySent: jspb.Message.getFieldWithDefault(msg, 13, ""),
+ rPreimage: jspb.Message.getFieldWithDefault(msg, 14, ""),
+ price: +jspb.Message.getFieldWithDefault(msg, 15, 0.0)
+ };
+
+ if (includeInstance) {
+ obj.$jspbMessageInstance = msg;
+ }
+ return obj;
+};
+}
+
+
+/**
+ * Deserializes binary data (in protobuf wire format).
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
+ * @return {!proto.xudrpc.SwapSuccess}
+ */
+proto.xudrpc.SwapSuccess.deserializeBinary = function(bytes) {
+ var reader = new jspb.BinaryReader(bytes);
+ var msg = new proto.xudrpc.SwapSuccess;
+ return proto.xudrpc.SwapSuccess.deserializeBinaryFromReader(msg, reader);
+};
+
+
+/**
+ * Deserializes binary data (in protobuf wire format) from the
+ * given reader into the given message object.
+ * @param {!proto.xudrpc.SwapSuccess} msg The message object to deserialize into.
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
+ * @return {!proto.xudrpc.SwapSuccess}
+ */
+proto.xudrpc.SwapSuccess.deserializeBinaryFromReader = function(msg, reader) {
+ while (reader.nextField()) {
+ if (reader.isEndGroup()) {
+ break;
+ }
+ var field = reader.getFieldNumber();
+ switch (field) {
+ case 1:
+ var value = /** @type {string} */ (reader.readString());
+ msg.setOrderId(value);
+ break;
+ case 2:
+ var value = /** @type {string} */ (reader.readString());
+ msg.setLocalId(value);
+ break;
+ case 3:
+ var value = /** @type {string} */ (reader.readString());
+ msg.setPairId(value);
+ break;
+ case 4:
+ var value = /** @type {number} */ (reader.readUint64());
+ msg.setQuantity(value);
+ break;
+ case 5:
+ var value = /** @type {string} */ (reader.readString());
+ msg.setRHash(value);
+ break;
+ case 8:
+ var value = /** @type {number} */ (reader.readUint64());
+ msg.setAmountReceived(value);
+ break;
+ case 9:
+ var value = /** @type {number} */ (reader.readUint64());
+ msg.setAmountSent(value);
+ break;
+ case 10:
+ var value = /** @type {string} */ (reader.readString());
+ msg.setPeerPubKey(value);
+ break;
+ case 11:
+ var value = /** @type {!proto.xudrpc.Role} */ (reader.readEnum());
+ msg.setRole(value);
+ break;
+ case 12:
+ var value = /** @type {string} */ (reader.readString());
+ msg.setCurrencyReceived(value);
+ break;
+ case 13:
+ var value = /** @type {string} */ (reader.readString());
+ msg.setCurrencySent(value);
+ break;
+ case 14:
+ var value = /** @type {string} */ (reader.readString());
+ msg.setRPreimage(value);
+ break;
+ case 15:
+ var value = /** @type {number} */ (reader.readDouble());
+ msg.setPrice(value);
+ break;
+ default:
+ reader.skipField();
+ break;
+ }
+ }
+ return msg;
+};
+
+
+/**
+ * Serializes the message to binary data (in protobuf wire format).
+ * @return {!Uint8Array}
+ */
+proto.xudrpc.SwapSuccess.prototype.serializeBinary = function() {
+ var writer = new jspb.BinaryWriter();
+ proto.xudrpc.SwapSuccess.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.SwapSuccess} message
+ * @param {!jspb.BinaryWriter} writer
+ * @suppress {unusedLocalVariables} f is only used for nested messages
+ */
+proto.xudrpc.SwapSuccess.serializeBinaryToWriter = function(message, writer) {
+ var f = undefined;
+ f = message.getOrderId();
+ if (f.length > 0) {
+ writer.writeString(
+ 1,
+ f
+ );
+ }
+ f = message.getLocalId();
+ if (f.length > 0) {
+ writer.writeString(
+ 2,
+ f
+ );
+ }
+ f = message.getPairId();
+ if (f.length > 0) {
+ writer.writeString(
+ 3,
+ f
+ );
+ }
+ f = message.getQuantity();
+ if (f !== 0) {
+ writer.writeUint64(
+ 4,
+ f
+ );
+ }
+ f = message.getRHash();
+ if (f.length > 0) {
+ writer.writeString(
+ 5,
+ f
+ );
+ }
+ f = message.getAmountReceived();
+ if (f !== 0) {
+ writer.writeUint64(
+ 8,
+ f
+ );
+ }
+ f = message.getAmountSent();
+ if (f !== 0) {
+ writer.writeUint64(
+ 9,
+ f
+ );
+ }
+ f = message.getPeerPubKey();
+ if (f.length > 0) {
+ writer.writeString(
+ 10,
+ f
+ );
+ }
+ f = message.getRole();
+ if (f !== 0.0) {
+ writer.writeEnum(
+ 11,
+ f
+ );
+ }
+ f = message.getCurrencyReceived();
+ if (f.length > 0) {
+ writer.writeString(
+ 12,
+ f
+ );
+ }
+ f = message.getCurrencySent();
+ if (f.length > 0) {
+ writer.writeString(
+ 13,
+ f
+ );
+ }
+ f = message.getRPreimage();
+ if (f.length > 0) {
+ writer.writeString(
+ 14,
+ f
+ );
+ }
+ f = message.getPrice();
+ if (f !== 0.0) {
+ writer.writeDouble(
+ 15,
+ f
+ );
+ }
+};
+
+
+/**
+ * optional string order_id = 1;
+ * @return {string}
+ */
+proto.xudrpc.SwapSuccess.prototype.getOrderId = function() {
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
+};
+
+
+/** @param {string} value */
+proto.xudrpc.SwapSuccess.prototype.setOrderId = function(value) {
+ jspb.Message.setProto3StringField(this, 1, value);
+};
+
+
+/**
+ * optional string local_id = 2;
+ * @return {string}
+ */
+proto.xudrpc.SwapSuccess.prototype.getLocalId = function() {
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
+};
+
+
+/** @param {string} value */
+proto.xudrpc.SwapSuccess.prototype.setLocalId = function(value) {
+ jspb.Message.setProto3StringField(this, 2, value);
+};
+
+
+/**
+ * optional string pair_id = 3;
+ * @return {string}
+ */
+proto.xudrpc.SwapSuccess.prototype.getPairId = function() {
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
+};
+
+
+/** @param {string} value */
+proto.xudrpc.SwapSuccess.prototype.setPairId = function(value) {
+ jspb.Message.setProto3StringField(this, 3, value);
+};
+
+
+/**
+ * optional uint64 quantity = 4;
+ * @return {number}
+ */
+proto.xudrpc.SwapSuccess.prototype.getQuantity = function() {
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
+};
+
+
+/** @param {number} value */
+proto.xudrpc.SwapSuccess.prototype.setQuantity = function(value) {
+ jspb.Message.setProto3IntField(this, 4, value);
+};
+
+
+/**
+ * optional string r_hash = 5;
+ * @return {string}
+ */
+proto.xudrpc.SwapSuccess.prototype.getRHash = function() {
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
+};
+
+
+/** @param {string} value */
+proto.xudrpc.SwapSuccess.prototype.setRHash = function(value) {
+ jspb.Message.setProto3StringField(this, 5, value);
+};
+
+
+/**
+ * optional uint64 amount_received = 8;
+ * @return {number}
+ */
+proto.xudrpc.SwapSuccess.prototype.getAmountReceived = function() {
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
+};
+
+
+/** @param {number} value */
+proto.xudrpc.SwapSuccess.prototype.setAmountReceived = function(value) {
+ jspb.Message.setProto3IntField(this, 8, value);
+};
+
+
+/**
+ * optional uint64 amount_sent = 9;
+ * @return {number}
+ */
+proto.xudrpc.SwapSuccess.prototype.getAmountSent = function() {
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
+};
+
+
+/** @param {number} value */
+proto.xudrpc.SwapSuccess.prototype.setAmountSent = function(value) {
+ jspb.Message.setProto3IntField(this, 9, value);
+};
+
+
+/**
+ * optional string peer_pub_key = 10;
* @return {string}
*/
-proto.xudrpc.SwapFailure.prototype.getOrderId = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
+proto.xudrpc.SwapSuccess.prototype.getPeerPubKey = function() {
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
};
/** @param {string} value */
-proto.xudrpc.SwapFailure.prototype.setOrderId = function(value) {
- jspb.Message.setProto3StringField(this, 1, value);
+proto.xudrpc.SwapSuccess.prototype.setPeerPubKey = function(value) {
+ jspb.Message.setProto3StringField(this, 10, value);
};
/**
- * optional string pair_id = 2;
- * @return {string}
+ * optional Role role = 11;
+ * @return {!proto.xudrpc.Role}
*/
-proto.xudrpc.SwapFailure.prototype.getPairId = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
+proto.xudrpc.SwapSuccess.prototype.getRole = function() {
+ return /** @type {!proto.xudrpc.Role} */ (jspb.Message.getFieldWithDefault(this, 11, 0));
};
-/** @param {string} value */
-proto.xudrpc.SwapFailure.prototype.setPairId = function(value) {
- jspb.Message.setProto3StringField(this, 2, value);
+/** @param {!proto.xudrpc.Role} value */
+proto.xudrpc.SwapSuccess.prototype.setRole = function(value) {
+ jspb.Message.setProto3EnumField(this, 11, value);
};
/**
- * optional uint64 quantity = 3;
- * @return {number}
+ * optional string currency_received = 12;
+ * @return {string}
*/
-proto.xudrpc.SwapFailure.prototype.getQuantity = function() {
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
+proto.xudrpc.SwapSuccess.prototype.getCurrencyReceived = function() {
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
};
-/** @param {number} value */
-proto.xudrpc.SwapFailure.prototype.setQuantity = function(value) {
- jspb.Message.setProto3IntField(this, 3, value);
+/** @param {string} value */
+proto.xudrpc.SwapSuccess.prototype.setCurrencyReceived = function(value) {
+ jspb.Message.setProto3StringField(this, 12, value);
};
/**
- * optional string peer_pub_key = 4;
+ * optional string currency_sent = 13;
* @return {string}
*/
-proto.xudrpc.SwapFailure.prototype.getPeerPubKey = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
+proto.xudrpc.SwapSuccess.prototype.getCurrencySent = function() {
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, ""));
};
/** @param {string} value */
-proto.xudrpc.SwapFailure.prototype.setPeerPubKey = function(value) {
- jspb.Message.setProto3StringField(this, 4, value);
+proto.xudrpc.SwapSuccess.prototype.setCurrencySent = function(value) {
+ jspb.Message.setProto3StringField(this, 13, value);
};
/**
- * optional string failure_reason = 5;
+ * optional string r_preimage = 14;
* @return {string}
*/
-proto.xudrpc.SwapFailure.prototype.getFailureReason = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
+proto.xudrpc.SwapSuccess.prototype.getRPreimage = function() {
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, ""));
};
/** @param {string} value */
-proto.xudrpc.SwapFailure.prototype.setFailureReason = function(value) {
- jspb.Message.setProto3StringField(this, 5, value);
+proto.xudrpc.SwapSuccess.prototype.setRPreimage = function(value) {
+ jspb.Message.setProto3StringField(this, 14, value);
+};
+
+
+/**
+ * optional double price = 15;
+ * @return {number}
+ */
+proto.xudrpc.SwapSuccess.prototype.getPrice = function() {
+ return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 15, 0.0));
+};
+
+
+/** @param {number} value */
+proto.xudrpc.SwapSuccess.prototype.setPrice = function(value) {
+ jspb.Message.setProto3FloatField(this, 15, value);
};
@@ -12253,12 +12409,12 @@ proto.xudrpc.SwapFailure.prototype.setFailureReason = function(value) {
* @extends {jspb.Message}
* @constructor
*/
-proto.xudrpc.SwapSuccess = function(opt_data) {
+proto.xudrpc.Trade = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
-goog.inherits(proto.xudrpc.SwapSuccess, jspb.Message);
+goog.inherits(proto.xudrpc.Trade, jspb.Message);
if (goog.DEBUG && !COMPILED) {
- proto.xudrpc.SwapSuccess.displayName = 'proto.xudrpc.SwapSuccess';
+ proto.xudrpc.Trade.displayName = 'proto.xudrpc.Trade';
}
@@ -12273,8 +12429,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
-proto.xudrpc.SwapSuccess.prototype.toObject = function(opt_includeInstance) {
- return proto.xudrpc.SwapSuccess.toObject(opt_includeInstance, this);
+proto.xudrpc.Trade.prototype.toObject = function(opt_includeInstance) {
+ return proto.xudrpc.Trade.toObject(opt_includeInstance, this);
};
@@ -12283,25 +12439,22 @@ proto.xudrpc.SwapSuccess.prototype.toObject = function(opt_includeInstance) {
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
- * @param {!proto.xudrpc.SwapSuccess} msg The msg instance to transform.
+ * @param {!proto.xudrpc.Trade} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
-proto.xudrpc.SwapSuccess.toObject = function(includeInstance, msg) {
+proto.xudrpc.Trade.toObject = function(includeInstance, msg) {
var f, obj = {
- orderId: jspb.Message.getFieldWithDefault(msg, 1, ""),
- localId: jspb.Message.getFieldWithDefault(msg, 2, ""),
- pairId: jspb.Message.getFieldWithDefault(msg, 3, ""),
+ makerOrder: (f = msg.getMakerOrder()) && proto.xudrpc.Order.toObject(includeInstance, f),
+ takerOrder: (f = msg.getTakerOrder()) && proto.xudrpc.Order.toObject(includeInstance, f),
+ rHash: jspb.Message.getFieldWithDefault(msg, 3, ""),
quantity: jspb.Message.getFieldWithDefault(msg, 4, 0),
- rHash: jspb.Message.getFieldWithDefault(msg, 5, ""),
- amountReceived: jspb.Message.getFieldWithDefault(msg, 8, 0),
- amountSent: jspb.Message.getFieldWithDefault(msg, 9, 0),
- peerPubKey: jspb.Message.getFieldWithDefault(msg, 10, ""),
- role: jspb.Message.getFieldWithDefault(msg, 11, 0),
- currencyReceived: jspb.Message.getFieldWithDefault(msg, 12, ""),
- currencySent: jspb.Message.getFieldWithDefault(msg, 13, ""),
- rPreimage: jspb.Message.getFieldWithDefault(msg, 14, ""),
- price: +jspb.Message.getFieldWithDefault(msg, 15, 0.0)
+ pairId: jspb.Message.getFieldWithDefault(msg, 5, ""),
+ price: +jspb.Message.getFieldWithDefault(msg, 6, 0.0),
+ role: jspb.Message.getFieldWithDefault(msg, 7, 0),
+ executedAt: jspb.Message.getFieldWithDefault(msg, 8, 0),
+ side: jspb.Message.getFieldWithDefault(msg, 9, 0),
+ counterparty: (f = msg.getCounterparty()) && proto.xudrpc.NodeIdentifier.toObject(includeInstance, f)
};
if (includeInstance) {
@@ -12315,23 +12468,23 @@ proto.xudrpc.SwapSuccess.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.xudrpc.SwapSuccess}
+ * @return {!proto.xudrpc.Trade}
*/
-proto.xudrpc.SwapSuccess.deserializeBinary = function(bytes) {
+proto.xudrpc.Trade.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
- var msg = new proto.xudrpc.SwapSuccess;
- return proto.xudrpc.SwapSuccess.deserializeBinaryFromReader(msg, reader);
+ var msg = new proto.xudrpc.Trade;
+ return proto.xudrpc.Trade.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
- * @param {!proto.xudrpc.SwapSuccess} msg The message object to deserialize into.
+ * @param {!proto.xudrpc.Trade} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.xudrpc.SwapSuccess}
+ * @return {!proto.xudrpc.Trade}
*/
-proto.xudrpc.SwapSuccess.deserializeBinaryFromReader = function(msg, reader) {
+proto.xudrpc.Trade.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@@ -12339,16 +12492,18 @@ proto.xudrpc.SwapSuccess.deserializeBinaryFromReader = function(msg, reader) {
var field = reader.getFieldNumber();
switch (field) {
case 1:
- var value = /** @type {string} */ (reader.readString());
- msg.setOrderId(value);
+ var value = new proto.xudrpc.Order;
+ reader.readMessage(value,proto.xudrpc.Order.deserializeBinaryFromReader);
+ msg.setMakerOrder(value);
break;
case 2:
- var value = /** @type {string} */ (reader.readString());
- msg.setLocalId(value);
+ var value = new proto.xudrpc.Order;
+ reader.readMessage(value,proto.xudrpc.Order.deserializeBinaryFromReader);
+ msg.setTakerOrder(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
- msg.setPairId(value);
+ msg.setRHash(value);
break;
case 4:
var value = /** @type {number} */ (reader.readUint64());
@@ -12356,39 +12511,28 @@ proto.xudrpc.SwapSuccess.deserializeBinaryFromReader = function(msg, reader) {
break;
case 5:
var value = /** @type {string} */ (reader.readString());
- msg.setRHash(value);
+ msg.setPairId(value);
+ break;
+ case 6:
+ var value = /** @type {number} */ (reader.readDouble());
+ msg.setPrice(value);
+ break;
+ case 7:
+ var value = /** @type {!proto.xudrpc.Role} */ (reader.readEnum());
+ msg.setRole(value);
break;
case 8:
var value = /** @type {number} */ (reader.readUint64());
- msg.setAmountReceived(value);
+ msg.setExecutedAt(value);
break;
case 9:
- var value = /** @type {number} */ (reader.readUint64());
- msg.setAmountSent(value);
+ var value = /** @type {!proto.xudrpc.OrderSide} */ (reader.readEnum());
+ msg.setSide(value);
break;
case 10:
- var value = /** @type {string} */ (reader.readString());
- msg.setPeerPubKey(value);
- break;
- case 11:
- var value = /** @type {!proto.xudrpc.SwapSuccess.Role} */ (reader.readEnum());
- msg.setRole(value);
- break;
- case 12:
- var value = /** @type {string} */ (reader.readString());
- msg.setCurrencyReceived(value);
- break;
- case 13:
- var value = /** @type {string} */ (reader.readString());
- msg.setCurrencySent(value);
- break;
- case 14:
- var value = /** @type {string} */ (reader.readString());
- msg.setRPreimage(value);
- break;
- case 15:
- var value = /** @type {number} */ (reader.readDouble());
- msg.setPrice(value);
+ var value = new proto.xudrpc.NodeIdentifier;
+ reader.readMessage(value,proto.xudrpc.NodeIdentifier.deserializeBinaryFromReader);
+ msg.setCounterparty(value);
break;
default:
reader.skipField();
@@ -12403,9 +12547,9 @@ proto.xudrpc.SwapSuccess.deserializeBinaryFromReader = function(msg, reader) {
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
-proto.xudrpc.SwapSuccess.prototype.serializeBinary = function() {
+proto.xudrpc.Trade.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
- proto.xudrpc.SwapSuccess.serializeBinaryToWriter(this, writer);
+ proto.xudrpc.Trade.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
@@ -12413,27 +12557,29 @@ proto.xudrpc.SwapSuccess.prototype.serializeBinary = function() {
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
- * @param {!proto.xudrpc.SwapSuccess} message
+ * @param {!proto.xudrpc.Trade} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
-proto.xudrpc.SwapSuccess.serializeBinaryToWriter = function(message, writer) {
+proto.xudrpc.Trade.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
- f = message.getOrderId();
- if (f.length > 0) {
- writer.writeString(
+ f = message.getMakerOrder();
+ if (f != null) {
+ writer.writeMessage(
1,
- f
+ f,
+ proto.xudrpc.Order.serializeBinaryToWriter
);
}
- f = message.getLocalId();
- if (f.length > 0) {
- writer.writeString(
+ f = message.getTakerOrder();
+ if (f != null) {
+ writer.writeMessage(
2,
- f
+ f,
+ proto.xudrpc.Order.serializeBinaryToWriter
);
}
- f = message.getPairId();
+ f = message.getRHash();
if (f.length > 0) {
writer.writeString(
3,
@@ -12447,121 +12593,123 @@ proto.xudrpc.SwapSuccess.serializeBinaryToWriter = function(message, writer) {
f
);
}
- f = message.getRHash();
+ f = message.getPairId();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
- f = message.getAmountReceived();
- if (f !== 0) {
- writer.writeUint64(
- 8,
- f
- );
- }
- f = message.getAmountSent();
- if (f !== 0) {
- writer.writeUint64(
- 9,
- f
- );
- }
- f = message.getPeerPubKey();
- if (f.length > 0) {
- writer.writeString(
- 10,
+ f = message.getPrice();
+ if (f !== 0.0) {
+ writer.writeDouble(
+ 6,
f
);
}
f = message.getRole();
if (f !== 0.0) {
writer.writeEnum(
- 11,
- f
- );
- }
- f = message.getCurrencyReceived();
- if (f.length > 0) {
- writer.writeString(
- 12,
+ 7,
f
);
}
- f = message.getCurrencySent();
- if (f.length > 0) {
- writer.writeString(
- 13,
+ f = message.getExecutedAt();
+ if (f !== 0) {
+ writer.writeUint64(
+ 8,
f
);
}
- f = message.getRPreimage();
- if (f.length > 0) {
- writer.writeString(
- 14,
+ f = message.getSide();
+ if (f !== 0.0) {
+ writer.writeEnum(
+ 9,
f
);
}
- f = message.getPrice();
- if (f !== 0.0) {
- writer.writeDouble(
- 15,
- f
+ f = message.getCounterparty();
+ if (f != null) {
+ writer.writeMessage(
+ 10,
+ f,
+ proto.xudrpc.NodeIdentifier.serializeBinaryToWriter
);
}
};
/**
- * @enum {number}
+ * optional Order maker_order = 1;
+ * @return {?proto.xudrpc.Order}
+ */
+proto.xudrpc.Trade.prototype.getMakerOrder = function() {
+ return /** @type{?proto.xudrpc.Order} */ (
+ jspb.Message.getWrapperField(this, proto.xudrpc.Order, 1));
+};
+
+
+/** @param {?proto.xudrpc.Order|undefined} value */
+proto.xudrpc.Trade.prototype.setMakerOrder = function(value) {
+ jspb.Message.setWrapperField(this, 1, value);
+};
+
+
+proto.xudrpc.Trade.prototype.clearMakerOrder = function() {
+ this.setMakerOrder(undefined);
+};
+
+
+/**
+ * Returns whether this field is set.
+ * @return {boolean}
*/
-proto.xudrpc.SwapSuccess.Role = {
- TAKER: 0,
- MAKER: 1
+proto.xudrpc.Trade.prototype.hasMakerOrder = function() {
+ return jspb.Message.getField(this, 1) != null;
};
+
/**
- * optional string order_id = 1;
- * @return {string}
+ * optional Order taker_order = 2;
+ * @return {?proto.xudrpc.Order}
*/
-proto.xudrpc.SwapSuccess.prototype.getOrderId = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
+proto.xudrpc.Trade.prototype.getTakerOrder = function() {
+ return /** @type{?proto.xudrpc.Order} */ (
+ jspb.Message.getWrapperField(this, proto.xudrpc.Order, 2));
};
-/** @param {string} value */
-proto.xudrpc.SwapSuccess.prototype.setOrderId = function(value) {
- jspb.Message.setProto3StringField(this, 1, value);
+/** @param {?proto.xudrpc.Order|undefined} value */
+proto.xudrpc.Trade.prototype.setTakerOrder = function(value) {
+ jspb.Message.setWrapperField(this, 2, value);
};
-/**
- * optional string local_id = 2;
- * @return {string}
- */
-proto.xudrpc.SwapSuccess.prototype.getLocalId = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
+proto.xudrpc.Trade.prototype.clearTakerOrder = function() {
+ this.setTakerOrder(undefined);
};
-/** @param {string} value */
-proto.xudrpc.SwapSuccess.prototype.setLocalId = function(value) {
- jspb.Message.setProto3StringField(this, 2, value);
+/**
+ * Returns whether this field is set.
+ * @return {boolean}
+ */
+proto.xudrpc.Trade.prototype.hasTakerOrder = function() {
+ return jspb.Message.getField(this, 2) != null;
};
/**
- * optional string pair_id = 3;
+ * optional string r_hash = 3;
* @return {string}
*/
-proto.xudrpc.SwapSuccess.prototype.getPairId = function() {
+proto.xudrpc.Trade.prototype.getRHash = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
-proto.xudrpc.SwapSuccess.prototype.setPairId = function(value) {
+proto.xudrpc.Trade.prototype.setRHash = function(value) {
jspb.Message.setProto3StringField(this, 3, value);
};
@@ -12570,149 +12718,261 @@ proto.xudrpc.SwapSuccess.prototype.setPairId = function(value) {
* optional uint64 quantity = 4;
* @return {number}
*/
-proto.xudrpc.SwapSuccess.prototype.getQuantity = function() {
+proto.xudrpc.Trade.prototype.getQuantity = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
-proto.xudrpc.SwapSuccess.prototype.setQuantity = function(value) {
+proto.xudrpc.Trade.prototype.setQuantity = function(value) {
jspb.Message.setProto3IntField(this, 4, value);
};
/**
- * optional string r_hash = 5;
+ * optional string pair_id = 5;
* @return {string}
*/
-proto.xudrpc.SwapSuccess.prototype.getRHash = function() {
+proto.xudrpc.Trade.prototype.getPairId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/** @param {string} value */
-proto.xudrpc.SwapSuccess.prototype.setRHash = function(value) {
+proto.xudrpc.Trade.prototype.setPairId = function(value) {
jspb.Message.setProto3StringField(this, 5, value);
};
/**
- * optional uint64 amount_received = 8;
+ * optional double price = 6;
* @return {number}
*/
-proto.xudrpc.SwapSuccess.prototype.getAmountReceived = function() {
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
+proto.xudrpc.Trade.prototype.getPrice = function() {
+ return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 6, 0.0));
};
/** @param {number} value */
-proto.xudrpc.SwapSuccess.prototype.setAmountReceived = function(value) {
- jspb.Message.setProto3IntField(this, 8, value);
+proto.xudrpc.Trade.prototype.setPrice = function(value) {
+ jspb.Message.setProto3FloatField(this, 6, value);
};
/**
- * optional uint64 amount_sent = 9;
+ * optional Role role = 7;
+ * @return {!proto.xudrpc.Role}
+ */
+proto.xudrpc.Trade.prototype.getRole = function() {
+ return /** @type {!proto.xudrpc.Role} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
+};
+
+
+/** @param {!proto.xudrpc.Role} value */
+proto.xudrpc.Trade.prototype.setRole = function(value) {
+ jspb.Message.setProto3EnumField(this, 7, value);
+};
+
+
+/**
+ * optional uint64 executed_at = 8;
* @return {number}
*/
-proto.xudrpc.SwapSuccess.prototype.getAmountSent = function() {
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
+proto.xudrpc.Trade.prototype.getExecutedAt = function() {
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
};
/** @param {number} value */
-proto.xudrpc.SwapSuccess.prototype.setAmountSent = function(value) {
- jspb.Message.setProto3IntField(this, 9, value);
+proto.xudrpc.Trade.prototype.setExecutedAt = function(value) {
+ jspb.Message.setProto3IntField(this, 8, value);
};
/**
- * optional string peer_pub_key = 10;
- * @return {string}
+ * optional OrderSide side = 9;
+ * @return {!proto.xudrpc.OrderSide}
*/
-proto.xudrpc.SwapSuccess.prototype.getPeerPubKey = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
+proto.xudrpc.Trade.prototype.getSide = function() {
+ return /** @type {!proto.xudrpc.OrderSide} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
};
-/** @param {string} value */
-proto.xudrpc.SwapSuccess.prototype.setPeerPubKey = function(value) {
- jspb.Message.setProto3StringField(this, 10, value);
+/** @param {!proto.xudrpc.OrderSide} value */
+proto.xudrpc.Trade.prototype.setSide = function(value) {
+ jspb.Message.setProto3EnumField(this, 9, value);
};
/**
- * optional Role role = 11;
- * @return {!proto.xudrpc.SwapSuccess.Role}
+ * optional NodeIdentifier counterparty = 10;
+ * @return {?proto.xudrpc.NodeIdentifier}
*/
-proto.xudrpc.SwapSuccess.prototype.getRole = function() {
- return /** @type {!proto.xudrpc.SwapSuccess.Role} */ (jspb.Message.getFieldWithDefault(this, 11, 0));
+proto.xudrpc.Trade.prototype.getCounterparty = function() {
+ return /** @type{?proto.xudrpc.NodeIdentifier} */ (
+ jspb.Message.getWrapperField(this, proto.xudrpc.NodeIdentifier, 10));
};
-/** @param {!proto.xudrpc.SwapSuccess.Role} value */
-proto.xudrpc.SwapSuccess.prototype.setRole = function(value) {
- jspb.Message.setProto3EnumField(this, 11, value);
+/** @param {?proto.xudrpc.NodeIdentifier|undefined} value */
+proto.xudrpc.Trade.prototype.setCounterparty = function(value) {
+ jspb.Message.setWrapperField(this, 10, value);
+};
+
+
+proto.xudrpc.Trade.prototype.clearCounterparty = function() {
+ this.setCounterparty(undefined);
};
/**
- * optional string currency_received = 12;
- * @return {string}
+ * Returns whether this field is set.
+ * @return {boolean}
*/
-proto.xudrpc.SwapSuccess.prototype.getCurrencyReceived = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
+proto.xudrpc.Trade.prototype.hasCounterparty = function() {
+ return jspb.Message.getField(this, 10) != null;
};
-/** @param {string} value */
-proto.xudrpc.SwapSuccess.prototype.setCurrencyReceived = function(value) {
- jspb.Message.setProto3StringField(this, 12, 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.TradeHistoryRequest = function(opt_data) {
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
+goog.inherits(proto.xudrpc.TradeHistoryRequest, jspb.Message);
+if (goog.DEBUG && !COMPILED) {
+ proto.xudrpc.TradeHistoryRequest.displayName = 'proto.xudrpc.TradeHistoryRequest';
+}
+if (jspb.Message.GENERATE_TO_OBJECT) {
/**
- * optional string currency_sent = 13;
- * @return {string}
+ * 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.SwapSuccess.prototype.getCurrencySent = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, ""));
+proto.xudrpc.TradeHistoryRequest.prototype.toObject = function(opt_includeInstance) {
+ return proto.xudrpc.TradeHistoryRequest.toObject(opt_includeInstance, this);
};
-/** @param {string} value */
-proto.xudrpc.SwapSuccess.prototype.setCurrencySent = function(value) {
- jspb.Message.setProto3StringField(this, 13, value);
+/**
+ * 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.TradeHistoryRequest} msg The msg instance to transform.
+ * @return {!Object}
+ * @suppress {unusedLocalVariables} f is only used for nested messages
+ */
+proto.xudrpc.TradeHistoryRequest.toObject = function(includeInstance, msg) {
+ var f, obj = {
+ limit: jspb.Message.getFieldWithDefault(msg, 1, 0)
+ };
+
+ if (includeInstance) {
+ obj.$jspbMessageInstance = msg;
+ }
+ return obj;
};
+}
/**
- * optional string r_preimage = 14;
- * @return {string}
+ * Deserializes binary data (in protobuf wire format).
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
+ * @return {!proto.xudrpc.TradeHistoryRequest}
*/
-proto.xudrpc.SwapSuccess.prototype.getRPreimage = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, ""));
+proto.xudrpc.TradeHistoryRequest.deserializeBinary = function(bytes) {
+ var reader = new jspb.BinaryReader(bytes);
+ var msg = new proto.xudrpc.TradeHistoryRequest;
+ return proto.xudrpc.TradeHistoryRequest.deserializeBinaryFromReader(msg, reader);
};
-/** @param {string} value */
-proto.xudrpc.SwapSuccess.prototype.setRPreimage = function(value) {
- jspb.Message.setProto3StringField(this, 14, value);
+/**
+ * Deserializes binary data (in protobuf wire format) from the
+ * given reader into the given message object.
+ * @param {!proto.xudrpc.TradeHistoryRequest} msg The message object to deserialize into.
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
+ * @return {!proto.xudrpc.TradeHistoryRequest}
+ */
+proto.xudrpc.TradeHistoryRequest.deserializeBinaryFromReader = function(msg, reader) {
+ while (reader.nextField()) {
+ if (reader.isEndGroup()) {
+ break;
+ }
+ var field = reader.getFieldNumber();
+ switch (field) {
+ case 1:
+ var value = /** @type {number} */ (reader.readUint32());
+ msg.setLimit(value);
+ break;
+ default:
+ reader.skipField();
+ break;
+ }
+ }
+ return msg;
};
/**
- * optional double price = 15;
+ * Serializes the message to binary data (in protobuf wire format).
+ * @return {!Uint8Array}
+ */
+proto.xudrpc.TradeHistoryRequest.prototype.serializeBinary = function() {
+ var writer = new jspb.BinaryWriter();
+ proto.xudrpc.TradeHistoryRequest.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.TradeHistoryRequest} message
+ * @param {!jspb.BinaryWriter} writer
+ * @suppress {unusedLocalVariables} f is only used for nested messages
+ */
+proto.xudrpc.TradeHistoryRequest.serializeBinaryToWriter = function(message, writer) {
+ var f = undefined;
+ f = message.getLimit();
+ if (f !== 0) {
+ writer.writeUint32(
+ 1,
+ f
+ );
+ }
+};
+
+
+/**
+ * optional uint32 limit = 1;
* @return {number}
*/
-proto.xudrpc.SwapSuccess.prototype.getPrice = function() {
- return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 15, 0.0));
+proto.xudrpc.TradeHistoryRequest.prototype.getLimit = function() {
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {number} value */
-proto.xudrpc.SwapSuccess.prototype.setPrice = function(value) {
- jspb.Message.setProto3FloatField(this, 15, value);
+proto.xudrpc.TradeHistoryRequest.prototype.setLimit = function(value) {
+ jspb.Message.setProto3IntField(this, 1, value);
};
@@ -12727,13 +12987,20 @@ proto.xudrpc.SwapSuccess.prototype.setPrice = function(value) {
* @extends {jspb.Message}
* @constructor
*/
-proto.xudrpc.TradingLimits = function(opt_data) {
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
+proto.xudrpc.TradeHistoryResponse = function(opt_data) {
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.xudrpc.TradeHistoryResponse.repeatedFields_, null);
};
-goog.inherits(proto.xudrpc.TradingLimits, jspb.Message);
+goog.inherits(proto.xudrpc.TradeHistoryResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
- proto.xudrpc.TradingLimits.displayName = 'proto.xudrpc.TradingLimits';
+ proto.xudrpc.TradeHistoryResponse.displayName = 'proto.xudrpc.TradeHistoryResponse';
}
+/**
+ * List of repeated fields within this message type.
+ * @private {!Array}
+ * @const
+ */
+proto.xudrpc.TradeHistoryResponse.repeatedFields_ = [1];
+
if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -12747,8 +13014,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
-proto.xudrpc.TradingLimits.prototype.toObject = function(opt_includeInstance) {
- return proto.xudrpc.TradingLimits.toObject(opt_includeInstance, this);
+proto.xudrpc.TradeHistoryResponse.prototype.toObject = function(opt_includeInstance) {
+ return proto.xudrpc.TradeHistoryResponse.toObject(opt_includeInstance, this);
};
@@ -12757,14 +13024,14 @@ proto.xudrpc.TradingLimits.prototype.toObject = function(opt_includeInstance) {
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
- * @param {!proto.xudrpc.TradingLimits} msg The msg instance to transform.
+ * @param {!proto.xudrpc.TradeHistoryResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
-proto.xudrpc.TradingLimits.toObject = function(includeInstance, msg) {
+proto.xudrpc.TradeHistoryResponse.toObject = function(includeInstance, msg) {
var f, obj = {
- maxsell: jspb.Message.getFieldWithDefault(msg, 1, 0),
- maxbuy: jspb.Message.getFieldWithDefault(msg, 2, 0)
+ tradesList: jspb.Message.toObjectList(msg.getTradesList(),
+ proto.xudrpc.Trade.toObject, includeInstance)
};
if (includeInstance) {
@@ -12778,23 +13045,23 @@ proto.xudrpc.TradingLimits.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.xudrpc.TradingLimits}
+ * @return {!proto.xudrpc.TradeHistoryResponse}
*/
-proto.xudrpc.TradingLimits.deserializeBinary = function(bytes) {
+proto.xudrpc.TradeHistoryResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
- var msg = new proto.xudrpc.TradingLimits;
- return proto.xudrpc.TradingLimits.deserializeBinaryFromReader(msg, reader);
+ var msg = new proto.xudrpc.TradeHistoryResponse;
+ return proto.xudrpc.TradeHistoryResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
- * @param {!proto.xudrpc.TradingLimits} msg The message object to deserialize into.
+ * @param {!proto.xudrpc.TradeHistoryResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.xudrpc.TradingLimits}
+ * @return {!proto.xudrpc.TradeHistoryResponse}
*/
-proto.xudrpc.TradingLimits.deserializeBinaryFromReader = function(msg, reader) {
+proto.xudrpc.TradeHistoryResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@@ -12802,12 +13069,9 @@ proto.xudrpc.TradingLimits.deserializeBinaryFromReader = function(msg, reader) {
var field = reader.getFieldNumber();
switch (field) {
case 1:
- var value = /** @type {number} */ (reader.readUint64());
- msg.setMaxsell(value);
- break;
- case 2:
- var value = /** @type {number} */ (reader.readUint64());
- msg.setMaxbuy(value);
+ var value = new proto.xudrpc.Trade;
+ reader.readMessage(value,proto.xudrpc.Trade.deserializeBinaryFromReader);
+ msg.addTrades(value);
break;
default:
reader.skipField();
@@ -12822,9 +13086,9 @@ proto.xudrpc.TradingLimits.deserializeBinaryFromReader = function(msg, reader) {
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
-proto.xudrpc.TradingLimits.prototype.serializeBinary = function() {
+proto.xudrpc.TradeHistoryResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
- proto.xudrpc.TradingLimits.serializeBinaryToWriter(this, writer);
+ proto.xudrpc.TradeHistoryResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
@@ -12832,56 +13096,51 @@ proto.xudrpc.TradingLimits.prototype.serializeBinary = function() {
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
- * @param {!proto.xudrpc.TradingLimits} message
+ * @param {!proto.xudrpc.TradeHistoryResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
-proto.xudrpc.TradingLimits.serializeBinaryToWriter = function(message, writer) {
+proto.xudrpc.TradeHistoryResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
- f = message.getMaxsell();
- if (f !== 0) {
- writer.writeUint64(
+ f = message.getTradesList();
+ if (f.length > 0) {
+ writer.writeRepeatedMessage(
1,
- f
- );
- }
- f = message.getMaxbuy();
- if (f !== 0) {
- writer.writeUint64(
- 2,
- f
+ f,
+ proto.xudrpc.Trade.serializeBinaryToWriter
);
}
};
/**
- * optional uint64 MaxSell = 1;
- * @return {number}
+ * repeated Trade trades = 1;
+ * @return {!Array}
*/
-proto.xudrpc.TradingLimits.prototype.getMaxsell = function() {
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
+proto.xudrpc.TradeHistoryResponse.prototype.getTradesList = function() {
+ return /** @type{!Array} */ (
+ jspb.Message.getRepeatedWrapperField(this, proto.xudrpc.Trade, 1));
};
-/** @param {number} value */
-proto.xudrpc.TradingLimits.prototype.setMaxsell = function(value) {
- jspb.Message.setProto3IntField(this, 1, value);
+/** @param {!Array} value */
+proto.xudrpc.TradeHistoryResponse.prototype.setTradesList = function(value) {
+ jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
- * optional uint64 MaxBuy = 2;
- * @return {number}
+ * @param {!proto.xudrpc.Trade=} opt_value
+ * @param {number=} opt_index
+ * @return {!proto.xudrpc.Trade}
*/
-proto.xudrpc.TradingLimits.prototype.getMaxbuy = function() {
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
+proto.xudrpc.TradeHistoryResponse.prototype.addTrades = function(opt_value, opt_index) {
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.xudrpc.Trade, opt_index);
};
-/** @param {number} value */
-proto.xudrpc.TradingLimits.prototype.setMaxbuy = function(value) {
- jspb.Message.setProto3IntField(this, 2, value);
+proto.xudrpc.TradeHistoryResponse.prototype.clearTradesList = function() {
+ this.setTradesList([]);
};
@@ -12896,12 +13155,12 @@ proto.xudrpc.TradingLimits.prototype.setMaxbuy = function(value) {
* @extends {jspb.Message}
* @constructor
*/
-proto.xudrpc.Trade = function(opt_data) {
+proto.xudrpc.TradingLimits = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
-goog.inherits(proto.xudrpc.Trade, jspb.Message);
+goog.inherits(proto.xudrpc.TradingLimits, jspb.Message);
if (goog.DEBUG && !COMPILED) {
- proto.xudrpc.Trade.displayName = 'proto.xudrpc.Trade';
+ proto.xudrpc.TradingLimits.displayName = 'proto.xudrpc.TradingLimits';
}
@@ -12916,8 +13175,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
-proto.xudrpc.Trade.prototype.toObject = function(opt_includeInstance) {
- return proto.xudrpc.Trade.toObject(opt_includeInstance, this);
+proto.xudrpc.TradingLimits.prototype.toObject = function(opt_includeInstance) {
+ return proto.xudrpc.TradingLimits.toObject(opt_includeInstance, this);
};
@@ -12926,17 +13185,14 @@ proto.xudrpc.Trade.prototype.toObject = function(opt_includeInstance) {
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
- * @param {!proto.xudrpc.Trade} msg The msg instance to transform.
+ * @param {!proto.xudrpc.TradingLimits} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
-proto.xudrpc.Trade.toObject = function(includeInstance, msg) {
+proto.xudrpc.TradingLimits.toObject = function(includeInstance, msg) {
var f, obj = {
- makerOrder: (f = msg.getMakerOrder()) && proto.xudrpc.Order.toObject(includeInstance, f),
- takerOrder: (f = msg.getTakerOrder()) && proto.xudrpc.Order.toObject(includeInstance, f),
- rHash: jspb.Message.getFieldWithDefault(msg, 3, ""),
- quantity: jspb.Message.getFieldWithDefault(msg, 4, 0),
- pairId: jspb.Message.getFieldWithDefault(msg, 5, "")
+ maxsell: jspb.Message.getFieldWithDefault(msg, 1, 0),
+ maxbuy: jspb.Message.getFieldWithDefault(msg, 2, 0)
};
if (includeInstance) {
@@ -12950,23 +13206,23 @@ proto.xudrpc.Trade.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.xudrpc.Trade}
+ * @return {!proto.xudrpc.TradingLimits}
*/
-proto.xudrpc.Trade.deserializeBinary = function(bytes) {
+proto.xudrpc.TradingLimits.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
- var msg = new proto.xudrpc.Trade;
- return proto.xudrpc.Trade.deserializeBinaryFromReader(msg, reader);
+ var msg = new proto.xudrpc.TradingLimits;
+ return proto.xudrpc.TradingLimits.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
- * @param {!proto.xudrpc.Trade} msg The message object to deserialize into.
+ * @param {!proto.xudrpc.TradingLimits} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.xudrpc.Trade}
+ * @return {!proto.xudrpc.TradingLimits}
*/
-proto.xudrpc.Trade.deserializeBinaryFromReader = function(msg, reader) {
+proto.xudrpc.TradingLimits.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@@ -12974,26 +13230,12 @@ proto.xudrpc.Trade.deserializeBinaryFromReader = function(msg, reader) {
var field = reader.getFieldNumber();
switch (field) {
case 1:
- var value = new proto.xudrpc.Order;
- reader.readMessage(value,proto.xudrpc.Order.deserializeBinaryFromReader);
- msg.setMakerOrder(value);
+ var value = /** @type {number} */ (reader.readUint64());
+ msg.setMaxsell(value);
break;
case 2:
- var value = new proto.xudrpc.Order;
- reader.readMessage(value,proto.xudrpc.Order.deserializeBinaryFromReader);
- msg.setTakerOrder(value);
- break;
- case 3:
- var value = /** @type {string} */ (reader.readString());
- msg.setRHash(value);
- break;
- case 4:
var value = /** @type {number} */ (reader.readUint64());
- msg.setQuantity(value);
- break;
- case 5:
- var value = /** @type {string} */ (reader.readString());
- msg.setPairId(value);
+ msg.setMaxbuy(value);
break;
default:
reader.skipField();
@@ -13008,9 +13250,9 @@ proto.xudrpc.Trade.deserializeBinaryFromReader = function(msg, reader) {
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
-proto.xudrpc.Trade.prototype.serializeBinary = function() {
+proto.xudrpc.TradingLimits.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
- proto.xudrpc.Trade.serializeBinaryToWriter(this, writer);
+ proto.xudrpc.TradingLimits.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
@@ -13018,46 +13260,23 @@ proto.xudrpc.Trade.prototype.serializeBinary = function() {
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
- * @param {!proto.xudrpc.Trade} message
+ * @param {!proto.xudrpc.TradingLimits} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
-proto.xudrpc.Trade.serializeBinaryToWriter = function(message, writer) {
+proto.xudrpc.TradingLimits.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
- f = message.getMakerOrder();
- if (f != null) {
- writer.writeMessage(
+ f = message.getMaxsell();
+ if (f !== 0) {
+ writer.writeUint64(
1,
- f,
- proto.xudrpc.Order.serializeBinaryToWriter
- );
- }
- f = message.getTakerOrder();
- if (f != null) {
- writer.writeMessage(
- 2,
- f,
- proto.xudrpc.Order.serializeBinaryToWriter
- );
- }
- f = message.getRHash();
- if (f.length > 0) {
- writer.writeString(
- 3,
f
);
}
- f = message.getQuantity();
+ f = message.getMaxbuy();
if (f !== 0) {
writer.writeUint64(
- 4,
- f
- );
- }
- f = message.getPairId();
- if (f.length > 0) {
- writer.writeString(
- 5,
+ 2,
f
);
}
@@ -13065,107 +13284,32 @@ proto.xudrpc.Trade.serializeBinaryToWriter = function(message, writer) {
/**
- * optional Order maker_order = 1;
- * @return {?proto.xudrpc.Order}
- */
-proto.xudrpc.Trade.prototype.getMakerOrder = function() {
- return /** @type{?proto.xudrpc.Order} */ (
- jspb.Message.getWrapperField(this, proto.xudrpc.Order, 1));
-};
-
-
-/** @param {?proto.xudrpc.Order|undefined} value */
-proto.xudrpc.Trade.prototype.setMakerOrder = function(value) {
- jspb.Message.setWrapperField(this, 1, value);
-};
-
-
-proto.xudrpc.Trade.prototype.clearMakerOrder = function() {
- this.setMakerOrder(undefined);
-};
-
-
-/**
- * Returns whether this field is set.
- * @return {boolean}
- */
-proto.xudrpc.Trade.prototype.hasMakerOrder = function() {
- return jspb.Message.getField(this, 1) != null;
-};
-
-
-/**
- * optional Order taker_order = 2;
- * @return {?proto.xudrpc.Order}
- */
-proto.xudrpc.Trade.prototype.getTakerOrder = function() {
- return /** @type{?proto.xudrpc.Order} */ (
- jspb.Message.getWrapperField(this, proto.xudrpc.Order, 2));
-};
-
-
-/** @param {?proto.xudrpc.Order|undefined} value */
-proto.xudrpc.Trade.prototype.setTakerOrder = function(value) {
- jspb.Message.setWrapperField(this, 2, value);
-};
-
-
-proto.xudrpc.Trade.prototype.clearTakerOrder = function() {
- this.setTakerOrder(undefined);
-};
-
-
-/**
- * Returns whether this field is set.
- * @return {boolean}
- */
-proto.xudrpc.Trade.prototype.hasTakerOrder = function() {
- return jspb.Message.getField(this, 2) != null;
-};
-
-
-/**
- * optional string r_hash = 3;
- * @return {string}
- */
-proto.xudrpc.Trade.prototype.getRHash = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
-};
-
-
-/** @param {string} value */
-proto.xudrpc.Trade.prototype.setRHash = function(value) {
- jspb.Message.setProto3StringField(this, 3, value);
-};
-
-
-/**
- * optional uint64 quantity = 4;
+ * optional uint64 MaxSell = 1;
* @return {number}
*/
-proto.xudrpc.Trade.prototype.getQuantity = function() {
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
+proto.xudrpc.TradingLimits.prototype.getMaxsell = function() {
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {number} value */
-proto.xudrpc.Trade.prototype.setQuantity = function(value) {
- jspb.Message.setProto3IntField(this, 4, value);
+proto.xudrpc.TradingLimits.prototype.setMaxsell = function(value) {
+ jspb.Message.setProto3IntField(this, 1, value);
};
/**
- * optional string pair_id = 5;
- * @return {string}
+ * optional uint64 MaxBuy = 2;
+ * @return {number}
*/
-proto.xudrpc.Trade.prototype.getPairId = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
+proto.xudrpc.TradingLimits.prototype.getMaxbuy = function() {
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
-/** @param {string} value */
-proto.xudrpc.Trade.prototype.setPairId = function(value) {
- jspb.Message.setProto3StringField(this, 5, value);
+/** @param {number} value */
+proto.xudrpc.TradingLimits.prototype.setMaxbuy = function(value) {
+ jspb.Message.setProto3IntField(this, 2, value);
};
@@ -14516,7 +14660,17 @@ proto.xudrpc.WithdrawResponse.prototype.setTransactionId = function(value) {
*/
proto.xudrpc.OrderSide = {
BUY: 0,
- SELL: 1
+ SELL: 1,
+ BOTH: 2
+};
+
+/**
+ * @enum {number}
+ */
+proto.xudrpc.Role = {
+ TAKER: 0,
+ MAKER: 1,
+ INTERNAL: 2
};
goog.object.extend(exports, proto.xudrpc);
diff --git a/lib/service/Service.ts b/lib/service/Service.ts
index a506e5f11..4043d5792 100644
--- a/lib/service/Service.ts
+++ b/lib/service/Service.ts
@@ -1,7 +1,8 @@
import { ProvidePreimageEvent, TransferReceivedEvent } from '../connextclient/types';
import { OrderSide, Owner, SwapClientType, SwapRole } from '../constants/enums';
+import { OrderAttributes, TradeInstance } from '../db/types';
import OrderBook from '../orderbook/OrderBook';
-import { isOwnOrder, Order, OrderPortion, OwnLimitOrder, OwnMarketOrder, PlaceOrderEvent } from '../orderbook/types';
+import { Currency, isOwnOrder, Order, OrderPortion, OwnLimitOrder, OwnMarketOrder, PlaceOrderEvent } from '../orderbook/types';
import Pool from '../p2p/Pool';
import swapsErrors from '../swaps/errors';
import { TradingLimits } from '../swaps/SwapClient';
@@ -13,7 +14,7 @@ import { parseUri, toUri, UriParts } from '../utils/uriUtils';
import { checkDecimalPlaces, sortOrders, toEip55Address } from '../utils/utils';
import commitHash from '../Version';
import errors from './errors';
-import { ServiceComponents, ServiceOrder, ServiceOrderSidesArrays, ServicePlaceOrderEvent, XudInfo } from './types';
+import { NodeIdentifier, ServiceComponents, ServiceOrder, ServiceOrderSidesArrays, ServicePlaceOrderEvent, ServiceTrade, XudInfo } from './types';
/** Functions to check argument validity and throw [[INVALID_ARGUMENT]] when invalid. */
const argChecks = {
@@ -421,40 +422,36 @@ class Service {
const result = new Map();
const listOrderTypes = (pairId: string) => {
- const orders: ServiceOrderSidesArrays = {
- buyArray: [],
- sellArray: [],
- };
+ let buyArray: Order[] = [];
+ let sellArray: Order[] = [];
if (includePeerOrders) {
const peerOrders = this.orderBook.getPeersOrders(pairId);
- const peerBuyOrders = peerOrders.buyArray.map(order => this.toServiceOrder(order, includeAliases));
- const peerSellOrders = peerOrders.sellArray.map(order => this.toServiceOrder(order, includeAliases));
-
- orders.buyArray = orders.buyArray.concat(peerBuyOrders);
- orders.sellArray = orders.sellArray.concat(peerSellOrders);
+ buyArray = buyArray.concat(peerOrders.buyArray);
+ sellArray = sellArray.concat(peerOrders.sellArray);
}
if (includeOwnOrders) {
const ownOrders = this.orderBook.getOwnOrders(pairId);
- const ownBuyOrders = ownOrders.buyArray.map(order => this.toServiceOrder(order, includeAliases));
- const ownSellOrders = ownOrders.sellArray.map(order => this.toServiceOrder(order, includeAliases));
-
- orders.buyArray = orders.buyArray.concat(ownBuyOrders);
- orders.sellArray = orders.sellArray.concat(ownSellOrders);
+ buyArray = buyArray.concat(ownOrders.buyArray);
+ sellArray = sellArray.concat(ownOrders.sellArray);
}
// sort all orders
- orders.buyArray = sortOrders(orders.buyArray, true);
- orders.sellArray = sortOrders(orders.sellArray, false);
+ buyArray = sortOrders(buyArray, true);
+ sellArray = sortOrders(sellArray, false);
if (limit > 0) {
- orders.buyArray = orders.buyArray.slice(0, limit);
- orders.sellArray = orders.sellArray.slice(0, limit);
+ buyArray = buyArray.slice(0, limit);
+ sellArray = sellArray.slice(0, limit);
}
- return orders;
+
+ return {
+ buyArray: buyArray.map(order => this.toServiceOrder(order, includeAliases)),
+ sellArray: sellArray.map(order => this.toServiceOrder(order, includeAliases)),
+ };
};
if (pairId) {
@@ -472,7 +469,7 @@ class Service {
* Get the list of the order book's supported currencies
* @returns A list of supported currency ticker symbols
*/
- public listCurrencies = () => {
+ public listCurrencies = (): Map => {
return this.orderBook.currencies;
}
@@ -493,15 +490,86 @@ class Service {
}
/**
- * Gets the list of trades.
+ * Gets trading history.
*/
- public listTrades = (args: { limit: number }) => {
+ public tradeHistory = async (args: { limit: number }): Promise => {
const { limit } = args;
- if (limit === 0) {
- return this.orderBook.getTrades();
- } else {
- return this.orderBook.getTrades(limit);
- }
+ const trades = await this.orderBook.getTrades(limit);
+
+ const orderInstanceToServiceOrder = (order: OrderAttributes, quantity: number): ServiceOrder => {
+ const isOwnOrder = !!order.localId;
+ let nodeIdentifier: NodeIdentifier;
+
+ if (isOwnOrder) {
+ nodeIdentifier = {
+ nodePubKey: this.pool.nodePubKey,
+ alias: this.pool.alias,
+ };
+ } else {
+ const nodePubKey = this.pool.getNodePubKeyById(order.nodeId!)!;
+ nodeIdentifier = {
+ nodePubKey,
+ alias: this.pool.getNodeAlias(nodePubKey),
+ };
+ }
+
+ return {
+ isOwnOrder,
+ nodeIdentifier,
+ quantity,
+ id: order.id,
+ pairId: order.pairId,
+ price: order.price,
+ side: order.isBuy ? OrderSide.Buy : OrderSide.Sell,
+ localId: order.localId,
+ createdAt: order.createdAt,
+ };
+ };
+
+ const serviceTrades: ServiceTrade[] = trades.map((trade: TradeInstance) => {
+ const takerOrder = trade.takerOrder ? orderInstanceToServiceOrder(trade.takerOrder, trade.quantity) : undefined;
+ const makerOrder = orderInstanceToServiceOrder(trade.makerOrder!, trade.quantity);
+ let role: SwapRole;
+ let side: OrderSide;
+ let counterparty: NodeIdentifier | undefined;
+
+ if (takerOrder) {
+ if (makerOrder.isOwnOrder) {
+ role = SwapRole.Internal;
+ side = OrderSide.Both;
+ } else {
+ role = SwapRole.Taker;
+ side = takerOrder.side;
+ }
+ } else {
+ // no taker order means we were the maker in a swap
+ role = SwapRole.Maker;
+ side = makerOrder.side;
+ }
+
+ if (trade.SwapDeal) {
+ const nodePubKey = trade.SwapDeal.peerPubKey;
+ counterparty = {
+ nodePubKey,
+ alias: this.pool.getNodeAlias(nodePubKey),
+ };
+ }
+
+ return {
+ makerOrder,
+ takerOrder,
+ role,
+ side,
+ counterparty,
+ rHash: trade.rHash,
+ quantity: trade.quantity,
+ pairId: makerOrder.pairId,
+ price: makerOrder.price!,
+ executedAt: trade.createdAt.getTime(),
+ };
+ });
+
+ return serviceTrades;
}
/**
diff --git a/lib/service/types.ts b/lib/service/types.ts
index 86d439ae5..846435076 100644
--- a/lib/service/types.ts
+++ b/lib/service/types.ts
@@ -1,5 +1,5 @@
import { ConnextInfo } from '../connextclient/types';
-import { OrderSide } from '../constants/enums';
+import { OrderSide, SwapRole } from '../constants/enums';
import { LndInfo } from '../lndclient/types';
import OrderBook from '../orderbook/OrderBook';
import { Order, PlaceOrderEvent } from '../orderbook/types';
@@ -42,12 +42,27 @@ export type NodeIdentifier = {
alias?: string;
};
-export type ServiceOrder = Pick> & {
+export type ServiceOrder = Pick> & {
nodeIdentifier: NodeIdentifier;
side: OrderSide;
localId?: string;
hold?: number;
isOwnOrder: boolean;
+ quantity?: number;
+ price?: number;
+};
+
+export type ServiceTrade = {
+ makerOrder: ServiceOrder,
+ takerOrder?: ServiceOrder,
+ rHash?: string,
+ quantity: number,
+ pairId: string,
+ price: number,
+ role: SwapRole,
+ side: OrderSide,
+ executedAt: number,
+ counterparty?: NodeIdentifier;
};
export type ServiceOrderSidesArrays = {
diff --git a/lib/swaps/Swaps.ts b/lib/swaps/Swaps.ts
index a4b2f5b41..47a9019bb 100644
--- a/lib/swaps/Swaps.ts
+++ b/lib/swaps/Swaps.ts
@@ -1,21 +1,21 @@
+import assert from 'assert';
+import poissonQuantile from 'distributions-poisson-quantile';
+import { EventEmitter } from 'events';
import { ReputationEvent, SwapFailureReason, SwapPhase, SwapRole, SwapState } from '../constants/enums';
-import Peer from '../p2p/Peer';
import { Models } from '../db/DB';
-import * as packets from '../p2p/packets/types';
+import { SwapDealInstance } from '../db/types';
import Logger from '../Logger';
-import Pool from '../p2p/Pool';
-import { EventEmitter } from 'events';
-import SwapRepository from './SwapRepository';
import { OwnOrder, PeerOrder } from '../orderbook/types';
-import assert from 'assert';
-import { SwapDealInstance } from '../db/types';
-import { ResolveRequest, Route, SanitySwap, SwapDeal, SwapSuccess } from './types';
-import { generatePreimageAndHash, setTimeoutPromise } from '../utils/utils';
import { PacketType } from '../p2p/packets';
-import SwapClientManager from './SwapClientManager';
+import * as packets from '../p2p/packets/types';
+import Peer from '../p2p/Peer';
+import Pool from '../p2p/Pool';
+import { generatePreimageAndHash, setTimeoutPromise } from '../utils/utils';
import errors, { errorCodes } from './errors';
+import SwapClientManager from './SwapClientManager';
import SwapRecovery from './SwapRecovery';
-import poissonQuantile from 'distributions-poisson-quantile';
+import SwapRepository from './SwapRepository';
+import { ResolveRequest, Route, SanitySwap, SwapDeal, SwapSuccess } from './types';
export type OrderToAccept = Pick & {
quantity: number;
diff --git a/proto/xudrpc.proto b/proto/xudrpc.proto
index 51e96e417..672c9fb84 100644
--- a/proto/xudrpc.proto
+++ b/proto/xudrpc.proto
@@ -133,6 +133,7 @@ service Xud {
get: "/v1/nodeinfo"
};
}
+
/* Gets orders from the order book. This call returns the state of the order book at a given point
* in time, although it is not guaranteed to still be vaild by the time a response is received
* and processed by a client. It accepts an optional trading pair id parameter. If specified, only
@@ -169,15 +170,6 @@ service Xud {
};
}
- /* Gets a list of completed trades.
- * shell: xucli listtrades [limit] */
- rpc ListTrades(ListTradesRequest) returns (ListTradesResponse) {
- option (google.api.http) = {
- post: "/v1/listtrades"
- body: "*"
- };
- }
-
/* Opens a payment channel to a peer for the specified amount and currency.
* shell: xucli openchannel */
rpc OpenChannel(OpenChannelRequest) returns (OpenChannelResponse) {
@@ -288,6 +280,15 @@ service Xud {
};
}
+ /* Gets a list of completed trades.
+ * shell: xucli tradehistory [limit] */
+ rpc TradeHistory(TradeHistoryRequest) returns (TradeHistoryResponse) {
+ option (google.api.http) = {
+ post: "/v1/tradehistory"
+ body: "*"
+ };
+ }
+
/* Gets the trading limits for one or all currencies.
* shell: xucli tradinglimits [currency] */
rpc TradingLimits(TradingLimitsRequest) returns (TradingLimitsResponse) {
@@ -318,6 +319,13 @@ service Xud {
enum OrderSide {
BUY = 0;
SELL = 1;
+ BOTH = 2;
+}
+
+enum Role {
+ TAKER = 0;
+ MAKER = 1;
+ INTERNAL = 2;
}
message AddCurrencyResponse {}
@@ -532,15 +540,6 @@ message ListPeersResponse {
repeated Peer peers = 1 [json_name = "peers"];
}
-message ListTradesRequest {
- // The maximum number of trades to return
- uint32 limit = 1 [json_name = "limit"];
-}
-
-message ListTradesResponse {
- repeated Trade trades = 1 [json_name = "trades"];
-}
-
message LndInfo {
string status = 1 [json_name = "status"];
Channels channels = 2 [json_name = "channels"];
@@ -584,7 +583,7 @@ message Order {
NodeIdentifier node_identifier = 5 [json_name = "node_identifier"];
// The local id for this order, if applicable.
string local_id = 6 [json_name = "local_id"];
- // The epoch time when this order was created.
+ // The epoch time in milliseconds when this order was created.
uint64 created_at = 7 [json_name = "created_at"];
// Whether this order is a buy or sell
OrderSide side = 8 [json_name = "side"];
@@ -801,10 +800,6 @@ message SwapSuccess {
uint64 amount_sent = 9 [json_name = "amount_sent"];
// The node pub key of the peer that executed this order.
string peer_pub_key = 10 [json_name = "peer_pub_key"];
- enum Role {
- TAKER = 0;
- MAKER = 1;
- }
// Our role in the swap, either MAKER or TAKER.
Role role = 11 [json_name = "role"];
// The ticker symbol of the currency received.
@@ -817,24 +812,45 @@ message SwapSuccess {
double price = 15 [json_name = "price"];
}
-message TradingLimits {
- // Max outbound capacity for a distinct channel denominated in satoshis.
- uint64 MaxSell = 1 [json_name = "max_sell"];
- // Max inbound capacity for a distinct channel denominated in satoshis.
- uint64 MaxBuy = 2 [json_name = "max_buy"];
-}
-
message Trade {
// The maker order involved in this trade.
Order maker_order = 1 [json_name = "maker_order"];
- // The taker order involved in this trade.
- Order taker_order = 2 [json_name = "taker_order_id"];
+ // The taker order involved in this trade. Note that when a trade occurs from
+ // a remote peer filling one of our orders, we do not receive the order (only a
+ // swap request) and this field will be empty.
+ Order taker_order = 2 [json_name = "taker_order"];
// The payment hash involved in this trade.
string r_hash = 3 [json_name = "r_hash"];
// The quantity transacted in this trade.
uint64 quantity = 4 [json_name = "quantity"];
// The trading pair for this trade.
string pair_id = 5 [json_name = "pair_id"];
+ // The price used for the trade.
+ double price = 6 [json_name = "price"];
+ // Our role in the trade.
+ Role role = 7 [json_name = "role"];
+ // The epoch time in milliseconds that this trade was executed
+ uint64 executed_at = 8 [json_name = "executed_at"];
+ // Whether this node was on the buy or sell side of the trade - or both in case of internal trades.
+ OrderSide side = 9 [json_name = "side"];
+ // The counterparty to this trade, if applicable.
+ NodeIdentifier counterparty = 10 [json_name = "counterparty"];
+}
+
+message TradeHistoryRequest {
+ // The maximum number of trades to return
+ uint32 limit = 1 [json_name = "limit"];
+}
+
+message TradeHistoryResponse {
+ repeated Trade trades = 1 [json_name = "trades"];
+}
+
+message TradingLimits {
+ // Max outbound capacity for a distinct channel denominated in satoshis.
+ uint64 MaxSell = 1 [json_name = "max_sell"];
+ // Max inbound capacity for a distinct channel denominated in satoshis.
+ uint64 MaxBuy = 2 [json_name = "max_buy"];
}
message TradingLimitsRequest {
diff --git a/test/integration/Service.spec.ts b/test/integration/Service.spec.ts
index 0ac56770e..859ed489e 100644
--- a/test/integration/Service.spec.ts
+++ b/test/integration/Service.spec.ts
@@ -1,10 +1,10 @@
import chai, { expect } from 'chai';
-import Xud from '../../lib/Xud';
import chaiAsPromised from 'chai-as-promised';
+import { OrderSide, Owner, SwapClientType } from '../../lib/constants/enums';
+import p2pErrors from '../../lib/p2p/errors';
import Service from '../../lib/service/Service';
-import { SwapClientType, OrderSide, Owner } from '../../lib/constants/enums';
+import Xud from '../../lib/Xud';
import { getTempDir } from '../utils';
-import p2pErrors from '../../lib/p2p/errors';
chai.use(chaiAsPromised);
diff --git a/test/jest/aliasUtils.spec.ts b/test/jest/aliasUtils.spec.ts
index 604e76792..ab7334ce2 100644
--- a/test/jest/aliasUtils.spec.ts
+++ b/test/jest/aliasUtils.spec.ts
@@ -1,4 +1,4 @@
-import { pubKeyToAlias, isNodePubKey } from '../../lib/utils/aliasUtils';
+import { isNodePubKey, pubKeyToAlias } from '../../lib/utils/aliasUtils';
const nodePubKey = '028599d05b18c0c3f8028915a17d603416f7276c822b6b2d20e71a3502bd0f9e0a';
const invalidPubKey = 'notarealnodepubkey028915a17d603416f7276c822b6b2d20e71a3502bd0f9e0a';
diff --git a/test/simulation/xudrpc/xudrpc.pb.go b/test/simulation/xudrpc/xudrpc.pb.go
index bd9c5132d..50b39b284 100644
--- a/test/simulation/xudrpc/xudrpc.pb.go
+++ b/test/simulation/xudrpc/xudrpc.pb.go
@@ -28,16 +28,19 @@ type OrderSide int32
const (
OrderSide_BUY OrderSide = 0
OrderSide_SELL OrderSide = 1
+ OrderSide_BOTH OrderSide = 2
)
var OrderSide_name = map[int32]string{
0: "BUY",
1: "SELL",
+ 2: "BOTH",
}
var OrderSide_value = map[string]int32{
"BUY": 0,
"SELL": 1,
+ "BOTH": 2,
}
func (x OrderSide) String() string {
@@ -48,6 +51,34 @@ func (OrderSide) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_6960a02cc0a63cf6, []int{0}
}
+type Role int32
+
+const (
+ Role_TAKER Role = 0
+ Role_MAKER Role = 1
+ Role_INTERNAL Role = 2
+)
+
+var Role_name = map[int32]string{
+ 0: "TAKER",
+ 1: "MAKER",
+ 2: "INTERNAL",
+}
+
+var Role_value = map[string]int32{
+ "TAKER": 0,
+ "MAKER": 1,
+ "INTERNAL": 2,
+}
+
+func (x Role) String() string {
+ return proto.EnumName(Role_name, int32(x))
+}
+
+func (Role) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_6960a02cc0a63cf6, []int{1}
+}
+
type Currency_SwapClient int32
const (
@@ -101,31 +132,6 @@ func (ListOrdersRequest_Owner) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_6960a02cc0a63cf6, []int{28, 0}
}
-type SwapSuccess_Role int32
-
-const (
- SwapSuccess_TAKER SwapSuccess_Role = 0
- SwapSuccess_MAKER SwapSuccess_Role = 1
-)
-
-var SwapSuccess_Role_name = map[int32]string{
- 0: "TAKER",
- 1: "MAKER",
-}
-
-var SwapSuccess_Role_value = map[string]int32{
- "TAKER": 0,
- "MAKER": 1,
-}
-
-func (x SwapSuccess_Role) String() string {
- return proto.EnumName(SwapSuccess_Role_name, int32(x))
-}
-
-func (SwapSuccess_Role) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_6960a02cc0a63cf6, []int{64, 0}
-}
-
type AddCurrencyResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -1722,85 +1728,6 @@ func (m *ListPeersResponse) GetPeers() []*Peer {
return nil
}
-type ListTradesRequest struct {
- // The maximum number of trades to return
- Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *ListTradesRequest) Reset() { *m = ListTradesRequest{} }
-func (m *ListTradesRequest) String() string { return proto.CompactTextString(m) }
-func (*ListTradesRequest) ProtoMessage() {}
-func (*ListTradesRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_6960a02cc0a63cf6, []int{34}
-}
-
-func (m *ListTradesRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ListTradesRequest.Unmarshal(m, b)
-}
-func (m *ListTradesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ListTradesRequest.Marshal(b, m, deterministic)
-}
-func (m *ListTradesRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ListTradesRequest.Merge(m, src)
-}
-func (m *ListTradesRequest) XXX_Size() int {
- return xxx_messageInfo_ListTradesRequest.Size(m)
-}
-func (m *ListTradesRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_ListTradesRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ListTradesRequest proto.InternalMessageInfo
-
-func (m *ListTradesRequest) GetLimit() uint32 {
- if m != nil {
- return m.Limit
- }
- return 0
-}
-
-type ListTradesResponse struct {
- Trades []*Trade `protobuf:"bytes,1,rep,name=trades,proto3" json:"trades,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *ListTradesResponse) Reset() { *m = ListTradesResponse{} }
-func (m *ListTradesResponse) String() string { return proto.CompactTextString(m) }
-func (*ListTradesResponse) ProtoMessage() {}
-func (*ListTradesResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_6960a02cc0a63cf6, []int{35}
-}
-
-func (m *ListTradesResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ListTradesResponse.Unmarshal(m, b)
-}
-func (m *ListTradesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ListTradesResponse.Marshal(b, m, deterministic)
-}
-func (m *ListTradesResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ListTradesResponse.Merge(m, src)
-}
-func (m *ListTradesResponse) XXX_Size() int {
- return xxx_messageInfo_ListTradesResponse.Size(m)
-}
-func (m *ListTradesResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_ListTradesResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ListTradesResponse proto.InternalMessageInfo
-
-func (m *ListTradesResponse) GetTrades() []*Trade {
- if m != nil {
- return m.Trades
- }
- return nil
-}
-
type LndInfo struct {
Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
Channels *Channels `protobuf:"bytes,2,opt,name=channels,proto3" json:"channels,omitempty"`
@@ -1818,7 +1745,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{36}
+ return fileDescriptor_6960a02cc0a63cf6, []int{34}
}
func (m *LndInfo) XXX_Unmarshal(b []byte) error {
@@ -1902,7 +1829,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{37}
+ return fileDescriptor_6960a02cc0a63cf6, []int{35}
}
func (m *NodeIdentifier) XXX_Unmarshal(b []byte) error {
@@ -1955,7 +1882,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{38}
+ return fileDescriptor_6960a02cc0a63cf6, []int{36}
}
func (m *OpenChannelRequest) XXX_Unmarshal(b []byte) error {
@@ -2014,7 +1941,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{39}
+ return fileDescriptor_6960a02cc0a63cf6, []int{37}
}
func (m *OpenChannelResponse) XXX_Unmarshal(b []byte) error {
@@ -2048,7 +1975,7 @@ type Order struct {
NodeIdentifier *NodeIdentifier `protobuf:"bytes,5,opt,name=node_identifier,proto3" json:"node_identifier,omitempty"`
// The local id for this order, if applicable.
LocalId string `protobuf:"bytes,6,opt,name=local_id,proto3" json:"local_id,omitempty"`
- // The epoch time when this order was created.
+ // The epoch time in milliseconds when this order was created.
CreatedAt uint64 `protobuf:"varint,7,opt,name=created_at,proto3" json:"created_at,omitempty"`
// Whether this order is a buy or sell
Side OrderSide `protobuf:"varint,8,opt,name=side,proto3,enum=xudrpc.OrderSide" json:"side,omitempty"`
@@ -2065,7 +1992,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{40}
+ return fileDescriptor_6960a02cc0a63cf6, []int{38}
}
func (m *Order) XXX_Unmarshal(b []byte) error {
@@ -2176,7 +2103,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{41}
+ return fileDescriptor_6960a02cc0a63cf6, []int{39}
}
func (m *OrderRemoval) XXX_Unmarshal(b []byte) error {
@@ -2246,7 +2173,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{42}
+ return fileDescriptor_6960a02cc0a63cf6, []int{40}
}
func (m *Orders) XXX_Unmarshal(b []byte) error {
@@ -2295,7 +2222,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{43}
+ return fileDescriptor_6960a02cc0a63cf6, []int{41}
}
func (m *OrdersCount) XXX_Unmarshal(b []byte) error {
@@ -2344,7 +2271,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{44}
+ return fileDescriptor_6960a02cc0a63cf6, []int{42}
}
func (m *OrderUpdate) XXX_Unmarshal(b []byte) error {
@@ -2438,7 +2365,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{45}
+ return fileDescriptor_6960a02cc0a63cf6, []int{43}
}
func (m *Peer) XXX_Unmarshal(b []byte) error {
@@ -2547,7 +2474,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{46}
+ return fileDescriptor_6960a02cc0a63cf6, []int{44}
}
func (m *PlaceOrderRequest) XXX_Unmarshal(b []byte) error {
@@ -2635,7 +2562,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{47}
+ return fileDescriptor_6960a02cc0a63cf6, []int{45}
}
func (m *PlaceOrderResponse) XXX_Unmarshal(b []byte) error {
@@ -2700,7 +2627,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{48}
+ return fileDescriptor_6960a02cc0a63cf6, []int{46}
}
func (m *PlaceOrderEvent) XXX_Unmarshal(b []byte) error {
@@ -2809,7 +2736,7 @@ func (m *RaidenInfo) Reset() { *m = RaidenInfo{} }
func (m *RaidenInfo) String() string { return proto.CompactTextString(m) }
func (*RaidenInfo) ProtoMessage() {}
func (*RaidenInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_6960a02cc0a63cf6, []int{49}
+ return fileDescriptor_6960a02cc0a63cf6, []int{47}
}
func (m *RaidenInfo) XXX_Unmarshal(b []byte) error {
@@ -2879,7 +2806,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{50}
+ return fileDescriptor_6960a02cc0a63cf6, []int{48}
}
func (m *ConnextInfo) XXX_Unmarshal(b []byte) error {
@@ -2940,7 +2867,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{51}
+ return fileDescriptor_6960a02cc0a63cf6, []int{49}
}
func (m *RemoveCurrencyRequest) XXX_Unmarshal(b []byte) error {
@@ -2978,7 +2905,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{52}
+ return fileDescriptor_6960a02cc0a63cf6, []int{50}
}
func (m *RemoveCurrencyResponse) XXX_Unmarshal(b []byte) error {
@@ -3014,7 +2941,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{53}
+ return fileDescriptor_6960a02cc0a63cf6, []int{51}
}
func (m *RemoveOrderRequest) XXX_Unmarshal(b []byte) error {
@@ -3062,7 +2989,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{54}
+ return fileDescriptor_6960a02cc0a63cf6, []int{52}
}
func (m *RemoveOrderResponse) XXX_Unmarshal(b []byte) error {
@@ -3102,7 +3029,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{55}
+ return fileDescriptor_6960a02cc0a63cf6, []int{53}
}
func (m *RemovePairRequest) XXX_Unmarshal(b []byte) error {
@@ -3140,7 +3067,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{56}
+ return fileDescriptor_6960a02cc0a63cf6, []int{54}
}
func (m *RemovePairResponse) XXX_Unmarshal(b []byte) error {
@@ -3184,7 +3111,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{57}
+ return fileDescriptor_6960a02cc0a63cf6, []int{55}
}
func (m *RestoreNodeRequest) XXX_Unmarshal(b []byte) error {
@@ -3261,7 +3188,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{58}
+ return fileDescriptor_6960a02cc0a63cf6, []int{56}
}
func (m *RestoreNodeResponse) XXX_Unmarshal(b []byte) error {
@@ -3306,7 +3233,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{59}
+ return fileDescriptor_6960a02cc0a63cf6, []int{57}
}
func (m *ShutdownRequest) XXX_Unmarshal(b []byte) error {
@@ -3337,7 +3264,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{60}
+ return fileDescriptor_6960a02cc0a63cf6, []int{58}
}
func (m *ShutdownResponse) XXX_Unmarshal(b []byte) error {
@@ -3370,7 +3297,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{61}
+ return fileDescriptor_6960a02cc0a63cf6, []int{59}
}
func (m *SubscribeOrdersRequest) XXX_Unmarshal(b []byte) error {
@@ -3411,7 +3338,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{62}
+ return fileDescriptor_6960a02cc0a63cf6, []int{60}
}
func (m *SubscribeSwapsRequest) XXX_Unmarshal(b []byte) error {
@@ -3459,7 +3386,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{63}
+ return fileDescriptor_6960a02cc0a63cf6, []int{61}
}
func (m *SwapFailure) XXX_Unmarshal(b []byte) error {
@@ -3533,7 +3460,7 @@ type SwapSuccess struct {
// The node pub key of the peer that executed this order.
PeerPubKey string `protobuf:"bytes,10,opt,name=peer_pub_key,proto3" json:"peer_pub_key,omitempty"`
// Our role in the swap, either MAKER or TAKER.
- Role SwapSuccess_Role `protobuf:"varint,11,opt,name=role,proto3,enum=xudrpc.SwapSuccess_Role" json:"role,omitempty"`
+ Role Role `protobuf:"varint,11,opt,name=role,proto3,enum=xudrpc.Role" json:"role,omitempty"`
// The ticker symbol of the currency received.
CurrencyReceived string `protobuf:"bytes,12,opt,name=currency_received,proto3" json:"currency_received,omitempty"`
// The ticker symbol of the currency sent.
@@ -3551,7 +3478,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{64}
+ return fileDescriptor_6960a02cc0a63cf6, []int{62}
}
func (m *SwapSuccess) XXX_Unmarshal(b []byte) error {
@@ -3628,11 +3555,11 @@ func (m *SwapSuccess) GetPeerPubKey() string {
return ""
}
-func (m *SwapSuccess) GetRole() SwapSuccess_Role {
+func (m *SwapSuccess) GetRole() Role {
if m != nil {
return m.Role
}
- return SwapSuccess_TAKER
+ return Role_TAKER
}
func (m *SwapSuccess) GetCurrencyReceived() string {
@@ -3663,76 +3590,39 @@ func (m *SwapSuccess) GetPrice() float64 {
return 0
}
-type TradingLimits struct {
- // Max outbound capacity for a distinct channel denominated in satoshis.
- MaxSell uint64 `protobuf:"varint,1,opt,name=MaxSell,json=max_sell,proto3" json:"MaxSell,omitempty"`
- // Max inbound capacity for a distinct channel denominated in satoshis.
- MaxBuy uint64 `protobuf:"varint,2,opt,name=MaxBuy,json=max_buy,proto3" json:"MaxBuy,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-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{65}
-}
-
-func (m *TradingLimits) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_TradingLimits.Unmarshal(m, b)
-}
-func (m *TradingLimits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_TradingLimits.Marshal(b, m, deterministic)
-}
-func (m *TradingLimits) XXX_Merge(src proto.Message) {
- xxx_messageInfo_TradingLimits.Merge(m, src)
-}
-func (m *TradingLimits) XXX_Size() int {
- return xxx_messageInfo_TradingLimits.Size(m)
-}
-func (m *TradingLimits) XXX_DiscardUnknown() {
- xxx_messageInfo_TradingLimits.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_TradingLimits proto.InternalMessageInfo
-
-func (m *TradingLimits) GetMaxSell() uint64 {
- if m != nil {
- return m.MaxSell
- }
- return 0
-}
-
-func (m *TradingLimits) GetMaxBuy() uint64 {
- if m != nil {
- return m.MaxBuy
- }
- return 0
-}
-
type Trade struct {
// The maker order involved in this trade.
MakerOrder *Order `protobuf:"bytes,1,opt,name=maker_order,proto3" json:"maker_order,omitempty"`
- // The taker order involved in this trade.
- TakerOrder *Order `protobuf:"bytes,2,opt,name=taker_order,json=taker_order_id,proto3" json:"taker_order,omitempty"`
+ // The taker order involved in this trade. Note that when a trade occurs from
+ // a remote peer filling one of our orders, we do not receive the order (only a
+ // swap request) and this field will be empty.
+ TakerOrder *Order `protobuf:"bytes,2,opt,name=taker_order,proto3" json:"taker_order,omitempty"`
// The payment hash involved in this trade.
RHash string `protobuf:"bytes,3,opt,name=r_hash,proto3" json:"r_hash,omitempty"`
// The quantity transacted in this trade.
Quantity uint64 `protobuf:"varint,4,opt,name=quantity,proto3" json:"quantity,omitempty"`
// The trading pair for this trade.
- PairId string `protobuf:"bytes,5,opt,name=pair_id,proto3" json:"pair_id,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ PairId string `protobuf:"bytes,5,opt,name=pair_id,proto3" json:"pair_id,omitempty"`
+ // The price used for the trade.
+ Price float64 `protobuf:"fixed64,6,opt,name=price,proto3" json:"price,omitempty"`
+ // Our role in the trade.
+ Role Role `protobuf:"varint,7,opt,name=role,proto3,enum=xudrpc.Role" json:"role,omitempty"`
+ // The epoch time in milliseconds that this trade was executed
+ ExecutedAt uint64 `protobuf:"varint,8,opt,name=executed_at,proto3" json:"executed_at,omitempty"`
+ // Whether this node was on the buy or sell side of the trade - or both in case of internal trades.
+ Side OrderSide `protobuf:"varint,9,opt,name=side,proto3,enum=xudrpc.OrderSide" json:"side,omitempty"`
+ // The counterparty to this trade, if applicable.
+ Counterparty *NodeIdentifier `protobuf:"bytes,10,opt,name=counterparty,proto3" json:"counterparty,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
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{66}
+ return fileDescriptor_6960a02cc0a63cf6, []int{63}
}
func (m *Trade) XXX_Unmarshal(b []byte) error {
@@ -3788,6 +3678,169 @@ func (m *Trade) GetPairId() string {
return ""
}
+func (m *Trade) GetPrice() float64 {
+ if m != nil {
+ return m.Price
+ }
+ return 0
+}
+
+func (m *Trade) GetRole() Role {
+ if m != nil {
+ return m.Role
+ }
+ return Role_TAKER
+}
+
+func (m *Trade) GetExecutedAt() uint64 {
+ if m != nil {
+ return m.ExecutedAt
+ }
+ return 0
+}
+
+func (m *Trade) GetSide() OrderSide {
+ if m != nil {
+ return m.Side
+ }
+ return OrderSide_BUY
+}
+
+func (m *Trade) GetCounterparty() *NodeIdentifier {
+ if m != nil {
+ return m.Counterparty
+ }
+ return nil
+}
+
+type TradeHistoryRequest struct {
+ // The maximum number of trades to return
+ Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+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{64}
+}
+
+func (m *TradeHistoryRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_TradeHistoryRequest.Unmarshal(m, b)
+}
+func (m *TradeHistoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_TradeHistoryRequest.Marshal(b, m, deterministic)
+}
+func (m *TradeHistoryRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TradeHistoryRequest.Merge(m, src)
+}
+func (m *TradeHistoryRequest) XXX_Size() int {
+ return xxx_messageInfo_TradeHistoryRequest.Size(m)
+}
+func (m *TradeHistoryRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_TradeHistoryRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TradeHistoryRequest proto.InternalMessageInfo
+
+func (m *TradeHistoryRequest) GetLimit() uint32 {
+ if m != nil {
+ return m.Limit
+ }
+ return 0
+}
+
+type TradeHistoryResponse struct {
+ Trades []*Trade `protobuf:"bytes,1,rep,name=trades,proto3" json:"trades,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+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{65}
+}
+
+func (m *TradeHistoryResponse) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_TradeHistoryResponse.Unmarshal(m, b)
+}
+func (m *TradeHistoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_TradeHistoryResponse.Marshal(b, m, deterministic)
+}
+func (m *TradeHistoryResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TradeHistoryResponse.Merge(m, src)
+}
+func (m *TradeHistoryResponse) XXX_Size() int {
+ return xxx_messageInfo_TradeHistoryResponse.Size(m)
+}
+func (m *TradeHistoryResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_TradeHistoryResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TradeHistoryResponse proto.InternalMessageInfo
+
+func (m *TradeHistoryResponse) GetTrades() []*Trade {
+ if m != nil {
+ return m.Trades
+ }
+ return nil
+}
+
+type TradingLimits struct {
+ // Max outbound capacity for a distinct channel denominated in satoshis.
+ MaxSell uint64 `protobuf:"varint,1,opt,name=MaxSell,json=max_sell,proto3" json:"MaxSell,omitempty"`
+ // Max inbound capacity for a distinct channel denominated in satoshis.
+ MaxBuy uint64 `protobuf:"varint,2,opt,name=MaxBuy,json=max_buy,proto3" json:"MaxBuy,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+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{66}
+}
+
+func (m *TradingLimits) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_TradingLimits.Unmarshal(m, b)
+}
+func (m *TradingLimits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_TradingLimits.Marshal(b, m, deterministic)
+}
+func (m *TradingLimits) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TradingLimits.Merge(m, src)
+}
+func (m *TradingLimits) XXX_Size() int {
+ return xxx_messageInfo_TradingLimits.Size(m)
+}
+func (m *TradingLimits) XXX_DiscardUnknown() {
+ xxx_messageInfo_TradingLimits.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TradingLimits proto.InternalMessageInfo
+
+func (m *TradingLimits) GetMaxSell() uint64 {
+ if m != nil {
+ return m.MaxSell
+ }
+ return 0
+}
+
+func (m *TradingLimits) GetMaxBuy() uint64 {
+ if m != nil {
+ return m.MaxBuy
+ }
+ return 0
+}
+
type TradingLimitsRequest struct {
// The ticker symbol of the currency to query for, if unspecified then trading limits for all supported
// currencies are queried.
@@ -4167,9 +4220,9 @@ func (m *WithdrawResponse) GetTransactionId() string {
func init() {
proto.RegisterEnum("xudrpc.OrderSide", OrderSide_name, OrderSide_value)
+ proto.RegisterEnum("xudrpc.Role", Role_name, Role_value)
proto.RegisterEnum("xudrpc.Currency_SwapClient", Currency_SwapClient_name, Currency_SwapClient_value)
proto.RegisterEnum("xudrpc.ListOrdersRequest_Owner", ListOrdersRequest_Owner_name, ListOrdersRequest_Owner_value)
- proto.RegisterEnum("xudrpc.SwapSuccess_Role", SwapSuccess_Role_name, SwapSuccess_Role_value)
proto.RegisterType((*AddCurrencyResponse)(nil), "xudrpc.AddCurrencyResponse")
proto.RegisterType((*AddPairRequest)(nil), "xudrpc.AddPairRequest")
proto.RegisterType((*AddPairResponse)(nil), "xudrpc.AddPairResponse")
@@ -4207,8 +4260,6 @@ func init() {
proto.RegisterType((*ListPairsResponse)(nil), "xudrpc.ListPairsResponse")
proto.RegisterType((*ListPeersRequest)(nil), "xudrpc.ListPeersRequest")
proto.RegisterType((*ListPeersResponse)(nil), "xudrpc.ListPeersResponse")
- proto.RegisterType((*ListTradesRequest)(nil), "xudrpc.ListTradesRequest")
- proto.RegisterType((*ListTradesResponse)(nil), "xudrpc.ListTradesResponse")
proto.RegisterType((*LndInfo)(nil), "xudrpc.LndInfo")
proto.RegisterType((*NodeIdentifier)(nil), "xudrpc.NodeIdentifier")
proto.RegisterType((*OpenChannelRequest)(nil), "xudrpc.OpenChannelRequest")
@@ -4240,8 +4291,10 @@ func init() {
proto.RegisterType((*SubscribeSwapsRequest)(nil), "xudrpc.SubscribeSwapsRequest")
proto.RegisterType((*SwapFailure)(nil), "xudrpc.SwapFailure")
proto.RegisterType((*SwapSuccess)(nil), "xudrpc.SwapSuccess")
- proto.RegisterType((*TradingLimits)(nil), "xudrpc.TradingLimits")
proto.RegisterType((*Trade)(nil), "xudrpc.Trade")
+ proto.RegisterType((*TradeHistoryRequest)(nil), "xudrpc.TradeHistoryRequest")
+ proto.RegisterType((*TradeHistoryResponse)(nil), "xudrpc.TradeHistoryResponse")
+ proto.RegisterType((*TradingLimits)(nil), "xudrpc.TradingLimits")
proto.RegisterType((*TradingLimitsRequest)(nil), "xudrpc.TradingLimitsRequest")
proto.RegisterType((*TradingLimitsResponse)(nil), "xudrpc.TradingLimitsResponse")
proto.RegisterMapType((map[string]*TradingLimits)(nil), "xudrpc.TradingLimitsResponse.LimitsEntry")
@@ -4256,237 +4309,241 @@ func init() {
func init() { proto.RegisterFile("xudrpc.proto", fileDescriptor_6960a02cc0a63cf6) }
var fileDescriptor_6960a02cc0a63cf6 = []byte{
- // 3675 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x3a, 0x4d, 0x8f, 0xdc, 0xc6,
- 0xb1, 0xcb, 0xf9, 0xd8, 0x99, 0xad, 0xf9, 0xdc, 0xde, 0x0f, 0x8d, 0x46, 0xb2, 0x2c, 0xf3, 0xd9,
- 0x7a, 0xb2, 0x2c, 0xad, 0xf4, 0xd6, 0xcf, 0xcf, 0x96, 0xfc, 0x6c, 0x58, 0xbb, 0xda, 0x67, 0xc9,
- 0x5e, 0x7d, 0x80, 0x2b, 0xd9, 0x7a, 0x41, 0x62, 0x82, 0x43, 0xb6, 0xb4, 0x8c, 0x38, 0xcd, 0x11,
- 0x3f, 0xf6, 0x23, 0xa7, 0xc0, 0x06, 0x72, 0x48, 0x8e, 0xce, 0xd1, 0x40, 0x72, 0xca, 0x25, 0xb9,
- 0x07, 0xc8, 0x29, 0xe7, 0x5c, 0x03, 0x04, 0x39, 0x04, 0x08, 0x02, 0xe4, 0x17, 0xe4, 0x17, 0x04,
- 0xfd, 0x45, 0x76, 0x93, 0x9c, 0xb5, 0x64, 0x24, 0x37, 0x76, 0x75, 0x75, 0x55, 0x57, 0x75, 0x75,
- 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x7c, 0x4e, 0x1f, 0x63, 0x57, 0x4d, 0xde, 0x64, 0xdc, 0x50, 0x91, 0xff, 0xc9, 0xb8,
+ 0xa1, 0x2a, 0xdf, 0x13, 0xf2, 0x63, 0x71, 0x03, 0x4d, 0xee, 0xf6, 0x18, 0x06, 0xb9, 0xa4, 0xdd,
+ 0x62, 0x96, 0x77, 0x76, 0x46, 0x4e, 0x55, 0x70, 0xc9, 0x95, 0x19, 0x97, 0xd0, 0x32, 0xb4, 0x28,
+ 0xb6, 0xf2, 0xc3, 0x5d, 0x96, 0x78, 0xa1, 0x8f, 0xa0, 0x49, 0xd3, 0x19, 0xb4, 0x2c, 0x23, 0x45,
+ 0x99, 0x35, 0x8d, 0x57, 0x0a, 0x50, 0xdd, 0xab, 0x99, 0xd4, 0xcc, 0x66, 0x21, 0x0f, 0xaa, 0x3e,
+ 0x81, 0xb6, 0x08, 0xe2, 0xa5, 0xc6, 0x16, 0x72, 0x0c, 0xa9, 0xb1, 0xc5, 0x78, 0x5f, 0xd7, 0xd8,
+ 0x43, 0x3e, 0x7b, 0xc3, 0x58, 0x9b, 0xcc, 0xd3, 0xff, 0xb2, 0xdf, 0xfe, 0x4f, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xd3, 0x70, 0xb6, 0x71, 0xc2, 0x2d, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -4698,9 +4755,6 @@ type XudClient interface {
// Gets a list of connected peers.
// shell: xucli listpeers
ListPeers(ctx context.Context, in *ListPeersRequest, opts ...grpc.CallOption) (*ListPeersResponse, error)
- // Gets a list of completed trades.
- // shell: xucli listtrades [limit]
- ListTrades(ctx context.Context, in *ListTradesRequest, opts ...grpc.CallOption) (*ListTradesResponse, error)
// Opens a payment channel to a peer for the specified amount and currency.
// shell: xucli openchannel
OpenChannel(ctx context.Context, in *OpenChannelRequest, opts ...grpc.CallOption) (*OpenChannelResponse, error)
@@ -4748,6 +4802,9 @@ type XudClient interface {
// the client to get real-time notifications when swap attempts are failing. It can be used for
// status monitoring, debugging, and testing purposes.
SubscribeSwapFailures(ctx context.Context, in *SubscribeSwapsRequest, opts ...grpc.CallOption) (Xud_SubscribeSwapFailuresClient, error)
+ // Gets a list of completed trades.
+ // shell: xucli tradehistory [limit]
+ TradeHistory(ctx context.Context, in *TradeHistoryRequest, opts ...grpc.CallOption) (*TradeHistoryResponse, error)
// Gets the trading limits for one or all currencies.
// shell: xucli tradinglimits [currency]
TradingLimits(ctx context.Context, in *TradingLimitsRequest, opts ...grpc.CallOption) (*TradingLimitsResponse, error)
@@ -4893,15 +4950,6 @@ func (c *xudClient) ListPeers(ctx context.Context, in *ListPeersRequest, opts ..
return out, nil
}
-func (c *xudClient) ListTrades(ctx context.Context, in *ListTradesRequest, opts ...grpc.CallOption) (*ListTradesResponse, error) {
- out := new(ListTradesResponse)
- err := c.cc.Invoke(ctx, "/xudrpc.Xud/ListTrades", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
func (c *xudClient) OpenChannel(ctx context.Context, in *OpenChannelRequest, opts ...grpc.CallOption) (*OpenChannelResponse, error) {
out := new(OpenChannelResponse)
err := c.cc.Invoke(ctx, "/xudrpc.Xud/OpenChannel", in, out, opts...)
@@ -5093,6 +5141,15 @@ func (x *xudSubscribeSwapFailuresClient) Recv() (*SwapFailure, error) {
return m, nil
}
+func (c *xudClient) TradeHistory(ctx context.Context, in *TradeHistoryRequest, opts ...grpc.CallOption) (*TradeHistoryResponse, error) {
+ out := new(TradeHistoryResponse)
+ err := c.cc.Invoke(ctx, "/xudrpc.Xud/TradeHistory", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
func (c *xudClient) TradingLimits(ctx context.Context, in *TradingLimitsRequest, opts ...grpc.CallOption) (*TradingLimitsResponse, error) {
out := new(TradingLimitsResponse)
err := c.cc.Invoke(ctx, "/xudrpc.Xud/TradingLimits", in, out, opts...)
@@ -5173,9 +5230,6 @@ type XudServer interface {
// Gets a list of connected peers.
// shell: xucli listpeers
ListPeers(context.Context, *ListPeersRequest) (*ListPeersResponse, error)
- // Gets a list of completed trades.
- // shell: xucli listtrades [limit]
- ListTrades(context.Context, *ListTradesRequest) (*ListTradesResponse, error)
// Opens a payment channel to a peer for the specified amount and currency.
// shell: xucli openchannel
OpenChannel(context.Context, *OpenChannelRequest) (*OpenChannelResponse, error)
@@ -5223,6 +5277,9 @@ type XudServer interface {
// the client to get real-time notifications when swap attempts are failing. It can be used for
// status monitoring, debugging, and testing purposes.
SubscribeSwapFailures(*SubscribeSwapsRequest, Xud_SubscribeSwapFailuresServer) error
+ // Gets a list of completed trades.
+ // shell: xucli tradehistory [limit]
+ TradeHistory(context.Context, *TradeHistoryRequest) (*TradeHistoryResponse, error)
// Gets the trading limits for one or all currencies.
// shell: xucli tradinglimits [currency]
TradingLimits(context.Context, *TradingLimitsRequest) (*TradingLimitsResponse, error)
@@ -5490,24 +5547,6 @@ func _Xud_ListPeers_Handler(srv interface{}, ctx context.Context, dec func(inter
return interceptor(ctx, in, info, handler)
}
-func _Xud_ListTrades_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ListTradesRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(XudServer).ListTrades(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/xudrpc.Xud/ListTrades",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(XudServer).ListTrades(ctx, req.(*ListTradesRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
func _Xud_OpenChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(OpenChannelRequest)
if err := dec(in); err != nil {
@@ -5718,6 +5757,24 @@ func (x *xudSubscribeSwapFailuresServer) Send(m *SwapFailure) error {
return x.ServerStream.SendMsg(m)
}
+func _Xud_TradeHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(TradeHistoryRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(XudServer).TradeHistory(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/xudrpc.Xud/TradeHistory",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(XudServer).TradeHistory(ctx, req.(*TradeHistoryRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _Xud_TradingLimits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TradingLimitsRequest)
if err := dec(in); err != nil {
@@ -5832,10 +5889,6 @@ var _Xud_serviceDesc = grpc.ServiceDesc{
MethodName: "ListPeers",
Handler: _Xud_ListPeers_Handler,
},
- {
- MethodName: "ListTrades",
- Handler: _Xud_ListTrades_Handler,
- },
{
MethodName: "OpenChannel",
Handler: _Xud_OpenChannel_Handler,
@@ -5864,6 +5917,10 @@ var _Xud_serviceDesc = grpc.ServiceDesc{
MethodName: "Shutdown",
Handler: _Xud_Shutdown_Handler,
},
+ {
+ MethodName: "TradeHistory",
+ Handler: _Xud_TradeHistory_Handler,
+ },
{
MethodName: "TradingLimits",
Handler: _Xud_TradingLimits_Handler,
diff --git a/test/unit/DB.spec.ts b/test/unit/DB.spec.ts
index 2fe86499b..15e6ccdc6 100644
--- a/test/unit/DB.spec.ts
+++ b/test/unit/DB.spec.ts
@@ -1,13 +1,13 @@
import chai, { expect } from 'chai';
+import { SwapClientType, SwapPhase, SwapRole, SwapState } from '../../lib/constants/enums';
import DB from '../../lib/db/DB';
-import OrderBookRepository from '../../lib/orderbook/OrderBookRepository';
+import { TradeFactory } from '../../lib/db/types';
import Logger, { Level } from '../../lib/Logger';
-import { SwapClientType, SwapRole, SwapState, SwapPhase } from '../../lib/constants/enums';
+import OrderBookRepository from '../../lib/orderbook/OrderBookRepository';
+import P2PRepository from '../../lib/p2p/P2PRepository';
import SwapRepository from '../../lib/swaps/SwapRepository';
import { SwapDeal } from '../../lib/swaps/types';
-import P2PRepository from '../../lib/p2p/P2PRepository';
import { createOwnOrder, getTempDir } from '../utils';
-import { TradeFactory } from '../../lib/db/types';
import chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);