litestorage

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: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LiteStorage

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

func NewLiteStorage

func NewLiteStorage(log *zap.Logger, cli *liteapi.Client, opts ...Option) (*LiteStorage, error)

func (*LiteStorage) FindAllDomainsResolvedToAddress

func (s *LiteStorage) FindAllDomainsResolvedToAddress(ctx context.Context, a tongo.AccountID, collections map[tongo.AccountID]string) ([]string, error)

func (*LiteStorage) GetAccountDiff added in v1.1.0

func (s *LiteStorage) GetAccountDiff(ctx context.Context, account tongo.AccountID, startTime int64, endTime int64) (int64, error)

func (*LiteStorage) GetAccountJettonHistoryByID

func (s *LiteStorage) GetAccountJettonHistoryByID(ctx context.Context, address, jettonMaster tongo.AccountID, limit int, beforeLT, startTime, endTime *int64) ([]tongo.Bits256, error)

func (*LiteStorage) GetAccountJettonsHistory

func (s *LiteStorage) GetAccountJettonsHistory(ctx context.Context, address tongo.AccountID, limit int, beforeLT, startTime, endTime *int64) ([]tongo.Bits256, error)

func (*LiteStorage) GetAccountNftsHistory added in v1.1.0

func (s *LiteStorage) GetAccountNftsHistory(ctx context.Context, address tongo.AccountID, limit int, beforeLT *int64, startTime *int64, endTime *int64) ([]tongo.Bits256, error)

func (*LiteStorage) GetAccountState added in v1.1.0

func (s *LiteStorage) GetAccountState(ctx context.Context, a tongo.AccountID) (tlb.ShardAccount, error)

func (*LiteStorage) GetAccountStateRaw added in v1.0.0

func (s *LiteStorage) GetAccountStateRaw(ctx context.Context, accountID tongo.AccountID, id *tongo.BlockIDExt) (liteclient.LiteServerAccountStateC, error)

func (*LiteStorage) GetAccountTransactions

func (s *LiteStorage) GetAccountTransactions(ctx context.Context, id tongo.AccountID, limit int, beforeLt, afterLt uint64) ([]*core.Transaction, error)

func (*LiteStorage) GetAllAuctions

func (s *LiteStorage) GetAllAuctions(ctx context.Context) ([]core.Auction, error)

func (*LiteStorage) GetBlockHeader

func (s *LiteStorage) GetBlockHeader(ctx context.Context, id tongo.BlockID) (*core.BlockHeader, error)

func (*LiteStorage) GetBlockHeaderRaw added in v1.0.0

func (s *LiteStorage) GetBlockHeaderRaw(ctx context.Context, id tongo.BlockIDExt, mode uint32) (liteclient.LiteServerBlockHeaderC, error)

func (*LiteStorage) GetBlockProofRaw added in v1.0.0

func (s *LiteStorage) GetBlockProofRaw(ctx context.Context, knownBlock tongo.BlockIDExt, targetBlock *tongo.BlockIDExt) (liteclient.LiteServerPartialBlockProofC, error)

func (*LiteStorage) GetBlockRaw added in v1.0.0

func (*LiteStorage) GetBlockShards added in v1.2.0

func (s *LiteStorage) GetBlockShards(ctx context.Context, id tongo.BlockID) ([]ton.BlockID, error)

func (*LiteStorage) GetBlockTransactions

func (s *LiteStorage) GetBlockTransactions(ctx context.Context, id tongo.BlockID) ([]*core.Transaction, error)

func (*LiteStorage) GetConfigAllRaw added in v1.0.0

func (*LiteStorage) GetConfigFromBlock added in v1.2.0

func (c *LiteStorage) GetConfigFromBlock(ctx context.Context, id ton.BlockID) (tlb.ConfigParams, error)

func (*LiteStorage) GetConfigRaw added in v1.2.0

func (c *LiteStorage) GetConfigRaw(ctx context.Context) ([]byte, error)

func (*LiteStorage) GetContract added in v1.2.0

func (s *LiteStorage) GetContract(ctx context.Context, id tongo.AccountID) (*core.Contract, error)

func (*LiteStorage) GetDnsExpiring

