Class: StartcoinClient::Client
- Inherits:
-
Object
- Object
- StartcoinClient::Client
- Defined in:
- lib/startcoin_client/client.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Returns the value of attribute api.
Instance Method Summary collapse
-
#backupwallet(destination) ⇒ Object
Safely copies wallet.dat to destination, which can be a directory or a path with filename.
-
#createmultisig(nrequired, keys) ⇒ Object
Creates a multi-signature address and returns a json object.
-
#createrawtransaction(transactionid = nil, address_amount) ⇒ Object
nCreate a transaction spending given inputs (array of objects containing transaction id and output number), sending to given address(es).
-
#decoderawtransaction(hexstring) ⇒ Object
Return a JSON object representing the serialized, hex-encoded transaction.
-
#getaccount(bitcoinaddress) ⇒ Object
(also: #account)
Returns the account associated with the given address.
-
#getaccountaddress(account) ⇒ Object
(also: #account_address)
Returns the current bitcoin address for receiving payments to this account.
-
#getaddressesbyaccount(account) ⇒ Object
(also: #addresses_by_account)
Returns the list of addresses for the given account.
-
#getbalance(account = nil, minconf = 1) ⇒ Object
(also: #balance)
If
account
is not specified, returns the server’s total available balance. - #getbestblockhash ⇒ Object (also: #bestblockhash)
-
#getblock(hash) ⇒ Object
Dumps the block existing with specified hash.
-
#getblockbycount(height) ⇒ Object
(also: #block_by_count)
Dumps the block existing at specified height.
-
#getblockcount ⇒ Object
(also: #block_count)
Returns the number of blocks in the longest block chain.
-
#getblockhash(index) ⇒ Object
(also: #block_hash)
Returns hash of block in best-block-chain at <index>; index 0 is the genesis block.
-
#getblocknumber ⇒ Object
(also: #block_number)
Returns the block number of the latest block in the longest block chain.
-
#getconnectioncount ⇒ Object
(also: #connection_count)
Returns the number of connections to other nodes.
-
#getdifficulty ⇒ Object
(also: #difficulty)
Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
-
#getgenerate ⇒ Object
(also: #generate?)
Returns true or false whether bitcoind is currently generating hashes.
-
#gethashespersec ⇒ Object
(also: #hashes_per_sec)
Returns a recent hashes per second performance measurement while generating.
-
#getinfo ⇒ Object
(also: #info)
Returns an object containing various state info.
-
#getmininginfo ⇒ Object
Returns an object containing mining info.
-
#getnewaddress(account = nil) ⇒ Object
(also: #new_address)
Returns a new bitcoin address for receiving payments.
-
#getpeerinfo ⇒ Object
(also: #peerinfo)
Returns data about each connected network node.
-
#getrawmempool ⇒ Object
(also: #raw_mempool)
Gets all mempool txs (pedning/waiting to be added in a block).
-
#getrawtransaction(txid, verbose = 0) ⇒ Object
(also: #rawtransaction)
Get raw transaction bout
txid
. -
#getreceivedbyaccount(account, minconf = 1) ⇒ Object
(also: #received_by_account)
Returns the total amount received by addresses with
account
in transactions with at leastminconf
confirmations. -
#getreceivedbyaddress(bitcoinaddress, minconf = 1) ⇒ Object
(also: #received_by_address)
Returns the total amount received by
bitcoinaddress
in transactions with at leastminconf
confirmations. -
#gettransaction(txid) ⇒ Object
(also: #transaction)
Get detailed information about
txid
. -
#getwork(data = nil) ⇒ Object
(also: #work, #get_work)
If
data
is not specified, returns formatted hash data to work on:. -
#help(command = nil) ⇒ Object
List commands, or get help for a command.
- #host ⇒ Object
- #host=(a) ⇒ Object
-
#importprivkey(bitcoinprivkey, label = nil, rescan = true) ⇒ Object
Adds a private key (as returned by dumpprivkey) to your wallet.
-
#initialize(user, pass, options = {}) ⇒ Client
constructor
A new instance of Client.
-
#listaccounts(minconf = 1) ⇒ Object
(also: #accounts)
Returns Object that has account names as keys, account balances as values.
-
#listreceivedbyaccount(minconf = 1, includeempty = false) ⇒ Object
(also: #list_received_by_account)
Returns an array of objects containing:.
-
#listreceivedbyaddress(minconf = 1, includeempty = false) ⇒ Object
(also: #list_received_by_address)
Returns an array of objects containing:.
-
#listsinceblock(hash) ⇒ Object
Returns transactions since <hash> block.
-
#listtransactions(account = '', count = 10, from = 0) ⇒ Object
(also: #transactions, #list_transactions)
Returns up to
count
most recent transactions for accountaccount
. -
#move(fromaccount, toaccount, amount, minconf = 1, comment = nil) ⇒ Object
Move from one account in your wallet to another.
- #options ⇒ Object
- #pass ⇒ Object
- #pass=(a) ⇒ Object
- #port ⇒ Object
- #port=(a) ⇒ Object
- #proxy ⇒ Object
- #proxy=(a) ⇒ Object
-
#searchrawtransactions(bitcoinaddress, verbose = 1) ⇒ Object
(also: #search_raw_transactions)
Return count transactions with <address> present in their scriptSig, skipping skip at the beginning.
-
#sendfrom(fromaccount, tobitcoinaddress, amount, minconf = 1, comment = nil, comment_to = nil) ⇒ Object
(also: #send_from)
amount
is a real and is rounded to 8 decimal places. - #sendmany(fromaccount, addresses_amounts, minconf = 1, comment = nil) ⇒ Object (also: #send_many)
-
#sendrawtransaction(hexstring) ⇒ Object
Submits raw transaction (serialized, hex-encoded) to local node and network.
-
#sendtoaddress(bitcoinaddress, amount, comment = nil, comment_to = nil) ⇒ Object
(also: #send_to_address)
amount
is a real and is rounded to 8 decimal places. -
#setaccount(bitcoinaddress, account) ⇒ Object
(also: #account=, #set_account)
Sets the account associated with the given address.
-
#setgenerate(generate, genproclimit = -1)) ⇒ Object
(also: #generate=, #set_generate)
generate
is true or false to turn generation on or off. -
#signmessage(bitcoinaddress, message) ⇒ Object
(also: #sign_message)
Sign a message using
bitcoinaddress
. -
#signrawtransaction(hexstring, transaction = nil, privatekey = nil, sighashtype = "ALL") ⇒ Object
Sign inputs for raw transaction (serialized, hex-encoded).
- #ssl ⇒ Object
- #ssl=(a) ⇒ Object
- #ssl? ⇒ Boolean
-
#stop ⇒ Object
Stop bitcoin server.
- #user ⇒ Object
- #user=(a) ⇒ Object
-
#validateaddress(bitcoinaddress) ⇒ Object
(also: #validate_address)
Return information about
bitcoinaddress
. -
#verifymessage(bitcoinaddress, signature, message) ⇒ Object
(also: #verify_message)
Verify signature made by
bitcoinaddress
. -
#walletlock ⇒ Object
Removes the wallet encryption key from memory, locking the wallet.
-
#walletpassphrase(passphrase, timeout) ⇒ Object
Stores the wallet decryption key in memory for
timeout
seconds.
Constructor Details
#initialize(user, pass, options = {}) ⇒ Client
Returns a new instance of Client.
21 22 23 |
# File 'lib/startcoin_client/client.rb', line 21 def initialize(user, pass, = {}) @api = StartcoinClient::API.new({ :user => user, :pass => pass }.merge()) end |
Instance Attribute Details
#api ⇒ Object (readonly)
Returns the value of attribute api.
2 3 4 |
# File 'lib/startcoin_client/client.rb', line 2 def api @api end |
Instance Method Details
#backupwallet(destination) ⇒ Object
Safely copies wallet.dat to destination, which can be a directory or a path with filename.
26 27 28 |
# File 'lib/startcoin_client/client.rb', line 26 def backupwallet(destination) @api.request 'backupwallet', destination end |
#createmultisig(nrequired, keys) ⇒ Object
Creates a multi-signature address and returns a json object
31 32 33 |
# File 'lib/startcoin_client/client.rb', line 31 def createmultisig(nrequired, keys) @api.request 'createmultisig', nrequired, keys end |
#createrawtransaction(transactionid = nil, address_amount) ⇒ Object
nCreate a transaction spending given inputs (array of objects containing transaction id and output number), sending to given address(es)
37 38 39 |
# File 'lib/startcoin_client/client.rb', line 37 def createrawtransaction(transactionid = nil, address_amount) @api.request 'createrawtransaction', transactionid, address_amount end |
#decoderawtransaction(hexstring) ⇒ Object
Return a JSON object representing the serialized, hex-encoded transaction.
42 43 44 |
# File 'lib/startcoin_client/client.rb', line 42 def decoderawtransaction(hexstring) @api.request 'decoderawtransaction', hexstring end |
#getaccount(bitcoinaddress) ⇒ Object Also known as: account
Returns the account associated with the given address.
47 48 49 |
# File 'lib/startcoin_client/client.rb', line 47 def getaccount(bitcoinaddress) @api.request 'getaccount', bitcoinaddress end |
#getaccountaddress(account) ⇒ Object Also known as: account_address
Returns the current bitcoin address for receiving payments to this account.
52 53 54 |
# File 'lib/startcoin_client/client.rb', line 52 def getaccountaddress(account) @api.request 'getaccountaddress', account end |
#getaddressesbyaccount(account) ⇒ Object Also known as: addresses_by_account
Returns the list of addresses for the given account.
57 58 59 |
# File 'lib/startcoin_client/client.rb', line 57 def getaddressesbyaccount(account) @api.request 'getaddressesbyaccount', account end |
#getbalance(account = nil, minconf = 1) ⇒ Object Also known as: balance
If account
is not specified, returns the server’s total available balance. If account
is specified, returns the balance in the account.
63 64 65 |
# File 'lib/startcoin_client/client.rb', line 63 def getbalance(account = nil, minconf = 1) @api.request 'getbalance', account, minconf end |
#getbestblockhash ⇒ Object Also known as: bestblockhash
67 68 69 |
# File 'lib/startcoin_client/client.rb', line 67 def getbestblockhash @api.request 'getbestblockhash' end |
#getblock(hash) ⇒ Object
Dumps the block existing with specified hash.
78 79 80 81 82 |
# File 'lib/startcoin_client/client.rb', line 78 def getblock(hash) block = @api.request 'getblock', hash block["time"] = Time.at(block["time"]).utc block end |
#getblockbycount(height) ⇒ Object Also known as: block_by_count
Dumps the block existing at specified height. Note: this is not available in the official release
73 74 75 |
# File 'lib/startcoin_client/client.rb', line 73 def getblockbycount(height) @api.request 'getblockbycount', height end |
#getblockcount ⇒ Object Also known as: block_count
Returns the number of blocks in the longest block chain.
85 86 87 |
# File 'lib/startcoin_client/client.rb', line 85 def getblockcount @api.request 'getblockcount' end |
#getblockhash(index) ⇒ Object Also known as: block_hash
Returns hash of block in best-block-chain at <index>; index 0 is the genesis block
95 96 97 |
# File 'lib/startcoin_client/client.rb', line 95 def getblockhash(index) @api.request 'getblockhash', index end |
#getblocknumber ⇒ Object Also known as: block_number
Returns the block number of the latest block in the longest block chain.
90 91 92 |
# File 'lib/startcoin_client/client.rb', line 90 def getblocknumber @api.request 'getblocknumber' end |
#getconnectioncount ⇒ Object Also known as: connection_count
Returns the number of connections to other nodes.
100 101 102 |
# File 'lib/startcoin_client/client.rb', line 100 def getconnectioncount @api.request 'getconnectioncount' end |
#getdifficulty ⇒ Object Also known as: difficulty
Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
105 106 107 |
# File 'lib/startcoin_client/client.rb', line 105 def getdifficulty @api.request 'getdifficulty' end |
#getgenerate ⇒ Object Also known as: generate?
Returns true or false whether bitcoind is currently generating hashes
110 111 112 |
# File 'lib/startcoin_client/client.rb', line 110 def getgenerate @api.request 'getgenerate' end |
#gethashespersec ⇒ Object Also known as: hashes_per_sec
Returns a recent hashes per second performance measurement while generating.
115 116 117 |
# File 'lib/startcoin_client/client.rb', line 115 def gethashespersec @api.request 'gethashespersec' end |
#getinfo ⇒ Object Also known as: info
Returns an object containing various state info.
120 121 122 |
# File 'lib/startcoin_client/client.rb', line 120 def getinfo @api.request 'getinfo' end |
#getmininginfo ⇒ Object
Returns an object containing mining info.
130 131 132 |
# File 'lib/startcoin_client/client.rb', line 130 def getmininginfo @api.request 'getmininginfo' end |
#getnewaddress(account = nil) ⇒ Object Also known as: new_address
Returns a new bitcoin address for receiving payments. If account
is specified (recommended), it is added to the address book so payments received with the address will be credited to account
.
136 137 138 |
# File 'lib/startcoin_client/client.rb', line 136 def getnewaddress(account = nil) @api.request 'getnewaddress', account end |
#getpeerinfo ⇒ Object Also known as: peerinfo
Returns data about each connected network node.
125 126 127 |
# File 'lib/startcoin_client/client.rb', line 125 def getpeerinfo @api.request 'getpeerinfo' end |
#getrawmempool ⇒ Object Also known as: raw_mempool
Gets all mempool txs (pedning/waiting to be added in a block)
163 164 165 |
# File 'lib/startcoin_client/client.rb', line 163 def getrawmempool @api.request 'getrawmempool' end |
#getrawtransaction(txid, verbose = 0) ⇒ Object Also known as: rawtransaction
Get raw transaction bout txid
. It outputs the whole transaction chain by default in HEX. If you want JSON, set verbose to 1. When in the bitcoind config is set txindex=1, after reindexing, you can ask about any transaction (not included in your wallet), with this command.
158 159 160 |
# File 'lib/startcoin_client/client.rb', line 158 def getrawtransaction(txid, verbose = 0) @api.request 'getrawtransaction', txid, verbose end |
#getreceivedbyaccount(account, minconf = 1) ⇒ Object Also known as: received_by_account
Returns the total amount received by addresses with account
in transactions with at least minconf
confirmations.
142 143 144 |
# File 'lib/startcoin_client/client.rb', line 142 def getreceivedbyaccount(account, minconf = 1) @api.request 'getreceivedbyaccount', account, minconf end |
#getreceivedbyaddress(bitcoinaddress, minconf = 1) ⇒ Object Also known as: received_by_address
Returns the total amount received by bitcoinaddress
in transactions with at least minconf
confirmations.
147 148 149 |
# File 'lib/startcoin_client/client.rb', line 147 def getreceivedbyaddress(bitcoinaddress, minconf = 1) @api.request 'getreceivedbyaddress', bitcoinaddress, minconf end |
#gettransaction(txid) ⇒ Object Also known as: transaction
Get detailed information about txid
152 153 154 |
# File 'lib/startcoin_client/client.rb', line 152 def gettransaction(txid) @api.request 'gettransaction', txid end |
#getwork(data = nil) ⇒ Object Also known as: work, get_work
If data
is not specified, returns formatted hash data to work on:
:midstate => precomputed hash state after hashing the first half of the data
:data => block data
:hash1 => formatted hash buffer for second hash
:target => little endian hash target
If data
is specified, tries to solve the block and returns true if it was successful.
174 175 176 |
# File 'lib/startcoin_client/client.rb', line 174 def getwork(data = nil) @api.request 'getwork', data end |
#help(command = nil) ⇒ Object
List commands, or get help for a command.
179 180 181 |
# File 'lib/startcoin_client/client.rb', line 179 def help(command = nil) @api.request 'help', command end |
#host ⇒ Object
5 |
# File 'lib/startcoin_client/client.rb', line 5 def host; api.host; end |
#host=(a) ⇒ Object
12 |
# File 'lib/startcoin_client/client.rb', line 12 def host=(a); api.host = a; end |
#importprivkey(bitcoinprivkey, label = nil, rescan = true) ⇒ Object
Adds a private key (as returned by dumpprivkey) to your wallet.
184 185 186 |
# File 'lib/startcoin_client/client.rb', line 184 def importprivkey(bitcoinprivkey, label = nil, rescan = true) @api.request 'importprivkey', bitcoinprivkey, label, rescan end |
#listaccounts(minconf = 1) ⇒ Object Also known as: accounts
Returns Object that has account names as keys, account balances as values.
189 190 191 |
# File 'lib/startcoin_client/client.rb', line 189 def listaccounts(minconf = 1) @api.request 'listaccounts', minconf end |
#listreceivedbyaccount(minconf = 1, includeempty = false) ⇒ Object Also known as: list_received_by_account
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
199 200 201 |
# File 'lib/startcoin_client/client.rb', line 199 def listreceivedbyaccount(minconf = 1, includeempty = false) @api.request 'listreceivedbyaccount', minconf, includeempty end |
#listreceivedbyaddress(minconf = 1, includeempty = false) ⇒ Object Also known as: list_received_by_address
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 bitcoind listreceivedbyaddress 0 true
211 212 213 |
# File 'lib/startcoin_client/client.rb', line 211 def listreceivedbyaddress(minconf = 1, includeempty = false) @api.request 'listreceivedbyaddress', minconf, includeempty end |
#listsinceblock(hash) ⇒ Object
Returns transactions since <hash> block
221 222 223 |
# File 'lib/startcoin_client/client.rb', line 221 def listsinceblock(hash) @api.request 'listsinceblock', hash end |
#listtransactions(account = '', count = 10, from = 0) ⇒ Object Also known as: transactions, list_transactions
Returns up to count
most recent transactions for account account
.
216 217 218 |
# File 'lib/startcoin_client/client.rb', line 216 def listtransactions(account = '' , count = 10, from = 0) @api.request 'listtransactions', account, count, from end |
#move(fromaccount, toaccount, amount, minconf = 1, comment = nil) ⇒ Object
Move from one account in your wallet to another.
227 228 229 |
# File 'lib/startcoin_client/client.rb', line 227 def move(fromaccount, toaccount, amount, minconf = 1, comment = nil) @api.request 'move', fromaccount, toaccount, amount, minconf, comment end |
#options ⇒ Object
17 18 19 |
# File 'lib/startcoin_client/client.rb', line 17 def api. end |
#pass ⇒ Object
4 |
# File 'lib/startcoin_client/client.rb', line 4 def pass; api.pass; end |
#pass=(a) ⇒ Object
11 |
# File 'lib/startcoin_client/client.rb', line 11 def pass=(a); api.pass = a; end |
#port ⇒ Object
6 |
# File 'lib/startcoin_client/client.rb', line 6 def port; api.port; end |
#port=(a) ⇒ Object
13 |
# File 'lib/startcoin_client/client.rb', line 13 def port=(a); api.port = a; end |
#proxy ⇒ Object
8 |
# File 'lib/startcoin_client/client.rb', line 8 def proxy; api.proxy; end |
#proxy=(a) ⇒ Object
15 |
# File 'lib/startcoin_client/client.rb', line 15 def proxy=(a); api.proxy = a; end |
#searchrawtransactions(bitcoinaddress, verbose = 1) ⇒ Object Also known as: search_raw_transactions
Return count transactions with <address> present in their scriptSig, skipping skip at the beginning. The ordering is oldest transaction first; if skip is negative the order returned is newest transaction first and skip+1 transactions are skipped. If verbose=0 only txids are returned rather than the full transactions.
232 233 234 |
# File 'lib/startcoin_client/client.rb', line 232 def searchrawtransactions(bitcoinaddress, verbose=1) @api.request 'searchrawtransactions', bitcoinaddress, verbose end |
#sendfrom(fromaccount, tobitcoinaddress, amount, minconf = 1, comment = nil, comment_to = nil) ⇒ Object Also known as: send_from
amount
is a real and is rounded to 8 decimal places. Returns the transaction ID if successful.
237 238 239 |
# File 'lib/startcoin_client/client.rb', line 237 def sendfrom(fromaccount, tobitcoinaddress, amount, minconf = 1, comment = nil, comment_to = nil) @api.request 'sendfrom', fromaccount, tobitcoinaddress, amount, minconf, comment, comment_to end |
#sendmany(fromaccount, addresses_amounts, minconf = 1, comment = nil) ⇒ Object Also known as: send_many
250 251 252 |
# File 'lib/startcoin_client/client.rb', line 250 def sendmany(fromaccount, addresses_amounts, minconf = 1, comment = nil) @api.request 'sendmany', fromaccount, addresses_amounts, minconf, comment end |
#sendrawtransaction(hexstring) ⇒ Object
Submits raw transaction (serialized, hex-encoded) to local node and network.
242 243 244 |
# File 'lib/startcoin_client/client.rb', line 242 def sendrawtransaction(hexstring) @api.request 'sendrawtransaction', hexstring end |
#sendtoaddress(bitcoinaddress, amount, comment = nil, comment_to = nil) ⇒ Object Also known as: send_to_address
amount
is a real and is rounded to 8 decimal places
246 247 248 |
# File 'lib/startcoin_client/client.rb', line 246 def sendtoaddress(bitcoinaddress, amount, comment = nil, comment_to = nil) @api.request 'sendtoaddress', bitcoinaddress, amount, comment, comment_to end |
#setaccount(bitcoinaddress, account) ⇒ Object Also known as: account=, set_account
Sets the account associated with the given address.
255 256 257 |
# File 'lib/startcoin_client/client.rb', line 255 def setaccount(bitcoinaddress, account) @api.request 'setaccount', bitcoinaddress, account end |
#setgenerate(generate, genproclimit = -1)) ⇒ Object Also known as: generate=, set_generate
generate
is true or false to turn generation on or off. Generation is limited to genproclimit
processors, -1 is unlimited.
261 262 263 |
# File 'lib/startcoin_client/client.rb', line 261 def setgenerate(generate, genproclimit = -1) @api.request 'setgenerate', generate, genproclimit end |
#signmessage(bitcoinaddress, message) ⇒ Object Also known as: sign_message
Sign a message using bitcoinaddress
.
281 282 283 |
# File 'lib/startcoin_client/client.rb', line 281 def (bitcoinaddress, ) @api.request 'signmessage', bitcoinaddress, end |
#signrawtransaction(hexstring, transaction = nil, privatekey = nil, sighashtype = "ALL") ⇒ Object
Sign inputs for raw transaction (serialized, hex-encoded).
266 267 268 |
# File 'lib/startcoin_client/client.rb', line 266 def signrawtransaction(hexstring, transaction = nil, privatekey =nil, sighashtype = "ALL") @api.request 'signrawtransaction', hexstring, transaction, privatekey, sighashtype end |
#ssl ⇒ Object
7 |
# File 'lib/startcoin_client/client.rb', line 7 def ssl; api.ssl; end |
#ssl=(a) ⇒ Object
14 |
# File 'lib/startcoin_client/client.rb', line 14 def ssl=(a); api.ssl = a; end |
#ssl? ⇒ Boolean
9 |
# File 'lib/startcoin_client/client.rb', line 9 def ssl?; api.ssl?; end |
#stop ⇒ Object
Stop bitcoin server.
271 272 273 |
# File 'lib/startcoin_client/client.rb', line 271 def stop @api.request 'stop' end |
#user ⇒ Object
3 |
# File 'lib/startcoin_client/client.rb', line 3 def user; api.user; end |
#user=(a) ⇒ Object
10 |
# File 'lib/startcoin_client/client.rb', line 10 def user=(a); api.user = a; end |
#validateaddress(bitcoinaddress) ⇒ Object Also known as: validate_address
Return information about bitcoinaddress
.
276 277 278 |
# File 'lib/startcoin_client/client.rb', line 276 def validateaddress(bitcoinaddress) @api.request 'validateaddress', bitcoinaddress end |
#verifymessage(bitcoinaddress, signature, message) ⇒ Object Also known as: verify_message
Verify signature made by bitcoinaddress
.
286 287 288 |
# File 'lib/startcoin_client/client.rb', line 286 def (bitcoinaddress, signature, ) @api.request 'verifymessage', bitcoinaddress, signature, end |
#walletlock ⇒ Object
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.
299 300 301 |
# File 'lib/startcoin_client/client.rb', line 299 def walletlock @api.request 'walletlock' end |
#walletpassphrase(passphrase, timeout) ⇒ Object
Stores the wallet decryption key in memory for timeout
seconds.
291 292 293 |
# File 'lib/startcoin_client/client.rb', line 291 def walletpassphrase(passphrase, timeout) @api.request 'walletpassphrase', passphrase, timeout end |