Raiden Network
  • What is Raiden?
  • Installation
    • Quick Start
      • Get MetaMask
      • Get an Infura ID
      • Download and run the Raiden Wizard
      • Handle Limitations
    • Starting Raiden Manually
  • Using Raiden on Mainnet
    • Overview
    • Get Whitelisted Tokens
    • Deposit Tokens to the UDC
    • Open a Channel
    • Make a Payment
    • Deposit Tokens
    • View Channel Status
    • Mediation Fees
  • The Raiden Web Interface
    • Overview
    • Navigate the WebUI
    • Join a Token Network
    • Make a Payment
    • Add More Tokens
    • Settle Payments and Close Channels
  • Using Raiden on testnet
    • Quick Start on Görli Testnet
    • Use Custom Token
      • Get Goerli Testnet ETH (GÖETH)
      • Import Custom Token
      • Compile Imported Token Code
      • Deploy Custom Token
  • Raiden API
    • Introduction
    • Resources
      • Address
      • Version
      • Settings
      • Contracts Information
      • Tokens
      • Channels
      • Payments
      • Connections
      • Pending Transfers
      • Shutdown
      • Testing
    • API Tutorial
      • Create a Token Network
      • Open a Channel
      • Deposit Tokens
      • Make a Payment
      • Withdraw Tokens
      • Settle Payments and Close Channels
  • Other
    • Safe Usage
    • Known Issues
    • Glossary
    • v1.0 Documentation
    • Trademark Attributions
Powered by GitBook
On this page
  • Tokens Resource Overview
  • Tokens Resource Details
  • Addresses for All Registered Tokens
  • Address of Token Network for a Specific Token
  • All Partner Nodes With Unsettled Channels for a Specific Token
  • Register a Token

Was this helpful?

  1. Raiden API
  2. Resources

Tokens

The tokens endpoints are used for registering new tokens and querying information about already registered tokens.

Tokens Resource Overview

HTTP Method

Resource

Description

GET

Addresses for all registered tokens

GET

Address of token network for a specific token

GET

All partner nodes with unsettled channels for a specific token

PUT

Register a token

Alderaan Token Registration

For the Alderaan release two tokens will be registered, DAI and WETH.

Tokens Resource Details

Addresses for All Registered Tokens

GET http://localhost:5001/api/v1/tokens

Path Parameters

Name
Type
Description

version

string

Version of the API

[
    "0xEA674fdDe714fd979de3EdF0F56AA9716B898ec8",
    "0x61bB630D3B2e8eda0FC1d50F9f958eC02e3969F6"
]
Internal Raiden node error

Address of Token Network for a Specific Token

GET http://localhost:5001/api/v1/tokens/0xEA67...8ec8

The request will return the token network address for the specified token only if the token is already registered.

Path Parameters

Name
Type
Description

version

string

Version of the API

token_address

string

Address of a token

"0x61bB630D3B2e8eda0FC1d50F9f958eC02e3969F6"
No token network was found for the provided token address

All Partner Nodes With Unsettled Channels for a Specific Token

GET http://localhost:5001/api/v1/tokens/0x61bB...69F6/partners

The value for the "channel" key in the response is a link to the channel resource.

Path Parameters

Name
Type
Description

version

string

Version of the API

token_address

string

Address of a token

[
    {
        "partner_address": "0x2a65aca4d5fc5b5c859090a6c34d164135398226",
        "channel": "/api/<version>/channels/0x61C808D82A3Ac53231750daDc13c777b59310bD9/0x2a65aca4d5fc5b5c859090a6c34d164135398226"
    }
]
If the user accesses the channel link endpoint
The token does not exist
The token address is not a valid EIP55-encoded Ethereum address
Internal Raiden node error

Register a Token

PUT http://localhost:5001/api/v1/tokens/0xEA67...8ec8

A token needs to be registered for a token network to exist for that specific token.

Path Parameters

Name
Type
Description

version

string

Version of the API

token_address

string

Address of a token

{
    "token_network_address": "0xC4F8393fb7971E8B299bC1b302F85BfFB3a1275a"
}
Insufficient balance of ETH to pay for the on-chain transactions
The token address is not valid
The token has already been registered
The registration transaction failedThe address does not contain code
Registering a token only works on testnet.
PreviousContracts InformationNextChannels

Last updated 5 years ago

Was this helpful?

/api/<version>/tokens
/api/<version>/tokens/<token_address>
/api/<version>/tokens/<token_address>/partners
/api/<version>/tokens/<token_address>