Creating a Wallet
Generate an Amadeus key pair offline in the node shell, derive the address from an existing seed, and import the key into a wallet.
The node shell can generate key pairs without any network access. Start the node as described in Using the REPL; an offline node is enough.
You are responsible for storing your seed safely. Anyone who has it controls the funds.
Generate a key pair
{public_key, seed} = API.Wallet.generate_key()
{"6szjTAfFU1KqxGVqyhuhGoA9GTJH93dEw6hDccVur2KV3Tc3juFfW5vYTENFe3hcPc",
"2k3LidUYf6c6Lxs5YR2RY9mT7gJS6663XbyfarMQx8V5Pf28NF5XCQaecZrvYty6sKHxr5w4RoUct2t16agNTAQd"}
The result is a tuple of two Base58 strings:
- Public key: a 48-byte BLS12-381 public key. This is your address; share it to receive funds.
- Seed: 64 random bytes from which the secret key is derived. Keep it secret.
The pair above is only an example. It is published here, so never send funds to it.
A CLI key has no 12-word recovery phrase. The Base58 seed is its only backup.
Get the address of an existing seed
seed = "2k3LidUYf6c6Lxs5YR2RY9mT7gJS6663XbyfarMQx8V5Pf28NF5XCQaecZrvYty6sKHxr5w4RoUct2t16agNTAQd"
seed |> Base58.decode() |> BlsEx.get_public_key!() |> Base58.encode()
"6szjTAfFU1KqxGVqyhuhGoA9GTJH93dEw6hDccVur2KV3Tc3juFfW5vYTENFe3hcPc"
Use the key in a wallet
The same key works in the TypeScript SDK and the wallets. To use it in the Amadeus Wallet extension, choose Private Key ("Import using a base58-encoded private key") when you import a wallet and paste the Base58 seed. See Importing an existing wallet.
A key is valid on both mainnet and testnet. Use separate keys for testing anyway, so a testnet script can never hold a mainnet seed.
Next steps
- Broadcast Transaction: send AMA with this seed.
- Testnet faucet: get free testnet AMA for the new address.