Versions in this module Expand all Collapse all v1 v1.9.9 May 14, 2024 v1.9.8 May 14, 2024 v1.0.0 May 14, 2024 Changes in this version + const ErrCodeContractNotInitialized + var ErrBlockNotFound = errors.New("block not found") + var ErrIncorrectResultType = errors.New("incorrect result type") + var ErrMessageNotAccepted = errors.New("message was not accepted by the contract") + var ErrNoNewBlocks = errors.New("no new blocks in a given timeout or in 10 seconds") + var ErrNoProof = fmt.Errorf(...) + var ErrNoTransactionsWereFound = errors.New("no transactions were found") + var ErrResultIndexOutOfRange = errors.New("result index is out of range") + var ErrTxWasNotFound = errors.New("requested transaction is not found") + func CheckAccountStateProof(addr *address.Address, block *BlockIDExt, stateProof []*cell.Cell, ...) (*tlb.ShardAccount, *tlb.DepthBalanceInfo, error) + func CheckBackwardBlockProof(from, to *BlockIDExt, toKey bool, stateProof, destProof, proof *cell.Cell) error + func CheckBlockProof(proof *cell.Cell, blockRootHash []byte) (*tlb.Block, error) + func CheckBlockShardStateProof(proof []*cell.Cell, blockRootHash []byte) (*tlb.ShardStateUnsplit, error) + func CheckForwardBlockProof(from, to *BlockIDExt, toKey bool, configProof, destProof *cell.Cell, ...) error + func CheckShardInMasterProof(master *BlockIDExt, shardProof []*cell.Cell, workchain int32, ...) error + func CheckShardMcStateExtraProof(master *BlockIDExt, shardProof []*cell.Cell) (*tlb.McStateExtra, error) + func CheckTransactionProof(txHash []byte, txLT uint64, txAccount []byte, ...) error + type APIClient struct + func NewAPIClient(client LiteClient, proofCheckPolicy ...ProofCheckPolicy) *APIClient + func (c *APIClient) Client() LiteClient + func (c *APIClient) CurrentMasterchainInfo(ctx context.Context) (_ *BlockIDExt, err error) + func (c *APIClient) FindLastTransactionByInMsgHash(ctx context.Context, addr *address.Address, msgHash []byte, ...) (*tlb.Transaction, error) + func (c *APIClient) FindLastTransactionByOutMsgHash(ctx context.Context, addr *address.Address, msgHash []byte, ...) (*tlb.Transaction, error) + func (c *APIClient) GetAccount(ctx context.Context, block *BlockIDExt, addr *address.Address) (*tlb.Account, error) + func (c *APIClient) GetBlockData(ctx context.Context, block *BlockIDExt) (*tlb.Block, error) + func (c *APIClient) GetBlockProof(ctx context.Context, known, target *BlockIDExt) (*PartialBlockProof, error) + func (c *APIClient) GetBlockShardsInfo(ctx context.Context, master *BlockIDExt) ([]*BlockIDExt, error) + func (c *APIClient) GetBlockTransactionsV2(ctx context.Context, block *BlockIDExt, count uint32, after ...*TransactionID3) ([]TransactionShortInfo, bool, error) + func (c *APIClient) GetBlockchainConfig(ctx context.Context, block *BlockIDExt, onlyParams ...int32) (*BlockchainConfig, error) + func (c *APIClient) GetLibraries(ctx context.Context, hashes ...[]byte) ([]*cell.Cell, error) + func (c *APIClient) GetMasterchainInfo(ctx context.Context) (*BlockIDExt, error) + func (c *APIClient) GetTime(ctx context.Context) (uint32, error) + func (c *APIClient) GetTransaction(ctx context.Context, block *BlockIDExt, addr *address.Address, lt uint64) (*tlb.Transaction, error) + func (c *APIClient) ListTransactions(ctx context.Context, addr *address.Address, limit uint32, lt uint64, ...) ([]*tlb.Transaction, error) + func (c *APIClient) LookupBlock(ctx context.Context, workchain int32, shard int64, seqno uint32) (*BlockIDExt, error) + func (c *APIClient) RunGetMethod(ctx context.Context, blockInfo *BlockIDExt, addr *address.Address, ...) (*ExecutionResult, error) + func (c *APIClient) SendExternalMessage(ctx context.Context, msg *tlb.ExternalMessage) error + func (c *APIClient) SetTrustedBlock(block *BlockIDExt) + func (c *APIClient) SetTrustedBlockFromConfig(cfg *liteclient.GlobalConfig) + func (c *APIClient) SubscribeOnTransactions(workerCtx context.Context, addr *address.Address, lastProcessedLT uint64, ...) + func (c *APIClient) VerifyProofChain(ctx context.Context, from, to *BlockIDExt) error + func (c *APIClient) WaitForBlock(seqno uint32) APIClientWrapped + func (c *APIClient) WithRetry(maxTries ...int) APIClientWrapped + func (c *APIClient) WithTimeout(timeout time.Duration) APIClientWrapped + type APIClientWaiter = APIClientWrapped + type APIClientWrapped interface + Client func() LiteClient + CurrentMasterchainInfo func(ctx context.Context) (_ *BlockIDExt, err error) + FindLastTransactionByInMsgHash func(ctx context.Context, addr *address.Address, msgHash []byte, ...) (*tlb.Transaction, error) + FindLastTransactionByOutMsgHash func(ctx context.Context, addr *address.Address, msgHash []byte, ...) (*tlb.Transaction, error) + GetAccount func(ctx context.Context, block *BlockIDExt, addr *address.Address) (*tlb.Account, error) + GetBlockData func(ctx context.Context, block *BlockIDExt) (*tlb.Block, error) + GetBlockProof func(ctx context.Context, known, target *BlockIDExt) (*PartialBlockProof, error) + GetBlockShardsInfo func(ctx context.Context, master *BlockIDExt) ([]*BlockIDExt, error) + GetBlockTransactionsV2 func(ctx context.Context, block *BlockIDExt, count uint32, after ...*TransactionID3) ([]TransactionShortInfo, bool, error) + GetBlockchainConfig func(ctx context.Context, block *BlockIDExt, onlyParams ...int32) (*BlockchainConfig, error) + GetLibraries func(ctx context.Context, list ...[]byte) ([]*cell.Cell, error) + GetMasterchainInfo func(ctx context.Context) (*BlockIDExt, error) + GetTime func(ctx context.Context) (uint32, error) + GetTransaction func(ctx context.Context, block *BlockIDExt, addr *address.Address, lt uint64) (*tlb.Transaction, error) + ListTransactions func(ctx context.Context, addr *address.Address, num uint32, lt uint64, ...) ([]*tlb.Transaction, error) + LookupBlock func(ctx context.Context, workchain int32, shard int64, seqno uint32) (*BlockIDExt, error) + RunGetMethod func(ctx context.Context, blockInfo *BlockIDExt, addr *address.Address, ...) (*ExecutionResult, error) + SendExternalMessage func(ctx context.Context, msg *tlb.ExternalMessage) error + SetTrustedBlock func(block *BlockIDExt) + SetTrustedBlockFromConfig func(cfg *liteclient.GlobalConfig) + SubscribeOnTransactions func(workerCtx context.Context, addr *address.Address, lastProcessedLT uint64, ...) + VerifyProofChain func(ctx context.Context, from, to *BlockIDExt) error + WaitForBlock func(seqno uint32) APIClientWrapped + WithRetry func(maxRetries ...int) APIClientWrapped + WithTimeout func(timeout time.Duration) APIClientWrapped + type AccountID struct + ID []byte + Workchain int32 + type AccountState struct + ID *BlockIDExt + Proof []*cell.Cell + Shard *BlockIDExt + ShardProof []*cell.Cell + State *cell.Cell + type AllShardsInfo struct + Data *cell.Cell + ID *BlockIDExt + Proof []*cell.Cell + type BlockData struct + ID *BlockIDExt + Payload []byte + type BlockHeader struct + HeaderProof []byte + ID *BlockIDExt + Mode uint32 + type BlockID struct + FileHash []byte + RootHash []byte + type BlockIDExt = tlb.BlockInfo + func LoadShardsFromHashes(shardHashes *cell.Dictionary, skipPruned bool) (shards []*BlockIDExt, err error) + type BlockInfoShort struct + Seqno int32 + Shard int64 + Workchain int32 + type BlockLinkBackward struct + DestProof []byte + From *BlockIDExt + Proof []byte + StateProof []byte + To *BlockIDExt + ToKeyBlock bool + type BlockLinkForward struct + ConfigProof []byte + DestProof []byte + From *BlockIDExt + SignatureSet *SignatureSet + To *BlockIDExt + ToKeyBlock bool + type BlockState struct + ID *BlockIDExt + type BlockTransactions struct + ID *BlockIDExt + Incomplete bool + Proof *cell.Cell + ReqCount int32 + TransactionIds []TransactionID + type BlockTransactionsExt struct + ID *BlockIDExt + Incomplete bool + Proof []byte + ReqCount int32 + Transactions *cell.Cell + type BlockchainConfig struct + func (b *BlockchainConfig) All() map[int32]*cell.Cell + func (b *BlockchainConfig) Get(id int32) *cell.Cell + type ConfigAll struct + ConfigProof *cell.Cell + ID *BlockIDExt + Mode int + StateProof *cell.Cell + type ContractExecError struct + Code int32 + func (e ContractExecError) Error() string + func (e ContractExecError) Is(err error) bool + type CurrentTime struct + Now uint32 + type ExecutionResult struct + func NewExecutionResult(data []any) *ExecutionResult + func (r ExecutionResult) AsTuple() []any + func (r ExecutionResult) Builder(index uint) (*cell.Builder, error) + func (r ExecutionResult) Cell(index uint) (*cell.Cell, error) + func (r ExecutionResult) Int(index uint) (*big.Int, error) + func (r ExecutionResult) IsNil(index uint) (bool, error) + func (r ExecutionResult) MustBuilder(index uint) *cell.Builder + func (r ExecutionResult) MustCell(index uint) *cell.Cell + func (r ExecutionResult) MustInt(index uint) *big.Int + func (r ExecutionResult) MustIsNil(index uint) bool + func (r ExecutionResult) MustSlice(index uint) *cell.Slice + func (r ExecutionResult) MustTuple(index uint) []any + func (r ExecutionResult) Slice(index uint) (*cell.Slice, error) + func (r ExecutionResult) Tuple(index uint) ([]any, error) + type GetAccountState struct + Account AccountID + ID *BlockIDExt + type GetAccountStatePruned struct + Account AccountID + ID *BlockIDExt + type GetAllShardsInfo struct + ID *BlockIDExt + type GetBlockData struct + ID *BlockIDExt + type GetBlockHeader struct + ID *BlockIDExt + Mode uint32 + type GetBlockProof struct + KnownBlock *BlockIDExt + Mode uint32 + TargetBlock *BlockIDExt + type GetConfigAll struct + BlockID *BlockIDExt + Mode int32 + type GetConfigParams struct + BlockID *BlockIDExt + Mode int32 + Params []int32 + type GetLibraries struct + LibraryList [][]byte + type GetMasterchainInf struct + type GetMasterchainInfoExt struct + Mode uint32 + type GetOneTransaction struct + AccID *AccountID + ID *BlockIDExt + LT int64 + type GetShardBlockProof struct + ID *BlockIDExt + type GetShardInfo struct + Exact bool + ID *BlockIDExt + Shard int64 + Workchain int32 + type GetState struct + Data *cell.Cell + FileHash []byte + ID *BlockIDExt + RootHash []byte + type GetTime struct + type GetTransactions struct + AccID *AccountID + LT int64 + Limit int32 + TxHash []byte + type GetVersion struct + type LSError struct + Code int32 + Text string + func (e LSError) Error() string + func (e LSError) Is(err error) bool + type LibraryEntry struct + Data *cell.Cell + Hash []byte + type LibraryResult struct + Result []*LibraryEntry + type ListBlockTransactions struct + After *TransactionID3 + Count uint32 + ID *BlockIDExt + Mode uint32 + ReverseOrder *True + WantProof *True + type ListBlockTransactionsExt struct + After *TransactionID3 + Count uint32 + ID *BlockIDExt + Mode uint32 + ReverseOrder *True + WantProof *True + type LiteClient interface + QueryLiteserver func(ctx context.Context, payload tl.Serializable, result tl.Serializable) error + StickyContext func(ctx context.Context) context.Context + StickyContextNextNode func(ctx context.Context) (context.Context, error) + StickyNodeID func(ctx context.Context) uint32 + type LookupBlock struct + ID *BlockInfoShort + LT uint64 + Mode uint32 + UTime uint32 + type MasterchainInfo struct + Init *ZeroStateIDExt + Last *BlockIDExt + StateRootHash []byte + type MasterchainInfoExt struct + Capabilities int64 + Init *ZeroStateIDExt + Last *BlockIDExt + LastUTime uint32 + Mode uint32 + Now uint32 + StateRootHash []byte + Version int32 + type Object struct + type PartialBlockProof struct + Complete bool + From *BlockIDExt + Steps []any + To *BlockIDExt + type ProofCheckPolicy int + const ProofCheckPolicyFast + const ProofCheckPolicySecure + const ProofCheckPolicyUnsafe + type RunMethodResult struct + ExitCode int32 + ID *BlockIDExt + InitC7 *cell.Cell + LibExtras *cell.Cell + Mode uint32 + Proof []*cell.Cell + Result *cell.Cell + ShardBlock *BlockIDExt + ShardProof []*cell.Cell + StateProof *cell.Cell + type RunSmcMethod struct + Account AccountID + ID *BlockIDExt + MethodID uint64 + Mode uint32 + Params *cell.Cell + type SendMessage struct + Body []byte + type SendMessageStatus struct + Status int32 + type ShardBlockLink struct + ID *BlockIDExt + Proof []byte + type ShardBlockProof struct + Links []ShardBlockLink + MasterchainID *BlockIDExt + type ShardInfo struct + ID *BlockIDExt + ShardBlock *BlockIDExt + ShardDescription *cell.Cell + ShardProof []*cell.Cell + type Signature struct + NodeIDShort []byte + Signature []byte + type SignatureSet struct + CatchainSeqno int32 + Signatures []Signature + ValidatorSetHash int32 + type TransactionID struct + Account []byte + Flags uint32 + Hash []byte + LT uint64 + type TransactionID3 struct + Account []byte + LT uint64 + type TransactionInfo struct + ID *BlockIDExt + Proof []byte + Transaction []byte + type TransactionList struct + IDs []*BlockIDExt + Transactions []byte + type TransactionShortInfo struct + Account []byte + Hash []byte + LT uint64 + func (t *TransactionShortInfo) ID3() *TransactionID3 + type True struct + type ValidatorItemHashable struct + Addr []byte + Key []byte + Weight uint64 + type ValidatorSetHashable struct + CCSeqno uint32 + Validators []ValidatorItemHashable + type ValidatorSetPRNG struct + func NewValidatorSetPRNG(shard int64, workchain int32, catchainSeqno uint32, seed []byte) *ValidatorSetPRNG + func (r *ValidatorSetPRNG) NextRanged(rg uint64) uint64 + func (r *ValidatorSetPRNG) NextUint64() uint64 + type Version struct + Capabilities int64 + Mode uint32 + Now uint32 + Version int32 + type WaitMasterchainSeqno struct + Seqno int32 + Timeout int32 + type ZeroStateIDExt struct + FileHash []byte + RootHash []byte + Workchain int32