KaminoBase
Defined in: protocol-lending-kamino-solana/src/base.ts:71
Extends
Section titled “Extends”LendingProtocol<TConfig>
Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”TConfig
Section titled “TConfig”TConfig extends KaminoBaseConfig
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new KaminoBase<
TConfig>(account,config):KaminoBase<TConfig>
Defined in: protocol-lending-kamino-solana/src/base.ts:77
Parameters
Section titled “Parameters”account
Section titled “account”IWalletAccountReadOnly | IWalletAccount
config
Section titled “config”TConfig
Returns
Section titled “Returns”KaminoBase<TConfig>
Overrides
Section titled “Overrides”LendingProtocol<TConfig>.constructor
Properties
Section titled “Properties”_account
Section titled “_account”
protectedreadonly_account:IWalletAccountReadOnly|IWalletAccount
Defined in: core/dist/index-QWdcwE6y.d.ts:309
Inherited from
Section titled “Inherited from”KaminoVaultProtocolSolana._account
_config
Section titled “_config”
protectedreadonly_config:TConfig
Defined in: core/dist/index-QWdcwE6y.d.ts:310
Inherited from
Section titled “Inherited from”LendingProtocol._config
readonlyapi:KaminoApi
Defined in: protocol-lending-kamino-solana/src/base.ts:72
rentAllowance
Section titled “rentAllowance”
protectedreadonlyrentAllowance:bigint
Defined in: protocol-lending-kamino-solana/src/base.ts:74
slippageBps
Section titled “slippageBps”
protectedreadonlyslippageBps:number
Defined in: protocol-lending-kamino-solana/src/base.ts:73
Methods
Section titled “Methods”borrow()
Section titled “borrow()”borrow(
_o):Promise<LendingResult>
Defined in: core/dist/index-QWdcwE6y.d.ts:681
Borrow against collateral.
Parameters
Section titled “Parameters”BorrowOptions
Returns
Section titled “Returns”Promise<LendingResult>
Inherited from
Section titled “Inherited from”LendingProtocol.borrow
decimals()
Section titled “decimals()”
protecteddecimals(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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<number>
describeActivity()
Section titled “describeActivity()”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.
Parameters
Section titled “Parameters”ChainTx
DescribeActivityContext
Returns
Section titled “Returns”ActivityItem | null
Inherited from
Section titled “Inherited from”LendingProtocol.describeActivity
guard()
Section titled “guard()”
protectedguard(expect,instructions):SerializedGuard
Defined in: protocol-lending-kamino-solana/src/base.ts:121
Parameters
Section titled “Parameters”expect
Section titled “expect”instructions
Section titled “instructions”readonly InstructionRule[]
Returns
Section titled “Returns”
protectedme():Promise<string>
Defined in: protocol-lending-kamino-solana/src/base.ts:98
Returns
Section titled “Returns”Promise<string>
memo()
Section titled “memo()”
protectedmemo():string|undefined
Defined in: protocol-lending-kamino-solana/src/base.ts:169
Returns
Section titled “Returns”string | undefined
quoteBorrow()
Section titled “quoteBorrow()”quoteBorrow(
_o):Promise<LendingQuote>
Defined in: core/dist/index-QWdcwE6y.d.ts:682
Network fee of borrow.
Parameters
Section titled “Parameters”BorrowOptions
Returns
Section titled “Returns”Promise<LendingQuote>
Inherited from
Section titled “Inherited from”LendingProtocol.quoteBorrow
quoteBuilt()
Section titled “quoteBuilt()”
protectedquoteBuilt(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.
Parameters
Section titled “Parameters”base64
Section titled “base64”string
expect
Section titled “expect”instructions
Section titled “instructions”readonly InstructionRule[]
Returns
Section titled “Returns”Promise<{ fee: bigint; }>
quoteRepay()
Section titled “quoteRepay()”quoteRepay(
_o):Promise<LendingQuote>
Defined in: core/dist/index-QWdcwE6y.d.ts:684
Network fee of repay.
Parameters
Section titled “Parameters”RepayOptions
Returns
Section titled “Returns”Promise<LendingQuote>
Inherited from
Section titled “Inherited from”LendingProtocol.quoteRepay
quoteSupply()
Section titled “quoteSupply()”quoteSupply(
_o):Promise<LendingQuote>
Defined in: core/dist/index-QWdcwE6y.d.ts:678
Network fee of supply.
Parameters
Section titled “Parameters”SupplyOptions
Returns
Section titled “Returns”Promise<LendingQuote>
Inherited from
Section titled “Inherited from”LendingProtocol.quoteSupply
quoteWithdraw()
Section titled “quoteWithdraw()”quoteWithdraw(
_o):Promise<LendingQuote>
Defined in: core/dist/index-QWdcwE6y.d.ts:680
Network fee of withdraw.
Parameters
Section titled “Parameters”WithdrawOptions
Returns
Section titled “Returns”Promise<LendingQuote>
Inherited from
Section titled “Inherited from”LendingProtocol.quoteWithdraw
readChain()
Section titled “readChain()”
protectedreadChain(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).
Parameters
Section titled “Parameters”addresses
Section titled “addresses”readonly string[]
Returns
Section titled “Returns”Promise<(ChainAccount | null)[]>
receiveExpectation()
Section titled “receiveExpectation()”
protectedreceiveExpectation(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.
Parameters
Section titled “Parameters”string
expected
Section titled “expected”bigint
extraLamports?
Section titled “extraLamports?”bigint = 0n
bigint
Returns
Section titled “Returns”repay()
Section titled “repay()”repay(
_o):Promise<LendingResult>
Defined in: core/dist/index-QWdcwE6y.d.ts:683
Repay a borrow.
Parameters
Section titled “Parameters”RepayOptions
Returns
Section titled “Returns”Promise<LendingResult>
Inherited from
Section titled “Inherited from”LendingProtocol.repay
requireSigningAccount()
Section titled “requireSigningAccount()”
protectedrequireSigningAccount(methodName):IWalletAccount
Defined in: core/dist/index-QWdcwE6y.d.ts:322
The account, narrowed to a signing one, or a ReadOnlyAccountError naming the caller.
Parameters
Section titled “Parameters”methodName
Section titled “methodName”string
Returns
Section titled “Returns”IWalletAccount
Inherited from
Section titled “Inherited from”LendingProtocol.requireSigningAccount
requireSolana()
Section titled “requireSolana()”
protectedrequireSolana():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.
Returns
Section titled “Returns”void
sendBuilt()
Section titled “sendBuilt()”
protectedsendBuilt(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.
Parameters
Section titled “Parameters”base64
Section titled “base64”string
expect
Section titled “expect”instructions
Section titled “instructions”readonly InstructionRule[]
method
Section titled “method”string
Returns
Section titled “Returns”Promise<{ fee: bigint; hash: string; }>
spendExpectation()
Section titled “spendExpectation()”
protectedspendExpectation(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.
Parameters
Section titled “Parameters”string
amount
Section titled “amount”bigint
extraLamports?
Section titled “extraLamports?”bigint = 0n
Returns
Section titled “Returns”supply()
Section titled “supply()”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.
Parameters
Section titled “Parameters”SupplyOptions
Returns
Section titled “Returns”Promise<LendingResult>
Inherited from
Section titled “Inherited from”LendingProtocol.supply
surface()
Section titled “surface()”
protectedsurface():SolanaAccountSurface
Defined in: protocol-lending-kamino-solana/src/base.ts:94
Returns
Section titled “Returns”withdraw()
Section titled “withdraw()”withdraw(
_o):Promise<LendingResult>
Defined in: core/dist/index-QWdcwE6y.d.ts:679
Withdraw a deposit.
Parameters
Section titled “Parameters”WithdrawOptions
Returns
Section titled “Returns”Promise<LendingResult>
Inherited from
Section titled “Inherited from”LendingProtocol.withdraw