service

package
v0.0.0-...-a856406 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const GrpcTimeout = 5 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcClient

type GrpcClient struct {
	Address string
	Conn    *grpc.ClientConn
	Client  api.WalletClient
}

func NewGrpcClient

func NewGrpcClient(address string) *GrpcClient

func (*GrpcClient) CreateAccount

func (g *GrpcClient) CreateAccount(ownerKey *ecdsa.PrivateKey,
	accountAddress string) *api.Return

func (*GrpcClient) CreateAccountByContract

func (g *GrpcClient) CreateAccountByContract(accountCreateContract *core.
	AccountCreateContract) (*core.Transaction, error)

func (*GrpcClient) CreateAssetIssue

func (g *GrpcClient) CreateAssetIssue(ownerKey *ecdsa.PrivateKey,
	name, description, urlStr string, totalSupply, startTime, endTime,
	FreeAssetNetLimit,
	PublicFreeAssetNetLimit int64, trxNum,
	icoNum, voteScore int32, frozenSupply map[string]string) *api.Return

func (*GrpcClient) CreateWitness

func (g *GrpcClient) CreateWitness(ownerKey *ecdsa.PrivateKey,
	urlStr string) *api.Return

func (*GrpcClient) FreezeBalance

func (g *GrpcClient) FreezeBalance(ownerKey *ecdsa.PrivateKey,
	frozenBalance, frozenDuration int64) *api.Return

func (*GrpcClient) GetAccount

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

func (*GrpcClient) GetAccountNet

func (g *GrpcClient) GetAccountNet(address string) *api.AccountNetMessage

func (*GrpcClient) GetAssetIssueByAccount

func (g *GrpcClient) GetAssetIssueByAccount(address string) *api.AssetIssueList

func (*GrpcClient) GetAssetIssueByName

func (g *GrpcClient) GetAssetIssueByName(name string) *core.AssetIssueContract

func (*GrpcClient) GetAssetIssueList

func (g *GrpcClient) GetAssetIssueList() *api.AssetIssueList

func (*GrpcClient) GetBlockById

func (g *GrpcClient) GetBlockById(id string) *core.Block

func (*GrpcClient) GetBlockByLatestNum

func (g *GrpcClient) GetBlockByLatestNum(num int64) *api.BlockList

func (*GrpcClient) GetBlockByLimitNext

func (g *GrpcClient) GetBlockByLimitNext(start, end int64) *api.BlockList

func (*GrpcClient) GetBlockByNum

func (g *GrpcClient) GetBlockByNum(num int64) *core.Block

func (*GrpcClient) GetNextMaintenanceTime

func (g *GrpcClient) GetNextMaintenanceTime() *api.NumberMessage

func (*GrpcClient) GetNowBlock

func (g *GrpcClient) GetNowBlock() *core.Block

func (*GrpcClient) GetTransactionById

func (g *GrpcClient) GetTransactionById(id string) *core.Transaction

func (*GrpcClient) ListNodes

func (g *GrpcClient) ListNodes() *api.NodeList

func (*GrpcClient) ListWitnesses

func (g *GrpcClient) ListWitnesses() *api.WitnessList

func (*GrpcClient) ParticipateAssetIssue

func (g *GrpcClient) ParticipateAssetIssue(ownerKey *ecdsa.PrivateKey,
	toAddress,
	assetName string, amount int64) *api.Return

func (*GrpcClient) Start

func (g *GrpcClient) Start()

func (*GrpcClient) TotalTransaction

func (g *GrpcClient) TotalTransaction() *api.NumberMessage

func (*GrpcClient) Transfer

func (g *GrpcClient) Transfer(ownerKey *ecdsa.PrivateKey, toAddress string,
	amount int64) *api.Return

func (*GrpcClient) TransferAsset

func (g *GrpcClient) TransferAsset(ownerKey *ecdsa.PrivateKey, toAddress,
	assetName string, amount int64) *api.Return

func (*GrpcClient) UnfreezeAsset

func (g *GrpcClient) UnfreezeAsset(ownerKey *ecdsa.PrivateKey,
	urlStr string) *api.Return

func (*GrpcClient) UnfreezeBalance

func (g *GrpcClient) UnfreezeBalance(ownerKey *ecdsa.PrivateKey) *api.Return

func (*GrpcClient) UpdateAccount

func (g *GrpcClient) UpdateAccount(ownerKey *ecdsa.PrivateKey,
	accountName string) *api.Return

func (*GrpcClient) UpdateAssetIssue

func (g *GrpcClient) UpdateAssetIssue(ownerKey *ecdsa.PrivateKey,
	description, urlStr string,
	newLimit, newPublicLimit int64) *api.Return

func (*GrpcClient) UpdateWitness

func (g *GrpcClient) UpdateWitness(ownerKey *ecdsa.PrivateKey,
	urlStr string) *api.Return

func (*GrpcClient) VoteWitnessAccount

func (g *GrpcClient) VoteWitnessAccount(ownerKey *ecdsa.PrivateKey,
	witnessMap map[string]string) *api.Return

func (*GrpcClient) WithdrawBalance

func (g *GrpcClient) WithdrawBalance(ownerKey *ecdsa.PrivateKey,
	urlStr string) *api.Return

Jump to

Keyboard shortcuts

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