Documentation ¶
Index ¶
- Constants
- type GrpcClient
- func (g *GrpcClient) CreateAccount(ownerKey *ecdsa.PrivateKey, accountAddress string) *api.Return
- func (g *GrpcClient) CreateAccountByContract(accountCreateContract ...) (*core.Transaction, error)
- func (g *GrpcClient) CreateAssetIssue(ownerKey *ecdsa.PrivateKey, name, description, urlStr string, ...) *api.Return
- func (g *GrpcClient) CreateWitness(ownerKey *ecdsa.PrivateKey, urlStr string) *api.Return
- func (g *GrpcClient) FreezeBalance(ownerKey *ecdsa.PrivateKey, frozenBalance, frozenDuration int64) *api.Return
- func (g *GrpcClient) GetAccount(address string) *core.Account
- func (g *GrpcClient) GetAccountNet(address string) *api.AccountNetMessage
- func (g *GrpcClient) GetAssetIssueByAccount(address string) *api.AssetIssueList
- func (g *GrpcClient) GetAssetIssueByName(name string) *core.AssetIssueContract
- func (g *GrpcClient) GetAssetIssueList() *api.AssetIssueList
- func (g *GrpcClient) GetBlockById(id string) *core.Block
- func (g *GrpcClient) GetBlockByLatestNum(num int64) *api.BlockList
- func (g *GrpcClient) GetBlockByLimitNext(start, end int64) *api.BlockList
- func (g *GrpcClient) GetBlockByNum(num int64) *core.Block
- func (g *GrpcClient) GetNextMaintenanceTime() *api.NumberMessage
- func (g *GrpcClient) GetNowBlock() *core.Block
- func (g *GrpcClient) GetTransactionById(id string) *core.Transaction
- func (g *GrpcClient) ListNodes() *api.NodeList
- func (g *GrpcClient) ListWitnesses() *api.WitnessList
- func (g *GrpcClient) ParticipateAssetIssue(ownerKey *ecdsa.PrivateKey, toAddress, assetName string, amount int64) *api.Return
- func (g *GrpcClient) Start()
- func (g *GrpcClient) TotalTransaction() *api.NumberMessage
- func (g *GrpcClient) Transfer(ownerKey *ecdsa.PrivateKey, toAddress string, amount int64) *api.Return
- func (g *GrpcClient) TransferAsset(ownerKey *ecdsa.PrivateKey, toAddress, assetName string, amount int64) *api.Return
- func (g *GrpcClient) UnfreezeAsset(ownerKey *ecdsa.PrivateKey, urlStr string) *api.Return
- func (g *GrpcClient) UnfreezeBalance(ownerKey *ecdsa.PrivateKey) *api.Return
- func (g *GrpcClient) UpdateAccount(ownerKey *ecdsa.PrivateKey, accountName string) *api.Return
- func (g *GrpcClient) UpdateAssetIssue(ownerKey *ecdsa.PrivateKey, description, urlStr string, ...) *api.Return
- func (g *GrpcClient) UpdateWitness(ownerKey *ecdsa.PrivateKey, urlStr string) *api.Return
- func (g *GrpcClient) VoteWitnessAccount(ownerKey *ecdsa.PrivateKey, witnessMap map[string]string) *api.Return
- func (g *GrpcClient) WithdrawBalance(ownerKey *ecdsa.PrivateKey, urlStr string) *api.Return
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
Click to show internal directories.
Click to hide internal directories.