Wallet RPC API Reference
#introductionIntroduction
This is a list of the ryo-wallet-rpc calls, their inputs and outputs, and examples of each. If you need daemon-rpc-calls refer to: Daemon RPC API Reference
add_address_book
Add an entry to the address book.
Input
- address string Required
- payment_id string
defaults to "0000000000000000000000000000000000000000000000000000000000000000"
- description string
defaults to ""
Output
- index unsigned int
The index of the address book entry.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "add_address_book",
"params": {
"address": "RYoSrF9zAg4aR2Y3ts1h24VKxE7WSZJ1GEq6NHBMqyUFCWA1g7Nw3mGe2KTrSKewV9SUrwyv9g3FeU3jqft6LFy5A1pUR2inaj1",
"description": "1st account"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"index": 0
}
}
delete_address_book
Delete an entry from the address book.
Input
- index unsigned int Required
The index of the address book entry.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "delete_address_book",
"params": {
"index": 0
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"index": 0
}
}
get_address_book
Retrieves entries from the address book.
Input
- entries array of unsigned int Required
indices of the requested address book entries
Output
- entries
array of entries:
- address string
Public address of the entry
- description string
Description of this address entry
- index unsigned int
- payment_id string
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "get_address_book",
"params": {
"entries": [
0,
1
]
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"entries": [
{
"address": "RYoLseSV7WGdMFijLPXNffMWEFxq17ZbtENpB8hqH7d3FLQqkadt3tgi2Z9Afw135BeQGC87bKYxKc6feRTgDY883kqvAAVLEUb",
"description": "3rd account",
"index": 0,
"payment_id": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"address": "RYoLseSV7WGdMFijLPXNffMWEFxq17ZbtENpB8hqH7d3FLQqkadt3tgi2Z9Afw135BeQGC87bKYxKc6feRTgDY883kqvAAVLEUb",
"description": "1st account",
"index": 1,
"payment_id": "0000000000000000000000000000000000000000000000000000000000000000"
}
]
}
}
start_mining
Start mining in the Ryo daemon.
Input
- threads_count unsigned int Required
Number of threads created for mining.
- do_background_mining boolean Required
Allow to start the miner in smart mining mode.
- ignore_battery boolean Required
Ignore battery status (for smart mining only)
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "start_mining",
"params": {
"threads_count": 1,
"do_background_mining": true,
"ignore_battery": false
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "stop_mining"
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
export_multisig_info
Export multisig info for other participants.
Output
- info string
Multisig info in hex format for other participants.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "export_multisig_info"
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"info": "52796f206d756c7469736967206578706f7274031e49ae51dc9ebe97cba7ab5df10eeb81a589814c6c48b1697b573fb2656782ad73446c27d02f38c96d3a883ca128855ede6be1a3c4eb3e3b220cca709a639cd748bd430303d4c494f8f42a16543f6e3b5aeeb17e1dd565a0aa4b4826fc9d46ee7e7b861bf78304dc12fc8072759638e85e8955a0abc42e27b07c9b8a18a77dafc2eb3e5a8b688374d057732295011fa8d1fd320fa01af128abe688c1a8062a145b1a8c9dc4aa7aa00756391904e6e79cffc2df45c030f79cc174a9ce0a16555fe344a29ad3323bd0366a0310c2fe82bcc5c4283d0c0af28139983753065c25a6a17f7d209a312454ebea930947ba1933962aa0ba4e080cc4523cb4c2d79d5d7204272b6e8e3e1bb20595d99f4ce3a54ea71846519fda3fdc8c6ca4829e85c13e60b2a945a641aed91a58f1e9c872c787b2f8c5b79c8648ab2dde1e95b94dcc1c5ac621400119073ff91737c28677bc5743885b154c4575d98c46cc7e0946a8b33b09eca508"
}
}
finalize_multisig
Turn this wallet into a multisig wallet, extra step for N-1/N wallets.
Input
- multisig_info array of string Required
List of multisig string from peers.
- password string
Wallet password
Output
- address string
multisig wallet address
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "finalize_multisig",
"params": {
"multisig_info": [
"Multisig...1",
"Multisig...2"
]
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"address": "RYoLsihaMVUeBfU48edMqP4RvxGwQ3cg5Xv7o74GrghUCdw94JoMK653uazgtbGY22MXKSVyaAogg6fRQSSdgjoMJmb9z1f6A35"
}
}
import_multisig_info
Import multisig info from other participants.
Input
- info array of string Required
List of multisig info in hex format from other participants.
Output
- n_outputs unsigned int
Number of outputs signed with those multisig info.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "import_multisig_info",
"params": {
"info": [
"52796f206d756c7469736967206578706f7274031e49ae51dc9ebe97cba7ab5df10eeb81a589814c6c48b1697b573fb2656782ad73446c27d02f38c96d3a883ca128855ede6be1a3c4eb3e3b220cca709a639cd748bd430303d4c494f8f42a16543f6e3b5aeeb17e1dd565a0aa4b4826fc9d46ee7e7b861bf78304dc12fc8072759638e85e8955a0abc42e27b07c9b8a18a77dafc2eb3e5a8b688374d057732295011fa8d1fd320fa01af128abe688c1a8062a145b1a8c9dc4aa7aa00756391904e6e79cffc2df45c030f79cc174a9ce0a16555fe344a29ad3323bd0366a0310c2fe82bcc5c4283d0c0af28139983753065c25a6a17f7d209a312454ebea930947ba1933962aa0ba4e080cc4523cb4c2d79d5d7204272b6e8e3e1bb20595d99f4ce3a54ea71846519fda3fdc8c6ca4829e85c13e60b2a945a641aed91a58f1e9c872c787b2f8c5b79c8648ab2dde1e95b94dcc1c5ac621400119073ff91737c28677bc5743885b154c4575d98c46cc7e0946a8b33b09eca508"
]
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"n_outputs": 10
}
}
is_multisig
Check if a wallet is a multisig one.
Output
- multisig boolean
States if the wallet is multisig
- ready boolean
- threshold unsigned int
Amount of signature needed to sign a transfer.
- total unsigned int
Total amount of signature in the multisig wallet.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "is_multisig"
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"multisig": false,
"ready": false,
"threshold": 0,
"total": 0
}
}
make_multisig
Make a wallet multisig by importing peers multisig string.
Input
- multisig_info array of string Required
List of multisig string from peers.
- threshold unsigned int Required
Amount of signatures needed to sign a transfer. Must be less or equal than the amount of signature in
multisig_info
. - password string
Wallet password
Output
- address string
multisig wallet address.
- multisig_info string
Multisig string to share with peers to create the multisig wallet (extra step for N-1/N wallets).
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "make_multisig",
"params": {
"multisig_info": [
"MultisigV1D2fZhGnCmW2c5ugnHgVRAfSp23hb8Kd9S6pkyKKKESxnYqFfXkiJVpXJxf3AHtHpN1PegfaiiyDBPXMNtbnVKsxVC8FT4ibkCQi62FXR3pAwZPe9x4wgzpJEv4c5X9zUAxRZC4WnKgpNRwofjoVkCg4vefbVaahewErycKRKsQkd7nNY"
],
"threshold": 2
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"address": "RYoLsiPqe4uck9pa9kGCSFitGtkbKnwotFXtWpv3eTEW1uqkhmKPQFEL7KgY3cTswLievnEB8hu4MLZHUeb7MQ2q7egRrP3f2Ld",
"multisig_info": ""
}
}
prepare_multisig
Prepare a wallet for multisig by generating a multisig string to share with peers.
Output
- multisig_info string
Multisig string to share with peers to create the multisig wallet.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "prepare_multisig"
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"multisig_info": "MultisigV1DJ4bWgXEgWbZtW22JwvkNY5oZG6vUSxMGQgnnJfhus4z49DM7vFdwfFf2ZM1eJTSMBfuhSa4VDL8H6ox8QqoWBMmiYQGFTKY4jLLqnJAhLbwuyYQ31oyBVpvg1Z2DNZzBbypi2oDQEbnm2dbbyCXWr4druVjZukpQXGxxdJmxb8mC11m"
}
}
sign_multisig
Sign a transaction in multisig.
Input
- tx_data_hex string Required
Multisig transaction in hex format, as returned by
transfer
undermultisig_txset
.
Output
- tx_data_hex string
Multisig transaction in hex format.
- tx_hash_list array of string
List of transaction Hash.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "sign_multisig",
"params": {
"tx_data_hex": "...multisig_txset..."
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"tx_data_hex": "...tx_data_hex...",
"tx_hash_list": [
"c531813d66085713ee6b0b69df5fcb6051d9e46cfb2b17d55cb2ffbf13206e07"
]
}
}
submit_multisig
Submit a signed multisig transaction.
Input
- tx_data_hex string Required
Multisig transaction in hex format, as returned by
sign_multisig
undertx_data_hex
.
Output
- tx_hash_list array of string
List of transaction Hash.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "submit_multisig",
"params": {
"tx_data_hex": "...tx_data_hex..."
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"tx_hash_list": [
"c531813d66085713ee6b0b69df5fcb6051d9e46cfb2b17d55cb2ffbf13206e07"
]
}
}
check_reserve_proof
Proves a wallet as a disposable reserve using a signature.
Input
- address string Required
Public address of the wallet.
- message string
Should be the same message used in
get_reserve_proof
. - signature string Required
transaction signature to confirm.
Output
- good boolean
States if the inputs proves the transaction.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "check_reserve_proof",
"params": {
"address": "RYoLsfGWE6FfLjaV87ervPdbZRP4GZoUqWr7XbM5Ws61LibMVcrvYUJ5JAZW2xHXdjSQtnPDkc9CWZM3EJocHVSHCFwQZVSyxnY",
"signature": "ReserveProofV11BZ23sBt9sZJeGccf84mzyAmNCP3KzYbE1111112Wfh1111118PKz8tVddiuAC4fhpN116U5efs9vS82eLMPdZY2FoP2296BDS7113UaRiFDreV5SEGHJo7Cn4eaAq2ue6KkBspBjb9Bx39Xd3RHG71yvfbwjfwJBW39ZD7ujYBEfSquFZGAbGbybFDgzpagTYMMxj113kcrAyoDgNiKGKuSdwMCRVMCn8S9Eiy2zkyrvJfE1hS8h2th6wno63GP1KH3ciUzhz82ZaMwDjnSVTPtaDhikiJFnUcuktPZJ8HURrvhib2MRZyEdx8kojaaL1edMjRcvnKfrC3q24Cu9ePJ28sqDAqfcXiabx2csemVkczUBcvmeAEenMqNuGj9B4RYjbdhuVsu9WgULTBi41PTnY88PRwMmnCJaiXqoA1jv1Ak9cHApHYkjWRPSoNn6ryXYyNZqg8BjdJnYp52Lj5gjKfnzRxe4WS5TayoCfBvHUUgDXt2KRvm4egXHekw8zAddVvnwJwgot6M5MFb6ci4xseZuUKF99DNd43vUaatpAnNuj6k49iCUhxjC9xmABYJycyTqfPEb5LVhegDW7cFT54Xb3KPnjkiGaaUBoVkgqxfXRwcFaT2cKrFfQZy5meRT8PSmgB4QnErDZsc2g2gJNRsPioT5tQRkXVPN7hmbRaNBbP4RiRMAqEeiybf1Ak9kFwCEibK4qt2yG2FEc9PwATJ7affi7hswQRdEyeVAvevrspAjHeey74cLxqTHqGVJL5SKvHec5yfqneHhup1DjFiGfpTqQC6VU8X8eRVVQ52WxVRD7iDLHpsjqknQoP4WSMqzyQ5XYQG4AHyWjwVHeR9yJeSAnZKvBEPU1x6ssxMPJAZZhqvXTL9oo67arU6oWFdaK6g5pKhLQigivokVNWjTqfJ8Tf21cWECNpd4TfABWan5DBATfYATUc6XMs44mEfUPTsnjXE7PPbVhw3zs9UkiaKyjQM2LAhNABEwdCDQ2bBWFHkZaTBfLAWAougJTWUBnS5Bkqj3ws8rXzj4RZKXYvfNu6rGPgZLu1fpJF91Wh7h91Bx1GqbMxomJdYipqKVJURZx6Bi7vfu3GNFTT8EgsqVU3kAMkwyV7QbZL2vHR3DLcHWziS2MzpRS7heQqKTW7fg79Hh7fLZTK7a8e182TrDndSQSRS5mpw6o78dqLw4HG42eYU4nffPNta8fURTMV1GQoz3p5evHm4zbcXCtohTVnZm4XtQGsUYtNaBK8jeytivZMW7mXK9JAFHEo5uYg7xABFGcFeCfix5Arq45e68fDkG9ogd7VHtnVdinrXMXns88aoFUfVSYVA8vsKT1Bx4JNxLQyUhC8s1UtTadzY8fJ2GUSXCG9m7ieQ1gmw7AbGa6qhoMMfQKyrASRVXpYXgiQgCM9FSCJszp74p8nVoWPoH642wWwqRz86j55i4oA64kwiVFC1bBdb2T6CA5aWaZZaW9rcjcj61D8wFsjXSwEK2ePxWEkwoCe2y264x6BJ2GnhdAL3PLhCJEnKjDAK56UAA9wAi6AwxtdkiAARWMurJ21Sr8KNFaJsFtiThvPtbR2Sz7k8QKvAEe4Ka5c5Vf6hABvR4gTsotuL25YBjYwoJJJ1xXoynGqx1D8bsvSY5GiUrJf7YqsuRYXs8RrmkQGepCG1BvrRvaKsCsVM28Besiffoc2YrddN6tvk9LT4Zj63LppNkMSqSrPf4TeWX9VddGgiQaf8RKnAJKECNjHMtRYRFu9edUsnRdgPq7fX37MmPhBeJPCnB7mXxLN5eYReJZX1g5d1GM4Vr"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"good": true,
"spent": 0,
"total": 13918002061
}
}
check_spend_proof
Prove a spend using a signature. Unlike proving a transaction, it does not requires the destination public address.
Input
- txid string Required
transaction id.
- message string
Should be the same message used in
get_spend_proof
. - signature string Required
transaction signature to confirm.
Output
- good boolean
States if the inputs proves the transaction.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "check_spend_proof",
"params": {
"txid": "7a1477549dceebc91832e3698cc2e8b80aa023426f1fb1f8e54393b4a86d8ead",
"message": "The monkey Jules has no friends",
"signature": "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"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"good": true
}
}
check_tx_key
Check a transaction in the blockchain with its secret key.
Input
- txid string Required
transaction id.
- tx_key string Required
transaction secret key.
- address string Required
destination public address of the transaction.
Output
- confirmations unsigned int
Number of block mined after the one with the transaction.
- in_pool boolean
States if the transaction is still in pool or has been added to a block.
- received unsigned int
Amount of the transaction.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "check_tx_key",
"params": {
"txid": "7a1477549dceebc91832e3698cc2e8b80aa023426f1fb1f8e54393b4a86d8ead",
"tx_key": "0f4bb1619537f28126d9e174a0c8f628a5933efbb0c52044f74024178a432001",
"address": "RYoLsfGWE6FfLjaV87ervPdbZRP4GZoUqWr7XbM5Ws61LibMVcrvYUJ5JAZW2xHXdjSQtnPDkc9CWZM3EJocHVSHCFwQZVSyxnY"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"confirmations": 15,
"in_pool": false,
"received": 2982999178
}
}
check_tx_proof
Prove a transaction by checking its signature.
Input
- txid string Required
transaction id.
- address string Required
destination public address of the transaction.
- message string
Should be the same message used in
get_tx_proof
. - signature string Required
transaction signature to confirm.
Output
- confirmations unsigned int
Number of block mined after the one with the transaction.
- good boolean
States if the inputs proves the transaction.
- in_pool boolean
States if the transaction is still in pool or has been added to a block.
- received unsigned int
Amount of the transaction.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "check_tx_proof",
"params": {
"txid": "7a1477549dceebc91832e3698cc2e8b80aa023426f1fb1f8e54393b4a86d8ead",
"address": "RYoLsfGWE6FfLjaV87ervPdbZRP4GZoUqWr7XbM5Ws61LibMVcrvYUJ5JAZW2xHXdjSQtnPDkc9CWZM3EJocHVSHCFwQZVSyxnY",
"message": "John Snow knows NOTHING!",
"signature": "InProofV1GNUGf8Ty32UPR52dVqAVJvjYtNnQWvtinG1YAbFviYKvKaZMakCHCMjPSrc517doh5HDQaNw1CmqxZNuvsPGFCotjE6Z6tQb6b72CovxpWcrD44mUHagXQXHg7g7S7TRuGTh"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"confirmations": 16,
"good": true,
"in_pool": false,
"received": 2982999178
}
}
export_outputs
Export all outputs in hex format.
Output
- outputs_data_hex string
wallet outputs in hex format.
get_spend_proof
Generate a signature to prove a spend. Unlike proving a transaction, it does not requires the destination public address.
Input
- txid string Required
transaction id.
- message string
add a message to the signature to further authenticate the prooving process.
Output
- signature string
transaction signature.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "get_spend_proof",
"params": {
"txid": "7a1477549dceebc91832e3698cc2e8b80aa023426f1fb1f8e54393b4a86d8ead",
"message": "The monkey Jules has no friends"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"signature": "SpendProofV1f9PKMjyb2WREM2QJdNgGE1J6WkJUMsRWpexDt5MpghV5Bmp5qrAZFbC1AZ1SXJnW5hP8VYsFPt9TE1P7NWXwJFemgvvsMa5C7uRRUUWUbt62mWA8tBuUdPCoNiV7HYGBRpbs7h9q1L1aA8XaXsrsw8wYWP18hxkxny8Cv2RU4iYEf8d2STb43xvG72SUcAHKSGA8S7TEfmi27JrWbGF4Sz71h3gojZn3sGrSHDoSVnPQ8LrY79T9UpN8p5RhBGip5GtPQzG76C2k1HPFUCeEEuboNTokBURFuRXy8WnKLB9Epv4GEK9K76rvbYpuuVVMa46P8CiZzYbpWAd6pLksnQPiVHEFCixVKFArrFfYBm9A33JJjFj3ZZ1p2K641WJXMfGFnrWSSChLh6Ksbm7z9VDiL3XZFVRMTmVkCUaAMvKBdjFTqZQN8GvgDU6hd5r53cc2qzK6GuvKdJPt1gkkiafhLXJYT4gMS8HiEBoLsyFmexPR4kMJT3uK6Mgo7cjkD7cG4ike4VYsKj6fK14ui7N3oBnJaZrrRJcH2i6LTwqoPADbRgsbNSNPf8yrB6ooz5nH2d7QJGEjAb44y7gv3HTNTY9Tn65ynQAjUiLxK6oqpAUkFah8TNhCpDo4hyFKmAvvMWA45WMyX2qhsUta4oHvNVkBZhfAZrSCt8yK2ccfhsdpBw1DQ1AY888onwyuF3HpkdPThBbRk2KeNdNc8gVKaCxww7osYU97pWhUJ9SYWgZnEFvj4q62PH9Rv6RKnoE2ogPpwsk7FXtvFXFcfcD1HWUvEuaMrndC96bPJ1U9STNXB28NkPKM1iAoPntRVf8MGuFazRp3NyJMB1BzeEHqoPJcFBCFbYZ6wQ9gazY8dnaAWeP6J4Xz8LNSWcGBAgT2st7UZE6c7qtWMKjp5KpxEwU2ikqxbBg2jhJ2BNpMRTkbHQUQ9hTvU7GZNRUhSWua467v8b4T8eiJNdCNCGkJTnT821daTdQasmmD6axHokJx8BpCXEWLNWT8cnqRA7GBGmLxDwMcywFFVTaDKKNvBAqek98A5h5AoALMMqH7Zh996kMfCBfU8Ros1ZvXWKnqQbquX4p6NrqHqMrmWUw67Nw2op2wrNH9g7cAr785z9LqxMU2VtPKTbnNnF3z86GWsn8Z1HjjxVau5Fb3CfxmyDaAXwm3qmUZPdeostz4QJLKinGnbfqTiQ7HGfoh6MCfgVhytBdnbRELdXq1GURCj4HcZ6iAVp7U7TiFSQsXxhSuZUf5pCepxF6CEUq5evUTLhB43P9AhRUmZuSD8tbN9m839iH1BLzpGRmC4FWDV5xgWToiZjQpUfT8HFAafpHwKNrAp1YGX1ZkJfiE9r13Qf1rE2nZvtyfCQm9xNLJcAtmcuQDYYFdkCVTR5nZHCqdSfDkFXURANF4KqxuJg9CbbhDf4LYoNQpv7ibCCuy3M4Z7CrDFFhLuKFEumpsjEfWdm9Rc6naBTqn6Seu4cC31jHY4YX9F4vbr2YWataY6iSbuxHHoQxXvPkMfjakB9aGMmuogDFDVvRgNKgdnMXzBhcVRhrozwRqVQK14L8oMWiG8uWM17jsCjNBPAdwsMKhbDMGzXeCc6DWT23pyR7bkWZSR5tYC9RQxVpgYGCs4N15qXa54RHnmBsQWTQeQMip2TKTgzGzK586Rj9Z9k4hkLJqAwR4iueRxoHm7Pi73BtLA1zeiyKvcpk5tjoNQEWbrekvpyWSpa8EJSDm78NDzwTssvLQYW4cdLekwCiYXMd21oLBSfbnfbzx73uMjdSfawEjBNjzgGPt46s9jD1TnJmZmMYCpMiZ5Hg2BrKJAbWpqc9a7guBNsGeHfrwYhyTG7zDBAA33ybxdwQsYckKsWMML6tbTisYattPoGJ2Fac8j4LJoA21Vr9kynAZ2rFu1icKkuZHHRxrKxnydY4FY4kEqisE58t3k6RY4s2JSxM7XVH63Z8GDETUKoUmiorpWQHCMwXgAyX91eRTSKtGgSZF9aYfWxbFUMxgNzosyGcvUjUbzGQjZVs8c5VFzP1Hgc9Bdje5xD78nQvMVYXwr3qLGPdcbZc1vEgKioD2o93V1DcNsNbgEWyzWrZJXGwyHxGychUAMr5mVMiv2jj9nsS4D8ZNAQpk9cvtLMAdZhpW847Fw1zhcdvzQ2rMD2VCUAu2uShCHBe18zBdanwNL8gxe6pZa5mHPQM9XknoMJUs73hxxnsxQVyXBEGeKXADPviZWimNPmpWhBnZ8pnSbCTegkSxHzrhQ6sx6B7jwvfo"
}
}
get_reserve_proof
Generate a signature to prove of an available amount in a wallet.
Input
- all boolean Required
Proves all wallet balance to be disposable.
- account_index unsigned int Required
Specify the account from witch to prove reserve. (ignored if
all
is set to true) - amount unsigned int Required
Amount (in atomic units) to prove the account has for reserve. (ignored if
all
is set to true) - message string
add a message to the signature to further authenticate the prooving process.
Output
- signature string
transaction signature.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "get_reserve_proof",
"params": {
"all": false,
"account_index": 0,
"amount": 13918002061
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"signature": "ReserveProofV11BZ23sBt9sZJeGccf84mzyAmNCP3KzYbE1111112Wfh1111118PKz8tVddiuAC4fhpN116U5efs9vS82eLMPdZY2FoP2296BDS7113UaRiFDreV5SEGHJo7Cn4eaAq2ue6KkBspBjb9Bx39Xd3RHG71yvfbwjfwJBW39ZD7ujYBEfSquFZGAbGbybFDgzpagTYMMxj113kcrAyoDgNiKGKuSdwMCRVMCn8S9Eiy2zkyrvJfE1hS8h2th6wno63GP1KH3ciUzhz82ZaMwDjnSVTPtaDhikiJFnUcuktPZJ8HURrvhib2MRZyEdx8kojaaL1edMjRcvnKfrC3q24Cu9ePJ28sqDAqfcXiabx2csemVkczUBcvmeAEenMqNuGj9B4RYjbdhuVsu9WgULTBi41PTnY88PRwMmnCJaiXqoA1jv1Ak9cHApHYkjWRPSoNn6ryXYyNZqg8BjdJnYp52Lj5gjKfnzRxe4WS5TayoCfBvHUUgDXt2KRvm4egXHekw8zAddVvnwJwgot6M5MFb6ci4xseZuUKF99DNd43vUaatpAnNuj6k49iCUhxjC9xmABYJycyTqfPEb5LVhegDW7cFT54Xb3KPnjkiGaaUBoVkgqxfXRwcFaT2cKrFfQZy5meRT8PSmgB4QnErDZsc2g2gJNRsPioT5tQRkXVPN7hmbRaNBbP4RiRMAqEeiybf1Ak9kFwCEibK4qt2yG2FEc9PwATJ7affi7hswQRdEyeVAvevrspAjHeey74cLxqTHqGVJL5SKvHec5yfqneHhup1DjFiGfpTqQC6VU8X8eRVVQ52WxVRD7iDLHpsjqknQoP4WSMqzyQ5XYQG4AHyWjwVHeR9yJeSAnZKvBEPU1x6ssxMPJAZZhqvXTL9oo67arU6oWFdaK6g5pKhLQigivokVNWjTqfJ8Tf21cWECNpd4TfABWan5DBATfYATUc6XMs44mEfUPTsnjXE7PPbVhw3zs9UkiaKyjQM2LAhNABEwdCDQ2bBWFHkZaTBfLAWAougJTWUBnS5Bkqj3ws8rXzj4RZKXYvfNu6rGPgZLu1fpJF91Wh7h91Bx1GqbMxomJdYipqKVJURZx6Bi7vfu3GNFTT8EgsqVU3kAMkwyV7QbZL2vHR3DLcHWziS2MzpRS7heQqKTW7fg79Hh7fLZTK7a8e182TrDndSQSRS5mpw6o78dqLw4HG42eYU4nffPNta8fURTMV1GQoz3p5evHm4zbcXCtohTVnZm4XtQGsUYtNaBK8jeytivZMW7mXK9JAFHEo5uYg7xABFGcFeCfix5Arq45e68fDkG9ogd7VHtnVdinrXMXns88aoFUfVSYVA8vsKT1Bx4JNxLQyUhC8s1UtTadzY8fJ2GUSXCG9m7ieQ1gmw7AbGa6qhoMMfQKyrASRVXpYXgiQgCM9FSCJszp74p8nVoWPoH642wWwqRz86j55i4oA64kwiVFC1bBdb2T6CA5aWaZZaW9rcjcj61D8wFsjXSwEK2ePxWEkwoCe2y264x6BJ2GnhdAL3PLhCJEnKjDAK56UAA9wAi6AwxtdkiAARWMurJ21Sr8KNFaJsFtiThvPtbR2Sz7k8QKvAEe4Ka5c5Vf6hABvR4gTsotuL25YBjYwoJJJ1xXoynGqx1D8bsvSY5GiUrJf7YqsuRYXs8RrmkQGepCG1BvrRvaKsCsVM28Besiffoc2YrddN6tvk9LT4Zj63LppNkMSqSrPf4TeWX9VddGgiQaf8RKnAJKECNjHMtRYRFu9edUsnRdgPq7fX37MmPhBeJPCnB7mXxLN5eYReJZX1g5d1GM4Vr"
}
}
get_tx_proof
Get transaction signature to prove it.
Input
- txid string Required
transaction id.
- address string Required
destination public address of the transaction.
- message string
add a message to the signature to further authenticate the prooving process.
Output
- signature string
transaction signature.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "get_tx_proof",
"params": {
"txid": "7a1477549dceebc91832e3698cc2e8b80aa023426f1fb1f8e54393b4a86d8ead",
"address": "RYoLsfGWE6FfLjaV87ervPdbZRP4GZoUqWr7XbM5Ws61LibMVcrvYUJ5JAZW2xHXdjSQtnPDkc9CWZM3EJocHVSHCFwQZVSyxnY",
"message": "John Snow knows NOTHING!"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"signature": "InProofV1GNUGf8Ty32UPR52dVqAVJvjYtNnQWvtinG1YAbFviYKvKaZMakCHCMjPSrc517doh5HDQaNw1CmqxZNuvsPGFCotjE6Z6tQb6b72CovxpWcrD44mUHagXQXHg7g7S7TRuGTh"
}
}
get_tx_notes
Get string notes for transactions.
Input
- txids array of string Required
transaction ids
Output
- notes array of string
notes for the transactions
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "get_tx_notes",
"params": {
"txids": [
"c595e58c057a9a831fb94efdc3fbfe34d482ebdbf57ee084e4e81002739c52fd"
],
"notes": [
"Nostradamus knows the future"
]
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
get_transfers
Returns a list of transfers.
Input
- in boolean
Include incoming transfers.
- out boolean
Include outgoing transfers.
- pending boolean
Include pending transfers.
- failed boolean
Include failed transfers.
- pool boolean
Include transfers from the daemon's transaction pool.
- filter_by_height boolean
Filter transfers by block height.
- min_height unsigned int
Minimum block height to scan for transfers, if filtering by height is enabled.
- max_height unsigned int Required
(Opional) Maximum block height to scan for transfers, if filtering by height is enabled (defaults to max block height).
- account_index unsigned int
Index of the account to query for transfers. (defaults to 0)
- subaddr_indices array of unsigned int
List of subaddress indices to query for transfers. (defaults to 0)
Output
- in
- address string
Public address of the transfer.
- amount unsigned int
Amount transferred.
- confirmations unsigned int
Number of block mined since the block containing this transaction (or block height at which the transaction should be added to a block if not yet confirmed).
- double_spend_seen boolean
True if the key image(s) for the transfer have been seen before.
- fee unsigned int
Transaction fee for this transfer.
- height unsigned int
Height of the first block that confirmed this transfer (0 if not mined yet).
- note string
Note about this transfer.
- payment_id string
Payment ID for this transfer.
- subaddr_index
JSON object containing the major & minor subaddress index:
- major unsigned int
Account index for the subaddress.
- minor unsigned int
Index of the subaddress under the account.
- suggested_confirmations_threshold unsigned int
Estimation of the confirmations needed for the transaction to be included in a block.
- timestamp unsigned int
POSIX timestamp for when this transfer was first confirmed in a block (or timestamp submission if not mined yet).
- txid string
Transaction ID for this transfer.
- type string
Transfer type: "in"
- unlock_time unsigned int
Number of blocks until transfer is safely spendable.
- out
- pending
- failed
- pool
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "get_transfers",
"params": {
"in": true,
"account_index": 1
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"in": [
{
"address": "RYoLseSV7WGdMFijLPXNffMWEFxq17ZbtENpB8hqH7d3FLQqkadt3tgi2Z9Afw135BeQGC87bKYxKc6feRTgDY883kqvAAVLEUb",
"amount": 1000000000,
"double_spend_seen": false,
"fee": 14000000,
"height": 196309,
"note": "",
"payment_id": "0000000000000000",
"subaddr_index": {
"major": 0,
"minor": 0
},
"timestamp": 1542235829,
"txid": "c595e58c057a9a831fb94efdc3fbfe34d482ebdbf57ee084e4e81002739c52fd",
"type": "in",
"unlock_time": 0
}
]
}
}
get_transfer_by_txid
Show information about a transfer to/from this address.
Input
- txid string Required
Transaction ID used to find the transfer.
- account_index unsigned int
Index of the account to query for the transfer.
Output
- transfer
JSON object containing payment information:
- address string
Address that transferred the funds. Base58 representation of the public keys.
- amount unsigned int
Amount of this transfer.
- confirmations unsigned int
Number of block mined since the block containing this transaction (or block height at which the transaction should be added to a block if not yet confirmed).
- destinations
array of JSON objects containing transfer destinations:
- amount unsigned int
Amount transferred to this destination.
- address string
Address for this destination. Base58 representation of the public keys.
- double_spend_seen boolean
True if the key image(s) for the transfer have been seen before.
- fee unsigned int
Transaction fee for this transfer.
- height unsigned int
Height of the first block that confirmed this transfer.
- note string
Note about this transfer.
- payment_id string
Payment ID for this transfer.
- subaddr_index
JSON object containing the major & minor subaddress index:
- major unsigned int
Account index for the subaddress.
- minor unsigned int
Index of the subaddress under the account.
- suggested_confirmations_threshold unsigned int
Estimation of the confirmations needed for the transaction to be included in a block.
- timestamp unsigned int
POSIX timestamp for the block that confirmed this transfer (or timestamp submission if not mined yet).
- txid string
Transaction ID of this transfer (same as input TXID).
- type string
Type of transfer, one of the following: "in", "out", "pending", "failed", "pool"
- unlock_time unsigned int
Number of blocks until transfer is safely spendable.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "get_transfer_by_txid",
"params": {
"txid": "c595e58c057a9a831fb94efdc3fbfe34d482ebdbf57ee084e4e81002739c52fd"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"transfer": {
"address": "RYoLseSV7WGdMFijLPXNffMWEFxq17ZbtENpB8hqH7d3FLQqkadt3tgi2Z9Afw135BeQGC87bKYxKc6feRTgDY883kqvAAVLEUb",
"amount": 1000000000,
"double_spend_seen": false,
"fee": 14000000,
"height": 196309,
"note": "",
"payment_id": "0000000000000000",
"subaddr_index": {
"major": 0,
"minor": 0
},
"timestamp": 1542235829,
"txid": "c595e58c057a9a831fb94efdc3fbfe34d482ebdbf57ee084e4e81002739c52fd",
"type": "in",
"unlock_time": 0
}
}
}
incoming_transfers
Return a list of incoming transfers to the wallet.
Input
- transfer_type string Required
"all": all the transfers, "available": only transfers which are not yet spent, OR "unavailable": only transfers which are already spent.
- account_index unsigned int
Return transfers for this account. (defaults to 0)
- subaddr_indices array of unsigned int
Return transfers sent to these subaddresses.
- verbose boolean
Enable verbose output, return key image if true.
Output
- transfers
list of:
- amount unsigned int
Amount of this transfer.
- global_index unsigned int
Mostly internal use, can be ignored by most users.
- key_image string
Key image for the incoming transfer's unspent output (empty unless verbose is true).
- spent boolean
Indicates if this transfer has been spent.
- subaddr_index unsigned int
Subaddress index for incoming transfer.
- tx_hash string
Several incoming transfers may share the same hash if they were in the same transaction.
- tx_size unsigned int
Size of transaction in bytes.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "incoming_transfers",
"params": {
"transfer_type": "all",
"account_index": 0,
"verbose": true
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"transfers": [
{
"amount": 1000000411,
"global_index": 1938236,
"key_image": "832f6cc913d1558275df87b44db5ca175f5a97a89267398b979f4ab08feeb816",
"spent": false,
"subaddr_index": 0,
"tx_hash": "eec97b86454ff04acf0f1cf6d625ba2062833d67f07d346055ee2fa4efaa3957",
"tx_size": 277
},
{
"amount": 411,
"global_index": 1938259,
"key_image": "f3c027605fe867b2156a846a246d93207fbf783a6abdeeec7e0d72a4a8c80943",
"spent": false,
"subaddr_index": 0,
"tx_hash": "7a1477549dceebc91832e3698cc2e8b80aa023426f1fb1f8e54393b4a86d8ead",
"tx_size": 278
}
]
}
}
import_outputs
Import outputs in hex format.
Input
- outputs_data_hex string Required
wallet outputs in hex format.
Output
- num_imported unsigned int
number of outputs imported.
relay_tx
Relay a transaction previously created with "do_not_relay":true
.
Input
- hex string Required
transaction metadata returned from a
transfer
method withget_tx_metadata
set totrue
.
Output
- tx_hash
String for the publically searchable transaction hash.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "relay_tx",
"params": {
"hex": "...tx_metadata..."
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"fee": 0,
"tx_blob": "",
"tx_hash": "bba647f72d8d2c89803a56acef42e95184f4ce11fff14128994ad674323ba2cd",
"tx_key": ""
}
}
set_tx_notes
Set arbitrary string notes for transactions.
Input
- txids array of string Required
transaction ids
- notes array of string Required
notes for the transactions
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "set_tx_notes",
"params": {
"txids": [
"c595e58c057a9a831fb94efdc3fbfe34d482ebdbf57ee084e4e81002739c52fd"
],
"notes": [
"Nostradamus knows the future"
]
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
sign
Sign a string.
Input
- data string Required
Anything you need to sign.
Output
- signature string
Signature generated against the "data" and the account public address.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "sign",
"params": {
"data": "Privacy is for eveRYOne!"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"signature": "SigV1GUKrAs71GuJE5dk1skq11TjMCWfQA3xVRPkLcpTFw8Z4Va6ch8xDnxkCfcfAof48C86LUS6NehRBiABYJKV4rZPn"
}
}
sign_transfer
Sign a transaction created on a read-only wallet (in cold-signing process)
Input
- unsigned_txset string Required
Set of unsigned tx returned by "transfer" or "transfer_split" methods.
- export_raw boolean
If true, return the raw transaction data. (Defaults to false)
Output
- signed_txset string
Set of signed tx to be used for submitting transfer.
- tx_hash_list array of string
The tx hashes of every transaction.
- tx_raw_list array of string
The tx raw data of every transaction.
submit_transfer
Submit a previously signed transaction on a read-only wallet (in cold-signing process).
Input
- tx_data_hex string Required
Set of signed tx returned by "sign_transfer"
Output
- tx_hash_list array of string
The tx hashes of every transaction.
sweep_dust
Send all dust outputs back to the wallet's, to make them easier to spend (and mix).
Input
- get_tx_keys boolean
Return the transaction keys after sending.
- do_not_relay boolean
If true, the newly created transaction will not be relayed to the ryo network. (Defaults to false)
- get_tx_hex boolean
Return the transactions as hex string after sending. (Defaults to false)
- get_tx_metadata boolean
Return list of transaction metadata needed to relay the transfer later. (Defaults to false)
Output
- tx_hash_list array of string
The tx hashes of every transaction.
- tx_key_list array of string
The transaction keys for every transaction.
- amount_list array of integer
The amount transferred for every transaction.
- fee_list array of integer
The amount of fees paid for every transaction.
- tx_blob_list array of string
The tx as hex string for every transaction.
- tx_metadata_list array of string
List of transaction metadata needed to relay the transactions later.
- multisig_txset string
The set of signing keys used in a multisig transaction (empty for non-multisig).
- unsigned_txset string
Set of unsigned tx for cold-signing purposes.
sweep_all
Send all unlocked balance to an address.
Input
- address string Required
Destination public address.
- account_index unsigned int Required
Sweep transactions from this account.
- subaddr_indices array of unsigned int
Sweep from this set of subaddresses in the account.
- priority unsigned int
Priority for sending the sweep transfer, partially determines fee.
- mixin unsigned int Required
Number of outputs from the blockchain to mix with (0 means no mixing).
- ring_size unsigned int Required
Sets ringsize to n (mixin + 1).
- unlock_time unsigned int Required
Number of blocks before the ryo can be spent (0 to not add a lock).
- payment_id string
Random 32-byte/64-character hex string to identify a transaction.
- get_tx_keys boolean
Return the transaction keys after sending.
- below_amount unsigned int
Include outputs below this amount.
- do_not_relay boolean
If true, do not relay this sweep transfer. (Defaults to false)
- get_tx_hex boolean
return the transactions as hex encoded string. (Defaults to false)
- get_tx_metadata boolean
return the transaction metadata as a string. (Defaults to false)
Output
- tx_hash_list array of string
The tx hashes of every transaction.
- tx_key_list array of string
The transaction keys for every transaction.
- amount_list array of integer
The amount transferred for every transaction.
- fee_list array of integer
The amount of fees paid for every transaction.
- tx_blob_list array of string
The tx as hex string for every transaction.
- tx_metadata_list array of string
List of transaction metadata needed to relay the transactions later.
- multisig_txset string
The set of signing keys used in a multisig transaction (empty for non-multisig).
- unsigned_txset string
Set of unsigned tx for cold-signing purposes.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "sweep_all",
"params": {
"address": "RYoLsfGWE6FfLjaV87ervPdbZRP4GZoUqWr7XbM5Ws61LibMVcrvYUJ5JAZW2xHXdjSQtnPDkc9CWZM3EJocHVSHCFwQZVSyxnY",
"subaddr_indices": [
0
],
"ring_size": 13,
"unlock_time": 0,
"get_tx_keys": true
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"amount_list": [
13889001650
],
"fee_list": [
15000000
],
"multisig_txset": "",
"tx_hash_list": [
"5b02234388657fdbae0ba1747684eb6e446589b032e6352d46ac8c35624a71b9"
],
"tx_key_list": [
"004206736be2ef3761803ed5c51587c0f6bf0e6039ac60116ddcbbe02e848708"
]
}
}
sweep_single
Send all of a specific unlocked output to an address.
Input
- address string Required
Destination public address.
- account_index unsigned int Required
Sweep transactions from this account.
- subaddr_indices array of unsigned int
Sweep from this set of subaddresses in the account.
- priority unsigned int
Priority for sending the sweep transfer, partially determines fee.
- mixin unsigned int Required
Number of outputs from the blockchain to mix with (0 means no mixing).
- ring_size unsigned int Required
Sets ringsize to n (mixin + 1).
- unlock_time unsigned int Required
Number of blocks before the ryo can be spent (0 to not add a lock).
- payment_id string
Random 32-byte/64-character hex string to identify a transaction.
- get_tx_keys boolean
Return the transaction keys after sending.
- key_image string Required
Key image of specific output to sweep.
- below_amount unsigned int
Include outputs below this amount.
- do_not_relay boolean
If true, do not relay this sweep transfer. (Defaults to false)
- get_tx_hex boolean
return the transactions as hex encoded string. (Defaults to false)
- get_tx_metadata boolean
return the transaction metadata as a string. (Defaults to false)
Output
- tx_hash_list array of string
The tx hashes of every transaction.
- tx_key_list array of string
The transaction keys for every transaction.
- amount_list array of integer
The amount transferred for every transaction.
- fee_list array of integer
The amount of fees paid for every transaction.
- tx_blob_list array of string
The tx as hex string for every transaction.
- tx_metadata_list array of string
List of transaction metadata needed to relay the transactions later.
- multisig_txset string
The set of signing keys used in a multisig transaction (empty for non-multisig).
- unsigned_txset string
Set of unsigned tx for cold-signing purposes.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "sweep_single",
"params": {
"address": "RYoLsfGWE6FfLjaV87ervPdbZRP4GZoUqWr7XbM5Ws61LibMVcrvYUJ5JAZW2xHXdjSQtnPDkc9CWZM3EJocHVSHCFwQZVSyxnY",
"ring_size": 13,
"unlock_time": 0,
"key_image": "516d06d2063db0d1fc68ea5819a78c3d8313898aeaf15e6192ff98f4e301ee20",
"get_tx_keys": true
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"amount": 486500000,
"fee": 13500000,
"multisig_txset": "",
"tx_blob": "",
"tx_hash": "32b084b064b08a58f9479eaeb0e2034a554803cb185828a1949ca4bae252b7e3",
"tx_key": "",
"tx_metadata": ""
}
}
transfer
Send Ryo to a number of recipients.
Input
- destinations Required
array of destinations to receive Ryo:
- amount unsigned int Required
Amount to send to each destination, in atomic units.
- address string Required
Destination public address.
- account_index unsigned int
Transfer from this account index. (Defaults to 0)
- subaddr_indices array of unsigned int
Transfer from this set of subaddresses. (Defaults to 0)
- priority unsigned int Required
Set a priority for the transaction. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority.
- mixin unsigned int Required
Number of outputs from the blockchain to mix with (0 means no mixing).
- ring_size unsigned int Required
Number of outputs to mix in the transaction (this output + N decoys from the blockchain).
- unlock_time unsigned int Required
Number of blocks before the ryo can be spent (0 to not add a lock).
- payment_id string
Random 32-byte/64-character hex string to identify a transaction.
- get_tx_key boolean
Return the transaction key after sending.
- do_not_relay boolean
If true, the newly created transaction will not be relayed to the ryo network. (Defaults to false)
- get_tx_hex boolean Required
Return the transaction as hex string after sending (Defaults to false)
- get_tx_metadata boolean Required
Return the metadata needed to relay the transaction. (Defaults to false)
Output
- amount
Amount transferred for the transaction.
- fee
Integer value of the fee charged for the txn.
- multisig_txset
Set of multisig transactions in the process of being signed (empty for non-multisig).
- tx_blob string
Raw transaction represented as hex string, if get_tx_hex is true.
- tx_hash string
Publically searchable transaction hash.
- tx_key string
Transaction key if get_tx_key is true, otherwise, blank string.
- tx_metadata
Set of transaction metadata needed to relay this transfer later, if get_tx_metadata is true.
- unsigned_txset string
Set of unsigned tx for cold-signing purposes.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "transfer",
"params": {
"destinations": [
{
"amount": 1000000411,
"address": "RYoKswMJiouLp2u9jTBMphPiTNR3NzTWSX16GdLiuwX38ksHytnQnBZ"
},
{
"amount": 1000000042,
"address": "RYoLsedkTcWcTgfaMTnUBq1kBGhw1VsH1TnZbCCnaEAL3iF1XfbZg7jezQecxz5gZsbmwZgKdHhrE8E126Kzje2sMPaNC7asCiN"
}
],
"account_index": 0,
"subaddr_indices": [
0
],
"priority": 0,
"ring_size": 13,
"get_tx_key": true
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"amount": 2000000453,
"fee": 17000000,
"multisig_txset": "",
"tx_blob": "",
"tx_hash": "e9dc5dab2d5c2a6bfc0cdf7d8d0bfedd03600d963090f337165f47587b379b56",
"tx_key": "637c83bcf6797d633b141da7fe09d91da7a631c10aa3fc0a833db3432fba670b",
"tx_metadata": ""
}
}
transfer_split
Same as transfer, but can split into more than one tx if necessary.
Input
- destinations Required
array of destinations to receive Ryo:
- amount unsigned int Required
Amount to send to each destination, in atomic units.
- address string Required
Destination public address.
- account_index unsigned int
Transfer from this account index. (Defaults to 0)
- subaddr_indices array of unsigned int
Transfer from this set of subaddresses. (Defaults to 0)
- mixin unsigned int Required
Number of outputs from the blockchain to mix with (0 means no mixing).
- ring_size unsigned int Required
Sets ringsize to n (mixin + 1).
- unlock_time unsigned int Required
Number of blocks before the ryo can be spent (0 to not add a lock).
- payment_id string
Random 32-byte/64-character hex string to identify a transaction.
- get_tx_keys boolean
Return the transaction keys after sending.
- priority unsigned int Required
Set a priority for the transactions. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority.
- do_not_relay boolean
If true, the newly created transaction will not be relayed to the ryo network. (Defaults to false)
- get_tx_hex boolean Required
Return the transactions as hex string after sending
- new_algorithm boolean Required
True to use the new transaction construction algorithm, defaults to false.
- get_tx_metadata boolean Required
Return list of transaction metadata needed to relay the transfer later.
Output
- tx_hash_list array of string
The tx hashes of every transaction.
- tx_key_list array of string
The transaction keys for every transaction.
- amount_list array of integer
The amount transferred for every transaction.
- fee_list array of integer
The amount of fees paid for every transaction.
- tx_blob_list array of string
The tx as hex string for every transaction.
- tx_metadata_list array of string
List of transaction metadata needed to relay the transactions later.
- multisig_txset string
The set of signing keys used in a multisig transaction (empty for non-multisig).
- unsigned_txset string
Set of unsigned tx for cold-signing purposes.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "transfer_split",
"params": {
"destinations": [
{
"amount": 411,
"address": "RYoLsfmhLANNkFT5dUDDsvMM3Z1Fzd57zFvJnMHcghD5j1zFEyyKovcSHMKAQ9NZZ5HeWWmzDHCL3bmdXK9b43Z7hLkWF5vzzFF"
},
{
"amount": 411,
"address": "RYoLsedkTcWcTgfaMTnUBq1kBGhw1VsH1TnZbCCnaEAL3iF1XfbZg7jezQecxz5gZsbmwZgKdHhrE8E126Kzje2sMPaNC7asCiN"
}
],
"account_index": 0,
"subaddr_indices": [
0
],
"priority": 0,
"ring_size": 13,
"get_tx_key": true
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"amount_list": [
822
],
"fee_list": [
17000000
],
"multisig_txset": "",
"tx_hash_list": [
"7a1477549dceebc91832e3698cc2e8b80aa023426f1fb1f8e54393b4a86d8ead"
]
}
}
verify
Verify a signature on a string.
Input
- data string Required
What should have been signed.
- address string Required
Public address of the wallet used to
sign
the data. - signature string Required
signature generated by
sign
method.
Output
- good boolean
change_wallet_password
Change a wallet password.
Input
- old_password string
Current wallet password, if defined.
- new_password string
New wallet password, if not blank.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "close_wallet"
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
create_account
Create a new account with an optional label.
Input
- label string
Label for the account.
Output
- account_index unsigned int
Index of the new account.
- address string
Address for this account. Base58 representation of the public keys.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "create_account",
"params": {
"label": "Secondary account"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"account_index": 1,
"address": "RYoSrJv53kzGWQkU2ausiTEGDaRPTcQn4h6DVSnpvyWE8ta5rJF4cPCfx2TkpkD7JMWiGLjEz7QthR7NgqtLVYXkasLthmrbjRm"
}
}
create_address
Create a new address for an account. Optionally, label the new address.
Input
- account_index unsigned int Required
Create a new address for this account.
- label string
Label for the new address.
Output
- address string
Newly created address. Base58 representation of the public keys.
- address_index unsigned int
Index of the new address under the input account.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "create_address",
"params": {
"account_index": 0,
"label": "new-sub"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"address": "RYoSrJEM9qfAZPQxRjcP22J28fmcCk55taG6k9c1SSmcY1uBsaUFzX26X1bUaN9kQMfuNjX7T3SzC1u9WAXPJH2cWjn9wvim1Qs",
"address_index": 1
}
}
create_wallet
Create a new wallet. You need to have set the argument "–wallet-dir" when launching ryo-wallet-rpc to make this work.
Input
- filename string Required
Wallet file name.
- password string
password to protect the wallet.
- language string Required
Language for your wallets' seed.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "create_wallet",
"params": {
"filename": "createTestWallet",
"password": "myTestPassword",
"language": "English"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
export_key_images
Export a signed set of key images.
Input
- filename string Required
Wallet file name.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "export_key_images",
"params": {
"filename": "1"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
get_account_tags
Get a list of user-defined account tags.
Output
- account_tags
array of account tag information:
- tag string
Filter tag.
- label string
Label for the tag.
- accounts array of int
List of tagged account indices.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "1",
"method": "get_account_tags",
"params": ""
}'
{
"id": "1",
"jsonrpc": "2.0",
"result": {
"account_tags": [
{
"accounts": [
0
],
"label": "",
"tag": "myTag0"
},
{
"accounts": [
1
],
"label": "",
"tag": "myTag1"
}
]
}
}
get_accounts
Get all accounts for a wallet. Optionally filter accounts by tag.
Input
- tag string
Tag for filtering accounts.
Output
- subaddress_accounts
array of subaddress account information:
- account_index unsigned int
Index of the account.
- balance unsigned int
Balance of the account (locked or unlocked).
- base_address string
Base64 representation of the first subaddress in the account.
- label string
Label of the account.
- tag string
Tag for filtering accounts.
- unlocked_balance unsigned int
Unlocked balance for the account.
- total_balance unsigned int
Total balance of the selected accounts (locked or unlocked).
- total_unlocked_balance unsigned int
Total unlocked balance of the selected accounts.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "get_accounts",
"params": {
"tag": "myTag"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"subaddress_accounts": [
{
"account_index": 0,
"balance": 0,
"base_address": "RYoLseSV7WGdMFijLPXNffMWEFxq17ZbtENpB8hqH7d3FLQqkadt3tgi2Z9Afw135BeQGC87bKYxKc6feRTgDY883kqvAAVLEUb",
"label": "Primary account",
"tag": "myTag",
"unlocked_balance": 0
},
{
"account_index": 1,
"balance": 0,
"base_address": "RYoSrJv53kzGWQkU2ausiTEGDaRPTcQn4h6DVSnpvyWE8ta5rJF4cPCfx2TkpkD7JMWiGLjEz7QthR7NgqtLVYXkasLthmrbjRm",
"label": "Secondary account",
"tag": "myTag",
"unlocked_balance": 0
}
],
"total_balance": 0,
"total_unlocked_balance": 0
}
}
get_address
Return the wallet's addresses for an account. Optionally filter for specific set of subaddresses.
Input
- account_index unsigned int Required
Return subaddresses for this account.
- address_index array of unsigned int
List of subaddresses to return from an account.
Output
- address string
The 95-character hex address string of the ryo-wallet-rpc in session.
- addresses
- address string
- label string
- address_index unsigned int
- used boolean
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "get_address",
"params": {
"account_index": 0,
"address_index": [
0,
1,
4
]
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"address": "RYoLsfGWE6FfLjaV87ervPdbZRP4GZoUqWr7XbM5Ws61LibMVcrvYUJ5JAZW2xHXdjSQtnPDkc9CWZM3EJocHVSHCFwQZVSyxnY",
"addresses": [
{
"address": "RYoLsfGWE6FfLjaV87ervPdbZRP4GZoUqWr7XbM5Ws61LibMVcrvYUJ5JAZW2xHXdjSQtnPDkc9CWZM3EJocHVSHCFwQZVSyxnY",
"address_index": 0,
"label": "Primary account",
"used": true
},
{
"address": "RYoSrJEM9qfAZPQxRjcP22J28fmcCk55taG6k9c1SSmcY1uBsaUFzX26X1bUaN9kQMfuNjX7T3SzC1u9WAXPJH2cWjn9wvim1Qs",
"address_index": 1,
"label": "",
"used": false
},
{
"address": "RYoSrDP4GHe7ti7nFJBrQQDb6NpGZGWA57PjSa7A66P95auvCiwDp6fFL32iVSZvmc8K3dwr82P2SLmHr3iADhAtCCk5GHET2D1",
"address_index": 4,
"label": "",
"used": false
}
]
}
}
get_attribute
Get attribute value by name.
Input
- key string Required
attribute name
Output
- value string
attribute value
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "get_attribute",
"params": {
"key": "my_attribute"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"value": "my_value"
}
}
get_address_index
Get account and address indexes from a specific (sub)address
Input
- address string Required
(sub)address to look for.
Output
- index
subaddress informations
- major
- minor
get_balance
Return the wallet's balance.
Input
- account_index unsigned int Required
Return balance for this account.
- address_indices array of unsigned int
Return balance detail for those subaddresses.
Output
- balance unsigned int
The total balance of the current ryo-wallet-rpc in session.
- unlocked_balance unsigned int
Unlocked funds are those funds that are sufficiently deep enough in the Ryo blockchain to be considered safe to spend.
- multisig_import_needed boolean
True if importing multisig data is needed for returning a correct balance.
- per_subaddress
array of subaddress information; Balance information for each subaddress in an account.
- address_index unsigned int
Index of the subaddress in the account.
- address string
Address at this index. Base58 representation of the public keys.
- balance unsigned int
Balance for the subaddress (locked or unlocked).
- unlocked_balance unsigned int
Unlocked balance for the subaddress.
- label string
Label for the subaddress.
- num_unspent_outputs unsigned int
Number of unspent outputs available for the subaddress.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "get_balance",
"params": {
"account_index": 0,
"address_indices": [
0,
1
]
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"balance": 4242,
"multisig_import_needed": false,
"per_subaddress": [
{
"address": "RYoLsfGWE6FfLjaV87ervPdbZRP4GZoUqWr7XbM5Ws61LibMVcrvYUJ5JAZW2xHXdjSQtnPDkc9CWZM3EJocHVSHCFwQZVSyxnY",
"address_index": 0,
"balance": 4242,
"label": "Primary account",
"num_unspent_outputs": 2,
"unlocked_balance": 4242
}
],
"unlocked_balance": 4242
}
}
get_bulk_payments
Get a list of incoming payments using a given payment id, or a list of payments ids, from
a given height. This method is the preferred method over get_payments
because it has the same functionality but is more extendable. Either is fine for looking up
transactions by a single payment ID.
Input
- payment_ids array of string Required
Payment IDs used to find the payments (16 characters hex).
- min_block_height unsigned int Required
The block height at which to start looking for payments.
Output
- payments
list of:
- payment_id string
Payment ID matching one of the input IDs.
- tx_hash string
Transaction hash used as the transaction ID.
- amount unsigned int
Amount for this payment.
- block_height unsigned int
Height of the block that first confirmed this payment.
- unlock_time unsigned int
Time (in block height) until this payment is safe to spend.
- subaddr_index
subaddress index:
- major unsigned int
Account index for the subaddress.
- minor unsigned int
Index of the subaddress in the account.
- address string
Address receiving the payment
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "get_bulk_payments",
"params": {
"payment_ids": [
"d88d7c9ddacae9c1"
],
"min_block_height": "196000"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"payments": [
{
"address": "RYoLsfGWE6FfLjaV87ervPdbZRP4GZoUqWr7XbM5Ws61LibMVcrvYUJ5JAZW2xHXdjSQtnPDkc9CWZM3EJocHVSHCFwQZVSyxnY",
"amount": 500000000,
"block_height": 196431,
"payment_id": "d88d7c9ddacae9c1",
"subaddr_index": {
"major": 0,
"minor": 0
},
"tx_hash": "3bdce90152604154ac8936cb59d58e4afb262bb01a58c1aec2fc74f9183b2592",
"unlock_time": 0
}
]
}
}
get_height
Returns the wallet's current block height.
Output
- height unsigned int
The current ryo-wallet-rpc's blockchain height. If the wallet has been offline for a long time, it may need to catch up with the daemon.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "get_height"
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"height": 192713
}
}
get_languages
Get a list of available languages for your wallet's seed.
Output
- languages array of string
List of available languages
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "get_languages"
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"languages": [
"Deutsch",
"English",
"Español",
"Français",
"Italiano",
"Nederlands",
"Português",
"Русский",
"日本語",
"简体 中文 (中国)",
"Esperanto",
"Lojban"
]
}
}
get_payments
Get a list of incoming payments using a given payment id.
Input
- payment_id string Required
Payment ID used to find the payments (16 characters hex).
Output
- payments
list of:
- payment_id string
Payment ID matching the input parameter.
- tx_hash string
Transaction hash used as the transaction ID.
- amount unsigned int
Amount for this payment.
- block_height unsigned int
Height of the block that first confirmed this payment.
- unlock_time unsigned int
Time (in block height) until this payment is safe to spend.
- subaddr_index
subaddress index:
- major unsigned int
Account index for the subaddress.
- minor unsigned int
Index of the subaddress in the account.
- address string
Address receiving the payment
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "get_payments",
"params": {
"payment_id": "d88d7c9ddacae9c1"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"payments": [
{
"address": "RYoLsfGWE6FfLjaV87ervPdbZRP4GZoUqWr7XbM5Ws61LibMVcrvYUJ5JAZW2xHXdjSQtnPDkc9CWZM3EJocHVSHCFwQZVSyxnY",
"amount": 500000000,
"block_height": 196431,
"payment_id": "d88d7c9ddacae9c1",
"subaddr_index": {
"major": 0,
"minor": 0
},
"tx_hash": "3bdce90152604154ac8936cb59d58e4afb262bb01a58c1aec2fc74f9183b2592",
"unlock_time": 0
}
]
}
}
get_tx_key
Get transaction secret key from transaction id.
Input
- txid string Required
transaction id.
Output
- tx_key string
transaction secret key.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "get_tx_key",
"params": {
"txid": "7a1477549dceebc91832e3698cc2e8b80aa023426f1fb1f8e54393b4a86d8ead"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"tx_key": "0f4bb1619537f28126d9e174a0c8f628a5933efbb0c52044f74024178a432001"
}
}
get_version
Get RPC version Major & Minor integer-format, where Major is the first 16 bits and Minor the last 16 bits.
Output
- version unsigned int
RPC version, formatted with
Major * 2^16 + Minor
(Major encoded over the first 16 bits, and Minor over the last 16 bits).
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "create_wallet",
"params": {
"filename": "createTestWallet",
"password": "myTestPassword",
"language": "English"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
import_key_images
Import signed key images list and verify their spent status.
Input
- filename string Required
Wallet file name.
Output
- height unsigned int
- spent unsigned int
Amount (in atomic units) spent from those key images.
- unspent unsigned int
Amount (in atomic units) still available from those key images.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "import_key_images",
"params": {
"filename": "1"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"height": 192334,
"spent": 4242,
"unspent": 0
}
}
label_address
Label an address.
Input
- index Required
subaddress index; JSON Object containing the major & minor address index:
- major unsigned int Required
Account index for the subaddress.
- minor unsigned int Required
Index of the subaddress in the account.
- label string Required
Label for the address.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "label_address",
"params": {
"address_index": [
1
],
"label": "myLabel"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
label_account
Label an account.
Input
- account_index unsigned int Required
Apply label to account at this index.
- label string Required
Label for the account.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "label_account",
"params": {
"account_index": 0,
"label": "Primary account"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
make_uri
Create a payment URI using the official URI spec.
Input
- address string Required
Wallet address
- amount unsigned int
the integer amount to receive, in atomic units
- payment_id string
16 or 64 character hexadecimal payment id
- recipient_name string
name of the payment recipient
- tx_description string
Description of the reason for the tx
Output
- uri string
This contains all the payment input information as a properly formatted payment URI
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "make_uri",
"params": {
"address": "RYoLseSV7WGdMFijLPXNffMWEFxq17ZbtENpB8hqH7d3FLQqkadt3tgi2Z9Afw135BeQGC87bKYxKc6feRTgDY883kqvAAVLEUb",
"amount": 10,
"payment_id": "ef2ee78bd2316931",
"tx_description": "Test of make_uri method.",
"recipient_name": "TomCryptominer_donations"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"uri": "ryo:RYoLseSV7WGdMFijLPXNffMWEFxq17ZbtENpB8hqH7d3FLQqkadt3tgi2Z9Afw135BeQGC87bKYxKc6feRTgDY883kqvAAVLEUb?tx_payment_id=ef2ee78bd2316931&tx_amount=0.000000010&recipient_name=TomCryptominer_donations&tx_description=Test%20of%20make_uri%20method."
}
}
make_integrated_address
Make an integrated address from the wallet address and a payment id.
Input
- standard_address string
(Optional, defaults to primary address) Destination public address.
- payment_id string Required
16 characters hex encoded
Output
- integrated_address string
- payment_id string
hex encoded
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "make_integrated_address",
"params": {
"payment_id": "ef2ee78bd2316931"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"integrated_address": "RYoNsB8o5ckdMFijLPXNffMWEFxq17ZbtENpB8hqH7d3FLQqkadt3tgi2Z9Afw135BeQGC87bKYxKc6feRTgDY883kqvAFjL8x2cA8rrSop5Kq",
"payment_id": "ef2ee78bd2316931"
}
}
open_wallet
Open a wallet. You need to have set the argument "–wallet-dir" when launching ryo-wallet-rpc to make this work.
Input
- filename string Required
wallet name stored in –wallet-dir.
- password string
only needed if the wallet has a password defined.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "open_wallet",
"params": {
"filename": "myTestWallet",
"password": "myTestPassword"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
parse_uri
Parse a payment URI to get payment information.
Input
- uri string Required
This contains all the payment input information as a properly formatted payment URI
Output
- uri
JSON object containing payment information:
- address string
Wallet address
- amount unsigned int
Decimal amount to receive, in coin units (0 if not provided)
- payment_id string
16 or 64 character hexadecimal payment id (empty if not provided)
- recipient_name string
Name of the payment recipient (empty if not provided)
- tx_description string
Description of the reason for the tx (empty if not provided)
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "parse_uri",
"params": {
"uri": "ryo:RYoLseSV7WGdMFijLPXNffMWEFxq17ZbtENpB8hqH7d3FLQqkadt3tgi2Z9Afw135BeQGC87bKYxKc6feRTgDY883kqvAAVLEUb?tx_payment_id=ef2ee78bd2316931&tx_amount=0.000000010&recipient_name=TomCryptominer_donations&tx_description=Test%20of%20make_uri%20method."
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"uri": {
"address": "RYoLseSV7WGdMFijLPXNffMWEFxq17ZbtENpB8hqH7d3FLQqkadt3tgi2Z9Afw135BeQGC87bKYxKc6feRTgDY883kqvAAVLEUb",
"amount": 10,
"payment_id": "ef2ee78bd2316931",
"recipient_name": "TomCryptominer_donations",
"tx_description": "Test of make_uri method."
}
}
}
query_key
Return the spend or view private key.
Input
- key_type string Required
Which key to retrieve: "mnemonic" - the mnemonic seed (older wallets do not have one) OR "view_key" - the view key
Output
- key string
The view key will be hex encoded, while the mnemonic will be a string of words.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "query_key",
"params": {
"key_type": "mnemonic"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"key": "roles makeup lunar trying topic wives jabbed oncoming sidekick legion hurried gifts bugs dwarf"
}
}
refresh
Refresh a wallet after openning.
Input
- start_height unsigned int
The block height from which to start refreshing.
Output
- blocks_fetched unsigned int
Number of new blocks scanned.
- received_money boolean
States if transactions to the wallet have been found in the blocks.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "rescan_spent"
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
rescan_blockchain
Rescan the blockchain from scratch, losing any information which can not be recovered from
the blockchain itself.
This includes destination addresses, tx secret keys, tx notes, etc.
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "rescan_blockchain"
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "restore_wallet",
"params": {
"filename": "restored_from_seed",
"password": "x",
"seed": "arsenic sapling pedantic younger ruthless goodbye knuckle soil batch system orange greater threaten waffle laboratory birth optical exhale soothe orbit hoax fences jailed laptop younger",
"refresh_start_height": "167500"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "restore_wallet",
"params": {
"filename": "restore_view_wallet",
"password": "x",
"address": "RYoLsfmhLANNkFT5dUDDsvMM3Z1Fzd57zFvJnMHcghD5j1zFEyyKovcSHMKAQ9NZZ5HeWWmzDHCL3bmdXK9b43Z7hLkWF5vzzFF",
"viewkey": "a643693c5cfc9d9ef5dea3a56a221c4ba22350050b264a9b0fe06cac9b9bc803",
"refresh_start_height": "190500",
"seed": "arsenic sapling pedantic younger ruthless goodbye knuckle soil batch system orange greater threaten waffle laboratory birth optical exhale soothe orbit hoax fences jailed laptop younger"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
set_account_tag_description
Set description for an account tag.
Input
- tag string Required
Set a description for this tag.
- description string Required
Description for the tag.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "set_account_tag_description",
"params": {
"tag": "myTag",
"description": "Test tag"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
set_attribute
Set arbitrary attribute.
Input
- key string Required
attribute name
- value string Required
attribute value
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "set_attribute",
"params": {
"key": "my_attribute",
"value": "my_value"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "store"
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
split_integrated_address
Retrieve the standard address and payment id corresponding to an integrated address.
Input
- integrated_address string Required
Output
- is_subaddress boolean
States if the address is a subaddress
- payment string
hex encoded
- standard_address string
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "split_integrated_address",
"params": {
"integrated_address": "RYoNsB8o5ckdMFijLPXNffMWEFxq17ZbtENpB8hqH7d3FLQqkadt3tgi2Z9Afw135BeQGC87bKYxKc6feRTgDY883kqvAFjL8x2cA8rrSop5Kq"
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"is_subaddress": false,
"payment_id": "ef2ee78bd2316931",
"standard_address": "RYoLseSV7WGdMFijLPXNffMWEFxq17ZbtENpB8hqH7d3FLQqkadt3tgi2Z9Afw135BeQGC87bKYxKc6feRTgDY883kqvAAVLEUb"
}
}
curl -X POST http://127.0.0.1:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "stop_wallet"
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
tag_accounts
Apply a filtering tag to a list of accounts.
Input
- tag string Required
Tag for the accounts.
- accounts array of unsigned int Required
Tag this list of accounts.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "tag_accounts",
"params": {
"tag": "myTag",
"accounts": [
0,
1
]
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
untag_accounts
Remove filtering tag from a list of accounts.
Input
- accounts array of unsigned int Required
Remove tag from this list of accounts.
curl -X POST http://localhost:12215/json_rpc \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "0",
"method": "untag_accounts",
"params": {
"accounts": [
1
]
}
}'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}