thorclient

package
v0.0.0-...-8acb6f8 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// folder name for thorchain thorcli
	StatechainCliFolderName = `.thorcli`
)

Variables

View Source
var EmptyNodeAccount types.NodeAccount

Functions

func GetNodeAccount

func GetNodeAccount(c *http.Client, chainHost, thorAddr string) (types.NodeAccount, error)

GetNodeAccount from thorchain

func GetValidators

func GetValidators(c *http.Client, chainHost string) (*types.ValidatorsResp, error)

func MakeCodec

func MakeCodec() *codec.Codec

Types

type Keys

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

Keys manages all the keys used by thorchain

func NewKeys

func NewKeys(chainHomeFolder, signerName, password string) (*Keys, error)

NewKeys create a new instance of keys

func (*Keys) GetKeybase

func (k *Keys) GetKeybase() ckeys.Keybase

GetKeybase return the keybase

func (*Keys) GetPrivateKey

func (k *Keys) GetPrivateKey() (crypto.PrivKey, error)

GetPrivateKey return the private key

func (*Keys) GetSignerInfo

func (k *Keys) GetSignerInfo() ckeys.Info

GetSignerInfo return signer info

type StateChainBridge

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

StateChainBridge will be used to send tx to statechain

func NewStateChainBridge

func NewStateChainBridge(cfg config.StateChainConfiguration, m *metrics.Metrics) (*StateChainBridge, error)

NewStateChainBridge create a new instance of StateChainBridge

func (*StateChainBridge) EnsureNodeWhitelisted

func (scb *StateChainBridge) EnsureNodeWhitelisted() error

EnsureNodeWhitelisted will call to statechain to check whether the observer had been whitelist or not

func (*StateChainBridge) EnsureNodeWhitelistedWithTimeout

func (scb *StateChainBridge) EnsureNodeWhitelistedWithTimeout() error

func (*StateChainBridge) GetBinanceChainStartHeight

func (scb *StateChainBridge) GetBinanceChainStartHeight() (uint64, error)

GetBinanceChainStartHeight

func (*StateChainBridge) Send

func (scb *StateChainBridge) Send(signed authtypes.StdTx, mode types.TxMode) (common.TxID, error)

Send the signed transaction to statechain

func (*StateChainBridge) Sign

func (scb *StateChainBridge) Sign(txIns []stypes.TxInVoter) (*authtypes.StdTx, error)

Sign the incoming transaction

func (*StateChainBridge) Start

func (scb *StateChainBridge) Start() error

func (*StateChainBridge) WithRetryableHttpClient

func (scb *StateChainBridge) WithRetryableHttpClient(c *retryablehttp.Client)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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