Skip to main content

Crypto Wallet API (ABSK)

ABSK (AI Blockchain Starter Kit) provides both manual and AI-powered crypto wallet management. Create wallets, manage addresses across multiple chains, and interact using natural language.

Create Crypto Wallet

POST/api/manual/wallets/crypto

Create Crypto Wallet

Create a new crypto wallet for the user with an initial chain address. Each wallet requires a chain_id to be specified during creation.

Parameters

user_idnumberrequired

User ID who owns this wallet

wallet_namestringrequired

Name for the wallet (e.g., 'Trading Wallet', 'DeFi Portfolio')

chain_idstringrequired

Initial blockchain chain ID (sepolia, amoy, neon)

Request Body

{
  "user_id": 123,
  "wallet_name": "My Trading Wallet",
  "chain_id": "sepolia"
}

Response

200Wallet created successfully
{
  "success": true,
  "message": "Crypto wallet created successfully",
  "data": {
    "bw_id": 456,
    "user_id": 123,
    "wallet_name": "My Trading Wallet",
    "wallet_label": "My Trading Wallet",
    "network": "evm",
    "chain_id": "sepolia",
    "created_at": "2024-01-15T10:30:00Z",
    "addresses": [],
    "address_count": 0,
    "status": "setup_needed"
  },
  "timestamp": "2024-01-15T10:30:00Z"
}
400Invalid request
{
  "success": false,
  "error": {
    "code": "MISSING_FIELDS",
    "message": "chain_id is required"
  }
}
curl -X POST https://api.brdz.link/api/manual/wallets/crypto \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
  "user_id": 123,
  "wallet_name": "My Trading Wallet",
  "chain_id": "sepolia"
}'

Get User Wallets

GET/api/manual/wallets/crypto/{user_id}

Get User Wallets

Retrieve all crypto wallets belonging to a specific user with complete address and token information.

Parameters

user_idnumberrequired

User ID to get wallets for (path parameter)

Response

200Wallets retrieved successfully
{
  "success": true,
  "message": "User wallets retrieved successfully",
  "data": {
    "wallets": [
      {
        "bw_id": 456,
        "user_id": 123,
        "wallet_name": "My Trading Wallet",
        "wallet_label": "My Trading Wallet",
        "network": "evm",
        "is_primary": false,
        "created_at": "2024-01-15T10:30:00Z",
        "addresses": [
          {
            "address_id": 789,
            "wallet_address": "0x742d35Cc6834C0532925a3b8D93b3C3e1DEF3e4D",
            "chain_id": "sepolia",
            "created_at": "2024-01-15T10:30:00Z",
            "asset_count": 2,
            "native_symbol": "ETH",
            "has_assets": true
          }
        ],
        "address_count": 1,
        "active_chains": 1,
        "supported_chains": [
          "sepolia"
        ],
        "total_tokens": 0,
        "total_assets": 2,
        "total_value_usd": 0,
        "status": "active",
        "has_addresses": true
      }
    ],
    "summary": {
      "total_wallets": 1,
      "active_wallets": 1,
      "total_addresses": 1,
      "total_chains": 1
    }
  },
  "timestamp": "2024-01-15T10:30:00Z"
}
curl -X GET https://api.brdz.link/api/manual/wallets/crypto/123 \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "x-api-key: YOUR_API_KEY"

Add Chain Address

POST/api/manual/wallets/crypto/{bw_id}/address

Add Chain Address

Add a blockchain address to an existing wallet. Each wallet can have addresses on multiple chains.

Parameters

bw_idnumberrequired

Wallet ID to add address to (path parameter)

chain_idstringrequired

Blockchain chain ID (sepolia, amoy, neon)

Request Body

{
  "chain_id": "amoy"
}

Response

