liteclient

package
v1.9.8 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: MIT Imports: 22 Imported by: 6

README

ADNL pure-golang implementation.

This library implements ADNL protocol to communicate with TON nodes at low level.

Protocol description you can find here:

Usage

Example

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBlockNotApplied = fmt.Errorf("block is not applied")
)

Functions

func IsClientError added in v1.0.4

func IsClientError(err error) bool

func IsNotConnectedYet added in v1.0.4

func IsNotConnectedYet(e error) bool

Types

type Address added in v1.0.1

type Address struct {
	// contains filtered or unexported fields
}

func NewAddress added in v1.0.1

func NewAddress(key []byte) (Address, error)

type AdnlMessage added in v1.0.1

type AdnlMessage struct {
	tl.SumType
	AdnlMessageQuery struct {
		QueryId tl.Int256
		Query   []byte
	}
	AdnlMessageAnswer struct {
		QueryId tl.Int256
		Answer  []byte
	}
}

func (AdnlMessage) MarshalTL added in v1.0.1

func (t AdnlMessage) MarshalTL() ([]byte, error)

func (*AdnlMessage) UnmarshalTL added in v1.0.1

func (t *AdnlMessage) UnmarshalTL(r io.Reader) error

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(c *Connection, opts ...Options) *Client

func (*Client) AverageRoundTrip added in v1.6.6

func (c *Client) AverageRoundTrip() time.Duration

func (*Client) IsOK added in v1.1.2

func (c *Client) IsOK() bool

IsOK returns true if there is no problems with this client and its underlying connection to a lite server.

func (*Client) LiteServerGetAccountState added in v1.0.1

func (c *Client) LiteServerGetAccountState(ctx context.Context, request LiteServerGetAccountStateRequest) (res LiteServerAccountStateC, err error)

func (*Client) LiteServerGetAccountStatePrunned added in v1.7.0

func (c *Client) LiteServerGetAccountStatePrunned(ctx context.Context, request LiteServerGetAccountStatePrunnedRequest) (res LiteServerAccountStateC, err error)

func (*Client) LiteServerGetAllShardsInfo added in v1.0.1

func (c *Client) LiteServerGetAllShardsInfo(ctx context.Context, request LiteServerGetAllShardsInfoRequest) (res LiteServerAllShardsInfoC, err error)

func (*Client) LiteServerGetBlock added in v1.0.1

func (c *Client) LiteServerGetBlock(ctx context.Context, request LiteServerGetBlockRequest) (res LiteServerBlockDataC, err error)

func (*Client) LiteServerGetBlockHeader added in v1.0.1

func (c *Client) LiteServerGetBlockHeader(ctx context.Context, request LiteServerGetBlockHeaderRequest) (res LiteServerBlockHeaderC, err error)

func (*Client) LiteServerGetBlockProof added in v1.0.1

func (c *Client) LiteServerGetBlockProof(ctx context.Context, request LiteServerGetBlockProofRequest) (res LiteServerPartialBlockProofC, err error)

func (*Client) LiteServerGetConfigAll added in v1.0.1

func (c *Client) LiteServerGetConfigAll(ctx context.Context, request LiteServerGetConfigAllRequest) (res LiteServerConfigInfoC, err error)

func (*Client) LiteServerGetConfigParams added in v1.0.1

func (c *Client) LiteServerGetConfigParams(ctx context.Context, request LiteServerGetConfigParamsRequest) (res LiteServerConfigInfoC, err error)

func (*Client) LiteServerGetDispatchQueueInfo added in v1.9.5

func (c *Client) LiteServerGetDispatchQueueInfo(ctx context.Context, request LiteServerGetDispatchQueueInfoRequest) (res LiteServerDispatchQueueInfoC, err error)

func (*Client) LiteServerGetLibraries added in v1.0.1

func (c *Client) LiteServerGetLibraries(ctx context.Context, request LiteServerGetLibrariesRequest) (res LiteServerLibraryResultC, err error)

func (*Client) LiteServerGetLibrariesWithProof added in v1.7.0

func (c *Client) LiteServerGetLibrariesWithProof(ctx context.Context, request LiteServerGetLibrariesWithProofRequest) (res LiteServerLibraryResultWithProofC, err error)

func (*Client) LiteServerGetMasterchainInfo added in v1.0.1

func (c *Client) LiteServerGetMasterchainInfo(ctx context.Context) (res LiteServerMasterchainInfoC, err error)

func (*Client) LiteServerGetMasterchainInfoExt added in v1.0.1

func (c *Client) LiteServerGetMasterchainInfoExt(ctx context.Context, request LiteServerGetMasterchainInfoExtRequest) (res LiteServerMasterchainInfoExtC, err error)

func (*Client) LiteServerGetOneTransaction added in v1.0.1

func (c *Client) LiteServerGetOneTransaction(ctx context.Context, request LiteServerGetOneTransactionRequest) (res LiteServerTransactionInfoC, err error)

func (*Client) LiteServerGetOutMsgQueueSizes added in v1.7.0

func (c *Client) LiteServerGetOutMsgQueueSizes(ctx context.Context, request LiteServerGetOutMsgQueueSizesRequest) (res LiteServerOutMsgQueueSizesC, err error)

func (*Client) LiteServerGetShardBlockProof added in v1.0.1

func (c *Client) LiteServerGetShardBlockProof(ctx context.Context, request LiteServerGetShardBlockProofRequest) (res LiteServerShardBlockProofC, err error)

