@kamino-finance/bron-kbl-sdk
v0.2.0
Published
Shared TypeScript SDK for Kamino's kbl integration with Bron: the kbl transfer hook's client and ledger reads, and Bron's blToken codec and contract reads.
Readme
@kamino-finance/bron-kbl-sdk
Shared TypeScript SDK for Kamino's kbl integration with Bron: the kbl transfer hook's client and ledger reads, and Bron's blToken codec and contract reads. Used by the Bron solver, the klend liquidator and the kbl watchdog.
Two entry points: @kamino-finance/bron-kbl-sdk is everything and needs the ethers peer; @kamino-finance/bron-kbl-sdk/hook is the hook half alone (the client, the PDAs, the ledger and mint reads, a transfer's hook accounts) and needs only @solana/kit.
The reads here are the ones the solver and the liquidator make: each Solana read answers with a value and drops the slot its response was read at, and each Bron read takes or keeps a block. The watchdog's reads, which keep that slot, are added with the watchdog.
Development
bun install
bun run codegen
bun run lint
bunx tsc --noEmit && bunx tsc --noEmit -p tests
bun run test
bun run buildbun run codegen regenerates the hook client and the Bron contracts under src/*/@codegen from src/hook/idl and src/bron/abi; run it after changing either, and commit the output.