200Chain address added successfully
{
  "success": true,
  "message": "Chain address for amoy added successfully",
  "data": {
    "address_id": 790,
    "bw_id": 456,
    "wallet_name": "My Trading Wallet",
    "wallet_address": "0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359",
    "chain_id": "amoy",
    "created_at": "2024-01-15T11:45:00Z",
    "mnemonic": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about",
    "native_symbol": "POL"
  },
  "security_note": "Please backup your mnemonic phrase securely. It will not be shown again.",
  "timestamp": "2024-01-15T11:45:00Z"
}
409Chain already exists
{
  "success": false,
  "error": {
    "code": "CHAIN_EXISTS",
    "message": "Chain amoy already exists for this wallet"
  }
}
curl -X POST https://api.brdz.link/api/manual/wallets/crypto/456/address \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"chain_id": "amoy"}'

Get Wallet Addresses

GET/api/manual/wallets/crypto/{bw_id}/addresses

Get Wallet Addresses

Get all blockchain addresses for a specific wallet with asset information.

Parameters

bw_idnumberrequired

Wallet ID to get addresses for (path parameter)

Response

200Addresses retrieved successfully
{
  "success": true,
  "message": "Wallet addresses retrieved successfully",
  "data": {
    "wallet_id": 456,
    "addresses": [
      {
        "address_id": 789,
        "bw_id": 456,
        "wallet_address": "0x742d35Cc6834C0532925a3b8D93b3C3e1DEF3e4D",
        "chain_id": "sepolia",
        "wallet_name": "My Trading Wallet",
        "wallet_label": "My Trading Wallet",
        "asset_count": 2,
        "created_at": "2024-01-15T10:30:00Z",
        "native_symbol": "ETH",
        "has_assets": true
      },
      {
        "address_id": 790,
        "bw_id": 456,
        "wallet_address": "0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359",
        "chain_id": "amoy",
        "wallet_name": "My Trading Wallet",
        "wallet_label": "My Trading Wallet",
        "asset_count": 1,
        "created_at": "2024-01-15T11:45:00Z",
        "native_symbol": "POL",
        "has_assets": true
      }
    ],
    "chain_groups": {
      "sepolia": [
        {
          "address_id": 789,
          "wallet_address": "0x742d35Cc6834C0532925a3b8D93b3C3e1DEF3e4D",
          "asset_count": 2
        }
      ],
      "amoy": [
        {
          "address_id": 790,
          "wallet_address": "0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359",
          "asset_count": 1
        }
      ]
    },
    "total_addresses": 2,
    "supported_chains": [
      "sepolia",
      "amoy"
    ],
    "total_assets": 3
  },
  "timestamp": "2024-01-15T11:45:00Z"
}
curl -X GET https://api.brdz.link/api/manual/wallets/crypto/456/addresses \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "x-api-key: YOUR_API_KEY"

AI-Powered Wallet Operations

POST/api/agent/wallets/process

AI Wallet Operations

Process wallet operations using natural language. The AI agent can create wallets, check balances, add chains, and more through conversational interface.

Parameters

user_inputstringrequired

Natural language instruction for the AI agent

user_idnumberrequired

User ID for the operation

contextobject

Optional context for conversation continuity

Request Body

{
  "user_input": "Create a new wallet called 'DeFi Trading' and add Sepolia chain",
  "user_id": 123,
  "context": {}
}

Response

