Options
All
  • Public
  • Public/Protected
  • All
Menu

Class containing the available RPC methods for XUD

Hierarchy

  • GrpcService

Index

Constructors

constructor

Properties

locked

locked: boolean = false

Private Optional service

service: Service

Private streams

streams: Set<grpc.ServerWriteableStream<any>> = new Set<grpc.ServerWriteableStream<any>>()

The set of active streaming calls.

Methods

addCurrency

  • addCurrency(call: ServerUnaryCall<Currency>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<Currency>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

addPair

  • addPair(call: ServerUnaryCall<AddPairRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<AddPairRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

Private addStream

  • addStream(stream: grpc.ServerWriteableStream<any>): void
  • Adds an active streaming call and adds a listener to remove it if it is cancelled.

    Parameters

    • stream: grpc.ServerWriteableStream<any>

    Returns void

ban

  • ban(call: ServerUnaryCall<BanRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<BanRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

changePassword

  • changePassword(call: ServerUnaryCall<ChangePasswordRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<ChangePasswordRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

closeChannel

  • closeChannel(call: ServerUnaryCall<CloseChannelRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<CloseChannelRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

closeStreams

  • closeStreams(): void

connect

  • connect(call: ServerUnaryCall<ConnectRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<ConnectRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

discoverNodes

  • discoverNodes(call: ServerUnaryCall<DiscoverNodesRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<DiscoverNodesRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

executeSwap

  • executeSwap(call: ServerUnaryCall<ExecuteSwapRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<ExecuteSwapRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

getBalance

  • getBalance(call: ServerUnaryCall<GetBalanceRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<GetBalanceRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

getInfo

  • getInfo(_: ServerUnaryCall<GetInfoRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • _: ServerUnaryCall<GetInfoRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

getMnemonic

  • getMnemonic(_: ServerUnaryCall<GetMnemonicRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • _: ServerUnaryCall<GetMnemonicRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

getNodeInfo

  • getNodeInfo(call: ServerUnaryCall<GetNodeInfoRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<GetNodeInfoRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

Private isReady

  • isReady(service: Service | undefined, callbackOrCall: grpc.sendUnaryData<any> | grpc.ServerWriteableStream<any>): service is Service
  • Checks whether this service is ready to handle calls and sends an error to the client caller if not ready.

    Parameters

    • service: Service | undefined
    • callbackOrCall: grpc.sendUnaryData<any> | grpc.ServerWriteableStream<any>

    Returns service is Service

    true if the service is ready, otherwise false

listCurrencies

  • listCurrencies(_: ServerUnaryCall<ListCurrenciesRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): void
  • Parameters

    • _: ServerUnaryCall<ListCurrenciesRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns void

listOrders

  • listOrders(call: ServerUnaryCall<ListOrdersRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): void
  • Parameters

    • call: ServerUnaryCall<ListOrdersRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns void

listPairs

  • listPairs(_: ServerUnaryCall<ListPairsRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): void
  • Parameters

    • _: ServerUnaryCall<ListPairsRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns void

listPeers

  • listPeers(_: ServerUnaryCall<ListPeersRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): void
  • Parameters

    • _: ServerUnaryCall<ListPeersRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns void

openChannel

  • openChannel(call: ServerUnaryCall<OpenChannelRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<OpenChannelRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

placeOrder

  • placeOrder(call: ServerWritableStream<PlaceOrderRequest>): Promise<void>

placeOrderSync

  • placeOrderSync(call: ServerUnaryCall<PlaceOrderRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<PlaceOrderRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

removeAllOrders

  • removeAllOrders(_: ServerUnaryCall<RemoveAllOrdersRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • _: ServerUnaryCall<RemoveAllOrdersRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

removeCurrency

  • removeCurrency(call: ServerUnaryCall<RemoveCurrencyRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<RemoveCurrencyRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

removeOrder

  • removeOrder(call: ServerUnaryCall<RemoveOrderRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<RemoveOrderRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

removePair

  • removePair(call: ServerUnaryCall<RemovePairRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<RemovePairRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

setLogLevel

  • setLogLevel(call: ServerUnaryCall<SetLogLevelRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<SetLogLevelRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

setService

  • setService(service: Service): void

shutdown

  • shutdown(_: ServerUnaryCall<ShutdownRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): void
  • Parameters

    • _: ServerUnaryCall<ShutdownRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns void

subscribeOrders

  • subscribeOrders(call: ServerWritableStream<SubscribeOrdersRequest>): void

subscribeSwapFailures

  • subscribeSwapFailures(call: ServerWritableStream<SubscribeSwapsRequest>): void

subscribeSwaps

  • subscribeSwaps(call: ServerWritableStream<SubscribeSwapsRequest>): void

subscribeSwapsAccepted

  • subscribeSwapsAccepted(call: ServerWritableStream<SubscribeSwapsAcceptedRequest>): void

tradeHistory

  • tradeHistory(call: ServerUnaryCall<TradeHistoryRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<TradeHistoryRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

tradingLimits

  • tradingLimits(call: ServerUnaryCall<TradingLimitsRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<TradingLimitsRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

unban

  • unban(call: ServerUnaryCall<UnbanRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<UnbanRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

walletDeposit

  • walletDeposit(call: ServerUnaryCall<DepositRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<DepositRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

walletWithdraw

  • walletWithdraw(call: ServerUnaryCall<WithdrawRequest>, callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void): Promise<void>
  • Parameters

    • call: ServerUnaryCall<WithdrawRequest>
    • callback: (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number) => void
        • (error: ServiceError | null, value: ResponseType | null, trailer?: Metadata, flags?: undefined | number): void
        • Parameters

          • error: ServiceError | null
          • value: ResponseType | null
          • Optional trailer: Metadata
          • Optional flags: undefined | number

          Returns void

    Returns Promise<void>

Generated using TypeDoc