Wrapper EnhancementsGlobalsValidatorRegistry

# Class: ValidatorRegistry

Integration with ValidatorRegistry contract on an Ethereum blockchain.

# Hierarchy

  • ValidatorRegistry

# Index

# Constructors

# Properties

# Methods

# Constructors

# constructor

+ new ValidatorRegistry(options: KosuOptions, treasury?: Treasury): ValidatorRegistry

Defined in ValidatorRegistry.ts:23

Create a new ValidatorRegistry instance.

Parameters:

Name Type Description
options KosuOptions instantiation options
treasury? Treasury treasury integration instance

Returns: ValidatorRegistry

# Properties

# address

address: string

Defined in ValidatorRegistry.ts:18


# coinbase

coinbase: string

Defined in ValidatorRegistry.ts:23

The user's coinbase address (if available via supplied provider).


# contract

contract: ValidatorRegistryContract

Defined in ValidatorRegistry.ts:16


# treasury

treasury: Treasury

Defined in ValidatorRegistry.ts:15


# web3Wrapper

web3Wrapper: Web3Wrapper

Defined in ValidatorRegistry.ts:17

# Methods

# applicationPeriod

applicationPeriod(): Promise‹BigNumber›

Defined in ValidatorRegistry.ts:65

Reads the application period

Returns: Promise‹BigNumber›


# challengeListing

challengeListing(_pubKey: string, _details: string): Promise‹TransactionReceiptWithDecodedLogs›

Defined in ValidatorRegistry.ts:257

Starts a challenge of a listing

Parameters:

Name Type Description
_pubKey string hex encoded tendermint public key
_details string String value (often a url) to support listing claim

Returns: Promise‹TransactionReceiptWithDecodedLogs›


# challengePeriod

challengePeriod(): Promise‹BigNumber›

Defined in ValidatorRegistry.ts:81

Reads the challenge period

Returns: Promise‹BigNumber›


# claimRewards

claimRewards(_pubKey: string): Promise‹TransactionReceiptWithDecodedLogs›

Defined in ValidatorRegistry.ts:289

Claims the rewards of a generating/burning listing

Parameters:

Name Type Description
_pubKey string hex encoded tendermint public key

Returns: Promise‹TransactionReceiptWithDecodedLogs›


# claimWinnings

claimWinnings(challengeId: BigNumber): Promise‹TransactionReceiptWithDecodedLogs›

Defined in ValidatorRegistry.ts:319

Claims winnings from complete challenge

Parameters:

Name Type Description
challengeId BigNumber id of challenge coinbase has contributed a winning vote to

Returns: Promise‹TransactionReceiptWithDecodedLogs›


# commitPeriod

commitPeriod(): Promise‹BigNumber›

Defined in ValidatorRegistry.ts:73

Reads the commit period

Returns: Promise‹BigNumber›


# confirmListing

confirmListing(_pubKey: string): Promise‹TransactionReceiptWithDecodedLogs›

Defined in ValidatorRegistry.ts:246

Confirms listing after application period

Parameters:

Name Type Description
_pubKey string hex encoded tendermint public key

Returns: Promise‹TransactionReceiptWithDecodedLogs›


# exitPeriod

exitPeriod(): Promise‹BigNumber›

Defined in ValidatorRegistry.ts:89

Reads the exit period

Returns: Promise‹BigNumber›


# finalizeExit

finalizeExit(_pubKey: string): Promise‹TransactionReceiptWithDecodedLogs›

Defined in ValidatorRegistry.ts:309

Finalizes the exit of a listing

Parameters:

Name Type Description
_pubKey string hex encoded tendermint public key

Returns: Promise‹TransactionReceiptWithDecodedLogs›


# getAllChallenges

getAllChallenges(): Promise‹Challenge[]›

Defined in ValidatorRegistry.ts:200

Reads all challenges

Returns: Promise‹Challenge[]›


# getAllListings

getAllListings(): Promise‹Listing[]›

Defined in ValidatorRegistry.ts:163

Reads the registered listings

Returns: Promise‹Listing[]›


# getChallenge

getChallenge(challengeId: BigNumber): Promise‹Challenge›

