Documentation
¶
Overview ¶
Package tlb: writable augmentation semantics for the block/state augmented dictionaries.
Every augmentation below mirrors the corresponding C++ Aug_* implementation from the TON reference sources. Citations point into the local checkout at /Users/xssnick/dev/ton/ton (crypto/block/block-parse.{h,cpp} and crypto/block/block.tlb). The generic fork/empty behaviour of all AugmentationCheckData subclasses is
eval_fork = extra_type.add_values (block-parse.h:223-225) eval_empty = extra_type.null_value (block-parse.h:226-228)
so per-augmentation only eval_leaf (and explicit overrides) differ.
Index ¶
- Constants
- Variables
- func ConvertShardIdentToShard(si ShardIdent) (workchain int32, shard uint64)
- func LoadFromCell(v any, loader *cell.Slice, skipMagic ...bool) error
- func LoadFromCellAsProof(v any, loader *cell.Slice, skipMagic ...bool) error
- func LoadOutList(root *cell.Cell) ([]any, error)
- func MethodNameHash(name string) uint64
- func Parse(v any, c *cell.Cell) error
- func ParseStackValue(slice *cell.Slice) (any, error)
- func Register(typ any)
- func RegisterWithName(name string, typ any)
- func SerializeStackValue(b *cell.Builder, val any) error
- func ShardChild(shard uint64, left bool) uint64
- func ShardParent(shard uint64) uint64
- func ToCell(v any) (*cell.Cell, error)
- type AccStatusChange
- type AccStatusChangeType
- type Account
- type AccountBlock
- type AccountDispatchQueue
- type AccountState
- type AccountStatus
- type AccountStorage
- type AccountTransactionsAugDict
- type ActionChangeLibrary
- type ActionPhase
- type ActionReserveCurrency
- type ActionSendMsg
- type ActionSetCode
- type AllShardsInfo
- type AnyMessage
- type AugAccountTransactions
- func (AugAccountTransactions) CombineExtra(leftExtra, rightExtra *cell.Slice) (*cell.Cell, error)
- func (AugAccountTransactions) EmptyExtra() (*cell.Cell, error)
- func (AugAccountTransactions) LeafExtra(value *cell.Slice) (*cell.Cell, error)
- func (AugAccountTransactions) SkipExtra(loader *cell.Slice) error
- type AugInMsgDescr
- type AugOutMsgDescr
- type AugOutMsgQueue
- type AugShardAccountBlocks
- func (AugShardAccountBlocks) CombineExtra(leftExtra, rightExtra *cell.Slice) (*cell.Cell, error)
- func (AugShardAccountBlocks) EmptyExtra() (*cell.Cell, error)
- func (AugShardAccountBlocks) LeafExtra(value *cell.Slice) (*cell.Cell, error)
- func (AugShardAccountBlocks) SkipExtra(loader *cell.Slice) error
- type AugShardAccounts
- type AugShardFees
- type BinTree
- type BlkPrevInfo
- type Block
- type BlockCreateFees
- type BlockExtra
- type BlockHeader
- type BlockLimits
- type BlockLimitsV1
- type BlockLimitsV2
- type BlockchainConfig
- func (c BlockchainConfig) All() map[int32]*cell.Cell
- func (c BlockchainConfig) ComputeStorageFee(masterchain bool, lastPaid, now uint32, bits, cells uint64) (*big.Int, error)
- func (c BlockchainConfig) Get(id int32) *cell.Cell
- func (c BlockchainConfig) GetBlockCreateFees() (*BlockCreateFees, error)
- func (c BlockchainConfig) GetBlockLimits(masterchain bool) (*BlockLimits, error)
- func (c BlockchainConfig) GetBurningConfig() (BurningConfig, error)
- func (c BlockchainConfig) GetCatchainConfig() (CatchainConfig, error)
- func (c BlockchainConfig) GetComplaintPricing() (*ComplaintPricing, error)
- func (c BlockchainConfig) GetConfigAddress() ([]byte, error)
- func (c BlockchainConfig) GetConfigVotingSetup() (*ConfigVotingSetup, error)
- func (c BlockchainConfig) GetConsensusConfig() (ConsensusConfig, error)
- func (c BlockchainConfig) GetCriticalParams() (*CriticalParamsConfig, error)
- func (c BlockchainConfig) GetCurrentTempValidators() (*ValidatorSetAny, error)
- func (c BlockchainConfig) GetCurrentValidators() (*ValidatorSetAny, error)
- func (c BlockchainConfig) GetDNSRootAddress() ([]byte, error)
- func (c BlockchainConfig) GetElectorAddress() ([]byte, error)
- func (c BlockchainConfig) GetExtraCurrencyMintPrices() (*ExtraCurrencyMintPricesConfig, error)
- func (c BlockchainConfig) GetExtraCurrencyToMint() (*ExtraCurrencyToMintConfig, error)
- func (c BlockchainConfig) GetFeeCollectorAddress() ([]byte, error)
- func (c BlockchainConfig) GetFundamentalSmartContractAddresses() (FundamentalSmartContractAddresses, error)
- func (c BlockchainConfig) GetGasPrices(masterchain bool) (*ConfigGasLimitsPrices, error)
- func (c BlockchainConfig) GetGlobalID() (*GlobalIDConfig, error)
- func (c BlockchainConfig) GetGlobalVersion() (GlobalVersion, error)
- func (c BlockchainConfig) GetMandatoryParams() (*MandatoryParamsConfig, error)
- func (c BlockchainConfig) GetMintPrices() (*ExtraCurrencyMintPricesConfig, error)deprecated
- func (c BlockchainConfig) GetMinterAddress() ([]byte, error)
- func (c BlockchainConfig) GetMisbehaviourPunishmentConfig() (*MisbehaviourPunishmentConfig, error)
- func (c BlockchainConfig) GetMsgForwardPrices(masterchain bool) (*ConfigMsgForwardPrices, error)
- func (c BlockchainConfig) GetNewConsensusConfig() (NewConsensusConfigAll, error)
- func (c BlockchainConfig) GetNextTempValidators() (*ValidatorSetAny, error)
- func (c BlockchainConfig) GetNextValidators() (*ValidatorSetAny, error)
- func (c BlockchainConfig) GetParam(id uint32) (*cell.Cell, error)
- func (c BlockchainConfig) GetPrecompiledContractsConfig() (PrecompiledContractsConfig, error)
- func (c BlockchainConfig) GetPrevTempValidators() (*ValidatorSetAny, error)
- func (c BlockchainConfig) GetPrevValidators() (*ValidatorSetAny, error)
- func (c BlockchainConfig) GetSizeLimitsConfig() (SizeLimitsConfig, error)
- func (c BlockchainConfig) GetStoragePrices(now uint32) (*ConfigStoragePrices, error)
- func (c BlockchainConfig) GetSuspendedAddressList() (*SuspendedAddressList, error)
- func (c BlockchainConfig) GetToMint() (*ExtraCurrencyToMintConfig, error)deprecated
- func (c BlockchainConfig) GetValidatorCountLimits() (*ValidatorCountLimits, error)
- func (c BlockchainConfig) GetValidatorElectionTimings() (*ValidatorElectionTimings, error)
- func (c BlockchainConfig) GetValidatorStakeLimits() (*ValidatorStakeLimits, error)
- func (c BlockchainConfig) GetValidatorTempKeys() (*ValidatorTempKeysConfig, error)
- func (c BlockchainConfig) GetWorkchainDescr(workchain int32) (*WorkchainDescr, error)
- func (c BlockchainConfig) GetWorkchains() (*WorkchainsConfig, error)
- func (c BlockchainConfig) ToCell() (*cell.Cell, error)
- type BouncePhase
- type BouncePhaseNegFunds
- type BouncePhaseNoFunds
- type BouncePhaseOk
- type BurningConfig
- type CatchainConfig
- type CatchainConfigV1
- type CatchainConfigV2
- type Coins
- func FromDecimal(val string, decimals int) (Coins, error)
- func FromNano(val *big.Int, decimals int) (Coins, error)
- func FromNanoTON(val *big.Int) Coins
- func FromNanoTONStr(val string) (Coins, error)
- func FromNanoTONU(val uint64) Coins
- func FromTON(val string) (Coins, error)
- func MustFromDecimal(val string, decimals int) Coins
- func MustFromNano(val *big.Int, decimals int) Coins
- func MustFromTON(val string) Coins
- func (g Coins) Abs() Coins
- func (g Coins) Add(coins Coins) (Coins, error)
- func (g Coins) Compare(coins Coins) int
- func (g Coins) Decimals() int
- func (g Coins) Div(x *big.Int) (Coins, error)
- func (g Coins) DivRat(r *big.Rat) (Coins, error)
- func (g Coins) Equals(coins Coins) bool
- func (g Coins) GreaterOrEqual(coins Coins) bool
- func (g Coins) GreaterThan(coins Coins) bool
- func (g Coins) IsNegative() bool
- func (g Coins) IsPositive() bool
- func (g Coins) IsZero() bool
- func (g Coins) LessOrEqual(coins Coins) bool
- func (g Coins) LessThan(coins Coins) bool
- func (g *Coins) LoadFromCell(loader *cell.Slice) error
- func (g Coins) MarshalJSON() ([]byte, error)
- func (g Coins) Mul(x *big.Int) (Coins, error)
- func (g Coins) MulRat(r *big.Rat) (Coins, error)
- func (g Coins) MustAdd(coins Coins) Coins
- func (g Coins) MustDiv(x *big.Int) Coins
- func (g Coins) MustDivRat(r *big.Rat) Coins
- func (g Coins) MustMul(x *big.Int) Coins
- func (g Coins) MustMulRat(r *big.Rat) Coins
- func (g Coins) MustSub(coins Coins) Coins
- func (g Coins) Nano() *big.Int
- func (g Coins) NanoTON() *big.Intdeprecated
- func (g Coins) Neg() Coins
- func (g Coins) String() string
- func (g Coins) Sub(coins Coins) (Coins, error)
- func (g Coins) TON() stringdeprecated
- func (g Coins) ToCell() (*cell.Cell, error)
- func (g *Coins) UnmarshalJSON(data []byte) error
- type ComplaintPricing
- type ComputePhase
- type ComputePhaseSkipped
- type ComputePhaseVM
- type ComputePhaseVMDetails
- type ComputeSkipReason
- type ComputeSkipReasonType
- type ConfigGasLimitsPrices
- type ConfigMsgForwardPrices
- type ConfigParamAddress
- type ConfigParams
- type ConfigProposalSetup
- type ConfigStoragePrices
- type ConfigVotingSetup
- type ConsensusConfig
- type ConsensusConfigV1
- type ConsensusConfigV2
- type ConsensusConfigV3
- type ConsensusConfigV4
- type CreditPhase
- type CriticalParamsConfig
- type CurrencyCollection
- func (c CurrencyCollection) Add(other CurrencyCollection) (CurrencyCollection, error)
- func (c CurrencyCollection) Equals(other CurrencyCollection) bool
- func (c CurrencyCollection) GreaterOrEqual(other CurrencyCollection) (bool, error)
- func (c *CurrencyCollection) LoadFromCell(loader *cell.Slice) error
- func (c CurrencyCollection) Sub(other CurrencyCollection) (CurrencyCollection, error)
- func (c CurrencyCollection) ToCell() (*cell.Cell, error)
- type DepthBalanceInfo
- type DispatchQueueAugDict
- type EnqueuedMsg
- type ExtBlkRef
- type ExternalMessage
- func (m *ExternalMessage) DestAddr() *address.Address
- func (m *ExternalMessage) LoadFromCell(loader *cell.Slice) error
- func (m *ExternalMessage) NormalizedHash() []byte
- func (m *ExternalMessage) Payload() *cell.Cell
- func (m *ExternalMessage) SenderAddr() *address.Address
- func (m ExternalMessage) ToCell() (*cell.Cell, error)
- type ExternalMessageIn
- type ExternalMessageOut
- type ExtraCurrencyMintPricesConfig
- type ExtraCurrencyToMintConfig
- type FundamentalSmartContractAddresses
- type FutureMerge
- type FutureSplit
- type FutureSplitMergeNone
- type GlobalIDConfig
- type GlobalVersion
- type HashUpdate
- type ImportFees
- type ImportedMsgQueueLimits
- type InMsgDescrAugDict
- type IntermediateAddress
- type IntermediateAddressType
- type InternalMessage
- func (m *InternalMessage) Comment() string
- func (m *InternalMessage) DestAddr() *address.Address
- func (m *InternalMessage) Dump() string
- func (m *InternalMessage) LoadFromCell(loader *cell.Slice) error
- func (m *InternalMessage) Payload() *cell.Cell
- func (m *InternalMessage) SenderAddr() *address.Address
- func (m InternalMessage) ToCell() (*cell.Cell, error)
- type KeyExtBlkRef
- type KeyMaxLt
- type LibRefHash
- type LibRefRef
- type Magic
- type MandatoryParamsConfig
- type Marshaller
- type McBlockExtra
- type McStateExtra
- type McStateExtraBlockInfo
- type Message
- type MessageRelaxed
- type MessageRelaxedBody
- type MessageRelaxedInfo
- type MessageRelaxedStateInit
- type MessagesList
- type MintPricesConfigdeprecated
- type MisbehaviourPunishmentConfig
- type MsgEnvelope
- type MsgMetadata
- type MsgType
- type NewConsensusConfigAll
- type NewConsensusConfigSimplex
- type NewConsensusConfigSimplexV2
- type OldMcBlocksInfoAugDict
- type OutList
- type OutMsgDescrAugDict
- type OutMsgQueueAugDict
- type OutMsgQueueExtra
- type OutMsgQueueInfo
- type ParamLimits
- type PrecompiledContractsConfig
- type PrecompiledSmc
- type ProofUnmarshaler
- type ShardAccount
- type ShardAccountBlocks
- type ShardAccountBlocksAugDict
- type ShardAccountsAugDict
- type ShardDesc
- type ShardDescB
- type ShardFeeCreated
- type ShardFeesAugDict
- type ShardID
- type ShardIdent
- type ShardStateSplit
- type ShardStateUnsplit
- type SigPubKeyED25519
- type SizeLimitsConfig
- type SizeLimitsConfigV1
- type SizeLimitsConfigV2
- type SplitMergeInfo
- type Stack
- type StackElement
- type StackNaN
- type StateInit
- type StateUpdate
- type StorageExtraInfo
- type StorageExtraNone
- type StorageInfo
- type StoragePhase
- type StoragePricesConfig
- type StorageUsed
- type StorageUsedShort
- type StringSnake
- type SuspendedAddressList
- type Text
- type TickTock
- type ToMintConfigdeprecated
- type Transaction
- type TransactionDescriptionMergeInstall
- type TransactionDescriptionMergePrepare
- type TransactionDescriptionOrdinary
- type TransactionDescriptionSplitInstall
- type TransactionDescriptionSplitPrepare
- type TransactionDescriptionStorage
- type TransactionDescriptionTickTock
- type TransactionIO
- type Unmarshaler
- type Validator
- type ValidatorAddr
- type ValidatorCountLimits
- type ValidatorElectionTimings
- type ValidatorInfo
- type ValidatorSet
- type ValidatorSetAny
- type ValidatorSetExt
- type ValidatorStakeLimits
- type ValidatorTempKeysConfig
- type WorkchainDescr
- type WorkchainDescrFields
- type WorkchainDescrV1
- type WorkchainDescrV2
- type WorkchainFormatBasic
- type WorkchainFormatExtended
- type WorkchainsConfig
Constants ¶
const ( AccountStatusActive = "ACTIVE" AccountStatusUninit = "UNINIT" AccountStatusFrozen = "FROZEN" AccountStatusNonExist = "NON_EXIST" )
const ( ConfigParamConfigAddress uint32 = 0 ConfigParamElectorAddress uint32 = 1 ConfigParamMinterAddress uint32 = 2 ConfigParamFeeCollectorAddress uint32 = 3 ConfigParamDNSRootAddress uint32 = 4 ConfigParamBurningConfig uint32 = 5 ConfigParamExtraCurrencyMintPrices uint32 = 6 ConfigParamExtraCurrencyToMint uint32 = 7 ConfigParamGlobalVersion uint32 = 8 ConfigParamMandatoryParams uint32 = 9 ConfigParamCriticalParams uint32 = 10 ConfigParamConfigVotingSetup uint32 = 11 ConfigParamWorkchains uint32 = 12 ConfigParamComplaintPricing uint32 = 13 ConfigParamBlockCreateFees uint32 = 14 ConfigParamValidatorElectionTimings uint32 = 15 ConfigParamValidatorCountLimits uint32 = 16 ConfigParamValidatorStakeLimits uint32 = 17 ConfigParamStoragePrices uint32 = 18 ConfigParamGlobalID uint32 = 19 ConfigParamGasPricesMasterchain uint32 = 20 ConfigParamGasPricesBasechain uint32 = 21 ConfigParamBlockLimitsMasterchain uint32 = 22 ConfigParamBlockLimitsBasechain uint32 = 23 ConfigParamMsgForwardPricesMasterchain uint32 = 24 ConfigParamMsgForwardPricesBasechain uint32 = 25 ConfigParamCatchainConfig uint32 = 28 ConfigParamConsensusConfig uint32 = 29 ConfigParamNewConsensusConfig uint32 = 30 ConfigParamFundamentalSMCAddresses uint32 = 31 ConfigParamPrevValidators uint32 = 32 ConfigParamPrevTempValidators uint32 = 33 ConfigParamCurrentValidators uint32 = 34 ConfigParamCurrentTempValidators uint32 = 35 ConfigParamNextValidators uint32 = 36 ConfigParamNextTempValidators uint32 = 37 ConfigParamValidatorTempKeys uint32 = 39 ConfigParamMisbehaviourPunishment uint32 = 40 ConfigParamSizeLimits uint32 = 43 ConfigParamSuspendedAddressList uint32 = 44 ConfigParamPrecompiledContracts uint32 = 45 )
const ( // Deprecated: use ConfigParamExtraCurrencyMintPrices. ConfigParamMintPrices = ConfigParamExtraCurrencyMintPrices // Deprecated: use ConfigParamExtraCurrencyToMint. ConfigParamToMint = ConfigParamExtraCurrencyToMint )
const MaxTextChunkSize = 127 - 2
Variables ¶
var ( ErrBlockchainConfigRootNil = errors.New("blockchain config root is nil") ErrBlockchainConfigParamAbsent = errors.New("blockchain config param is absent") )
var ErrCurrencyCollectionUnderflow = errors.New("currency collection underflow")
ErrCurrencyCollectionUnderflow is returned by CurrencyCollection.Sub when the subtrahend is greater than the minuend, either in grams or in any extra currency (including extra currency ids that are missing on the minuend side).
It mirrors C++ block::CurrencyCollection::sub returning false when td::sgn(c.grams) < 0 or sub_extra_currency fails (ton/crypto/block/block.cpp:1209-1219, :1787-1797).
var ErrStackEmpty = errors.New("stack is empty")
var ZeroCoins = MustFromTON("0")
Functions ¶
func ConvertShardIdentToShard ¶ added in v1.4.0
func ConvertShardIdentToShard(si ShardIdent) (workchain int32, shard uint64)
func LoadFromCell ¶
LoadFromCell automatically parses slice based on struct tags ## N - means integer with N bits, if size <= 64 it loads to uint of any size, if > 64 it loads to *big.Int ^ - loads ref and calls recursively, if field type is *cell.Cell, it loads without parsing . - calls recursively to continue load from current loader (inner struct) dict [inline] N - loads dictionary with key size N, example: 'dict 256', inline option can be used if dict is Hashmap and not HashmapE.
NOTE: TLB Hashmap (non-E, the 'inline' form) cannot be empty by definition (hm_edge always carries a node, only HashmapE has the hme_empty variant), so serializing an empty dict with 'dict inline N' is refused with an error. Use plain 'dict N' (HashmapE) for dictionaries that can be empty. This commonly surfaces when serializing config-like structures whose TLB says Hashmap: an empty dict simply has no valid representation there.
bits N - loads bit slice N len to []byte bool - loads 1 bit boolean addr [std|ext] [required] - loads ton address string - loads ref with snake-encoded bytes to string or []byte array TAG - loads Tolk array<T>, where TAG is a regular tlb tag for T, example: 'array ## 16' var uint/int N - loads variable length integer maybe - reads 1 bit, and loads rest if its 1, can be used in combination with others only either [leave {bits},{refs}] X Y - reads 1 bit, if its 0 - loads X, if 1 - loads Y,
tries to serialize first condition, if not succeed (not enough free bits or refs), then second. if 'leave' is specified, then after write it will additionally check specified number of free bits and refs in cell.
?FieldName - Conditional field loading depending on boolean value of specified field. / Specified field must be declared before tag usage, or it will be always false during loading Some tags can be combined, for example "dict 256", "maybe ^" Magic can be used to load first bits and check struct type, in tag can be specified magic number itself, in [#]HEX or [$]BIN format Example: _ Magic `tlb:"#deadbeef" _ Magic `tlb:"$1101"
func LoadFromCellAsProof ¶ added in v1.8.0
func MethodNameHash ¶ added in v1.2.0
func Parse ¶ added in v1.17.0
Parse automatically parses cell based on struct tags ## N - means integer with N bits, if size <= 64 it loads to uint of any size, if > 64 it loads to *big.Int ^ - loads ref and calls recursively, if field type is *cell.Cell, it loads without parsing . - calls recursively to continue load from current loader (inner struct) dict [inline] N - loads dictionary with key size N, example: 'dict 256', inline option can be used if dict is Hashmap and not HashmapE.
NOTE: TLB Hashmap (non-E, the 'inline' form) cannot be empty by definition (hm_edge always carries a node, only HashmapE has the hme_empty variant), so serializing an empty dict with 'dict inline N' is refused with an error. Use plain 'dict N' (HashmapE) for dictionaries that can be empty. This commonly surfaces when serializing config-like structures whose TLB says Hashmap: an empty dict simply has no valid representation there.
bits N - loads bit slice N len to []byte bool - loads 1 bit boolean addr [std|ext] [required] - loads ton address string - loads ref with snake-encoded bytes to string or []byte array TAG - loads Tolk array<T>, where TAG is a regular tlb tag for T, example: 'array ## 16' var uint/int N - loads variable length integer maybe - reads 1 bit, and loads rest if its 1, can be used in combination with others only either [leave {bits},{refs}] X Y - reads 1 bit, if its 0 - loads X, if 1 - loads Y,
tries to serialize first condition, if not succeed (not enough free bits or refs), then second. if 'leave' is specified, then after write it will additionally check specified number of free bits and refs in cell.
?FieldName - Conditional field loading depending on boolean value of specified field. / Specified field must be declared before tag usage, or it will be always false during loading Some tags can be combined, for example "dict 256", "maybe ^" Magic can be used to load first bits and check struct type, in tag can be specified magic number itself, in [#]HEX or [$]BIN format Example: _ Magic `tlb:"#deadbeef" _ Magic `tlb:"$1101"
func RegisterWithName ¶ added in v1.9.0
func ShardChild ¶ added in v1.15.0
func ShardParent ¶ added in v1.15.0
Types ¶
type AccStatusChange ¶ added in v1.7.0
type AccStatusChange struct {
Type AccStatusChangeType
}
func (*AccStatusChange) LoadFromCell ¶ added in v1.7.0
func (a *AccStatusChange) LoadFromCell(loader *cell.Slice) error
type AccStatusChangeType ¶ added in v1.7.0
type AccStatusChangeType string
const ( AccStatusChangeUnchanged AccStatusChangeType = "UNCHANGED" AccStatusChangeFrozen AccStatusChangeType = "FROZEN" AccStatusChangeDeleted AccStatusChangeType = "DELETED" )
type Account ¶
type Account struct {
IsActive bool
State *AccountState
Data *cell.Cell
Code *cell.Cell
LastTxLT uint64
LastTxHash []byte
}
func (*Account) HasGetMethod ¶ added in v1.2.0
type AccountBlock ¶ added in v1.6.0
type AccountBlock struct {
Addr []byte `tlb:"bits 256"`
Transactions *AccountTransactionsAugDict `tlb:"."`
StateUpdate *cell.Cell `tlb:"^"`
// contains filtered or unexported fields
}
type AccountDispatchQueue ¶ added in v1.17.0
type AccountDispatchQueue struct {
Messages *cell.Dictionary
Count uint64
}
func (*AccountDispatchQueue) LoadFromCell ¶ added in v1.17.0
func (q *AccountDispatchQueue) LoadFromCell(loader *cell.Slice) error
type AccountState ¶
type AccountState struct {
IsValid bool
Address *address.Address
StorageInfo StorageInfo
AccountStorage
}
func (*AccountState) LoadFromCell ¶
func (a *AccountState) LoadFromCell(loader *cell.Slice) error
type AccountStatus ¶
type AccountStatus string
func (*AccountStatus) LoadFromCell ¶
func (g *AccountStatus) LoadFromCell(loader *cell.Slice) error
type AccountStorage ¶
type AccountStorage struct {
Status AccountStatus
LastTransactionLT uint64
Balance Coins
ExtraCurrencies *cell.Dictionary `tlb:"dict 32"`
// has value when active
StateInit *StateInit
// has value when frozen
StateHash []byte
}
func (*AccountStorage) LoadFromCell ¶
func (s *AccountStorage) LoadFromCell(loader *cell.Slice) error
type AccountTransactionsAugDict ¶ added in v1.17.0
type AccountTransactionsAugDict struct {
*cell.AugmentedDictionary
// contains filtered or unexported fields
}
func NewAccountTransactionsAugDict ¶ added in v1.18.0
func NewAccountTransactionsAugDict() (*AccountTransactionsAugDict, error)
NewAccountTransactionsAugDict returns an empty writable transaction dictionary of an AccountBlock. Note that the serialized form inside an AccountBlock is an inline HashmapAug 64 which cannot be empty; ToCell of the returned wrapper produces the HashmapAugE-style wrapped form, use InlineCell to embed the dictionary into an AccountBlock.
func (*AccountTransactionsAugDict) InlineCell ¶ added in v1.18.0
func (d *AccountTransactionsAugDict) InlineCell() (*cell.Cell, error)
InlineCell returns the dictionary in the inline HashmapAug 64 form used inside an AccountBlock. A TLB Hashmap (unlike HashmapE) has no empty representation, so an empty dictionary cannot be serialized inline and returns an error.
func (*AccountTransactionsAugDict) LoadFromCell ¶ added in v1.17.0
func (d *AccountTransactionsAugDict) LoadFromCell(loader *cell.Slice) error
type ActionChangeLibrary ¶ added in v1.17.0
type ActionPhase ¶ added in v1.7.0
type ActionPhase struct {
Success bool `tlb:"bool"`
Valid bool `tlb:"bool"`
NoFunds bool `tlb:"bool"`
StatusChange AccStatusChange `tlb:"."`
TotalFwdFees *Coins `tlb:"maybe ."`
TotalActionFees *Coins `tlb:"maybe ."`
ResultCode int32 `tlb:"## 32"`
ResultArg *int32 `tlb:"maybe ## 32"`
TotalActions uint16 `tlb:"## 16"`
SpecActions uint16 `tlb:"## 16"`
SkippedActions uint16 `tlb:"## 16"`
MessagesCreated uint16 `tlb:"## 16"`
ActionListHash []byte `tlb:"bits 256"`
TotalMsgSize StorageUsedShort `tlb:"."`
}
func (*ActionPhase) LoadFromCell ¶ added in v1.18.0
func (a *ActionPhase) LoadFromCell(loader *cell.Slice) error
type ActionReserveCurrency ¶ added in v1.17.0
type ActionReserveCurrency struct {
Mode uint8 `tlb:"## 8"`
Currency CurrencyCollection `tlb:"."`
// contains filtered or unexported fields
}
type ActionSendMsg ¶ added in v1.17.0
type ActionSetCode ¶ added in v1.17.0
type AllShardsInfo ¶
type AllShardsInfo struct {
ShardHashes *cell.Dictionary `tlb:"dict 32"`
}
type AnyMessage ¶
type AugAccountTransactions ¶ added in v1.18.0
type AugAccountTransactions struct{}
AugAccountTransactions implements the augmentation of the transaction dictionary inside an AccountBlock (block.tlb:337-339).
Leaf rule (Aug_AccountTransactions::eval_leaf, block-parse.cpp:1599-1604 -> Transaction::get_total_fees, block-parse.cpp:1583-1594): the extra of a ^Transaction leaf is the transaction's total_fees:CurrencyCollection, canonically re-encoded.
Fork rule: CurrencyCollection::add_values (block-parse.cpp:619-621). Empty value: CurrencyCollection null (5 zero bits).
func (AugAccountTransactions) CombineExtra ¶ added in v1.18.0
func (AugAccountTransactions) EmptyExtra ¶ added in v1.18.0
func (AugAccountTransactions) EmptyExtra() (*cell.Cell, error)
type AugInMsgDescr ¶ added in v1.18.0
type AugInMsgDescr struct{}
AugInMsgDescr implements the augmentation of InMsgDescr (block.tlb:188: _ (HashmapAugE 256 InMsg ImportFees)).
Leaf rule (Aug_InMsgDescr::eval_leaf, block-parse.h:841-848 -> InMsg::get_import_fees, block-parse.cpp:1741-1835): C++ DERIVES the ImportFees from the InMsg itself (message headers, envelope fees and the fee fields of the InMsg record) rather than trusting a stored extra, so this implementation performs the same derivation; callers only Set the InMsg value and the extra is computed. The per-variant rules are documented inline.
Fork rule: ImportFees::add_values (block-parse.cpp:1650-1652), i.e. fees_collected added as Grams and value_imported added as CurrencyCollection. Empty value: ImportFees::null_value (block-parse.h:797-799), 4+4+1 zero bits.
func (AugInMsgDescr) CombineExtra ¶ added in v1.18.0
func (AugInMsgDescr) EmptyExtra ¶ added in v1.18.0
func (AugInMsgDescr) EmptyExtra() (*cell.Cell, error)
type AugOutMsgDescr ¶ added in v1.18.0
type AugOutMsgDescr struct{}
AugOutMsgDescr implements the augmentation of OutMsgDescr (block.tlb:212: _ (HashmapAugE 256 OutMsg CurrencyCollection)).
Leaf rule (Aug_OutMsgDescr::eval_leaf, block-parse.h:864-871 -> OutMsg::get_export_value, block-parse.cpp:1918-1955): only queued exports (msg_export_new, msg_export_tr, msg_export_tr_req) carry a value equal to msg.value + msg.ihr_fee + envelope fwd_fee_remaining; all other variants, including every dequeue record, evaluate to the zero CurrencyCollection.
Fork rule: CurrencyCollection::add_values (block-parse.cpp:619-621). Empty value: CurrencyCollection null (5 zero bits).
func (AugOutMsgDescr) CombineExtra ¶ added in v1.18.0
func (AugOutMsgDescr) EmptyExtra ¶ added in v1.18.0
func (AugOutMsgDescr) EmptyExtra() (*cell.Cell, error)
type AugOutMsgQueue ¶ added in v1.18.0
type AugOutMsgQueue struct{}
AugOutMsgQueue implements the augmentation of OutMsgQueue (block.tlb:214: _ (HashmapAugE 352 EnqueuedMsg uint64)).
Leaf rule (Aug_OutMsgQueue::eval_leaf, block-parse.cpp:2004-2009): the uint64 extra of an EnqueuedMsg is derived from the message envelope referenced by the value (the enqueued_lt bits are NOT used):
- the local (pre msg_envelope_v2) checkout takes the created_lt of the message inside the envelope (MsgEnvelope::get_created_lt, block-parse.cpp:858-864 -> CommonMsgInfo::get_created_lt, :714-737);
- current upstream (MsgEnvelope::get_emitted_lt) prefers the explicit emitted_lt of a msg_envelope_v2#5 when present and falls back to the message created_lt otherwise; this implementation follows the upstream rule since mainnet queues contain v2 envelopes.
Fork rule (Aug_OutMsgQueue::eval_fork, block-parse.cpp:1994-1998): min(left, right). Empty value (eval_empty, :2000-2002): 0.
func (AugOutMsgQueue) CombineExtra ¶ added in v1.18.0
func (AugOutMsgQueue) EmptyExtra ¶ added in v1.18.0
func (AugOutMsgQueue) EmptyExtra() (*cell.Cell, error)
type AugShardAccountBlocks ¶ added in v1.18.0
type AugShardAccountBlocks struct{}
AugShardAccountBlocks implements the augmentation of ShardAccountBlocks (block.tlb:341: _ (HashmapAugE 256 AccountBlock CurrencyCollection)).
Leaf rule (Aug_ShardAccountBlocks::eval_leaf, block-parse.cpp:1634-1637 -> AccountBlock::get_total_fees, block-parse.cpp:1628-1632): skip acc_trans#5 and account_addr, then extract the root extra of the inner (HashmapAug 64 ^Transaction CurrencyCollection) dictionary and re-store it canonically; i.e. the extra of an AccountBlock is the total fees of all its transactions.
Fork rule: CurrencyCollection::add_values (block-parse.cpp:619-621). Empty value: CurrencyCollection null (5 zero bits).
func (AugShardAccountBlocks) CombineExtra ¶ added in v1.18.0
func (AugShardAccountBlocks) EmptyExtra ¶ added in v1.18.0
func (AugShardAccountBlocks) EmptyExtra() (*cell.Cell, error)
type AugShardAccounts ¶ added in v1.18.0
type AugShardAccounts struct{}
AugShardAccounts implements the augmentation of ShardAccounts (crypto/block/block.tlb:263: _ (HashmapAugE 256 ShardAccount DepthBalanceInfo)).
Leaf rule (Aug_ShardAccounts::eval_leaf, block-parse.cpp:1161-1169 -> Account::skip_copy_depth_balance, block-parse.cpp:987-999): the extra of a ShardAccount leaf is depth_balance$_ split_depth:(#<= 30) balance:CurrencyCollection where split_depth is the anycast rewrite depth of the account address (0 without anycast) and balance is the account balance copied bit-exactly; account_none yields the DepthBalanceInfo null value.
Fork rule (DepthBalanceInfo::add_values, block-parse.cpp:1153-1157): split_depth = max(left, right), balance = left + right.
Empty value (DepthBalanceInfo::null_value, block-parse.cpp:1148-1150): zero split_depth and zero balance (10 zero bits).
func (AugShardAccounts) CombineExtra ¶ added in v1.18.0
func (AugShardAccounts) EmptyExtra ¶ added in v1.18.0
func (AugShardAccounts) EmptyExtra() (*cell.Cell, error)
type AugShardFees ¶ added in v1.18.0
type AugShardFees struct{}
AugShardFees implements the augmentation of ShardFees (block.tlb:449: _ (HashmapAugE 96 ShardFeeCreated ShardFeeCreated)).
Leaf rule (Aug_ShardFees::eval_leaf, block-parse.cpp:2289-2291): the extra is a verbatim copy of the leaf value, which must parse as ShardFeeCreated with nothing left over (cs.empty_ext()).
Fork rule (ShardFeeCreated::add_values, block-parse.cpp:2282-2284): component-wise CurrencyCollection addition of fees and create. Empty value (ShardFeeCreated::null_value, block-parse.cpp:2278-2280): two zero CurrencyCollections (10 zero bits).
func (AugShardFees) CombineExtra ¶ added in v1.18.0
func (AugShardFees) EmptyExtra ¶ added in v1.18.0
func (AugShardFees) EmptyExtra() (*cell.Cell, error)
type BlkPrevInfo ¶ added in v1.4.0
type BlkPrevInfo struct {
Prev1 ExtBlkRef
Prev2 *ExtBlkRef
// Pruned reports that the prev-block references were pruned away in the
// Merkle proof this header was parsed from, so Prev1/Prev2 carry NO data.
// Block proofs may legally prune the prev cells (C++ never parses pruned
// prev refs: block::unpack_block_prev_blk_ext fails with "cannot unpack
// previous block reference..." when they are unreadable,
// ton/crypto/block/block.cpp:1912-1925, and proof checks like
// check_block_header simply never read them). Callers that need parent
// block ids MUST check this flag before using Prev1/Prev2.
Pruned bool
}
type Block ¶
type Block struct {
GlobalID int32 `tlb:"## 32"`
BlockInfo BlockHeader `tlb:"^"`
ValueFlow *cell.Cell `tlb:"^"`
StateUpdate *cell.Cell `tlb:"^"`
Extra *BlockExtra `tlb:"^"`
// contains filtered or unexported fields
}
func (*Block) ListTransactions ¶ added in v1.17.0
func (b *Block) ListTransactions() ([]*Transaction, error)
ListTransactions returns all transactions stored in this block.
type BlockCreateFees ¶ added in v1.17.0
type BlockExtra ¶
type BlockHeader ¶ added in v1.4.0
type BlockHeader struct {
GenSoftware *GlobalVersion
MasterRef *ExtBlkRef
PrevRef BlkPrevInfo
PrevVertRef *BlkPrevInfo
// contains filtered or unexported fields
}
func (*BlockHeader) LoadFromCell ¶ added in v1.4.0
func (h *BlockHeader) LoadFromCell(loader *cell.Slice) error
type BlockLimits ¶ added in v1.17.0
type BlockLimits struct {
Limits any `tlb:"[BlockLimitsV1,BlockLimitsV2]"`
}
type BlockLimitsV1 ¶ added in v1.17.0
type BlockLimitsV1 struct {
Bytes ParamLimits `tlb:"."`
Gas ParamLimits `tlb:"."`
LTDelta ParamLimits `tlb:"."`
// contains filtered or unexported fields
}
type BlockLimitsV2 ¶ added in v1.17.0
type BlockLimitsV2 struct {
Bytes ParamLimits `tlb:"."`
Gas ParamLimits `tlb:"."`
LTDelta ParamLimits `tlb:"."`
CollatedData ParamLimits `tlb:"."`
ImportedMsgQueue ImportedMsgQueueLimits `tlb:"."`
// contains filtered or unexported fields
}
type BlockchainConfig ¶ added in v1.17.0
func (BlockchainConfig) ComputeStorageFee ¶ added in v1.17.0
func (BlockchainConfig) GetBlockCreateFees ¶ added in v1.17.0
func (c BlockchainConfig) GetBlockCreateFees() (*BlockCreateFees, error)
func (BlockchainConfig) GetBlockLimits ¶ added in v1.17.0
func (c BlockchainConfig) GetBlockLimits(masterchain bool) (*BlockLimits, error)
func (BlockchainConfig) GetBurningConfig ¶ added in v1.17.0
func (c BlockchainConfig) GetBurningConfig() (BurningConfig, error)
func (BlockchainConfig) GetCatchainConfig ¶ added in v1.17.0
func (c BlockchainConfig) GetCatchainConfig() (CatchainConfig, error)
func (BlockchainConfig) GetComplaintPricing ¶ added in v1.17.0
func (c BlockchainConfig) GetComplaintPricing() (*ComplaintPricing, error)
func (BlockchainConfig) GetConfigAddress ¶ added in v1.17.0
func (c BlockchainConfig) GetConfigAddress() ([]byte, error)
func (BlockchainConfig) GetConfigVotingSetup ¶ added in v1.17.0
func (c BlockchainConfig) GetConfigVotingSetup() (*ConfigVotingSetup, error)
func (BlockchainConfig) GetConsensusConfig ¶ added in v1.17.0
func (c BlockchainConfig) GetConsensusConfig() (ConsensusConfig, error)
func (BlockchainConfig) GetCriticalParams ¶ added in v1.17.0
func (c BlockchainConfig) GetCriticalParams() (*CriticalParamsConfig, error)
func (BlockchainConfig) GetCurrentTempValidators ¶ added in v1.17.0
func (c BlockchainConfig) GetCurrentTempValidators() (*ValidatorSetAny, error)
func (BlockchainConfig) GetCurrentValidators ¶ added in v1.17.0
func (c BlockchainConfig) GetCurrentValidators() (*ValidatorSetAny, error)
func (BlockchainConfig) GetDNSRootAddress ¶ added in v1.17.0
func (c BlockchainConfig) GetDNSRootAddress() ([]byte, error)
func (BlockchainConfig) GetElectorAddress ¶ added in v1.17.0
func (c BlockchainConfig) GetElectorAddress() ([]byte, error)
func (BlockchainConfig) GetExtraCurrencyMintPrices ¶ added in v1.17.0
func (c BlockchainConfig) GetExtraCurrencyMintPrices() (*ExtraCurrencyMintPricesConfig, error)
func (BlockchainConfig) GetExtraCurrencyToMint ¶ added in v1.17.0
func (c BlockchainConfig) GetExtraCurrencyToMint() (*ExtraCurrencyToMintConfig, error)
func (BlockchainConfig) GetFeeCollectorAddress ¶ added in v1.17.0
func (c BlockchainConfig) GetFeeCollectorAddress() ([]byte, error)
func (BlockchainConfig) GetFundamentalSmartContractAddresses ¶ added in v1.17.0
func (c BlockchainConfig) GetFundamentalSmartContractAddresses() (FundamentalSmartContractAddresses, error)
func (BlockchainConfig) GetGasPrices ¶ added in v1.17.0
func (c BlockchainConfig) GetGasPrices(masterchain bool) (*ConfigGasLimitsPrices, error)
func (BlockchainConfig) GetGlobalID ¶ added in v1.17.0
func (c BlockchainConfig) GetGlobalID() (*GlobalIDConfig, error)
func (BlockchainConfig) GetGlobalVersion ¶ added in v1.17.0
func (c BlockchainConfig) GetGlobalVersion() (GlobalVersion, error)
func (BlockchainConfig) GetMandatoryParams ¶ added in v1.17.0
func (c BlockchainConfig) GetMandatoryParams() (*MandatoryParamsConfig, error)
func (BlockchainConfig) GetMintPrices
deprecated
added in
v1.17.0
func (c BlockchainConfig) GetMintPrices() (*ExtraCurrencyMintPricesConfig, error)
Deprecated: use GetExtraCurrencyMintPrices.
func (BlockchainConfig) GetMinterAddress ¶ added in v1.17.0
func (c BlockchainConfig) GetMinterAddress() ([]byte, error)
func (BlockchainConfig) GetMisbehaviourPunishmentConfig ¶ added in v1.17.0
func (c BlockchainConfig) GetMisbehaviourPunishmentConfig() (*MisbehaviourPunishmentConfig, error)
func (BlockchainConfig) GetMsgForwardPrices ¶ added in v1.17.0
func (c BlockchainConfig) GetMsgForwardPrices(masterchain bool) (*ConfigMsgForwardPrices, error)
func (BlockchainConfig) GetNewConsensusConfig ¶ added in v1.17.0
func (c BlockchainConfig) GetNewConsensusConfig() (NewConsensusConfigAll, error)
func (BlockchainConfig) GetNextTempValidators ¶ added in v1.17.0
func (c BlockchainConfig) GetNextTempValidators() (*ValidatorSetAny, error)
func (BlockchainConfig) GetNextValidators ¶ added in v1.17.0
func (c BlockchainConfig) GetNextValidators() (*ValidatorSetAny, error)
func (BlockchainConfig) GetParam ¶ added in v1.17.0
func (c BlockchainConfig) GetParam(id uint32) (*cell.Cell, error)
func (BlockchainConfig) GetPrecompiledContractsConfig ¶ added in v1.17.0
func (c BlockchainConfig) GetPrecompiledContractsConfig() (PrecompiledContractsConfig, error)
func (BlockchainConfig) GetPrevTempValidators ¶ added in v1.17.0
func (c BlockchainConfig) GetPrevTempValidators() (*ValidatorSetAny, error)
func (BlockchainConfig) GetPrevValidators ¶ added in v1.17.0
func (c BlockchainConfig) GetPrevValidators() (*ValidatorSetAny, error)
func (BlockchainConfig) GetSizeLimitsConfig ¶ added in v1.17.0
func (c BlockchainConfig) GetSizeLimitsConfig() (SizeLimitsConfig, error)
func (BlockchainConfig) GetStoragePrices ¶ added in v1.17.0
func (c BlockchainConfig) GetStoragePrices(now uint32) (*ConfigStoragePrices, error)
func (BlockchainConfig) GetSuspendedAddressList ¶ added in v1.17.0
func (c BlockchainConfig) GetSuspendedAddressList() (*SuspendedAddressList, error)
func (BlockchainConfig) GetToMint
deprecated
added in
v1.17.0
func (c BlockchainConfig) GetToMint() (*ExtraCurrencyToMintConfig, error)
Deprecated: use GetExtraCurrencyToMint.
func (BlockchainConfig) GetValidatorCountLimits ¶ added in v1.17.0
func (c BlockchainConfig) GetValidatorCountLimits() (*ValidatorCountLimits, error)
func (BlockchainConfig) GetValidatorElectionTimings ¶ added in v1.17.0
func (c BlockchainConfig) GetValidatorElectionTimings() (*ValidatorElectionTimings, error)
func (BlockchainConfig) GetValidatorStakeLimits ¶ added in v1.17.0
func (c BlockchainConfig) GetValidatorStakeLimits() (*ValidatorStakeLimits, error)
func (BlockchainConfig) GetValidatorTempKeys ¶ added in v1.17.0
func (c BlockchainConfig) GetValidatorTempKeys() (*ValidatorTempKeysConfig, error)
func (BlockchainConfig) GetWorkchainDescr ¶ added in v1.17.0
func (c BlockchainConfig) GetWorkchainDescr(workchain int32) (*WorkchainDescr, error)
func (BlockchainConfig) GetWorkchains ¶ added in v1.17.0
func (c BlockchainConfig) GetWorkchains() (*WorkchainsConfig, error)
type BouncePhase ¶ added in v1.7.0
type BouncePhase struct {
Phase any `tlb:"[BouncePhaseOk,BouncePhaseNegFunds,BouncePhaseNoFunds]"`
}
func (*BouncePhase) LoadFromCell ¶ added in v1.7.0
func (b *BouncePhase) LoadFromCell(loader *cell.Slice) error
type BouncePhaseNegFunds ¶ added in v1.7.0
type BouncePhaseNegFunds struct {
// contains filtered or unexported fields
}
func (*BouncePhaseNegFunds) LoadFromCell ¶ added in v1.18.0
func (b *BouncePhaseNegFunds) LoadFromCell(loader *cell.Slice) error
type BouncePhaseNoFunds ¶ added in v1.7.0
type BouncePhaseNoFunds struct {
MsgSize StorageUsedShort `tlb:"."`
ReqFwdFees Coins `tlb:"."`
// contains filtered or unexported fields
}
func (*BouncePhaseNoFunds) LoadFromCell ¶ added in v1.18.0
func (b *BouncePhaseNoFunds) LoadFromCell(loader *cell.Slice) error
type BouncePhaseOk ¶ added in v1.7.0
type BouncePhaseOk struct {
MsgSize StorageUsedShort `tlb:"."`
MsgFees Coins `tlb:"."`
FwdFees Coins `tlb:"."`
// contains filtered or unexported fields
}
func (*BouncePhaseOk) LoadFromCell ¶ added in v1.18.0
func (b *BouncePhaseOk) LoadFromCell(loader *cell.Slice) error
type BurningConfig ¶ added in v1.17.0
type CatchainConfig ¶ added in v1.8.0
type CatchainConfig struct {
Config any `tlb:"[CatchainConfigV1,CatchainConfigV2]"`
}
type CatchainConfigV1 ¶ added in v1.8.0
type CatchainConfigV2 ¶ added in v1.8.0
type CatchainConfigV2 struct {
Flags uint8 `tlb:"## 7"`
ShuffleMcValidators bool `tlb:"bool"`
McCatchainLifetime uint32 `tlb:"## 32"`
ShardCatchainLifetime uint32 `tlb:"## 32"`
ShardValidatorsLifetime uint32 `tlb:"## 32"`
ShardValidatorsNum uint32 `tlb:"## 32"`
// contains filtered or unexported fields
}
type Coins ¶
type Coins struct {
// contains filtered or unexported fields
}
func FromNanoTON ¶
func FromNanoTONStr ¶ added in v1.9.0
func FromNanoTONU ¶
func MustFromDecimal ¶ added in v1.8.0
func MustFromTON ¶
func (Coins) Abs ¶ added in v1.13.0
Abs returns a new Coins value representing the absolute value of the original value. The number of decimals remains the same.
func (Coins) Add ¶ added in v1.13.0
Add adds the provided coins to the current coins and returns the result. Returns an error if the coins have different decimal places or if the result would overflow the maximum allowed value.
func (Coins) Div ¶ added in v1.13.0
Div divides the current coins by the provided big.Int and returns the result. Returns an error if the divisor is zero or if the result would overflow the maximum allowed value.
func (Coins) DivRat ¶ added in v1.13.0
DivRat divides the current coins by the provided big.Rat and returns the result. This is equivalent to multiplying by the reciprocal of the rational number. Returns an error if the rational has zero numerator or denominator, or if the result would overflow.
func (Coins) Equals ¶ added in v1.13.0
Equals returns true if the current coins amount is equal to the given coins amount
func (Coins) GreaterOrEqual ¶ added in v1.13.0
GreaterOrEqual returns true if the current coins amount is greater than or equal to the given coins amount
func (Coins) GreaterThan ¶ added in v1.13.0
GreaterThan returns true if the current coins amount is greater than the given coins amount
func (Coins) IsNegative ¶ added in v1.13.0
IsNegative returns true if the coins amount is less than zero
func (Coins) IsPositive ¶ added in v1.13.0
IsPositive returns true if the coins amount is greater than zero
func (Coins) LessOrEqual ¶ added in v1.13.0
LessOrEqual returns true if the current coins amount is less than or equal to the given coins amount
func (Coins) LessThan ¶ added in v1.13.0
LessThan returns true if the current coins amount is less than the given coins amount
func (Coins) MarshalJSON ¶
func (Coins) Mul ¶ added in v1.13.0
Mul multiplies the current coins by the provided big.Int and returns the result. Returns an error if the result would overflow the maximum allowed value.
func (Coins) MulRat ¶ added in v1.13.0
MulRat multiplies the current coins by the provided big.Rat and returns the result. Returns an error if the denominator is zero or if the result would overflow the maximum allowed value.
func (Coins) MustAdd ¶ added in v1.13.0
MustAdd adds the provided coins to the current coins and returns the result. It panics if the operation fails (e.g., due to decimal mismatch or overflow).
func (Coins) MustDiv ¶ added in v1.13.0
MustDiv divides the current coins by the provided big.Int and returns the result. It panics if the operation fails (e.g., due to division by zero or overflow).
func (Coins) MustDivRat ¶ added in v1.13.0
MustDivRat divides the current coins by the provided big.Rat and returns the result. It panics if the operation fails (e.g., due to division by zero or overflow).
func (Coins) MustMul ¶ added in v1.13.0
MustMul multiplies the current coins by the provided big.Int and returns the result. It panics if the operation fails (e.g., due to overflow).
func (Coins) MustMulRat ¶ added in v1.13.0
MustMulRat multiplies the current coins by the provided big.Rat and returns the result. It panics if the operation fails (e.g., due to division by zero or overflow).
func (Coins) MustSub ¶ added in v1.13.0
MustSub subtracts the provided coins from the current coins and returns the result. It panics if the operation fails (e.g., due to decimal mismatch or overflow).
func (Coins) Neg ¶ added in v1.13.0
Neg returns a new Coins value representing the negation of the original value. The number of decimals remains the same.
func (Coins) Sub ¶ added in v1.13.0
Sub subtracts the provided coins from the current coins and returns the result. Returns an error if the coins have different decimal places or if the result would overflow the maximum allowed value.
func (*Coins) UnmarshalJSON ¶ added in v1.9.0
type ComplaintPricing ¶ added in v1.17.0
type ComputePhase ¶ added in v1.7.0
type ComputePhase struct {
Phase any `tlb:"[ComputePhaseVM,ComputePhaseSkipped]"`
}
func (*ComputePhase) LoadFromCell ¶ added in v1.7.0
func (c *ComputePhase) LoadFromCell(loader *cell.Slice) error
type ComputePhaseSkipped ¶ added in v1.7.0
type ComputePhaseSkipped struct {
Reason ComputeSkipReason `tlb:"."`
// contains filtered or unexported fields
}
func (*ComputePhaseSkipped) LoadFromCell ¶ added in v1.18.0
func (c *ComputePhaseSkipped) LoadFromCell(loader *cell.Slice) error
type ComputePhaseVM ¶ added in v1.7.0
type ComputePhaseVM struct {
Success bool `tlb:"bool"`
MsgStateUsed bool `tlb:"bool"`
AccountActivated bool `tlb:"bool"`
GasFees Coins `tlb:"."`
Details ComputePhaseVMDetails `tlb:"^"`
// contains filtered or unexported fields
}
func (*ComputePhaseVM) LoadFromCell ¶ added in v1.18.0
func (c *ComputePhaseVM) LoadFromCell(loader *cell.Slice) error
type ComputePhaseVMDetails ¶ added in v1.17.0
type ComputePhaseVMDetails struct {
GasUsed *big.Int `tlb:"var uint 7"`
GasLimit *big.Int `tlb:"var uint 7"`
GasCredit *big.Int `tlb:"maybe var uint 3"`
Mode int8 `tlb:"## 8"`
ExitCode int32 `tlb:"## 32"`
ExitArg *int32 `tlb:"maybe ## 32"`
VMSteps uint32 `tlb:"## 32"`
VMInitStateHash []byte `tlb:"bits 256"`
VMFinalStateHash []byte `tlb:"bits 256"`
}
func (*ComputePhaseVMDetails) LoadFromCell ¶ added in v1.18.0
func (d *ComputePhaseVMDetails) LoadFromCell(loader *cell.Slice) error
type ComputeSkipReason ¶ added in v1.7.0
type ComputeSkipReason struct {
Type ComputeSkipReasonType
}
func (*ComputeSkipReason) LoadFromCell ¶ added in v1.7.0
func (c *ComputeSkipReason) LoadFromCell(loader *cell.Slice) error
type ComputeSkipReasonType ¶ added in v1.7.0
type ComputeSkipReasonType string
const ( ComputeSkipReasonNoState ComputeSkipReasonType = "NO_STATE" ComputeSkipReasonBadState ComputeSkipReasonType = "BAD_STATE" ComputeSkipReasonNoGas ComputeSkipReasonType = "NO_GAS" ComputeSkipReasonSuspended ComputeSkipReasonType = "SUSPENDED" )
type ConfigGasLimitsPrices ¶ added in v1.17.0
type ConfigGasLimitsPrices struct {
HasFlatPricing bool
FlatGasLimit uint64
FlatGasPrice uint64
HasSeparateSpecialLimit bool
GasPrice uint64
GasLimit uint64
SpecialGasLimit uint64
GasCredit uint64
BlockGasLimit uint64
FreezeDueLimit uint64
DeleteDueLimit uint64
}
func (ConfigGasLimitsPrices) ComputeGasPrice ¶ added in v1.17.0
func (c ConfigGasLimitsPrices) ComputeGasPrice(gasUsed uint64) *big.Int
func (*ConfigGasLimitsPrices) LoadFromCell ¶ added in v1.17.0
func (c *ConfigGasLimitsPrices) LoadFromCell(loader *cell.Slice) error
type ConfigMsgForwardPrices ¶ added in v1.17.0
type ConfigMsgForwardPrices struct {
LumpPrice uint64 `tlb:"## 64"`
BitPrice uint64 `tlb:"## 64"`
CellPrice uint64 `tlb:"## 64"`
IHRFactor uint32 `tlb:"## 32"`
FirstFrac uint16 `tlb:"## 16"`
NextFrac uint16 `tlb:"## 16"`
// contains filtered or unexported fields
}
func (ConfigMsgForwardPrices) ComputeForwardFee ¶ added in v1.17.0
func (c ConfigMsgForwardPrices) ComputeForwardFee(cells, bits uint64) *big.Int
type ConfigParamAddress ¶ added in v1.17.0
type ConfigParamAddress struct {
Address []byte `tlb:"bits 256"`
}
type ConfigParams ¶ added in v1.4.0
type ConfigParams struct {
ConfigAddr []byte `tlb:"bits 256"`
Config struct {
Params *cell.Dictionary `tlb:"dict inline 32"`
} `tlb:"^"`
}
type ConfigProposalSetup ¶ added in v1.17.0
type ConfigProposalSetup struct {
MinTotRounds uint8 `tlb:"## 8"`
MaxTotRounds uint8 `tlb:"## 8"`
MinWins uint8 `tlb:"## 8"`
MaxLosses uint8 `tlb:"## 8"`
MinStoreSec uint32 `tlb:"## 32"`
MaxStoreSec uint32 `tlb:"## 32"`
BitPrice uint32 `tlb:"## 32"`
CellPrice uint32 `tlb:"## 32"`
// contains filtered or unexported fields
}
type ConfigStoragePrices ¶ added in v1.17.0
type ConfigStoragePrices struct {
ValidSince uint32 `tlb:"## 32"`
BitPrice uint64 `tlb:"## 64"`
CellPrice uint64 `tlb:"## 64"`
MCBitPrice uint64 `tlb:"## 64"`
MCCellPrice uint64 `tlb:"## 64"`
// contains filtered or unexported fields
}
func (ConfigStoragePrices) ComputeStorageFee ¶ added in v1.17.0
func (c ConfigStoragePrices) ComputeStorageFee(isMasterchain bool, delta, bits, cells uint64) *big.Int
type ConfigVotingSetup ¶ added in v1.17.0
type ConfigVotingSetup struct {
NormalParams *ConfigProposalSetup `tlb:"^"`
CriticalParams *ConfigProposalSetup `tlb:"^"`
// contains filtered or unexported fields
}
type ConsensusConfig ¶ added in v1.8.0
type ConsensusConfig struct {
Config any `tlb:"[ConsensusConfigV1,ConsensusConfigV2,ConsensusConfigV3,ConsensusConfigV4]"`
}
type ConsensusConfigV1 ¶ added in v1.8.0
type ConsensusConfigV1 struct {
RoundCandidates uint32 `tlb:"## 32"`
NextCandidateDelayMs uint32 `tlb:"## 32"`
ConsensusTimeoutMs uint32 `tlb:"## 32"`
FastAttempts uint32 `tlb:"## 32"`
AttemptDuration uint32 `tlb:"## 32"`
CatchainMaxDeps uint32 `tlb:"## 32"`
MaxBlockBytes uint32 `tlb:"## 32"`
MaxCollatedBytes uint32 `tlb:"## 32"`
// contains filtered or unexported fields
}
type ConsensusConfigV2 ¶ added in v1.8.0
type ConsensusConfigV2 struct {
Flags uint8 `tlb:"## 7"`
NewCatchainIds bool `tlb:"bool"`
RoundCandidates uint8 `tlb:"## 8"`
NextCandidateDelayMs uint32 `tlb:"## 32"`
ConsensusTimeoutMs uint32 `tlb:"## 32"`
FastAttempts uint32 `tlb:"## 32"`
AttemptDuration uint32 `tlb:"## 32"`
CatchainMaxDeps uint32 `tlb:"## 32"`
MaxBlockBytes uint32 `tlb:"## 32"`
MaxCollatedBytes uint32 `tlb:"## 32"`
// contains filtered or unexported fields
}
type ConsensusConfigV3 ¶ added in v1.8.0
type ConsensusConfigV3 struct {
Flags uint8 `tlb:"## 7"`
NewCatchainIds bool `tlb:"bool"`
RoundCandidates uint8 `tlb:"## 8"`
NextCandidateDelayMs uint32 `tlb:"## 32"`
ConsensusTimeoutMs uint32 `tlb:"## 32"`
FastAttempts uint32 `tlb:"## 32"`
AttemptDuration uint32 `tlb:"## 32"`
CatchainMaxDeps uint32 `tlb:"## 32"`
MaxBlockBytes uint32 `tlb:"## 32"`
MaxCollatedBytes uint32 `tlb:"## 32"`
ProtoVersion uint16 `tlb:"## 16"`
// contains filtered or unexported fields
}
type ConsensusConfigV4 ¶ added in v1.8.0
type ConsensusConfigV4 struct {
Flags uint8 `tlb:"## 7"`
NewCatchainIds bool `tlb:"bool"`
RoundCandidates uint8 `tlb:"## 8"`
NextCandidateDelayMs uint32 `tlb:"## 32"`
ConsensusTimeoutMs uint32 `tlb:"## 32"`
FastAttempts uint32 `tlb:"## 32"`
AttemptDuration uint32 `tlb:"## 32"`
CatchainMaxDeps uint32 `tlb:"## 32"`
MaxBlockBytes uint32 `tlb:"## 32"`
MaxCollatedBytes uint32 `tlb:"## 32"`
ProtoVersion uint16 `tlb:"## 16"`
CatchainMaxBlocksCoff uint32 `tlb:"## 32"`
// contains filtered or unexported fields
}
type CreditPhase ¶ added in v1.7.0
type CreditPhase struct {
DueFeesCollected *Coins `tlb:"maybe ."`
Credit CurrencyCollection `tlb:"."`
}
func (*CreditPhase) LoadFromCell ¶ added in v1.18.0
func (c *CreditPhase) LoadFromCell(loader *cell.Slice) error
type CriticalParamsConfig ¶ added in v1.17.0
type CriticalParamsConfig struct {
Params *cell.Dictionary `tlb:"dict inline 32"`
}
type CurrencyCollection ¶
type CurrencyCollection struct {
Coins Coins `tlb:"."`
ExtraCurrencies *cell.Dictionary `tlb:"dict 32"`
}
func (CurrencyCollection) Add ¶ added in v1.18.0
func (c CurrencyCollection) Add(other CurrencyCollection) (CurrencyCollection, error)
Add returns c + other following C++ block::CurrencyCollection::add (ton/crypto/block/block.cpp:1141-1145):
- grams are added as arbitrary precision integers,
- extra currency dictionaries are merged with add_extra_currency (ton/crypto/block/block.cpp:1775-1785).
Neither receiver nor argument is mutated.
func (CurrencyCollection) Equals ¶ added in v1.18.0
func (c CurrencyCollection) Equals(other CurrencyCollection) bool
Equals follows C++ block::CurrencyCollection::operator== (ton/crypto/block/block.cpp:1277-1281): grams are compared numerically and extra currency dictionaries are compared by root cell hash (an empty dictionary equals a nil one, both correspond to the C++ null root reference).
func (CurrencyCollection) GreaterOrEqual ¶ added in v1.18.0
func (c CurrencyCollection) GreaterOrEqual(other CurrencyCollection) (bool, error)
GreaterOrEqual follows C++ block::CurrencyCollection::operator>= (ton/crypto/block/block.cpp:1283-1287): true when grams of c are >= grams of other and subtracting other's extra currencies from c's would not underflow.
func (*CurrencyCollection) LoadFromCell ¶ added in v1.18.0
func (c *CurrencyCollection) LoadFromCell(loader *cell.Slice) error
func (CurrencyCollection) Sub ¶ added in v1.18.0
func (c CurrencyCollection) Sub(other CurrencyCollection) (CurrencyCollection, error)
Sub returns c - other following C++ block::CurrencyCollection::sub (ton/crypto/block/block.cpp:1209-1213):
- a negative grams result is an underflow error (td::sgn(c.grams) >= 0 check),
- extra currency dictionaries are subtracted with sub_extra_currency (ton/crypto/block/block.cpp:1787-1797): every extra currency entry of other must be present in c with a value >= the subtracted one; entries that reach exactly zero are removed from the result dictionary (HashmapE::sub_values drops entries whose difference is zero, ton/crypto/block/block-parse.cpp:550-567).
Neither receiver nor argument is mutated. On underflow the returned error wraps ErrCurrencyCollectionUnderflow.
type DepthBalanceInfo ¶
type DepthBalanceInfo struct {
Depth uint32 `tlb:"## 5"`
Currencies CurrencyCollection `tlb:"."`
}
type DispatchQueueAugDict ¶ added in v1.17.0
type DispatchQueueAugDict struct {
*cell.AugmentedDictionary
}
func (*DispatchQueueAugDict) LoadFromCell ¶ added in v1.17.0
func (d *DispatchQueueAugDict) LoadFromCell(loader *cell.Slice) error
func (*DispatchQueueAugDict) LoadFromCellAsProof ¶ added in v1.17.0
func (d *DispatchQueueAugDict) LoadFromCellAsProof(loader *cell.Slice) error
type EnqueuedMsg ¶ added in v1.17.0
func (*EnqueuedMsg) LoadFromCell ¶ added in v1.17.0
func (m *EnqueuedMsg) LoadFromCell(loader *cell.Slice) error
type ExternalMessage ¶
type ExternalMessage struct {
SrcAddr *address.Address `tlb:"addr"`
DstAddr *address.Address `tlb:"addr"`
ImportFee Coins `tlb:"."`
StateInit *StateInit `tlb:"maybe either leave 1,1 . ^"`
Body *cell.Cell `tlb:"either . ^"`
// contains filtered or unexported fields
}
func (*ExternalMessage) DestAddr ¶
func (m *ExternalMessage) DestAddr() *address.Address
func (*ExternalMessage) LoadFromCell ¶ added in v1.18.0
func (m *ExternalMessage) LoadFromCell(loader *cell.Slice) error
func (*ExternalMessage) NormalizedHash ¶ added in v1.12.0
func (m *ExternalMessage) NormalizedHash() []byte
func (*ExternalMessage) Payload ¶
func (m *ExternalMessage) Payload() *cell.Cell
func (*ExternalMessage) SenderAddr ¶
func (m *ExternalMessage) SenderAddr() *address.Address
type ExternalMessageIn ¶ added in v1.12.0
type ExternalMessageIn = ExternalMessage
type ExternalMessageOut ¶
type ExternalMessageOut struct {
SrcAddr *address.Address `tlb:"addr"`
DstAddr *address.Address `tlb:"addr"`
CreatedLT uint64 `tlb:"## 64"`
CreatedAt uint32 `tlb:"## 32"`
StateInit *StateInit `tlb:"maybe either leave 1,1 . ^"`
Body *cell.Cell `tlb:"either . ^"`
// contains filtered or unexported fields
}
func (*ExternalMessageOut) DestAddr ¶
func (m *ExternalMessageOut) DestAddr() *address.Address
func (*ExternalMessageOut) LoadFromCell ¶ added in v1.18.0
func (m *ExternalMessageOut) LoadFromCell(loader *cell.Slice) error
func (*ExternalMessageOut) Payload ¶
func (m *ExternalMessageOut) Payload() *cell.Cell
func (*ExternalMessageOut) SenderAddr ¶
func (m *ExternalMessageOut) SenderAddr() *address.Address
type ExtraCurrencyMintPricesConfig ¶ added in v1.17.0
type ExtraCurrencyToMintConfig ¶ added in v1.17.0
type ExtraCurrencyToMintConfig struct {
ToMint *cell.Dictionary `tlb:"dict 32"`
}
type FundamentalSmartContractAddresses ¶ added in v1.17.0
type FundamentalSmartContractAddresses struct {
Addresses *cell.Dictionary `tlb:"dict 256"`
}
type FutureMerge ¶ added in v1.8.0
type FutureSplit ¶ added in v1.8.0
type FutureSplitMergeNone ¶ added in v1.8.0
type FutureSplitMergeNone struct {
// contains filtered or unexported fields
}
type GlobalIDConfig ¶ added in v1.17.0
type GlobalIDConfig struct {
GlobalID int32 `tlb:"## 32"`
}
type GlobalVersion ¶ added in v1.4.0
type HashUpdate ¶ added in v1.7.0
type HashUpdate struct {
OldHash []byte `tlb:"bits 256"`
NewHash []byte `tlb:"bits 256"`
// contains filtered or unexported fields
}
func (*HashUpdate) LoadFromCell ¶ added in v1.18.0
func (h *HashUpdate) LoadFromCell(loader *cell.Slice) error
type ImportFees ¶ added in v1.18.0
type ImportFees struct {
FeesCollected Coins `tlb:"."`
ValueImported CurrencyCollection `tlb:"."`
}
ImportFees is the import_fees$_ TLB type (crypto/block/block.tlb:186-187):
import_fees$_ fees_collected:Grams value_imported:CurrencyCollection = ImportFees;
It is the augmentation extra of InMsgDescr (HashmapAugE 256 InMsg ImportFees).
func (*ImportFees) LoadFromCell ¶ added in v1.18.0
func (f *ImportFees) LoadFromCell(loader *cell.Slice) error
type ImportedMsgQueueLimits ¶ added in v1.17.0
type InMsgDescrAugDict ¶ added in v1.18.0
type InMsgDescrAugDict struct {
*cell.AugmentedDictionary
}
InMsgDescrAugDict wraps InMsgDescr (HashmapAugE 256 InMsg ImportFees).
func NewInMsgDescrAugDict ¶ added in v1.18.0
func NewInMsgDescrAugDict() (*InMsgDescrAugDict, error)
NewInMsgDescrAugDict returns an empty writable InMsgDescr dictionary.
func (*InMsgDescrAugDict) LoadFromCell ¶ added in v1.18.0
func (d *InMsgDescrAugDict) LoadFromCell(loader *cell.Slice) error
func (*InMsgDescrAugDict) LoadFromCellAsProof ¶ added in v1.18.0
func (d *InMsgDescrAugDict) LoadFromCellAsProof(loader *cell.Slice) error
type IntermediateAddress ¶ added in v1.18.0
type IntermediateAddress struct {
Type IntermediateAddressType
// UseDestBits is set for the regular variant, must be <= 96.
UseDestBits uint8
// Workchain and AddrPfx are set for the simple and ext variants.
// The simple variant limits Workchain to int8 range.
Workchain int32
AddrPfx uint64
}
IntermediateAddress is the IntermediateAddress TLB type (crypto/block/block.tlb:161-165, parsing per IntermediateAddress::get_size, crypto/block/block-parse.cpp:797-808). The zero value is the regular variant with use_dest_bits = 0.
func (*IntermediateAddress) LoadFromCell ¶ added in v1.18.0
func (a *IntermediateAddress) LoadFromCell(loader *cell.Slice) error
type IntermediateAddressType ¶ added in v1.18.0
type IntermediateAddressType uint8
IntermediateAddressType selects the IntermediateAddress variant (crypto/block/block.tlb:161-165).
const ( // IntermediateAddressRegular is interm_addr_regular$0 use_dest_bits:(#<= 96). IntermediateAddressRegular IntermediateAddressType = iota // IntermediateAddressSimple is interm_addr_simple$10 workchain_id:int8 addr_pfx:uint64. IntermediateAddressSimple // IntermediateAddressExt is interm_addr_ext$11 workchain_id:int32 addr_pfx:uint64. IntermediateAddressExt )
type InternalMessage ¶
type InternalMessage struct {
IHRDisabled bool `tlb:"bool"`
Bounce bool `tlb:"bool"`
Bounced bool `tlb:"bool"`
SrcAddr *address.Address `tlb:"addr"`
DstAddr *address.Address `tlb:"addr"`
Amount Coins `tlb:"."`
ExtraCurrencies *cell.Dictionary `tlb:"dict 32"`
IHRFee Coins `tlb:"."`
FwdFee Coins `tlb:"."`
CreatedLT uint64 `tlb:"## 64"`
CreatedAt uint32 `tlb:"## 32"`
StateInit *StateInit `tlb:"maybe either leave 1,1 . ^"`
Body *cell.Cell `tlb:"either . ^"`
// contains filtered or unexported fields
}
func (*InternalMessage) Comment ¶
func (m *InternalMessage) Comment() string
func (*InternalMessage) DestAddr ¶
func (m *InternalMessage) DestAddr() *address.Address
func (*InternalMessage) Dump ¶
func (m *InternalMessage) Dump() string
func (*InternalMessage) LoadFromCell ¶ added in v1.18.0
func (m *InternalMessage) LoadFromCell(loader *cell.Slice) error
func (*InternalMessage) Payload ¶
func (m *InternalMessage) Payload() *cell.Cell
func (*InternalMessage) SenderAddr ¶
func (m *InternalMessage) SenderAddr() *address.Address
type KeyExtBlkRef ¶ added in v1.8.0
type LibRefHash ¶ added in v1.17.0
type LibRefHash struct {
LibHash []byte `tlb:"bits 256"`
// contains filtered or unexported fields
}
type MandatoryParamsConfig ¶ added in v1.17.0
type MandatoryParamsConfig struct {
Params *cell.Dictionary `tlb:"dict inline 32"`
}
type Marshaller ¶ added in v1.8.3
type McBlockExtra ¶
type McBlockExtra struct {
KeyBlock bool `tlb:"bool"`
ShardHashes *cell.Dictionary `tlb:"dict 32"`
ShardFees *ShardFeesAugDict `tlb:"."`
Details struct {
PrevBlockSignatures *cell.Dictionary `tlb:"dict 16"`
RecoverCreateMsg *cell.Cell `tlb:"maybe ^"`
MintMsg *cell.Cell `tlb:"maybe ^"`
} `tlb:"^"`
ConfigParams *ConfigParams `tlb:"?KeyBlock ."`
// contains filtered or unexported fields
}
type McStateExtra ¶ added in v1.4.0
type McStateExtra struct {
ShardHashes *cell.Dictionary `tlb:"dict 32"`
ConfigParams ConfigParams `tlb:"."`
Info *cell.Cell `tlb:"^"`
GlobalBalance CurrencyCollection `tlb:"."`
// contains filtered or unexported fields
}
type McStateExtraBlockInfo ¶ added in v1.8.0
type McStateExtraBlockInfo struct {
Flags uint16 `tlb:"## 16"`
ValidatorInfo ValidatorInfo `tlb:"."`
PrevBlocks *OldMcBlocksInfoAugDict `tlb:"."`
AfterKeyBlock bool `tlb:"bool"`
LastKeyBlock *ExtBlkRef `tlb:"maybe ."`
BlockCreateStats *cell.Cell `tlb:"-"`
}
func (*McStateExtraBlockInfo) LoadFromCell ¶ added in v1.18.0
func (e *McStateExtraBlockInfo) LoadFromCell(loader *cell.Slice) error
func (*McStateExtraBlockInfo) LoadFromCellAsProof ¶ added in v1.18.0
func (e *McStateExtraBlockInfo) LoadFromCellAsProof(loader *cell.Slice) error
type Message ¶
type Message struct {
MsgType MsgType `tlb:"-"`
Msg AnyMessage `tlb:"[ExternalMessage,ExternalMessageOut,InternalMessage]"`
}
func (*Message) AsExternalIn ¶
func (m *Message) AsExternalIn() *ExternalMessage
func (*Message) AsExternalOut ¶
func (m *Message) AsExternalOut() *ExternalMessageOut
func (*Message) AsInternal ¶
func (m *Message) AsInternal() *InternalMessage
type MessageRelaxed ¶ added in v1.17.0
type MessageRelaxed struct {
MsgType MsgType `tlb:"-"`
Info MessageRelaxedInfo `tlb:"-"`
Init MessageRelaxedStateInit `tlb:"-"`
Body MessageRelaxedBody `tlb:"-"`
}
func (*MessageRelaxed) LoadFromCell ¶ added in v1.17.0
func (m *MessageRelaxed) LoadFromCell(loader *cell.Slice) error
type MessageRelaxedBody ¶ added in v1.17.0
func (*MessageRelaxedBody) LoadFromCell ¶ added in v1.17.0
func (m *MessageRelaxedBody) LoadFromCell(loader *cell.Slice) error
type MessageRelaxedInfo ¶ added in v1.17.0
type MessageRelaxedInfo struct {
IHRDisabled bool
Bounce bool
Bounced bool
SrcAddr *address.Address
DstAddr *address.Address
Amount *big.Int
ExtraPresent bool
ExtraCurrencies *cell.Dictionary
ExtraFlags *big.Int
FwdFee *big.Int
CreatedLT uint64
CreatedAt uint32
}
func (MessageRelaxedInfo) HasExtraCurrencies ¶ added in v1.17.0
func (m MessageRelaxedInfo) HasExtraCurrencies() bool
type MessageRelaxedStateInit ¶ added in v1.17.0
func (*MessageRelaxedStateInit) LoadFromCell ¶ added in v1.17.0
func (m *MessageRelaxedStateInit) LoadFromCell(loader *cell.Slice) error
type MessagesList ¶ added in v1.7.0
type MessagesList struct {
List *cell.Dictionary `tlb:"dict inline 15"`
}
func (*MessagesList) ToSlice ¶ added in v1.7.0
func (m *MessagesList) ToSlice() ([]Message, error)
type MintPricesConfig
deprecated
added in
v1.17.0
type MintPricesConfig = ExtraCurrencyMintPricesConfig
Deprecated: use ExtraCurrencyMintPricesConfig.
type MisbehaviourPunishmentConfig ¶ added in v1.17.0
type MisbehaviourPunishmentConfig struct {
DefaultFlatFine Coins `tlb:"."`
DefaultProportionalFine uint32 `tlb:"## 32"`
SeverityFlatMult uint16 `tlb:"## 16"`
SeverityProportionalMult uint16 `tlb:"## 16"`
UnpunishableInterval uint16 `tlb:"## 16"`
LongInterval uint16 `tlb:"## 16"`
LongFlatMult uint16 `tlb:"## 16"`
LongProportionalMult uint16 `tlb:"## 16"`
MediumInterval uint16 `tlb:"## 16"`
MediumFlatMult uint16 `tlb:"## 16"`
MediumProportionalMult uint16 `tlb:"## 16"`
// contains filtered or unexported fields
}
type MsgEnvelope ¶ added in v1.17.0
type MsgEnvelope struct {
CurAddr IntermediateAddress
NextAddr IntermediateAddress
FwdFeeRemaining Coins
Msg *cell.Cell
// EmittedLT and Metadata exist only in msg_envelope_v2#5.
EmittedLT *uint64
Metadata *MsgMetadata
// V2 reports whether the envelope was parsed from (or should be serialized
// as) msg_envelope_v2#5. ToCell auto-upgrades to v2 when EmittedLT or
// Metadata is set.
V2 bool
}
MsgEnvelope is the full MsgEnvelope TLB type:
msg_envelope#4 cur_addr:IntermediateAddress next_addr:IntermediateAddress fwd_fee_remaining:Grams msg:^(Message Any) = MsgEnvelope;
per crypto/block/block.tlb:167-169 and MsgEnvelope::unpack (crypto/block/block-parse.cpp:832-839), plus the current upstream msg_envelope_v2#5 with emitted_lt:(Maybe uint64) and metadata:(Maybe MsgMetadata) appended after the msg ref (the v2 layout is not present in the local ton checkout's block.tlb; it matches the format produced by current mainnet nodes and the previous parser of this package).
func (*MsgEnvelope) LoadFromCell ¶ added in v1.17.0
func (m *MsgEnvelope) LoadFromCell(loader *cell.Slice) error
type MsgMetadata ¶ added in v1.17.0
func (*MsgMetadata) LoadFromCell ¶ added in v1.17.0
func (m *MsgMetadata) LoadFromCell(loader *cell.Slice) error
type NewConsensusConfigAll ¶ added in v1.17.0
type NewConsensusConfigSimplex ¶ added in v1.17.0
type NewConsensusConfigSimplexV2 ¶ added in v1.17.0
type NewConsensusConfigSimplexV2 struct {
Flags uint8 `tlb:"## 7"`
UseQUIC bool `tlb:"bool"`
SlotsPerLeaderWindow uint32 `tlb:"## 32"`
NoncriticalParams *cell.Dictionary `tlb:"dict 8"`
// contains filtered or unexported fields
}
type OldMcBlocksInfoAugDict ¶ added in v1.17.0
type OldMcBlocksInfoAugDict struct {
*cell.AugmentedDictionary
}
func (*OldMcBlocksInfoAugDict) LoadFromCell ¶ added in v1.17.0
func (d *OldMcBlocksInfoAugDict) LoadFromCell(loader *cell.Slice) error
func (*OldMcBlocksInfoAugDict) LoadFromCellAsProof ¶ added in v1.17.0
func (d *OldMcBlocksInfoAugDict) LoadFromCellAsProof(loader *cell.Slice) error
type OutList ¶ added in v1.17.0
type OutMsgDescrAugDict ¶ added in v1.18.0
type OutMsgDescrAugDict struct {
*cell.AugmentedDictionary
}
OutMsgDescrAugDict wraps OutMsgDescr (HashmapAugE 256 OutMsg CurrencyCollection).
func NewOutMsgDescrAugDict ¶ added in v1.18.0
func NewOutMsgDescrAugDict() (*OutMsgDescrAugDict, error)
NewOutMsgDescrAugDict returns an empty writable OutMsgDescr dictionary.
func (*OutMsgDescrAugDict) LoadFromCell ¶ added in v1.18.0
func (d *OutMsgDescrAugDict) LoadFromCell(loader *cell.Slice) error
func (*OutMsgDescrAugDict) LoadFromCellAsProof ¶ added in v1.18.0
func (d *OutMsgDescrAugDict) LoadFromCellAsProof(loader *cell.Slice) error
type OutMsgQueueAugDict ¶ added in v1.17.0
type OutMsgQueueAugDict struct {
*cell.AugmentedDictionary
}
func NewOutMsgQueueAugDict ¶ added in v1.18.0
func NewOutMsgQueueAugDict() (*OutMsgQueueAugDict, error)
NewOutMsgQueueAugDict returns an empty writable OutMsgQueue dictionary.
func (*OutMsgQueueAugDict) LoadFromCell ¶ added in v1.17.0
func (d *OutMsgQueueAugDict) LoadFromCell(loader *cell.Slice) error
func (*OutMsgQueueAugDict) LoadFromCellAsProof ¶ added in v1.17.0
func (d *OutMsgQueueAugDict) LoadFromCellAsProof(loader *cell.Slice) error
type OutMsgQueueExtra ¶ added in v1.17.0
type OutMsgQueueExtra struct {
DispatchQueue *DispatchQueueAugDict
OutQueueSize *uint64
}
func (*OutMsgQueueExtra) LoadFromCell ¶ added in v1.17.0
func (q *OutMsgQueueExtra) LoadFromCell(loader *cell.Slice) error
func (*OutMsgQueueExtra) LoadFromCellAsProof ¶ added in v1.17.0
func (q *OutMsgQueueExtra) LoadFromCellAsProof(loader *cell.Slice) error
type OutMsgQueueInfo ¶ added in v1.17.0
type OutMsgQueueInfo struct {
OutQueue *OutMsgQueueAugDict
ProcInfo *cell.Dictionary
Extra *OutMsgQueueExtra
}
func (*OutMsgQueueInfo) LoadFromCell ¶ added in v1.17.0
func (q *OutMsgQueueInfo) LoadFromCell(loader *cell.Slice) error
func (*OutMsgQueueInfo) LoadFromCellAsProof ¶ added in v1.17.0
func (q *OutMsgQueueInfo) LoadFromCellAsProof(loader *cell.Slice) error
type ParamLimits ¶ added in v1.17.0
type PrecompiledContractsConfig ¶ added in v1.17.0
type PrecompiledContractsConfig struct {
List *cell.Dictionary `tlb:"dict 256"`
// contains filtered or unexported fields
}
type PrecompiledSmc ¶ added in v1.17.0
type PrecompiledSmc struct {
GasUsage uint64 `tlb:"## 64"`
// contains filtered or unexported fields
}
type ProofUnmarshaler ¶ added in v1.17.0
type ShardAccount ¶ added in v1.8.0
type ShardAccountBlocks ¶ added in v1.6.0
type ShardAccountBlocks struct {
Accounts *ShardAccountBlocksAugDict `tlb:"."`
}
type ShardAccountBlocksAugDict ¶ added in v1.17.0
type ShardAccountBlocksAugDict struct {
*cell.AugmentedDictionary
}
func NewShardAccountBlocksAugDict ¶ added in v1.18.0
func NewShardAccountBlocksAugDict() (*ShardAccountBlocksAugDict, error)
NewShardAccountBlocksAugDict returns an empty writable ShardAccountBlocks dictionary.
func (*ShardAccountBlocksAugDict) LoadFromCell ¶ added in v1.17.0
func (d *ShardAccountBlocksAugDict) LoadFromCell(loader *cell.Slice) error
func (*ShardAccountBlocksAugDict) LoadFromCellAsProof ¶ added in v1.17.0
func (d *ShardAccountBlocksAugDict) LoadFromCellAsProof(loader *cell.Slice) error
type ShardAccountsAugDict ¶ added in v1.17.0
type ShardAccountsAugDict struct {
*cell.AugmentedDictionary
}
func NewShardAccountsAugDict ¶ added in v1.18.0
func NewShardAccountsAugDict() (*ShardAccountsAugDict, error)
NewShardAccountsAugDict returns an empty writable ShardAccounts dictionary.
func (*ShardAccountsAugDict) LoadFromCell ¶ added in v1.17.0
func (d *ShardAccountsAugDict) LoadFromCell(loader *cell.Slice) error
func (*ShardAccountsAugDict) LoadFromCellAsProof ¶ added in v1.17.0
func (d *ShardAccountsAugDict) LoadFromCellAsProof(loader *cell.Slice) error
type ShardDesc ¶
type ShardDesc struct {
SeqNo uint32 `tlb:"## 32"`
RegMcSeqno uint32 `tlb:"## 32"`
StartLT uint64 `tlb:"## 64"`
EndLT uint64 `tlb:"## 64"`
RootHash []byte `tlb:"bits 256"`
FileHash []byte `tlb:"bits 256"`
BeforeSplit bool `tlb:"bool"`
BeforeMerge bool `tlb:"bool"`
WantSplit bool `tlb:"bool"`
WantMerge bool `tlb:"bool"`
NXCCUpdated bool `tlb:"bool"`
Flags uint8 `tlb:"## 3"`
NextCatchainSeqNo uint32 `tlb:"## 32"`
NextValidatorShard int64 `tlb:"## 64"`
MinRefMcSeqNo uint32 `tlb:"## 32"`
GenUTime uint32 `tlb:"## 32"`
SplitMergeAt any `tlb:"[FutureMerge,FutureSplit,FutureSplitMergeNone]"`
Currencies struct {
FeesCollected CurrencyCollection `tlb:"."`
FundsCreated CurrencyCollection `tlb:"."`
} `tlb:"^"`
// contains filtered or unexported fields
}
type ShardDescB ¶ added in v1.8.0
type ShardDescB struct {
SeqNo uint32 `tlb:"## 32"`
RegMcSeqno uint32 `tlb:"## 32"`
StartLT uint64 `tlb:"## 64"`
EndLT uint64 `tlb:"## 64"`
RootHash []byte `tlb:"bits 256"`
FileHash []byte `tlb:"bits 256"`
BeforeSplit bool `tlb:"bool"`
BeforeMerge bool `tlb:"bool"`
WantSplit bool `tlb:"bool"`
WantMerge bool `tlb:"bool"`
NXCCUpdated bool `tlb:"bool"`
Flags uint8 `tlb:"## 3"`
NextCatchainSeqNo uint32 `tlb:"## 32"`
NextValidatorShard int64 `tlb:"## 64"`
MinRefMcSeqNo uint32 `tlb:"## 32"`
GenUTime uint32 `tlb:"## 32"`
SplitMergeAt any `tlb:"[FutureMerge,FutureSplit,FutureSplitMergeNone]"`
FeesCollected CurrencyCollection `tlb:"."`
FundsCreated CurrencyCollection `tlb:"."`
// contains filtered or unexported fields
}
type ShardFeeCreated ¶ added in v1.17.0
type ShardFeeCreated struct {
Fees CurrencyCollection `tlb:"."`
Create CurrencyCollection `tlb:"."`
}
type ShardFeesAugDict ¶ added in v1.17.0
type ShardFeesAugDict struct {
*cell.AugmentedDictionary
}
func NewShardFeesAugDict ¶ added in v1.18.0
func NewShardFeesAugDict() (*ShardFeesAugDict, error)
NewShardFeesAugDict returns an empty writable ShardFees dictionary.
func (*ShardFeesAugDict) LoadFromCell ¶ added in v1.17.0
func (d *ShardFeesAugDict) LoadFromCell(loader *cell.Slice) error
func (*ShardFeesAugDict) LoadFromCellAsProof ¶ added in v1.17.0
func (d *ShardFeesAugDict) LoadFromCellAsProof(loader *cell.Slice) error
type ShardID ¶ added in v1.9.8
type ShardID uint64
func (ShardID) ContainsAddress ¶ added in v1.9.8
func (ShardID) IsAncestor ¶ added in v1.9.8
type ShardIdent ¶
type ShardIdent struct {
PrefixBits int8 `tlb:"## 6"` // #<= 60
WorkchainID int32 `tlb:"## 32"`
ShardPrefix uint64 `tlb:"## 64"`
// contains filtered or unexported fields
}
func (ShardIdent) GetShardID ¶ added in v1.9.8
func (s ShardIdent) GetShardID() ShardID
func (ShardIdent) IsAncestor ¶ added in v1.9.8
func (s ShardIdent) IsAncestor(of ShardIdent) bool
func (ShardIdent) IsParent ¶ added in v1.9.8
func (s ShardIdent) IsParent(of ShardIdent) bool
func (ShardIdent) IsSibling ¶ added in v1.9.8
func (s ShardIdent) IsSibling(with ShardIdent) bool
type ShardStateSplit ¶ added in v1.8.0
type ShardStateSplit struct {
Left ShardStateUnsplit `tlb:"^"`
Right ShardStateUnsplit `tlb:"^"`
// contains filtered or unexported fields
}
type ShardStateUnsplit ¶ added in v1.4.0
type ShardStateUnsplit struct {
GlobalID int32 `tlb:"## 32"`
ShardIdent ShardIdent `tlb:"."`
Seqno uint32 `tlb:"## 32"`
VertSeqno uint32 `tlb:"## 32"`
GenUTime uint32 `tlb:"## 32"`
GenLT uint64 `tlb:"## 64"`
MinRefMCSeqno uint32 `tlb:"## 32"`
OutMsgQueueInfo *cell.Cell `tlb:"^"`
BeforeSplit bool `tlb:"bool"`
Accounts struct {
ShardAccounts *ShardAccountsAugDict `tlb:"."`
} `tlb:"^"`
Stats *cell.Cell `tlb:"^"`
McStateExtra *cell.Cell `tlb:"maybe ^"`
// contains filtered or unexported fields
}
type SigPubKeyED25519 ¶ added in v1.6.0
type SigPubKeyED25519 struct {
Key []byte `tlb:"bits 256"`
// contains filtered or unexported fields
}
type SizeLimitsConfig ¶ added in v1.17.0
type SizeLimitsConfig struct {
Config any `tlb:"[SizeLimitsConfigV1,SizeLimitsConfigV2]"`
}
type SizeLimitsConfigV1 ¶ added in v1.17.0
type SizeLimitsConfigV2 ¶ added in v1.17.0
type SizeLimitsConfigV2 struct {
MaxMsgBits uint32 `tlb:"## 32"`
MaxMsgCells uint32 `tlb:"## 32"`
MaxLibraryCells uint32 `tlb:"## 32"`
MaxVMDataDepth uint16 `tlb:"## 16"`
MaxExtMsgSize uint32 `tlb:"## 32"`
MaxExtMsgDepth uint16 `tlb:"## 16"`
MaxAccStateCells uint32 `tlb:"## 32"`
MaxMCAccStateCells uint32 `tlb:"## 32"`
MaxAccPublicLibraries uint32 `tlb:"## 32"`
DeferOutQueueSizeLimit uint32 `tlb:"## 32"`
MaxMsgExtraCurrencies uint32 `tlb:"## 32"`
MaxAccFixedPrefixLength uint8 `tlb:"## 8"`
AccStateCellsForStorageDict uint32 `tlb:"## 32"`
MaxTransactionLibraryLoads *uint32 `tlb:"maybe ## 32"`
// contains filtered or unexported fields
}
type SplitMergeInfo ¶ added in v1.7.0
type SplitMergeInfo struct {
CurShardPfxLen uint8 `tlb:"## 6"`
AccSplitDepth uint8 `tlb:"## 6"`
ThisAddr []byte `tlb:"bits 256"`
SiblingAddr []byte `tlb:"bits 256"`
}
func (*SplitMergeInfo) LoadFromCell ¶ added in v1.18.0
func (s *SplitMergeInfo) LoadFromCell(loader *cell.Slice) error
type StackElement ¶
type StackElement struct {
// contains filtered or unexported fields
}
type StateInit ¶
type StateInit struct {
Depth *uint64 `tlb:"maybe ## 5"`
TickTock *TickTock `tlb:"maybe ."`
Code *cell.Cell `tlb:"maybe ^"`
Data *cell.Cell `tlb:"maybe ^"`
Lib *cell.Dictionary `tlb:"dict 256"`
}
func (StateInit) CalcAddress ¶ added in v1.10.0
func (*StateInit) LoadFromCell ¶ added in v1.18.0
type StateUpdate ¶
type StorageExtraInfo ¶ added in v1.13.0
type StorageExtraInfo struct {
DictHash []byte `tlb:"bits 256"`
// contains filtered or unexported fields
}
type StorageExtraNone ¶ added in v1.13.0
type StorageExtraNone struct {
// contains filtered or unexported fields
}
type StorageInfo ¶
type StorageInfo struct {
StorageUsed StorageUsed `tlb:"."`
StorageExtra any `tlb:"[StorageExtraNone,StorageExtraInfo]"`
LastPaid uint32 `tlb:"## 32"`
DuePayment *Coins `tlb:"maybe ."`
}
func (*StorageInfo) LoadFromCell ¶
func (s *StorageInfo) LoadFromCell(loader *cell.Slice) error
type StoragePhase ¶ added in v1.7.0
type StoragePhase struct {
StorageFeesCollected Coins `tlb:"."`
StorageFeesDue *Coins `tlb:"maybe ."`
StatusChange AccStatusChange `tlb:"."`
}
func (*StoragePhase) LoadFromCell ¶ added in v1.18.0
func (s *StoragePhase) LoadFromCell(loader *cell.Slice) error
type StoragePricesConfig ¶ added in v1.17.0
type StoragePricesConfig struct {
Prices *cell.Dictionary `tlb:"dict inline 32"`
}
type StorageUsed ¶
type StorageUsed struct {
CellsUsed *big.Int `tlb:"var uint 7"`
BitsUsed *big.Int `tlb:"var uint 7"`
}
func (*StorageUsed) LoadFromCell ¶
func (s *StorageUsed) LoadFromCell(loader *cell.Slice) error
type StorageUsedShort ¶ added in v1.7.0
func (*StorageUsedShort) LoadFromCell ¶ added in v1.18.0
func (s *StorageUsedShort) LoadFromCell(loader *cell.Slice) error
type StringSnake ¶ added in v1.13.0
type StringSnake struct {
Value string
}
func (*StringSnake) LoadFromCell ¶ added in v1.13.0
func (s *StringSnake) LoadFromCell(loader *cell.Slice) error
type SuspendedAddressList ¶ added in v1.17.0
type SuspendedAddressList struct {
Addresses *cell.Dictionary `tlb:"dict 288"`
SuspendedUntil uint32 `tlb:"## 32"`
// contains filtered or unexported fields
}
type ToMintConfig
deprecated
added in
v1.17.0
type ToMintConfig = ExtraCurrencyToMintConfig
Deprecated: use ExtraCurrencyToMintConfig.
type Transaction ¶
type Transaction struct {
AccountAddr []byte `tlb:"bits 256"`
LT uint64 `tlb:"## 64"`
PrevTxHash []byte `tlb:"bits 256"`
PrevTxLT uint64 `tlb:"## 64"`
Now uint32 `tlb:"## 32"`
OutMsgCount uint16 `tlb:"## 15"`
OrigStatus AccountStatus `tlb:"."`
EndStatus AccountStatus `tlb:"."`
IO struct {
In *Message `tlb:"maybe ^"`
Out *MessagesList `tlb:"maybe ^"`
} `tlb:"^"`
TotalFees CurrencyCollection `tlb:"."`
StateUpdate HashUpdate `tlb:"^"` // of Account
Description any `` /* 241-byte string literal not displayed */
// not in scheme, but will be filled based on request data for flexibility
Hash []byte `tlb:"-"`
// contains filtered or unexported fields
}
func (*Transaction) Dump ¶
func (t *Transaction) Dump() string
func (*Transaction) LoadFromCell ¶ added in v1.18.0
func (t *Transaction) LoadFromCell(loader *cell.Slice) error
func (*Transaction) String ¶
func (t *Transaction) String() string
type TransactionDescriptionMergeInstall ¶ added in v1.7.0
type TransactionDescriptionMergeInstall struct {
SplitInfo SplitMergeInfo `tlb:"."`
PrepareTransaction *Transaction `tlb:"^"`
StoragePhase *StoragePhase `tlb:"maybe ."`
CreditPhase *CreditPhase `tlb:"maybe ."`
ComputePhase ComputePhase `tlb:"."`
ActionPhase *ActionPhase `tlb:"maybe ^"`
Aborted bool `tlb:"bool"`
Destroyed bool `tlb:"bool"`
// contains filtered or unexported fields
}
func (*TransactionDescriptionMergeInstall) LoadFromCell ¶ added in v1.18.0
func (d *TransactionDescriptionMergeInstall) LoadFromCell(loader *cell.Slice) error
type TransactionDescriptionMergePrepare ¶ added in v1.7.0
type TransactionDescriptionMergePrepare struct {
SplitInfo SplitMergeInfo `tlb:"."`
StoragePhase StoragePhase `tlb:"."`
Aborted bool `tlb:"bool"`
// contains filtered or unexported fields
}
func (*TransactionDescriptionMergePrepare) LoadFromCell ¶ added in v1.18.0
func (d *TransactionDescriptionMergePrepare) LoadFromCell(loader *cell.Slice) error
type TransactionDescriptionOrdinary ¶ added in v1.7.0
type TransactionDescriptionOrdinary struct {
CreditFirst bool `tlb:"bool"`
StoragePhase *StoragePhase `tlb:"maybe ."`
CreditPhase *CreditPhase `tlb:"maybe ."`
ComputePhase ComputePhase `tlb:"."`
ActionPhase *ActionPhase `tlb:"maybe ^"`
Aborted bool `tlb:"bool"`
BouncePhase *BouncePhase `tlb:"maybe ."`
Destroyed bool `tlb:"bool"`
// contains filtered or unexported fields
}
func (*TransactionDescriptionOrdinary) LoadFromCell ¶ added in v1.18.0
func (d *TransactionDescriptionOrdinary) LoadFromCell(loader *cell.Slice) error
type TransactionDescriptionSplitInstall ¶ added in v1.7.0
type TransactionDescriptionSplitInstall struct {
SplitInfo SplitMergeInfo `tlb:"."`
PrepareTransaction *Transaction `tlb:"^"`
Installed bool `tlb:"bool"`
// contains filtered or unexported fields
}
func (*TransactionDescriptionSplitInstall) LoadFromCell ¶ added in v1.18.0
func (d *TransactionDescriptionSplitInstall) LoadFromCell(loader *cell.Slice) error
type TransactionDescriptionSplitPrepare ¶ added in v1.7.0
type TransactionDescriptionSplitPrepare struct {
SplitInfo SplitMergeInfo `tlb:"."`
StoragePhase *StoragePhase `tlb:"maybe ."`
ComputePhase ComputePhase `tlb:"."`
ActionPhase *ActionPhase `tlb:"maybe ^"`
Aborted bool `tlb:"bool"`
Destroyed bool `tlb:"bool"`
// contains filtered or unexported fields
}
func (*TransactionDescriptionSplitPrepare) LoadFromCell ¶ added in v1.18.0
func (d *TransactionDescriptionSplitPrepare) LoadFromCell(loader *cell.Slice) error
type TransactionDescriptionStorage ¶ added in v1.7.0
type TransactionDescriptionStorage struct {
StoragePhase StoragePhase `tlb:"."`
// contains filtered or unexported fields
}
func (*TransactionDescriptionStorage) LoadFromCell ¶ added in v1.18.0
func (d *TransactionDescriptionStorage) LoadFromCell(loader *cell.Slice) error
type TransactionDescriptionTickTock ¶ added in v1.7.0
type TransactionDescriptionTickTock struct {
IsTock bool `tlb:"bool"`
StoragePhase StoragePhase `tlb:"."`
ComputePhase ComputePhase `tlb:"."`
ActionPhase *ActionPhase `tlb:"maybe ^"`
Aborted bool `tlb:"bool"`
Destroyed bool `tlb:"bool"`
// contains filtered or unexported fields
}
func (*TransactionDescriptionTickTock) LoadFromCell ¶ added in v1.18.0
func (d *TransactionDescriptionTickTock) LoadFromCell(loader *cell.Slice) error
type TransactionIO ¶ added in v1.17.0
type TransactionIO struct {
In *Message
Out *MessagesList
}
func (*TransactionIO) LoadFromCell ¶ added in v1.17.0
func (t *TransactionIO) LoadFromCell(loader *cell.Slice) error
type Unmarshaler ¶ added in v1.8.3
type Validator ¶ added in v1.6.0
type Validator struct {
PublicKey SigPubKeyED25519 `tlb:"."`
Weight uint64 `tlb:"## 64"`
// contains filtered or unexported fields
}
type ValidatorAddr ¶ added in v1.6.0
type ValidatorAddr struct {
PublicKey SigPubKeyED25519 `tlb:"."`
Weight uint64 `tlb:"## 64"`
ADNLAddr []byte `tlb:"bits 256"`
// contains filtered or unexported fields
}
type ValidatorCountLimits ¶ added in v1.17.0
type ValidatorElectionTimings ¶ added in v1.17.0
type ValidatorInfo ¶ added in v1.8.0
type ValidatorSet ¶ added in v1.6.0
type ValidatorSetAny ¶ added in v1.8.0
type ValidatorSetAny struct {
Validators any `tlb:"[ValidatorSet,ValidatorSetExt]"`
}
type ValidatorSetExt ¶ added in v1.6.0
type ValidatorStakeLimits ¶ added in v1.17.0
type ValidatorTempKeysConfig ¶ added in v1.17.0
type ValidatorTempKeysConfig struct {
Keys *cell.Dictionary `tlb:"dict 256"`
}
type WorkchainDescr ¶ added in v1.17.0
type WorkchainDescr struct {
Descr any `tlb:"[WorkchainDescrV1,WorkchainDescrV2]"`
}
func (WorkchainDescr) AcceptMessages ¶ added in v1.17.0
func (d WorkchainDescr) AcceptMessages() bool
func (WorkchainDescr) Fields ¶ added in v1.17.0
func (d WorkchainDescr) Fields() WorkchainDescrFields
func (WorkchainDescr) ValidAddressLength ¶ added in v1.17.0
func (d WorkchainDescr) ValidAddressLength(addrLen uint) bool
type WorkchainDescrFields ¶ added in v1.17.0
type WorkchainDescrFields struct {
EnabledSince uint32 `tlb:"## 32"`
ActualMinSplit uint8 `tlb:"## 8"`
MinSplit uint8 `tlb:"## 8"`
MaxSplit uint8 `tlb:"## 8"`
Basic bool `tlb:"bool"`
Active bool `tlb:"bool"`
AcceptMsgs bool `tlb:"bool"`
Flags uint16 `tlb:"## 13"`
ZeroStateRootHash []byte `tlb:"bits 256"`
ZeroStateFileHash []byte `tlb:"bits 256"`
Version uint32 `tlb:"## 32"`
Format any `tlb:"[WorkchainFormatBasic,WorkchainFormatExtended]"`
}
type WorkchainDescrV1 ¶ added in v1.17.0
type WorkchainDescrV1 struct {
WorkchainDescrFields `tlb:"."`
// contains filtered or unexported fields
}
type WorkchainDescrV2 ¶ added in v1.17.0
type WorkchainDescrV2 struct {
WorkchainDescrFields `tlb:"."`
// contains filtered or unexported fields
}
type WorkchainFormatBasic ¶ added in v1.17.0
type WorkchainFormatExtended ¶ added in v1.17.0
type WorkchainFormatExtended struct {
MinAddrLen uint16 `tlb:"## 12"`
MaxAddrLen uint16 `tlb:"## 12"`
AddrLenStep uint16 `tlb:"## 12"`
WorkchainTypeID uint32 `tlb:"## 32"`
// contains filtered or unexported fields
}
func (WorkchainFormatExtended) ValidAddressLength ¶ added in v1.17.0
func (format WorkchainFormatExtended) ValidAddressLength(addrLen uint) bool
type WorkchainsConfig ¶ added in v1.17.0
type WorkchainsConfig struct {
Workchains *cell.Dictionary `tlb:"dict 32"`
}
Source Files
¶
- account.go
- array.go
- aug_dict.go
- block.go
- block_augs.go
- blockchain_config.go
- blockchain_config_types.go
- coins.go
- config.go
- config_prices.go
- currency_math.go
- loader.go
- map.go
- message.go
- message_fast.go
- out_msg_queue.go
- register.go
- shard.go
- stack.go
- state-init.go
- string_snake.go
- text.go
- transaction.go
- transaction_fast.go
- tree.go
- workchain.go