Repository navigation
ARMR JSON RPC API Calls
addmultisigaddress
$ ./ARMRd addmultisigaddress <nrequired> <'["key","key"]'> [account]
Add a nrequired-to-sign multisignature address to the wallet. Each key is a ARMR address or hex-encoded public key. If [account] is specified, assign address to [account].
backupwallet
$ ./ARMRd backupwallet <destination>
Copies wallet.dat to destination, which can be a directory or a path with filename.
checkwallet
$ ./ARMRd checkwallet
Checks that the "spent" state of the transactions stored in the wallet matches the state on the current best blockchain.
dumpprivkey
$ ./ARMRd dumpprivkey <ARMRaddress>
Reveals the private key corresponding to ARMRaddress
encryptwallet
$ ./ARMRd encryptwallet <passphrase>
Encrypts the wallet with passphrase
getaccount
$ ./ARMRd getaccount <ARMRaddress>
Returns the account associated with the given ARMR address.
getaccountaddress
$ ./ARMRd getaccountaddress <account>
Returns the current ARMR address for receiving payments to this account.
getaddressesbyaccount
$ ./ARMRd getaddressesbyaccount <account>
Returns the list of addresses for the given account.
getbalance
$ ./ARMRd getbalance <account> [minconf=1]
If [account] is not specified, returns the server's total available balance. If [account] is specified, returns the balance in the account.
getblock
$ ./ARMRd getblock <hash> [txinfo]
Returns information about the block with the given hash.
getblockcount
$ ./ARMRd getblockcount
Returns the number of blocks in the longest block chain.
getblockhash
$ ./ARMRd getblockhash <index>
Returns hash of block in best-block-chain at index. Index 0 is the genesis block.
getblocktemplate
$ ./ARMRd getblocktemplate [params]
Returns data needed to construct a block to work on. See BIP_0022 for more info on params.
getcheckpoint
$ ./ARMRd getcheckpoint
getconnectioncount
$ ./ARMRd getconnectioncount
Returns the number of connections to other nodes.
getdifficulty
$ ./ARMRd getdifficulty
Returns the difficulty as a multiple of the minimum difficulty.
getgenerate
$ ./ARMRd getgenerate
Returns true or false whether ARMRd is currently generating hashes.
getinfo
$ ./ARMRd getinfo
Returns an object containing various state info, including:
version
protocolversion
walletversion
balance
new mint
stake
blocks
moneysupply
connections
proxy
ip
difficulty
testnet
keypoololdest
keypoolsize
paytxfee
errors
Example output:
{
"version" : "v1.0.3",
"protocolversion" : 60003,
"walletversion" : 60000,
"balance" : 0.00000000,
"newmint" : 122500.00000000,
"stake" : 0.00000000,
"blocks" : 92,
"moneysupply" : 40000000.00000000,
"connections" : 112,
"proxy" : "",
"ip" : "ekhraxvdnhu7yddz.onion",
"difficulty" : 0.00392163,
"testnet" : false,
"keypoololdest" : 1395443142,
"keypoolsize" : 101,
"paytxfee" : 0.01000000,
"errors" : ""
}
getstakinginfo
$ ./ARMRd getstakinginfo
Returns an object containing staking-related information:
Example:
{
"enabled" : true,
"staking" : true,
"errors" : "",
"currentblocksize" : 1000,
"currentblocktx" : 0,
"pooledtx" : 0,
"difficulty" : 0.76693973,
"search-interval" : 1,
"weight" : 644302,
"netstakeweight" : 55359194,
"expectedtime" : 5155
}
getnewaddress
$ ./ARMRd getnewaddress [account]
Returns a new ARMR address for receiving payments. If [account] is specified, payments received with the address will be credited to [account].
getnewstealthaddress
$ ./ARMRd getnewstealthaddress <account>
Returns a new ARMR stealth-address for receiving payments. If [account] is specified, payments received with the address will be credited to [account].
Example:
$ ./ARMRd getnewstealthaddress ''
smYhJdWUnzoFbCPyNbpWKzVGNUoLuTyd59BYRBX8H86ifHuhdGq5QmWnEWMJD6SmikdAxZC7xxGKKf18u3V9atjBTkEbARxpEq56Cn
getpeerinfo
$ ./ARMRd getpeerinfo
Returns data about each connected node.
getreceivedbyaccount
$ ./ARMRd getreceivedbyaccount <account> [minconf=1]
Returns the total amount received by addresses with [account] in transactions with at least [minconf] confirmations. If [account] not provided return will include all transactions to all accounts.
getreceivedbyaddress
$ ./ARMRd getreceivedbyaddress <ARMRaddress> [minconf=1]
Returns the amount received by in transactions with at least [minconf] confirmations. It correctly handles the case where someone has sent to the address in multiple transactions. Keep in mind that addresses are only ever used for receiving transactions. Works only for addresses in the local wallet, external addresses will always show 0.
gettransaction
$ ./ARMRd gettransaction <txid>
Returns an object about the given transaction containing: Example:
{
"amount" : -20000.00000000,
"fee" : -0.02000000,
"confirmations" : 8,
"blockhash" : "00000000e506883d90c5f3c8057ab873026b6bb75d01cf5c534f9fb15091c78f",
"blockindex" : 1,
"txid" : "9b97002a6f74dffa00ef2973a600c5c171bff78c7b118dc4879e5dc69fb675c0",
"time" : 1395444580,
"details" : [
{
"account" : "",
"address" : "AJWkz3pwNYDBQppzyx1qMVKphRYQyhcXnK",
"category" : "send",
"amount" : -20000.00000000,
"fee" : -0.02000000
}
]
}
help
$ ./ARMRd help [command]
List commands, or get help for a command.
importprivkey
$ ./ARMRd importprivkey <ARMRprivkey> [label]
Adds a private key (as returned by dumpprivkey) to your wallet. This may take a while, as a rescan is done, looking for existing transactions.
keypoolrefill
$ ./ARMRd keypoolrefill
Fills the keypool, requires wallet passphrase to be set.
listaccounts
$ ./ARMRd listaccounts [minconf=1]
Returns Object that has account names as keys, account balances as values.
listreceivedbyaccount
$ ./ARMRd listreceivedbyaccount [minconf=1] [includeempty=false]
Returns an array of objects containing:
"account" : the account of the receiving addresses
"amount" : total amount received by addresses with this account
"confirmations" : number of confirmations of the most recent transaction included
listreceivedbyaddress
$ ./ARMRd listreceivedbyaddress [minconf=1] [includeempty=false]
Returns an array of objects containing:
"address" : receiving address
"account" : the account of the receiving address
"amount" : total amount received by the address
"confirmations" : number of confirmations of the most recent transaction included
To get a list of accounts on the system, execute ARMRd listreceivedbyaddress 0 true
listsinceblock
$ ./ARMRd listsinceblock [blockhash] [target-confirmations]
Get all transactions in blocks since block [blockhash], or all transactions if omitted.
listtransactions
$ ./ARMRd listtransactions [account] [count=10] [from=0]
Returns up to [count] most recent transactions skipping the first [from] transactions for account [account]. If [account] not provided it'll return recent transactions from all accounts.
Example output:
{
"account" : "",
"category" : "immature",
"amount" : 312.50000000,
"confirmations" : 9,
"blockhash" : "ff7e17b98819b5a24548e697a85ee0be03074532cb05e184f4865c4ced1565ff",
"blockindex" : 1,
"txid" : "13070cf5b090fa5fc87fc95468276f3b6a66f1d0c75a0d48869280a78a934d0f",
"time" : 1395950332
}
To save a list of the first 500 transactions to a text file, use:
$ ./ARMRd listtransactions "" 500 0 > transactions.txt
makekeypair
$ ./ARMRd makekeypair [prefix]
move
$ ./ARMRd move <fromaccount> <toaccount> <amount> [minconf=1] [comment]
Move from one account in your wallet to another
repairwallet
$ ./ARMRd repairwallet
Checks wallet against the transaction index, fixes spent states if necessary, and removes orphans.
reservebalance
$ ./ARMRd reservebalance [<reserve> [amount]]
sendalert
$ ./ARMRd sendalert <message> <privatekey> <minver> <maxver> <priority> <id> [cancelupto]
sendfrom
$ ./ARMRd sendfrom <fromaccount> <toARMRaddress> <amount> [minconf=1] [comment] [comment-to]
is a real and is rounded to 4 decimal places. Will send the given amount to the given address, ensuring the account has a valid balance using [minconf] confirmations. Returns the transaction ID if successful.
sendmany
$ ./ARMRd sendmany <fromaccount> {address:amount,...} [minconf=1] [comment]
sendtoaddress
$ ./ARMRd sendtoaddress <ARMRaddress> <amount> [comment] [comment-to]
is a real and is rounded to 4 decimal places. Returns the transaction ID if successful.
setaccount
$ ./ARMRd setaccount <ARMRaddress> <account>
Sets the account associated with the given address. Assigning address that is already assigned to the same account will create a new address associated with that account.
setgenerate
$ ./ARMRd setgenerate <generate> [genproclimit]
is true or false to turn generation on or off. Generation is limited to [genproclimit] processors, -1 is unlimited.
settxfee
$ ./ARMRd settxfee <amount>
signmessage
$ ./ARMRd signmessage <ARMRaddress> <message>
Sign a message with the private key of an address.
stop
$ ./ARMRd stop
Stops the ARMR server.
submitblock
$ ./ARMRd submitblock <hex data> [optional-params-obj]
Attempts to submit a new block to the network.
validateaddress
$ ./ARMRd validateaddress <ARMRaddress>
Returns information about ARMRaddress:
$ ./ARMRd validateaddress AVmcs9otfz9KsANrsaSx8tkN8QoYhgjd5h
{
"isvalid" : true,
"address" : "AJWkz3pwNYDBQppzyx1qMVKphRYQyhcXnK",
"ismine" : true,
"pubkey" : "02646ad3498d8d024cf1e103c0a3d04b7bf34db7da30d2c6d84dc377322f3f6803",
"iscompressed" : true,
"account" : ""
}
verifymessage
$ ./ARMRd verifymessage <ARMRaddress> <signature> <message>
Verify a signed message.