Documentation
¶
Overview ¶
Package kamino preloads Kamino Lending reserve accounts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( DiscLendingMarket = [8]byte{246, 114, 50, 98, 72, 157, 28, 120} DiscReserve = [8]byte{43, 242, 204, 202, 26, 247, 59, 127} )
Discriminators for Anchor account types.
var (
ProgramID = sgo.MustPublicKeyFromBase58("KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD")
)
var Schema string
Functions ¶
func ExportJSON ¶ added in v0.4.16
ExportJSON writes every tracked Kamino reserve to path as a JSON array of Reserve values (its own existing json tags) -- the same real query loadReserves already runs for in-process use, reused verbatim, so catscope-rust-bot's build.rs can read this file instead of opening prefetch.db directly.
Types ¶
type Kamino ¶
type Kamino struct {
Reserves []*Reserve
// contains filtered or unexported fields
}
Kamino holds all Kamino Lending reserve accounts loaded at startup.
func Create ¶
Create queries the Kamino Lending program at depth 2 (program → lending market → reserve) and collects all reserve accounts, persisting results to db (kamino_reserve). If db already has reserves from a previous run, they're loaded back instead of re-fetching, unless force is true.
func (*Kamino) Find ¶
Find looks up a reserve by its pubkey.
type Reserve ¶
type Reserve struct {
Pubkey sgo.PublicKey `json:"pubkey"`
LendingMarket sgo.PublicKey `json:"lending_market"`
Mint sgo.PublicKey `json:"mint"`
SupplyVault sgo.PublicKey `json:"supply_vault"`
FeeVault sgo.PublicKey `json:"fee_vault"`
}
Reserve is the parsed state of a Kamino Lending reserve account.
type ReserveConfiguration ¶
type ReserveConfiguration struct {
List []*ReserveConfig `json:"list"`
}
Source Files
¶
- event.go
- export.go
- kamino.go
- loader.go
- print.go
- reserve.go
- schema.go
- store.go