Documentation ¶
Index ¶
- type GrpcClient
- func (g *GrpcClient) Broadcast(tx *core.Transaction) (*api.Return, error)
- func (g *GrpcClient) GetAccount(addr string) (*core.Account, error)
- func (g *GrpcClient) GetAccountResource(addr string) (*api.AccountResourceMessage, error)
- func (g *GrpcClient) GetBlockByNum(num int64) (*api.BlockExtention, error)
- func (g *GrpcClient) GetNowBlock() (*api.BlockExtention, error)
- func (g *GrpcClient) ParseTRC20NumericProperty(data string) (*big.Int, error)
- func (g *GrpcClient) ParseTRC20StringProperty(data string) (string, error)
- func (g *GrpcClient) Start(opts ...grpc.DialOption) error
- func (g *GrpcClient) TRC20Call(fromAddressBase58 string, contractAddressBase58 string, data string, ...) (*api.TransactionExtention, error)
- func (g *GrpcClient) Transfer(from, toAddress string, amount int64) (*api.TransactionExtention, error)
- func (g *GrpcClient) UpdateHash(tx *api.TransactionExtention) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrpcClient ¶
type GrpcClient struct { Address string Conn *grpc.ClientConn Client api.WalletClient // contains filtered or unexported fields }
GrpcClient controller structure
func GetGrpcClient ¶
func GetGrpcClient(node enums.Node) (*GrpcClient, error)
func (*GrpcClient) Broadcast ¶
func (g *GrpcClient) Broadcast(tx *core.Transaction) (*api.Return, error)
func (*GrpcClient) GetAccount ¶
func (g *GrpcClient) GetAccount(addr string) (*core.Account, error)
func (*GrpcClient) GetAccountResource ¶
func (g *GrpcClient) GetAccountResource(addr string) (*api.AccountResourceMessage, error)
func (*GrpcClient) GetBlockByNum ¶
func (g *GrpcClient) GetBlockByNum(num int64) (*api.BlockExtention, error)
func (*GrpcClient) GetNowBlock ¶
func (g *GrpcClient) GetNowBlock() (*api.BlockExtention, error)
func (*GrpcClient) ParseTRC20NumericProperty ¶
func (g *GrpcClient) ParseTRC20NumericProperty(data string) (*big.Int, error)
ParseTRC20NumericProperty get number from data
func (*GrpcClient) ParseTRC20StringProperty ¶
func (g *GrpcClient) ParseTRC20StringProperty(data string) (string, error)
ParseTRC20StringProperty get string from data
func (*GrpcClient) Start ¶
func (g *GrpcClient) Start(opts ...grpc.DialOption) error
func (*GrpcClient) TRC20Call ¶
func (g *GrpcClient) TRC20Call(fromAddressBase58 string, contractAddressBase58 string, data string, constant bool, feeLimit int64) (*api.TransactionExtention, error)
TRC20Call make constant call
func (*GrpcClient) Transfer ¶
func (g *GrpcClient) Transfer(from, toAddress string, amount int64) (*api.TransactionExtention, error)
func (*GrpcClient) UpdateHash ¶
func (g *GrpcClient) UpdateHash(tx *api.TransactionExtention) error
UpdateHash after local changes
Click to show internal directories.
Click to hide internal directories.