Restore
status: stable
Restore a Byron wallet from a mnemonic sentence or encrypted root private key (deprecated).
⚠️ WARNING ⚠️
The construction of random wallet in itself is deprecated, in particular the restoration from an encrypted root private key.
These endpoints exist to ease migrations from legacy software such as cardano-sl
but should be avoided by new applications.
Body
object
Required
-
style
string Value is
random
. -
name
string Required Minimum length is
1
, maximum length is255
. -
passphrase
string Required A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)
Minimum length is
10
, maximum length is255
. -
mnemonic_sentence
array[string(bip-0039-mnemonic-word{english})] Required A list of mnemonic words
At least
12
but not more than24
elements.
POST
/byron-wallets
curl \
--request POST 'https://localhost:8090/v2/byron-wallets' \
--header "Content-Type: application/json" \
--data '{"style":"random","name":"Alan's Wallet","passphrase":"Secure Passphrase","mnemonic_sentence":["squirrel","material","silly","twice","direct","slush","pistol","razor","become","junk","kingdom","flee","squirrel","silly","twice"]}'
Request examples
Random
{
"style": "random",
"name": "Alan's Wallet",
"passphrase": "Secure Passphrase",
"mnemonic_sentence": [
"squirrel",
"material",
"silly",
"twice",
"direct",
"slush",
"pistol",
"razor",
"become",
"junk",
"kingdom",
"flee",
"squirrel",
"silly",
"twice"
]
}
{
"style": "icarus",
"name": "Alan's Wallet",
"passphrase": "Secure Passphrase",
"mnemonic_sentence": [
"squirrel",
"material",
"silly",
"twice",
"direct",
"slush",
"pistol",
"razor",
"become",
"junk",
"kingdom",
"flee",
"squirrel",
"silly",
"twice"
]
}
{
"style": "trezor",
"name": "Alan's Wallet",
"passphrase": "Secure Passphrase",
"mnemonic_sentence": [
"squirrel",
"material",
"silly",
"twice",
"direct",
"slush",
"pistol",
"razor",
"become",
"junk",
"kingdom",
"flee",
"squirrel",
"silly",
"twice"
]
}
{
"style": "ledger",
"name": "Alan's Wallet",
"passphrase": "Secure Passphrase",
"mnemonic_sentence": [
"squirrel",
"material",
"silly",
"twice",
"direct",
"slush",
"pistol",
"razor",
"become",
"junk",
"kingdom",
"flee",
"squirrel",
"silly",
"twice"
]
}
{
"name": "Alan's Wallet",
"account_public_key": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db11423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1",
"address_pool_gap": 20
}
{
"style": "random",
"name": "Alan's Wallet",
"encrypted_root_private_key": "string",
"passphrase_hash": "31347c387c317c574342652b796362417576356c2b4258676a344a314c6343675375414c2f5653393661364e576a2b7550766655513d3d7c2f376738486c59723174734e394f6e4e753253302b6a65515a6b5437316b45414941366a515867386539493d"
}
Response examples (415)
{
"message": "string",
"code": "an_error_code"
}
Response examples (409)
{
"message": "string",
"code": "an_error_code"
}
Response examples (406)
{
"message": "string",
"code": "not_acceptable"
}
Response examples (400)
{
"message": "string",
"code": "bad_request"
}
Response examples (201)
{
"id": "2512a00e9653fe49a44a5886202e24d77eeb998f",
"balance": {
"available": {
"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
}
]
},
"discovery": "sequential",
"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"
}
}
}