func (s *LiteStorage) GetDnsExpiring(ctx context.Context, id tongo.AccountID, period *int) ([]core.DnsExpiring, error)

func (*LiteStorage) GetDomainBids added in v1.0.0

func (s *LiteStorage) GetDomainBids(ctx context.Context, domain string) ([]core.DomainBid, error)

func (*LiteStorage) GetDomainInfo added in v1.1.0

func (s *LiteStorage) GetDomainInfo(ctx context.Context, domain string) (core.NftItem, int64, error)

func (*LiteStorage) GetInscriptionBalancesByAccount added in v1.2.0

func (c *LiteStorage) GetInscriptionBalancesByAccount(ctx context.Context, a ton.AccountID) ([]core.InscriptionBalance, error)

func (*LiteStorage) GetInscriptionsHistoryByAccount added in v1.2.0

func (c *LiteStorage) GetInscriptionsHistoryByAccount(ctx context.Context, a ton.AccountID, ticker *string, beforeLt int64, limit int) ([]core.InscriptionMessage, error)

func (*LiteStorage) GetJettonHolders added in v1.1.0

func (s *LiteStorage) GetJettonHolders(ctx context.Context, jettonMaster tongo.AccountID, limit, offset int) ([]core.JettonHolder, error)

func (*LiteStorage) GetJettonMasterData

func (s *LiteStorage) GetJettonMasterData(ctx context.Context, master tongo.AccountID) (core.JettonMaster, error)

func (*LiteStorage) GetJettonMasterMetadata

func (s *LiteStorage) GetJettonMasterMetadata(ctx context.Context, master tongo.AccountID) (tongo.JettonMetadata, error)

func (*LiteStorage) GetJettonMasters added in v1.0.0

func (s *LiteStorage) GetJettonMasters(ctx context.Context, limit, offset int) ([]core.JettonMaster, error)

func (*LiteStorage) GetJettonWalletsByOwnerAddress

func (s *LiteStorage) GetJettonWalletsByOwnerAddress(ctx context.Context, address tongo.AccountID) ([]core.JettonWallet, error)

func (*LiteStorage) GetJettonsHoldersCount added in v1.1.0

func (s *LiteStorage) GetJettonsHoldersCount(ctx context.Context, accountIDs []tongo.AccountID) (map[tongo.AccountID]int32, error)

func (*LiteStorage) GetLastConfig added in v1.0.0

func (c *LiteStorage) GetLastConfig(ctx context.Context) (ton.BlockchainConfig, error)

func (*LiteStorage) GetLibraries added in v1.1.0

func (s *LiteStorage) GetLibraries(ctx context.Context, libraries []tongo.Bits256) (map[tongo.Bits256]*boc.Cell, error)

func (*LiteStorage) GetLiquidPool

func (s *LiteStorage) GetLiquidPool(ctx context.Context, pool tongo.AccountID) (core.LiquidPool, error)

func (*LiteStorage) GetLiquidPools

func (s *LiteStorage) GetLiquidPools(ctx context.Context, onlyVerified bool) ([]core.LiquidPool, error)

func (*LiteStorage) GetLogs added in v1.0.0

func (s *LiteStorage) GetLogs(ctx context.Context, account tongo.AccountID, destination *tlb.MsgAddress, limit int, beforeLT uint64) ([]core.Message, error)

func (*LiteStorage) GetMasterchainInfoExtRaw added in v1.0.0

func (s *LiteStorage) GetMasterchainInfoExtRaw(ctx context.Context, mode uint32) (liteclient.LiteServerMasterchainInfoExtC, error)

func (*LiteStorage) GetMasterchainInfoRaw added in v1.0.0

func (s *LiteStorage) GetMasterchainInfoRaw(ctx context.Context) (liteclient.LiteServerMasterchainInfoC, error)

func (*LiteStorage) GetNFTs

func (s *LiteStorage) GetNFTs(ctx context.Context, accounts []tongo.AccountID) ([]core.NftItem, error)

func (*LiteStorage) GetNftCollectionByCollectionAddress

func (s *LiteStorage) GetNftCollectionByCollectionAddress(ctx context.Context, address tongo.AccountID) (core.NftCollection, error)

