API/Wallet: Difference between revisions

From Talleo Wiki
Jump to navigation Jump to search
(Created page with "== Wallet JSON RPC == * save * export * reset * changePassword * createAddress * createAddressList * deleteAddress * getSpendKeys * getBalanc...")
 
(→‎Wallet JSON RPC: Add new methods from v0.4.9.1179)
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
* [[save]]
* [[save]]
* [[export]]
* [[export]]
* [[repair]]
* [[reset]]
* [[reset]]
* [[changePassword]]
* [[changePassword]]
Line 7: Line 8:
* [[createAddressList]]
* [[createAddressList]]
* [[deleteAddress]]
* [[deleteAddress]]
* [[hasAddress]]
* [[getAddressCount]]
* [[getSpendKeys]]
* [[getSpendKeys]]
* [[getBalance]]
* [[getBalance]]
* [[getBlockHashes]]
* [[getBlockHashes]]
* [[getTransactionHashes]]
* [[getTransactionHashes]]
* [[getTransactionCount]]
* [[getTransactions]]
* [[getTransactions]]
* [[getUnconfirmedTransactionHashes]]
* [[getUnconfirmedTransactionHashes]]
Line 20: Line 24:
* [[sendDelayedTransaction]]
* [[sendDelayedTransaction]]
* [[getViewKey]]
* [[getViewKey]]
* [[getViewKeys]]
* [[getMnemonicSeed]]
* [[getMnemonicSeed]]
* [[getStatus]]
* [[getStatus]]
Line 25: Line 30:
* [[sendFusionTransaction]]
* [[sendFusionTransaction]]
* [[estimateFusion]]
* [[estimateFusion]]
== Usage ==
Replace "your_password" and "TA4yACzMYuFYq7V6xVAWYHeS39jQ8w4mKRowpY6NskGuS1rZpjcWuCpdeCypwUCJrK9mGqVW9o1pY2EG3HW7BZkR2YRcc4YNa" in examples with real values from wallet daemon.
Password is specified on command-line of wallet daemon, it is not returned by any API method for security reasons.
You can get list of valid wallet addresses using [[getAddresses]] method.
=== cURL ===
* <nowiki>curl -X POST http://127.0.0.1:33777/json_rpc -H 'Content-Type: application/json-rpc' -d '{"jsonrpc": "2.0", "method": "save", "password": "your_password", "params": {}, "id": "1"}'</nowiki>
* <nowiki>curl -X POST http://127.0.0.1:33777/json_rpc -H 'Content-Type: application/json-rpc' -d '{"jsonrpc": "2.0", "method": "estimateFusion", "password": "your_password", "params": {"addresses": ["TA4yACzMYuFYq7V6xVAWYHeS39jQ8w4mKRowpY6NskGuS1rZpjcWuCpdeCypwUCJrK9mGqVW9o1pY2EG3HW7BZkR2YRcc4YNa"], "threshold" : 100000000}, "id": "1"}'</nowiki>

Latest revision as of 18:14, 15 March 2023

Wallet JSON RPC

Usage

Replace "your_password" and "TA4yACzMYuFYq7V6xVAWYHeS39jQ8w4mKRowpY6NskGuS1rZpjcWuCpdeCypwUCJrK9mGqVW9o1pY2EG3HW7BZkR2YRcc4YNa" in examples with real values from wallet daemon. Password is specified on command-line of wallet daemon, it is not returned by any API method for security reasons. You can get list of valid wallet addresses using getAddresses method.

cURL

  • curl -X POST http://127.0.0.1:33777/json_rpc -H 'Content-Type: application/json-rpc' -d '{"jsonrpc": "2.0", "method": "save", "password": "your_password", "params": {}, "id": "1"}'
  • curl -X POST http://127.0.0.1:33777/json_rpc -H 'Content-Type: application/json-rpc' -d '{"jsonrpc": "2.0", "method": "estimateFusion", "password": "your_password", "params": {"addresses": ["TA4yACzMYuFYq7V6xVAWYHeS39jQ8w4mKRowpY6NskGuS1rZpjcWuCpdeCypwUCJrK9mGqVW9o1pY2EG3HW7BZkR2YRcc4YNa"], "threshold" : 100000000}, "id": "1"}'