IMPORTANT: It's actual for API V0
First of all, you need a new mnemonic for backup passphrase. Please go here and generate English BIP39 Mnemonic. Choose 12 words and click "Generate" button. You will get something like this:
refuse layer pill agent wagon effort party fetch come degree hope real
Use this mnemonic (as a comma-separated list of strings) to create a new wallet, for example:
$ curl -X POST -H "Content-Type: application/json" -d '{"cwBackupPhrase": {"bpToList":["refuse","layer","pill","agent","wagon","effort","party","fetch","come","degree","hope","real"]}, "cwInitMeta": {"cwName": "Personal Wallet 2", "cwAssurance": "CWANormal", "cwUnit": 0}}' --cacert ./scripts/tls-files/ca.crt https://localhost:8090/api/wallets/new
Please note that you cannot create two or more wallets with the same mnemonic!
Please note that every wallet already contains at least one account.
You can check existing accounts by command:
$ curl -k -X GET https://localhost:8090/api/accounts
To add a new account use this command:
$ curl -X POST -H "Content-Type: application/json" -d '{"caInitMeta": {"caName": "Account N2"},"caInitWId": "Ae2tdPwUPEZAUappYUWsNtJ3wLQFuB5kCqUAiALA9bveu9ptgndiC3PFnKX"}' --cacert ./scripts/tls-files/ca.crt https://localhost:8090/api/accounts
where Ae2tdPwUPEZAUappYUWsNtJ3wLQFuB5kCqUAiALA9bveu9ptgndiC3PFnKX
is an id of wallet.
You can use exactly the same command to add as many accounts in one wallet as you need.
Please note that every account already contains at least one address.
You can check existing addresses by command:
$ curl -k -X GET https://localhost:8090/api/accounts
To add a new address use this command:
$ curl -X POST -H "Content-Type: application/json" -d '"Ae2tdPwUPEZAUappYUWsNtJ3wLQFuB5kCqUAiALA9bveu9ptgndiC3PFnKX@2147483648"' --cacerts/ca.crt https://localhost:8090/api/addresses
where Ae2tdPwUPEZAUappYUWsNtJ3wLQFuB5kCqUAiALA9bveu9ptgndiC3PFnKX@2147483648
is an id of account.
You can use exactly the same command to add as many addresses in one account as you need.