Skip to content
docs

KaminoMarketProtocolSolana

Defined in: protocol-lending-kamino-solana/src/market.ts:67

A Kamino Lend market as a LendingProtocol: supply deposits a reserve’s token as collateral on the wallet’s obligation, withdraw takes it back, borrow / repay take and return a reserve’s liquidity against it.

Tokens are named by mint. The first deposit creates the obligation (plus user metadata and a per-user lookup table) and costs their rent, which the guard allows once; every transaction is proven before signing: only the instructions the operation takes, on the wallet’s vanilla obligation, the resolved reserve and the wallet’s own token account. The reserve is checked on chain, and ‘max’ amounts and the first-deposit allowance come from the obligation’s on-chain state.

new KaminoMarketProtocolSolana(account, config?): KaminoMarketProtocolSolana

Defined in: protocol-lending-kamino-solana/src/market.ts:72

IWalletAccountReadOnly | IWalletAccount

KaminoMarketConfig = {}

KaminoMarketProtocolSolana

KaminoBase.constructor

protected readonly _account: IWalletAccountReadOnly | IWalletAccount

Defined in: core/dist/index-QWdcwE6y.d.ts:309

KaminoBase._account


protected readonly _config: KaminoMarketConfig

Defined in: core/dist/index-QWdcwE6y.d.ts:310

KaminoBase._config


readonly api: KaminoApi

Defined in: protocol-lending-kamino-solana/src/base.ts:72

KaminoBase.api


readonly market: string

Defined in: protocol-lending-kamino-solana/src/market.ts:68


protected readonly rentAllowance: bigint

Defined in: protocol-lending-kamino-solana/src/base.ts:74

KaminoBase.rentAllowance


protected readonly slippageBps: number

Defined in: protocol-lending-kamino-solana/src/base.ts:73

KaminoBase.slippageBps

borrow(o): Promise<LendingResult>

Defined in: protocol-lending-kamino-solana/src/market.ts:241

Borrow against collateral.

BorrowOptions

Promise<LendingResult>

KaminoBase.borrow


protected decimals(mint): Promise<number>

Defined in: protocol-lending-kamino-solana/src/base.ts:104

Mint decimals: the account reads the mint when it can; well-known mints need no RPC.

string

Promise<number>

KaminoBase.decimals


describeActivity(_tx, _ctx): ActivityItem | null

Defined in: core/dist/index-QWdcwE6y.d.ts:320

Recognize one of this protocol’s own transactions in an address’s history and describe it for the wallet’s activity feed (“Supplied 100 USDC · Aave v3”). Return null when the transaction is not this protocol’s: the kit then asks the next module and finally falls back to send / receive / approve / contract call. Must be pure and synchronous: no network, no account state. The conformance suite feeds every module its recorded fixtures through this method.

ChainTx

DescribeActivityContext

ActivityItem | null

KaminoBase.describeActivity


getMarket(): Promise<MarketInfo>

Defined in: protocol-lending-kamino-solana/src/market.ts:91

The market’s config entry plus its reserves.

Promise<MarketInfo>


getPosition(): Promise<MarketPosition>

Defined in: protocol-lending-kamino-solana/src/market.ts:115

Obligations and per-mint totals.

Promise<MarketPosition>


getReserves(): Promise<ReserveInfo[]>

Defined in: protocol-lending-kamino-solana/src/market.ts:80

Reserves with rates, cached for a minute.

Promise<ReserveInfo[]>


protected guard(expect, instructions): SerializedGuard

Defined in: protocol-lending-kamino-solana/src/base.ts:121

Expectation

readonly InstructionRule[]

SerializedGuard

KaminoBase.guard


protected me(): Promise<string>

Defined in: protocol-lending-kamino-solana/src/base.ts:98

Promise<string>

KaminoBase.me


protected memo(): string | undefined

Defined in: protocol-lending-kamino-solana/src/base.ts:169

string | undefined

KaminoBase.memo


quoteBorrow(o): Promise<MarketQuote>

Defined in: protocol-lending-kamino-solana/src/market.ts:232

Network fee of borrow.

BorrowOptions

Promise<MarketQuote>

