Wallet Management API
Overview
Endpoints for creating and managing different types of blockchain wallets.
Create Wallet
Create a new wallet with specified type and network.
POST api.bloclabs.com/v1/wallets/create
Request
{
"type": "mpc", // "mpc", "hd", "imported"
"network": "ethereum", // "ethereum", "polygon", "binance"
"label": "Trading Wallet", // Optional wallet label
"environment": "mainnet" // "mainnet", "testnet"
}
Response
{
"status": "success",
"data": {
"wallet_id": "wallet_xyz123",
"address": "0x123...abc",
"type": "mpc",
"network": "ethereum",
"label": "Trading Wallet",
"created_at": "2024-03-15T10:00:00Z"
}
}
Add Watch Wallet
Add a watch-only wallet for monitoring addresses.
POST api.bloclabs.com/v1/wallets/watch
Request
{
"address": "0x789...def",
"network": "ethereum",
"label": "Investment Tracker",
"notifications": {
"large_transfers": true,
"incoming_transactions": true
}
}
Response
{
"status": "success",
"data": {
"wallet_id": "watch_abc456",
"address": "0x789...def",
"type": "watch",
"network": "ethereum",
"label": "Investment Tracker"
}
}
Get User Wallets
Retrieve all wallets associated with the user.
GET api.bloclabs.com/v1/wallets
Query Parameters
{
"network": "ethereum", // Optional: Filter by network
"type": "mpc", // Optional: Filter by wallet type
"limit": 10, // Optional: Number of results (default: 10)
"offset": 0 // Optional: Pagination offset (default: 0)
}
Response
{
"status": "success",
"data": {
"wallets": [
{
"wallet_id": "wallet_xyz123",
"address": "0x123...abc",
"type": "mpc",
"network": "ethereum",
"label": "Trading Wallet",
"balance": "1.5 ETH"
}
],
"pagination": {
"total": 5,
"limit": 10,
"offset": 0
}
}
}
Get Wallet Details
Retrieve detailed information about a specific wallet.
GET api.bloclabs.com/v1/wallets/{wallet_id}
Response
{
"status": "success",
"data": {
"wallet_id": "wallet_xyz123",
"address": "0x123...abc",
"type": "mpc",
"network": "ethereum",
"label": "Trading Wallet",
"balance": "1.5 ETH",
"created_at": "2024-03-15T10:00:00Z",
"last_activity": "2024-03-15T15:30:00Z",
"status": "active",
"security": {
"requires_2fa": true,
"biometric_enabled": true
}
}
}
Delete Wallet
Remove a wallet from your account.
DELETE api.bloclabs.com/v1/wallets/{wallet_id}
Request
{
"confirmation": true,
"delete_reason": "no longer needed" // Optional
}
Response
{
"status": "success",
"message": "Wallet successfully deleted",
"data": {
"wallet_id": "wallet_xyz123",
"deleted_at": "2024-03-15T16:00:00Z"
}
}
Error Responses
Invalid Request
{
"status": "error",
"message": "Invalid request parameters",
"errors": [
{
"field": "network",
"message": "Unsupported network specified"
}
]
}
Wallet Not Found
{
"status": "error",
"message": "Wallet not found",
"code": "WALLET_NOT_FOUND"
}
Authorization Error
{
"status": "error",
"message": "Unauthorized access",
"code": "UNAUTHORIZED"
}
Notes
All requests require authentication via Bearer token
Rate limits apply to all endpoints
Wallet IDs are unique and immutable
Watch wallets can't perform transactions
Last updated