peaqOS supports the Open Wallet Standard v1.3 for wallet generation, encrypted storage, signing, and display. The current raw-key flow uses hex private keys inDocumentation Index
Fetch the complete documentation index at: https://docs.peaq.xyz/llms.txt
Use this file to discover all available pages before exploring further.
.env files, protected only by file permissions. That works, but it has limits:
- No encryption at rest
- No mnemonic backup or recovery
- No multi-chain visibility. One secp256k1 key derives addresses on every EVM chain, Cosmos, Solana, Bitcoin, Tron, and more, but nothing surfaces them
- No standard import / export to wallets like MetaMask or hardware devices
- No audit log of key creation, signing, or export events
Multi-chain accounts from one mnemonic
A mnemonic-derived wallet generates accounts across every OWS-supported chain family from a single 12- or 24-word phrase.| Family | Curve | Coin Type | Default Path | Address Format |
|---|---|---|---|---|
| EVM (peaq, Base, Ethereum, Polygon, etc.) | secp256k1 | 60 | m/44'/60'/0'/0/{index} | EIP-55 checksummed hex |
| Solana | ed25519 | 501 | m/44'/501'/{index}'/0' | Base58 public key |
| Bitcoin | secp256k1 | 0 | m/84'/0'/0'/0/{index} | Bech32 native segwit |
| Cosmos | secp256k1 | 118 | m/44'/118'/0'/0/{index} | Bech32 |
| Tron | secp256k1 | 195 | m/44'/195'/0'/0/{index} | Base58Check |
| TON | ed25519 | 607 | m/44'/607'/{index}' | Base64url wallet v5r1 |
| Sui | ed25519 | 784 | m/44'/784'/{index}'/0'/0' | 0x + BLAKE2b-256 hex |
| XRPL | secp256k1 | 144 | m/44'/144'/0'/0/{index} | Base58Check |
| Spark | secp256k1 | 8797555 | m/84'/0'/0'/0/{index} | spark: + compressed pubkey |
| Filecoin | secp256k1 | 461 | m/44'/461'/0'/0/{index} | f1 + base32 |
SUPPORTED_CHAIN_IDS). If OWS doesn’t return one, it’s synthesized from the wallet’s primary EVM address, which is identical across all EVM chains:
| Network | CAIP-2 | Chain ID |
|---|---|---|
| peaq | eip155:3338 | 3338 |
| ethereum | eip155:1 | 1 |
| base | eip155:8453 | 8453 |
| polygon | eip155:137 | 137 |
| arbitrum | eip155:42161 | 42161 |
| optimism | eip155:10 | 10 |
eip155:3338:0x...), so a single peaqOS wallet can sign on peaq, Base (for bridgeNft), and any other supported chain without ever exporting the key.
Vault layout
The vault lives at~/.ows/ (override with OWS_VAULT_PATH). Structure is set by OWS; peaqOS uses it as-is.
id(UUID v4) andnamekey_type:"mnemonic"or"private_key"accounts[]with one entry per supported chain (CAIP-10, address, derivation path)cryptowithaes-256-gcmciphertext,scryptKDF params, IV, salt, and auth tagcreated_at(ISO 8601)
SDK methods
Wallet lifecycle is exposed through the SDKs.JavaScript / TypeScript
Available as both module-level imports and static methods onPeaqosClient. Pick whichever matches your style.
WalletOptions arg with vaultPath to point at a vault directory other than ~/.ows/. Passphrase falls back to OWS_PASSPHRASE when omitted; if both are missing, the call throws PeaqosError. importWallet validates the hex shape eagerly and throws ValidationError for malformed keys; importWalletMnemonic accepts an optional index (default 0) before the WalletOptions arg to derive a non-default account.
WalletInfo carries id, name, createdAt, keyType, peaqAddress (convenience), and accounts: readonly AccountInfo[] with every chain. AccountInfo has accountId (CAIP-10), address, chainId (CAIP-2), network (human-readable name like "peaq", "base", "solana"), and derivationPath. Both shapes are deep-frozen.
Building a client straight from a vault wallet
PeaqosClient.fromWallet skips the manual private-key plumbing. It loads a wallet from the vault and returns a configured client whose account is the wallet’s peaq address.
fromWallet(nameOrId, passphrase, owsSigning, config, options?). owsSigning defaults to true. In OWS-native mode the SDK never holds the private key: signMessage and signTypedData throw because OWS only exposes signTransaction. Switch to raw-key mode if you need either.
OWS signing surfaces typed errors via OwsSigningErrorCode (WALLET_NOT_FOUND, INVALID_PASSPHRASE, INVALID_INPUT, POLICY_DENIED, CHAIN_NOT_SUPPORTED). INVALID_INPUT becomes a ValidationError; the rest become PeaqosError with the original error preserved as .cause.
Python
Available underpeaq_os_sdk.wallet and as @staticmethods on PeaqosClient.
vault_path keyword for a custom vault directory. Passphrase falls back to the OWS_PASSPHRASE env var when None; missing both raises PeaqosError.
On the Python side, WalletInfo carries id, name, created_at, key_type, peaq_address (convenience), and accounts: list[AccountInfo] with every chain. AccountInfo has account_id (CAIP-10), address, chain_id (CAIP-2), network (human-readable name), and derivation_path.
Building a client straight from a vault wallet
PeaqosClient.from_wallet mirrors the JS factory above. It loads the wallet, verifies the passphrase, and returns a fully configured client.
from_wallet(name_or_id, passphrase=None, ows_signing=True, vault_path=None, **config_kwargs). passphrase falls back to OWS_PASSPHRASE. In OWS-native mode the SDK never holds the private key — OWSAccount decrypts it inside the OWS Rust FFI for each sign_transaction call and wipes it immediately. ows_signing=False exports and decrypts the key at construction time, behaving identically to a raw-key client. Each transaction’s chainId drives both the CAIP-2 OWS arg and the EIP-155 v, so the same client transparently signs both peaq (eip155:3338) and Base (eip155:8453) bridge transactions.
OWS signing surfaces typed errors via 5 OWS error codes (WALLET_NOT_FOUND, INVALID_PASSPHRASE, INVALID_INPUT, POLICY_DENIED, CHAIN_NOT_SUPPORTED). INVALID_INPUT raises ValidationError; the rest raise PeaqosError. See SDK errors: OWS signing error codes.
Pulling the peaq address out of a wallet
peaq_address / peaqAddress is already populated by every wallet method, so most callers never need anything else. If you’re working with a raw accounts list (e.g. building a wallet response by hand in tests, or reading a vault file directly), use the helper:
eip155:3338 account if present, otherwise the first eip155:* account (EVM addresses match across EVM chains), and raises PeaqosError when no EVM account exists.
From the CLI
Every SDK wallet helper is also exposed throughpeaqos wallet. Install the optional extra to get them:
peaqos init also offers wallet as a third Private key source choice and writes PEAQOS_OWS_WALLET instead of PEAQOS_PRIVATE_KEY. Once a wallet is active, peaqos activate, peaqos qualify event, and the rest of the command surface sign through it. See peaqOS CLI: wallet for the full command reference.
Security model
- Vault encryption. AES-256-GCM with scrypt KDF (
n=65536, r=8, p=1). - Passphrase handling. Sourced from the explicit argument or the
OWS_PASSPHRASEenv var; if neither is set, the SDK raisesPeaqosErrorrather than prompting. Never stored on disk. In CI, pass via secret manager or env injection. - Mnemonic exposure. Never returned by
createWallet/create_wallet. TheWalletInforesponse only carries addresses and metadata. To recover the seed phrase you must callexportWallet/export_walletwith the vault passphrase. - Single-mnemonic blast radius. One phrase controls accounts on every supported chain. Treat exported phrases accordingly: anyone with the phrase has access to every chain account.
- Audit log. Every wallet operation (create, import, export, delete) appends to
~/.ows/logs/audit.jsonl.
See also
peaqOS CLI
The full peaqOS CLI command reference.
Install
The
[ows] extra and the raw-key flow side-by-side.OWS specification
Full upstream Open Wallet Standard v1.3 spec.

