litestorage

package
v1.13.13 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2025 License: MIT Imports: 36 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DedustAssetToCurrency added in v1.3.0

func DedustAssetToCurrency(asset abi.DedustAsset) core.Currency

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) AccountStatusAndInterfaces added in v1.3.0

func (s *LiteStorage) AccountStatusAndInterfaces(addr tongo.AccountID) (tlb.AccountStatus, []abi.ContractInterface, error)

func (*LiteStorage) DedustPools added in v1.3.0

func (s *LiteStorage) DedustPools(ctx context.Context, poolIDs []tongo.AccountID) (map[tongo.AccountID]core.DedustPool, 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) GetAccountInvoicesHistory added in v1.3.0

func (s *LiteStorage) GetAccountInvoicesHistory(ctx context.Context, address tongo.AccountID, limit int, beforeLT *int64) ([]core.InvoicePayment, 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) ([]core.JettonOperation, error)

func (*LiteStorage) GetAccountMultisigs added in v1.3.0

func (s *LiteStorage) GetAccountMultisigs(ctx context.Context, accountID ton.AccountID) ([]core.Multisig, 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) ([]core.NftOperation, error)

func (*LiteStorage) GetAccountPlugins added in v1.3.0

func (s *LiteStorage) GetAccountPlugins(ctx context.Context, accountID ton.AccountID, walletVersion abi.ContractInterface) ([]core.Plugin, 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, descendingOrder bool) ([]*core.Transaction, error)

func (*LiteStorage) GetAccountsStats added in v1.3.0

func (s *LiteStorage) GetAccountsStats(ctx context.Context, accounts []ton.AccountID) ([]core.AccountStat, error)

func (*LiteStorage) GetAllAuctions

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

func (*LiteStorage) GetAllShardsInfo added in v1.3.1

func (s *LiteStorage) GetAllShardsInfo(ctx context.Context, blockID ton.BlockIDExt) ([]ton.BlockIDExt, 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) GetBlockIDsForMasterchain added in v1.3.1

func (s *LiteStorage) GetBlockIDsForMasterchain(ctx context.Context, masterSeqno uint32) ([]ton.BlockID, 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) GetBlockchainBlock added in v1.3.0

func (s *LiteStorage) GetBlockchainBlock(ctx context.Context, id ton.BlockID) ([]byte, 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) GetInvoice added in v1.3.0

func (s *LiteStorage) GetInvoice(ctx context.Context, source, destination tongo.AccountID, invoiceID uuid.UUID, currency string) (core.InvoicePayment, error)

func (*LiteStorage) GetJettonAccountHistoryByID added in v1.3.0

func (s *LiteStorage) GetJettonAccountHistoryByID(ctx context.Context, address, jettonMaster tongo.AccountID, limit int, beforeLT, startTime, endTime *int64) ([]core.JettonOperation, 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) GetJettonMastersByAddresses added in v1.3.0

func (s *LiteStorage) GetJettonMastersByAddresses(ctx context.Context, addresses []ton.AccountID) ([]core.JettonMaster, error)

func (*LiteStorage) GetJettonTransferPayload added in v1.3.0

func (s *LiteStorage) GetJettonTransferPayload(ctx context.Context, accountID, jettonMaster ton.AccountID) (*core.JettonTransferPayload, error)

func (*LiteStorage) GetJettonWalletsByOwnerAddress

func (s *LiteStorage) GetJettonWalletsByOwnerAddress(ctx context.Context, address ton.AccountID, jetton *ton.AccountID, isJettonMaster bool, mintless bool) ([]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) GetLatencyAndLastMasterchainSeqno added in v1.3.0

func (s *LiteStorage) GetLatencyAndLastMasterchainSeqno(ctx context.Context) (int64, uint32, 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) GetMasterchainInfo added in v1.3.1

func (s *LiteStorage) GetMasterchainInfo(ctx context.Context) (liteclient.LiteServerMasterchainInfoC, 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) GetMissedEvents added in v1.3.0

func (s *LiteStorage) GetMissedEvents(ctx context.Context, account ton.AccountID, lt uint64, limit int) ([]oas.AccountEvent, error)

func (*LiteStorage) GetMultisigByID added in v1.3.0

func (s *LiteStorage) GetMultisigByID(ctx context.Context, accountID ton.AccountID) (*core.Multisig, error)

func (*LiteStorage) GetMultisigOrderByID added in v1.3.0

func (s *LiteStorage) GetMultisigOrderByID(ctx context.Context, accountID ton.AccountID) (*core.MultisigOrder, 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) GetNftCollectionsByAddresses added in v1.3.0

func (s *LiteStorage) GetNftCollectionsByAddresses(ctx context.Context, addresses []ton.AccountID) ([]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) GetOutMsgQueueSizes added in v1.3.0

func (s *LiteStorage) GetOutMsgQueueSizes(ctx context.Context) (liteclient.LiteServerOutMsgQueueSizesC, 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) GetReducedBlocks added in v1.3.0

func (s *LiteStorage) GetReducedBlocks(ctx context.Context, from, to int64) ([]core.ReducedBlock, error)

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) GetSubscriptionsV1 added in v1.3.0

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

func (*LiteStorage) GetSubscriptionsV2 added in v1.3.0

func (s *LiteStorage) GetSubscriptionsV2(ctx context.Context, address tongo.AccountID) ([]core.SubscriptionV2, 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) GetTraceWithState added in v1.3.0

func (s *LiteStorage) GetTraceWithState(ctx context.Context, msgHash string) (*core.Trace, int, []abi.MethodInvocation, 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) GetWalletSignatureAllowed added in v1.3.0

func (s *LiteStorage) GetWalletSignatureAllowed(ctx context.Context, accountID ton.AccountID) (bool, 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) 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 []core.STONfiPoolID) (map[tongo.AccountID]core.STONfiPool, error)

func (*LiteStorage) SaveEmulationError added in v1.3.3

func (s *LiteStorage) SaveEmulationError(ctx context.Context, msg *boc.Cell, msgHash string, err error) error

func (*LiteStorage) SaveTraceWithState added in v1.3.0

func (s *LiteStorage) SaveTraceWithState(ctx context.Context, msgHash string, trace *core.Trace, version int, getMethods []abi.MethodInvocation, ttl time.Duration) 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) SubscriptionInfos added in v1.3.1

func (s *LiteStorage) SubscriptionInfos(ctx context.Context, ids []core.SubscriptionID) (map[tongo.AccountID]core.SubscriptionInfo, error)

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