Wallet

The Wallet API allows you to manage blockchain wallets associated with your IPTO account. This guide covers listing, adding, and managing wallets across different networks.

List Wallets

Retrieve all wallets associated with your account.

curl -X GET https://api.ipto.ai/wallet \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

{
  "wallets": [
    {
      "wallet_address": "0x123...",
      "network": "solana",
      "label": "Primary Wallet",
      "is_primary": true,
      "id": 1,
      "user_id": 123,
      "last_used": "2024-03-21T10:00:00Z",
      "created_at": "2024-03-21T10:00:00Z",
      "updated_at": "2024-03-21T10:00:00Z"
    }
  ]
}

List Supported Networks

Get a list of all supported blockchain networks.

curl -X GET https://api.ipto.ai/wallet/networks

Response

{
  "networks": ["solana", "ethereum", "bitcoin"]
}

List Network Wallets

Retrieve all wallets for a specific network.

curl -X GET https://api.ipto.ai/wallet/solana \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Add Wallet

Add a new wallet for a specific network.

curl -X POST https://api.ipto.ai/wallet/solana \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "wallet_address": "0x123...",
    "network": "solana",
    "label": "Trading Wallet",
    "is_primary": false,
    "signature": "0xabc..."
  }'

Request Parameters

ParameterTypeRequiredDescription
wallet_addressStringYesBlockchain wallet address
networkStringYesNetwork type (solana/ethereum/bitcoin)
labelStringNoCustom label for the wallet
is_primaryBooleanNoWhether this is the primary wallet
signatureStringYesSigned message for verification

Response

{
  "wallet_address": "0x123...",
  "network": "solana",
  "label": "Trading Wallet",
  "is_primary": false,
  "id": 2,
  "user_id": 123,
  "last_used": "2024-03-21T10:00:00Z",
  "created_at": "2024-03-21T10:00:00Z",
  "updated_at": "2024-03-21T10:00:00Z"
}

Get Wallet Status

Check the status of a specific wallet.

curl -X GET https://api.ipto.ai/wallet/solana/0x123... \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Delete Wallet

Remove a wallet from your account.

curl -X DELETE https://api.ipto.ai/wallet/solana/0x123... \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Supported Networks

NetworkDescriptionAddress Format
solanaSolana blockchainBase58 encoded
ethereumEthereum blockchain0x prefixed hex
bitcoinBitcoin blockchainBase58 encoded

Wallet Verification

To add a wallet, you need to:

  1. Sign a message with your wallet
  2. Provide the signature
  3. Verify ownership

Example message to sign:

Sign this message to verify wallet ownership for IPTO: {timestamp}

Error Responses

Invalid Network

{
  "detail": "Unsupported network type"
}

Invalid Address

{
  "detail": "Invalid wallet address format"
}

Verification Failed

{
  "detail": "Wallet verification failed"
}

Best Practices

  1. Use descriptive labels for wallets
  2. Keep your primary wallet secure
  3. Verify wallet addresses carefully
  4. Monitor wallet activity
  5. Use different wallets for different purposes

Security Considerations

  1. Never share private keys
  2. Use hardware wallets when possible
  3. Enable 2FA for wallet operations
  4. Monitor for unauthorized changes
  5. Keep wallet software updated