Documentation ¶
Index ¶
- Constants
- func CreateExternalMessage(address AccountID, body *boc.Cell, init *tlb.StateInit, importFee tlb.Grams) (tlb.Message, error)
- func DecodeConfigParams(b []byte) (tlb.ConfigParams, error)
- type AccountID
- func AccountIDFromBase64Url(s string) (AccountID, error)
- func AccountIDFromRaw(s string) (AccountID, error)
- func AccountIDFromTlb(a tlb.MsgAddress) (*AccountID, error)
- func MustParseAccountID(s string) AccountID
- func NewAccountID(id int32, addr [32]byte) *AccountID
- func ParseAccountID(s string) (AccountID, error)
- func (id AccountID) IsZero() bool
- func (id AccountID) MarshalJSON() ([]byte, error)
- func (id AccountID) MarshalTL() ([]byte, error)
- func (id AccountID) String() string
- func (id AccountID) ToHuman(bounce, testnet bool) string
- func (id *AccountID) ToMsgAddress() tlb.MsgAddress
- func (id AccountID) ToRaw() string
- func (id *AccountID) UnmarshalJSON(data []byte) error
- func (id *AccountID) UnmarshalTL(r io.Reader) error
- type Address
- type Bits256
- func (h Bits256) Base64() string
- func (h *Bits256) FromBase64(s string) error
- func (h *Bits256) FromBase64URL(s string) error
- func (h *Bits256) FromBytes(b []byte) error
- func (h *Bits256) FromHex(s string) error
- func (h *Bits256) FromUnknownString(s string) error
- func (h Bits256) Hex() string
- func (b Bits256) MarshalJSON() ([]byte, error)
- func (h *Bits256) Scan(src interface{}) error
- func (b *Bits256) UnmarshalJSON(buf []byte) error
- func (h Bits256) Value() (driver.Value, error)
- type BlockID
- type BlockIDExt
- type BlockchainConfig
- func (conf *BlockchainConfig) ConfigAddr() (AccountID, bool)
- func (conf *BlockchainConfig) CriticalParams() []int
- func (conf *BlockchainConfig) DnsRootAddr() (AccountID, bool)
- func (conf *BlockchainConfig) ElectorAddr() (AccountID, bool)
- func (conf *BlockchainConfig) FeeCollectorAddr() (AccountID, bool)
- func (conf *BlockchainConfig) MandatoryParams() []int
- func (conf *BlockchainConfig) MinterAddr() (AccountID, bool)
- type ShardID
- type Transaction
Constants ¶
const OneTON tlb.Grams = 1_000_000_000
Variables ¶
This section is empty.
Functions ¶
func CreateExternalMessage ¶
func DecodeConfigParams ¶ added in v1.4.0
func DecodeConfigParams(b []byte) (tlb.ConfigParams, error)
Types ¶
type AccountID ¶
func AccountIDFromBase64Url ¶
func AccountIDFromRaw ¶
func AccountIDFromTlb ¶
func AccountIDFromTlb(a tlb.MsgAddress) (*AccountID, error)
TODO: replace pointer with nullable type
func MustParseAccountID ¶
func NewAccountID ¶ added in v1.3.0
func ParseAccountID ¶
func (AccountID) MarshalJSON ¶
func (*AccountID) ToMsgAddress ¶
func (id *AccountID) ToMsgAddress() tlb.MsgAddress
func (*AccountID) UnmarshalJSON ¶
type Address ¶
Address identifies an account in the TON network. Comparing to AccountID which is a low-level identifier of a smart contract, Address is a high-level abstraction containing additional information besides AccountID, which is useful for building more advanced workflows.
type Bits256 ¶
func MustParseHash ¶
func (*Bits256) FromBase64 ¶
func (*Bits256) FromBase64URL ¶
func (*Bits256) FromUnknownString ¶
func (Bits256) MarshalJSON ¶
func (*Bits256) UnmarshalJSON ¶
type BlockID ¶
func MustParseBlockID ¶
func ParseBlockID ¶
ParseBlockID tries to construct BlockID from the given string.
type BlockIDExt ¶
func GetParents ¶
func GetParents(i tlb.BlockInfo) ([]BlockIDExt, error)
func NewTonBlockId ¶
func NewTonBlockId(fileHash, rootHash Bits256, seqno uint32, shard uint64, workchain int32) *BlockIDExt
func ShardIDs ¶
func ShardIDs(blk *tlb.Block) []BlockIDExt
ShardIDs returns a list of IDs of shard blocks this block refers to.
func (BlockIDExt) MarshalTL ¶
func (id BlockIDExt) MarshalTL() ([]byte, error)
func (BlockIDExt) String ¶
func (id BlockIDExt) String() string
func (*BlockIDExt) UnmarshalTL ¶
func (id *BlockIDExt) UnmarshalTL(data []byte) error
type BlockchainConfig ¶ added in v1.4.0
type BlockchainConfig struct { ConfigParam0 *tlb.ConfigParam0 `json:",omitempty"` ConfigParam1 *tlb.ConfigParam1 `json:",omitempty"` ConfigParam2 *tlb.ConfigParam2 `json:",omitempty"` ConfigParam3 *tlb.ConfigParam3 `json:",omitempty"` ConfigParam4 *tlb.ConfigParam4 `json:",omitempty"` ConfigParam5 *tlb.ConfigParam5 `json:",omitempty"` ConfigParam6 *tlb.ConfigParam6 `json:",omitempty"` ConfigParam7 *tlb.ConfigParam7 `json:",omitempty"` ConfigParam8 *tlb.ConfigParam8 `json:",omitempty"` ConfigParam9 *tlb.ConfigParam9 `json:",omitempty"` ConfigParam10 *tlb.ConfigParam10 `json:",omitempty"` ConfigParam11 *tlb.ConfigParam11 `json:",omitempty"` ConfigParam12 *tlb.ConfigParam12 `json:",omitempty"` ConfigParam13 *tlb.ConfigParam13 `json:",omitempty"` ConfigParam14 *tlb.ConfigParam14 `json:",omitempty"` ConfigParam15 *tlb.ConfigParam15 `json:",omitempty"` ConfigParam16 *tlb.ConfigParam16 `json:",omitempty"` ConfigParam17 *tlb.ConfigParam17 `json:",omitempty"` ConfigParam18 *tlb.ConfigParam18 `json:",omitempty"` ConfigParam20 *tlb.ConfigParam20 `json:",omitempty"` ConfigParam21 *tlb.ConfigParam21 `json:",omitempty"` ConfigParam22 *tlb.ConfigParam22 `json:",omitempty"` ConfigParam23 *tlb.ConfigParam23 `json:",omitempty"` ConfigParam24 *tlb.ConfigParam24 `json:",omitempty"` ConfigParam25 *tlb.ConfigParam25 `json:",omitempty"` ConfigParam28 *tlb.ConfigParam28 `json:",omitempty"` ConfigParam29 *tlb.ConfigParam29 `json:",omitempty"` ConfigParam31 *tlb.ConfigParam31 `json:",omitempty"` ConfigParam32 *tlb.ConfigParam32 `json:",omitempty"` ConfigParam33 *tlb.ConfigParam33 `json:",omitempty"` ConfigParam34 *tlb.ConfigParam34 `json:",omitempty"` ConfigParam35 *tlb.ConfigParam35 `json:",omitempty"` ConfigParam36 *tlb.ConfigParam36 `json:",omitempty"` ConfigParam37 *tlb.ConfigParam37 `json:",omitempty"` ConfigParam39 *tlb.ConfigParam39 `json:",omitempty"` ConfigParam40 *tlb.ConfigParam40 `json:",omitempty"` ConfigParam43 *tlb.ConfigParam43 `json:",omitempty"` ConfigParam44 *tlb.ConfigParam44 `json:",omitempty"` ConfigParam71 *tlb.ConfigParam71 `json:",omitempty"` ConfigParam72 *tlb.ConfigParam72 `json:",omitempty"` ConfigParam73 *tlb.ConfigParam73 `json:",omitempty"` ConfigParam79 *tlb.ConfigParam79 `json:",omitempty"` ConfigParam81 *tlb.ConfigParam81 `json:",omitempty"` ConfigParam82 *tlb.ConfigParam82 `json:",omitempty"` ConfigParamNegative71 *boc.Cell `json:",omitempty"` ConfigParamNegative999 *boc.Cell `json:",omitempty"` }
BlockchainConfig represents the TON blockchain configuration stored inside key blocks. This struct is a compromise between a low-level cell-based representation of the config which is tlb.ConfigParams and something more convenient, BlockchainConfig uses lots of tlb types but 1. these tlb types are easy to navigate and 2. BlockchainConfig can be easily serialized to JSON.
func ConvertBlockchainConfig ¶ added in v1.4.0
func ConvertBlockchainConfig(params tlb.ConfigParams, ignoreBrokenParams bool) (*BlockchainConfig, []int, error)
func ConvertBlockchainConfigStrict ¶ added in v1.7.1
func ConvertBlockchainConfigStrict(params tlb.ConfigParams) (*BlockchainConfig, error)
func (*BlockchainConfig) ConfigAddr ¶ added in v1.4.0
func (conf *BlockchainConfig) ConfigAddr() (AccountID, bool)
func (*BlockchainConfig) CriticalParams ¶ added in v1.4.0
func (conf *BlockchainConfig) CriticalParams() []int
func (*BlockchainConfig) DnsRootAddr ¶ added in v1.4.0
func (conf *BlockchainConfig) DnsRootAddr() (AccountID, bool)
func (*BlockchainConfig) ElectorAddr ¶ added in v1.4.0
func (conf *BlockchainConfig) ElectorAddr() (AccountID, bool)
func (*BlockchainConfig) FeeCollectorAddr ¶ added in v1.4.0
func (conf *BlockchainConfig) FeeCollectorAddr() (AccountID, bool)
func (*BlockchainConfig) MandatoryParams ¶ added in v1.4.0
func (conf *BlockchainConfig) MandatoryParams() []int
func (*BlockchainConfig) MinterAddr ¶ added in v1.4.0
func (conf *BlockchainConfig) MinterAddr() (AccountID, bool)
type ShardID ¶
type ShardID struct {
// contains filtered or unexported fields
}
func MustParseShardID ¶
func ParseShardID ¶
func (ShardID) MatchAccountID ¶
func (ShardID) MatchBlockID ¶
type Transaction ¶
type Transaction struct { tlb.Transaction BlockID BlockIDExt }