KaminoBase.quoteBorrow


protected quoteBuilt(base64, expect, instructions): Promise<{ fee: bigint; }>

Defined in: protocol-lending-kamino-solana/src/base.ts:153

Simulate the built transaction through the account’s guard and return its fee; nothing is signed.

string

Expectation

readonly InstructionRule[]

Promise<{ fee: bigint; }>

KaminoBase.quoteBuilt


quoteRepay(o): Promise<MarketQuote>

Defined in: protocol-lending-kamino-solana/src/market.ts:254

Network fee of repay.

KaminoMarketRepayOptions

Promise<MarketQuote>

KaminoBase.quoteRepay


quoteSupply(o): Promise<MarketQuote>

Defined in: protocol-lending-kamino-solana/src/market.ts:194

Network fee of supply.

SupplyOptions

Promise<MarketQuote>

KaminoBase.quoteSupply


quoteWithdraw(o): Promise<MarketQuote>

Defined in: protocol-lending-kamino-solana/src/market.ts:210

Network fee of withdraw.

KaminoMarketWithdrawOptions

Promise<MarketQuote>

KaminoBase.quoteWithdraw


protected readChain(addresses): Promise<(ChainAccount | null)[]>

Defined in: protocol-lending-kamino-solana/src/base.ts:127

Accounts from the chain through the wallet’s RPC, in the order asked (null where none exists).

readonly string[]

Promise<(ChainAccount | null)[]>

KaminoBase.readChain


protected receiveExpectation(mint, expected, extraLamports?, max?): Expectation

Defined in: protocol-lending-kamino-solana/src/base.ts:146

The wallet must receive at least expected × (1 − slippage) of mint (and at most max, when given); rent is the only SOL it may lose.

string

bigint

bigint = 0n

bigint

Expectation

KaminoBase.receiveExpectation


repay(o): Promise<LendingResult>

Defined in: protocol-lending-kamino-solana/src/market.ts:262

Repay a borrow.

KaminoMarketRepayOptions

Promise<LendingResult>

KaminoBase.repay


protected requireSigningAccount(methodName): IWalletAccount

Defined in: core/dist/index-QWdcwE6y.d.ts:322

The account, narrowed to a signing one, or a ReadOnlyAccountError naming the caller.

string

IWalletAccount

KaminoBase.requireSigningAccount


protected requireSolana(): void

Defined in: protocol-lending-kamino-solana/src/base.ts:89

Refuse anything that is not a mainnet Solana account before an API call is made in its name.

void

KaminoBase.requireSolana


resolveReserve(mint): Promise<ReserveInfo>

Defined in: protocol-lending-kamino-solana/src/market.ts:99

The reserve a mint maps to: the pinned one, else the deepest by supplied value.

string

Promise<ReserveInfo>


protected sendBuilt(base64, expect, instructions, method): Promise<{ fee: bigint; hash: string; }>

Defined in: protocol-lending-kamino-solana/src/base.ts:161

Guard, sign and broadcast the built transaction; the account refuses before signing if the proof fails.

string

Expectation

readonly InstructionRule[]

string

Promise<{ fee: bigint; hash: string; }>

KaminoBase.sendBuilt


protected spendExpectation(mint, amount, extraLamports?): Expectation

Defined in: protocol-lending-kamino-solana/src/base.ts:136

The wallet sends amount of mint (SOL counts on the lamport side) and may lose rent on top.

string

bigint

bigint = 0n

Expectation

KaminoBase.spendExpectation


supply(o): Promise<LendingResult>

Defined in: protocol-lending-kamino-solana/src/market.ts:202

Deposit into the market or vault. Sends an approval first when needed.

SupplyOptions

Promise<LendingResult>

KaminoBase.supply


protected surface(): SolanaAccountSurface

Defined in: protocol-lending-kamino-solana/src/base.ts:94

SolanaAccountSurface

KaminoBase.surface


withdraw(o): Promise<LendingResult>

Defined in: protocol-lending-kamino-solana/src/market.ts:219

Withdraw a deposit.

KaminoMarketWithdrawOptions

Promise<LendingResult>

KaminoBase.withdraw