client

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 13 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 {
	Client api.WalletClient
	Ctx    context.Context
	Conn   *grpc.ClientConn
}

func NewGrpcClient

func NewGrpcClient(address, apikey string, opts ...grpc.DialOption) (*GrpcClient, error)

func (*GrpcClient) GetAccount added in v0.1.1

func (g *GrpcClient) GetAccount(address string) (*core.Account, error)

func (*GrpcClient) GetBlockByID

func (g *GrpcClient) GetBlockByID(id string) (*core.Block, error)

func (*GrpcClient) GetBlockByNum

func (g *GrpcClient) GetBlockByNum(num int64) (*api.BlockExtention, error)

func (*GrpcClient) GetBlockInfoByNum

func (g *GrpcClient) GetBlockInfoByNum(num int64) (*api.TransactionInfoList, error)

func (*GrpcClient) GetNowBlock

func (g *GrpcClient) GetNowBlock() (*api.BlockExtention, error)

func (*GrpcClient) GetTransactionInfoByID added in v0.1.1

func (g *GrpcClient) GetTransactionInfoByID(id string) (*core.TransactionInfo, error)

func (*GrpcClient) ParseContractNumericProperty

func (g *GrpcClient) ParseContractNumericProperty(data string) (*big.Int, error)

func (*GrpcClient) Sign

func (g *GrpcClient) Sign(tx *core.Transaction, OutAddressPrivateKey string) (*api.Return, error)

func (*GrpcClient) Stop

func (g *GrpcClient) Stop()

func (*GrpcClient) Transfer

func (g *GrpcClient) Transfer(from, toAddress string, amount int64) (*api.TransactionExtention, error)

func (*GrpcClient) TriggerConstantContract

func (g *GrpcClient) TriggerConstantContract(from, contractAddress, method, parameter string) (*api.TransactionExtention, error)

func (*GrpcClient) TriggerContract

func (g *GrpcClient) TriggerContract(from, contractAddress, method, parameter string, feeLimit int64) (*api.TransactionExtention, error)

Jump to

Keyboard shortcuts

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