Skip to main content

Managed Wallets

Managed wallets are encrypted server-side wallets used by one-call execution endpoints like trades, token creation, SOL split, SOL consolidation, and cashback claim. One of them is the default, used whenever a request doesn't specify a wallet.

Create Managed Wallet

POST /v1/wallets
const wallet = await solanaLaser("/v1/wallets", {
set_default: true,
});

console.log(wallet.public_key);
console.log(wallet.private_key_base58);

Request

{
"set_default": true
}

Response

{
"id": 1,
"public_key": "MANAGED_WALLET_PUBLIC_KEY",
"private_key_base58": "BASE58_64_BYTE_SECRET_KEY",
"private_key_format": "base58_64_byte_secret_key",
"status": "active",
"is_default": true,
"created_at": "2026-07-14T00:00:00"
}

private_key_base58 is returned only in this creation response. Store it on the client side if you need backup/export access. Later wallet-list and management responses do not return private keys.

Import Wallet

POST /v1/wallets/import
const wallet = await solanaLaser("/v1/wallets/import", {
private_key_base58: "BASE58_64_BYTE_SECRET_KEY",
set_default: true,
});

Both the 64-byte full secret key and the 32-byte seed form are accepted. The public key is derived server-side from the key you send, so a typo in the secret shows up as a 400, not a wrong address. Imported private keys are encrypted at rest and are not returned.

List Wallets

GET /v1/wallets
const wallets = await solanaLaser("/v1/wallets");
const active = wallets.find((w) => w.is_default);

Set Default Wallet

PUT /v1/wallets/{public_key}/default
await solanaLaser(`/v1/wallets/${publicKey}/default`, undefined, "PUT");

The path parameter is the wallet's public key. It must already be a managed wallet on your account — otherwise you get a 404. Returns the updated wallet record with is_default: true.

DELETE /v1/wallets/{public_key}
await solanaLaser(`/v1/wallets/${publicKey}`, undefined, "DELETE");

Delinking permanently removes SolanaLaser's encrypted private-key copy and the local execution history for that wallet. It does not affect the Solana address or any assets on-chain. If the default wallet is removed, the oldest remaining managed wallet becomes the new default.