Skip to content

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.

A wallet is added to the allowlist by redeeming a referral code against it:

POST https://app.hobba.io/api/referral/redeem
Terminal window
curl -X POST https://app.hobba.io/api/referral/redeem \
-H "Content-Type: application/json" \
-d '{"code":"BORROW-BETTER-ABCDEFGH","wallet":"4hESJmbpPnDNsSTir9equNja6vRdPrsxCJxHvA7WsBeR"}'
FieldDescription
codeA valid Hobba referral code. Ask the Hobba team for one.
walletThe Solana wallet address (base58) to allowlist.

The code BORROW-BETTER-ABCDEFGH above 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.

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.