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
Parameter | Type | Required | Description |
---|---|---|---|
wallet_address | String | Yes | Blockchain wallet address |
network | String | Yes | Network type (solana/ethereum/bitcoin) |
label | String | No | Custom label for the wallet |
is_primary | Boolean | No | Whether this is the primary wallet |
signature | String | Yes | Signed 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
Network | Description | Address Format |
---|---|---|
solana | Solana blockchain | Base58 encoded |
ethereum | Ethereum blockchain | 0x prefixed hex |
bitcoin | Bitcoin blockchain | Base58 encoded |
Wallet Verification
To add a wallet, you need to:
- Sign a message with your wallet
- Provide the signature
- 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
- Use descriptive labels for wallets
- Keep your primary wallet secure
- Verify wallet addresses carefully
- Monitor wallet activity
- Use different wallets for different purposes
Security Considerations
- Never share private keys
- Use hardware wallets when possible
- Enable 2FA for wallet operations
- Monitor for unauthorized changes
- Keep wallet software updated