func (*Client) LiteServerGetShardInfo added in v1.0.1

func (c *Client) LiteServerGetShardInfo(ctx context.Context, request LiteServerGetShardInfoRequest) (res LiteServerShardInfoC, err error)

func (*Client) LiteServerGetState added in v1.0.1

func (c *Client) LiteServerGetState(ctx context.Context, request LiteServerGetStateRequest) (res LiteServerBlockStateC, err error)

func (*Client) LiteServerGetTime added in v1.0.1

func (c *Client) LiteServerGetTime(ctx context.Context) (res LiteServerCurrentTimeC, err error)

func (*Client) LiteServerGetTransactions added in v1.0.1

func (c *Client) LiteServerGetTransactions(ctx context.Context, request LiteServerGetTransactionsRequest) (res LiteServerTransactionListC, err error)

func (*Client) LiteServerGetValidatorStats added in v1.0.1

func (c *Client) LiteServerGetValidatorStats(ctx context.Context, request LiteServerGetValidatorStatsRequest) (res LiteServerValidatorStatsC, err error)

func (*Client) LiteServerGetVersion added in v1.0.1

func (c *Client) LiteServerGetVersion(ctx context.Context) (res LiteServerVersionC, err error)

func (*Client) LiteServerListBlockTransactions added in v1.0.1

func (c *Client) LiteServerListBlockTransactions(ctx context.Context, request LiteServerListBlockTransactionsRequest) (res LiteServerBlockTransactionsC, err error)

func (*Client) LiteServerListBlockTransactionsExt added in v1.7.0

func (c *Client) LiteServerListBlockTransactionsExt(ctx context.Context, request LiteServerListBlockTransactionsExtRequest) (res LiteServerBlockTransactionsExtC, err error)

func (*Client) LiteServerLookupBlock added in v1.0.1

func (c *Client) LiteServerLookupBlock(ctx context.Context, request LiteServerLookupBlockRequest) (res LiteServerBlockHeaderC, err error)

func (*Client) LiteServerLookupBlockWithProof added in v1.7.0

func (c *Client) LiteServerLookupBlockWithProof(ctx context.Context, request LiteServerLookupBlockWithProofRequest) (res LiteServerLookupBlockResultC, err error)

func (*Client) LiteServerRunSmcMethod added in v1.0.1

func (c *Client) LiteServerRunSmcMethod(ctx context.Context, request LiteServerRunSmcMethodRequest) (res LiteServerRunMethodResultC, err error)

func (*Client) LiteServerSendMessage added in v1.0.1

func (c *Client) LiteServerSendMessage(ctx context.Context, request LiteServerSendMessageRequest) (res LiteServerSendMsgStatusC, err error)

func (*Client) Request added in v1.0.1

func (c *Client) Request(ctx context.Context, q []byte) ([]byte, error)

Request sends q as query in adnl.message.query and receives answer from adnl.message.answer adnl.message.query query_id:int256 query:bytes = adnl.Message adnl.message.answer query_id:int256 answer:bytes = adnl.Message

func (*Client) WaitMasterchainSeqno added in v1.1.2

func (c *Client) WaitMasterchainSeqno(ctx context.Context, seqno uint32, timeout uint32) error

WaitMasterchainSeqno waits for the given block to become committed. If timeout happens, it returns an error.

type Connection added in v1.0.1

type Connection struct {
	// contains filtered or unexported fields
}

func NewConnection added in v1.0.1

func NewConnection(ctx context.Context, peerPublicKey []byte, host string) (*Connection, error)

func (*Connection) AverageRoundTrip added in v1.6.6

func (c *Connection) AverageRoundTrip() time.Duration

AverageRoundTrip returns an average round trip of the last several pings.

func (*Connection) Responses added in v1.0.1

func (c *Connection) Responses() chan Packet

func (*Connection) Send added in v1.0.1

func (c *Connection) Send(p Packet) error

func (*Connection) Status added in v1.1.2

func (c *Connection) Status() ConnectionStatus

type ConnectionStatus added in v1.0.1

type ConnectionStatus int
const (
	Connecting ConnectionStatus = iota
	Connected
)

type LiteServerAccountDispatchQueueInfoC added in v1.9.5

type LiteServerAccountDispatchQueueInfoC struct {
	Addr  tl.Int256
	Size  uint64
	MinLt uint64
	MaxLt uint64
}

func (LiteServerAccountDispatchQueueInfoC) MarshalTL added in v1.9.5

func (t LiteServerAccountDispatchQueueInfoC) MarshalTL() ([]byte, error)

func (*LiteServerAccountDispatchQueueInfoC) UnmarshalTL added in v1.9.5

type LiteServerAccountIdC added in v1.0.1

type LiteServerAccountIdC struct {
	Workchain uint32
	Id        tl.Int256
}

func AccountID added in v1.0.1

func AccountID(id ton.AccountID) LiteServerAccountIdC

func (LiteServerAccountIdC) MarshalTL added in v1.0.1

func (t LiteServerAccountIdC) MarshalTL() ([]byte, error)

func (*LiteServerAccountIdC) UnmarshalTL added in v1.0.1

func (t *LiteServerAccountIdC) UnmarshalTL(r io.Reader) error

type LiteServerAccountStateC added in v1.0.1

type LiteServerAccountStateC struct {
	Id         TonNodeBlockIdExtC
	Shardblk   TonNodeBlockIdExtC
	ShardProof []byte
	Proof      []byte
	State      []byte
}

func (LiteServerAccountStateC) MarshalTL added in v1.0.1

func (t LiteServerAccountStateC) MarshalTL() ([]byte, error)

func (*LiteServerAccountStateC) UnmarshalTL added in v1.0.1

func (t *LiteServerAccountStateC) UnmarshalTL(r io.Reader) error

type LiteServerAllShardsInfoC added in v1.0.1

type LiteServerAllShardsInfoC struct {
	Id    TonNodeBlockIdExtC
	Proof []byte
	Data  []byte
}

func (LiteServerAllShardsInfoC) MarshalTL added in v1.0.1

func (t LiteServerAllShardsInfoC) MarshalTL() ([]byte, error)

func (*LiteServerAllShardsInfoC) UnmarshalTL added in v1.0.1

func (t *LiteServerAllShardsInfoC) UnmarshalTL(r io.Reader) error

type LiteServerBlockDataC added in v1.0.1

type LiteServerBlockDataC struct {
	Id   TonNodeBlockIdExtC
	Data []byte
}

func (LiteServerBlockDataC) MarshalTL added in v1.0.1

func (t LiteServerBlockDataC) MarshalTL() ([]byte, error)

func (*LiteServerBlockDataC) UnmarshalTL added in v1.0.1

func (t *LiteServerBlockDataC) UnmarshalTL(r io.Reader) error

type LiteServerBlockHeaderC added in v1.0.1

type LiteServerBlockHeaderC struct {
	Id          TonNodeBlockIdExtC
	Mode        uint32
	HeaderProof []byte
}

func (LiteServerBlockHeaderC) MarshalTL added in v1.0.1

func (t LiteServerBlockHeaderC) MarshalTL() ([]byte, error)

func (*LiteServerBlockHeaderC) UnmarshalTL added in v1.0.1

func (t *LiteServerBlockHeaderC) UnmarshalTL(r io.Reader) error
type LiteServerBlockLink struct {
	tl.SumType
	LiteServerBlockLinkBack struct {
		ToKeyBlock bool
		From       TonNodeBlockIdExtC
		To         TonNodeBlockIdExtC
		DestProof  []byte
		Proof      []byte
		StateProof []byte
	}
	LiteServerBlockLinkForward struct {
		ToKeyBlock  bool
		From        TonNodeBlockIdExtC
		To          TonNodeBlockIdExtC
		DestProof   []byte
		ConfigProof []byte
		Signatures  LiteServerSignatureSet
	}
}

func (LiteServerBlockLink) MarshalTL added in v1.0.1

func (t LiteServerBlockLink) MarshalTL() ([]byte, error)

func (*LiteServerBlockLink) UnmarshalTL added in v1.0.1

func (t *LiteServerBlockLink) UnmarshalTL(r io.Reader) error

type LiteServerBlockStateC added in v1.0.1

type LiteServerBlockStateC struct {
	Id       TonNodeBlockIdExtC
	RootHash tl.Int256
	FileHash tl.Int256
	Data     []byte
}

func (LiteServerBlockStateC) MarshalTL added in v1.0.1

func (t LiteServerBlockStateC) MarshalTL() ([]byte, error)

func (*LiteServerBlockStateC) UnmarshalTL added in v1.0.1

func (t *LiteServerBlockStateC) UnmarshalTL(r io.Reader) error

type LiteServerBlockTransactionsC added in v1.0.1

type LiteServerBlockTransactionsC struct {
	Id         TonNodeBlockIdExtC
	ReqCount   uint32
	Incomplete bool
	Ids        []LiteServerTransactionIdC
	Proof      []byte
}

func (LiteServerBlockTransactionsC) MarshalTL added in v1.0.1

func (t LiteServerBlockTransactionsC) MarshalTL() ([]byte, error)

func (*LiteServerBlockTransactionsC) UnmarshalTL added in v1.0.1

func (t *LiteServerBlockTransactionsC) UnmarshalTL(r io.Reader) error

type LiteServerBlockTransactionsExtC added in v1.7.0

type LiteServerBlockTransactionsExtC struct {
	Id           TonNodeBlockIdExtC
	ReqCount     uint32
	Incomplete   bool
	Transactions []byte
	Proof        []byte
}

func (LiteServerBlockTransactionsExtC) MarshalTL added in v1.7.0

func (t LiteServerBlockTransactionsExtC) MarshalTL() ([]byte, error)

func (*LiteServerBlockTransactionsExtC) UnmarshalTL added in v1.7.0

func (t *LiteServerBlockTransactionsExtC) UnmarshalTL(r io.Reader) error

type LiteServerConfigInfoC added in v1.0.1

type LiteServerConfigInfoC struct {
	Mode        uint32
	Id          TonNodeBlockIdExtC
	StateProof  []byte
	ConfigProof []byte
}

func (LiteServerConfigInfoC) MarshalTL added in v1.0.1

func (t LiteServerConfigInfoC) MarshalTL() ([]byte, error)

func (*LiteServerConfigInfoC) UnmarshalTL added in v1.0.1

func (t *LiteServerConfigInfoC) UnmarshalTL(r io.Reader) error

type LiteServerCurrentTimeC added in v1.0.1

type LiteServerCurrentTimeC struct {
	Now uint32
}

func (LiteServerCurrentTimeC) MarshalTL added in v1.0.1

func (t LiteServerCurrentTimeC) MarshalTL() ([]byte, error)

func (*LiteServerCurrentTimeC) UnmarshalTL added in v1.0.1

