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

Was this helpful?

  1. Using Raiden on Mainnet

Deposit Tokens

PreviousMake a PaymentNextView Channel Status

Last updated 4 years ago

Was this helpful?

You deposit in a channel by making a PATCH request to the endpoint that includes:

  1. The address of the W-ETH token as a path parameter.

  2. The address of the partner node as a path parameter.

  3. The amount of tokens you want to deposit in the channel as a body parameter.

curl -i -X PATCH \
http://localhost:5001/api/v1/channels/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/<partner_address> \
-H 'Content-Type: application/json' \
 --data-raw '{"total_deposit":"4000"}'

Notice how we are specifying the total_deposit in the request and not only the amount we want to "top-up" with. This means that if we initially deposited

2000 WEI and want to increase the amount with 2000 we would need to make a total deposit of 4000 WEI.

This is done to prevent requests that are sent repeatedly (by accident or as part of an attack) from having any further consequences.

channels