Documentation
¶
Index ¶
- func FindOwnershipTransfer(ctx context.Context, conn *rpc.Client, publicKey solana.PublicKey, ...) (bool, error)
- func GetCurrentNFTOwner(ctx context.Context, conn *rpc.Client, mint solana.PublicKey) (out *solana.PublicKey, err error)
- func GetOwnedVerifiedMints(ctx context.Context, conn *rpc.Client, publicKey solana.PublicKey, ...) (out []string, err error)
- func GetTransactionWithRetry(ctx context.Context, conn *rpc.Client, sig solana.Signature) (out *rpc.GetTransactionResult, err error)
- func RandSmallAmountOfSol() uint64
- func WatchForOwnershipTransfer(ctx context.Context, conn *rpc.Client, wsConn *ws.Client, ...) (success bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindOwnershipTransfer ¶
func FindOwnershipTransfer(ctx context.Context, conn *rpc.Client, publicKey solana.PublicKey, amount uint64) (bool, error)
Checks recent SOL transfers and returns true if there's a transfer with provided amount that has been sent from the same wallet (source equals destination)
func GetCurrentNFTOwner ¶
func GetCurrentNFTOwner(ctx context.Context, conn *rpc.Client, mint solana.PublicKey) (out *solana.PublicKey, err error)
Retrieve public key of a wallet that currently holds a NFT token with provided mint
func GetOwnedVerifiedMints ¶
func GetOwnedVerifiedMints(ctx context.Context, conn *rpc.Client, publicKey solana.PublicKey, verifiedMints *[]string) (out []string, err error)
Get a slice of NFT mint ids which are verified and currently owned by a provided wallet
func GetTransactionWithRetry ¶
func GetTransactionWithRetry(ctx context.Context, conn *rpc.Client, sig solana.Signature) (out *rpc.GetTransactionResult, err error)
Wrapper over GetTransaction, retries on error, max 20 attempts
func RandSmallAmountOfSol ¶
func RandSmallAmountOfSol() uint64
func WatchForOwnershipTransfer ¶
func WatchForOwnershipTransfer(ctx context.Context, conn *rpc.Client, wsConn *ws.Client, publicKey solana.PublicKey, amount uint64) (success bool, err error)
Subscribes to provided account and returns true if there was a recent ownership transfer of SOL (random small amount of SOL, transferred to the same wallet)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.