func (t *LiteServerCurrentTimeC) UnmarshalTL(r io.Reader) error

type LiteServerDebugVerbosityC added in v1.0.1

type LiteServerDebugVerbosityC struct {
	Value uint32
}

func (LiteServerDebugVerbosityC) MarshalTL added in v1.0.1

func (t LiteServerDebugVerbosityC) MarshalTL() ([]byte, error)

func (*LiteServerDebugVerbosityC) UnmarshalTL added in v1.0.1

func (t *LiteServerDebugVerbosityC) UnmarshalTL(r io.Reader) error

type LiteServerDispatchQueueInfoC added in v1.9.5

type LiteServerDispatchQueueInfoC struct {
	Mode                  uint32
	Id                    TonNodeBlockIdExtC
	AccountDispatchQueues []LiteServerAccountDispatchQueueInfoC
	Complete              bool
	Proof                 []byte
}

func (LiteServerDispatchQueueInfoC) MarshalTL added in v1.9.5

func (t LiteServerDispatchQueueInfoC) MarshalTL() ([]byte, error)

func (*LiteServerDispatchQueueInfoC) UnmarshalTL added in v1.9.5

func (t *LiteServerDispatchQueueInfoC) UnmarshalTL(r io.Reader) error

type LiteServerErrorC added in v1.0.1

type LiteServerErrorC struct {
	Code    uint32
	Message string
}

func (LiteServerErrorC) Error added in v1.0.1

func (t LiteServerErrorC) Error() string

func (LiteServerErrorC) IsNotApplied added in v1.0.1

func (t LiteServerErrorC) IsNotApplied() bool

func (LiteServerErrorC) MarshalTL added in v1.0.1

func (t LiteServerErrorC) MarshalTL() ([]byte, error)

func (*LiteServerErrorC) UnmarshalTL added in v1.0.1

func (t *LiteServerErrorC) UnmarshalTL(r io.Reader) error

type LiteServerGetAccountStatePrunnedRequest added in v1.7.0

type LiteServerGetAccountStatePrunnedRequest struct {
	Id      TonNodeBlockIdExtC
	Account LiteServerAccountIdC
}

func (LiteServerGetAccountStatePrunnedRequest) MarshalTL added in v1.7.0

type LiteServerGetAccountStateRequest added in v1.0.1

type LiteServerGetAccountStateRequest struct {
	Id      TonNodeBlockIdExtC
	Account LiteServerAccountIdC
}

func (LiteServerGetAccountStateRequest) MarshalTL added in v1.0.1

func (t LiteServerGetAccountStateRequest) MarshalTL() ([]byte, error)

type LiteServerGetAllShardsInfoRequest added in v1.0.1

type LiteServerGetAllShardsInfoRequest struct {
	Id TonNodeBlockIdExtC
}

func (LiteServerGetAllShardsInfoRequest) MarshalTL added in v1.0.1

func (t LiteServerGetAllShardsInfoRequest) MarshalTL() ([]byte, error)

type LiteServerGetBlockHeaderRequest added in v1.0.1

type LiteServerGetBlockHeaderRequest struct {
	Id   TonNodeBlockIdExtC
	Mode uint32
}

func (LiteServerGetBlockHeaderRequest) MarshalTL added in v1.0.1

func (t LiteServerGetBlockHeaderRequest) MarshalTL() ([]byte, error)

type LiteServerGetBlockProofRequest added in v1.0.1

type LiteServerGetBlockProofRequest struct {
	Mode        uint32
	KnownBlock  TonNodeBlockIdExtC
	TargetBlock *TonNodeBlockIdExtC
}

func (LiteServerGetBlockProofRequest) MarshalTL added in v1.0.1

func (t LiteServerGetBlockProofRequest) MarshalTL() ([]byte, error)

type LiteServerGetBlockRequest added in v1.0.1

type LiteServerGetBlockRequest struct {
	Id TonNodeBlockIdExtC
}

func (LiteServerGetBlockRequest) MarshalTL added in v1.0.1

func (t LiteServerGetBlockRequest) MarshalTL() ([]byte, error)

type LiteServerGetConfigAllRequest added in v1.0.1

type LiteServerGetConfigAllRequest struct {
	Mode uint32
	Id   TonNodeBlockIdExtC
}

func (LiteServerGetConfigAllRequest) MarshalTL added in v1.0.1

func (t LiteServerGetConfigAllRequest) MarshalTL() ([]byte, error)

type LiteServerGetConfigParamsRequest added in v1.0.1

type LiteServerGetConfigParamsRequest struct {
	Mode      uint32
	Id        TonNodeBlockIdExtC
	ParamList []uint32
}

func (LiteServerGetConfigParamsRequest) MarshalTL added in v1.0.1

func (t LiteServerGetConfigParamsRequest) MarshalTL() ([]byte, error)

type LiteServerGetDispatchQueueInfoRequest added in v1.9.5

type LiteServerGetDispatchQueueInfoRequest struct {
	Mode        uint32
	Id          TonNodeBlockIdExtC
	AfterAddr   *tl.Int256
	MaxAccounts uint32
}

func (LiteServerGetDispatchQueueInfoRequest) MarshalTL added in v1.9.5

type LiteServerGetLibrariesRequest added in v1.0.1

type LiteServerGetLibrariesRequest struct {
	LibraryList []tl.Int256
}

func (LiteServerGetLibrariesRequest) MarshalTL added in v1.0.1

func (t LiteServerGetLibrariesRequest) MarshalTL() ([]byte, error)

