Loading...
Loading...
Supply, borrow, and manage positions on Kamino Lend — the leading Solana lending protocol
npx skill4agent add okx/plugin-store kamino-lendRun once per session before first use. These checks ensure required tools are installed.
# 1. Install onchainos CLI
onchainos --version 2>/dev/null || curl -fsSL https://raw.githubusercontent.com/okx/onchainos-skills/main/install.sh | sh
# 2. Install onchainos skills (enables AI agent to use onchainos commands)
npx skills add okx/onchainos-skills --yes --global
# 3. Install plugin-store skills (enables plugin discovery and management)
npx skills add okx/plugin-store --skill plugin-store --yes --globalif ! command -v kamino-lend >/dev/null 2>&1; then
OS=$(uname -s | tr A-Z a-z)
ARCH=$(uname -m)
EXT=""
case "${OS}_${ARCH}" in
darwin_arm64) TARGET="aarch64-apple-darwin" ;;
darwin_x86_64) TARGET="x86_64-apple-darwin" ;;
linux_x86_64) TARGET="x86_64-unknown-linux-gnu" ;;
linux_aarch64) TARGET="aarch64-unknown-linux-gnu" ;;
linux_i686) TARGET="i686-unknown-linux-gnu" ;;
linux_armv7l) TARGET="armv7-unknown-linux-gnueabihf" ;;
mingw*_x86_64|msys*_x86_64|cygwin*_x86_64) TARGET="x86_64-pc-windows-msvc"; EXT=".exe" ;;
mingw*_i686|msys*_i686|cygwin*_i686) TARGET="i686-pc-windows-msvc"; EXT=".exe" ;;
mingw*_aarch64|msys*_aarch64|cygwin*_aarch64) TARGET="aarch64-pc-windows-msvc"; EXT=".exe" ;;
esac
mkdir -p ~/.local/bin
curl -fsSL "https://github.com/okx/plugin-store/releases/download/plugins/kamino-lend@0.1.0/kamino-lend-${TARGET}${EXT}" -o ~/.local/bin/kamino-lend${EXT}
chmod +x ~/.local/bin/kamino-lend${EXT}
fiREPORT_FLAG="$HOME/.plugin-store/reported/kamino-lend"
if [ ! -f "$REPORT_FLAG" ]; then
mkdir -p "$HOME/.plugin-store/reported"
# Device fingerprint → SHA256 → 32-char device ID
DEV_RAW="$(hostname):$(uname -s):$(uname -m):$HOME"
DEV_ID=$(echo -n "$DEV_RAW" | shasum -a 256 | head -c 32)
# HMAC signature (obfuscated key, same as CLI binary)
_K=$(echo 'OE9nNWFRUFdfSVJkektrMExOV2RNeTIzV2JibXo3ZWNTbExJUDFIWnVoZw==' | base64 -d 2>/dev/null || echo 'OE9nNWFRUFdfSVJkektrMExOV2RNeTIzV2JibXo3ZWNTbExJUDFIWnVoZw==' | openssl base64 -d)
HMAC_SIG=$(echo -n "${_K}${DEV_ID}" | shasum -a 256 | head -c 8)
DIV_ID="${DEV_ID}${HMAC_SIG}"
unset _K
# Report to Vercel stats
curl -s -X POST "https://plugin-store-dun.vercel.app/install" \
-H "Content-Type: application/json" \
-d '{"name":"kamino-lend","version":"0.1.0"}' >/dev/null 2>&1 || true
# Report to OKX API (with HMAC-signed device token)
curl -s -X POST "https://www.okx.com/priapi/v1/wallet/plugins/download/report" \
-H "Content-Type: application/json" \
-d '{"pluginName":"kamino-lend","divId":"'"$DIV_ID"'"}' >/dev/null 2>&1 || true
touch "$REPORT_FLAG"
fionchainos wallet contract-callkamino-lendonchainosonchainos wallet balance --chain 501Write operations require: Run the command first without--confirmto preview the transaction details. Add--confirmto broadcast.--confirm
kamino-lend markets
kamino-lend markets --name "main"kamino-lend positions
kamino-lend positions --wallet <WALLET_ADDRESS>kamino-lend supply --token USDC --amount 0.01
kamino-lend supply --token SOL --amount 0.001
kamino-lend supply --token USDC --amount 0.01 --dry-run--token--amount--dry-run--wallet--marketonchainos wallet contract-call --chain 501 --unsigned-tx <base58_tx> --forcekamino-lend withdraw --token USDC --amount 0.01
kamino-lend withdraw --token SOL --amount 0.001
kamino-lend withdraw --token USDC --amount 0.01 --dry-runsupplyonchainos wallet contract-callkamino-lend borrow --token SOL --amount 0.001 --dry-run
kamino-lend borrow --token USDC --amount 0.01 --dry-run--dry-run--dry-runkamino-lend repay --token SOL --amount 0.001 --dry-run
kamino-lend repay --token USDC --amount 0.01 --dry-run| Error | Meaning | Action |
|---|---|---|
| No prior deposits | Supply first to create obligation |
| API returned invalid tx | Retry; the API transaction may have expired |
| Not logged in to onchainos | Run |
| Unsupported token symbol | Use USDC or SOL, or pass reserve address directly |
--confirm