Documentation ¶
Index ¶
- Constants
- Variables
- func GetKeyringKeybase(chainHomeFolder, signerName, password string) (ckeys.Keyring, ckeys.Info, error)
- func MakeCodec() codec.ProtoCodecMarshaler
- func MakeLegacyCodec() *codec.LegacyAmino
- type DdchainBridge
- type Keys
- type PoolManager
- type PoolMgr
- type PubKeyContractAddressPair
- type QueryKeysign
Constants ¶
View Source
const ( AuthAccountEndpoint = "/auth/accounts" BroadcastTxsEndpoint = "/" KeygenEndpoint = "/ddchain/keygen" KeysignEndpoint = "/ddchain/keysign" LastBlockEndpoint = "/ddchain/lastblock" NodeAccountEndpoint = "/ddchain/node" SignerMembershipEndpoint = "/ddchain/vaults/%s/signers" StatusEndpoint = "/status" AsgardVault = "/ddchain/vaults/asgard" PubKeysEndpoint = "/ddchain/vaults/pubkeys" DdchainConstants = "/ddchain/constants" RagnarokEndpoint = "/ddchain/ragnarok" MimirEndpoint = "/ddchain/mimir" ChainVersionEndpoint = "/ddchain/version" InboundAddressesEndpoint = "/ddchain/inbound_addresses" PoolsEndpoint = "/ddchain/pools" DDNameEndpoint = "/ddchain/ddname/%s" )
Endpoint urls
Variables ¶
View Source
var ErrNotFound = fmt.Errorf("not found")
Functions ¶
func GetKeyringKeybase ¶
func GetKeyringKeybase(chainHomeFolder, signerName, password string) (ckeys.Keyring, ckeys.Info, error)
GetKeyringKeybase return keyring and key info
func MakeCodec ¶
func MakeCodec() codec.ProtoCodecMarshaler
Types ¶
type DdchainBridge ¶
type DdchainBridge interface { EnsureNodeWhitelisted() error EnsureNodeWhitelistedWithTimeout() error FetchNodeStatus() (stypes.NodeStatus, error) GetAsgards() (stypes.Vaults, error) GetConfig() config.BifrostClientConfiguration GetConstants() (map[string]int64, error) GetContext() client.Context GetContractAddress() ([]PubKeyContractAddressPair, error) GetErrataMsg(txID common.TxID, chain common.Chain) sdk.Msg GetKeygenStdTx(poolPubKey common.PubKey, keysharesBackup []byte, blame stypes.Blame, inputPks common.PubKeys, keygenType stypes.KeygenType, chains common.Chains, height, keygenTime int64) (sdk.Msg, error) GetKeysignParty(vaultPubKey common.PubKey) (common.PubKeys, error) GetMimir(key string) (int64, error) GetObservationsStdTx(txIns stypes.ObservedTxs) ([]cosmos.Msg, error) GetPools() (stypes.Pools, error) GetPubKeys() ([]PubKeyContractAddressPair, error) GetAsgardPubKeys() ([]PubKeyContractAddressPair, error) GetSolvencyMsg(height int64, chain common.Chain, pubKey common.PubKey, coins common.Coins) sdk.Msg GetDDName(name string) (stypes.DDName, error) GetDdchainVersion() (semver.Version, error) IsCatchingUp() (bool, error) PostKeysignFailure(blame stypes.Blame, height int64, memo string, coins common.Coins, pubkey common.PubKey) (common.TxID, error) PostNetworkFee(height int64, chain common.Chain, transactionSize, transactionRate uint64) (common.TxID, error) RagnarokInProgress() (bool, error) WaitToCatchUp() error GetBlockHeight() (int64, error) GetLastObservedInHeight(chain common.Chain) (int64, error) GetLastSignedOutHeight(chain common.Chain) (int64, error) Broadcast(msgs ...sdk.Msg) (common.TxID, error) GetKeysign(blockHeight int64, pk string) (types.TxOut, error) GetNodeAccount(string) (*stypes.NodeAccount, error) GetKeygenBlock(int64, string) (stypes.KeygenBlock, error) }
func NewDdchainBridge ¶
func NewDdchainBridge(cfg config.BifrostClientConfiguration, m *metrics.Metrics, k *Keys) (DdchainBridge, error)
NewDdchainBridge create a new instance of DdchainBridge
type Keys ¶
type Keys struct {
// contains filtered or unexported fields
}
Keys manages all the keys used by ddchain
func NewKeysWithKeybase ¶
NewKeysWithKeybase create a new instance of Keys
func (*Keys) GetPrivateKey ¶
func (k *Keys) GetPrivateKey() (cryptotypes.PrivKey, error)
GetPrivateKey return the private key
func (*Keys) GetSignerInfo ¶
GetSignerInfo return signer info
type PoolManager ¶
type PoolManager interface {
GetValue(source, target common.Asset, amount cosmos.Uint) (cosmos.Uint, error)
}
PoolManager provide all the functionalities need to deal with pool
type PoolMgr ¶
type PoolMgr struct {
// contains filtered or unexported fields
}
PoolMgr implement PoolManager interface
func NewPoolMgr ¶
func NewPoolMgr(bridge DdchainBridge) *PoolMgr
NewPoolMgr create a new instance of PoolMgr
type PubKeyContractAddressPair ¶
type PubKeyContractAddressPair struct { PubKey common.PubKey Contracts map[common.Chain]common.Address }
PubKeyContractAddressPair is an entry to map pubkey and contract addresses
type QueryKeysign ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.