Skip to content
docs

KaminoBase

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

  • LendingProtocol<TConfig>

TConfig extends KaminoBaseConfig

new KaminoBase<TConfig>(account, config): KaminoBase<TConfig>

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

IWalletAccountReadOnly | IWalletAccount

TConfig

KaminoBase<TConfig>

LendingProtocol<TConfig>.constructor

protected readonly _account: IWalletAccountReadOnly | IWalletAccount

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

KaminoVaultProtocolSolana._account


protected readonly _config: TConfig

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

LendingProtocol._config


readonly api: KaminoApi

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


protected readonly rentAllowance: bigint

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


protected readonly slippageBps: number

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

borrow(_o): Promise<LendingResult>

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

Borrow against collateral.

BorrowOptions

Promise<LendingResult>

LendingProtocol.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>


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

LendingProtocol.describeActivity


protected guard(expect, instructions): SerializedGuard

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

Expectation

readonly InstructionRule[]

SerializedGuard


protected me(): Promise<string>

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

Promise<string>


protected memo(): string | undefined

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

string | undefined


quoteBorrow(_o): Promise<LendingQuote>

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

Network fee of borrow.

BorrowOptions

Promise<LendingQuote>

LendingProtocol.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; }>


quoteRepay(_o): Promise<LendingQuote>

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

Network fee of repay.

RepayOptions

Promise<LendingQuote>

LendingProtocol.quoteRepay


quoteSupply(_o): Promise<LendingQuote>

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

Network fee of supply.

SupplyOptions

Promise<LendingQuote>

LendingProtocol.quoteSupply


quoteWithdraw(_o): Promise<LendingQuote>

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

Network fee of withdraw.

WithdrawOptions

Promise<LendingQuote>

LendingProtocol.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)[]>


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


repay(_o): Promise<LendingResult>

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

Repay a borrow.

RepayOptions

Promise<LendingResult>

LendingProtocol.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

LendingProtocol.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


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; }>


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


supply(_o): Promise<LendingResult>

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

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

SupplyOptions

Promise<LendingResult>

LendingProtocol.supply


protected surface(): SolanaAccountSurface

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

SolanaAccountSurface


withdraw(_o): Promise<LendingResult>

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

Withdraw a deposit.

WithdrawOptions

Promise<LendingResult>

LendingProtocol.withdraw