rpcserver

package
v0.0.0-...-7894ffe Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetAccountEncodingBase58 = iota
	GetAccountEncodingBase64
	GetAccountEncodingBase64Zstd
	GetAccountEncodingJson
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GetAccountInfoConfig

type GetAccountInfoConfig struct {
	Commitment     string
	EncodingType   *int
	DataSlice      *GetAccountInfoDataSlice
	MinContextSlot uint64
}

type GetAccountInfoDataSlice

type GetAccountInfoDataSlice struct {
	Len    *uint64
	Offset *uint64
}

type GetAccountInfoResp

type GetAccountInfoResp struct {
	Context GetAccountInfoRespContext `json:"context"`
	Value   *GetAccountInfoRespValue  `json:"value"`
}

type GetAccountInfoRespContext

type GetAccountInfoRespContext struct {
	ApiVersion string `json:"apiVersion"`
	Slot       uint64 `json:"slot"`
}

type GetAccountInfoRespValue

type GetAccountInfoRespValue struct {
	Data       any    `json:"data"`
	Executable bool   `json:"executable"`
	Lamports   uint64 `json:"lamports"`
	Owner      string `json:"owner"`
	RentEpoch  uint64 `json:"rentEpoch"`
	Space      uint64 `json:"space"`
}

type GetEpochInfoResp

type GetEpochInfoResp struct {
	AbsoluteSlot     uint64 `json:"absoluteSlot"`
	BlockHeight      uint64 `json:"blockHeight"`
	Epoch            uint64 `json:"epoch"`
	SlotIndex        uint64 `json:"slotIndex"`
	SlotsInEpoch     uint64 `json:"slotsInEpoch"`
	TransactionCount uint64 `json:"transactionCount"`
}

type GetLatestBlockhashResp

type GetLatestBlockhashResp struct {
	Context GetLatestBlockhashRespContext `json:"context"`
	Value   *GetLatestBlockhashRespValue  `json:"value"`
}

type GetLatestBlockhashRespContext

type GetLatestBlockhashRespContext struct {
	Slot uint64 `json:"slot"`
}

type GetLatestBlockhashRespValue

type GetLatestBlockhashRespValue struct {
	Blockhash            string `json:"blockhash"`
	LastValidBlockHeight uint64 `json:"lastValidBlockHeight"`
}

type RpcServer

type RpcServer struct {
	// contains filtered or unexported fields
}

func NewRpcServer

func NewRpcServer(acctsDb *accountsdb.AccountsDb, port uint16) *RpcServer

func (*RpcServer) GetAccountInfo

func (rpcServer *RpcServer) GetAccountInfo(ctx context.Context, p jsonrpc.RawParams) (GetAccountInfoResp, error)

func (*RpcServer) GetBankHash

func (rpcServer *RpcServer) GetBankHash(ctx context.Context, p jsonrpc.RawParams) (string, error)

func (*RpcServer) GetBlockHeight

func (rpcServer *RpcServer) GetBlockHeight(ctx context.Context, p jsonrpc.RawParams) (uint64, error)

func (*RpcServer) GetEpochInfo

func (rpcServer *RpcServer) GetEpochInfo(ctx context.Context, p jsonrpc.RawParams) (GetEpochInfoResp, error)

func (*RpcServer) GetLatestBlockhash

func (rpcServer *RpcServer) GetLatestBlockhash(ctx context.Context, p jsonrpc.RawParams) (GetLatestBlockhashResp, error)

func (*RpcServer) Start

func (rpcServer *RpcServer) Start()

Jump to

Keyboard shortcuts

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