UNPKG

o3-dapi-ont

Version:
158 lines (135 loc) 7.18 kB
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta property="og:title" content="O3 dapi - Ontology Stake"> <meta property="og:type" content="website"> <meta property="og:url" content="https://o3.network"> <meta property="og:image" content="https://cdn.o3.network/img/nep5icons/ONT.png"> <meta property="og:description" content="A testbed for the O3 dapi Ontology Staking."> <title>O3 dapi - ONT Stake</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <link rel="stylesheet" href="./styles.css"> <!-- <script type="text/javascript" src="../../../core/lib/o3-dapi-core.min.js"></script> <script type="text/javascript" src="../../lib/o3-dapi-ont.min.js"></script> --> <!-- <script type="text/javascript" src="../../../core/build/bundle.js"></script> <script type="text/javascript" src="../../build/bundle.js"></script> --> <script src="https://cdn.jsdelivr.net/npm/o3-dapi-core@0.2.0/lib/o3-dapi-core.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/o3-dapi-ont@0.2.3/lib/o3-dapi-ont.min.js"></script> </head> <body> <div class="nav"> <h4 class="title">O3 dapi - ONT Stake</h4> <div class='account-container'> <div id="account" class="account"></div> <div id="disconnect" class="disconnect" onclick="disconnect()"></div> </div> <select id="networks" name="networks"></select> </div> <div class="content"> <div class="functions"> <h3>Available functions</h3> <div class="scroll-container"> <div class="function-container"> <h5 class="title">getStakeRoundInfo</h5> <p class="text"> <p>Returns information about the current staking round.</p> </p> <button type="button" class="btn btn-primary" onclick="getStakeRoundInfo()">Submit</button> </div> <div class="function-container"> <h5 class="title">getNodeList</h5> <p class="text"> <p>Returns information about all available nodes.</p> </p> <button type="button" class="btn btn-primary" onclick="getNodeList()">Submit</button> </div> <div class="function-container"> <h5 class="title">getTotalStake</h5> <p class="text"> <p>Returns the total amount of ONT staked by a account across all nodes.</p> </p> <input id='getTotalStakeInput' type="text" value="ARXrGPMxPBCwDifzM5AmR6gBDh1SL4bLn5"/> <button type="button" class="btn btn-primary" onclick="getTotalStake()">Submit</button> </div> <div class="function-container"> <h5 class="title">getStakedClaimableOngRewards</h5> <p class="text"> <p>Returns amount on ONG available for claim from staking rewards across all nodes.</p> </p> <input id='getStakedClaimableOngRewardsInput' type="text" value="ARXrGPMxPBCwDifzM5AmR6gBDh1SL4bLn5"/> <button type="button" class="btn btn-primary" onclick="getStakedClaimableOngRewards()">Submit</button> </div> <div class="function-container"> <h5 class="title">getStakedClaimableOng</h5> <p class="text"> <p>Returns amount of ONG available for normal claim for ONT staked.</p> </p> <input id='getStakedClaimableOngInput' type="text" value="ARXrGPMxPBCwDifzM5AmR6gBDh1SL4bLn5"/> <button type="button" class="btn btn-primary" onclick="getStakedClaimableOng()">Submit</button> </div> <div class="function-container"> <h5 class="title">getNodeStakeInfo</h5> <p class="text"> <p>Returns information about ONT staked in a specific node by a given account.</p> </p> <input id='getNodeStakeInfoAddressInput' type="text" value="ARXrGPMxPBCwDifzM5AmR6gBDh1SL4bLn5"/> <input id='getNodeStakeInfoNodePublicKeyInput' type="text" value="03c8f63775536eb420c96228cdccc9de7d80e87f1b562a6eb93c0838064350aa53"/> <button type="button" class="btn btn-primary" onclick="getNodeStakeInfo()">Submit</button> </div> <div class="function-container"> <h5 class="title">claimStakedOng</h5> <p class="text"> <p>Claim ONG attached to staked ONT (non-rewards).</p> </p> <button type="button" class="btn btn-primary" onclick="claimStakedOng()">Claim</button> </div> <div class="function-container"> <h5 class="title">claimStakedOngRewards</h5> <p class="text"> <p>Claim ONG rewards from staking.</p> </p> <button type="button" class="btn btn-primary" onclick="claimStakedOngRewards()">Claim</button> </div> <div class="function-container"> <h5 class="title">addStake</h5> <p class="text"> <p>Returns information about ONT staked in a specific node by a given account.</p> </p> <input id='addStakeNodePublicKeyInput' type="text" value="03c8f63775536eb420c96228cdccc9de7d80e87f1b562a6eb93c0838064350aa53"/> <input id='addStakeAmountInput' type="text" value="500"/> <button type="button" class="btn btn-primary" onclick="addStake()">Add</button> </div> <div class="function-container"> <h5 class="title">requestStakeWithdraw</h5> <p class="text"> <p>Submits a request to withdraw ONT current staked in a node. This will set the ONT staked in a pending withdraw state. Actual withdraw can be executed in the following round.</p> </p> <input id='requestStakeWithdrawNodePublicKeyInput' type="text" value="03c8f63775536eb420c96228cdccc9de7d80e87f1b562a6eb93c0838064350aa53"/> <input id='requestStakeWithdrawAmountInput' type="text" value="500"/> <button type="button" class="btn btn-primary" onclick="requestStakeWithdraw()">Request</button> </div> <div class="function-container"> <h5 class="title">withdrawStake</h5> <p class="text"> <p>Withdraw stake from node from a previous withdraw request.</p> </p> <input id='withdrawStakeNodePublicKeyInput' type="text" value="03c8f63775536eb420c96228cdccc9de7d80e87f1b562a6eb93c0838064350aa53"/> <input id='withdrawStakeAmountInput' type="text" value="500"/> <button type="button" class="btn btn-primary" onclick="withdrawStake()">Withdraw</button> </div> </div> </div> <div class="output"> <h3>Output</h3> <div class="scroll-container"> <div id="loading"><div style="width:100%;height:100%" class="lds-pacman"><div><div></div><div></div><div></div></div><div><div></div><div></div></div></div></div> <div id="result"></div> <div id="error"></div> </div> </div> </div> <script type="text/javascript" src="./main.js"></script> </body> </html>