UNPKG

raiden-ts

Version:

Raiden Light Client Typescript/Javascript SDK

229 lines 11.5 kB
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Transfers | raiden-ts - v3.1.1</title> <meta name="description" content="Documentation for raiden-ts - v3.1.1"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../../assets/css/main.css"> <link rel="stylesheet" href="../../assets/css/pages.css"> <script async src="../../assets/js/search.js" id="search-script"></script> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../../assets/js/search.json" data-base="../.."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../../index.html" class="title">raiden-ts - v3.1.1</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../../modules.html">raiden-ts - v3.1.1</a> </li> <li> <a href="using-dapp.html">Using the Raiden dApp</a> </li> <li> <a href="transfers.html">Transfers</a> </li> </ul> <h1>Transfers</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <div class="tsd-panel tsd-typography"> <a href="#making-transfers-on-the-dapp" id="making-transfers-on-the-dapp" style="color: inherit; text-decoration: none;"> <h1>Making Transfers on the dApp</h1> </a> <p>Transfers are off-chain payments made between Raiden nodes. These are backed by deposits on-chain when a channel is opened and an amount is deposited into the channel.</p> <p>Transfers can be made directly to the hub or to anyone who has a channel with the hub.</p> <p><img src="https://user-images.githubusercontent.com/15123108/102085833-2d5e1600-3e3d-11eb-917b-eb5311fa118a.png" alt="raiden-network" title="Network Visualisation"></p> <p>Let&#39;s walk through how to make a transfer in the dApp.</p> <a href="#direct-transfer" id="direct-transfer" style="color: inherit; text-decoration: none;"> <h2>Direct Transfer</h2> </a> <p>If we transfer an amount directly to a hub it is called a direct transfer. On the transfer screen we can enter the address and amount and hit continue.</p> <p><img src="https://user-images.githubusercontent.com/15123108/102086318-e9b7dc00-3e3d-11eb-8a1b-cbb4f64034f8.png" alt="direct-transfer" title="Direct Transfer"></p> <p>This is a direct transfer because it does not get routed. The screen confirms the direct transfer and you can click <code>Transfer 0.2 TTT</code> at the bottom to transfer the amount.</p> <p><img src="https://user-images.githubusercontent.com/15123108/102086680-782c5d80-3e3e-11eb-82a9-b3b7de65a82e.png" alt="direct-transfer-confirm" title="Direct Transfer Confirm"></p> <p>After the dialogue with messages being exchanged between the nodes the dApp will redirect back to the transfer screen which now displays the transaction as part of the transaction history.</p> <p><img src="https://user-images.githubusercontent.com/15123108/102087290-541d4c00-3e3f-11eb-9719-397f51e95645.png" alt="after-direct-transfer" title="After Direct Transfer"></p> <a href="#mediated-transfer" id="mediated-transfer" style="color: inherit; text-decoration: none;"> <h2>Mediated Transfer</h2> </a> <p>On the transfer screen enter the address of a node which also have a connection with the hub.</p> <p><img src="https://user-images.githubusercontent.com/15123108/102088064-65b32380-3e40-11eb-8523-06501ea783a4.png" alt="mediated-transfer" title="Mediated Transfer"></p> <a href="#request-route" id="request-route" style="color: inherit; text-decoration: none;"> <h3>Request Route</h3> </a> <p>At the request route screen the Path Finding Service price is indicated. Since this is a test environment we only have one PFS but on mainnet, Path Finding Services with competitive prices would be available. Click on <code>Confirm PFS Fee of &lt;0.000001 SVT &gt;</code> to confirm your choice of PFS.</p> <p><img src="https://user-images.githubusercontent.com/15123108/102089472-44533700-3e42-11eb-8491-6535b700faf3.png" alt="request-route-pfs" title="Request Route PFS"></p> <a href="#select-route" id="select-route" style="color: inherit; text-decoration: none;"> <h3>Select Route</h3> </a> <p>At the select route screen the number of hops along with the price is displayed. In a highly interconnected network there would be many routes to choose from. In the testnet environment the one hop route is selected for us and we could proceed by clicking <code>Confirm Mediation Fee of ≈0.001839 TTT</code> at the bottom.</p> <p><img src="https://user-images.githubusercontent.com/15123108/102181893-57611800-3ed1-11eb-976a-1cbe361cef38.png" alt="select-route" title="Select Route"></p> <a href="#confirm-transfer" id="confirm-transfer" style="color: inherit; text-decoration: none;"> <h3>Confirm Transfer</h3> </a> <p>In the confirm transfer screen a brief summary of the transfer with all fees is shown. There are 2 types of fees to pay here:</p> <p><img src="https://user-images.githubusercontent.com/15123108/102183697-3cdc6e00-3ed4-11eb-85cd-bb95c787a48d.png" alt="confirm-transfer" title="Confirm Transfer"></p> <ol> <li><p><em>PATH FINDING SERVICE FEE</em> is the fees for the PFS to provide all available routes for your transfer. This fee is paid from the <em>SVT tokens</em> (RDN tokens on mainnet) that were deposited to the <a href="https://raiden-network-specification.readthedocs.io/en/latest/service_contracts.html">UDC</a> earlier.</p> </li> <li><p><em>Mediation Fee</em> is the fees payed to the mediating nodes for forwarding your transfer. This fee is payed in the same token (<em>TTT</em> here) as the one being sent to the target.</p> </li> </ol> <p>After examining the summary, click on <code>Transfer ≈0.201839 TTT</code>.</p> <a href="#after-transfer" id="after-transfer" style="color: inherit; text-decoration: none;"> <h3>After transfer</h3> </a> <p>After the dialogue with messages being exchanged between the nodes the dApp will redirect back to the transfer screen which now displays the transaction as part of the transaction history.</p> <p><img src="https://user-images.githubusercontent.com/15123108/102209131-52fb2600-3ef6-11eb-939e-3e4554c637fd.png" alt="after-mediated-transfer" title="After Mediated Transfer"></p> </div> </div> <div class="col-4 col-menu menu-sticky-wrap menu-highlight"> <nav class="tsd-navigation primary"> <ul> <li class="label pp-nav pp-group"> <span>Get <wbr>Started</span> </li> <li class=" pp-nav pp-page"> <a href="../Get Started/prerequisites.html">Prerequisites</a> </li> <li class=" pp-nav pp-page"> <a href="../Get Started/installing-sdk.html">Installing the SDK</a> </li> <li class=" pp-nav pp-page"> <a href="../Get Started/installing-dapp.html">Installing the d<wbr>App</a> </li> <li class=" pp-nav pp-page"> <a href="../Get Started/connecting.html">Connecting</a> </li> <li class=" pp-nav pp-page"> <a href="../Get Started/private-chain.html">Private chains</a> </li> <li class="label pp-nav pp-group"> <span>Usage</span> </li> <li class=" pp-nav pp-page"> <a href="../Usage/opening-channel.html">Opening a channel</a> </li> <li class=" pp-nav pp-page"> <a href="../Usage/funding-channel.html">Funding a channel</a> </li> <li class=" pp-nav pp-page"> <a href="../Usage/direct-transfer.html">Transferring</a> </li> <li class=" pp-nav pp-page"> <a href="../Usage/closing-channel.html">Closing a channel</a> </li> <li class=" pp-nav pp-page"> <a href="../Usage/settling-channel.html">Settling a channel</a> </li> <li class="label pp-nav pp-group"> <span>Using the <wbr>Raiden d<wbr>App</span> </li> <li class=" pp-nav pp-page"> <a href="using-dapp.html">Overview</a> </li> <li class=" pp-nav pp-page"> <a href="navigate-dapp.html">Navigate the <wbr>Raiden d<wbr>App</a> </li> <li class=" pp-nav pp-page"> <a href="hub-selection-channel-opening.html">Hub <wbr>Selection and <wbr>Channel <wbr>Opening</a> </li> <li class="current pp-nav pp-page"> <a href="transfers.html">Transfers</a> </li> <li class=" pp-nav pp-page"> <a href="channels.html">Channels</a> </li> <li class=" pp-nav pp-page"> <a href="account.html">Accounts</a> </li> <li class="label pp-nav pp-group"> <span>Using the <wbr>Raiden CLI</span> </li> <li class=" pp-nav pp-page"> <a href="../Using the Raiden CLI/README.html">Overview</a> </li> <li class=" pp-nav pp-page"> <a href="../Using the Raiden CLI/raspberrypi.html">Running raiden-<wbr>cli on the raspberry pi</a> </li> <li class="label pp-nav pp-group"> <span>API</span> </li> <li class=" "> <a href="../../modules.html">Exports</a> </li> </ul> </nav> <nav class="tsd-navigation secondary menu-sticky"> <ul class="before-current"> </ul> </nav> </div> </div> </div> <footer class="with-border-bottom"> <div class="container"> <h2>Legend</h2> <div class="tsd-legend-group"> <ul class="tsd-legend"> <li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li> </ul> </div> </div> </footer> <div class="container tsd-generator"> <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p> </div> <div class="overlay"></div> <script src="../../assets/js/main.js"></script> </body> </html>