Connect to Dogecoin server via JSON-RPC.
Bases: builtins.object
A DogecoinConnection object defines a connection to a dogecoin server. It is a thin wrapper around a JSON-RPC API connection.
Arguments to constructor:
Safely copies wallet.dat to destination, which can be a directory or a path with filename.
Arguments: - destination – directory or path with filename to backup wallet to.
Creates a raw transaction spending given inputs (a list of dictionaries, each containing a transaction id and an output number), sending to given address(es).
Returns hex-encoded raw transaction.
Example usage: >>> conn.createrawtransaction(
- [{“txid”: “a9d4599e15b53f3eb531608ddb31f48c695c3d0b3538a6bda871e8b34f2f430c”,
- “vout”: 0}],
{“mkZBYBiq6DNoQEKakpMJegyDbw2YiNQnHT”:50})
Arguments:
inputs – A list of {“txid”: txid, “vout”: n} dictionaries.
they are to be paid.
Produces a human-readable JSON object for a raw transaction.
Arguments:
Returns the private key belonging to <address>.
Arguments:
Returns the account associated with the given address.
Arguments:
Returns the current dogecoin address for receiving payments to an account.
Arguments:
Returns the list of addresses for the given account.
Arguments:
Get the current balance, either for an account or the total server balance.
Arguments: - account – If this parameter is specified, returns the balance in the account. - minconf – Minimum number of confirmations required for transferred balance.
Returns information about the given block hash.
Returns the number of blocks in the longest block chain.
Returns hash of block in best-block-chain at index.
Parameters: | index – index ob the block |
---|
Returns the block number of the latest block in the longest block chain. Deprecated. Use getblockcount instead.
Returns the number of connections to other nodes.
Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
Returns True or False, depending on whether generation is enabled.
Returns a recent hashes per second performance measurement while generating.
Returns an ServerInfo object containing various state info.
Returns an MiningInfo object containing various mining state info.
Returns a new dogecoin address for receiving payments.
Arguments:
Get transaction raw info
Arguments:
Returns the total amount received by addresses with an account in transactions with at least a certain number of confirmations.
Arguments:
Returns the total amount received by a dogecoin address in transactions with at least a certain number of confirmations.
Arguments:
Get detailed information about transaction
Arguments:
Returns details about an unspent transaction output (UTXO)
Arguments:
Get work for remote mining, or submit result. If data is specified, the server tries to solve the block using the provided data and returns True if it was successful. If not, the function returns formatted hash data (WorkItem) to work on.
Arguments:
import private key <privkey> to account [acct], optionally rescanning blockchain .
Arguments:
Fills the keypool, requires wallet passphrase to be set.
Returns a list of account names.
Arguments:
Returns a list of accounts.
Each account is represented with a AccountInfo object.
Arguments:
Returns a list of addresses.
Each address is represented with a AddressInfo object.
Arguments:
Returns a list of the last transactions for an account.
Each transaction is represented with a TransactionInfo object.
Arguments:
all accounts if None.
count – Number of transactions to return.
from_ – Skip the first <from_> transactions.
address – Receive address to consider
Returns a list of unspent transaction inputs in the wallet.
Arguments:
Move from one account in your wallet to another.
Arguments:
Sends amount from account’s balance to dogecoinaddress. This method will fail if there is less than amount dogecoins with minconf confirmations in the account’s balance (unless account is the empty-string-named default account; it behaves like the sendtoaddress method). Returns transaction ID on success.
Arguments:
Sends specified amounts from account’s balance to dogecoinaddresses. This method will fail if there is less than total amount dogecoins with minconf confirmations in the account’s balance (unless account is the empty-string-named default account; Returns transaction ID on success.
Arguments:
Sends amount from the server’s available balance to dogecoinaddress.
Arguments:
Sets the account associated with the given address.
Arguments:
Enable or disable generation (mining) of coins.
Arguments:
Sign messages, returns the signature
Parameters: |
|
---|---|
Return type: | unicode |
Sign inputs for raw transaction (serialized, hex-encoded).
Arguments:
hexstring – A hex string of the transaction to sign.
{“txid”: txid, “vout”: n, “scriptPubKey”: hex, “redeemScript”: hex}, representing previous transaction outputs that this transaction depends on but may not yet be in the block chain.
keys that, if given, will be the only keys used to sign the transaction.
Stop dogecoin server.
Validate a dogecoin address and return information for it.
The information is represented by a AddressValidation object.
Arguments: – Address to validate.
Verify a signed message
Parameters: |
|
---|---|
Return type: | bool |
Removes the wallet encryption key from memory, locking the wallet. After calling this method, you will need to call walletpassphrase again before being able to call any methods which require the wallet to be unlocked.
Stores the wallet decryption key in memory for <timeout> seconds.
passphrase – The wallet passphrase.
(by keeping the passphrase in memory).
return False.
Changes the wallet passphrase from <oldpassphrase> to <newpassphrase>.
Arguments:
return False.