Diferencias

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

Enlace a la vista de comparación

Próxima revisión
Revisión previa
api-wallet [2018/12/31 00:01]
YerkoBits creado
api-wallet [2021/12/30 01:21] (actual)
YerkoBits
Línea 1: Línea 1:
-FIXME +Habilitar servicio de la billetera
-To start wallet JSON RPC API server you should specify a port on which server binds (additionally to standard wallet's arguments). You can choose any free port. To do that execute the following command from the command line:+
  
-```+<code>prosus-wallet --rpc-bind-port=16191 --wallet-file=archivowallet --password=clavewallet --rpc-user=usuario --rpc-password=contrasena </code>
  
- simplewallet --wallet-file=example_wallet.bin --pass=12345 --rpc-bind-port=32348 +Para comprobar si el servicio funciona:  
-``` +    http://usuario:contrasena@localhost:16191/json_rpc
-Having done that you're ready to operate with the wallet through the following API URLs (e.g., your IP address is 95.46.98.64)+
-``` +
- http://95.46.98.64:32348/json_rpc +
- http://localhost:32348/json_rpc +
-``` +
-## Available commands ##+
  
-* getbalance +----
-* transfer +
-* store +
-* reset +
-* get_payments +
-* get_transfers +
-* get_height +
-* get_transaction +
-* get_address +
-* get_paymentid +
-* get_tx_key +
-* query_key +
-* sign_message +
-* verify_message +
-* change_password +
-* estimate_fusion +
-* send_fusion+
  
-Please note, there is no "refresh" RPC methodRPC wallet refresh is performed automatically each 20 seconds.+Los métodos vigentes están en  
 +https://github.com/ProsusCorp/prosus.money/blob/master/cli/src/Wallet/WalletRpcServer.cpp
  
 +  * getbalance
 +  * transfer
 +  * store
 +  * stop_wallet
 +  * get_payments
 +  * get_transfers
 +  * get_transaction
 +  * get_height
 +  * get_address
 +  * query_key
 +  * 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.
  
-### getbalance ### +**Para ver ejemplos de uso, en distintos lenguajes de programación, visita nuestro [[https://github.com/ProsusCorp/prosusmoney-api|repositorio GitHub]]** 
- +---- 
-Return balance. +<html> 
- +<h3><a id="user-content-getbalance" class="anchor" href="#getbalance" 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> 
-URL: +<p>Return balance.</p> 
-``` +<p>URL:</p> 
- /json_rpc +<pre><code> /json_rpc 
-``` +</code></pre> 
-Input:  +<p>Input:</p> 
-``` +<pre><code> {
- {+
   "$schema": "http://json-schema.org/draft-04/schema#",   "$schema": "http://json-schema.org/draft-04/schema#",
-  "title": "Karbowanec wallet api", +  "title": "Prosus.Money wallet api", 
-  "description": "Schema for transfer method in Karbowanec wallet",+  "description": "Schema for transfer method in Prosus.Money wallet",
   "type": "object",    "type": "object", 
     
Línea 59: Línea 49:
   }   }
  }  }
-``` +</code></pre> 
-Output: +<p>Output:</p> 
-``` +<pre><code> {
- {+
   "$schema": "http://json-schema.org/draft-04/schema#",   "$schema": "http://json-schema.org/draft-04/schema#",
-  "title": "Karbowanec wallet api", +  "title": "Prosus.Money wallet api", 
-  "description": "Schema for transfer method in Karbowanec wallet",+  "description": "Schema for transfer method in Prosus.Money wallet",
   "type": "object",   "type": "object",
     
Línea 77: Línea 66:
   }   }
  }  }
-``` +</code></pre> 
- +<h3> 
-### transfer ### +<a id="user-content-transfer" class="anchor" href="#transfer" 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>Transfer money to several destinations with specified fee, mixin ambiguity degree, and unlock time.</p> 
-Transfer money to several destinations with specified fee, mixin ambiguity degree, and unlock time. +<p>Please note: fee param is a mandatory and should not be less than current minimal fee which can be obtained from node.</p> 
- +<p>URL:</p> 
-Please note: fee param is a mandatory and should not be less than current minimal fee which can be obtained from node. +<pre><code> /json_rpc 
- +</code></pre> 
-URL: +<p>Input:</p> 
-``` +<pre><code> {
- /json_rpc +
-``` +
-Input: +
-``` +
- {+
   "$schema": "http://json-schema.org/draft-04/schema#",   "$schema": "http://json-schema.org/draft-04/schema#",
-  "title": "Karbowanec wallet api", +  "title": "Prosus.Money wallet api", 
-  "description": "Schema for transfer method in Karbowanec wallet",+  "description": "Schema for transfer method in Prosus.Money wallet",
   "type": "object",   "type": "object",
     
Línea 135: Línea 119:
   }   }
  }  }
-``` +</code></pre> 
-Output: +<p>Output:</p> 
-``` +<pre><code> {
- {+
   "$schema": "http://json-schema.org/draft-04/schema#",   "$schema": "http://json-schema.org/draft-04/schema#",
-  "title": "Karbowanec wallet api", +  "title": "Prosus.Money wallet api", 
-  "description": "Schema for transfer method in Karbowanec wallet",+  "description": "Schema for transfer method in Prosus.Money wallet",
   "type": "object",   "type": "object",
     
Línea 153: Línea 136:
   }   }
  }  }
-``` +</code></pre> 
-### store ### +<h3> 
- +<a id="user-content-store" class="anchor" href="#store" 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> 
-Store wallet data. +<p>Store wallet data.</p> 
- +<p>URL:</p> 
-URL: +<pre><code>  /json_rpc 
-``` +</code></pre> 
-  /json_rpc +<p>Input:</p> 
-``` +<pre><code> {
-Input:  +
-``` +
- {+
   "$schema": "http://json-schema.org/draft-04/schema#",   "$schema": "http://json-schema.org/draft-04/schema#",
-  "title": "Karbowanec wallet api", +  "title": "Prosus.Money wallet api", 
-  "description": "Schema for transfer method in Karbowanec wallet",+  "description": "Schema for transfer method in Prosus.Money wallet",
   "type": "object",   "type": "object",
     
Línea 179: Línea 159:
   }   }
  }  }
-``` +</code></pre> 
-Output:  +<p>Output:</p> 
-``` +<pre><code> {
- {+
   "$schema": "http://json-schema.org/draft-04/schema#",   "$schema": "http://json-schema.org/draft-04/schema#",
-  "title": "Karbowanec wallet api", +  "title": "Prosus.Money wallet api", 
-  "description": "Schema for transfer method in Karbowanec wallet",+  "description": "Schema for transfer method in Prosus.Money wallet",
   "type": "object",   "type": "object",
     
   "properties" : {}   "properties" : {}
  }  }
-``` +</code></pre> 
-### reset ### +<h3> 
- +<a id="user-content-reset" class="anchor" href="#reset" 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> 
-Erases simplewallet's internal state but keeps safe the wallet.bin. The method should be used to re-synchronize the wallet from scratch. The next refresh (which is automatically called each 20 seconds) will update the simplewallet state. +<p>Erases simplewallet's internal state but keeps safe the wallet.bin. The method should be used to re-synchronize the wallet from scratch. The next refresh (which is automatically called each 20 seconds) will update the simplewallet state.</p> 
- +<p>URL:</p> 
-URL: +<pre><code> /json_rpc 
-``` +</code></pre> 
- /json_rpc +<p>Input:</p> 
-``` +<pre><code> {
-Input: +
-``` +
- {+
   "$schema": "http://json-schema.org/draft-04/schema#",   "$schema": "http://json-schema.org/draft-04/schema#",
-  "title": "Karbowanec wallet api", +  "title": "Prosus.Money wallet api", 
-  "description": "Schema for transfer method in Karbowanec wallet",+  "description": "Schema for transfer method in Prosus.Money wallet",
   "type": "object",   "type": "object",
     
Línea 216: Línea 192:
   }   }
  }  }
-``` +</code></pre> 
-Output: +<p>Output:</p> 
-``` +<pre><code> {
- {+
   "$schema": "http://json-schema.org/draft-04/schema#",   "$schema": "http://json-schema.org/draft-04/schema#",
-  "title": "Karbowanec wallet api", +  "title": "Prosus.Money wallet api", 
-  "description": "Schema for transfer method in Karbowanec wallet",+  "description": "Schema for transfer method in Prosus.Money wallet",
   "type": "object",   "type": "object",
     
   "properties" : {}   "properties" : {}
  }  }
-``` +</code></pre> 
- +<h3> 
-### get_payments ### +<a id="user-content-get_payments" class="anchor" href="#get_payments" 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> 
- +<p>Receives all the payments with a corresponding payment_id that were sent to the wallet. This method is used to get the xPR (prosus) payments for the 3rd party services. As Prosus.Money uses only one address to receive xPR deposits, a unique payment_id should be assigned and shown to each user. The method will return all the payments for this user.</p> 
-Receives all the payments with a corresponding payment_id that were sent to the wallet. This method is used to get the BCN payments for the 3rd party services. As Karbowanec uses only one address to receive BCN deposits, a unique payment_id should be assigned and shown to each user. The method will return all the payments for this user. +<p>URL:</p> 
- +<pre><code> /json_rpc 
-URL: +</code></pre> 
-``` +<p>Input:</p> 
- /json_rpc +<pre><code> {
-``` +
-Input:  +
-``` +
- {+
   "$schema": "http://json-schema.org/draft-04/schema#",   "$schema": "http://json-schema.org/draft-04/schema#",
-  "title": "Karbowanec wallet api", +  "title": "Prosus.Money wallet api", 
-  "description": "Schema for transfer method in Karbowanec wallet",+  "description": "Schema for transfer method in Prosus.Money wallet",
   "type": "object",    "type": "object", 
    
Línea 258: Línea 229:
   }   }
  }  }
-``` +</code></pre> 
-Output:  +<p>Output:</p> 
-``` +<pre><code> {
- {+
   "$schema": "http://json-schema.org/draft-04/schema#",   "$schema": "http://json-schema.org/draft-04/schema#",
-  "title": "Karbowanec wallet api", +  "title": "Prosus.Money wallet api", 
-  "description": "Schema for transfer method in Karbowanec wallet",+  "description": "Schema for transfer method in Prosus.Money wallet",
   "type": "object",   "type": "object",
    
Línea 287: Línea 257:
   }   }
  }  }
-``` +</code></pre> 
-### get_transfers ### +<h3> 
- +<a id="user-content-get_transfers" class="anchor" href="#get_transfers" 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> 
-Returns the list of all the wallet's incoming and outgoing transfers. This data is available starting from v.1.0.2 build. For the transfers created by simplewallet of previous versions this method returns not exact transfers amounts but the transaction amounts (transfer amount + change). +<p>Returns the list of all the wallet's incoming and outgoing transfers.</p> 
- +<p>URL:</p> 
-URL:  +<pre><code> /json_rpc 
-``` +</code></pre> 
- /json_rpc +<p>Input:</p> 
-``` +<pre><code> {
-Input: +
-``` +
- {+
   "$schema": "http://json-schema.org/draft-04/schema#",   "$schema": "http://json-schema.org/draft-04/schema#",
-  "title": "Karbowanec wallet api", +  "title": "Prosus.Money wallet api", 
-  "description": "Schema for transfer method in Karbowanec wallet",+  "description": "Schema for transfer method in Prosus.Money wallet",
   "type": "object",   "type": "object",
     
Línea 313: Línea 280:
   }   }
  }  }
-``` +</code></pre> 
-Output: +<p>Output:</p> 
-``` +<pre><code> {
- {+
   "$schema": "http://json-schema.org/draft-04/schema#",   "$schema": "http://json-schema.org/draft-04/schema#",
-  "title": "Karbowanec wallet api", +  "title": "Prosus.Money wallet api", 
-  "description": "Schema for transfer method in Karbowanec wallet",+  "description": "Schema for transfer method in Prosus.Money wallet",
   "type": "object",   "type": "object",
    
Línea 360: Línea 326:
   }   }
  }  }
-``` +</code></pre> 
-### get_height ### +<h3> 
- +<a id="user-content-get_height" class="anchor" href="#get_height" 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> 
-Returns the last top known block height for simplewallet. This method can be used to verify that simplewallet is correctly synchronized. +<p>Returns the last top known block height for simplewallet. This method can be used to verify that simplewallet is correctly synchronized.</p> 
- +<p>URL:</p> 
-URL: +<pre><code> /json_rpc 
-``` +</code></pre> 
- /json_rpc +<p>Input:</p> 
-``` +<pre><code> {
-Input: +
-``` +
- {+
   "$schema": "http://json-schema.org/draft-04/schema#",   "$schema": "http://json-schema.org/draft-04/schema#",
-  "title": "Karbowanec wallet api", +  "title": "Prosus.Money wallet api", 
-  "description": "Schema for transfer method in Karbowanec wallet",+  "description": "Schema for transfer method in Prosus.Money wallet",
   "type": "object",   "type": "object",
     
Línea 386: Línea 349:
   }   }
  }  }
-``` +</code></pre> 
-Output: +<p>Output:</p> 
-``` +<pre><code> {
- {+
   "$schema": "http://json-schema.org/draft-04/schema#",   "$schema": "http://json-schema.org/draft-04/schema#",
-  "title": "Karbowanec wallet api", +  "title": "Prosus.Money wallet api", 
-  "description": "Schema for transfer method in Karbowanec wallet",+  "description": "Schema for transfer method in Prosus.Money wallet",
   "type": "object",   "type": "object",
     
Línea 401: Línea 363:
   }   }
  }  }
-``` +</code></pre> 
-### get_transaction ###+<h3> 
 +<a id="user-content-get_transaction" class="anchor" href="#get_transaction" 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_transaction</h3> 
 +<p>Returns the transaction details.</p> 
 +<p>URL:</p> 
 +<pre><code> /json_rpc 
 +</code></pre>
  
-Returns the transaction details. +<hr></hr>
  
-URL:  +<p>Input example:</p> 
-``` +<pre><code>{  
- /json_rpc +
-``` +
-Input example: +
-``` +
-{  +
    "jsonrpc":"2.0",    "jsonrpc":"2.0",
    "id":"test",    "id":"test",
    "method":"get_transaction",    "method":"get_transaction",
   "params":{     "params":{  
-      "tx_hash":"f86ef58c98c724c2261f3eb009b47e475472f75d3b4b2ff0fc749d607367090d"+      "tx_hash":"b0285cacb20ec402d56e4b87f629afc5ee6b19cf7a790a226173cb03c2615a31"
    }    }
  }  }
-``` +</code></pre> 
-Output example: +<p>Output example:</p> 
-``` +<pre><code>{
-{+
    "id":"test",    "id":"test",
    "jsonrpc":"2.0",    "jsonrpc":"2.0",
Línea 429: Línea 390:
       "destinations":[       "destinations":[
          {          {
-           "address":"Kcwr4Awjn7QefxbAEvHSAcTrVbhzYukfmbDvwWkrDhjFXe1FVUj5ggxCrEv4w2zv6iVZgoF4v7b3cNAbaU3LKQGS9EU9KAd",+           "address":"Prosus2uvk3GCQ2SSHd3w9RjKRjkcHPJL7mKSy25twnH5nxSxehzad7WSUTfZob83dU59K8ojrd3PidXSkMDfrj1KhkJ4Lpt5e14A",
             "amount":2010542676062             "amount":2010542676062
          },          },
          {          {
-            "address":"Kdev1L9V5ow3cdKNqDpLcFFxZCqu5W2GE9xMKewsB2pUXWxcXvJaUWHcSrHuZw91eYfQFzRtGfTemReSSMN4kE445i6Etb3",+            "address":"Prosus1EFCREFuMHPwWTJ217xsTcEdgqqTBsnuvZtk6ujYnXBkwHSNHAgH3ajVGRJLTfSAKLRxDH4EdVNQtYcNJM97ycCSJCSwA4pA",
             "amount":57000000000             "amount":57000000000
          }          }
       ],       ],
       "transaction_details":{       "transaction_details":{
-         "address":"Kcwr4Awjn7QefxbAEvHSAcTrVbhzYukfmbDvwWkrDhjFXe1FVUj5ggxCrEv4w2zv6iVZgoF4v7b3cNAbaU3LKQGS9EU9KAd",+         "address":"Prosus23GCQ2SSHd3w9RjKRjkcHPJL7mKSyuvk25twnH5nxSxehzad7WSUTfZob83dU59K8ojrd3PidXSkMDfrj1KhkJ4Lpt5e14",
          "amount":2124542676062,          "amount":2124542676062,
          "blockIndex":271652,          "blockIndex":271652,
Línea 446: Línea 407:
          "paymentId":"",          "paymentId":"",
          "time":1536706367,          "time":1536706367,
-         "transactionHash":"f86ef58c98c724c2261f3eb009b47e475472f75d3b4b2ff0fc749d607367090d", +         "transactionHash":"b0285cacb20ec402d56e4b87f629afc5ee6b19cf7a790a226173cb03c2615a31", 
-         "txKey":"01f0eede5679da2c9cfcd06fb1961d64316e0d4dc54a308247319cb25220bf9503",+         "txKey":"d2854e0414154881005254e6a80f94db7248712a7f4e212c1100519a673a48a3",
          "unlockTime":0          "unlockTime":0
       }       }
    }    }
 } }
-``` +</code></pre> 
-### get_address ### +<h3> 
- +<a id="user-content-get_address" class="anchor" href="#get_address" 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_address</h3> 
-Returns the wallet's public address.  +<p>Returns the wallet's public address.</p> 
- +<p>URL:</p> 
-URL:  +<pre><code> /json_rpc 
-``` +</code></pre> 
- /json_rpc +<p>Input example:</p> 
-``` +<pre><code>{  
-Input example: +
-``` +
-{  +
    "jsonrpc":"2.0",    "jsonrpc":"2.0",
    "id":"test",    "id":"test",
Línea 470: Línea 428:
    }    }
  }  }
-``` +</code></pre> 
-Output example: +<p>Output example:</p> 
-``` +<pre><code>{
-{+
    "id":"test",    "id":"test",
    "jsonrpc":"2.0",    "jsonrpc":"2.0",
    "result":{    "result":{
-      "address":"KaqCQAbx3BSKKv7ED98oQP9QSP3igqgo47hPYZ8q6KZyUY6GnDaQkh9WbVR4DxvmCq8mZcKPg3wfWFJQ5CsyrxPqKcXC3rx"+      "address":"Prosus1uvk3GCQ2SSHd3w9RjKRjkcHPJL7mKSy25twnH5nxSxehzad7WSUTfZob83dU59K8ojrd3PidXSkMDfrj1KhkJ4Lpt5e14"
    }    }
 } }
-``` +</code></pre> 
-### get_paymentid ### +<h3> 
- +<a id="user-content-get_paymentid" class="anchor" href="#get_paymentid" 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_paymentid</h3> 
-Returns the new randomly generated Payment ID. +<p>Returns the new randomly generated Payment ID.</p> 
- +<p>URL:</p> 
-URL:  +<pre><code> /json_rpc 
-``` +</code></pre> 
- /json_rpc +<p>Input example:</p> 
-``` +<pre><code>{  
-Input example: +
-``` +
-{  +
    "jsonrpc":"2.0",    "jsonrpc":"2.0",
    "id":"test",    "id":"test",
Línea 498: Línea 452:
    }    }
  }  }
-``` +</code></pre> 
-Output example: +<p>Output example:</p> 
-``` +<pre><code>{
-{+
    "id":"test",    "id":"test",
    "jsonrpc":"2.0",    "jsonrpc":"2.0",
Línea 508: Línea 461:
    }    }
 } }
-``` +</code></pre>
-### get_tx_key ###+
  
-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. +<h3> 
- +<a id="user-content-query_keyclass="anchorhref="#query_keyaria-hidden="true"><svg class="octicon octicon-linkviewbox="0 0 16 16version="1.1width="16height="16aria-hidden="true"><path fill-rule="evenoddd="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> 
-URL:  +<p>Returns the wallets private keys. Key type should be passed in params. Available key types: <code>paperwallet</code> and <code>mnemonic</code>.</p> 
-``` +<p>URL:</p> 
- /json_rpc +<pre><code> /json_rpc 
-``` +</code></pre> 
-Input example: +<p>Input example:</p> 
-``` +<pre><code>{
-+
-  "jsonrpc""2.0"+
-  "id""test"+
-  "method""get_tx_key"+
-  "params": { +
-    "tx_hash""F86EF58C98C724C2261F3EB009B47E475472F75D3B4B2FF0FC749D607367090D" +
-  } +
-+
-``` +
-Output example: +
-``` +
-+
-   "id":"test"+
-   "jsonrpc":"2.0"+
-   "result":+
-      "tx_key":"f0eede5679da2c9cfcd06fb1961d64316e0d4dc54a308247319cb25220bf9503" +
-   } +
-+
-``` +
-### query_key ### +
- +
-Returns the wallets private keys. Key type should be passed in params. Available key types: `paperwalletand `mnemonic`+
- +
-URL:  +
-``` +
- /json_rpc +
-``` +
-Input example: +
-``` +
-{+
   "jsonrpc": "2.0",   "jsonrpc": "2.0",
   "id": "test",   "id": "test",
Línea 556: Línea 478:
   }   }
 } }
-``` +</code></pre> 
-Error output example: +<p>Error output example:</p> 
-``` +<pre><code>{
-{+
    "error":{    "error":{
       "code":-1,       "code":-1,
Línea 567: Línea 488:
    "jsonrpc":"2.0"    "jsonrpc":"2.0"
 } }
-``` +</code></pre> 
-Output example: +<p>Output example:</p> 
-``` +<pre><code>{
-{+
    "id":"test",    "id":"test",
    "jsonrpc":"2.0",    "jsonrpc":"2.0",
Línea 577: Línea 497:
    }    }
 } }
-``` +</code></pre>
-### estimate_fusion ### +
- +
-Returns the fusion ready outputs count. Parameter `threshold` should be passed with threshold amount to optimize. If it is not passed it will estimate with default dust threshold. +
- +
-URL:  +
-``` +
- /json_rpc +
-``` +
-Input example: +
-``` +
-+
-  "jsonrpc": "2.0", +
-  "id": "test", +
-  "method": "estimate_fusion", +
-  "params":+
-    "threshold":1000000000000 +
-  } +
-+
-``` +
-Output example: +
-``` +
-+
-  "id": "test", +
-  "jsonrpc": "2.0", +
-  "result":+
-    "fusion_ready_count": 101 +
-  } +
-+
-``` +
-### send_fusion ### +
- +
-Optimize wallet (fuse many small outputs into fewer larger ones) to be able to send large amounts in a single transaction as with smaller inputs count its size will be smaller. +
- +
-URL: +
-``` +
- /json_rpc +
-``` +
-Input: +
-``` +
- { +
-  "$schema": "http://json-schema.org/draft-04/schema#", +
-  "title": "Karbowanec wallet api", +
-  "description": "Schema for send fusion transaction method in Karbowanec wallet", +
-  "type": "object", +
-   +
-  "properties" : { +
-  "jsonrpc" : { +
-  "type" : "string" +
-  },  +
-  "method" : { +
-  "type" : "string" +
-  }, +
-   +
-  "threshold" : { +
-  "type" : "integer" +
-  }, +
- +
-  "mixin" : { +
-  "type" : "integer" +
-  }, +
-   +
-  "unlock_time" : {  +
-  "type" : "integer" +
-  "description" : "Unix timestamp" +
-  } +
-  } +
- } +
-``` +
-Output: +
-``` +
- { +
-  "$schema": "http://json-schema.org/draft-04/schema#", +
-  "title": "Karbowanec wallet api", +
-  "description": "Schema for send fusion transaction method in Karbowanec wallet", +
-  "type": "object", +
-   +
-  "properties" : { +
-  "tx_hash" : { +
-  "type" : "string" +
-  } +
-  } +
- } +
-``` +
- +
- +
- +
-## Examples ## +
- +
-### getbalance ### +
-``` +
- { +
-  "jsonrpc": "2.0",  +
-  "method": "getbalance",  +
-  "params": {} +
- } +
-``` +
-### transfer ### +
- +
-Please note, payment_id is an optional argument and can be left out. +
-``` +
- { +
-  "jsonrpc":"2.0", +
-  "method":"transfer", +
-  "params":+
-  "destinations":+
-  { +
-  "amount":11111, +
-  "address":"KfXkT5VmdqmA7bWqSH37p87hSXBdTpTogN4mGHPARUSJaLse6jbXaVbVkLs3DwcmuD88xfu835Zvh6qBPCUXw6CHK8koDCt" +
-  }, +
-  { +
-  "amount":22222, +
-  "address":"KfXkT5VmdqmA7bWqSH37p87hSXBdTpTogN4mGHPARUSJaLse6jbXaVbVkLs3DwcmuD88xfu835Zvh6qBPCUXw6CHK8koDCt" +
-  } +
-  ], +
-  "payment_id":"",  +
-  "fee":1000000, +
-  "mixin":0, +
-  "unlock_time":+
-  } +
- } +
-``` +
-### store ### +
-``` +
- { +
-  "jsonrpc": "2.0",  +
-  "method": "store",  +
-  "params": {} +
- } +
-``` +
-### reset ### +
-``` +
- { +
-  "jsonrpc": "2.0",  +
-  "method": "reset",  +
-  "params": {} +
- } +
-``` +
-### get_payments ### +
-``` +
- { +
-  "jsonrpc":"2.0", +
-  "method":"get_payments", +
-  "params":+
-  "payment_id": "78cc4b76a48bd50ab955ac61a0c04e4a82079fbcf27298f87b39c76aefccbcc9" +
-  } +
- } +
-``` +
-### get_transfers ### +
-``` +
- { +
-  "jsonrpc": "2.0",  +
-  "method": "get_transfers",  +
-  "params": {} +
- } +
-``` +
-### get_height ### +
-``` +
- { +
-  "jsonrpc": "2.0",  +
-  "method": "get_height",  +
-  "params": {} +
- } +
-``` +
-### send_fusion ### +
- +
-Input example: +
-``` +
-+
-  "jsonrpc": "2.0", +
-  "id": "test", +
-  "method": "send_fusion", +
-  "params":+
-    "threshold":1000000000000, +
-    "mixin":3, +
-    "unlock_time":+
-  } +
-+
-``` +
-Output example: +
-``` +
-+
-  "id": "test", +
-  "jsonrpc": "2.0", +
-  "result":+
-    "tx_hash": "2bc081ba8fcd29ce254d0db28c5568489be19121be74d5a2577dbf969330eb30" +
-  } +
-+
-```+
  
 +</html>