type LiteServerGetLibrariesWithProofRequest added in v1.7.0

type LiteServerGetLibrariesWithProofRequest struct {
	Id          TonNodeBlockIdExtC
	Mode        uint32
	LibraryList []tl.Int256
}

func (LiteServerGetLibrariesWithProofRequest) MarshalTL added in v1.7.0

type LiteServerGetMasterchainInfoExtRequest added in v1.0.1

type LiteServerGetMasterchainInfoExtRequest struct {
	Mode uint32
}

func (LiteServerGetMasterchainInfoExtRequest) MarshalTL added in v1.0.1

type LiteServerGetOneTransactionRequest added in v1.0.1

type LiteServerGetOneTransactionRequest struct {
	Id      TonNodeBlockIdExtC
	Account LiteServerAccountIdC
	Lt      uint64
}

func (LiteServerGetOneTransactionRequest) MarshalTL added in v1.0.1

func (t LiteServerGetOneTransactionRequest) MarshalTL() ([]byte, error)

type LiteServerGetOutMsgQueueSizesRequest added in v1.7.0

type LiteServerGetOutMsgQueueSizesRequest struct {
	Mode  uint32
	Wc    *uint32
	Shard *uint64
}

func (LiteServerGetOutMsgQueueSizesRequest) MarshalTL added in v1.7.0

func (t LiteServerGetOutMsgQueueSizesRequest) MarshalTL() ([]byte, error)

type LiteServerGetShardBlockProofRequest added in v1.0.1

type LiteServerGetShardBlockProofRequest struct {
	Id TonNodeBlockIdExtC
}

func (LiteServerGetShardBlockProofRequest) MarshalTL added in v1.0.1

func (t LiteServerGetShardBlockProofRequest) MarshalTL() ([]byte, error)

type LiteServerGetShardInfoRequest added in v1.0.1

type LiteServerGetShardInfoRequest struct {
	Id        TonNodeBlockIdExtC
	Workchain uint32
	Shard     uint64
	Exact     bool
}

func (LiteServerGetShardInfoRequest) MarshalTL added in v1.0.1

func (t LiteServerGetShardInfoRequest) MarshalTL() ([]byte, error)

type LiteServerGetStateRequest added in v1.0.1

type LiteServerGetStateRequest struct {
	Id TonNodeBlockIdExtC
}

func (LiteServerGetStateRequest) MarshalTL added in v1.0.1

func (t LiteServerGetStateRequest) MarshalTL() ([]byte, error)

type LiteServerGetTransactionsRequest added in v1.0.1

type LiteServerGetTransactionsRequest struct {
	Count   uint32
	Account LiteServerAccountIdC
	Lt      uint64
	Hash    tl.Int256
}

func (LiteServerGetTransactionsRequest) MarshalTL added in v1.0.1

func (t LiteServerGetTransactionsRequest) MarshalTL() ([]byte, error)

type LiteServerGetValidatorStatsRequest added in v1.0.1

type LiteServerGetValidatorStatsRequest struct {
	Mode          uint32
	Id            TonNodeBlockIdExtC
	Limit         uint32
	StartAfter    *tl.Int256
	ModifiedAfter *uint32
}

func (LiteServerGetValidatorStatsRequest) MarshalTL added in v1.0.1

func (t LiteServerGetValidatorStatsRequest) MarshalTL() ([]byte, error)

type LiteServerLibraryEntryC added in v1.0.1

type LiteServerLibraryEntryC struct {
	Hash tl.Int256
	Data []byte
}

func (LiteServerLibraryEntryC) MarshalTL added in v1.0.1

func (t LiteServerLibraryEntryC) MarshalTL() ([]byte, error)

func (*LiteServerLibraryEntryC) UnmarshalTL added in v1.0.1

func (t *LiteServerLibraryEntryC) UnmarshalTL(r io.Reader) error

type LiteServerLibraryResultC added in v1.0.1

type LiteServerLibraryResultC struct {
	Result []LiteServerLibraryEntryC
}

func (LiteServerLibraryResultC) MarshalTL added in v1.0.1

func (t LiteServerLibraryResultC) MarshalTL() ([]byte, error)

func (*LiteServerLibraryResultC) UnmarshalTL added in v1.0.1

func (t *LiteServerLibraryResultC) UnmarshalTL(r io.Reader) error

type LiteServerLibraryResultWithProofC added in v1.7.0

type LiteServerLibraryResultWithProofC struct {
	Id         TonNodeBlockIdExtC
	Mode       uint32
	Result     []LiteServerLibraryEntryC
	StateProof []byte
	DataProof  []byte
}

func (LiteServerLibraryResultWithProofC) MarshalTL added in v1.7.0

func (t LiteServerLibraryResultWithProofC) MarshalTL() ([]byte, error)

func (*LiteServerLibraryResultWithProofC) UnmarshalTL added in v1.7.0

type LiteServerListBlockTransactionsExtRequest added in v1.7.0

type LiteServerListBlockTransactionsExtRequest struct {
	Id    TonNodeBlockIdExtC
	Mode  uint32
	Count uint32
	After *LiteServerTransactionId3C
}

func (LiteServerListBlockTransactionsExtRequest) MarshalTL added in v1.7.0

type LiteServerListBlockTransactionsRequest added in v1.0.1

type LiteServerListBlockTransactionsRequest struct {
	Id    TonNodeBlockIdExtC
	Mode  uint32
	Count uint32
	After *LiteServerTransactionId3C
}

