tonu

package
v0.0.0-...-decc4aa Latest Latest
Warning

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

Go to latest
Published: May 12, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTxWithComment

func NewTxWithComment(comment string) (payloadBase64 string, err error)

func ParseAnyAddress

func ParseAnyAddress(addr string) (*address.Address, error)

func ParseAnyAddressString

func ParseAnyAddressString(addr string) (string, error)

Types

type API

type API struct{ ton.APIClientWrapped }

func Connect

func Connect(ctx context.Context, log zerolog.Logger, cfg *liteclient.GlobalConfig) (*API, error)

func ConnectGlobal

func ConnectGlobal(ctx context.Context, log zerolog.Logger) (*API, error)

type Listener

type Listener struct {
	API *API
	Log zerolog.Logger

	WatchAddress string

	ProcessedTransaction func(ctx context.Context, txHash string) (exist bool, err error)
	ProcessTransaction   func(ctx context.Context, tx *Transaction) error
}

func (*Listener) Start

func (lis *Listener) Start(ctx context.Context) error

type Transaction

type Transaction struct {
	Timestamp time.Time `json:"ts"`
	Hash      string    `json:"hash"`
	SrcAddr   string    `json:"src"`
	DstAddr   string    `json:"dst"`
	Comment   string    `json:"comment"`
	TonAmount *big.Int  `json:"tonAmount"`
	IsDeposit bool      `json:"isDeposit"`
}

Jump to

Keyboard shortcuts

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