sbch

package
v0.0.0-...-b606183 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterClient

type ClusterClient struct {
	PublicNodes []NodeInfo
	// contains filtered or unexported fields
}

func NewClusterRpcClient

func NewClusterRpcClient(nodesGovAddr string, nodes []NodeInfo, privateUrls []string,
	reqTimeout time.Duration) (*ClusterClient, error)

func (*ClusterClient) GetMonitors

func (cluster *ClusterClient) GetMonitors() ([]gethcmn.Address, error)

func (*ClusterClient) GetRedeemingUtxosForMonitors

func (cluster *ClusterClient) GetRedeemingUtxosForMonitors() ([]*sbchrpctypes.UtxoInfo, error)

func (*ClusterClient) GetRedeemingUtxosForOperators

func (cluster *ClusterClient) GetRedeemingUtxosForOperators() ([]*sbchrpctypes.UtxoInfo, error)

func (*ClusterClient) GetRpcPubkey

func (cluster *ClusterClient) GetRpcPubkey() ([]byte, error)

func (*ClusterClient) GetSbchdNodes

func (cluster *ClusterClient) GetSbchdNodes() ([]NodeInfo, error)

func (*ClusterClient) GetSbchdNodesSorted

func (cluster *ClusterClient) GetSbchdNodesSorted() ([]NodeInfo, error)

func (*ClusterClient) GetToBeConvertedUtxosForMonitors

func (cluster *ClusterClient) GetToBeConvertedUtxosForMonitors() ([]*sbchrpctypes.UtxoInfo, error)

func (*ClusterClient) GetToBeConvertedUtxosForOperators

func (cluster *ClusterClient) GetToBeConvertedUtxosForOperators() ([]*sbchrpctypes.UtxoInfo, error)

func (*ClusterClient) RpcURL

func (cluster *ClusterClient) RpcURL() string

type NodeInfo

type NodeInfo struct {
	ID      uint64       `json:"id"`
	PbkHash gethcmn.Hash `json:"pbkHash"`
	RpcUrl  string       `json:"rpcUrl"`
	Intro   string       `json:"intro"`
}

type RpcClient

type RpcClient interface {
	RpcURL() string
	GetSbchdNodes() ([]NodeInfo, error)
	GetRedeemingUtxosForOperators() ([]*sbchrpctypes.UtxoInfo, error)
	GetRedeemingUtxosForMonitors() ([]*sbchrpctypes.UtxoInfo, error)
	GetToBeConvertedUtxosForOperators() ([]*sbchrpctypes.UtxoInfo, error)
	GetToBeConvertedUtxosForMonitors() ([]*sbchrpctypes.UtxoInfo, error)
	GetMonitors() ([]gethcmn.Address, error)
	GetRpcPubkey() ([]byte, error)
}

type SimpleRpcClient

type SimpleRpcClient struct {
	// contains filtered or unexported fields
}

func NewSimpleRpcClient

func NewSimpleRpcClient(nodesGovAddr, rpcUrl string,
	reqTimeout time.Duration) (*SimpleRpcClient, error)

func (*SimpleRpcClient) GetLostAndFoundUtxos

func (client *SimpleRpcClient) GetLostAndFoundUtxos() ([]*sbchrpctypes.UtxoInfo, error)

func (*SimpleRpcClient) GetMonitors

func (client *SimpleRpcClient) GetMonitors() ([]gethcmn.Address, error)

func (*SimpleRpcClient) GetRedeemableUtxos

func (client *SimpleRpcClient) GetRedeemableUtxos() ([]*sbchrpctypes.UtxoInfo, error)

func (*SimpleRpcClient) GetRedeemingUtxosForMonitors

func (client *SimpleRpcClient) GetRedeemingUtxosForMonitors() ([]*sbchrpctypes.UtxoInfo, error)

func (*SimpleRpcClient) GetRedeemingUtxosForOperators

func (client *SimpleRpcClient) GetRedeemingUtxosForOperators() ([]*sbchrpctypes.UtxoInfo, error)

func (*SimpleRpcClient) GetRpcPubkey

func (client *SimpleRpcClient) GetRpcPubkey() ([]byte, error)

func (*SimpleRpcClient) GetSbchdNodes

func (client *SimpleRpcClient) GetSbchdNodes() ([]NodeInfo, error)

func (*SimpleRpcClient) GetToBeConvertedUtxosForMonitors

func (client *SimpleRpcClient) GetToBeConvertedUtxosForMonitors() ([]*sbchrpctypes.UtxoInfo, error)

func (*SimpleRpcClient) GetToBeConvertedUtxosForOperators

func (client *SimpleRpcClient) GetToBeConvertedUtxosForOperators() ([]*sbchrpctypes.UtxoInfo, error)

func (*SimpleRpcClient) RpcURL

func (client *SimpleRpcClient) RpcURL() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL