Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RaidenClient

Hierarchy

  • RaidenClient

Index

Constructors

constructor

  • new RaidenClient(baseUrl: string, version?: string): RaidenClient
  • Default client that can be constructed for interacting with the Etherscan API.

    Parameters

    • baseUrl: string

      base url of the API endpoint (e.g; http://localhost:5001/api)

    • Default value version: string = "v1"

      version of the API (e.g; v1)

    Returns RaidenClient

Methods

closeChannel

  • closeChannel(tokenAddress: string, partnerAddress: string): Promise<Channel>

createChannel

  • createChannel(partnerAddress: string, tokenAddress: string, totalDeposit: number, settleTimeout: number): Promise<Channel>
  • Parameters

    • partnerAddress: string
    • tokenAddress: string
    • totalDeposit: number
    • settleTimeout: number

    Returns Promise<Channel>

depositChannel

  • depositChannel(tokenAddress: string, partnerAddress: string): Promise<Channel>

getChannels

getChannelsForTokenAddress

  • getChannelsForTokenAddress(tokenAddress: string): Promise<Channels>

getChannelsForTokenAddressAndPartnerAddress

  • getChannelsForTokenAddressAndPartnerAddress(tokenAddress: string, partnerAddress: string): Promise<Channels>

getClientAddress

  • getClientAddress(): Promise<Address>

getConnections

getPartnersForTokenAddress

  • getPartnersForTokenAddress(tokenAddress: string): Promise<Partners>

getPendingTransfers

getPendingTransfersForTokenAddress

  • getPendingTransfersForTokenAddress(tokenAddress: string): Promise<Partners>

getPendingTransfersForTokenAddressAndPartner

  • getPendingTransfersForTokenAddressAndPartner(tokenAddress: string, partnerAddress: string): Promise<Partners>

getTokenNetworkForTokenAddress

  • getTokenNetworkForTokenAddress(tokenAddress: string): Promise<string>

getTokens

  • getTokens(): Promise<Tokens>

initiatePayment

  • initiatePayment(tokenAddress: string, targetAddress: string, amount: number, identifier: number): Promise<Payment>
  • Parameters

    • tokenAddress: string
    • targetAddress: string
    • amount: number
    • identifier: number

    Returns Promise<Payment>

joinTokenNetwork

  • joinTokenNetwork(tokenAddress: string, funds: number, channelTarget?: undefined | number, fundsTarget?: undefined | number): Promise<string>
  • Parameters

    • tokenAddress: string
    • funds: number
    • Optional channelTarget: undefined | number
    • Optional fundsTarget: undefined | number

    Returns Promise<string>

leaveTokenNetwork

  • leaveTokenNetwork(tokenAddress: string): Promise<string[]>

queryEvents

  • queryEvents(tokenAddress: string, targetAddress: string): Promise<Events>

registerToken

  • registerToken(tokenAddress: string): Promise<Token>

withdrawChannel

  • withdrawChannel(tokenAddress: string, partnerAddress: string): Promise<Channel>

Generated using TypeDoc