200AI operation completed successfully
{
  "success": true,
  "agent_response": {
    "user_input": "Create a new wallet called 'DeFi Trading' and add Sepolia chain",
    "ai_response": "I've successfully created your wallet 'DeFi Trading' with Sepolia chain support. Your new wallet ID is 789 and the Sepolia address is 0x742d35Cc6834C0532925a3b8D93b3C3e1DEF3e4D.",
    "message": "I've successfully created your wallet 'DeFi Trading' with Sepolia chain support.",
    "intent_type": "create_wallet_with_chain",
    "completed": true,
    "cancelled": false,
    "requires_onboarding": false,
    "requires_input": false,
    "missing_parameter": null,
    "available_options": null,
    "suggested_actions": null,
    "data": {
      "wallet": {
        "bw_id": 789,
        "wallet_name": "DeFi Trading",
        "user_id": 123,
        "chain_id": "sepolia"
      },
      "address": {
        "chain_id": "sepolia",
        "wallet_address": "0x742d35Cc6834C0532925a3b8D93b3C3e1DEF3e4D"
      }
    },
    "execution_result": {
      "data": {
        "wallet_created": true,
        "address_added": true
      }
    },
    "conversation_state": {
      "onboarding_required": false,
      "input_required": false,
      "completed": true,
      "cancelled": false,
      "has_data": true
    }
  },
  "timestamp": "2024-01-15T10:30:00Z"
}
206Partial completion - requires more input
{
  "success": true,
  "agent_response": {
    "user_input": "Send USDC to my friend",
    "ai_response": "I can help you send USDC. Which wallet would you like to send from, and what's your friend's wallet address?",
    "message": "I need more information to complete this transaction.",
    "intent_type": "send_transaction",
    "completed": false,
    "requires_input": true,
    "missing_parameter": "wallet_selection",
    "available_options": [
      "Trading Wallet",
      "DeFi Portfolio"
    ],
    "conversation_state": {
      "input_required": true,
      "completed": false
    }
  }
}
curl -X POST https://api.brdz.link/api/agent/wallets/process \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
  "user_input": "Create a new wallet called DeFi Trading and add Sepolia chain",
  "user_id": 123,
  "context": {}
}'

Delete Wallet

POST/api/manual/wallets/crypto/{bw_id}/delete

Delete Wallet

Permanently delete a crypto wallet and all its addresses. This action cannot be undone.

Parameters

bw_idnumberrequired

Wallet ID to delete (path parameter)

confirmationstringrequired

Must be exactly 'delete' to confirm deletion

user_idnumberrequired

User ID for verification

Request Body

{
  "confirmation": "delete",
  "user_id": 123
}

Response

200Wallet deleted successfully
{
  "success": true,
  "message": "Wallet and all associated addresses deleted successfully",
  "data": {
    "deleted_wallet": {
      "bw_id": 456,
      "wallet_name": "Old Wallet",
      "wallet_label": "Old Wallet",
      "user_id": 123
    }
  },
  "timestamp": "2024-01-15T12:00:00Z"
}
400Invalid confirmation
{
  "success": false,
  "error": {
    "code": "CONFIRMATION_REQUIRED",
    "message": "Please provide confirmation: \"delete\" to proceed with wallet deletion",
    "received_confirmation": "remove"
  }
}
curl -X POST https://api.brdz.link/api/manual/wallets/crypto/456/delete \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
  "confirmation": "delete",
  "user_id": 123
}'

Import Token

POST/api/tokens/import

Import Token

Import a custom token to all user wallets on a specific chain using the contract address.

Parameters

chain_idstringrequired

Blockchain chain ID (sepolia, amoy, neon)

asset_issuerstringrequired

Token contract address

user_idnumber

User ID (optional if provided via auth middleware)

Request Body

{
  "chain_id": "sepolia",
  "asset_issuer": "0x9BF350fBaaA8c7200990B051809334c90778f435"
}

Response

200Token imported successfully
{
  "success": true,
  "message": "Token imported successfully to 2 wallet(s) on sepolia chain",
  "data": {
    "asset_ids": [
      123,
      124
    ],
    "user_id": 123,
    "chain_id": "sepolia",
    "token_address": "0x9BF350fBaaA8c7200990B051809334c90778f435",
    "token_info": {
      "symbol": "USDC",
      "name": "USD Coin",
      "decimals": 6
    },
    "imported_to_wallets": 2,
    "wallet_details": [
      {
        "bw_id": 456,
        "wallet_name": "Trading Wallet",
        "asset_id": 123
      },
      {
        "bw_id": 789,
        "wallet_name": "DeFi Portfolio",
        "asset_id": 124
      }
    ],
    "imported_at": "2024-01-15T10:30:00Z"
  },
  "timestamp": "2024-01-15T10:30:00Z"
}
409Token already imported
{
  "success": false,
  "error": {
    "code": "TOKEN_ALREADY_EXISTS",
    "message": "Token already imported to wallets on this chain"
  }
}
curl -X POST https://api.brdz.link/api/tokens/import \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
  "chain_id": "sepolia",
  "asset_issuer": "0x9BF350fBaaA8c7200990B051809334c90778f435"
}'

