sanctum

package
v0.4.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package sanctum preloads Sanctum S Controller LST pool state.

Index

Constants

This section is empty.

Variables

View Source
var (
	ProgramID = sgo.MustPublicKeyFromBase58("5ocnV1qiCgaQR8Jb8xWnVbApfaygJ8tNoZfgPwsgx9kx")
)

Functions

This section is empty.

Types

type LstConfig

type LstConfig struct {
	Mint               sgo.PublicKey `json:"mint"`
	SolValueCalculator sgo.PublicKey `json:"sol_value_calculator"`
	// value_calc_accounts left empty; fill manually per LST type
	ValueCalcAccounts []sgo.PublicKey `json:"value_calc_accounts"`
}

type LstEntry

type LstEntry struct {
	Mint               sgo.PublicKey `json:"mint"`
	SolValueCalculator sgo.PublicKey `json:"sol_value_calculator"`
	SolValue           uint64        `json:"sol_value"`
}

LstEntry holds one LST's parsed state from the Sanctum S Controller.

func (*LstEntry) String

func (e *LstEntry) String() string

type Sanctum

type Sanctum struct {
	Lsts []*LstEntry
}

Sanctum holds pool state and LST entries loaded at startup.

func Create

func Create(ctx context.Context, stateClient state.Client, workingDir string) (*Sanctum, error)

Create queries the Sanctum S Controller PDAs and parses LST entries.

func (*Sanctum) Args

func (s *Sanctum) Args(args []string) ([]string, error)

func (*Sanctum) Env

func (s *Sanctum) Env(mEnv map[string]string) error

func (*Sanctum) Load

func (s *Sanctum) Load(targetDirectory string, tp *trading.TradingPair) error

Load writes sanctum.json to targetDirectory for use by build.rs. value_calc_accounts is left empty for each LST; the operator fills them in manually once the LST sol-value calculator type is known.

func (*Sanctum) String

func (s *Sanctum) String() string

type SanctumConfiguration

type SanctumConfiguration struct {
	List []*LstConfig `json:"list"`
}

Source Files

  • loader.go
  • lst.go
  • print.go
  • sanctum.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL