1

I know with bitcoind, you can easily start the daemon and call some commands.

But with armoryd, I start it up with a wallet argument.

What are some examples of using the JSON-RPC to call a method for it?

For example, with bitcoind I can type in my shell:

bitcoind listaccounts

Is there a easy way to get my armoryd daemon to do the same?

1 Answer 1

2

In your install directory, you should have armoryd.py. Once you run

python armoryd.py 

then you have a daemon. Now you can run

python armoryd.py help

to get a list of commands like this (which can then be run with python armoryd.py <command>):

{
"backupwallet": {
    "Description": "Back up the current wallet to a file at a given location. The backup will occur only if the file does not exist yet.",
    "Parameters": [
        "backupFilePath - Path to the location where the backup will be saved."
    ],
    "Return Value": "A dictionary indicating whether or not the backup succeeded or failed, with the reason for failure given if applicable."
},
"clearaddressmetadata": {
    "Description": "Clear all armoryd-specific metadata for the currently loaded wallet.",
    "Parameters": [
        "None"
    ],
    "Return Value": "None"
},
"createlockbox": {
    "Description": "Create an m-of-n lockbox associated with wallets loaded onto the armoryd server.",
    "Parameters": [
        "numM - The number of signatures required to spend lockbox funds.",
        "numN - The total number of signatures associated with a lockbox.",
        "args - The wallets or public keys associated with a lockbox, the total of which must match <numN> in number. The wallets are represented by their Base58 IDs. The keys must be uncompressed."
    ],
    "Return Value": "A dictionary with information about the new lockbox."
},
"createustxformany": {
    "Description": "Create an unsigned transaction to be sent to multiple recipients from the currently loaded wallet.",
    "Parameters": [
        "args - An indefinite number of comma-separated sets of recipients and the number of Bitcoins to send to the recipients. The recipients can be an address, a P2SH script address, a lockbox (e.g., \"Lockbox[83jcAqz9]\" or \"Lockbox[Bare:83jcAqz9]\"), or a public key (compressed or uncompressed) string."
    ],
    "Return Value": "An ASCII-formatted unsigned transaction, similar to the one output by Armory for offline signing."
},
"createustxtoaddress": {
    "Description": "Create an unsigned transaction to be sent to one recipient from the currently loaded wallet.",
    "Parameters": [
        "recAddr - The recipient. This can be an address, a P2SH script address, a lockbox (e.g., \"Lockbox[83jcAqz9]\" or \"Lockbox[Bare:83jcAqz9]\"), or a public key (compressed or uncompressed) string.",
        "amount - The number of Bitcoins to send to the recipient."
    ],
    "Return Value": "An ASCII-formatted unsigned transaction, similar to the one output by Armory for offline signing."
},
"decoderawtransaction": {
    "Description": "Decode a raw transaction hex string.",
    "Parameters": [
        "hexString - A string representing, in hex form, a raw transaction."
    ],
    "Return Value": "A dictionary containing the decoded transaction's information."
},
"dumpprivkey": {
    "Description": "Dump the private key for a given Base58 address associated with the currently loaded wallet.",
    "Parameters": [
        "addr58 - A Base58 public address associated with the current wallet."
    ],
    "Return Value": "The 32 byte binary private key."
},
"encryptwallet": {
    "Description": "Encrypt a wallet with a given passphrase.",
    "Parameters": [
        "passphrase - The wallet's new passphrase."
    ],
    "Return Value": "A string indicating that the encryption was successful."
},
"getactivelockbox": {
    "Description": "Get the lockbox ID of the currently active lockbox.",
    "Parameters": [
        "None"
    ],
    "Return Value": "The Base58 ID for the currently active lockbox."
},
"getactivewallet": {
    "Description": "Get the wallet ID of the currently active wallet.",
    "Parameters": [
        "None"
    ],
    "Return Value": "The Base58 ID for the currently active wallet."
},
"getaddrbalance": {
    "Description": "Get the balance of a Base58 address associated with the currently loaded wallet.",
    "Parameters": [
        "inB58 - The Base58 address associated with the current wallet.",
        "baltype - (Default=spendable) A string indicating the balance type to retrieve from the current wallet."
    ],
    "Return Value": "The current wallet balance (BTC), or -1 if an error occurred."
},
"getaddressmetadata": {
    "Description": "Get all armoryd-specific metadata for the currently loaded wallet.",
    "Parameters": [
        "None"
    ],
    "Return Value": "A dictionary with all metadata sent to armoryd."
},
"getarmorydinfo": {
    "Description": "Get information on the version of armoryd running on the server.",
    "Parameters": [
        "None"
    ],
    "Return Value": "A dictionary listing version of armoryd running on the server."
},
"getbalance": {
    "Description": "Get the balance of the currently loaded wallet.",
    "Parameters": [
        "baltype - (Default=spendable) A string indicating the balance type to retrieve from the current wallet."
    ],
    "Return Value": "The current wallet balance (BTC), or -1 if an error occurred."
},
"getblock": {
    "Description": "Get the block associated with a given block hash.",
    "Parameters": [
        "blkhash - A hex string representing the block to obtain."
    ],
    "Return Value": "A dictionary listing information on the desired block, or empty if the block wasn't found."
},
"gethextxtobroadcast": {
    "Description": "Get a signed Tx from a file and get the raw hex data to broadcast.",
    "Parameters": [
        "txASCIIFile - The path to a file with an signed transacion."
    ],
    "Return Value": "A hex string of the raw transaction data to be transmitted."
},
"getledger": {
    "Error": "The function description is malformed."
},
"getledgersimple": {
    "Description": "Get a simple version of a wallet or lockbox ledger.",
    "Parameters": [
        "inB58ID - The Base58 ID of the wallet or lockbox from which to obtain the ledger. The wallet or lockbox must already be loaded.",
        "tx_count - (Default=10) The number of entries to get.",
        "from_tx - (Default=0) The first entry to get."
    ],
    "Return Value": "A dictionary with a wallet ledger of type \"simple\"."
},
"getlockboxinfo": {
    "Description": "Get information on the lockbox associated with a lockbox ID string or, if it exists, the currently active armoryd lockbox.",
    "Parameters": [
        "inLBID - (Default=None) If used, armoryd will get information on the lockbox with the provided Base58 ID instead of the currently active armoryd lockbox.",
        "outForm - (Default=JSON) If used, armoryd will return the lockbox in a particular format. Choices are \"JSON\", \"Hex\", and \"Base64\"."
    ],
    "Return Value": "If the lockbox is found, a dictionary with information on the lockbox will be returned."
},
"getnewaddress": {
    "Description": "Get a new Base58 address from the currently loaded wallet.",
    "Parameters": [
        "None"
    ],
    "Return Value": "The wallet's next unused public address in Base58 form."
},
"getrawtransaction": {
    "Description": "Get the raw transaction string for a given transaction hash.",
    "Parameters": [
        "txHash - A string representing the hex value of a transaction ID.",
        "verbose - (Default=0) Integer indicating whether or not the result should be more verbose.",
        "endianness - (Default=BIGENDIAN) Indicates the endianness of the ID."
    ],
    "Return Value": "A dictionary with the decoded raw transaction and relevant information."
},
"getreceivedbyaddress": {
    "Description": "Get the number of coins received by a Base58 address associated with the currently loaded wallet.",
    "Parameters": [
        "address - The Base58 address associated with the current wallet."
    ],
    "Return Value": "The balance received from the incoming address (BTC)."
},
"gettransaction": {
    "Description": "Get the transaction associated with a given transaction hash.",
    "Parameters": [
        "txHash - A hex string representing the block to obtain."
    ],
    "Return Value": "A dictionary listing information on the desired transaction, or empty if the transaction wasn't found."
},
"gettxout": {
    "Description": "Get the TxOut entries for a given transaction hash.",
    "Parameters": [
        "txHash - A string representing the hex value of a transaction ID.",
        "n - The TxOut index to obtain.",
        "binary - (Default=0) Indicates whether or not the resultant binary script should be in binary form or converted to a hex string."
    ],
    "Return Value": "A dictionary with the Bitcoin amount for the TxOut and the TxOut script in hex string form (default) or binary form."
},
"getwalletinfo": {
    "Description": "Get information on the currently loaded wallet.",
    "Parameters": [
        "inWltID - (Default=None) If used, armoryd will get info for the wallet for the provided Base58 wallet ID instead of the current wallet."
    ],
    "Return Value": "A dictionary with information on the current wallet."
},
"help": {
    "Description": "Get a directionary with all functions the armoryd server can run.",
    "Parameters": [
        "None"
    ],
    "Return Value": "A dictionary with all functions available on the armoryd server, along with the function parameters and function return value."
},
"importprivkey": {
    "Description": "Import a private key into the current wallet.",
    "Parameters": [
        "privKey - A private key in any format supported by Armory, including Base58 private keys supported by bitcoind (uncompressed public key support only)."
    ],
    "Return Value": "A string of the private key's accompanying hexadecimal public key."
},
"listaddrunspent": {
    "Description": "Get a list of unspent transactions for the currently loaded wallet that are associated with a given, comma-separated list of Base58 addresses from the wallet. By default, zero-conf UTXOs are included.",
    "Parameters": [
        "inB58 - The Base58 address to check against the current wallet."
    ],
    "Return Value": "A dictionary containing all UTXOs for the currently loaded wallet associated with the given Base58 address, along with information about each UTXO."
},
"listloadedlockboxes": {
    "Description": "List all lockboxes loaded onto the armoryd server.",
    "Parameters": [
        "None"
    ],
    "Return Value": "A dictionary with the Base58 values of all lockboxes loaded in armoryd."
},
"listloadedwallets": {
    "Description": "List all wallets loaded onto the armoryd server.",
    "Parameters": [
        "None"
    ],
    "Return Value": "A dictionary with the Base58 values of all wallets loaded in armoryd."
},
"listtransactions": {
    "Description": "List the transactions associated with the currently loaded wallet.",
    "Parameters": [
        "tx_count - (Default=10) The number of entries to get.",
        "from_tx - (Default=0) The first entry to get."
    ],
    "Return Value": "A dictionary with information on the retrieved transactions."
},
"listunspent": {
    "Description": "Get a list of unspent transactions for the currently loaded wallet. By default, zero-conf UTXOs are included.",
    "Parameters": [
        "None"
    ],
    "Return Value": "A dictionary listing information about each UTXO in the currently loaded wallet. The dictionary is similar to the one returned by the bitcoind call of the same name."
},
"receivedfromaddress": {
    "Description": "Return the number of coins received from a particular sender.",
    "Parameters": [
        "sender - Base58 address of the sender to the current wallet."
    ],
    "Return Value": "Number of Bitcoins sent by the sender to the current wallet."
},
"receivedfromsigner": {
    "Description": "Verify that a message (RFC 2440: clearsign or Base64) has been signed by a Bitcoin address and get the amount of coins sent to the current wallet by the message's signer.",
    "Parameters": [
        "sigBlock - Message with the RFC 2440 message to be verified. The message must be enclosed in quotation marks."
    ],
    "Return Value": "A dictionary with verified message and the amount of money sent to the current wallet by the signer."
},
"relockwallet": {
    "Description": "Re-lock a wallet.",
    "Parameters": [
        "None"
    ],
    "Return Value": "A string indicating whether or not the wallet is locked."
},
"sendlockbox": {
    "Description": "E-mail ASCII-encoded lockboxes to recipients.",
    "Parameters": [
        "lbIDs - A colon-delineated list of Base58 IDs of lockboxes to send to an email recipient.",
        "sender - The email address of the sender.",
        "server - The SMTP email server.",
        "pwd - The email account password.",
        "recips - The recipient or, if the string is delineated by a colon, a list of recipients.",
        "msgSubj - (Default=Armory Lockbox) The email subject."
    ],
    "Return Value": "A string indicating whether or not the attempt to send was successful."
},
"setactivelockbox": {
    "Description": "Set the currently active lockbox to one already loaded on the armoryd server.",
    "Parameters": [
        "newIDB58 - The Base58 ID of the lockbox to be made active."
    ],
    "Return Value": "A string indicating whether or not the lockbox was set as desired."
},
"setactivewallet": {
    "Description": "Set the currently active wallet to one already loaded on the armoryd server.",
    "Parameters": [
        "newIDB58 - The Base58 ID of the wallet to be made active."
    ],
    "Return Value": "A string indicating whether or not the wallet was set as desired."
},
"setaddressmetadata": {
    "Description": "Set armoryd-specific metadata associated with Base58 addresses.",
    "Parameters": [
        "newAddressMetaData - A dictionary containing arbitrary metadata to attach to Base58 addresses listed with the metadata."
    ],
    "Return Value": "None"
},
"signasciitransaction": {
    "Description": "Sign an unsigned transaction and get the signed ASCII data.",
    "Parameters": [
        "unsignedTxASCII - An ASCII-formatted unsigned transaction, like the one used by Armory for offline transactions.",
        "wltPasswd - (Default=None) If needed, the current wallet's password."
    ],
    "Return Value": "A dictionary containing a string with the ASCII-formatted signed transaction or, if the signing failed, a string indicating failure."
},
"unlockwallet": {
    "Description": "Unlock a wallet with a given passphrase and unlock time length.",
    "Parameters": [
        "passphrase - The wallet's current passphrase.",
        "timeout - (Default=10) The time, in seconds, that the wallet will be unlocked."
    ],
    "Return Value": "A string indicating if the wallet was unlocked or if it was already unlocked."
},
"verifysignature": {
    "Description": "Take a message (RFC 2440: clearsign or Base64) signed by a Bitcoin address and verify the message.",
    "Parameters": [
        "sigBlock - Message with the RFC 2440 message to be verified. The message must be enclosed in quotation marks."
    ],
    "Return Value": "A dictionary with verified message and the Base58 address of the signer."
},
"watchwallet": {
    "Description": "Send an e-mail notification when the current wallet spends money.",
    "Parameters": [
        "send_from - The email address of the sender.",
        "smtpServer - (Default=None) The SMTP email server.",
        "password - (Default=None) The email account password.",
        "send_to - (Default=None) The recipient or, if the string is delineated by a colon, a list of recipients.",
        "subject - (Default=None) The email subject.",
        "watchCmd - (Default=add) A string indicating if emails from the sender should be sent or, if set to \"remove\", emails from the sender that are currently being sent should be stopped."
    ],
    "Return Value": "None"
}
}

Source: armoryd.README in the install folder

1
  • Good answer! It looks like the closest analogue to what the asker is looking for is listloadedwallets.
    – Nick ODell
    Commented Jan 11, 2015 at 4:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.