go_coin_sol

package module
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: BSD-3-Clause Imports: 8 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 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) NewAddress added in v0.0.4

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

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,
) (*rpc.TransactionMeta, 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,
) (
	meta_ *rpc.TransactionMeta,
	tx_ *solana.Transaction,
	err_ error,
)

func (*Wallet) WSClient added in v0.0.4

func (t *Wallet) WSClient() *ws.Client

Directories

Path Synopsis
program

Jump to

Keyboard shortcuts

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