Documentation ¶
Index ¶
- Constants
- func WaitForMNReady(client Client, retryTimeout time.Duration) error
- type Client
- type MockClient
- func (mc *MockClient) Close() error
- func (mc *MockClient) GetNetworkInfo() (*btcjson.GetNetworkInfoResult, error)
- func (mc *MockClient) MasternodeListJSON(_filter string) (map[string]btcjson.MasternodelistResultJSON, error)
- func (mc *MockClient) MasternodeStatus() (*btcjson.MasternodeStatusResult, error)
- func (mc *MockClient) Ping() error
- func (mc *MockClient) QuorumInfo(quorumType btcjson.LLMQType, quorumHash crypto.QuorumHash) (*btcjson.QuorumInfoResult, error)
- func (mc *MockClient) QuorumSign(quorumType btcjson.LLMQType, requestID tmbytes.HexBytes, ...) (*btcjson.QuorumSignResult, error)
- func (mc *MockClient) QuorumVerify(quorumType btcjson.LLMQType, requestID tmbytes.HexBytes, ...) (bool, error)
- type QuorumVerifier
- type RPCClient
- func (rpcClient *RPCClient) Close() error
- func (rpcClient *RPCClient) GetNetworkInfo() (*btcjson.GetNetworkInfoResult, error)
- func (rpcClient *RPCClient) MasternodeListJSON(filter string) (map[string]btcjson.MasternodelistResultJSON, error)
- func (rpcClient *RPCClient) MasternodeStatus() (*btcjson.MasternodeStatusResult, error)
- func (rpcClient *RPCClient) Ping() error
- func (rpcClient *RPCClient) QuorumInfo(quorumType btcjson.LLMQType, quorumHash crypto.QuorumHash) (*btcjson.QuorumInfoResult, error)
- func (rpcClient *RPCClient) QuorumSign(quorumType btcjson.LLMQType, requestID bytes.HexBytes, ...) (*btcjson.QuorumSignResult, error)
- func (rpcClient *RPCClient) QuorumVerify(quorumType btcjson.LLMQType, requestID bytes.HexBytes, ...) (bool, error)
Constants ¶
View Source
const ModuleName = "rpcclient"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface { QuorumVerifier // QuorumInfo returns quorum info QuorumInfo(quorumType btcjson.LLMQType, quorumHash crypto.QuorumHash) (*btcjson.QuorumInfoResult, error) // MasternodeStatus returns masternode status MasternodeStatus() (*btcjson.MasternodeStatusResult, error) // GetNetworkInfo returns network info GetNetworkInfo() (*btcjson.GetNetworkInfoResult, error) // MasternodeListJSON returns masternode list json MasternodeListJSON(filter string) (map[string]btcjson.MasternodelistResultJSON, error) // QuorumSign signs message in a quorum session QuorumSign( quorumType btcjson.LLMQType, requestID bytes.HexBytes, messageHash bytes.HexBytes, quorumHash bytes.HexBytes, ) (*btcjson.QuorumSignResult, error) QuorumVerify( quorumType btcjson.LLMQType, requestID bytes.HexBytes, messageHash bytes.HexBytes, signature bytes.HexBytes, quorumHash bytes.HexBytes, ) (bool, error) // Close Closes connection to dashd Close() error // Ping Sends ping to dashd Ping() error }
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is an implementation of a mock core-server
func NewMockClient ¶
func NewMockClient(chainID string, llmqType btcjson.LLMQType, localPV types.PrivValidator, canSign bool) *MockClient
func (*MockClient) Close ¶
func (mc *MockClient) Close() error
Close closes the underlying connection
func (*MockClient) GetNetworkInfo ¶
func (mc *MockClient) GetNetworkInfo() (*btcjson.GetNetworkInfoResult, error)
func (*MockClient) MasternodeListJSON ¶
func (mc *MockClient) MasternodeListJSON(_filter string) (map[string]btcjson.MasternodelistResultJSON, error)
func (*MockClient) MasternodeStatus ¶
func (mc *MockClient) MasternodeStatus() (*btcjson.MasternodeStatusResult, error)
func (*MockClient) Ping ¶
func (mc *MockClient) Ping() error
Ping sends a ping request to the remote signer
func (*MockClient) QuorumInfo ¶
func (mc *MockClient) QuorumInfo( quorumType btcjson.LLMQType, quorumHash crypto.QuorumHash, ) (*btcjson.QuorumInfoResult, error)
func (*MockClient) QuorumSign ¶
func (mc *MockClient) QuorumSign( quorumType btcjson.LLMQType, requestID tmbytes.HexBytes, messageHash tmbytes.HexBytes, quorumHash crypto.QuorumHash, ) (*btcjson.QuorumSignResult, error)
func (*MockClient) QuorumVerify ¶
type QuorumVerifier ¶
type QuorumVerifier interface { // QuorumVerify verifies quorum signature QuorumVerify( quorumType btcjson.LLMQType, requestID bytes.HexBytes, messageHash bytes.HexBytes, signature bytes.HexBytes, quorumHash bytes.HexBytes, ) (bool, error) }
QuorumVerifier represents subset of priv validator features that allows verification of threshold signatures.
type RPCClient ¶
type RPCClient struct {
// contains filtered or unexported fields
}
RPCClient implements Client Handles connection to the underlying dashd instance
func NewRPCClient ¶
func NewRPCClient(host string, username string, password string, logger log.Logger) (*RPCClient, error)
NewRPCClient returns an instance of Client. it will start the endpoint (if not already started)
func (*RPCClient) GetNetworkInfo ¶
func (rpcClient *RPCClient) GetNetworkInfo() (*btcjson.GetNetworkInfoResult, error)
func (*RPCClient) MasternodeListJSON ¶
func (*RPCClient) MasternodeStatus ¶
func (rpcClient *RPCClient) MasternodeStatus() (*btcjson.MasternodeStatusResult, error)
func (*RPCClient) QuorumInfo ¶
func (rpcClient *RPCClient) QuorumInfo( quorumType btcjson.LLMQType, quorumHash crypto.QuorumHash, ) (*btcjson.QuorumInfoResult, error)
func (*RPCClient) QuorumSign ¶
Click to show internal directories.
Click to hide internal directories.