Lend and borrow XPOW & APOW tokens; see also xpowermine.com! ⛏️⚡️
⚒️ Install dependencies: requires deno v2.0.0-rc.10
(or higher)
deno run install
🏁 Build banq
distributables: for Linux, macOS and Windows (64 bit)
deno run build-banq
💾 Copy banq.x86_64-*.run
(or *.exe
) to an installation folder:
[sudo] cp ./dist/banq.x86_64-linux.run /usr/local/bin/banq
🏦 Mark banq
as an executable: on Linux (et al.)
[sudo] chmod +x /usr/local/bin/banq
🔑 Define the private-key of your user account: optional
export PRIVATE_KEY=0x... # required -- unless the Ledger HW is used
🌐 Define the URL of an Avalanche RPC provider: optional
export PROVIDER_URL=https://api.avax.network/ext/bc/C/rpc # default
🏦 Invoke the banq
command-line interface:
banq --help
banq <command> <argument(s)> [--option(s)]
💸 Supply APOW
tokens: into pool=1
banq supply 1.0 APOW [--pool=1] [-Y|--broadcast]
💳 Borrow XPOW
tokens: from pool=1
banq borrow 1.0 XPOW [--pool=1] [-Y|--broadcast]
🤑 Settle XPOW
tokens: into pool=1
banq settle 1.0 XPOW [--pool=1] [-Y|--broadcast]
💰 Redeem APOW
tokens: from pool=1
banq redeem 1.0 APOW [--pool=1] [-Y|--broadcast]
🏥 Health of $USER
's positions: in pool=1
banq health-of $USER [--pool=1] [-Y|--broadcast] # USER=0x..
💦 Liquidate $USER
's positions: in pool=1
banq liquidate $USER [--pool=1] [-Y|--broadcast] # USER=0x..
🔃 Refresh XPOW/APOW
feed: for oracle=UNUS
banq refresh XPOW APOW [--oracle=UNUS] [-Y|--broadcast] # permissioned?
⏳ Retwap XPOW/APOW
feed: for oracle=UNUS
banq retwap XPOW APOW [--oracle=UNUS] [-Y|--broadcast] # permissioned!
📈 Supply and borrow rate(s) of XPOW
: in pool=1
at (±) index
banq rates-of XPOW [--pool=1] [-@|--at=now] [-Y|--broadcast]
📉 Supply and borrow rate(s) of APOW
: in pool=1
incl. history
banq rates-of APOW [--pool=1] [-@|--at=all] [-Y|--broadcast]
cp .env-avalanche-main .env # or: cp .env-avalanche-test .env
deno run -A ./cli/banq/banq-main.ts
deno test -A
deno lint
deno fmt
deno help
Using the Ledger hardware wallet works only from within the project, due to limited deno support for native Node modules (like for node-hid
, keccak
or usb
):
git clone https://github.com/blackhan-software/xpower-banq-cli
cd xpower-banq-cli && deno run install
cp .env-avalanche-main .env # or: cp .env-avalanche-test .env
deno run banq --help # including --ledger|-l support!
© 2024 Moorhead LLC
Add Package
deno add jsr:@blackhan/xpower-banq-cli
Import symbol
import * as xpower_banq_cli from "@blackhan/xpower-banq-cli";
---- OR ----
Import directly with a jsr specifier
import * as xpower_banq_cli from "jsr:@blackhan/xpower-banq-cli";
Add Package
npx jsr add @blackhan/xpower-banq-cli
Import symbol
import * as xpower_banq_cli from "@blackhan/xpower-banq-cli";
Add Package
yarn dlx jsr add @blackhan/xpower-banq-cli
Import symbol
import * as xpower_banq_cli from "@blackhan/xpower-banq-cli";
Add Package
pnpm dlx jsr add @blackhan/xpower-banq-cli
Import symbol
import * as xpower_banq_cli from "@blackhan/xpower-banq-cli";
Add Package
bunx jsr add @blackhan/xpower-banq-cli
Import symbol
import * as xpower_banq_cli from "@blackhan/xpower-banq-cli";