Create / Restore
status: stable
Create and restore a wallet from a mnemonic sentence or account public key.
Body
object
Required
POST
/wallets
curl \
--request POST https://localhost:8090/v2/wallets \
--header "Content-Type: application/json" \
--data '{"name":"Alan's Wallet","mnemonic_sentence":["squirrel","material","silly","twice","direct","slush","pistol","razor","become","junk","kingdom","flee","squirrel","silly","twice"],"mnemonic_second_factor":["squirrel","material","silly","twice","direct","slush","pistol","razor","become"],"passphrase":"Secure Passphrase","address_pool_gap":20,"one_change_address_mode":false,"restoration_mode":"from_genesis"}'
Request examples
Shelley
{
"name": "Alan's Wallet",
"mnemonic_sentence": [
"squirrel",
"material",
"silly",
"twice",
"direct",
"slush",
"pistol",
"razor",
"become",
"junk",
"kingdom",
"flee",
"squirrel",
"silly",
"twice"
],
"mnemonic_second_factor": [
"squirrel",
"material",
"silly",
"twice",
"direct",
"slush",
"pistol",
"razor",
"become"
],
"passphrase": "Secure Passphrase",
"address_pool_gap": 20,
"one_change_address_mode": false,
"restoration_mode": "from_genesis"
}
{
"name": "Alan's Wallet",
"account_public_key": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db11423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1",
"address_pool_gap": 20
}
Response examples (415)
{
"message": "string",
"code": "unsupported_media_type"
}
Response examples (409)
{
"message": "string",
"code": "wallet_already_exists"
}
Response examples (406)
{
"message": "string",
"code": "not_acceptable"
}
Response examples (400)
{
"message": "string",
"code": "bad_request"
}
Response examples (201)
{
"id": "2512a00e9653fe49a44a5886202e24d77eeb998f",
"address_pool_gap": 20,
"balance": {
"available": {
"quantity": 42000000,
"unit": "lovelace"
},
"reward": {
"quantity": 42000000,
"unit": "lovelace"
},
"total": {
"quantity": 42000000,
"unit": "lovelace"
}
},
"assets": {
"available": [
{
"policy_id": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b",
"asset_name": "string",
"quantity": 42
}
],
"total": [
{
"policy_id": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b",
"asset_name": "string",
"quantity": 42
}
]
},
"delegation": {
"active": {
"status": "delegating",
"target": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1"
},
"next": [
{
"status": "not_delegating",
"changes_at": {
"epoch_number": 14,
"epoch_start_time": "2020-01-22T10:06:39Z"
}
}
]
},
"name": "Alan's Wallet",
"passphrase": {
"last_updated_at": "2019-02-27T14:46:45Z"
},
"state": {
"status": "ready"
},
"tip": {
"absolute_slot_number": 8086,
"slot_number": 1337,
"epoch_number": 14,
"time": "2019-02-27T14:46:45Z",
"height": {
"quantity": 1337,
"unit": "block"
}
}
}