Documentation ¶
Index ¶
- func ETH2Tron(ethAddr ethcmn.Address) address.Address
- func GenTronKey() (string, string, string, error)
- func JsonPretty(v interface{})
- func Tron2ETH(addressTron address.Address) ethcmn.Address
- func ValidTronAddress(addr string) bool
- type Client
- func (cli *Client) SendTRX(key string, from, toAddress string, amount int64) (string, error)
- func (cli *Client) SendTx(signedTx *core.Transaction) error
- func (cli *Client) SignTx(tx *core.Transaction, key string) (*core.Transaction, error)
- func (cli *Client) TRC20BalanceOf(addr, contract string) (*big.Int, error)
- func (cli *Client) TRC20Transfer(key string, from, to, contract string, amount *big.Int, feeLimit int64) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenTronKey ¶
GenTronKey 生成波场地址信息 返回:地址(Base58),公钥(hex),私钥(hex),error
func JsonPretty ¶
func JsonPretty(v interface{})
func ValidTronAddress ¶
ValidTronAddress 校验是否合法的Tron地址(Base58)
Types ¶
type Client ¶
type Client struct {
*client.GrpcClient
}
func (*Client) SignTx ¶
func (cli *Client) SignTx(tx *core.Transaction, key string) (*core.Transaction, error)
func (*Client) TRC20BalanceOf ¶
Click to show internal directories.
Click to hide internal directories.