Documentation ¶
Overview ¶
Package client defines the APIs to communicate with the node.
Index ¶
- func NewResolver() naming.Resolver
- type GrpcClient
- func (c *GrpcClient) CreateTestAccount(accountID string) (*ultpb.Account, error)
- func (c *GrpcClient) GetAccount(accountID string) (*ultpb.Account, error)
- func (c *GrpcClient) QueryTx(txKey string) (*types.TxStatus, error)
- func (c *GrpcClient) SubmitTx(txKey string, signature string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResolver ¶
NewResolver creates a simple resolver which returns saved addrs.
Types ¶
type GrpcClient ¶
type GrpcClient struct {
// contains filtered or unexported fields
}
GrpcClient manages the gRPC connections to ult servers and works as a load balancer to the backend ult servers.
func New ¶
func New(networkID, coreEndpoints string) (*GrpcClient, error)
New creates a GrpcClient to the given target servers.
func (*GrpcClient) CreateTestAccount ¶
func (c *GrpcClient) CreateTestAccount(accountID string) (*ultpb.Account, error)
CreateTestAccount creates a test account for the purpose of testing in testnet.
func (*GrpcClient) GetAccount ¶
func (c *GrpcClient) GetAccount(accountID string) (*ultpb.Account, error)
GetAccount gets the account with the requested account id.
Directories ¶
Path | Synopsis |
---|---|
Package build defines various convient methods to construct a transaction.
|
Package build defines various convient methods to construct a transaction. |
Package types defines custom types to represent the response from the node server.
|
Package types defines custom types to represent the response from the node server. |
Click to show internal directories.
Click to hide internal directories.