types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorNotFound = errors.New("not found")

Functions

This section is empty.

Types

type BalanceOfOpts

type BalanceOfOpts struct {
	AccountAddress string            `json:"account_addr"`
	Chain          string            `json:"chain"` // chain name
	Decimals       uint32            `json:"decimals"`
	TokenType      tokenmanager.Type `json:"token_type"`
	TokenAddress   string            `json:"token_address"`      // hex-encoded
	TokenID        string            `json:"token_id,omitempty"` // hex-encoded
}

type Collection

type Collection struct {
	Verified bool
	Address  solana.PublicKey
}

type Creator

type Creator struct {
	Address  solana.PublicKey
	Verified bool
	Share    uint8
}

type Data

type Data struct {
	Name                 string
	Symbol               string
	URI                  string
	SellerFeeBasisPoints uint16
	Creators             *[]Creator
}

type Key

type Key borsh.Enum
const (
	KeyUninitialized Key = iota
	KeyEditionV1
	KeyMasterEditionV1
	KeyReservationListV1
	KeyMetadataV1
	KeyReservationListV2
	KeyMasterEditionV2
	KeyEditionMarker
	KeyUseAuthorityRecord
	KeyCollectionAuthorityRecord
)

type MetaplexMetadata

type MetaplexMetadata struct {
	Key                 borsh.Enum
	UpdateAuthority     solana.PublicKey
	Mint                solana.PublicKey
	Data                Data
	PrimarySaleHappened bool
	IsMutable           bool
	EditionNonce        *uint8
	TokenStandard       *TokenStandard
	Collection          *Collection
	Uses                *Uses
}

type NftMetadataOpts

type NftMetadataOpts struct {
	Chain        string            `json:"chain"` // chain name
	TokenType    tokenmanager.Type `json:"token_type"`
	TokenAddress string            `json:"token_address"`      // hex-encoded
	TokenID      string            `json:"token_id,omitempty"` // hex-encoded
}

type NftsOpts

type NftsOpts struct {
	AccountAddress string  `json:"account_addr"`
	Chain          string  `json:"chain"`         // chain name
	TokenAddress   string  `json:"token_address"` // hex-encoded
	Limit          uint64  `json:"limit"`
	PageNumber     *uint64 `json:"page_number"`
	ItemIndex      *uint64 `json:"item_index"`
}

type Proxy

type Proxy interface {
	BalanceOf(ctx context.Context, opts *BalanceOfOpts) (*amount.Amount, error)
	NftMetadata(ctx context.Context, opts *NftMetadataOpts) (*data.NftMetadata, error)
	NftList(ctx context.Context, opts *NftsOpts) ([]*data.Nft, *data.Cursor, error)
}

type TokenStandard

type TokenStandard borsh.Enum
const (
	NonFungible TokenStandard = iota
	FungibleAsset
	Fungible
	NonFungibleEdition
)

type UseMethod

type UseMethod borsh.Enum
const (
	Burn UseMethod = iota
	Multiple
	Single
)

type Uses

type Uses struct {
	UseMethod UseMethod
	Remaining uint64
	Total     uint64
}

Jump to

Keyboard shortcuts

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