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.
/api/wallet/{walletId}/withdrawSDK 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
liveTest this endpoint with your own credentials. Your requests will be sent to the live API.
No Request Yet
Send a request to see the full inspector
Authentication
Authorization: Bearer YOUR_TOKEN header (user-facing apps, RBAC). View authentication guide →Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
walletId | string | Yes | — |
Request Body
{
"toAddress": "739 Rodrigo Gateway",
"amount": 69.62,
"network": "program generate",
"options": {}
}{
"toAddress": "739 Rodrigo Gateway",
"amount": 69.62,
"network": "program generate",
"options": {}
}Responses
{
"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."
}
}Errors
| Code | Meaning |
|---|---|
400 | — |
401 | — |
403 | — |
500 | — |