Wallet

Prepare withdrawal (semi-transaction; broadcast via non-custodial)

**Semi-transaction:** Builds and signs the withdrawal but does **not** broadcast. Returns `signedTx`, `chain`, and `fromAddress` so the client can broadcast via POST /api/wallet/non-custodial/broadcast. The wallet address must be registered for your organization before broadcasting. Supports all platform chains/currencies (EVM, UTXO, Tron, Solana, USDT on ETH/BSC/TRX/SOL/POLYGON). Use for testing the non-custodial flow: create custodial wallet, get private key, register address, then call withdraw to get signed tx and broadcast it manually.

AuthBearer (JWT)
GroupWallet
Rate limitSee Rate Limits
POST/api/wallet/{walletId}/withdraw

SDK setup

Create a client and set credentials (JWT and/or API key) before calling the API. Match the authentication type shown above.

import { Configuration, WalletApi } from 'mudbase-sdk';

const configuration = new Configuration({
  basePath: 'https://cloud.mudbase.dev',
  accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c3JfbW9yZ2FuX2RlIiwiZW1haWwiOiJtb3JnYW4uY2hlbkBub3J0aHdpbmQuZGV2IiwiZXhwIjoxODI1MTI5NjAwfQ.doc_preview_sig',
});

const wallet = new WalletApi(configuration);
import { Configuration, WalletApi } from 'mudbase-sdk';

const configuration = new Configuration({
  basePath: 'https://cloud.mudbase.dev',
  accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c3JfbW9yZ2FuX2RlIiwiZW1haWwiOiJtb3JnYW4uY2hlbkBub3J0aHdpbmQuZGV2IiwiZXhwIjoxODI1MTI5NjAwfQ.doc_preview_sig',
});

const wallet = new WalletApi(configuration);

Example request

Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.

const { data: result } = await wallet.withdraw(
  "VEzBMddOYMMhKLv5",
  {
    toAddress: "5399 Beer Springs",
    amount: 344.17,
    network: "circuit hack",
    options: "system synthesize"
  }
);
const { data: result } = await wallet.withdraw(
  "VEzBMddOYMMhKLv5",
  {
    toAddress: "5399 Beer Springs",
    amount: 344.17,
    network: "circuit hack",
    options: "system synthesize"
  }
);

Playground

live

Test this endpoint with your own credentials. Your requests will be sent to the live API.

Use the auth endpoints to obtain a JWT.

No Request Yet

Send a request to see the full inspector

Authentication

Requires JWT
Note
Include your JWT in the Authorization: Bearer YOUR_TOKEN header (user-facing apps, RBAC). View authentication guide →

Path Parameters

NameTypeRequiredDescription
walletIdstringYes

Request Body

json
{
  "toAddress": "739 Rodrigo Gateway",
  "amount": 69.62,
  "network": "program generate",
  "options": {}
}
{
  "toAddress": "739 Rodrigo Gateway",
  "amount": 69.62,
  "network": "program generate",
  "options": {}
}

Responses

200Semi-transaction ready; broadcast via POST /api/wallet/non-custodial/broadcast
json
{
  "success": true,
  "message": "Semi-transaction ready. Broadcast it via POST /api/wallet/non-custodial/broadcast with body: { chain, signedTx, fromAddress }.",
  "data": {
    "transactionId": "65a1b2c3d4e5f6789012345b",
    "status": "ready_to_broadcast",
    "signedTx": "0x02f8...",
    "chain": "ethereum",
    "fromAddress": "0x1234567890abcdef...",
    "currency": "ETH",
    "amount": 0.1,
    "toAddress": "0xabcdef1234567890...",
    "message": "Semi-transaction ready. Broadcast via POST /api/wallet/non-custodial/broadcast with body: { chain, signedTx, fromAddress }. Ensure the address is registered for your organization."
  }
}
{
  "success": true,
  "message": "Semi-transaction ready. Broadcast it via POST /api/wallet/non-custodial/broadcast with body: { chain, signedTx, fromAddress }.",
  "data": {
    "transactionId": "65a1b2c3d4e5f6789012345b",
    "status": "ready_to_broadcast",
    "signedTx": "0x02f8...",
    "chain": "ethereum",
    "fromAddress": "0x1234567890abcdef...",
    "currency": "ETH",
    "amount": 0.1,
    "toAddress": "0xabcdef1234567890...",
    "message": "Semi-transaction ready. Broadcast via POST /api/wallet/non-custodial/broadcast with body: { chain, signedTx, fromAddress }. Ensure the address is registered for your organization."
  }
}
400
401
403
500

Errors

CodeMeaning
400
401
403
500
Edit this page on GitHub