Documentation
¶
Index ¶
- Constants
- Variables
- 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 CheckBlockSignatures(block *BlockIDExt, chainSeqno, setHash uint32, sigs []Signature, ...) error
- func CheckBlockSignaturesSimplex(block *BlockIDExt, chainSeqno, setHash uint32, sessionID []byte, slot int32, ...) 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
- func GetMainValidators(block *BlockIDExt, catConfig tlb.CatchainConfig, ...) ([]*tlb.ValidatorAddr, error)
- func WithDispatchQueueMessagesBOC() func(*GetDispatchQueueMessages)
- func WithDispatchQueueOneAccount() func(*GetDispatchQueueMessages)
- type 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)deprecated
- func (c *APIClient) FindLastTransactionByInMsgHashAfterTime(ctx context.Context, addr *address.Address, msgHash []byte, after time.Time) (*tlb.Transaction, error)
- func (c *APIClient) FindLastTransactionByOutMsgHash(ctx context.Context, addr *address.Address, msgHash []byte, ...) (*tlb.Transaction, error)deprecated
- func (c *APIClient) FindLastTransactionByOutMsgHashAfterTime(ctx context.Context, addr *address.Address, msgHash []byte, after time.Time) (*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) GetBlockDataAsCell(ctx context.Context, block *BlockIDExt) (*cell.Cell, error)
- func (c *APIClient) GetBlockHeader(ctx context.Context, block *BlockIDExt) (*tlb.BlockHeader, error)
- func (c *APIClient) GetBlockOutMsgQueueSize(ctx context.Context, block *BlockIDExt) (*BlockOutMsgQueueSize, 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) GetDispatchQueueInfo(ctx context.Context, block *BlockIDExt, afterAddr *address.Address, ...) (*DispatchQueueInfo, error)
- func (c *APIClient) GetDispatchQueueMessages(ctx context.Context, block *BlockIDExt, addr *address.Address, afterLT uint64, ...) (*DispatchQueueMessages, 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) GetOutMsgQueueSizes(ctx context.Context, wc *int32, shard *int64) (*OutMsgQueueSizes, 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) SendExternalMessageWaitTransaction(ctx context.Context, ext *tlb.ExternalMessage) (*tlb.Transaction, *BlockIDExt, []byte, 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) WithLSInfoInErrors() APIClientWrapped
- func (c *APIClient) WithRetry(maxTries ...int) APIClientWrapped
- func (c *APIClient) WithTimeout(timeout time.Duration) APIClientWrapped
- type APIClientWaiterdeprecated
- type APIClientWrapped
- type AccountDispatchQueueInfo
- type AccountID
- type AccountId
- type AccountState
- type AllShardsInfo
- type BlockData
- type BlockHeader
- type BlockID
- type BlockIDExt
- type BlockInfoShort
- type BlockLinkBackward
- type BlockLinkForward
- type BlockOutMsgQueueSize
- type BlockState
- type BlockTransactions
- type BlockTransactionsExt
- type BlockchainConfig
- type ConfigAll
- type ConsensusCandidateHashDataEmpty
- type ConsensusCandidateHashDataOrdinary
- type ConsensusCandidateID
- type ConsensusCandidateParent
- type ConsensusCandidateWithoutParents
- type ConsensusDataToSign
- type ConsensusSimplexFinalizeVote
- type ContractExecError
- type CurrentTime
- type DispatchQueueInfo
- type DispatchQueueMessage
- type DispatchQueueMessages
- type 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
- type GetAccountStatePruned
- type GetAllShardsInfo
- type GetBlockData
- type GetBlockHeader
- type GetBlockOutMsgQueueSize
- type GetBlockProof
- type GetConfigAll
- type GetConfigParams
- type GetDispatchQueueInfo
- type GetDispatchQueueMessages
- type GetLibraries
- type GetMasterchainInf
- type GetMasterchainInfoExt
- type GetOneTransaction
- type GetOutMsgQueueSizes
- type GetShardBlockProof
- type GetShardInfo
- type GetState
- type GetTime
- type GetTransactions
- type GetVersion
- type LSError
- type LibraryEntry
- type LibraryResult
- type ListBlockTransactions
- type ListBlockTransactionsExt
- type LiteClient
- type LookupBlock
- type MasterchainInfo
- type MasterchainInfoExt
- type Object
- type OutMsgQueueSize
- type OutMsgQueueSizes
- type PartialBlockProof
- type ProofCheckPolicy
- type RunMethodResult
- type RunSmcMethod
- type SendMessage
- type SendMessageStatus
- type ShardBlockLink
- type ShardBlockProof
- type ShardInfo
- type Signature
- type SignatureSet
- type SignatureSetOrdinary
- type SignatureSetSimplex
- type TransactionID
- type TransactionID3
- type TransactionInfo
- type TransactionList
- type TransactionMetadata
- type TransactionShortInfo
- type True
- type ValidatorItemHashable
- type ValidatorSetHashable
- type ValidatorSetPRNG
- type Version
- type WaitMasterchainSeqno
- type ZeroStateIDExt
Constants ¶
const (
ErrCodeContractNotInitialized = -256
)
Variables ¶
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 ErrNoAddrInProof = errors.New("no addr info in proof hashmap")
var ErrNoNewBlocks = errors.New("no new blocks in a given timeout or in 10 seconds")
var ErrNoProof = fmt.Errorf("liteserver has no proof for this account in a given block, request newer block or disable proof checks")
var ErrNoTransactionsWereFound = errors.New("no transactions were found")
var ErrResultIndexOutOfRange = errors.New("result index is out of range")
var ErrTxWasNotConfirmed = errors.New("transaction was not confirmed in a given deadline, but it may still be confirmed later")
var ErrTxWasNotFound = errors.New("requested transaction is not found")
Functions ¶
func CheckAccountStateProof ¶ added in v1.8.0
func CheckAccountStateProof(addr *address.Address, block *BlockIDExt, stateProof []*cell.Cell, shardProof []*cell.Cell, shardHash []byte, skipBlockCheck bool) (*tlb.ShardAccount, *tlb.DepthBalanceInfo, error)
func CheckBackwardBlockProof ¶ added in v1.8.0
func CheckBackwardBlockProof(from, to *BlockIDExt, toKey bool, stateProof, destProof, proof *cell.Cell) error
func CheckBlockProof ¶ added in v1.8.0
func CheckBlockShardStateProof ¶ added in v1.8.0
func CheckBlockSignatures ¶ added in v1.11.0
func CheckBlockSignatures(block *BlockIDExt, chainSeqno, setHash uint32, sigs []Signature, validators []*tlb.ValidatorAddr) error
func CheckBlockSignaturesSimplex ¶ added in v1.16.0
func CheckBlockSignaturesSimplex(block *BlockIDExt, chainSeqno, setHash uint32, sessionID []byte, slot int32, candidate []byte, sigs []Signature, validators []*tlb.ValidatorAddr) error
func CheckForwardBlockProof ¶ added in v1.8.0
func CheckShardInMasterProof ¶ added in v1.8.0
func CheckShardMcStateExtraProof ¶ added in v1.8.0
func CheckShardMcStateExtraProof(master *BlockIDExt, shardProof []*cell.Cell) (*tlb.McStateExtra, error)
func CheckTransactionProof ¶ added in v1.8.0
func GetMainValidators ¶ added in v1.11.0
func GetMainValidators(block *BlockIDExt, catConfig tlb.CatchainConfig, validatorConfig tlb.ValidatorSetAny, ccSeqno uint32) ([]*tlb.ValidatorAddr, error)
func WithDispatchQueueMessagesBOC ¶ added in v1.16.0
func WithDispatchQueueMessagesBOC() func(*GetDispatchQueueMessages)
func WithDispatchQueueOneAccount ¶ added in v1.16.0
func WithDispatchQueueOneAccount() func(*GetDispatchQueueMessages)
Types ¶
type APIClient ¶
type APIClient struct {
// contains filtered or unexported fields
}
func NewAPIClient ¶
func NewAPIClient(client LiteClient, proofCheckPolicy ...ProofCheckPolicy) *APIClient
func (*APIClient) Client ¶ added in v1.3.0
func (c *APIClient) Client() LiteClient
func (*APIClient) CurrentMasterchainInfo ¶ added in v1.1.0
func (c *APIClient) CurrentMasterchainInfo(ctx context.Context) (_ *BlockIDExt, err error)
CurrentMasterchainInfo - cached version of GetMasterchainInfo to not do it in parallel many times
func (*APIClient) FindLastTransactionByInMsgHash
deprecated
added in
v1.9.6
func (c *APIClient) FindLastTransactionByInMsgHash(ctx context.Context, addr *address.Address, msgHash []byte, maxTxNumToScan ...int) (*tlb.Transaction, error)
Deprecated: use FindLastTransactionByInMsgHashAfterTime, to search by message hash and not body hash FindLastTransactionByInMsgHash returns last transaction in account where incoming message (payload) hash equal to msgHash.
func (*APIClient) FindLastTransactionByInMsgHashAfterTime ¶ added in v1.16.0
func (c *APIClient) FindLastTransactionByInMsgHashAfterTime(ctx context.Context, addr *address.Address, msgHash []byte, after time.Time) (*tlb.Transaction, error)
FindLastTransactionByInMsgHashAfterTime returns last transaction in account where incoming message hash equal to msgHash. Checks all account transactions after specified time, use estimated execution time, it allows us to reduce scanning depth
func (*APIClient) FindLastTransactionByOutMsgHash
deprecated
added in
v1.9.6
func (c *APIClient) FindLastTransactionByOutMsgHash(ctx context.Context, addr *address.Address, msgHash []byte, maxTxNumToScan ...int) (*tlb.Transaction, error)
Deprecated: use FindLastTransactionByOutMsgHashAfterTime, to search by message hash and not body hash FindLastTransactionByOutMsgHash returns last transaction in account where one of outgoing message (payload) hashes equal to msgHash.
func (*APIClient) FindLastTransactionByOutMsgHashAfterTime ¶ added in v1.16.0
func (c *APIClient) FindLastTransactionByOutMsgHashAfterTime(ctx context.Context, addr *address.Address, msgHash []byte, after time.Time) (*tlb.Transaction, error)
FindLastTransactionByOutMsgHashAfterTime returns last transaction in account where outgoing message hash equal to msgHash. Checks all account transactions after specified time, use estimated execution time, it allows us to reduce scanning depth
func (*APIClient) GetAccount ¶ added in v0.3.0
func (*APIClient) GetBlockData ¶ added in v0.8.0
GetBlockData - get block detailed information
func (*APIClient) GetBlockDataAsCell ¶ added in v1.14.1
GetBlockDataAsCell - get block detailed information as a cell
func (*APIClient) GetBlockHeader ¶ added in v1.16.0
func (c *APIClient) GetBlockHeader(ctx context.Context, block *BlockIDExt) (*tlb.BlockHeader, error)
GetBlockHeader - get block detailed information
func (*APIClient) GetBlockOutMsgQueueSize ¶ added in v1.16.0
func (c *APIClient) GetBlockOutMsgQueueSize(ctx context.Context, block *BlockIDExt) (*BlockOutMsgQueueSize, error)
func (*APIClient) GetBlockProof ¶ added in v1.8.0
func (c *APIClient) GetBlockProof(ctx context.Context, known, target *BlockIDExt) (*PartialBlockProof, error)
GetBlockProof - gets proof chain for the block
func (*APIClient) GetBlockShardsInfo ¶ added in v0.9.0
func (c *APIClient) GetBlockShardsInfo(ctx context.Context, master *BlockIDExt) ([]*BlockIDExt, error)
GetBlockShardsInfo - gets the information about workchains and its shards at given masterchain state
func (*APIClient) GetBlockTransactionsV2 ¶ added in v1.6.0
func (c *APIClient) GetBlockTransactionsV2(ctx context.Context, block *BlockIDExt, count uint32, after ...*TransactionID3) ([]TransactionShortInfo, bool, error)
GetBlockTransactionsV2 - a list of block transactions
func (*APIClient) GetBlockchainConfig ¶ added in v1.4.0
func (c *APIClient) GetBlockchainConfig(ctx context.Context, block *BlockIDExt, onlyParams ...int32) (*BlockchainConfig, error)
func (*APIClient) GetDispatchQueueInfo ¶ added in v1.16.0
func (c *APIClient) GetDispatchQueueInfo(ctx context.Context, block *BlockIDExt, afterAddr *address.Address, maxAccounts int) (*DispatchQueueInfo, error)
func (*APIClient) GetDispatchQueueMessages ¶ added in v1.16.0
func (c *APIClient) GetDispatchQueueMessages(ctx context.Context, block *BlockIDExt, addr *address.Address, afterLT uint64, maxMessages int, options ...func(*GetDispatchQueueMessages)) (*DispatchQueueMessages, error)
func (*APIClient) GetLibraries ¶ added in v1.8.4
func (*APIClient) GetMasterchainInfo ¶ added in v0.9.0
func (c *APIClient) GetMasterchainInfo(ctx context.Context) (*BlockIDExt, error)
GetMasterchainInfo - gets the latest state of master chain
func (*APIClient) GetOutMsgQueueSizes ¶ added in v1.16.0
func (*APIClient) GetTransaction ¶ added in v0.9.0
func (c *APIClient) GetTransaction(ctx context.Context, block *BlockIDExt, addr *address.Address, lt uint64) (*tlb.Transaction, error)
func (*APIClient) ListTransactions ¶ added in v0.5.0
func (c *APIClient) ListTransactions(ctx context.Context, addr *address.Address, limit uint32, lt uint64, txHash []byte) ([]*tlb.Transaction, error)
ListTransactions - returns list of transactions before (including) passed lt and hash, the oldest one is first in result slice Transactions will be verified to match final tx hash, which should be taken from proved account state, then it is safe.
func (*APIClient) LookupBlock ¶ added in v0.9.0
func (c *APIClient) LookupBlock(ctx context.Context, workchain int32, shard int64, seqno uint32) (*BlockIDExt, error)
LookupBlock - find block information by seqno, shard and chain
func (*APIClient) RunGetMethod ¶
func (c *APIClient) RunGetMethod(ctx context.Context, blockInfo *BlockIDExt, addr *address.Address, method string, params ...any) (*ExecutionResult, error)
func (*APIClient) SendExternalMessage ¶ added in v0.4.0
func (*APIClient) SendExternalMessageWaitTransaction ¶ added in v1.10.0
func (c *APIClient) SendExternalMessageWaitTransaction(ctx context.Context, ext *tlb.ExternalMessage) (*tlb.Transaction, *BlockIDExt, []byte, error)
func (*APIClient) SetTrustedBlock ¶ added in v1.8.0
func (c *APIClient) SetTrustedBlock(block *BlockIDExt)
SetTrustedBlock - set starting point to verify master block proofs chain
func (*APIClient) SetTrustedBlockFromConfig ¶ added in v1.8.0
func (c *APIClient) SetTrustedBlockFromConfig(cfg *liteclient.GlobalConfig)
SetTrustedBlockFromConfig - same as SetTrustedBlock but takes init block from config
func (*APIClient) SubscribeOnTransactions ¶ added in v1.8.0
func (*APIClient) VerifyProofChain ¶ added in v1.8.0
func (c *APIClient) VerifyProofChain(ctx context.Context, from, to *BlockIDExt) error
func (*APIClient) WaitForBlock ¶ added in v1.7.0
func (c *APIClient) WaitForBlock(seqno uint32) APIClientWrapped
WaitForBlock - waits for the given master block seqno will be available on the requested node
func (*APIClient) WithLSInfoInErrors ¶ added in v1.16.0
func (c *APIClient) WithLSInfoInErrors() APIClientWrapped
func (*APIClient) WithRetry ¶ added in v1.8.0
func (c *APIClient) WithRetry(maxTries ...int) APIClientWrapped
WithRetry If maxTries = 0
Automatically retires request to another available liteserver when ADNL timeout, or error code 651 or -400 is received.
If maxTries > 0
Limits additional attempts to this number.
func (*APIClient) WithTimeout ¶ added in v1.9.0
func (c *APIClient) WithTimeout(timeout time.Duration) APIClientWrapped
WithTimeout add timeout to each LiteServer request
type APIClientWaiter
deprecated
added in
v1.7.0
type APIClientWaiter = APIClientWrapped
Deprecated: use APIClientWrapped
type APIClientWrapped ¶ added in v1.8.0
type APIClientWrapped interface {
Client() LiteClient
GetTime(ctx context.Context) (uint32, error)
GetLibraries(ctx context.Context, list ...[]byte) ([]*cell.Cell, error)
LookupBlock(ctx context.Context, workchain int32, shard int64, seqno uint32) (*BlockIDExt, error)
GetBlockData(ctx context.Context, block *BlockIDExt) (*tlb.Block, error)
GetBlockHeader(ctx context.Context, block *BlockIDExt) (*tlb.BlockHeader, error)
GetBlockTransactionsV2(ctx context.Context, block *BlockIDExt, count uint32, after ...*TransactionID3) ([]TransactionShortInfo, bool, error)
GetBlockShardsInfo(ctx context.Context, master *BlockIDExt) ([]*BlockIDExt, error)
GetBlockchainConfig(ctx context.Context, block *BlockIDExt, onlyParams ...int32) (*BlockchainConfig, error)
GetMasterchainInfo(ctx context.Context) (*BlockIDExt, error)
GetAccount(ctx context.Context, block *BlockIDExt, addr *address.Address) (*tlb.Account, error)
SendExternalMessage(ctx context.Context, msg *tlb.ExternalMessage) error
SendExternalMessageWaitTransaction(ctx context.Context, msg *tlb.ExternalMessage) (*tlb.Transaction, *BlockIDExt, []byte, error)
RunGetMethod(ctx context.Context, blockInfo *BlockIDExt, addr *address.Address, method string, params ...interface{}) (*ExecutionResult, error)
ListTransactions(ctx context.Context, addr *address.Address, num uint32, lt uint64, txHash []byte) ([]*tlb.Transaction, error)
GetTransaction(ctx context.Context, block *BlockIDExt, addr *address.Address, lt uint64) (*tlb.Transaction, error)
GetBlockProof(ctx context.Context, known, target *BlockIDExt) (*PartialBlockProof, error)
CurrentMasterchainInfo(ctx context.Context) (_ *BlockIDExt, err error)
SubscribeOnTransactions(workerCtx context.Context, addr *address.Address, lastProcessedLT uint64, channel chan<- *tlb.Transaction)
VerifyProofChain(ctx context.Context, from, to *BlockIDExt) error
WaitForBlock(seqno uint32) APIClientWrapped
WithRetry(maxRetries ...int) APIClientWrapped
WithTimeout(timeout time.Duration) APIClientWrapped
WithLSInfoInErrors() APIClientWrapped
SetTrustedBlock(block *BlockIDExt)
SetTrustedBlockFromConfig(cfg *liteclient.GlobalConfig)
FindLastTransactionByInMsgHash(ctx context.Context, addr *address.Address, msgHash []byte, maxTxNumToScan ...int) (*tlb.Transaction, error)
FindLastTransactionByOutMsgHash(ctx context.Context, addr *address.Address, msgHash []byte, maxTxNumToScan ...int) (*tlb.Transaction, error)
FindLastTransactionByInMsgHashAfterTime(ctx context.Context, addr *address.Address, msgHash []byte, after time.Time) (*tlb.Transaction, error)
FindLastTransactionByOutMsgHashAfterTime(ctx context.Context, addr *address.Address, msgHash []byte, after time.Time) (*tlb.Transaction, error)
GetOutMsgQueueSizes(ctx context.Context, wc *int32, shard *int64) (*OutMsgQueueSizes, error)
GetBlockOutMsgQueueSize(ctx context.Context, block *BlockIDExt) (*BlockOutMsgQueueSize, error)
GetDispatchQueueInfo(ctx context.Context, block *BlockIDExt, afterAddr *address.Address, maxAccounts int) (*DispatchQueueInfo, error)
GetDispatchQueueMessages(ctx context.Context, block *BlockIDExt, addr *address.Address, afterLT uint64, maxMessages int, options ...func(*GetDispatchQueueMessages)) (*DispatchQueueMessages, error)
}
type AccountDispatchQueueInfo ¶ added in v1.16.0
type AccountDispatchQueueInfo struct {
Addr []byte `tl:"int256"`
Size int64 `tl:"long"`
MinLT uint64 `tl:"long"`
MaxLT uint64 `tl:"long"`
}
func (*AccountDispatchQueueInfo) Address ¶ added in v1.16.0
func (m *AccountDispatchQueueInfo) Address() *address.Address
type AccountState ¶ added in v1.6.0
type AccountState struct {
ID *BlockIDExt `tl:"struct"`
Shard *BlockIDExt `tl:"struct"`
ShardProof []*cell.Cell `tl:"cell optional 2"`
Proof []*cell.Cell `tl:"cell optional 2"`
State *cell.Cell `tl:"cell optional"`
}
type AllShardsInfo ¶ added in v1.6.0
type AllShardsInfo struct {
ID *BlockIDExt `tl:"struct"`
Proof []*cell.Cell `tl:"cell"`
Data *cell.Cell `tl:"cell"`
}
type BlockData ¶ added in v1.6.0
type BlockData struct {
ID *BlockIDExt `tl:"struct"`
Payload []byte `tl:"bytes"`
}
type BlockHeader ¶ added in v1.6.0
type BlockHeader struct {
ID *BlockIDExt `tl:"struct"`
Mode uint32 `tl:"flags"`
HeaderProof []byte `tl:"bytes"`
}
type BlockIDExt ¶ added in v1.6.0
type BlockIDExt struct {
Workchain int32 `tl:"int"`
Shard int64 `tl:"long"`
SeqNo uint32 `tl:"int"`
RootHash []byte `tl:"int256"`
FileHash []byte `tl:"int256"`
}
func GetParentBlocks ¶ added in v1.15.0
func GetParentBlocks(h *tlb.BlockHeader) ([]*BlockIDExt, error)
func LoadShardsFromHashes ¶ added in v1.8.0
func LoadShardsFromHashes(shardHashes *cell.Dictionary, skipPruned bool) (shards []*BlockIDExt, err error)
func (*BlockIDExt) Copy ¶ added in v1.15.0
func (h *BlockIDExt) Copy() *BlockIDExt
func (*BlockIDExt) Equals ¶ added in v1.15.0
func (h *BlockIDExt) Equals(h2 *BlockIDExt) bool
type BlockInfoShort ¶ added in v1.6.0
type BlockLinkBackward ¶ added in v1.8.0
type BlockLinkBackward struct {
ToKeyBlock bool `tl:"bool"`
From *BlockIDExt `tl:"struct"`
To *BlockIDExt `tl:"struct"`
DestProof []byte `tl:"bytes"`
Proof []byte `tl:"bytes"`
StateProof []byte `tl:"bytes"`
}
type BlockLinkForward ¶ added in v1.8.0
type BlockLinkForward struct {
ToKeyBlock bool `tl:"bool"`
From *BlockIDExt `tl:"struct"`
To *BlockIDExt `tl:"struct"`
DestProof []byte `tl:"bytes"`
ConfigProof []byte `tl:"bytes"`
SignatureSet any `tl:"struct boxed [liteServer.signatureSet,liteServer.signatureSet.ordinary,liteServer.signatureSet.simplex]"`
}
type BlockOutMsgQueueSize ¶ added in v1.16.0
type BlockOutMsgQueueSize struct {
Mode uint32 `tl:"flags"`
ID *BlockIDExt `tl:"struct"`
Size int64 `tl:"long"`
Proof []byte `tl:"?0 bytes"`
}
type BlockState ¶ added in v1.9.0
type BlockState struct {
ID *BlockIDExt `tl:"struct"`
}
type BlockTransactions ¶ added in v1.6.0
type BlockTransactions struct {
ID *BlockIDExt `tl:"struct"`
ReqCount int32 `tl:"int"`
Incomplete bool `tl:"bool"`
TransactionIds []TransactionID `tl:"vector struct"`
Proof *cell.Cell `tl:"cell optional"`
}
type BlockTransactionsExt ¶ added in v1.9.0
type BlockchainConfig ¶ added in v1.4.0
type BlockchainConfig struct {
// contains filtered or unexported fields
}
type ConsensusCandidateHashDataEmpty ¶ added in v1.16.0
type ConsensusCandidateHashDataEmpty struct {
Block BlockIDExt `tl:"struct"`
Parent ConsensusCandidateID `tl:"struct"`
}
type ConsensusCandidateHashDataOrdinary ¶ added in v1.16.0
type ConsensusCandidateHashDataOrdinary struct {
Block BlockIDExt `tl:"struct"`
CollatedFileHash []byte `tl:"int256"`
Parent any `tl:"struct boxed [consensus.candidateParent,consensus.candidateWithoutParents]"`
}
type ConsensusCandidateID ¶ added in v1.16.0
type ConsensusCandidateParent ¶ added in v1.16.0
type ConsensusCandidateParent struct {
ID any `tl:"struct boxed [consensus.candidateId]"`
}
type ConsensusCandidateWithoutParents ¶ added in v1.16.0
type ConsensusCandidateWithoutParents struct{}
type ConsensusDataToSign ¶ added in v1.16.0
type ConsensusSimplexFinalizeVote ¶ added in v1.16.0
type ConsensusSimplexFinalizeVote struct {
ID any `tl:"struct boxed [consensus.candidateId]"`
}
type ContractExecError ¶ added in v0.7.2
type ContractExecError struct {
Code int32
}
func (ContractExecError) Error ¶ added in v0.7.2
func (e ContractExecError) Error() string
func (ContractExecError) Is ¶ added in v0.7.2
func (e ContractExecError) Is(err error) bool
type CurrentTime ¶ added in v1.6.0
type CurrentTime struct {
Now uint32 `tl:"int"`
}
type DispatchQueueInfo ¶ added in v1.16.0
type DispatchQueueInfo struct {
Mode uint32 `tl:"flags"`
ID *BlockIDExt `tl:"struct"`
AccountDispatchQueues []AccountDispatchQueueInfo `tl:"vector struct"`
Complete bool `tl:"bool"`
Proof []byte `tl:"?0 bytes"`
}
type DispatchQueueMessage ¶ added in v1.16.0
type DispatchQueueMessage struct {
Addr []byte `tl:"int256"`
LT uint64 `tl:"long"`
Hash []byte `tl:"int256"`
Metadata TransactionMetadata `tl:"struct"`
}
func (*DispatchQueueMessage) Address ¶ added in v1.16.0
func (m *DispatchQueueMessage) Address() *address.Address
type DispatchQueueMessages ¶ added in v1.16.0
type DispatchQueueMessages struct {
Mode uint32 `tl:"flags"`
ID *BlockIDExt `tl:"struct"`
Messages []DispatchQueueMessage `tl:"vector struct"`
Complete bool `tl:"bool"`
Proof []byte `tl:"?0 bytes"`
MessagesBOC []byte `tl:"?2 bytes"`
}
func (*DispatchQueueMessages) GetTotalMessagesCount ¶ added in v1.16.0
func (m *DispatchQueueMessages) GetTotalMessagesCount() int
type ExecutionResult ¶ added in v1.3.0
type ExecutionResult struct {
// contains filtered or unexported fields
}
func NewExecutionResult ¶ added in v1.3.0
func NewExecutionResult(data []any) *ExecutionResult
func (ExecutionResult) AsTuple ¶ added in v1.3.0
func (r ExecutionResult) AsTuple() []any
func (ExecutionResult) Builder ¶ added in v1.3.0
func (r ExecutionResult) Builder(index uint) (*cell.Builder, error)
func (ExecutionResult) Cell ¶ added in v1.3.0
func (r ExecutionResult) Cell(index uint) (*cell.Cell, error)
func (ExecutionResult) Int ¶ added in v1.3.0
func (r ExecutionResult) Int(index uint) (*big.Int, error)
func (ExecutionResult) IsNil ¶ added in v1.3.0
func (r ExecutionResult) IsNil(index uint) (bool, error)
func (ExecutionResult) MustBuilder ¶ added in v1.3.0
func (r ExecutionResult) MustBuilder(index uint) *cell.Builder
func (ExecutionResult) MustCell ¶ added in v1.3.0
func (r ExecutionResult) MustCell(index uint) *cell.Cell
func (ExecutionResult) MustInt ¶ added in v1.3.0
func (r ExecutionResult) MustInt(index uint) *big.Int
func (ExecutionResult) MustIsNil ¶ added in v1.3.0
func (r ExecutionResult) MustIsNil(index uint) bool
func (ExecutionResult) MustSlice ¶ added in v1.3.0
func (r ExecutionResult) MustSlice(index uint) *cell.Slice
func (ExecutionResult) MustTuple ¶ added in v1.3.0
func (r ExecutionResult) MustTuple(index uint) []any
type GetAccountState ¶ added in v1.6.0
type GetAccountState struct {
ID *BlockIDExt `tl:"struct"`
Account AccountID `tl:"struct"`
}
type GetAccountStatePruned ¶ added in v1.9.0
type GetAccountStatePruned struct {
ID *BlockIDExt `tl:"struct"`
Account AccountID `tl:"struct"`
}
type GetAllShardsInfo ¶ added in v1.6.0
type GetAllShardsInfo struct {
ID *BlockIDExt `tl:"struct"`
}
type GetBlockData ¶ added in v1.6.0
type GetBlockData struct {
ID *BlockIDExt `tl:"struct"`
}
type GetBlockHeader ¶ added in v1.9.0
type GetBlockHeader struct {
ID *BlockIDExt `tl:"struct"`
Mode uint32 `tl:"flags"`
}
type GetBlockOutMsgQueueSize ¶ added in v1.16.0
type GetBlockOutMsgQueueSize struct {
Mode uint32 `tl:"flags"`
ID *BlockIDExt `tl:"struct"`
WantProof *True `tl:"?0 struct"`
}
type GetBlockProof ¶ added in v1.8.0
type GetBlockProof struct {
Mode uint32 `tl:"flags"`
KnownBlock *BlockIDExt `tl:"struct"`
TargetBlock *BlockIDExt `tl:"?0 struct"`
}
type GetConfigAll ¶ added in v1.6.0
type GetConfigAll struct {
Mode int32 `tl:"int"`
BlockID *BlockIDExt `tl:"struct"`
}
type GetConfigParams ¶ added in v1.6.0
type GetConfigParams struct {
Mode int32 `tl:"int"`
BlockID *BlockIDExt `tl:"struct"`
Params []int32 `tl:"vector int"`
}
type GetDispatchQueueInfo ¶ added in v1.16.0
type GetDispatchQueueInfo struct {
Mode uint32 `tl:"flags"`
ID *BlockIDExt `tl:"struct"`
AfterAddr []byte `tl:"?1 int256"`
MaxAccounts int32 `tl:"int"`
WantProof *True `tl:"?0 struct"`
}
type GetDispatchQueueMessages ¶ added in v1.16.0
type GetLibraries ¶ added in v1.8.4
type GetLibraries struct {
LibraryList [][]byte `tl:"vector int256"`
}
type GetMasterchainInf ¶ added in v1.6.0
type GetMasterchainInf struct{}
type GetMasterchainInfoExt ¶ added in v1.9.0
type GetMasterchainInfoExt struct {
Mode uint32 `tl:"flags"`
}
type GetOneTransaction ¶ added in v1.6.0
type GetOneTransaction struct {
ID *BlockIDExt `tl:"struct"`
AccID *AccountID `tl:"struct"`
LT int64 `tl:"long"`
}
type GetOutMsgQueueSizes ¶ added in v1.16.0
type GetShardBlockProof ¶ added in v1.9.0
type GetShardBlockProof struct {
ID *BlockIDExt `tl:"struct"`
}
type GetShardInfo ¶ added in v1.9.0
type GetShardInfo struct {
ID *BlockIDExt `tl:"struct"`
Workchain int32 `tl:"int"`
Shard int64 `tl:"long"`
Exact bool `tl:"bool"`
}
type GetState ¶ added in v1.9.0
type GetState struct {
ID *BlockIDExt `tl:"struct"`
RootHash []byte `tl:"int256"`
FileHash []byte `tl:"int256"`
Data *cell.Cell `tl:"cell"`
}
type GetTransactions ¶ added in v1.6.0
type GetVersion ¶ added in v1.9.0
type GetVersion struct{}
type LibraryEntry ¶ added in v1.8.4
type LibraryResult ¶ added in v1.8.4
type LibraryResult struct {
Result []*LibraryEntry `tl:"vector struct"`
}
type ListBlockTransactions ¶ added in v1.6.0
type ListBlockTransactions struct {
ID *BlockIDExt `tl:"struct"`
Mode uint32 `tl:"flags"`
Count uint32 `tl:"int"`
After *TransactionID3 `tl:"?7 struct"`
ReverseOrder *True `tl:"?6 struct"`
WantProof *True `tl:"?5 struct"`
}
type ListBlockTransactionsExt ¶ added in v1.9.0
type ListBlockTransactionsExt struct {
ID *BlockIDExt `tl:"struct"`
Mode uint32 `tl:"flags"`
Count uint32 `tl:"int"`
After *TransactionID3 `tl:"?7 struct"`
ReverseOrder *True `tl:"?6 struct"`
WantProof *True `tl:"?5 struct"`
}
type LiteClient ¶
type LiteClient interface {
QueryLiteserver(ctx context.Context, payload tl.Serializable, result tl.Serializable) error
StickyContext(ctx context.Context) context.Context
StickyContextNextNode(ctx context.Context) (context.Context, error)
StickyContextNextNodeBalanced(ctx context.Context) (context.Context, error)
StickyNodeID(ctx context.Context) uint32
}
type LookupBlock ¶ added in v1.6.0
type LookupBlock struct {
Mode uint32 `tl:"flags"`
ID *BlockInfoShort `tl:"struct"`
LT uint64 `tl:"?1 long"`
UTime uint32 `tl:"?2 int"`
}
type MasterchainInfo ¶ added in v1.6.0
type MasterchainInfo struct {
Last *BlockIDExt `tl:"struct"`
StateRootHash []byte `tl:"int256"`
Init *ZeroStateIDExt `tl:"struct"`
}
type MasterchainInfoExt ¶ added in v1.9.0
type MasterchainInfoExt struct {
Mode uint32 `tl:"flags"`
Version int32 `tl:"int"`
Capabilities int64 `tl:"long"`
Last *BlockIDExt `tl:"struct"`
LastUTime uint32 `tl:"int"`
Now uint32 `tl:"int"`
StateRootHash []byte `tl:"int256"`
Init *ZeroStateIDExt `tl:"struct"`
}
type OutMsgQueueSize ¶ added in v1.16.0
type OutMsgQueueSize struct {
ID *BlockIDExt `tl:"struct"`
Size int32 `tl:"int"`
}
type OutMsgQueueSizes ¶ added in v1.16.0
type OutMsgQueueSizes struct {
Shards []OutMsgQueueSize `tl:"vector struct"`
ExtMsgQueueSizeLimit int32 `tl:"int"`
}
type PartialBlockProof ¶ added in v1.8.0
type PartialBlockProof struct {
Complete bool `tl:"bool"`
From *BlockIDExt `tl:"struct"`
To *BlockIDExt `tl:"struct"`
Steps []any `tl:"vector struct boxed [liteServer.blockLinkForward, liteServer.blockLinkBack]"`
}
type ProofCheckPolicy ¶ added in v1.8.0
type ProofCheckPolicy int
const ( ProofCheckPolicyUnsafe ProofCheckPolicy = iota ProofCheckPolicyFast // Without master block checks ProofCheckPolicySecure )
type RunMethodResult ¶ added in v1.6.0
type RunMethodResult struct {
Mode uint32 `tl:"flags"`
ID *BlockIDExt `tl:"struct"`
ShardBlock *BlockIDExt `tl:"struct"`
ShardProof []*cell.Cell `tl:"?0 cell optional 2"`
Proof []*cell.Cell `tl:"?0 cell optional 2"`
StateProof *cell.Cell `tl:"?1 cell optional"`
InitC7 *cell.Cell `tl:"?3 cell optional"`
LibExtras *cell.Cell `tl:"?4 cell optional"`
ExitCode int32 `tl:"int"`
Result *cell.Cell `tl:"?2 cell optional"`
}
type RunSmcMethod ¶ added in v1.6.0
type SendMessage ¶ added in v1.6.0
type SendMessage struct {
Body []byte `tl:"bytes"`
}
type SendMessageStatus ¶ added in v1.6.0
type SendMessageStatus struct {
Status int32 `tl:"int"`
}
type ShardBlockLink ¶ added in v1.9.0
type ShardBlockLink struct {
ID *BlockIDExt `tl:"struct"`
Proof []byte `tl:"bytes"`
}
type ShardBlockProof ¶ added in v1.9.0
type ShardBlockProof struct {
MasterchainID *BlockIDExt `tl:"struct"`
Links []ShardBlockLink `tl:"vector struct"`
}
type ShardInfo ¶ added in v1.9.0
type ShardInfo struct {
ID *BlockIDExt `tl:"struct"`
ShardBlock *BlockIDExt `tl:"struct"`
ShardProof []*cell.Cell `tl:"cell optional 2"`
ShardDescription *cell.Cell `tl:"cell optional"`
}
type SignatureSet ¶ added in v1.8.0
type SignatureSetOrdinary ¶ added in v1.16.0
type SignatureSetSimplex ¶ added in v1.16.0
type TransactionID ¶ added in v1.6.0
type TransactionID3 ¶ added in v1.6.0
type TransactionInfo ¶ added in v1.6.0
type TransactionInfo struct {
ID *BlockIDExt `tl:"struct"`
Proof []byte `tl:"bytes"`
Transaction []byte `tl:"bytes"`
}
type TransactionList ¶ added in v1.6.0
type TransactionList struct {
IDs []*BlockIDExt `tl:"vector struct"`
Transactions []byte `tl:"bytes"`
}
type TransactionMetadata ¶ added in v1.16.0
type TransactionMetadata struct {
Mode uint32 `tl:"flags"`
Depth int32 `tl:"int"`
Initiator AccountId `tl:"struct"`
InitiatorLT uint64 `tl:"long"`
}
func (*TransactionMetadata) InitiatorAddress ¶ added in v1.16.0
func (m *TransactionMetadata) InitiatorAddress() *address.Address
type TransactionShortInfo ¶ added in v1.6.0
func (*TransactionShortInfo) ID3 ¶ added in v1.6.0
func (t *TransactionShortInfo) ID3() *TransactionID3
type ValidatorItemHashable ¶ added in v1.8.0
type ValidatorSetHashable ¶ added in v1.8.0
type ValidatorSetHashable struct {
CCSeqno uint32 `tl:"int"`
Validators []ValidatorItemHashable `tl:"vector struct"`
}
type ValidatorSetPRNG ¶ added in v1.8.0
type ValidatorSetPRNG struct {
// contains filtered or unexported fields
}
func NewValidatorSetPRNG ¶ added in v1.8.0
func NewValidatorSetPRNG(shard int64, workchain int32, catchainSeqno uint32, seed []byte) *ValidatorSetPRNG
func (*ValidatorSetPRNG) NextRanged ¶ added in v1.8.0
func (r *ValidatorSetPRNG) NextRanged(rg uint64) uint64
func (*ValidatorSetPRNG) NextUint64 ¶ added in v1.8.0
func (r *ValidatorSetPRNG) NextUint64() uint64