func (*LiteStorage) GetNftCollections

func (s *LiteStorage) GetNftCollections(ctx context.Context, limit, offset *int32) ([]core.NftCollection, error)

func (*LiteStorage) GetNftHistory added in v1.1.0

func (s *LiteStorage) GetNftHistory(ctx context.Context, address tongo.AccountID, limit int, beforeLT *int64, startTime *int64, endTime *int64) ([]tongo.Bits256, error)

func (*LiteStorage) GetParticipatingInLiquidPools added in v1.0.0

func (s *LiteStorage) GetParticipatingInLiquidPools(ctx context.Context, member tongo.AccountID) ([]core.Nominator, error)

func (*LiteStorage) GetParticipatingInTfPools added in v0.1.0

func (s *LiteStorage) GetParticipatingInTfPools(ctx context.Context, member tongo.AccountID) ([]core.Nominator, error)

func (*LiteStorage) GetParticipatingInWhalesPools

func (s *LiteStorage) GetParticipatingInWhalesPools(ctx context.Context, member tongo.AccountID) ([]core.Nominator, error)

func (*LiteStorage) GetRawAccount

func (s *LiteStorage) GetRawAccount(ctx context.Context, address tongo.AccountID) (*core.Account, error)

GetRawAccount returns low-level information about an account taken directly from the blockchain.

func (*LiteStorage) GetRawAccounts

func (s *LiteStorage) GetRawAccounts(ctx context.Context, ids []tongo.AccountID) ([]*core.Account, error)

GetRawAccounts returns low-level information about several accounts taken directly from the blockchain.

func (*LiteStorage) GetSeqno added in v1.0.0

func (s *LiteStorage) GetSeqno(ctx context.Context, account tongo.AccountID) (uint32, error)

func (*LiteStorage) GetShardBlockProofRaw added in v1.0.0

func (*LiteStorage) GetShardInfoRaw added in v1.0.0

func (s *LiteStorage) GetShardInfoRaw(ctx context.Context, id tongo.BlockIDExt, workchain uint32, shard uint64, exact bool) (liteclient.LiteServerShardInfoC, error)

func (*LiteStorage) GetShardsAllInfo added in v1.0.0

func (*LiteStorage) GetStateRaw added in v1.0.0

func (*LiteStorage) GetStorageProviders

func (s *LiteStorage) GetStorageProviders(ctx context.Context) ([]core.StorageProvider, error)

func (*LiteStorage) GetSubscriptions added in v0.1.0

func (s *LiteStorage) GetSubscriptions(ctx context.Context, address tongo.AccountID) ([]core.Subscription, error)

func (*LiteStorage) GetTFPool

func (s *LiteStorage) GetTFPool(ctx context.Context, pool tongo.AccountID) (core.TFPool, error)

func (*LiteStorage) GetTFPools

func (s *LiteStorage) GetTFPools(ctx context.Context, onlyVerified bool, availableFor *ton.AccountID) ([]core.TFPool, error)

func (*LiteStorage) GetTimeRaw added in v1.0.0

func (s *LiteStorage) GetTimeRaw(ctx context.Context) (uint32, error)

func (*LiteStorage) GetTrace

func (s *LiteStorage) GetTrace(ctx context.Context, hash tongo.Bits256) (*core.Trace, error)

func (*LiteStorage) GetTransaction

func (s *LiteStorage) GetTransaction(ctx context.Context, hash tongo.Bits256) (*core.Transaction, error)

func (*LiteStorage) GetTransactionsRaw added in v1.0.0

func (s *LiteStorage) GetTransactionsRaw(ctx context.Context, count uint32, accountID tongo.AccountID, lt uint64, hash tongo.Bits256) (liteclient.LiteServerTransactionListC, error)

func (*LiteStorage) GetWalletPubKey

func (s *LiteStorage) GetWalletPubKey(ctx context.Context, address tongo.AccountID) (ed25519.PublicKey, error)

func (*LiteStorage) GetWhalesPoolMemberInfo

func (s *LiteStorage) GetWhalesPoolMemberInfo(ctx context.Context, pool, member tongo.AccountID) (core.Nominator, error)

