Documentation ¶
Index ¶
- func ConvertLamportToSol[T Number](lamports T) *big.Float
- func CreateQR(address string, amount float64) (string, error)
- func CreateSoloQR(address string) (string, error)
- type Client
- func (c Client) CreateMTransactions(ctx context.Context, tb []*TransactionBundle, payer *walletPair, simulate bool) (*solana.Signature, error)
- func (c Client) CreateTransaction(ctx context.Context, from *walletPair, to string, amount float64, ...) (*solana.Signature, error)
- func (Client) CreateWallet() *walletPair
- func (c Client) FromFile(path string) (*walletPair, error)
- func (c Client) GetConfirmations(ctx context.Context, txID string) (int16, error)
- func (c Client) GetTransaction(ctx context.Context, txID string) (*ledgerResult, error)
- func (c Client) ListenForTX(ctx context.Context, address string, callback func(*ws.LogResult) bool, ...) error
- func (c Client) RequestAirdrop(ctx context.Context, w *walletPair) (*solana.Signature, error)
- func (c Client) SendAllBalance(ctx context.Context, from *walletPair, to string, simulate bool) (*solana.Signature, error)
- func (c Client) SimulateTransaction(ctx context.Context, tx *solana.Transaction) (*simulationResult, error)
- func (c Client) WalletBalance(ctx context.Context, address string) (*big.Float, error)
- type Number
- type TransactionBundle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertLamportToSol ¶
func CreateSoloQR ¶
CreateSoloQR is a function that creates a QR code for a given address and returns the base64 representation
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (Client) CreateMTransactions ¶
func (c Client) CreateMTransactions(ctx context.Context, tb []*TransactionBundle, payer *walletPair, simulate bool) (*solana.Signature, error)
CreateMTransactions creates multiple atomic transactions that are bundled together If one of the transactions fails, the entire bundle fails
func (Client) CreateTransaction ¶
func (c Client) CreateTransaction(ctx context.Context, from *walletPair, to string, amount float64, simulate bool) (*solana.Signature, error)
CreateTransaction creates a singly atomic transaction
func (Client) CreateWallet ¶
func (Client) CreateWallet() *walletPair
CreateWallet create a new wallet
func (Client) GetConfirmations ¶
GetConfirmations returns the number of confirmations
func (Client) GetTransaction ¶
GetTransaction returns the raw transaction
func (Client) ListenForTX ¶
func (c Client) ListenForTX(ctx context.Context, address string, callback func(*ws.LogResult) bool, event ...rpc.CommitmentType) error
ListenForEvent listens for a solana event
func (Client) RequestAirdrop ¶
RequestAirdrop requests an airdrop used for testing
func (Client) SendAllBalance ¶
func (c Client) SendAllBalance(ctx context.Context, from *walletPair, to string, simulate bool) (*solana.Signature, error)
SendAllBalance sends the entire balance of a wallet
type Number ¶
type Number interface { constraints.Integer | constraints.Float }
type TransactionBundle ¶
Click to show internal directories.
Click to hide internal directories.