Get Wallet Balance

GET/api/wallets/{wallet_id}/balance

Get Wallet Balance

Get comprehensive balance information for a specific wallet across all its chains.

Parameters

wallet_idnumberrequired

Wallet ID to get balance for (path parameter)

Response

200Wallet balance retrieved successfully
{
  "success": true,
  "message": "Wallet balance retrieved successfully",
  "data": {
    "bw_id": 456,
    "wallet_name": "Trading Wallet",
    "total_value_usd": 150.75,
    "total_addresses": 2,
    "supported_chains": [
      "sepolia",
      "amoy"
    ],
    "chains": {
      "sepolia": {
        "chain_id": "sepolia",
        "wallet_address": "0x742d35Cc6834C0532925a3b8D93b3C3e1DEF3e4D",
        "native_balance": "1.234567890123456789",
        "native_symbol": "ETH",
        "tokens": [
          {
            "symbol": "USDC",
            "balance": "100.50",
            "contract_address": "0x9BF350fBaaA8c7200990B051809334c90778f435",
            "value_usd": 100.5
          }
        ],
        "total_usd": 125.25
      },
      "amoy": {
        "chain_id": "amoy",
        "wallet_address": "0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359",
        "native_balance": "50.0",
        "native_symbol": "POL",
        "tokens": [
          {
            "symbol": "USDC",
            "balance": "25.50",
            "contract_address": "0xC15239B6B9012F3225f9ebC091C7CE85FF31b983",
            "value_usd": 25.5
          }
        ],
        "total_usd": 25.5
      }
    },
    "summary": {
      "total_chains": 2,
      "total_addresses": 2,
      "last_updated": "2024-01-15T10:30:00Z"
    }
  },
  "timestamp": "2024-01-15T10:30:00Z"
}
curl -X GET https://api.brdz.link/api/wallets/456/balance \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "x-api-key: YOUR_API_KEY"

Get Transaction History

GET/api/transactions/{user_id}/history

Get Transaction History

Retrieve user's transaction history with pagination and filtering options.

Parameters

user_idnumberrequired

User ID to get history for (path parameter)

limitnumber

Maximum records to return (1-100, default: 50)

offsetnumber

Records to skip for pagination (default: 0)

Response

200Transaction history retrieved
{
  "success": true,
  "message": "Transaction history retrieved successfully",
  "data": {
    "transactions": [
      {
        "transaction_id": "tx_123456",
        "nonce": "nonce_789012",
        "transaction_type": "crosschain",
        "amount": 50,
        "token": "USDC",
        "from_chain": "sepolia",
        "to_chain": "amoy",
        "recipient_address": "0x742d35Cc6834C0532925a3b8D93b3C3e1DEF3e4D",
        "status": "MINTED",
        "tx_hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
        "mint_tx_hash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
        "created_at": "2024-01-15T10:30:00Z",
        "updated_at": "2024-01-15T10:38:00Z",
        "is_crosschain": true,
        "is_cancellable": false
      }
    ],
    "pagination": {
      "current_page": 1,
      "per_page": 50,
      "offset": 0,
      "total_returned": 1,
      "has_more": false
    },
    "stats": {
      "total_transactions": 15,
      "completed_transactions": 12,
      "pending_transactions": 2,
      "success_rate": 80
    }
  },
  "timestamp": "2024-01-15T10:30:00Z"
}
curl -X GET "https://api.brdz.link/api/transactions/123/history?limit=10&offset=0" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "x-api-key: YOUR_API_KEY"

