Documentation ¶
Index ¶
- type GetBalanceReply
- type GetBlockReply
- type JSONRpcResp
- type MVSTx
- type MVSTxOutput
- type RPCClient
- func (r *RPCClient) Check() bool
- func (r *RPCClient) GetBalance(address string) (*GetBalanceReply, error)
- func (r *RPCClient) GetBlockBy(method string, params []interface{}) (*GetBlockReply, error)
- func (r *RPCClient) GetBlockByHash(hash string) (*GetBlockReply, error)
- func (r *RPCClient) GetBlockByHeight(height int64) (*GetBlockReply, error)
- func (r *RPCClient) GetBlockTxs(height uint64) (*GetBlockReply, error)
- func (r *RPCClient) GetHeight() (uint64, error)
- func (r *RPCClient) GetPeerCount() (int, error)
- func (r *RPCClient) GetPendingBlock() (*GetBlockReply, error)
- func (r *RPCClient) GetTransaction(hash string) (*GetBlockReply, error)
- func (r *RPCClient) GetWork() ([]string, error)
- func (r *RPCClient) SendTransaction(from, to, value string) (string, error)
- func (r *RPCClient) SetAddress(address string) ([]string, error)
- func (r *RPCClient) Sick() bool
- func (r *RPCClient) SubmitWork(params []string) (bool, error)
- func (r *RPCClient) ValidateAddress(address string) (*ValidateAddress, error)
- type ValidateAddress
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetBalanceReply ¶
type GetBalanceReply struct {
Unspent int64 `json:"unspent"`
}
type GetBlockReply ¶
type GetBlockReply struct { Difficulty string `json:"bits"` Hash string `json:"hash"` MerkleTreeHash string `json:"merkle_tree_hash"` Mixhash string `json:"mixhash"` Nonce string `json:"nonce"` Number uint64 `json:"number"` PrevHash string `json:"previous_block_hash"` TimeStamp uint64 `json:"timestamp"` TransactionCount uint64 `json:"transaction_count"` Transactions []MVSTx `json:"transactions"` }
func (*GetBlockReply) Confirmed ¶
func (r *GetBlockReply) Confirmed() bool
type JSONRpcResp ¶
type JSONRpcResp struct { Id *json.RawMessage `json:"id"` Result *json.RawMessage `json:"result"` Peers *json.RawMessage `json:"peers"` Error map[string]interface{} `json:"error"` }
type MVSTx ¶
type MVSTx struct { Hash string `json:"hash"` Locktime string `json:"lock_time"` Outputs []MVSTxOutput `json:"outputs"` }
type MVSTxOutput ¶
type RPCClient ¶
type RPCClient struct { sync.RWMutex Url string Name string Account string Password string // contains filtered or unexported fields }
func NewRPCClient ¶
func (*RPCClient) GetBalance ¶
func (r *RPCClient) GetBalance(address string) (*GetBalanceReply, error)
func (*RPCClient) GetBlockBy ¶
func (r *RPCClient) GetBlockBy(method string, params []interface{}) (*GetBlockReply, error)
func (*RPCClient) GetBlockByHash ¶
func (r *RPCClient) GetBlockByHash(hash string) (*GetBlockReply, error)
func (*RPCClient) GetBlockByHeight ¶
func (r *RPCClient) GetBlockByHeight(height int64) (*GetBlockReply, error)
func (*RPCClient) GetBlockTxs ¶
func (r *RPCClient) GetBlockTxs(height uint64) (*GetBlockReply, error)
func (*RPCClient) GetPeerCount ¶
func (*RPCClient) GetPendingBlock ¶
func (r *RPCClient) GetPendingBlock() (*GetBlockReply, error)
func (*RPCClient) GetTransaction ¶
func (r *RPCClient) GetTransaction(hash string) (*GetBlockReply, error)
func (*RPCClient) SendTransaction ¶
func (*RPCClient) ValidateAddress ¶
func (r *RPCClient) ValidateAddress(address string) (*ValidateAddress, error)
type ValidateAddress ¶
func (*ValidateAddress) Valid ¶
func (r *ValidateAddress) Valid() bool
Click to show internal directories.
Click to hide internal directories.