chain_tron

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMemo

func GetMemo(s []byte) string

func GetTxHash added in v1.2.0

func GetTxHash(tx *api.TransactionExtention) ([]byte, error)

Types

type ChainTron

type ChainTron struct {
	Ctx    context.Context
	Client api.WalletClient
}

func NewChainTron

func NewChainTron(ctx context.Context, node string) (*ChainTron, error)

func (*ChainTron) AddSign

func (c *ChainTron) AddSign(tx *core.Transaction, private string) (*api.TransactionExtention, error)

AddSign Deprecated

func (*ChainTron) CreateTransaction

func (c *ChainTron) CreateTransaction(fromHex, toHex, memo string, amount int64) (*api.TransactionExtention, error)

func (*ChainTron) GetBalance added in v1.2.0

func (c *ChainTron) GetBalance(addr string) (int64, error)

func (*ChainTron) GetBlockByNumber

func (c *ChainTron) GetBlockByNumber(blockNumber uint64) (*api.BlockExtention, error)

func (*ChainTron) GetBlockNumber

func (c *ChainTron) GetBlockNumber() (int64, error)

func (*ChainTron) LocalSign

func (c *ChainTron) LocalSign(tx *api.TransactionExtention, privateKey string) error

func (*ChainTron) SendTransaction

func (c *ChainTron) SendTransaction(in *core.Transaction) error

func (*ChainTron) TransferTrc20

func (c *ChainTron) TransferTrc20(contractHex, fromHex, toHex string, amount int64, feeLimit int64) (*api.TransactionExtention, error)

Jump to

Keyboard shortcuts

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