grpcClient

package
v0.0.0-...-7eee3ec Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

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

Directories

Path Synopsis
proto
api

Jump to

Keyboard shortcuts

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