Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anterior Revisión previa
Próxima revisión
Revisión previa
api-wallet [2021/12/29 23:50]
YerkoBits formato
api-wallet [2021/12/30 01:21] (actual)
YerkoBits
Línea 1: Línea 1:
 Habilitar servicio de la billetera:  Habilitar servicio de la billetera: 
  
-<code>prosus-wallet --rpc-bind-port=16191 --wallet-file=archivowallet --password=clavewallet --rpc-user=usuario --rpc-password=contraseña </code>+<code>prosus-wallet --rpc-bind-port=16191 --wallet-file=archivowallet --password=clavewallet --rpc-user=usuario --rpc-password=contrasena </code>
  
 Para comprobar si el servicio funciona:  Para comprobar si el servicio funciona: 
Línea 22: Línea 22:
   * query_key   * query_key
   * reset   * reset
 +  * get_paymentid
 Tenga en cuenta que no existe un método RPC para "actualización". La actualización de los datos RPC de la billetera se realiza automáticamente cada 20 segundos. Tenga en cuenta que no existe un método RPC para "actualización". La actualización de los datos RPC de la billetera se realiza automáticamente cada 20 segundos.
  
 +**Para ver ejemplos de uso, en distintos lenguajes de programación, visita nuestro [[https://github.com/ProsusCorp/prosusmoney-api|repositorio GitHub]]**
 ---- ----
 <html> <html>
Línea 461: Línea 462:
 } }
 </code></pre> </code></pre>
-<h3> +
-<a id="user-content-get_tx_key" class="anchor" href="#get_tx_key" aria-hidden="true"><svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>get_tx_key</h3> +
-<p>Returns the transaction's secret key if it is stored in wallet's cache; which can be used to prove that you paid the receiver. The transaction ID and the receiver's public address are also needed as a parameter.</p> +
-<p>URL:</p> +
-<pre><code> /json_rpc +
-</code></pre> +
-<p>Input example:</p> +
-<pre><code>+
-  "jsonrpc": "2.0", +
-  "id": "test", +
-  "method": "get_tx_key", +
-  "params":+
-    "tx_hash": "F86EF58C98C724C2261F3EB009B47E475472F75D3B4B2FF0FC749D607367090D" +
-  } +
-+
-</code></pre> +
-<p>Output example:</p> +
-<pre><code>+
-   "id":"test", +
-   "jsonrpc":"2.0", +
-   "result":+
-      "tx_key":"f0eede5679da2c9cfcd06fb1961d64316e0d4dc54a308247319cb25220bf9503" +
-   } +
-+
-</code></pre>+
 <h3> <h3>
 <a id="user-content-query_key" class="anchor" href="#query_key" aria-hidden="true"><svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>query_key</h3> <a id="user-content-query_key" class="anchor" href="#query_key" aria-hidden="true"><svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>query_key</h3>
Línea 522: Línea 499:
 </code></pre> </code></pre>
  
- 
-<h2> 
-<a id="user-content-examples" class="anchor" href="#examples" aria-hidden="true"><svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Examples</h2> 
-<h3> 
-<a id="user-content-getbalance-1" class="anchor" href="#getbalance-1" aria-hidden="true"><svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>getbalance</h3> 
-<pre><code> { 
-  "jsonrpc": "2.0",  
-  "method": "getbalance",  
-  "params": {} 
- } 
-</code></pre> 
-<h3> 
-<a id="user-content-transfer-1" class="anchor" href="#transfer-1" aria-hidden="true"><svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>transfer</h3> 
-<p>Please note, payment_id is an optional argument and can be left out.</p> 
-<pre><code> { 
-  "jsonrpc":"2.0", 
-  "method":"transfer", 
-  "params":{ 
-  "destinations":[ 
-  { 
-  "amount":11111, 
-  "address":"Prosus1uvk3GCQ2SSHd3w9RjKRjkcHPJL7mKSy25twnH5nxSxehzad7WSUTfZob83dU59K8ojrd3PidXSkMDfrj1KhkJ4Lpt5e14" 
-  }, 
-  { 
-  "amount":22222, 
-  "address":"Prosus2GCQ2SSHd3w9RjKRjkcHPJL7mKSy25twnH5nuvk3xSxehzad7WSUTfZob83dU59K8ojrd3PidXSkMDfrj1KhkJ4Lpt5e14" 
-  } 
-  ], 
-  "payment_id":"",  
-  "fee":1000000, 
-  "mixin":0, 
-  "unlock_time":0 
-  } 
- } 
-</code></pre> 
-<h3> 
-<a id="user-content-store-1" class="anchor" href="#store-1" aria-hidden="true"><svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>store</h3> 
-<pre><code> { 
-  "jsonrpc": "2.0",  
-  "method": "store",  
-  "params": {} 
- } 
-</code></pre> 
-<h3> 
-<a id="user-content-reset-1" class="anchor" href="#reset-1" aria-hidden="true"><svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>reset</h3> 
-<pre><code> { 
-  "jsonrpc": "2.0",  
-  "method": "reset",  
-  "params": {} 
- } 
-</code></pre> 
-<h3> 
-<a id="user-content-get_payments-1" class="anchor" href="#get_payments-1" aria-hidden="true"><svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>get_payments</h3> 
-<pre><code> { 
-  "jsonrpc":"2.0", 
-  "method":"get_payments", 
-  "params":{ 
-  "payment_id": "78cc4b76a48bd50ab955ac61a0c04e4a82079fbcf27298f87b39c76aefccbcc9" 
-  } 
- } 
-</code></pre> 
-<h3> 
-<a id="user-content-get_transfers-1" class="anchor" href="#get_transfers-1" aria-hidden="true"><svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>get_transfers</h3> 
-<pre><code> { 
-  "jsonrpc": "2.0",  
-  "method": "get_transfers",  
-  "params": {} 
- } 
-</code></pre> 
-<h3> 
-<a id="user-content-get_height-1" class="anchor" href="#get_height-1" aria-hidden="true"><svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>get_height</h3> 
-<pre><code> { 
-  "jsonrpc": "2.0",  
-  "method": "get_height",  
-  "params": {} 
- } 
-</code></pre> 
-                             
- 
-                    <!-- END ARTICLE --> 
 </html> </html>