Skip to main content

TypeScript: Staking

StakingClient wraps the NotareumValidatorStaking contract. It lets NOTA holders become validators, manage stake, and inspect tier assignment and daily verification allowances. Reach it through ntm.staking.

Tiers

The SDK exposes tier constants as ValidatorTier. The underlying contract assigns tier automatically based on total staked NOTA:
The SDK enum names (BRONZE..PLATINUM) map one-to-one with the protocol names (BASIC..INSTITUTIONAL) documented in Staking and Tiers. Pick whichever naming your team prefers; the numeric values are what land on-chain.

Write methods

stake(amount)

Deposits NOTA into the staking contract. The caller must first approve the staking contract to pull at least amount NOTA. Tier is recomputed automatically after the deposit:

unstake()

Begins the unbonding period. While unbonding, stake does not earn rewards and the validator cannot attest. The default unbonding window is 14 days; see Staking and Tiers:

claimStake()

Claims unbonded NOTA back to the caller’s wallet. Reverts if called before the unbonding period completes:

Read methods

getValidatorInfo(address)

Returns a full ValidatorInfo struct:
ValidatorInfo fields:

getTier(address)

Fast path to just the tier:

getDailyVerificationsRemaining(address)

How many attestations this validator may still submit in the current UTC day. Returns 2^256 - 1 for Platinum/Institutional (unlimited):

getTierThreshold(tier)

Returns the NOTA amount required to reach a given tier:

Full example

See also