solana

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateWallet

func GenerateWallet(filePath string, password []byte) (address string, err error)

GenerateWallet generates a new Solana wallet and saves it to .cwt file. Returns the generated public address on success. password must be []byte for security (caller should zero it after use)

func GetBalance

func GetBalance(ctx context.Context, filePath string) (*model.SolanaBalanceResponse, error)

GetBalance gets wallet balance

func GetTransactions

func GetTransactions(ctx context.Context, filePath string, req *model.LogRequest) (*model.LogResponse, error)

GetTransactions gets wallet transactions with filtering

func IsFileExistsError

func IsFileExistsError(err error) bool

IsFileExistsError checks if error is FileExistsError

func PaySOL

func PaySOL(ctx context.Context, filePath string, password []byte, toAddress, amount string, idempotencyKey string) (*model.PayResponse, error)

PaySOL sends a SOL transaction password must be []byte for security (caller should zero it after use)

func PayUSDC

func PayUSDC(ctx context.Context, filePath string, password []byte, toAddress, amount string, idempotencyKey string) (*model.PayResponse, error)

PayUSDC sends a USDC transaction password must be []byte for security (caller should zero it after use)

Types

type FileExistsError

type FileExistsError struct {
	Message string
}

FileExistsError is an error when file already exists and is not empty

func (*FileExistsError) Error

func (e *FileExistsError) Error() string

Jump to

Keyboard shortcuts

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