Documentation Index
Fetch the complete documentation index at: https://docs.unlink.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Read balances
Read transactions
Poll transaction status
Poll until a transaction reaches a terminal state (relayed, processed, or failed).
Get address
Get the Unlink address (Bech32m) for this account.Get public key
Get the spending public key (EdDSA on BabyJubJub).Register account
Register an Unlink account once beforedeposit, transfer, or withdraw. Browser-side non-custodial flows should call the top-level registerAccount() helper so the Tenant does not need the user’s viewing or nullifying keys.
Derive identity from a wallet signature
The SDK can derive an Unlink identity from an EOApersonal_sign signature instead of a mnemonic. The quickstart shows the one-shot wrapper (account.fromMetaMask); this section is the lower-level reference.
Message format
buildDeriveSeedMessage returns the exact string a wallet must sign:
- The message is the single source of truth — bumping its format is a breaking change for every existing identity.
tenantNameis embedded verbatim. The SDK rejects empty strings, LF/CR, or anything over 64 bytes UTF-8 but does not canonicalise casing or whitespace. Use a stable slug from your tenant config.chainIdmust be a positive integer.
Sign and derive
If you control the signing path yourself (viem, ethers, a hardware wallet, etc.), build the message, sign it, and feed the signature intoaccount.fromEthereumSignature with the same tenantName/chainId:
v byte, enforce low-s) and expanded with HKDF-SHA256 into the 64-byte seed consumed by account.fromSeed. tenantName and chainId are bound into the HKDF salt so that any mismatch between the values used to build the message and the values passed to the factory derives a different address — caller error becomes immediately visible as a fresh, empty account rather than a silent identity swap.
Stability across wallets relies on RFC-6979 deterministic ECDSA, which every mainstream wallet uses today. For long-term recovery, prefer the keystore export (account.export(keys)) over re-deriving from a wallet signature each session.