func (*LiteStorage) JettonMastersForWallets added in v0.1.0

func (s *LiteStorage) JettonMastersForWallets(ctx context.Context, wallets []tongo.AccountID) (map[tongo.AccountID]tongo.AccountID, error)

func (*LiteStorage) LastMasterchainBlockHeader

func (s *LiteStorage) LastMasterchainBlockHeader(ctx context.Context) (*core.BlockHeader, error)

func (*LiteStorage) ListBlockTransactionsRaw added in v1.0.0

func (*LiteStorage) NftSaleContracts added in v0.1.0

func (s *LiteStorage) NftSaleContracts(ctx context.Context, contracts []tongo.AccountID) (map[tongo.AccountID]core.NftSaleContract, error)

func (*LiteStorage) ReduceIndexingLatency added in v1.2.0

func (s *LiteStorage) ReduceIndexingLatency(ctx context.Context) (int64, error)

func (*LiteStorage) ReindexAccount

func (s *LiteStorage) ReindexAccount(ctx context.Context, accountID tongo.AccountID) error

func (*LiteStorage) RunSmcMethod

func (s *LiteStorage) RunSmcMethod(ctx context.Context, id tongo.AccountID, method string, stack tlb.VmStack) (uint32, tlb.VmStack, error)

func (*LiteStorage) RunSmcMethodByID

func (s *LiteStorage) RunSmcMethodByID(ctx context.Context, id tongo.AccountID, method int, stack tlb.VmStack) (uint32, tlb.VmStack, error)

func (*LiteStorage) STONfiPools added in v1.0.0

func (s *LiteStorage) STONfiPools(ctx context.Context, poolIDs []tongo.AccountID) (map[tongo.AccountID]core.STONfiPool, error)

func (*LiteStorage) SearchAccountsByPubKey added in v1.1.0

func (s *LiteStorage) SearchAccountsByPubKey(pubKey ed25519.PublicKey) ([]tongo.AccountID, error)

func (*LiteStorage) SearchNFTs

func (s *LiteStorage) SearchNFTs(ctx context.Context,
	collection *core.Filter[tongo.AccountID],
	owner *core.Filter[tongo.AccountID],
	includeOnSale bool,
	onlyVerified bool,
	limit, offset int,
) ([]tongo.AccountID, error)

func (*LiteStorage) SearchTraces

func (s *LiteStorage) SearchTraces(ctx context.Context, a tongo.AccountID, limit int, beforeLT, startTime, endTime *int64, initiator bool) ([]core.TraceID, error)

func (*LiteStorage) SearchTransactionByMessageHash added in v1.0.0

func (s *LiteStorage) SearchTransactionByMessageHash(ctx context.Context, hash tongo.Bits256) (*tongo.Bits256, error)

func (*LiteStorage) SendMessageRaw added in v1.0.0

func (s *LiteStorage) SendMessageRaw(ctx context.Context, payload []byte) (uint32, error)

func (*LiteStorage) SetExecutor added in v1.1.0

func (s *LiteStorage) SetExecutor(e abi.Executor)

func (*LiteStorage) Shutdown added in v1.1.0

func (s *LiteStorage) Shutdown()

Shutdown stops all background goroutines.

func (*LiteStorage) TrimmedConfigBase64 added in v1.1.0

func (c *LiteStorage) TrimmedConfigBase64() (string, error)

TrimmedConfigBase64 returns the current trimmed blockchain config in a base64 format.

type Option

type Option func(o *Options)

func WithBlockChannel

func WithBlockChannel(ch <-chan indexer.IDandBlock) Option

WithBlockChannel configures a channel to receive notifications about new blocks in the blockchain.

func WithKnownJettons

func WithKnownJettons(a []tongo.AccountID) Option

func WithPreloadAccounts

func WithPreloadAccounts(a []tongo.AccountID) Option

func WithPreloadBlocks added in v1.0.0

func WithPreloadBlocks(ids []tongo.BlockID) Option

func WithTFPools

func WithTFPools(pools []tongo.AccountID) Option

type Options

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

Jump to

Keyboard shortcuts

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