Documentation ¶
Index ¶
- func DecodeAddress(addr string) ([]byte, error)
- func DeployContract(w *wallet.TrxWallet, client *client.GrpcClient, contractName string, ...) (string, error)
- func EncodeAddress(a []byte) string
- func FreezeBandwidthBalance(w *wallet.TrxWallet, client *client.GrpcClient, delegateTo string, ...) (string, error)
- func FreezeEnergyBalance(w *wallet.TrxWallet, client *client.GrpcClient, delegateTo string, ...) (string, error)
- func GetContractAddress(client *client.GrpcClient, txId string) (string, error)
- func SignAndSendTx(w *wallet.TrxWallet, client *client.GrpcClient, ...) (string, error)
- func SunToTrx(v int64) float64
- func TransferTrx(w *wallet.TrxWallet, client *client.GrpcClient, toAddr string, amount int64) (string, error)
- func TrxToSun(v float64) int64
- func UnfreezeBandwidthBalance(w *wallet.TrxWallet, client *client.GrpcClient, delegateTo string) (string, error)
- func UnfreezeEnergyBalance(w *wallet.TrxWallet, client *client.GrpcClient, delegateTo string) (string, error)
- type Trc20Contract
- func (this *Trc20Contract) BalanceOf(tokenOwner string) (*big.Int, error)
- func (this *Trc20Contract) Decimals() (int, error)
- func (this *Trc20Contract) Name() (string, error)
- func (this *Trc20Contract) Symbol() (string, error)
- func (this *Trc20Contract) Transfer(w *wallet.TrxWallet, toAddr string, amount *big.Int, feeLimit int64) (string, error)
- type TrxClient
- type TrxTransaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeAddress ¶
func DeployContract ¶
func EncodeAddress ¶
func FreezeBandwidthBalance ¶
func FreezeEnergyBalance ¶
func GetContractAddress ¶
func GetContractAddress(client *client.GrpcClient, txId string) (string, error)
func SignAndSendTx ¶
func SignAndSendTx(w *wallet.TrxWallet, client *client.GrpcClient, txExt *api.TransactionExtention) (string, error)
func TransferTrx ¶
func UnfreezeEnergyBalance ¶
Types ¶
type Trc20Contract ¶
type Trc20Contract struct {
// contains filtered or unexported fields
}
func NewErc20Contract ¶
func NewErc20Contract(address string, client *client.GrpcClient) *Trc20Contract
func (*Trc20Contract) BalanceOf ¶
func (this *Trc20Contract) BalanceOf(tokenOwner string) (*big.Int, error)
func (*Trc20Contract) Decimals ¶
func (this *Trc20Contract) Decimals() (int, error)
func (*Trc20Contract) Name ¶
func (this *Trc20Contract) Name() (string, error)
func (*Trc20Contract) Symbol ¶
func (this *Trc20Contract) Symbol() (string, error)
type TrxClient ¶
type TrxClient struct {
RpcClient *client.GrpcClient
}
func (*TrxClient) GetBlockHeight ¶
type TrxTransaction ¶
type TrxTransaction struct {
// contains filtered or unexported fields
}
func NewTransaction ¶
func NewTransaction(txExt *api.TransactionExtention) (*TrxTransaction, error)
func (*TrxTransaction) Send ¶
func (this *TrxTransaction) Send(client *client.GrpcClient) (string, error)
func (*TrxTransaction) TxHash ¶
func (this *TrxTransaction) TxHash() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.