Skip to content

Estimate vote value

Use this recipe when a curator, dashboard or author-facing app needs an approximate current upvote value.

Vote value is a snapshot. It depends on account mana, vote weight and current chain reward data.

Safety

Safety level: read-only.

This recipe reads public chain data and performs local calculations. It does not vote and does not require a private key.

Example

ts
import { Client } from '@beblurt/dblurt';

const client = new Client(rpcList, { timeout: 15_000, failoverThreshold: 3 });
const estimate = await client.read.estimateVoteValue('beblurt', 100);

console.log({
  account: estimate.account,
  weight: estimate.weight_percent,
  mana: estimate.current_mana_percent,
  blurt: estimate.vote_value_blurt
});

What the value means

The returned value is an SDK estimate in BLURT for the current account mana and selected vote weight. It is not a promise of final payout and does not include fiat formatting.

Applications should explain that:

  • mana changes after voting and regenerates over time;
  • reward pool state changes;
  • post timing and chain rules can affect final outcomes;
  • fiat conversion is outside the SDK read model.

API symbols

Validated source

Executable source: examples/node/estimate-vote-value.cjs.

Run locally from the repository:

bash
node examples/node/estimate-vote-value.cjs beblurt 100

This example is included in npm run docs:check.

Related: Read models, Accounts and authorities, API reference.