AI Agent Health Check

GET/api/agent/health

AI Agent Health Check

Check the health and configuration status of the AI agent service.

Response

200AI agent service is operational
{
  "success": true,
  "message": "Agent service is operational",
  "service_status": {
    "database_connection": "active",
    "service_response": "GREETING",
    "environment_checks": {
      "groq_configured": true,
      "usdc_sepolia": true,
      "usdc_amoy": true,
      "usdc_neon": true,
      "rpc_sepolia": true,
      "rpc_amoy": true,
      "rpc_neon": true
    },
    "fully_configured": true
  },
  "timestamp": "2024-01-15T10:30:00Z"
}
503AI agent service unavailable
{
  "success": false,
  "message": "Agent service has configuration issues",
  "service_status": {
    "database_connection": "active",
    "service_response": "error",
    "environment_checks": {
      "groq_configured": false,
      "usdc_sepolia": true,
      "usdc_amoy": true,
      "usdc_neon": false,
      "rpc_sepolia": true,
      "rpc_amoy": true,
      "rpc_neon": false
    },
    "fully_configured": false
  },
  "timestamp": "2024-01-15T10:30:00Z"
}
curl -X GET https://api.brdz.link/api/agent/health \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "x-api-key: YOUR_API_KEY"

Clear AI Conversation Sessions

DELETE/api/agent/sessions/{user_id}

Clear AI Conversation Sessions

Clear all conversation sessions for a specific user to reset the AI agent's memory.

Parameters

user_idnumberrequired

User ID to clear sessions for (path parameter)

Response

200Sessions cleared successfully
{
  "success": true,
  "message": "Conversation sessions cleared successfully",
  "data": {
    "user_id": 123,
    "cleared_count": 3
  },
  "timestamp": "2024-01-15T10:30:00Z"
}
403Access denied
{
  "success": false,
  "error": {
    "code": "ACCESS_DENIED",
    "message": "You can only clear your own conversation sessions"
  }
}
curl -X DELETE https://api.brdz.link/api/agent/sessions/123 \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "x-api-key: YOUR_API_KEY"

Supported Chains

ABSK currently supports these blockchain networks:

Chain IDNetworkNative TokenUSDC ContractStatus
sepoliaSepolia TestnetETH0x9BF350fBaaA8c7200990B051809334c90778f435✅ Active
amoyPolygon AmoyPOL0xC15239B6B9012F3225f9ebC091C7CE85FF31b983✅ Active
neonNeon EVMNEON0xB5234C0418402775bCA3f73c4B0B5bDd906FCA11✅ Active

AI Agent Capabilities

The AI agent can handle these natural language commands:

  • Create wallets: "Create a wallet called Trading Portfolio with Sepolia chain"
  • Add chains: "Add Polygon to my DeFi wallet"
  • Check balances: "Show me my USDC balance on all chains"
  • Send transactions: "Send 10 USDC to 0x123... from my trading wallet"
  • Get history: "Show me my recent transactions"
  • Manage tokens: "Import the USDC token on Sepolia"
  • Wallet management: "Delete my old testing wallet"

Response Status Codes

The AI agent returns different HTTP status codes based on the conversation state:

Status CodeDescriptionAgent State
200Success - Operation completedcompleted: true
202Accepted - Requires onboardingrequires_onboarding: true
206Partial Content - Needs more inputrequires_input: true

AI-First Approach

Use the AI agent endpoint for complex operations. It can handle multi-step workflows and provide natural language feedback.

Security Notice
  • Private keys are encrypted and stored securely
  • Mnemonic phrases are shown only once during address creation
  • Always verify transaction details before confirming
  • Use different wallets for different purposes
Supported Tokens
  • Native tokens: ETH, POL, NEON
  • USDC: Available on all supported chains
  • Custom tokens: Import via contract address using /tokens/import
Complete Network Details

For comprehensive network configurations, RPC URLs, explorers, and additional chain information, see the USDC and Chains Guide.