func (LiteServerListBlockTransactionsRequest) MarshalTL added in v1.0.1

type LiteServerLookupBlockRequest added in v1.0.1

type LiteServerLookupBlockRequest struct {
	Mode  uint32
	Id    TonNodeBlockIdC
	Lt    *uint64
	Utime *uint32
}

func (LiteServerLookupBlockRequest) MarshalTL added in v1.0.1

func (t LiteServerLookupBlockRequest) MarshalTL() ([]byte, error)

type LiteServerLookupBlockResultC added in v1.7.0

type LiteServerLookupBlockResultC struct {
	Id                 TonNodeBlockIdExtC
	Mode               uint32
	McBlockId          TonNodeBlockIdExtC
	ClientMcStateProof []byte
	McBlockProof       []byte
	ShardLinks         []LiteServerShardBlockLinkC
	Header             []byte
	PrevHeader         []byte
}

func (LiteServerLookupBlockResultC) MarshalTL added in v1.7.0

func (t LiteServerLookupBlockResultC) MarshalTL() ([]byte, error)

func (*LiteServerLookupBlockResultC) UnmarshalTL added in v1.7.0

func (t *LiteServerLookupBlockResultC) UnmarshalTL(r io.Reader) error

type LiteServerLookupBlockWithProofRequest added in v1.7.0

type LiteServerLookupBlockWithProofRequest struct {
	Mode      uint32
	Id        TonNodeBlockIdC
	McBlockId TonNodeBlockIdExtC
	Lt        *uint64
	Utime     *uint32
}

func (LiteServerLookupBlockWithProofRequest) MarshalTL added in v1.7.0

type LiteServerMasterchainInfoC added in v1.0.1

type LiteServerMasterchainInfoC struct {
	Last          TonNodeBlockIdExtC
	StateRootHash tl.Int256
	Init          TonNodeZeroStateIdExtC
}

func (LiteServerMasterchainInfoC) MarshalTL added in v1.0.1

func (t LiteServerMasterchainInfoC) MarshalTL() ([]byte, error)

func (*LiteServerMasterchainInfoC) UnmarshalTL added in v1.0.1

func (t *LiteServerMasterchainInfoC) UnmarshalTL(r io.Reader) error

type LiteServerMasterchainInfoExtC added in v1.0.1

type LiteServerMasterchainInfoExtC struct {
	Mode          uint32
	Version       uint32
	Capabilities  uint64
	Last          TonNodeBlockIdExtC
	LastUtime     uint32
	Now           uint32
	StateRootHash tl.Int256
	Init          TonNodeZeroStateIdExtC
}

func (LiteServerMasterchainInfoExtC) MarshalTL added in v1.0.1

func (t LiteServerMasterchainInfoExtC) MarshalTL() ([]byte, error)

func (*LiteServerMasterchainInfoExtC) UnmarshalTL added in v1.0.1

func (t *LiteServerMasterchainInfoExtC) UnmarshalTL(r io.Reader) error

type LiteServerOutMsgQueueSizeC added in v1.7.0

type LiteServerOutMsgQueueSizeC struct {
	Id   TonNodeBlockIdExtC
	Size uint32
}

func (LiteServerOutMsgQueueSizeC) MarshalTL added in v1.7.0

func (t LiteServerOutMsgQueueSizeC) MarshalTL() ([]byte, error)

func (*LiteServerOutMsgQueueSizeC) UnmarshalTL added in v1.7.0

func (t *LiteServerOutMsgQueueSizeC) UnmarshalTL(r io.Reader) error

type LiteServerOutMsgQueueSizesC added in v1.7.0

type LiteServerOutMsgQueueSizesC struct {
	Shards               []LiteServerOutMsgQueueSizeC
	ExtMsgQueueSizeLimit uint32
}

func (LiteServerOutMsgQueueSizesC) MarshalTL added in v1.7.0

func (t LiteServerOutMsgQueueSizesC) MarshalTL() ([]byte, error)

func (*LiteServerOutMsgQueueSizesC) UnmarshalTL added in v1.7.0

func (t *LiteServerOutMsgQueueSizesC) UnmarshalTL(r io.Reader) error

type LiteServerPartialBlockProofC added in v1.0.1

type LiteServerPartialBlockProofC struct {
	Complete bool
	From     TonNodeBlockIdExtC
	To       TonNodeBlockIdExtC
	Steps    []LiteServerBlockLink
}

func (LiteServerPartialBlockProofC) MarshalTL added in v1.0.1

func (t LiteServerPartialBlockProofC) MarshalTL() ([]byte, error)

func (*LiteServerPartialBlockProofC) UnmarshalTL added in v1.0.1

func (t *LiteServerPartialBlockProofC) UnmarshalTL(r io.Reader) error

type LiteServerRunMethodResultC added in v1.0.1

type LiteServerRunMethodResultC struct {
	Mode       uint32
	Id         TonNodeBlockIdExtC
	Shardblk   TonNodeBlockIdExtC
	ShardProof []byte
	Proof      []byte
	StateProof []byte
	InitC7     []byte
	LibExtras  []byte
	ExitCode   uint32
	Result     []byte
}

func (LiteServerRunMethodResultC) MarshalTL added in v1.0.1

func (t LiteServerRunMethodResultC) MarshalTL() ([]byte, error)

func (*LiteServerRunMethodResultC) UnmarshalTL added in v1.0.1

func (t *LiteServerRunMethodResultC) UnmarshalTL(r io.Reader) error

