Bytecoin daemons - v3.5.0 (Beryl)
walletd
!NB! Documentation under construction !NB!
Introduction
The Bytecoin Wallet Daemon (walletd
, Bytecoin RPC Wallet) is designed to manage a user's account while operating together with a Bytecoin Node Daemon. To start the walletd
you must pass a path to a wallet file as a command-line parameter which identifies the context the service will work within.
Service Location
By default, the Bytecoin Wallet Daemon is only bound to 127.0.0.1
(localhost
) interface, so it can only be reached from the same computer it runs on. To bind it to all interfaces, use --walletd-bind-address=0.0.0.0:8070
command line argument (note that specifying port is mandatory).
To make a JSON PRC request to the walletd
you should make an HTTP POST request to an entry point:
where:
<ip>
is the IPv4 address of thewalletd
service. If the service is on a local machine, use127.0.0.1
instead oflocalhost
.<port>
is TCP port ofwalletd
. By default the service is bound to8070
.
Curl Template
Methods
Address and key management
Balance and history of transfers
Sending money
POSTcreate_addresses
About
Either adds new or imports existing addresses (with corresponding spend keys) into a wallet file. To generate a new random key pair (and address, of course), you append an empty string to a secret_spend_keys
array. To import an existing address, you append its secret spend key to a secret_spend_keys
array.
If you import existing addresses created some time ago, specify creation_timestamp
so the walletd
can rescan the blockchain starting from that point of time, looking for transactions to/from those addresses. If no creation_timestamp
is included, or if it is set to 0
, walletd
will rescan the whole blockchain from the beginning.
Adding an existing secret spend key is not an error, it will just return a corresponding address together with that key.
This method returns arrays of both addresses and secret spend keys, where each address corresponds to each secret key.
Before this method returns, it performs fdatasync
on the wallet file, so if you add lots of addresses, it makes sense to batch them instead of calling this method individually per address.
Input (params)
Output
POSTget_addresses
!NB! Method is marked as deprecated, use get_wallet_records
instead.
About
Returns an array of all addresses stored in a wallet file. If view_only
flag is true
, there are no
secret spend keys in the file, so the walletd
is allowed to spend money from any address.