Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveCvns ¶
ActiveCvns is the response of getactivecvn rpc call
type Block ¶
type Block struct { Hash string Confirmations int Size int Height int Version int Payload string PayloadHash string MerkleRoot string Time int64 MedianTime int64 Creator string CreatorSignature string Signatures int AdminSignatures int ChainSignature string AdminMultiSig string MissingCreatorIds []string AdminSignerIds []string Tx []string PreviousBlockHash string NextBlockHash string }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client of FairCoin RPC service
func NewClient ¶
func NewClient(url string, cred *Credential) *Client
NewClient returns a FairCoin RPC client
func (*Client) GetActiveCVNs ¶
func (c *Client) GetActiveCVNs() (*ActiveCvns, error)
GetActiveCVNs is the wrapper around getactivecvn rpc
func (*Client) GetBlockCount ¶
GetBlockCount is the wrapper around getblockcount rpc
type Credential ¶
type Credential struct {
// contains filtered or unexported fields
}
Credential holds a credential to connect to FairCoin2 RPC service
func CookieCredential ¶
func CookieCredential() *Credential
CookieCredential reads credential from default cookie
func NewCredential ¶
func NewCredential(user, password string) *Credential
Click to show internal directories.
Click to hide internal directories.