Smart Balance

Get smart balance for a wallet address

get
Query parameters
walletAddressanyOptionalExample: 0x123...
Responses
200
Balance retrieved successfully
application/json
get
GET /v3/smartbalance/getbalance HTTP/1.1
Host: 
Accept: */*
{
  "netBalance": "100.50",
  "balances": {
    "10": "50.25",
    "42161": "50.25"
  }
}

Get a quote for converting smart balance between networks

post
Body
anyOptional
Responses
200
Quote generated successfully
application/json
post
POST /v3/smartbalance/getquote HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 94

{
  "walletAddress": "0x123...",
  "outputNetwork": 42161,
  "amount": "50.00",
  "type": "debit",
  "limit": 100
}
{
  "quote": {
    "amount": "50.00",
    "fee": "0.50",
    "total": "50.50"
  }
}

Compute solution for smart balance withdrawal

post
Body
anyOptional
Responses
200
Solution computed successfully
application/json
post
POST /v3/smartbalance/computesolution HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 82

{
  "walletAddress": "0x123...",
  "amount": "50.00",
  "type": "debit",
  "outputNetwork": 42161
}
{
  "withdrawalPlan": {
    "network": 42161,
    "amount": "50.00"
  },
  "tokenToClaim": {
    "address": "0x123...",
    "amount": "50.00"
  },
  "transactions": {
    "claim": {
      "encodedData": "0x...",
      "targetContractAddress": "0x..."
    },
    "withdrawal": {
      "encodedData": "0x...",
      "targetContractAddress": "0x..."
    }
  },
  "signatures": {
    "paymaster": "0x...",
    "withdrawal": "0x..."
  }
}

Last updated