Defined in ValidatorRegistry.ts:181

Reads the challenge by challengeId

Parameters:

Name Type Description
challengeId BigNumber hex encoded tendermint public key

Returns: Promise‹Challenge›


# getChallenges

getChallenges(challengeIds: BigNumber[]): Promise‹Challenge[]›

Defined in ValidatorRegistry.ts:191

Reads the challenges by challengeIds

Parameters:

Name Type Description
challengeIds BigNumber[] hex encoded tendermint public key

Returns: Promise‹Challenge[]›


# getContract

getContract(): Promise‹ValidatorRegistryContract›

Defined in ValidatorRegistry.ts:42

Asynchronously initializes the contract instance or returns it from cache

Returns: Promise‹ValidatorRegistryContract›

The contract


# getListing

getListing(_pubKey: string): Promise‹Listing›

Defined in ValidatorRegistry.ts:147

Reads the listing for public key

Parameters:

Name Type Description
_pubKey string hex encoded tendermint public key

Returns: Promise‹Listing›


# getListings

getListings(_pubKeys: string[]): Promise‹Listing[]›

Defined in ValidatorRegistry.ts:155

Reads the requested listings

Parameters:

Name Type
_pubKeys string[]

Returns: Promise‹Listing[]›


# hexToBase64

hexToBase64(_pubKey: string): string

Defined in ValidatorRegistry.ts:331

Converts hex encoded public key back to tendermint base64

Parameters:

Name Type Description
_pubKey string hex encoded tendermint public key

Returns: string

Base64 tendermint public key


# initExit

initExit(_pubKey: string): Promise‹TransactionReceiptWithDecodedLogs›

Defined in ValidatorRegistry.ts:299

Initializes an exit of a listing from the registry

Parameters:

Name Type Description
_pubKey string hex encoded tendermint public key

Returns: Promise‹TransactionReceiptWithDecodedLogs›


# kosuToken

kosuToken(): Promise‹string›

Defined in ValidatorRegistry.ts:129

Reads the kosuToken address

Returns: Promise‹string›


# listingKeys

listingKeys(): Promise‹string[]›

Defined in ValidatorRegistry.ts:137

Reads the current listing keys

Returns: Promise‹string[]›


# maxRewardRate

maxRewardRate(): Promise‹BigNumber›

Defined in ValidatorRegistry.ts:171

Reads the max reward rate

Returns: Promise‹BigNumber›


# minimumStake

minimumStake(): Promise‹BigNumber›

Defined in ValidatorRegistry.ts:105

Reads the minimum stake

Returns: Promise‹BigNumber›


# registerListing

registerListing(_pubKey: string, _tokensToStake: BigNumber, _rewardRate: BigNumber, _details: string): Promise‹TransactionReceiptWithDecodedLogs›

Defined in ValidatorRegistry.ts:213

Register a new listing

Parameters:

Name Type Description
_pubKey string hex encoded tendermint public key
_tokensToStake BigNumber uint number of tokens to stake ( must be greater than minimum balance)
_rewardRate BigNumber int value of tokens to earn, burn or neither per reward period
_details string String value (often a url) to support listing claim

Returns: Promise‹TransactionReceiptWithDecodedLogs›


# resolveChallenge

resolveChallenge(_pubKey: string): Promise‹TransactionReceiptWithDecodedLogs›

Defined in ValidatorRegistry.ts:279

Resolves challenge of a listing

Parameters:

Name Type Description
_pubKey string hex encoded tendermint public key

Returns: Promise‹TransactionReceiptWithDecodedLogs›


# rewardPeriod

rewardPeriod(): Promise‹BigNumber›

Defined in ValidatorRegistry.ts:97

Reads the reward period

Returns: Promise‹BigNumber›


# stakeholderProportionPPM

stakeholderProportionPPM(): Promise‹BigNumber›

Defined in ValidatorRegistry.ts:113

Reads the stakeholder proportion

Returns: Promise‹BigNumber›


# voting

voting(): Promise‹string›

Defined in ValidatorRegistry.ts:121

Reads the Voting contract address

Returns: Promise‹string›