client

package
v1.7.1-custom Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func Create

func Create(ctx context.Context, rpcClient *rpc.Client, wsClient *ws.Client, commitment rpc.CommitmentType) *Client

func (*Client) CreateAccountAndIssue

func (c *Client) CreateAccountAndIssue(payerPrivateKey solana.PrivateKey, mintFull *MintWithAddress, owner solana.PublicKey, amount uint64) (*solana.PublicKey, error)

func (*Client) CreateToken

func (c *Client) CreateToken(args *TokenArgs, payerPrivateKey solana.PrivateKey, owner solana.PublicKey) (*MintWithAddress, error)

create a token; optionally mint tokens to a destination

func (*Client) GetMint

func (c *Client) GetMint(mint solana.PublicKey) (*tkn.Mint, error)

type MintWithAddress

type MintWithAddress struct {
	Address solana.PublicKey
	State   *tkn.Mint
}

type TokenArgs

type TokenArgs struct {
	Decimals        uint8
	InitialSupply   uint64
	MintAuthority   solana.PublicKey
	FreezeAuthority solana.PublicKey
}

Jump to

Keyboard shortcuts

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