bytecoin icon indicating copy to clipboard operation
bytecoin copied to clipboard

Generate multiple addresses in a wallet

Open lhfly5201314 opened this issue 6 years ago • 3 comments

Hi,guys! I used the walletd version 3.3.0,and I tried to generate multiple addresses in a wallet using the below way: curl -X POST http://:/json_rpc -H 'Content-Type: application/json-rpc' -d '{"jsonrpc": "2.0", "id": "", "method": "create_addresses", "params": {}}' the official link is: https://github.com/bcndev/bytecoin/wiki/Bytecoin-Wallet-Daemon-JSON-RPC-API#1-create-addresses But I got nothing return...what's wrong,the wiki document is out-of-date??? Or the one wallet only could own one address?? Thanks,guys!

lhfly5201314 avatar Apr 04 '18 10:04 lhfly5201314

When I generate address,should I need synchronize the full blockchain data?? Could I generate address off-line???

lhfly5201314 avatar Apr 04 '18 12:04 lhfly5201314

@lhfly5201314 According to the wiki section you cited, to create new addresses (say, 3) you should make a request with secret_spend_keys list filled with the empty strings of desired length (3). Here is an example of how to create three new addresses in your wallet:

curl -X POST http://127.0.0.1:8070/json_rpc -H 'Content-Type: application/json-rpc' -d '{"jsonrpc": "2.0", "id": "", "method": "create_addresses", "params": {"secret_spend_keys":["", "", ""]}}'

bcndev avatar Apr 09 '18 18:04 bcndev

@bcndev Hi,friend!I tried your command with secret_spend_keys params, still returned nothong,no errors. I am sure the port is listening.And I tried curl -X POST http://127.0.0.1:8081/json_rpc -H 'Content-Type: application/json-rpc' -d '{"jsonrpc": "2.0", "id": "", "method": "get_status", "params": {}}',request from the bitcoind ,it returned the correct info. If I run the same command(or get_addresses) with 127.0.0.1:8070 requesting from the walletd,still returned nothing,no errors.. Any more advices???Thanks!

lhfly5201314 avatar Apr 10 '18 02:04 lhfly5201314