Constructors
constructor
- new RaidenClient(baseUrl: string, version?: string): RaidenClient
-
Parameters
-
baseUrl: string
-
Default value version: string = "v1"
Methods
closeChannel
- closeChannel(tokenAddress: string, partnerAddress: string): Promise<Channel>
-
Parameters
-
tokenAddress: string
-
partnerAddress: string
Returns 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>
-
Parameters
-
tokenAddress: string
-
partnerAddress: string
Returns Promise<Channel>
getChannelsForTokenAddress
- getChannelsForTokenAddress(tokenAddress: string): Promise<Channels>
getChannelsForTokenAddressAndPartnerAddress
- getChannelsForTokenAddressAndPartnerAddress(tokenAddress: string, partnerAddress: string): Promise<Channels>
-
Parameters
-
tokenAddress: string
-
partnerAddress: string
Returns Promise<Channels>
getClientAddress
- getClientAddress(): Promise<Address>
getPartnersForTokenAddress
- getPartnersForTokenAddress(tokenAddress: string): Promise<Partners>
getPendingTransfersForTokenAddress
- getPendingTransfersForTokenAddress(tokenAddress: string): Promise<Partners>
getPendingTransfersForTokenAddressAndPartner
- getPendingTransfersForTokenAddressAndPartner(tokenAddress: string, partnerAddress: string): Promise<Partners>
-
Parameters
-
tokenAddress: string
-
partnerAddress: string
Returns Promise<Partners>
getTokenNetworkForTokenAddress
- getTokenNetworkForTokenAddress(tokenAddress: string): Promise<string>
-
Parameters
Returns Promise<string>
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[]>
-
Parameters
Returns Promise<string[]>
queryEvents
- queryEvents(tokenAddress: string, targetAddress: string): Promise<Events>
-
Parameters
-
tokenAddress: string
-
targetAddress: string
Returns Promise<Events>
registerToken
- registerToken(tokenAddress: string): Promise<Token>
-
Parameters
Returns Promise<Token>
withdrawChannel
- withdrawChannel(tokenAddress: string, partnerAddress: string): Promise<Channel>
-
Parameters
-
tokenAddress: string
-
partnerAddress: string
Returns Promise<Channel>
Default client that can be constructed for interacting with the Etherscan API.