Prerequisites
Before you integrate - with the widget or the SDK - there’s one requirement to know about: a wallet must be allowlisted before it can deposit or borrow through Hobba.
This is a one-time, per-wallet step. Until a wallet is on the allowlist,
transactions from that wallet won’t go through: the deposit/borrow widget
loads but its transactions fail, and the SDK surfaces the NOT_ALLOWLISTED
error code. Read-only surfaces (the market-data widget, the SDK’s position
and quote reads) have no such requirement.
Allowlisting a wallet
Section titled “Allowlisting a wallet”A wallet is added to the allowlist by redeeming a referral code against it:
POST https://app.hobba.io/api/referral/redeemcurl -X POST https://app.hobba.io/api/referral/redeem \ -H "Content-Type: application/json" \ -d '{"code":"BORROW-BETTER-ABCDEFGH","wallet":"4hESJmbpPnDNsSTir9equNja6vRdPrsxCJxHvA7WsBeR"}'| Field | Description |
|---|---|
code | A valid Hobba referral code. Ask the Hobba team for one. |
wallet | The Solana wallet address (base58) to allowlist. |
The code
BORROW-BETTER-ABCDEFGHabove is a placeholder. Reach out to the Hobba team to get a valid referral code for your integration.
Once redeemed, the wallet is allowlisted and can immediately deposit and borrow through the widget - no further setup needed.
Where this fits
Section titled “Where this fits”You can allowlist wallets however suits your integration - for example:
- Call the endpoint from your own backend as part of your user onboarding.
- Have users redeem a code before they reach the widget.
After a wallet is allowlisted, follow the Quick start to embed the widget and connect that wallet.