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.
Click to show internal directories.
Click to hide internal directories.