type LiteServerRunSmcMethodRequest added in v1.0.1

type LiteServerRunSmcMethodRequest struct {
	Mode     uint32
	Id       TonNodeBlockIdExtC
	Account  LiteServerAccountIdC
	MethodId uint64
	Params   []byte
}

func (LiteServerRunSmcMethodRequest) MarshalTL added in v1.0.1

func (t LiteServerRunSmcMethodRequest) MarshalTL() ([]byte, error)

type LiteServerSendMessageRequest added in v1.0.1

type LiteServerSendMessageRequest struct {
	Body []byte
}

func (LiteServerSendMessageRequest) MarshalTL added in v1.0.1

func (t LiteServerSendMessageRequest) MarshalTL() ([]byte, error)

type LiteServerSendMsgStatusC added in v1.0.1

type LiteServerSendMsgStatusC struct {
	Status uint32
}

func (LiteServerSendMsgStatusC) MarshalTL added in v1.0.1

func (t LiteServerSendMsgStatusC) MarshalTL() ([]byte, error)

func (*LiteServerSendMsgStatusC) UnmarshalTL added in v1.0.1

func (t *LiteServerSendMsgStatusC) UnmarshalTL(r io.Reader) error

type LiteServerShardBlockLinkC added in v1.0.1

type LiteServerShardBlockLinkC struct {
	Id    TonNodeBlockIdExtC
	Proof []byte
}

func (LiteServerShardBlockLinkC) MarshalTL added in v1.0.1

func (t LiteServerShardBlockLinkC) MarshalTL() ([]byte, error)

func (*LiteServerShardBlockLinkC) UnmarshalTL added in v1.0.1

func (t *LiteServerShardBlockLinkC) UnmarshalTL(r io.Reader) error

type LiteServerShardBlockProofC added in v1.0.1

type LiteServerShardBlockProofC struct {
	MasterchainId TonNodeBlockIdExtC
	Links         []LiteServerShardBlockLinkC
}

func (LiteServerShardBlockProofC) MarshalTL added in v1.0.1

func (t LiteServerShardBlockProofC) MarshalTL() ([]byte, error)

func (*LiteServerShardBlockProofC) UnmarshalTL added in v1.0.1

func (t *LiteServerShardBlockProofC) UnmarshalTL(r io.Reader) error

type LiteServerShardInfoC added in v1.0.1

type LiteServerShardInfoC struct {
	Id         TonNodeBlockIdExtC
	Shardblk   TonNodeBlockIdExtC
	ShardProof []byte
	ShardDescr []byte
}

func (LiteServerShardInfoC) MarshalTL added in v1.0.1

func (t LiteServerShardInfoC) MarshalTL() ([]byte, error)

func (*LiteServerShardInfoC) UnmarshalTL added in v1.0.1

func (t *LiteServerShardInfoC) UnmarshalTL(r io.Reader) error

type LiteServerSignatureC added in v1.0.1

type LiteServerSignatureC struct {
	NodeIdShort tl.Int256
	Signature   []byte
}

func (LiteServerSignatureC) MarshalTL added in v1.0.1

func (t LiteServerSignatureC) MarshalTL() ([]byte, error)

func (*LiteServerSignatureC) UnmarshalTL added in v1.0.1

func (t *LiteServerSignatureC) UnmarshalTL(r io.Reader) error

type LiteServerSignatureSet added in v1.0.1

type LiteServerSignatureSet LiteServerSignatureSetC

func (LiteServerSignatureSet) MarshalTL added in v1.0.1

func (t LiteServerSignatureSet) MarshalTL() ([]byte, error)

func (*LiteServerSignatureSet) UnmarshalTL added in v1.0.1

func (t *LiteServerSignatureSet) UnmarshalTL(r io.Reader) error

type LiteServerSignatureSetC added in v1.0.1

type LiteServerSignatureSetC struct {
	ValidatorSetHash uint32
	CatchainSeqno    uint32
	Signatures       []LiteServerSignatureC
}

func (LiteServerSignatureSetC) MarshalTL added in v1.0.1

func (t LiteServerSignatureSetC) MarshalTL() ([]byte, error)

func (*LiteServerSignatureSetC) UnmarshalTL added in v1.0.1

func (t *LiteServerSignatureSetC) UnmarshalTL(r io.Reader) error

type LiteServerTransactionId3C added in v1.0.1

type LiteServerTransactionId3C struct {
	Account tl.Int256
	Lt      uint64
}

func (LiteServerTransactionId3C) MarshalTL added in v1.0.1

func (t LiteServerTransactionId3C) MarshalTL() ([]byte, error)

func (*LiteServerTransactionId3C) UnmarshalTL added in v1.0.1

func (t *LiteServerTransactionId3C) UnmarshalTL(r io.Reader) error

type LiteServerTransactionIdC added in v1.0.1

type LiteServerTransactionIdC struct {
	Mode    uint32
	Account *tl.Int256
	Lt      *uint64
	Hash    *tl.Int256
}

func (LiteServerTransactionIdC) MarshalTL added in v1.0.1

func (t LiteServerTransactionIdC) MarshalTL() ([]byte, error)

func (*LiteServerTransactionIdC) UnmarshalTL added in v1.0.1

func (t *LiteServerTransactionIdC) UnmarshalTL(r io.Reader) error

type LiteServerTransactionInfoC added in v1.0.1

type LiteServerTransactionInfoC struct {
	Id          TonNodeBlockIdExtC
	Proof       []byte
	Transaction []byte
}

