You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

688 satır
39KB

  1. <!DOCTYPE html>
  2. <html class="writer-html5" lang="en" >
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>DERO Atlantis RPC API V2.0 &mdash; DERO Documentation documentation</title>
  7. <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
  8. <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  9. <link rel="stylesheet" href="../_static/css/custom.css" type="text/css" />
  10. <!--[if lt IE 9]>
  11. <script src="../_static/js/html5shiv.min.js"></script>
  12. <![endif]-->
  13. <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
  14. <script src="../_static/jquery.js"></script>
  15. <script src="../_static/underscore.js"></script>
  16. <script src="../_static/doctools.js"></script>
  17. <script type="text/javascript" src="../_static/js/theme.js"></script>
  18. <link rel="index" title="Index" href="../genindex.html" />
  19. <link rel="search" title="Search" href="../search.html" />
  20. <link rel="next" title="Links" href="usefull_importantlinks.html" />
  21. <link rel="prev" title="Graviton" href="dev_graviton.html" />
  22. </head>
  23. <body class="wy-body-for-nav">
  24. <div class="wy-grid-for-nav">
  25. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  26. <div class="wy-side-scroll">
  27. <div class="wy-side-nav-search" >
  28. <a href="../index.html">
  29. <img src="../_static/docs_logo.png" class="logo" alt="Logo"/>
  30. </a>
  31. <div role="search">
  32. <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
  33. <input type="text" name="q" placeholder="Search docs" />
  34. <input type="hidden" name="check_keywords" value="yes" />
  35. <input type="hidden" name="area" value="default" />
  36. </form>
  37. </div>
  38. </div>
  39. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  40. <p class="caption"><span class="caption-text">Basic's</span></p>
  41. <ul>
  42. <li class="toctree-l1"><a class="reference internal" href="basic_desktopwallet.html">Desktop Wallet User Guide</a><ul>
  43. <li class="toctree-l2"><a class="reference internal" href="basic_desktopwallet.html#downloading-binaries">Downloading Binaries</a></li>
  44. <li class="toctree-l2"><a class="reference internal" href="basic_desktopwallet.html#installing-the-desktop-app">Installing the desktop app</a></li>
  45. <li class="toctree-l2"><a class="reference internal" href="basic_desktopwallet.html#windows-installation">Windows Installation</a></li>
  46. <li class="toctree-l2"><a class="reference internal" href="basic_desktopwallet.html#mac-installation">MAC Installation</a></li>
  47. <li class="toctree-l2"><a class="reference internal" href="basic_desktopwallet.html#linux-installation">Linux Installation</a></li>
  48. <li class="toctree-l2"><a class="reference internal" href="basic_desktopwallet.html#where-are-the-dero-wallet-files-located">Where are the DERO Wallet files located?</a></li>
  49. <li class="toctree-l2"><a class="reference internal" href="basic_desktopwallet.html#create-a-new-wallet">Create a new wallet</a></li>
  50. <li class="toctree-l2"><a class="reference internal" href="basic_desktopwallet.html#opening-a-dero-wallet">Opening a DERO wallet</a></li>
  51. <li class="toctree-l2"><a class="reference internal" href="basic_desktopwallet.html#synchronizing-the-dero-cmd-wallet">Synchronizing the DERO CMD Wallet</a></li>
  52. <li class="toctree-l2"><a class="reference internal" href="basic_desktopwallet.html#rescan-blockchain">Rescan Blockchain</a></li>
  53. <li class="toctree-l2"><a class="reference internal" href="basic_desktopwallet.html#upgrading-from-a-previous-version">Upgrading from a previous version</a></li>
  54. <li class="toctree-l2"><a class="reference internal" href="basic_desktopwallet.html#main-wallet-screen">Main wallet screen</a></li>
  55. <li class="toctree-l2"><a class="reference internal" href="basic_desktopwallet.html#wallet-status">Wallet status</a></li>
  56. <li class="toctree-l2"><a class="reference internal" href="basic_desktopwallet.html#offline-mode">Offline mode</a></li>
  57. <li class="toctree-l2"><a class="reference internal" href="basic_desktopwallet.html#sending-dero">Sending DERO</a></li>
  58. <li class="toctree-l2"><a class="reference internal" href="basic_desktopwallet.html#restoring-dero-funds">Restoring DERO Funds</a></li>
  59. </ul>
  60. </li>
  61. <li class="toctree-l1"><a class="reference internal" href="basic_webwallet.html">Browser Wallet User Guide</a><ul>
  62. <li class="toctree-l2"><a class="reference internal" href="basic_webwallet.html#using-the-browser-wallet">Using the Browser Wallet</a></li>
  63. <li class="toctree-l2"><a class="reference internal" href="basic_webwallet.html#create-a-wallet">Create a wallet</a></li>
  64. <li class="toctree-l2"><a class="reference internal" href="basic_webwallet.html#restore-a-wallet">Restore a wallet</a></li>
  65. <li class="toctree-l2"><a class="reference internal" href="basic_webwallet.html#rescan-blockchain">Rescan Blockchain</a></li>
  66. </ul>
  67. </li>
  68. <li class="toctree-l1"><a class="reference internal" href="basic_cmd.html">Command Line Wallet User Guide</a><ul>
  69. <li class="toctree-l2"><a class="reference internal" href="basic_cmd.html#rescan-blockchain">Rescan Blockchain</a></li>
  70. </ul>
  71. </li>
  72. <li class="toctree-l1"><a class="reference internal" href="basic_coldwallet.html">Cold Wallet</a><ul>
  73. <li class="toctree-l2"><a class="reference internal" href="basic_coldwallet.html#creating-a-cold-storage-dero-wallet">Creating a cold storage DERO wallet</a></li>
  74. <li class="toctree-l2"><a class="reference internal" href="basic_coldwallet.html#creating-transactions-using-cold-wallet">Creating transactions using cold wallet</a></li>
  75. </ul>
  76. </li>
  77. <li class="toctree-l1"><a class="reference internal" href="basic_downloads.html">Downloads</a></li>
  78. <li class="toctree-l1"><a class="reference internal" href="basic_whitepaper.html">Whitepaper</a></li>
  79. <li class="toctree-l1"><a class="reference internal" href="basic_quickstart.html">Quickstart</a></li>
  80. <li class="toctree-l1"><a class="reference internal" href="basic_createrestorewallet.html">Create/Restore Wallet</a></li>
  81. <li class="toctree-l1"><a class="reference internal" href="basic_mining.html">Mining DERO</a><ul>
  82. <li class="toctree-l2"><a class="reference internal" href="basic_mining.html#mining-dero-with-windows">Mining DERO with Windows</a></li>
  83. <li class="toctree-l2"><a class="reference internal" href="basic_mining.html#mining-dero-with-linux">Mining DERO with Linux</a></li>
  84. </ul>
  85. </li>
  86. <li class="toctree-l1"><a class="reference internal" href="basic_runderofullnode.html">Run DERO Full Node</a></li>
  87. <li class="toctree-l1"><a class="reference internal" href="basic_trading.html">Trading</a></li>
  88. </ul>
  89. <p class="caption"><span class="caption-text">DERO Stargate RC2 Testnet</span></p>
  90. <ul>
  91. <li class="toctree-l1"><a class="reference internal" href="stargate_wallet.html">CLI Wallet User Guide (Stargate)</a><ul>
  92. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#downloading-wallet">Downloading Wallet</a></li>
  93. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#install-wallet">Install Wallet</a><ul>
  94. <li class="toctree-l3"><a class="reference internal" href="stargate_wallet.html#windows">Windows</a></li>
  95. </ul>
  96. </li>
  97. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#opening-wallet">Opening Wallet</a></li>
  98. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#create-new-wallet">Create New Wallet</a></li>
  99. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#recover-existing-wallet-from-seed">Recover existing wallet from seed</a></li>
  100. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#create-view-only-wallet">Create View only Wallet</a></li>
  101. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#cli-wallet-functions">CLI Wallet Functions</a><ul>
  102. <li class="toctree-l3"><a class="reference internal" href="stargate_wallet.html#display-account-address">Display Account Address</a></li>
  103. <li class="toctree-l3"><a class="reference internal" href="stargate_wallet.html#display-seed">Display Seed</a></li>
  104. <li class="toctree-l3"><a class="reference internal" href="stargate_wallet.html#display-keys-hex">Display Keys (Hex)</a></li>
  105. <li class="toctree-l3"><a class="reference internal" href="stargate_wallet.html#account-registration">Account Registration</a></li>
  106. <li class="toctree-l3"><a class="reference internal" href="stargate_wallet.html#display-wallet-pool">Display Wallet Pool</a></li>
  107. <li class="toctree-l3"><a class="reference internal" href="stargate_wallet.html#transfer-send-dero-to-another-wallet">Transfer (Send DERO) To Another Wallet</a></li>
  108. <li class="toctree-l3"><a class="reference internal" href="stargate_wallet.html#change-wallet-password">Change Wallet Password</a></li>
  109. <li class="toctree-l3"><a class="reference internal" href="stargate_wallet.html#transfer-all-balance-send-dero-to-another-wallet">Transfer all balance (send DERO) To Another Wallet</a></li>
  110. <li class="toctree-l3"><a class="reference internal" href="stargate_wallet.html#show-transaction-history">Show transaction history</a></li>
  111. <li class="toctree-l3"><a class="reference internal" href="stargate_wallet.html#rescan-transaction-history">Rescan transaction history</a></li>
  112. <li class="toctree-l3"><a class="reference internal" href="stargate_wallet.html#exit-menu-and-start-prompt">Exit menu and start prompt</a></li>
  113. <li class="toctree-l3"><a class="reference internal" href="stargate_wallet.html#exit-wallet">Exit Wallet</a></li>
  114. </ul>
  115. </li>
  116. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#command-line-help-functions">Command Line Help Functions</a></li>
  117. </ul>
  118. </li>
  119. <li class="toctree-l1"><a class="reference internal" href="stargate_wallet.html#gui-wallet-user-guide-stargate">GUI Wallet User Guide (Stargate)</a><ul>
  120. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#id1">Downloading Wallet</a></li>
  121. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#id2">Install Wallet</a></li>
  122. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#id3">Create New Wallet</a></li>
  123. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#id4">Recover existing wallet from seed</a></li>
  124. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#id5">Create View only Wallet</a></li>
  125. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#gui-wallet-functions">GUI Wallet Functions</a></li>
  126. </ul>
  127. </li>
  128. <li class="toctree-l1"><a class="reference internal" href="stargate_wallet.html#broswer-wallet-user-guide-stargate">Broswer Wallet User Guide (Stargate)</a><ul>
  129. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#id6">Create New Wallet</a></li>
  130. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#id7">Recover existing wallet from seed</a></li>
  131. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#id8">Create View only Wallet</a></li>
  132. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#id9">GUI Wallet Functions</a></li>
  133. </ul>
  134. </li>
  135. <li class="toctree-l1"><a class="reference internal" href="stargate_wallet.html#cold-wallet-stargate">Cold Wallet (Stargate)</a><ul>
  136. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#cli">CLI</a></li>
  137. <li class="toctree-l2"><a class="reference internal" href="stargate_wallet.html#gui">GUI</a></li>
  138. </ul>
  139. </li>
  140. <li class="toctree-l1"><a class="reference internal" href="stargate_dvm.html">DERO Virtual Machine</a><ul>
  141. <li class="toctree-l2"><a class="reference internal" href="stargate_dvm.html#dim-statement">DIM Statement</a></li>
  142. <li class="toctree-l2"><a class="reference internal" href="stargate_dvm.html#function-statement">Function statement</a></li>
  143. <li class="toctree-l2"><a class="reference internal" href="stargate_dvm.html#goto-statement">GOTO Statement</a></li>
  144. <li class="toctree-l2"><a class="reference internal" href="stargate_dvm.html#if">IF</a></li>
  145. <li class="toctree-l2"><a class="reference internal" href="stargate_dvm.html#let-statement">LET Statement</a></li>
  146. <li class="toctree-l2"><a class="reference internal" href="stargate_dvm.html#return-statement">Return Statement</a></li>
  147. <li class="toctree-l2"><a class="reference internal" href="stargate_dvm.html#support-functions">Support Functions</a></li>
  148. <li class="toctree-l2"><a class="reference internal" href="stargate_dvm.html#lotter-sc-guide">Lotter SC Guide</a></li>
  149. <li class="toctree-l2"><a class="reference internal" href="stargate_dvm.html#lottery-bas">Lottery.bas</a></li>
  150. <li class="toctree-l2"><a class="reference internal" href="stargate_dvm.html#token-sc-guide">Token SC Guide</a></li>
  151. <li class="toctree-l2"><a class="reference internal" href="stargate_dvm.html#token-bas">Token.bas</a></li>
  152. </ul>
  153. </li>
  154. </ul>
  155. <p class="caption"><span class="caption-text">Developer's Guide</span></p>
  156. <ul class="current">
  157. <li class="toctree-l1"><a class="reference internal" href="dev_astrobwt.html">AstroBWT</a><ul>
  158. <li class="toctree-l2"><a class="reference internal" href="dev_astrobwt.html#dero-astrobwt-cpu-mining-proof-of-work">DERO AstroBWT CPU Mining Proof-of-Work</a></li>
  159. <li class="toctree-l2"><a class="reference internal" href="dev_astrobwt.html#astrobwt-building">AstroBWT Building</a></li>
  160. <li class="toctree-l2"><a class="reference internal" href="dev_astrobwt.html#astrobwt-pseudo-code">AstroBWT Pseudo CODE</a></li>
  161. <li class="toctree-l2"><a class="reference internal" href="dev_astrobwt.html#explaining-astrobwt">Explaining AstroBWT</a></li>
  162. <li class="toctree-l2"><a class="reference internal" href="dev_astrobwt.html#astrobwt-hash-rates">AstroBWT Hash Rates</a></li>
  163. </ul>
  164. </li>
  165. <li class="toctree-l1"><a class="reference internal" href="dev_DHEBP.html">DHEBP (DERO Homomorphic Encryption Blockchain Protocol)</a><ul>
  166. <li class="toctree-l2"><a class="reference internal" href="dev_DHEBP.html#dhebp-alpha-code-to-demonstrate-fhe-blockchain-transactions">DHEBP alpha code to demonstrate FHE blockchain transactions.</a></li>
  167. <li class="toctree-l2"><a class="reference internal" href="dev_DHEBP.html#transaction-details">Transaction Details</a></li>
  168. <li class="toctree-l2"><a class="reference internal" href="dev_DHEBP.html#ring-size-tx-size-data">Ring Size, Tx Size data</a></li>
  169. <li class="toctree-l2"><a class="reference internal" href="dev_DHEBP.html#build">Build</a></li>
  170. <li class="toctree-l2"><a class="reference internal" href="dev_DHEBP.html#output-sample">Output Sample</a></li>
  171. </ul>
  172. </li>
  173. <li class="toctree-l1"><a class="reference internal" href="dev_graviton.html">Graviton</a><ul>
  174. <li class="toctree-l2"><a class="reference internal" href="dev_graviton.html#graviton-zfs-for-key-value-stores">Graviton: ZFS for Key-Value Stores</a></li>
  175. <li class="toctree-l2"><a class="reference internal" href="dev_graviton.html#standalone-alpha-release">Standalone Alpha Release</a></li>
  176. <li class="toctree-l2"><a class="reference internal" href="dev_graviton.html#features">Features</a></li>
  177. <li class="toctree-l2"><a class="reference internal" href="dev_graviton.html#benefits">Benefits</a></li>
  178. </ul>
  179. </li>
  180. <li class="toctree-l1 current"><a class="current reference internal" href="#">DERO Atlantis RPC API V2.0</a><ul>
  181. <li class="toctree-l2"><a class="reference internal" href="#introduction">1. Introduction</a><ul>
  182. <li class="toctree-l3"><a class="reference internal" href="#data-types">1.1 Data Types</a></li>
  183. <li class="toctree-l3"><a class="reference internal" href="#code-examples">1.2 Code Examples</a></li>
  184. </ul>
  185. </li>
  186. <li class="toctree-l2"><a class="reference internal" href="#quick-overview">2. Quick Overview</a></li>
  187. <li class="toctree-l2"><a class="reference internal" href="#dero-daemon-rpc-interface">3. DERO Daemon RPC Interface</a></li>
  188. <li class="toctree-l2"><a class="reference internal" href="#id1">3.1 Introduction</a></li>
  189. <li class="toctree-l2"><a class="reference internal" href="#methods-via-post">3.2 Methods via POST</a><ul>
  190. <li class="toctree-l3"><a class="reference internal" href="#getblockcount">3.2.1 getblockcount</a></li>
  191. <li class="toctree-l3"><a class="reference internal" href="#get-info">3.2.2 get_info</a></li>
  192. <li class="toctree-l3"><a class="reference internal" href="#getblocktemplate">3.2.3 getblocktemplate</a></li>
  193. <li class="toctree-l3"><a class="reference internal" href="#submitblock">3.2.4 submitblock</a></li>
  194. <li class="toctree-l3"><a class="reference internal" href="#getlastblockheader">3.2.5 getlastblockheader</a></li>
  195. <li class="toctree-l3"><a class="reference internal" href="#getblockheaderbyhash">3.2.6 getblockheaderbyhash</a></li>
  196. <li class="toctree-l3"><a class="reference internal" href="#getblockheaderbytopoheight">3.2.7 getblockheaderbytopoheight</a></li>
  197. <li class="toctree-l3"><a class="reference internal" href="#getblockheaderbyheight">3.2.8 getblockheaderbyheight</a></li>
  198. <li class="toctree-l3"><a class="reference internal" href="#getblock">3.2.9 getblock</a></li>
  199. <li class="toctree-l3"><a class="reference internal" href="#gettxpool">3.2.10 gettxpool</a></li>
  200. </ul>
  201. </li>
  202. <li class="toctree-l2"><a class="reference internal" href="#methods-via-get">3.3 Methods via GET</a><ul>
  203. <li class="toctree-l3"><a class="reference internal" href="#getheight">3.3.1 getheight</a></li>
  204. <li class="toctree-l3"><a class="reference internal" href="#gettransactions">3.3.2 gettransactions</a></li>
  205. <li class="toctree-l3"><a class="reference internal" href="#sendrawtransaction">3.3.3 sendrawtransaction</a></li>
  206. <li class="toctree-l3"><a class="reference internal" href="#is-key-image-spent">3.3.4 is_key_image_spent</a></li>
  207. </ul>
  208. </li>
  209. <li class="toctree-l2"><a class="reference internal" href="#dero-wallet-rpc-interface">4 DERO Wallet RPC Interface</a></li>
  210. <li class="toctree-l2"><a class="reference internal" href="#id2">4.1 Introduction</a></li>
  211. <li class="toctree-l2"><a class="reference internal" href="#id3">4.2 Methods via POST</a><ul>
  212. <li class="toctree-l3"><a class="reference internal" href="#getaddress">4.2.1 getaddress</a></li>
  213. <li class="toctree-l3"><a class="reference internal" href="#getbalance">4.2.2 getbalance</a></li>
  214. <li class="toctree-l3"><a class="reference internal" href="#id4">4.2.3 getheight</a></li>
  215. <li class="toctree-l3"><a class="reference internal" href="#transfer">4.2.4 transfer</a></li>
  216. <li class="toctree-l3"><a class="reference internal" href="#transfer-split">4.2.5 transfer_split</a></li>
  217. <li class="toctree-l3"><a class="reference internal" href="#get-bulk-payments">4.2.6 get_bulk_payments</a></li>
  218. <li class="toctree-l3"><a class="reference internal" href="#query-key">4.2.7 query_key</a></li>
  219. <li class="toctree-l3"><a class="reference internal" href="#make-integrated-address">4.2.8 make_integrated_address</a></li>
  220. <li class="toctree-l3"><a class="reference internal" href="#split-integrated-address">4.2.9 split_integrated_address</a></li>
  221. <li class="toctree-l3"><a class="reference internal" href="#get-transfer-by-txid">4.2.10 get_transfer_by_txid</a></li>
  222. <li class="toctree-l3"><a class="reference internal" href="#get-transfers">4.2.11 get_transfers</a></li>
  223. </ul>
  224. </li>
  225. </ul>
  226. </li>
  227. </ul>
  228. <p class="caption"><span class="caption-text">Useful Links</span></p>
  229. <ul>
  230. <li class="toctree-l1"><a class="reference internal" href="usefull_importantlinks.html">Links</a><ul>
  231. <li class="toctree-l2"><a class="reference internal" href="usefull_importantlinks.html#dero-explorer">DERO Explorer</a></li>
  232. <li class="toctree-l2"><a class="reference internal" href="usefull_importantlinks.html#dero-webwallet">DERO Webwallet</a></li>
  233. <li class="toctree-l2"><a class="reference internal" href="usefull_importantlinks.html#dero-wiki">DERO Wiki</a></li>
  234. <li class="toctree-l2"><a class="reference internal" href="usefull_importantlinks.html#dero-forum">DERO Forum</a></li>
  235. <li class="toctree-l2"><a class="reference internal" href="usefull_importantlinks.html#dero-social-media">DERO Social Media</a></li>
  236. <li class="toctree-l2"><a class="reference internal" href="usefull_importantlinks.html#dero-community-channels">DERO Community Channels</a></li>
  237. </ul>
  238. </li>
  239. </ul>
  240. </div>
  241. </div>
  242. </nav>
  243. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  244. <nav class="wy-nav-top" aria-label="top navigation">
  245. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  246. <a href="../index.html">DERO Documentation</a>
  247. </nav>
  248. <div class="wy-nav-content">
  249. <div class="rst-content">
  250. <div role="navigation" aria-label="breadcrumbs navigation">
  251. <ul class="wy-breadcrumbs">
  252. <li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
  253. <li>DERO Atlantis RPC API V2.0</li>
  254. <li class="wy-breadcrumbs-aside">
  255. <a href="../_sources/rtd_pages/dev_rpcapi.rst.txt" rel="nofollow"> View page source</a>
  256. </li>
  257. </ul>
  258. <hr/>
  259. </div>
  260. <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
  261. <div itemprop="articleBody">
  262. <div class="section" id="dero-atlantis-rpc-api-v2-0">
  263. <span id="dev-rpcapi"></span><h1>DERO Atlantis RPC API V2.0<a class="headerlink" href="#dero-atlantis-rpc-api-v2-0" title="Permalink to this headline">¶</a></h1>
  264. <div class="section" id="introduction">
  265. <h2>1. Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2>
  266. <p>This document describes the RPC API for the DERO daemon and wallet which are implemented according to the JSON RPC 2.0 standard.</p>
  267. <p>We will give a description of the available RPC methods with their parameters and results and provide code examples for calling the methods and the data returned.</p>
  268. <p>DERO is the first crypto project to combine a Proof of Work blockchain with a DAG (Directed Acyclic Graph) block structure and wholly anonymous transactions. The fully distributed ledger processes transactions with a twelve-second average block time and is secure against majority hashrate attacks.</p>
  269. <p>DERO will be the first CryptoNote blockchain to have smart contracts on its native chain without any extra layers or secondary blockchains.</p>
  270. <p>For more information visit <a class="reference external" href="http://www.dero.io">http://www.dero.io</a></p>
  271. <div class="section" id="data-types">
  272. <h3>1.1 Data Types<a class="headerlink" href="#data-types" title="Permalink to this headline">¶</a></h3>
  273. <p>DERO is written in Go, so we give the data types of the parameters and results in Go format. It is pretty straightforward to convert them to other languages.</p>
  274. <p>Amounts in DERO have a resolution of 112 decimals and are handled as unsigned 64 bit integers.</p>
  275. <div class="figure align-default">
  276. <img alt="../_images/rpc1.png" src="../_images/rpc1.png" />
  277. </div>
  278. <p>As DERO combines DAG and Blockchain, it uses different height information than traditional blockchains. DERO blocks have an additional height value, called the topological height.</p>
  279. <p>The topological height is unique for each block, while at each blockchain height there can be multiple blocks associated. Each blockchain height contains at least a main block and optional side blocks.</p>
  280. <div class="figure align-default">
  281. <img alt="../_images/rpc2.png" src="../_images/rpc2.png" />
  282. </div>
  283. </div>
  284. <div class="section" id="code-examples">
  285. <h3>1.2 Code Examples<a class="headerlink" href="#code-examples" title="Permalink to this headline">¶</a></h3>
  286. <p>The examples provided for each method are written in Python - using the ’request’ package to build the HTTP request and perform the JSON encoding.</p>
  287. <div class="figure align-default">
  288. <img alt="../_images/rpc3.png" src="../_images/rpc3.png" />
  289. </div>
  290. </div>
  291. </div>
  292. <div class="section" id="quick-overview">
  293. <h2>2. Quick Overview<a class="headerlink" href="#quick-overview" title="Permalink to this headline">¶</a></h2>
  294. <div class="figure align-default">
  295. <img alt="../_images/rpc4.png" src="../_images/rpc4.png" />
  296. </div>
  297. <div class="figure align-default">
  298. <img alt="../_images/rpc5.png" src="../_images/rpc5.png" />
  299. </div>
  300. </div>
  301. <div class="section" id="dero-daemon-rpc-interface">
  302. <h2>3. DERO Daemon RPC Interface<a class="headerlink" href="#dero-daemon-rpc-interface" title="Permalink to this headline">¶</a></h2>
  303. </div>
  304. <div class="section" id="id1">
  305. <h2>3.1 Introduction<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
  306. <p>When launched, the Dero daemon automatically starts the RPC server interface at port 20206.</p>
  307. <p>You can change the port by using the rpc-bind parameter:</p>
  308. <div class="figure align-default">
  309. <img alt="../_images/rpc6.png" src="../_images/rpc6.png" />
  310. </div>
  311. </div>
  312. <div class="section" id="methods-via-post">
  313. <h2>3.2 Methods via POST<a class="headerlink" href="#methods-via-post" title="Permalink to this headline">¶</a></h2>
  314. <p>Most RPC methods work by issuing HTTP POST requests and sending the parameters in the payload.</p>
  315. <div class="figure align-default">
  316. <img alt="../_images/rpc7.png" src="../_images/rpc7.png" />
  317. </div>
  318. <div class="section" id="getblockcount">
  319. <h3>3.2.1 getblockcount<a class="headerlink" href="#getblockcount" title="Permalink to this headline">¶</a></h3>
  320. <p>The method “getblockcount” returns the height of the (currently synced) chain. This is also the currenty unstable height. This method is called without parameters</p>
  321. <div class="figure align-default">
  322. <img alt="../_images/rpc8.png" src="../_images/rpc8.png" />
  323. </div>
  324. </div>
  325. <div class="section" id="get-info">
  326. <h3>3.2.2 get_info<a class="headerlink" href="#get-info" title="Permalink to this headline">¶</a></h3>
  327. <p>The method “get_info” returns various info about the daemon and the state of the network. This method has no parameters.</p>
  328. <div class="figure align-default">
  329. <img alt="../_images/rpc9.png" src="../_images/rpc9.png" />
  330. </div>
  331. <div class="figure align-default">
  332. <img alt="../_images/rpc10.png" src="../_images/rpc10.png" />
  333. </div>
  334. </div>
  335. <div class="section" id="getblocktemplate">
  336. <h3>3.2.3 getblocktemplate<a class="headerlink" href="#getblocktemplate" title="Permalink to this headline">¶</a></h3>
  337. <p>Return a block template (used for mining a block).</p>
  338. <div class="figure align-default">
  339. <img alt="../_images/rpc11.png" src="../_images/rpc11.png" />
  340. </div>
  341. </div>
  342. <div class="section" id="submitblock">
  343. <h3>3.2.4 submitblock<a class="headerlink" href="#submitblock" title="Permalink to this headline">¶</a></h3>
  344. <p>Submits a processed blocktemplate_blob and blockhashing_blob to the daemon. The parameter is unnamed as the data is transmitted as array and accessed by-position (see <a class="reference external" href="https://www.jsonrpc.org/specification#parameter_structures">https://www.jsonrpc.org/specification#parameter_structures</a>).</p>
  345. <div class="figure align-default">
  346. <img alt="../_images/rpc12.png" src="../_images/rpc12.png" />
  347. </div>
  348. </div>
  349. <div class="section" id="getlastblockheader">
  350. <h3>3.2.5 getlastblockheader<a class="headerlink" href="#getlastblockheader" title="Permalink to this headline">¶</a></h3>
  351. <p>The method “getlastblockheader” returns the latest blockheader of the (currently synced) chain. This is equal to the top unstable height. This method is called without parameters.</p>
  352. <div class="figure align-default">
  353. <img alt="../_images/rpc13.png" src="../_images/rpc13.png" />
  354. </div>
  355. <div class="figure align-default">
  356. <img alt="../_images/rpc14.png" src="../_images/rpc14.png" />
  357. </div>
  358. </div>
  359. <div class="section" id="getblockheaderbyhash">
  360. <h3>3.2.6 getblockheaderbyhash<a class="headerlink" href="#getblockheaderbyhash" title="Permalink to this headline">¶</a></h3>
  361. <p>The method “getblockheaderbyhash” returns the blockheader for the supplied blocks hash.</p>
  362. <div class="figure align-default">
  363. <img alt="../_images/rpc15.png" src="../_images/rpc15.png" />
  364. </div>
  365. </div>
  366. <div class="section" id="getblockheaderbytopoheight">
  367. <h3>3.2.7 getblockheaderbytopoheight<a class="headerlink" href="#getblockheaderbytopoheight" title="Permalink to this headline">¶</a></h3>
  368. <p>The method “getblockheaderbytopoheight” returns the blockheader for the supplied topoheight.</p>
  369. <div class="figure align-default">
  370. <img alt="../_images/rpc16.png" src="../_images/rpc16.png" />
  371. </div>
  372. </div>
  373. <div class="section" id="getblockheaderbyheight">
  374. <h3>3.2.8 getblockheaderbyheight<a class="headerlink" href="#getblockheaderbyheight" title="Permalink to this headline">¶</a></h3>
  375. <p>The method “getblockheaderbyheight” returns the blockheader for the supplied blockchain topopplied blockchain topoheight, it does the same as the getblockheaderbytopoheight function.</p>
  376. <div class="figure align-default">
  377. <img alt="../_images/rpc17.png" src="../_images/rpc17.png" />
  378. </div>
  379. </div>
  380. <div class="section" id="getblock">
  381. <h3>3.2.9 getblock<a class="headerlink" href="#getblock" title="Permalink to this headline">¶</a></h3>
  382. <p>The method “getblock” returns the data of a block from either the given height or hash.</p>
  383. <div class="figure align-default">
  384. <img alt="../_images/rpc18.png" src="../_images/rpc18.png" />
  385. </div>
  386. <div class="figure align-default">
  387. <img alt="../_images/rpc19.png" src="../_images/rpc19.png" />
  388. </div>
  389. </div>
  390. <div class="section" id="gettxpool">
  391. <h3>3.2.10 gettxpool<a class="headerlink" href="#gettxpool" title="Permalink to this headline">¶</a></h3>
  392. <p>The method “gettxpool” returns the tx hashes that are currently in the mempool. This method has no parameters.</p>
  393. <div class="figure align-default">
  394. <img alt="../_images/rpc20.png" src="../_images/rpc20.png" />
  395. </div>
  396. </div>
  397. </div>
  398. <div class="section" id="methods-via-get">
  399. <h2>3.3 Methods via GET<a class="headerlink" href="#methods-via-get" title="Permalink to this headline">¶</a></h2>
  400. <p>For compability reasons, some RPC methods work using HTTP GET requests. Thereby the method name is part of the URL and the parameters are transmitted in the payload.</p>
  401. <div class="figure align-default">
  402. <img alt="../_images/rpc21.png" src="../_images/rpc21.png" />
  403. </div>
  404. <div class="section" id="getheight">
  405. <h3>3.3.1 getheight<a class="headerlink" href="#getheight" title="Permalink to this headline">¶</a></h3>
  406. <p>The method “getheight” returns the different heights of the blockchain. It is called without parameters.</p>
  407. <div class="figure align-default">
  408. <img alt="../_images/rpc22.png" src="../_images/rpc22.png" />
  409. </div>
  410. </div>
  411. <div class="section" id="gettransactions">
  412. <h3>3.3.2 gettransactions<a class="headerlink" href="#gettransactions" title="Permalink to this headline">¶</a></h3>
  413. <p>The method “gettransactions” returns the transaction data for a list of transaction IDs in hex and JSON format.</p>
  414. <div class="figure align-default">
  415. <img alt="../_images/rpc23.png" src="../_images/rpc23.png" />
  416. </div>
  417. <div class="figure align-default">
  418. <img alt="../_images/rpc24.png" src="../_images/rpc24.png" />
  419. </div>
  420. </div>
  421. <div class="section" id="sendrawtransaction">
  422. <h3>3.3.3 sendrawtransaction<a class="headerlink" href="#sendrawtransaction" title="Permalink to this headline">¶</a></h3>
  423. <p>The method “sendrawtransaction” takes a transaction as hex data and submits it into the mem-pool if valid. Various checks are performed to ensure the transaction is valid, however the boolean result fields are not used, so you have to check the “status” value.</p>
  424. <div class="figure align-default">
  425. <img alt="../_images/rpc25.png" src="../_images/rpc25.png" />
  426. </div>
  427. </div>
  428. <div class="section" id="is-key-image-spent">
  429. <h3>3.3.4 is_key_image_spent<a class="headerlink" href="#is-key-image-spent" title="Permalink to this headline">¶</a></h3>
  430. <p>The method “is_key_image_spent” is used to check the status of a list of key_images.</p>
  431. <div class="figure align-default">
  432. <img alt="../_images/rpc26.png" src="../_images/rpc26.png" />
  433. </div>
  434. </div>
  435. </div>
  436. <div class="section" id="dero-wallet-rpc-interface">
  437. <h2>4 DERO Wallet RPC Interface<a class="headerlink" href="#dero-wallet-rpc-interface" title="Permalink to this headline">¶</a></h2>
  438. </div>
  439. <div class="section" id="id2">
  440. <h2>4.1 Introduction<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
  441. <p>To the use the RPC interface, the wallet has to be started with the rpc-server function enabled:</p>
  442. <div class="figure align-default">
  443. <img alt="../_images/rpc27.png" src="../_images/rpc27.png" />
  444. </div>
  445. <p>If your machine is accessible from the outside, you should setup a rpc login to access the wallet:</p>
  446. <div class="figure align-default">
  447. <img alt="../_images/rpc28.png" src="../_images/rpc28.png" />
  448. </div>
  449. <p>The default port number for the wallet is 20209, but this can be also changed:</p>
  450. <div class="figure align-default">
  451. <img alt="../_images/rpc29.png" src="../_images/rpc29.png" />
  452. </div>
  453. <p>Note: the Dero daemon has to also be started to sync up the wallet transactions.</p>
  454. </div>
  455. <div class="section" id="id3">
  456. <h2>4.2 Methods via POST<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h2>
  457. <p>All wallet RPC methods work by issuing HTTP POST requests and sending the parameters in the payload.</p>
  458. <div class="figure align-default">
  459. <img alt="../_images/rpc30.png" src="../_images/rpc30.png" />
  460. </div>
  461. <div class="section" id="getaddress">
  462. <h3>4.2.1 getaddress<a class="headerlink" href="#getaddress" title="Permalink to this headline">¶</a></h3>
  463. <p>The method “getaddress” method is used to the address from the wallet. This method has no parameters.</p>
  464. <div class="figure align-default">
  465. <img alt="../_images/rpc31.png" src="../_images/rpc31.png" />
  466. </div>
  467. </div>
  468. <div class="section" id="getbalance">
  469. <h3>4.2.2 getbalance<a class="headerlink" href="#getbalance" title="Permalink to this headline">¶</a></h3>
  470. <p>The method “getbalance” method is used to get the current balance and unlocked from the wallet. This method has no parameters.</p>
  471. <div class="figure align-default">
  472. <img alt="../_images/rpc32.png" src="../_images/rpc32.png" />
  473. </div>
  474. </div>
  475. <div class="section" id="id4">
  476. <h3>4.2.3 getheight<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
  477. <p>The method “getheight” method is used to get the currently synced blockchain height from the wallet. This method has no parameters.</p>
  478. <div class="figure align-default">
  479. <img alt="../_images/rpc33.png" src="../_images/rpc33.png" />
  480. </div>
  481. </div>
  482. <div class="section" id="transfer">
  483. <h3>4.2.4 transfer<a class="headerlink" href="#transfer" title="Permalink to this headline">¶</a></h3>
  484. <p>The method “transfer” method is used to create one or multiple transactions from a list of destinations. The optionally returned tx_key can used to prove that the amount was sent to the address using the Dero block explorer.</p>
  485. <div class="figure align-default">
  486. <img alt="../_images/rpc34.png" src="../_images/rpc34.png" />
  487. </div>
  488. <div class="figure align-default">
  489. <img alt="../_images/rpc35.png" src="../_images/rpc35.png" />
  490. </div>
  491. </div>
  492. <div class="section" id="transfer-split">
  493. <h3>4.2.5 transfer_split<a class="headerlink" href="#transfer-split" title="Permalink to this headline">¶</a></h3>
  494. <p>The method “transfer_split” is equal to the “transfer” method in 4.2.4 and kept for compatibility reasons.</p>
  495. <div class="figure align-default">
  496. <img alt="../_images/rpc36.png" src="../_images/rpc36.png" />
  497. </div>
  498. </div>
  499. <div class="section" id="get-bulk-payments">
  500. <h3>4.2.6 get_bulk_payments<a class="headerlink" href="#get-bulk-payments" title="Permalink to this headline">¶</a></h3>
  501. <p>The method “get_bulk_payments” is used to get a bulk of transactions from a list of payment IDs. Note: The method aborts if atleast one payment ID is not found/invalid.</p>
  502. <div class="figure align-default">
  503. <img alt="../_images/rpc37.png" src="../_images/rpc37.png" />
  504. </div>
  505. </div>
  506. <div class="section" id="query-key">
  507. <h3>4.2.7 query_key<a class="headerlink" href="#query-key" title="Permalink to this headline">¶</a></h3>
  508. <p>The method “query_key” is used to query either the secret key in mnemonic form or the view_key in hex form from the wallet.</p>
  509. <div class="figure align-default">
  510. <img alt="../_images/rpc38.png" src="../_images/rpc38.png" />
  511. </div>
  512. </div>
  513. <div class="section" id="make-integrated-address">
  514. <h3>4.2.8 make_integrated_address<a class="headerlink" href="#make-integrated-address" title="Permalink to this headline">¶</a></h3>
  515. <p>The method “make_integrated_address” is used to combine a payment_id and normal wallet address to create an integrated address.</p>
  516. <div class="figure align-default">
  517. <img alt="../_images/rpc39.png" src="../_images/rpc39.png" />
  518. </div>
  519. </div>
  520. <div class="section" id="split-integrated-address">
  521. <h3>4.2.9 split_integrated_address<a class="headerlink" href="#split-integrated-address" title="Permalink to this headline">¶</a></h3>
  522. <p>The method “split_integrated_address” is used to get the payment_id and normal wallet address from an integrated address.</p>
  523. <div class="figure align-default">
  524. <img alt="../_images/rpc40.png" src="../_images/rpc40.png" />
  525. </div>
  526. </div>
  527. <div class="section" id="get-transfer-by-txid">
  528. <h3>4.2.10 get_transfer_by_txid<a class="headerlink" href="#get-transfer-by-txid" title="Permalink to this headline">¶</a></h3>
  529. <p>The method “get_transfer_by_txid” is used to get transaction details for a specific transaction ID.</p>
  530. <div class="figure align-default">
  531. <img alt="../_images/rpc41.png" src="../_images/rpc41.png" />
  532. </div>
  533. </div>
  534. <div class="section" id="get-transfers">
  535. <h3>4.2.11 get_transfers<a class="headerlink" href="#get-transfers" title="Permalink to this headline">¶</a></h3>
  536. <p>The method “get_transfers” is used to get all out/ingoing transactions from a wallet. You can use the min_height and max_height parameters to narrow down the scope.</p>
  537. <div class="figure align-default">
  538. <img alt="../_images/rpc42.png" src="../_images/rpc42.png" />
  539. </div>
  540. <p>For DERO RPC API please click <a class="reference external" href="https://github.com/deroproject/documentation/blob/master/Dero_RPC_API.pdf">here</a></p>
  541. </div>
  542. </div>
  543. </div>
  544. </div>
  545. </div>
  546. <footer>
  547. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
  548. <a href="usefull_importantlinks.html" class="btn btn-neutral float-right" title="Links" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
  549. <a href="dev_graviton.html" class="btn btn-neutral float-left" title="Graviton" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
  550. </div>
  551. <hr/>
  552. <div role="contentinfo">
  553. <p>
  554. &#169; Copyright 2020, DERO Foundation.
  555. </p>
  556. </div>
  557. Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
  558. <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
  559. provided by <a href="https://readthedocs.org">Read the Docs</a>.
  560. </footer>
  561. </div>
  562. </div>
  563. </section>
  564. </div>
  565. <script type="text/javascript">
  566. jQuery(function () {
  567. SphinxRtdTheme.Navigation.enable(true);
  568. });
  569. </script>
  570. </body>
  571. </html>