Wallet registration
Wallet registration creates a wallet entry in AMP2 and returns a wallet ID. The page explains descriptor construction, registration behavior, wallet strategy, and next steps.
Registering a wallet descriptor creates a wallet entry in AMP2 and returns a wallet ID (WID) that is used in all subsequent operations.
Build a descriptor
An AMP2 wallet descriptor is a 2-of-2 confidential multisig combining your key and AMP2's server key:
let descriptor_str = "ct(elip151,elwsh(multi(2,[b805d768/87h/1h/0h]tpubDCYEgnLyCH2okSittQNNB8JHLwPgmoEAoKcMrJDHP9dFVamsadPAFJQ77C1htgR8ksie3VksLXoryng9AUaPZSF8FwTwEv6CaHp8j2YCrds/<0;1>/*,[c67f5991/87'/1'/0']tpubDC4SUtWGWcMQPtwjgQQ4DYnFmAYhiKxw3f3KKCvMGT9sojZNvHsQ4rVW6nQeCPtk4rLAxGKeuAzMmBmH92X3HDgLho3nRWpvuJrpCmYgeQj/<0;1>/*)))";Descriptor components
| Part | Meaning |
|---|---|
ct(elip151) | Confidential Transaction blinding via ELIP-151 |
elwsh(multi(2,...)) | Elements witness script hash, 2-of-2 multisig |
First tpub with [b805d768/...] | AMP2 server's keyorigin xpub |
Second tpub with [c67f5991/...] | Your keyorigin xpub |
/<0;1>/* | Receive (0) and change (1) derivation |
#6j2fne4s | Checksum |
You can construct the descriptor using the AMP2 Rust client:
let amp2 = Amp2::new(keyorigin_xpub.to_string(), amp_url.to_string()).unwrap();
let descriptor = amp2.descriptor_from_str(keyorigin_xpub).unwrap();
let desc_str = descriptor.descriptor().to_string();Or parse an existing descriptor string:
use elements_miniscript::ConfidentialDescriptor;
let descriptor = ConfidentialDescriptor::from_str(descriptor_str).unwrap();Register
let registration = amp2.register(descriptor).await.unwrap();
assert!(!registration.wid.is_empty());
println!("Wallet registered: wid={}", registration.wid);The wid is deterministically derived from the descriptor. Store it for all future operations.
Registration behavior
| Scenario | Result |
|---|---|
| New descriptor | Created, returns new WID |
| Same descriptor, same blinding keys | Returns existing WID (idempotent) |
| Same descriptor, different blinding keys | 403 Forbidden |
| Invalid descriptor format | Validation error |
Idempotent registration means it is safe to call register on startup without worrying about duplicate entries.
What happens after registration
Once a wallet is registered:
- The issuer can see it in their wallet list.
- The issuer can include it as a recipient in send operations.
- The issuer can assign restriction policies to it.
- Balance and UTXO tracking begins for this descriptor.
The wallet needs to be whitelisted (via restriction groups) before the issuer can send restricted assets to it.
Multiple wallets
A venue may register multiple wallets for different purposes:
- Omnibus wallet: holds assets for all venue clients.
- Per client wallets: separate wallets for individual clients (better isolation, more management overhead).
- Hot/cold separation: active trading wallet and cold storage wallet.
Next steps
- Receiving Assets: how incoming transfers work
- Signing PSETs: build and cosign transactions
- Wallets and Descriptors: full descriptor reference
- Multisig Wallet: k-of-n and n-of-n wallets with AMP as mandatory co-signer
LWK setup with AMP2
LWK provides Rust wallet operations for Liquid. The page explains AMP2 client initialization, signer creation, xpub validation, and network configuration.
Asset receipt
Receiving AMP2-managed assets does not require a transaction-building step. The page explains receipt flow, transfer detection, address derivation, and confirmation states.