func (LiteServerTransactionInfoC) MarshalTL added in v1.0.1

func (t LiteServerTransactionInfoC) MarshalTL() ([]byte, error)

func (*LiteServerTransactionInfoC) UnmarshalTL added in v1.0.1

func (t *LiteServerTransactionInfoC) UnmarshalTL(r io.Reader) error

type LiteServerTransactionListC added in v1.0.1

type LiteServerTransactionListC struct {
	Ids          []TonNodeBlockIdExtC
	Transactions []byte
}

func (LiteServerTransactionListC) MarshalTL added in v1.0.1

func (t LiteServerTransactionListC) MarshalTL() ([]byte, error)

func (*LiteServerTransactionListC) UnmarshalTL added in v1.0.1

func (t *LiteServerTransactionListC) UnmarshalTL(r io.Reader) error

type LiteServerValidatorStatsC added in v1.0.1

type LiteServerValidatorStatsC struct {
	Mode       uint32
	Id         TonNodeBlockIdExtC
	Count      uint32
	Complete   bool
	StateProof []byte
	DataProof  []byte
}

func (LiteServerValidatorStatsC) MarshalTL added in v1.0.1

func (t LiteServerValidatorStatsC) MarshalTL() ([]byte, error)

func (*LiteServerValidatorStatsC) UnmarshalTL added in v1.0.1

func (t *LiteServerValidatorStatsC) UnmarshalTL(r io.Reader) error

type LiteServerVersionC added in v1.0.1

type LiteServerVersionC struct {
	Mode         uint32
	Version      uint32
	Capabilities uint64
	Now          uint32
}

func (LiteServerVersionC) MarshalTL added in v1.0.1

func (t LiteServerVersionC) MarshalTL() ([]byte, error)

func (*LiteServerVersionC) UnmarshalTL added in v1.0.1

func (t *LiteServerVersionC) UnmarshalTL(r io.Reader) error

type Options

type Options func(connection *Client)

func OptionTimeout added in v1.0.1

func OptionTimeout(t time.Duration) Options

type OverlayID added in v1.5.4

type OverlayID struct {
	Workchain         int32
	Shard             int64
	ZeroStateFileHash tlb.Bits256
}

func (OverlayID) ComputeShortID added in v1.5.4

func (o OverlayID) ComputeShortID() (tl.Int256, error)

func (OverlayID) FullID added in v1.5.4

func (o OverlayID) FullID() ([]byte, error)

FullID computes an ID of the overlay that is used to represent overlay in the TON overlay network.

type Packet added in v1.0.1

type Packet struct {
	Payload []byte
	// contains filtered or unexported fields
}

func NewPacket added in v1.0.1

func NewPacket(payload []byte) (Packet, error)

func ParsePacket added in v1.0.1

func ParsePacket(r io.Reader, decryptor cipher.Stream) (Packet, error)

func (Packet) MagicType added in v1.0.1

func (p Packet) MagicType() uint32

type TonNodeBlockIdC added in v1.0.1

type TonNodeBlockIdC struct {
	Workchain uint32
	Shard     uint64
	Seqno     uint32
}

func (TonNodeBlockIdC) MarshalTL added in v1.0.1

func (t TonNodeBlockIdC) MarshalTL() ([]byte, error)

func (*TonNodeBlockIdC) UnmarshalTL added in v1.0.1

func (t *TonNodeBlockIdC) UnmarshalTL(r io.Reader) error

type TonNodeBlockIdExtC added in v1.0.1

type TonNodeBlockIdExtC struct {
	Workchain uint32
	Shard     uint64
	Seqno     uint32
	RootHash  tl.Int256
	FileHash  tl.Int256
}

func BlockIDExt added in v1.0.1

func BlockIDExt(id ton.BlockIDExt) TonNodeBlockIdExtC

func (TonNodeBlockIdExtC) MarshalTL added in v1.0.1

func (t TonNodeBlockIdExtC) MarshalTL() ([]byte, error)

func (TonNodeBlockIdExtC) ToBlockIdExt added in v1.0.1

func (t TonNodeBlockIdExtC) ToBlockIdExt() ton.BlockIDExt

func (*TonNodeBlockIdExtC) UnmarshalTL added in v1.0.1

func (t *TonNodeBlockIdExtC) UnmarshalTL(r io.Reader) error

type TonNodeShardPublicOverlayIdC added in v1.5.4

type TonNodeShardPublicOverlayIdC struct {
	Workchain         uint32
	Shard             uint64
	ZeroStateFileHash tl.Int256
}

func (TonNodeShardPublicOverlayIdC) MarshalTL added in v1.5.4

func (t TonNodeShardPublicOverlayIdC) MarshalTL() ([]byte, error)

func (*TonNodeShardPublicOverlayIdC) UnmarshalTL added in v1.5.4

func (t *TonNodeShardPublicOverlayIdC) UnmarshalTL(r io.Reader) error

type TonNodeZeroStateIdExtC added in v1.0.1

type TonNodeZeroStateIdExtC struct {
	Workchain uint32
	RootHash  tl.Int256
	FileHash  tl.Int256
}

func (TonNodeZeroStateIdExtC) MarshalTL added in v1.0.1

func (t TonNodeZeroStateIdExtC) MarshalTL() ([]byte, error)

func (*TonNodeZeroStateIdExtC) UnmarshalTL added in v1.0.1

func (t *TonNodeZeroStateIdExtC) UnmarshalTL(r io.Reader) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL