FANDOM


This is only a draft for a new version of the protocol. Please do NOT rely on it!



NOTES:

  • Every call should be invoked using HTTP POST messages
  • RPC services must enforce using the HTTPS protocol in order to keep the communication safe


Default URL: localhost:18082/rpc/


Method Description
query_initialization_status Returns the initialization status of the wallet.

This method should be called straight after startup, and should only be executed once.

Input: N/A

Output: N/A (Standard JSON output)

Errors:

Code Message
10 Invalid passphrase.
11 Could not find the '.keys' file of the wallet.
query_address Returns the address of the wallet which is open.

Input: N/A

Output:

{
    "address": <String>
}
query_key Returns the requested key of the wallet which is open.

Input:

{
    "key_type": <EnumWalletKeyType>
}

EnumWalletKeyType:

<String: ["view_key", "spend_key", "mnemonic"]>

Output:

{
    "key": <String>
}
query_balance Returns the balance of the wallet which is open.

Input: N/A

Output:

{
    "spendable":   <UInt64>
    "unconfirmed": <UInt64>
}
query_transactions Returns a list of transactions from the opened wallet.

Input:

{
    "tx_type": [Optional ("all")] <EnumTransactionType>
}

EnumTransactionType:

<String: ["all", "receive", "send"]>

Output:

{
    "payments": List<TypeTransaction>
}

TypeTransaction:

{
    "tx_hash":      <String>
    "payment_id":   <String>
    "amount":       <UInt64>
    "timestamp":    <UInt64>
    "unlock_time":  <UInt64>
    "block_height": <UInt64>
}
query_payments Returns a list of transfers received under the specified payment ID.

Input:

{
    "payment_id": <String>
}

Output:

{
    "payments": List<TypeTransaction>
}

TypeTransaction:

{
    "tx_hash":      <String>
    "payment_id":   <String>
    "amount":       <UInt64>
    "timestamp":    <UInt64>
    "unlock_time":  <UInt64>
    "block_height": <UInt64>
}
query_payments_bulk Returns a list of transfers received under one of the specified payment IDs.

Input:

{
    "payment_ids":      <List<String>>
    "min_block_height": [Optional] <UInt64>
}

Output:

{
    "payments": List<TypeTransaction>
}

TypeTransaction:

{
    "tx_hash":      <String>
    "payment_id":   <String>
    "amount":       <UInt64>
    "timestamp":    <UInt64>
    "unlock_time":  <UInt64>
    "block_height": <UInt64>
}
request_wallet_lock Locks the opened private keys in the RAM, keeping only the viewkey decrypted.

Input: N/A

Output: N/A (Standard JSON output)

Errors:

Code Message
10 The wallet has already been locked.
request_wallet_unlock Unlocks the previously locked private keys in the RAM, keeping all the keys decrypted.

Input:

{
    "wallet_password": String
}

Output: N/A (Standard JSON output)

Errors:

Code Message
10 The wallet is already unlocked.
send_transfer_regular Sends a transaction to the specified recipient(s).

Input: TypeTransfer

{
    "recipients":  <List<TypeTransferRecipient>>
    "payment_id":  [Optional] <String>
    "fee":         [Optional (5000000000)] <UInt64>
    "mix_count":   [Optional] <UInt64>
    "unlock_time": [Optional] <UInt64>
}

TypeTransferRecipient:

{
    "address": <String>
    "amount":  <UInt64>
}

Output:

{
    "tx_hash": <String>
}

Errors:

Code Message
10 Insufficient funds.
11 Invalid address (Index: <n>).
12 The payment ID must consist of 64 characters or should be left empty.
13 The transaction fee cannot be less than 5000000000.
send_transfer_split Sends a transaction to the specified recipient(s), splitting larger TXes.

Input: TypeTransfer

{
    "recipients":  <List<TypeTransferRecipient>>
    "payment_id":  [Optional] <String>
    "fee":         [Optional (5000000000)] <UInt64>
    "mix_count":   [Optional] <UInt64>
    "unlock_time": [Optional] <UInt64>
}

TypeTransferRecipient:

{
    "address": <String>
    "amount":  <UInt64>
}

Output:

{
    "tx_hashes": <List<String>>
}

Errors:

Code Message
10 Insufficient funds.
11 Invalid address (Index: <n>).
12 The payment ID must consist of 64 characters or should be left empty.
13 The transaction fee cannot be less than 5000000000.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.