solana

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChainName = "sol"
	Symbol    = "sol"
	Coin      = "sol"
)

Variables

This section is empty.

Functions

func NewChainAdaptor

func NewChainAdaptor(conf *config.Config) (wallet.WalletAdaptor, error)

func NewLocalWalletAdaptor

func NewLocalWalletAdaptor(network config.NetWorkType) wallet.WalletAdaptor

Types

type GetTxByAddressRes

type GetTxByAddressRes struct {
	Data []GetTxByAddressTx
}

type GetTxByAddressTx

type GetTxByAddressTx struct {
	ID                  string `json:"_id"`
	Src                 string `json:"src"`
	Dst                 string `json:"dst"`
	Lamport             int    `json:"lamport"`
	BlockTime           int    `json:"blockTime"`
	Slot                int    `json:"slot"`
	TxHash              string `json:"txHash"`
	Fee                 int    `json:"fee"`
	Status              string `json:"status"`
	Decimals            int    `json:"decimals"`
	TxNumberSolTransfer int    `json:"txNumberSolTransfer"`
}
type Header struct {
	NumReadonlySignedAccounts   int `json:"numReadonlySignedAccounts"`
	NumReadonlyUnsignedAccounts int `json:"numReadonlyUnsignedAccounts"`
	NumRequiredSignatures       int `json:"numRequiredSignatures"`
}

type Instructions

type Instructions struct {
	Accounts       []int  `json:"accounts"`
	Data           string `json:"data"`
	ProgramIDIndex int    `json:"programIdIndex"`
}

type Message

type Message struct {
	AccountKeys     []string       `json:"accountKeys"`
	Header          Header         `json:"header"`
	Instructions    []Instructions `json:"instructions"`
	RecentBlockhash string         `json:"recentBlockhash"`
}

type Transaction

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

type TxMessage

type TxMessage struct {
	Hash   string
	From   string
	To     string
	Fee    string
	Status bool
	Value  string
	Type   int32
	Height string
}

type WalletAdaptor

type WalletAdaptor struct {
	fallback.WalletAdaptor
	// contains filtered or unexported fields
}

func (*WalletAdaptor) ConvertAddress

func (*WalletAdaptor) CreateAccountSignedTx

func (*WalletAdaptor) CreateAccountTx

func (*WalletAdaptor) CreateUtxoSignedTx

func (*WalletAdaptor) CreateUtxoTx

func (*WalletAdaptor) GetAccount

func (*WalletAdaptor) GetAccountTxFromData

func (a *WalletAdaptor) GetAccountTxFromData(req *wallet2.TxFromDataRequest) (*wallet2.AccountTxResponse, error)

func (*WalletAdaptor) GetAccountTxFromSignedData

func (a *WalletAdaptor) GetAccountTxFromSignedData(req *wallet2.TxFromSignedDataRequest) (*wallet2.AccountTxResponse, error)

func (*WalletAdaptor) GetBalance

func (*WalletAdaptor) GetGasPrice

func (*WalletAdaptor) GetMinRent

func (*WalletAdaptor) GetNonce

func (*WalletAdaptor) GetSupportCoins

func (*WalletAdaptor) GetTxByAddress

func (*WalletAdaptor) GetTxByHash

func (*WalletAdaptor) GetUtxo

func (*WalletAdaptor) GetUtxoInsFromData

func (a *WalletAdaptor) GetUtxoInsFromData(req *wallet2.UtxoInsFromDataRequest) (*wallet2.UtxoInsResponse, error)

func (*WalletAdaptor) GetUtxoTxFromData

func (a *WalletAdaptor) GetUtxoTxFromData(req *wallet2.TxFromDataRequest) (*wallet2.UtxoTxResponse, error)

func (*WalletAdaptor) GetUtxoTxFromSignedData

func (a *WalletAdaptor) GetUtxoTxFromSignedData(req *wallet2.TxFromSignedDataRequest) (*wallet2.UtxoTxResponse, error)

func (*WalletAdaptor) SendTx

func (*WalletAdaptor) ValidAddress

func (*WalletAdaptor) VerifyAccountSignedTx

func (*WalletAdaptor) VerifyUtxoSignedTx

Jump to

Keyboard shortcuts

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