Skip to main content

Starting a wallet

Creating and starting a wallet.

Parameters

  • wallet-id: Key reference of the wallet. Used to say which wallet each request is directed to.
  • passphrase: Optional parameter to start the wallet with a passphrase.
  • seedKey: Parameter to define which seed (from the object seeds in the config.js file) will be used to generate the wallet.
  • seed: Used to directly pass the 24-words seed.
info

The parameters seedKey and seed are mutually exclusive, i. e., they cannot be passed to the endpoint at the same time; either the seedKey parameter is informed, or the seed, but never both.

If both seedKey and seed are passed as parameters at the same time, a message error is returned:

{"success":false,"message":"You can't have both 'seedKey' and 'seed' in the body."}

Request passing seedKey

curl -X POST --data "wallet-id=id" \
--data-urlencode "passphrase=123" \
--data "seedKey=default" \
http://localhost:8000/start

Request passing seed

curl -X POST --data "wallet-id=id" \
--data-urlencode "passphrase=123" \
--data "seed=two throw kangaroo couch raw thumb coffee wine lend virtual seminar scorpion abandon prison nation thrive because female ripple canvas sad annual urban young" \
http://localhost:8000/start

Response

{"success":true}
info

For starting a wallet with a passphrase, the allowPassphrase must be configured.

Trade-Off between seedKey and seed

Considering the risks involved in data traffic on the network, using a seedKey may be a safer strategy to handle this critical information. On the other hand, it also needs to take into account the intrinsic vulnerabilities of storing the 24-word seed on a server; for example, the risk of a security breach caused by an attacker trying to access the seed.

Another aspect to consider when choosing between using seed or seedKey is flexibility regarding changes. Since a seed can be sent via a simple HTTP request, it can be changed easily. This same facility may not be available using a seedKey on a server.