ton

package
v0.0.0-...-54f08f8 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBlockNotFound = errors.New("block not found")
View Source
var ErrMessageNotAccepted = errors.New("message was not accepted by the contract")

Functions

This section is empty.

Types

type APIClient

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

func NewAPIClient

func NewAPIClient(client LiteClient) *APIClient

func (*APIClient) GetAccount

func (c *APIClient) GetAccount(ctx context.Context, block *tlb.BlockInfo, addr *address.Address) (*Account, error)

func (*APIClient) GetBlockData

func (c *APIClient) GetBlockData(ctx context.Context, block *tlb.BlockInfo) (*tlb.Block, error)

func (*APIClient) GetBlockInfo

func (c *APIClient) GetBlockInfo(ctx context.Context) (*tlb.BlockInfo, error)

GetBlockInfo DEPRECATED and will be removed soon, please use GetMasterchainInfo

func (*APIClient) GetBlockShardsInfo

func (c *APIClient) GetBlockShardsInfo(ctx context.Context, block *tlb.BlockInfo) ([]*tlb.BlockInfo, error)

func (*APIClient) GetBlockTransactions

func (c *APIClient) GetBlockTransactions(ctx context.Context, block *tlb.BlockInfo, count uint32, after ...*tlb.TransactionID) ([]*tlb.TransactionID, bool, error)

func (*APIClient) GetMasterchainInfo

func (c *APIClient) GetMasterchainInfo(ctx context.Context) (*tlb.BlockInfo, error)

func (*APIClient) GetTransaction

func (c *APIClient) GetTransaction(ctx context.Context, block *tlb.BlockInfo, addr *address.Address, lt uint64) (*tlb.Transaction, error)

func (*APIClient) ListTransactions

func (c *APIClient) ListTransactions(ctx context.Context, addr *address.Address, num uint32, lt uint64, txHash []byte) ([]*tlb.Transaction, error)

func (*APIClient) LookupBlock

func (c *APIClient) LookupBlock(ctx context.Context, workchain int32, shard uint64, seqno uint32) (*tlb.BlockInfo, error)

func (*APIClient) RunGetMethod

func (c *APIClient) RunGetMethod(ctx context.Context, blockInfo *tlb.BlockInfo, addr *address.Address, method string, params ...interface{}) ([]interface{}, error)

func (*APIClient) SendExternalInitMessage

func (c *APIClient) SendExternalInitMessage(ctx context.Context, addr *address.Address, msg *cell.Cell, state *tlb.StateInit) error

func (*APIClient) SendExternalMessage

func (c *APIClient) SendExternalMessage(ctx context.Context, addr *address.Address, msg *cell.Cell) error

type Account

type Account struct {
	IsActive   bool
	State      *tlb.AccountState
	Data       *cell.Cell
	Code       *cell.Cell
	LastTxLT   uint64
	LastTxHash []byte
}

type ContractExecError

type ContractExecError struct {
	Code uint32
}

func (ContractExecError) Error

func (e ContractExecError) Error() string

func (ContractExecError) Is

func (e ContractExecError) Is(err error) bool

type LSError

type LSError struct {
	Code uint32
	Text string
}

func (LSError) Error

func (e LSError) Error() string

func (LSError) Is

func (e LSError) Is(err error) bool

type LiteClient

type LiteClient interface {
	Do(ctx context.Context, typeID int32, payload []byte) (*liteclient.LiteResponse, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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