solana

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAssociatedTokenAccount

func CreateAssociatedTokenAccount(ctx context.Context, rpcClient *rpc.Client, wsClient *ws.Client, payer solana.PrivateKey, owner solana.PublicKey, mint solana.PublicKey) (solana.PublicKey, error)

CreateAssociatedTokenAccount creates an associated token account for the given owner and mint. This is useful when a merchant's wallet doesn't have a token account initialized yet. It waits for the transaction to be confirmed before returning.

func ParsePrivateKey

func ParsePrivateKey(keyStr string) (solana.PrivateKey, error)

ParsePrivateKey parses a Solana private key from either base58 or JSON array format. Supported formats:

  • Base58: "5Kd7..." (standard format from solana-keygen)
  • JSON array: "[1,2,3,...,64]" (64 bytes, Phantom wallet export format)

Types

This section is empty.

Jump to

Keyboard shortcuts

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