only1sdk

package module
v0.0.0-...-84cbe0b Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: GPL-3.0 Imports: 10 Imported by: 2

README

solana-sdk-go

Documentation

Index

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.

Jump to

Keyboard shortcuts

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