addressbook

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchGetGemsVerifiedCollections added in v1.2.0

func FetchGetGemsVerifiedCollections() ([]tongo.AccountID, error)

Types

type AttachedAccount

type AttachedAccount struct {
	Name       string `json:"name"`
	Preview    string `json:"preview"`
	Wallet     string `json:"wallet"`
	Symbol     string `json:"-"`
	Normalized string `json:"-"`
}

AttachedAccount represents domains, nft collections for quick search by name are presented

type Book

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

Book holds information about known accounts, jettons, NFT collections manually crafted by the tonkeeper team and the community.

func NewAddressBook

func NewAddressBook(logger *zap.Logger, addressPath, jettonPath, collectionPath string, opts ...Option) *Book

func (*Book) GetAddressInfoByAddress

func (b *Book) GetAddressInfoByAddress(a tongo.AccountID) (KnownAddress, bool)

func (*Book) GetCollectionInfoByAddress

func (b *Book) GetCollectionInfoByAddress(a tongo.AccountID) (KnownCollection, bool)

func (*Book) GetJettonInfoByAddress

func (b *Book) GetJettonInfoByAddress(a tongo.AccountID) (KnownJetton, bool)

func (*Book) GetKnownCollections added in v1.1.0

func (b *Book) GetKnownCollections() map[tongo.AccountID]KnownCollection

func (*Book) GetKnownJettons

func (b *Book) GetKnownJettons() map[tongo.AccountID]KnownJetton

func (*Book) GetTFPoolInfo

func (b *Book) GetTFPoolInfo(a tongo.AccountID) (TFPoolInfo, bool)

func (*Book) IsWallet added in v1.2.0

func (b *Book) IsWallet(addr tongo.AccountID) (bool, error)

IsWallet returns true if the given address is a wallet.

func (*Book) SearchAttachedAccountsByPrefix

func (b *Book) SearchAttachedAccountsByPrefix(prefix string) []AttachedAccount

func (*Book) TFPools

func (b *Book) TFPools() []tongo.AccountID

type JettonVerificationType

type JettonVerificationType string
const (
	Whitelist JettonVerificationType = "whitelist"
	Blacklist JettonVerificationType = "blacklist"
	None      JettonVerificationType = "none"
)

type KnownAddress

type KnownAddress struct {
	IsScam      bool   `json:"is_scam,omitempty"`
	RequireMemo bool   `json:"require_memo,omitempty"`
	Name        string `json:"name"`
	Address     string `json:"address"`
	Image       string `json:"image,omitempty"`
}

KnownAddress represents additional manually crafted information about a particular account in the blockchain.

type KnownCollection

type KnownCollection struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Address     string   `json:"address"`
	MaxItems    int64    `json:"max_items"`
	Websites    []string `json:"websites,omitempty"`
	Social      []string `json:"social,omitempty"`
	Approvers   []oas.NftApprovedByItem
}

KnownCollection represents additional manually crafted information about a particular NFT collection in the blockchain.

type KnownJetton

type KnownJetton struct {
	Name          string                 `json:"name"`
	Verification  JettonVerificationType `json:"verification"`
	Description   string                 `json:"description"`
	Image         string                 `json:"image"`
	Address       string                 `json:"address"`
	Symbol        string                 `json:"symbol"`
	MaxSupply     decimal.Decimal        `json:"max_supply"`
	Websites      []string               `json:"websites,omitempty"`
	Social        []string               `json:"social,omitempty"`
	Coinmarketcap string                 `json:"coinmarketcap,omitempty"`
	Coingecko     string                 `json:"coingecko,omitempty"`
}

KnownJetton represents additional manually crafted information about a particular jetton in the blockchain.

type Option

type Option func(o *Options)

func WithAdditionalAddressesSource

func WithAdditionalAddressesSource(a addresser) Option

type Options

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

type TFPoolInfo

type TFPoolInfo struct {
	Name      string `json:"name"`
	GroupName string `json:"groupName"`
	Address   string `json:"address"`
}

Jump to

Keyboard shortcuts

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