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.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new KaminoMarketProtocolSolana(
account,config?):KaminoMarketProtocolSolana
Defined in: protocol-lending-kamino-solana/src/market.ts:72
Parameters
Section titled “Parameters”account
Section titled “account”IWalletAccountReadOnly | IWalletAccount
config?
Section titled “config?”KaminoMarketConfig = {}
Returns
Section titled “Returns”KaminoMarketProtocolSolana
Overrides
Section titled “Overrides”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”_config
Section titled “_config”
protectedreadonly_config:KaminoMarketConfig
Defined in: core/dist/index-QWdcwE6y.d.ts:310
Inherited from
Section titled “Inherited from”
readonlyapi:KaminoApi
Defined in: protocol-lending-kamino-solana/src/base.ts:72
Inherited from
Section titled “Inherited from”market
Section titled “market”
readonlymarket:string
Defined in: protocol-lending-kamino-solana/src/market.ts:68
rentAllowance
Section titled “rentAllowance”
protectedreadonlyrentAllowance:bigint
Defined in: protocol-lending-kamino-solana/src/base.ts:74
Inherited from
Section titled “Inherited from”slippageBps
Section titled “slippageBps”
protectedreadonlyslippageBps:number
Defined in: protocol-lending-kamino-solana/src/base.ts:73
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”borrow()
Section titled “borrow()”borrow(
o):Promise<LendingResult>
Defined in: protocol-lending-kamino-solana/src/market.ts:241
Borrow against collateral.
Parameters
Section titled “Parameters”BorrowOptions
Returns
Section titled “Returns”Promise<LendingResult>
Overrides
Section titled “Overrides”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>
Inherited from
Section titled “Inherited from”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”getMarket()
Section titled “getMarket()”getMarket():
Promise<MarketInfo>
Defined in: protocol-lending-kamino-solana/src/market.ts:91
The market’s config entry plus its reserves.
Returns
Section titled “Returns”Promise<MarketInfo>
getPosition()
Section titled “getPosition()”getPosition():
Promise<MarketPosition>
Defined in: protocol-lending-kamino-solana/src/market.ts:115
Obligations and per-mint totals.
Returns
Section titled “Returns”Promise<MarketPosition>
getReserves()
Section titled “getReserves()”getReserves():
Promise<ReserveInfo[]>
Defined in: protocol-lending-kamino-solana/src/market.ts:80
Reserves with rates, cached for a minute.
Returns
Section titled “Returns”Promise<ReserveInfo[]>
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”Inherited from
Section titled “Inherited from”
protectedme():Promise<string>
Defined in: protocol-lending-kamino-solana/src/base.ts:98
Returns
Section titled “Returns”Promise<string>
Inherited from
Section titled “Inherited from”memo()
Section titled “memo()”
protectedmemo():string|undefined
Defined in: protocol-lending-kamino-solana/src/base.ts:169
Returns
Section titled “Returns”string | undefined
Inherited from
Section titled “Inherited from”quoteBorrow()
Section titled “quoteBorrow()”quoteBorrow(
o):Promise<MarketQuote>
Defined in: protocol-lending-kamino-solana/src/market.ts:232
Network fee of borrow.
Parameters
Section titled “Parameters”BorrowOptions
Returns
Section titled “Returns”Promise<MarketQuote>
Overrides
Section titled “Overrides”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; }>
Inherited from
Section titled “Inherited from”quoteRepay()
Section titled “quoteRepay()”quoteRepay(
o):Promise<MarketQuote>
Defined in: protocol-lending-kamino-solana/src/market.ts:254
Network fee of repay.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<MarketQuote>
Overrides
Section titled “Overrides”quoteSupply()
Section titled “quoteSupply()”quoteSupply(
o):Promise<MarketQuote>
Defined in: protocol-lending-kamino-solana/src/market.ts:194
Network fee of supply.
Parameters
Section titled “Parameters”SupplyOptions
Returns
Section titled “Returns”Promise<MarketQuote>
Overrides
Section titled “Overrides”quoteWithdraw()
Section titled “quoteWithdraw()”quoteWithdraw(
o):Promise<MarketQuote>
Defined in: protocol-lending-kamino-solana/src/market.ts:210
Network fee of withdraw.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<MarketQuote>
Overrides
Section titled “Overrides”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)[]>
Inherited from
Section titled “Inherited from”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”Inherited from
Section titled “Inherited from”repay()
Section titled “repay()”repay(
o):Promise<LendingResult>
Defined in: protocol-lending-kamino-solana/src/market.ts:262
Repay a borrow.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<LendingResult>
Overrides
Section titled “Overrides”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”KaminoBase.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
Inherited from
Section titled “Inherited from”resolveReserve()
Section titled “resolveReserve()”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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<ReserveInfo>
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; }>
Inherited from
Section titled “Inherited from”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”Inherited from
Section titled “Inherited from”supply()
Section titled “supply()”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.
Parameters
Section titled “Parameters”SupplyOptions
Returns
Section titled “Returns”Promise<LendingResult>
Overrides
Section titled “Overrides”surface()
Section titled “surface()”
protectedsurface():SolanaAccountSurface
Defined in: protocol-lending-kamino-solana/src/base.ts:94
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”withdraw()
Section titled “withdraw()”withdraw(
o):Promise<LendingResult>
Defined in: protocol-lending-kamino-solana/src/market.ts:219
Withdraw a deposit.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<LendingResult>