Documentation ¶
Index ¶
- func ContextTimeout(sec int) (context.Context, context.CancelFunc)
- type GrpcClient
- func (g *GrpcClient) CreateAccount(ownerKey *ecdsa.PrivateKey, accountAddress string) (*api.Return, error)
- func (g *GrpcClient) CreateAssetIssue(ownerKey *ecdsa.PrivateKey, name, description, urlStr string, ...) (*api.Return, error)
- func (g *GrpcClient) FreezeBalance(ownerKey *ecdsa.PrivateKey, frozenBalance, frozenDuration int64) (*api.Return, error)
- func (g *GrpcClient) GetAccount(address string) (*core.Account, error)
- func (g *GrpcClient) GetAccountNet(address string) (*api.AccountNetMessage, error)
- func (g *GrpcClient) GetAssetIssueByAccount(address string) (*api.AssetIssueList, error)
- func (g *GrpcClient) GetAssetIssueByName(name string) (*core.AssetIssueContract, error)
- func (g *GrpcClient) GetAssetIssueList() (*api.AssetIssueList, error)
- func (g *GrpcClient) GetBlockById(id string) (*core.Block, error)
- func (g *GrpcClient) GetBlockByLatestNum(num int64) (*api.BlockListExtention, error)
- func (g *GrpcClient) GetBlockByLimitNext(start, end int64) (*api.BlockListExtention, error)
- func (g *GrpcClient) GetBlockByNum(num int64) (*api.BlockExtention, error)
- func (g *GrpcClient) GetConstantResultOfContract(ownerKey *ecdsa.PrivateKey, Contract string, data []byte) ([][]byte, error)
- func (g *GrpcClient) GetNextMaintenanceTime() (*api.NumberMessage, error)
- func (g *GrpcClient) GetNodeInfo() (*core.NodeInfo, error)
- func (g *GrpcClient) GetNowBlock() (*api.BlockExtention, error)
- func (g *GrpcClient) GetTransactionById(id string) (*core.Transaction, error)
- func (g *GrpcClient) GetTransactionInfoById(id string) (*core.TransactionInfo, error)
- func (g *GrpcClient) ListNodes() (*api.NodeList, error)
- func (g *GrpcClient) ListWitnesses() (*api.WitnessList, error)
- func (g *GrpcClient) Start() error
- func (g *GrpcClient) TotalTransaction() (*api.NumberMessage, error)
- func (g *GrpcClient) Transfer(ownerKey *ecdsa.PrivateKey, toAddress string, amount int64) (string, error)
- func (g *GrpcClient) TransferAsset(ownerKey *ecdsa.PrivateKey, AssetName, toAddress string, amount int64) (string, error)
- func (g *GrpcClient) TransferContract(ownerKey *ecdsa.PrivateKey, Contract string, data []byte, feeLimit int64) (string, error)
- func (g *GrpcClient) UnfreezeBalance(ownerKey *ecdsa.PrivateKey) (*api.Return, error)
- func (g *GrpcClient) UpdateAccount(ownerKey *ecdsa.PrivateKey, accountName string) (*api.Return, error)
- func (g *GrpcClient) UpdateAssetIssue(ownerKey *ecdsa.PrivateKey, description, urlStr string, ...) (*api.Return, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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, error)
func (*GrpcClient) CreateAssetIssue ¶
func (*GrpcClient) FreezeBalance ¶
func (g *GrpcClient) FreezeBalance(ownerKey *ecdsa.PrivateKey, frozenBalance, frozenDuration int64) (*api.Return, error)
func (*GrpcClient) GetAccount ¶
func (g *GrpcClient) GetAccount(address string) (*core.Account, error)
func (*GrpcClient) GetAccountNet ¶
func (g *GrpcClient) GetAccountNet(address string) (*api.AccountNetMessage, error)
func (*GrpcClient) GetAssetIssueByAccount ¶
func (g *GrpcClient) GetAssetIssueByAccount(address string) (*api.AssetIssueList, error)
func (*GrpcClient) GetAssetIssueByName ¶
func (g *GrpcClient) GetAssetIssueByName(name string) (*core.AssetIssueContract, error)
func (*GrpcClient) GetAssetIssueList ¶
func (g *GrpcClient) GetAssetIssueList() (*api.AssetIssueList, error)
func (*GrpcClient) GetBlockById ¶
func (g *GrpcClient) GetBlockById(id string) (*core.Block, error)
func (*GrpcClient) GetBlockByLatestNum ¶
func (g *GrpcClient) GetBlockByLatestNum(num int64) (*api.BlockListExtention, error)
func (*GrpcClient) GetBlockByLimitNext ¶
func (g *GrpcClient) GetBlockByLimitNext(start, end int64) (*api.BlockListExtention, error)
func (*GrpcClient) GetBlockByNum ¶
func (g *GrpcClient) GetBlockByNum(num int64) (*api.BlockExtention, error)
func (*GrpcClient) GetConstantResultOfContract ¶
func (g *GrpcClient) GetConstantResultOfContract(ownerKey *ecdsa.PrivateKey, Contract string, data []byte) ([][]byte, error)
func (*GrpcClient) GetNextMaintenanceTime ¶
func (g *GrpcClient) GetNextMaintenanceTime() (*api.NumberMessage, error)
func (*GrpcClient) GetNodeInfo ¶
func (g *GrpcClient) GetNodeInfo() (*core.NodeInfo, error)
func (*GrpcClient) GetNowBlock ¶
func (g *GrpcClient) GetNowBlock() (*api.BlockExtention, error)
func (*GrpcClient) GetTransactionById ¶
func (g *GrpcClient) GetTransactionById(id string) (*core.Transaction, error)
func (*GrpcClient) GetTransactionInfoById ¶
func (g *GrpcClient) GetTransactionInfoById(id string) (*core.TransactionInfo, error)
func (*GrpcClient) ListWitnesses ¶
func (g *GrpcClient) ListWitnesses() (*api.WitnessList, error)
func (*GrpcClient) Start ¶
func (g *GrpcClient) Start() error
func (*GrpcClient) TotalTransaction ¶
func (g *GrpcClient) TotalTransaction() (*api.NumberMessage, error)
func (*GrpcClient) Transfer ¶
func (g *GrpcClient) Transfer(ownerKey *ecdsa.PrivateKey, toAddress string, amount int64) (string, error)
func (*GrpcClient) TransferAsset ¶
func (g *GrpcClient) TransferAsset(ownerKey *ecdsa.PrivateKey, AssetName, toAddress string, amount int64) (string, error)
func (*GrpcClient) TransferContract ¶
func (g *GrpcClient) TransferContract(ownerKey *ecdsa.PrivateKey, Contract string, data []byte, feeLimit int64) (string, error)
func (*GrpcClient) UnfreezeBalance ¶
func (g *GrpcClient) UnfreezeBalance(ownerKey *ecdsa.PrivateKey) (*api.Return, error)
func (*GrpcClient) UpdateAccount ¶
func (g *GrpcClient) UpdateAccount(ownerKey *ecdsa.PrivateKey, accountName string) (*api.Return, error)
func (*GrpcClient) UpdateAssetIssue ¶
func (g *GrpcClient) UpdateAssetIssue(ownerKey *ecdsa.PrivateKey, description, urlStr string, newLimit, newPublicLimit int64) (*api.Return, error)
Click to show internal directories.
Click to hide internal directories.