go_coin_sol

package module
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: BSD-3-Clause Imports: 17 Imported by: 0

README

go-coin-sol

view examples

go-coin-sol

Quick start

go get github.com/pefish/go-coin-sol

Document

doc

Security Vulnerabilities

If you discover a security vulnerability, please send an e-mail to pefish@qq.com. All security vulnerabilities will be promptly addressed.

License

This project is licensed under the Apache License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JitoTipInfo added in v0.5.5

type JitoTipInfo struct {
	Time                        string  `json:"time"`
	LandedTips25thPercentile    float64 `json:"landed_tips_25th_percentile"`
	LandedTips50thPercentile    float64 `json:"landed_tips_50th_percentile"`
	LandedTips75thPercentile    float64 `json:"landed_tips_75th_percentile"`
	LandedTips95thPercentile    float64 `json:"landed_tips_95th_percentile"`
	LandedTips99thPercentile    float64 `json:"landed_tips_99th_percentile"`
	EMALandedTips50thPercentile float64 `json:"ema_landed_tips_50th_percentile"`
}

type Wallet

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

func New

func New(
	ctx context.Context,
	logger i_logger.ILogger,
	httpsUrl string,
	wssUrl string,
) (*Wallet, error)

func (*Wallet) BuildTx

func (t *Wallet) BuildTx(
	privObj solana.PrivateKey,
	latestBlockhash *solana.Hash,
	instructions []solana.Instruction,
	unitPrice uint64,
	unitLimit uint64,
) (*solana.Transaction, error)

func (*Wallet) GetJitoTipInfo added in v0.5.5

func (t *Wallet) GetJitoTipInfo() (*JitoTipInfo, error)

func (*Wallet) NewAddress added in v0.0.4

func (t *Wallet) NewAddress() (address_ string, priv_ string)

func (*Wallet) NewWSClient added in v0.5.3

func (t *Wallet) NewWSClient(ctx context.Context) (*ws.Client, error)

func (*Wallet) RPCClient added in v0.0.4

func (t *Wallet) RPCClient() *rpc.Client

func (*Wallet) SendAndConfirmTransaction

func (t *Wallet) SendAndConfirmTransaction(
	ctx context.Context,
	tx *solana.Transaction,
	skipPreflight bool,
	urls []string,
) (
	meta_ *rpc.TransactionMeta,
	timestamp_ uint64,
	err_ error,
)

func (*Wallet) SendByJitoAndConfirmTransaction added in v0.5.4

func (t *Wallet) SendByJitoAndConfirmTransaction(
	ctx context.Context,
	tx *solana.Transaction,
) (
	meta_ *rpc.TransactionMeta,
	timestamp_ uint64,
	err_ error,
)

func (*Wallet) SendTx

func (t *Wallet) SendTx(
	ctx context.Context,
	privObj solana.PrivateKey,
	latestBlockhash *solana.Hash,
	instructions []solana.Instruction,
	unitPrice uint64,
	unitLimit uint64,
	skipPreflight bool,
	urls []string,
) (
	meta_ *rpc.TransactionMeta,
	tx_ *solana.Transaction,
	timestamp_ uint64,
	err_ error,
)

func (*Wallet) SendTxByJito added in v0.5.4

func (t *Wallet) SendTxByJito(
	ctx context.Context,
	privObj solana.PrivateKey,
	latestBlockhash *solana.Hash,
	instructions []solana.Instruction,
	unitPrice uint64,
	unitLimit uint64,
	jitoTipAmountWithDecimals uint64,
	jitoAccount solana.PublicKey,
) (
	meta_ *rpc.TransactionMeta,
	tx_ *solana.Transaction,
	timestamp_ uint64,
	err_ error,
)

func (*Wallet) TokenBalance added in v0.5.9

func (t *Wallet) TokenBalance(
	address solana.PublicKey,
	tokenAddress solana.PublicKey,
) (*type_.TokenAmountInfo, error)

Jump to

Keyboard shortcuts

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