Question about /addresses endpoint

Hello, i have a question,

on the swagger api docs:

http://dev.pywaves.org:6869/api-docs/index.html#!/addresses/create_1

The POST /addresses endpoint, description is “Create a new account in the wallet(if it exists)” is this creating a new complete account ? with seed and keypair ?
If so, why the response is only the address ? how to get the associated seed and keypair ?

In this context the “wallet” is refering to the full node ? a full node is a wallet and we create account (seed/address/keypairs) in this wallet is that correct ?

Thanks for the help.

2 Likes

Hello,
This method creates a new address in the built-in wallet. The wallet initialised with only one seed which is used to create all addresses in it. To create a new address it prepends the seed with 4 bytes of integer value of the account counter. So, for the first address the seed is prepended with [0x00, 0x00, 0x00, 0x00]. The second with [0x00, 0x00, 0x00, 0x01] and so on.
It’s possible to retrieve the seed using wallet/seed API method.
Yes, you are correct, the wallet is used to store accounts of the node. If balance of any account is more than 1000 waves it will be used to create (mine) new blocks.

1 Like

Thanks for infos its helping :slight_smile:

1 Like