solana

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	BlockTime    int64                  `json:"blockTime"`
	Transactions []ConfirmedTransaction `json:"transactions"`
}

type Client

type Client struct {
	client.Request
}

func (*Client) GetEpochInfo

func (c *Client) GetEpochInfo() (epochInfo EpochInfo, err error)

func (*Client) GetLasteBlock

func (c *Client) GetLasteBlock() (int64, error)

func (*Client) GetTransactionSignatures

func (c *Client) GetTransactionSignatures(signatures []ConfirmedSignature) ([]ConfirmedTransaction, error)

func (*Client) GetTransactionsByAddress

func (c *Client) GetTransactionsByAddress(address string) ([]ConfirmedTransaction, error)

func (*Client) GetTransactionsInBlock

func (c *Client) GetTransactionsInBlock(num int64) (block Block, err error)

type ConfirmedSignature

type ConfirmedSignature struct {
	Memo      string `json:"memo"`
	Signature string `json:"signature"`
	Slot      uint64 `json:"slot"`
}

type ConfirmedTransaction

type ConfirmedTransaction struct {
	Meta        Meta        `json:"meta"`
	BlockTime   int64       `json:"blockTime,omitempty"`
	Slot        uint64      `json:"slot,omitempty"`
	Transaction Transaction `json:"transaction"`
}

type EpochInfo

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

type Instruction

type Instruction struct {
	Parsed  interface{} `json:"parsed"`
	Program string      `json:"program"`
}

type Message

type Message struct {
	Instructions []Instruction `json:"instructions"`
}

type Meta

type Meta struct {
	Err interface{} `json:"err"`
	Fee uint64      `json:"fee"`
}

type Parsed

type Parsed struct {
	Info interface{} `json:"info"`
	Type string      `json:"type"`
}

type Platform

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

func Init

func Init(api string) *Platform

func (*Platform) Coin

func (p *Platform) Coin() coin.Coin

func (*Platform) CurrentBlockNumber

func (p *Platform) CurrentBlockNumber() (int64, error)

func (*Platform) GetBlockByNumber

func (p *Platform) GetBlockByNumber(num int64) (*types.Block, error)

func (*Platform) GetTxsByAddress

func (p *Platform) GetTxsByAddress(address string) (types.Txs, error)

func (*Platform) NormalizeTx

func (p *Platform) NormalizeTx(tx ConfirmedTransaction, slot uint64, timestamp int64) (normalized types.Tx, err error)

type TokenAmount

type TokenAmount struct {
	Amount   string `json:"amount"`
	Decimals uint   `json:"decimals"`
}

type TokenTransferInfo

type TokenTransferInfo struct {
	Destination string      `json:"destination"`
	Mint        string      `json:"mint"`
	Source      string      `json:"source"`
	TokenAmount TokenAmount `json:"tokenAmount"`
}

type Transaction

type Transaction struct {
	Message    Message  `json:"message"`
	Signatures []string `json:"signatures"`
}

type TransferInfo

type TransferInfo struct {
	Destination string `json:"destination"`
	Lamports    uint64 `json:"lamports"`
	Source      string `json:"source"`
}

Jump to

Keyboard shortcuts

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