Skip to content

Assets, operations and transactions

This page explains the Layer 1 data structures that matter when building with @beblurt/dblurt: assets, operations, transactions, blocks and virtual operations.

It is a conceptual guide, not an API reference. Use it to reason correctly about Blurt workflows, then use the API reference for exact TypeScript shapes.

The short model

text
asset        amount + symbol/precision
operation    one Layer 1 action
transaction  signed payload containing one or more operations
block        ordered container of transactions
virtual op   protocol-emitted history entry, not directly signed by a user

A developer mistake in one of these distinctions can create broken accounting, unsafe signing UX or incorrect blockchain parsing.

Assets

An asset is not just a number. It is an amount with a symbol and precision.

Examples you may see in Blurt workflows include liquid BLURT balances, savings balances, vesting shares and reward balances.

@beblurt/dblurt exports an Asset class from src/chain/asset.ts for parsing, formatting, validating and doing simple same-symbol arithmetic on asset values. It also exports Price for converting between two asset symbols when a price pair is supplied.

ts
import { Asset, Price } from '@beblurt/dblurt';

const balance = Asset.fromString('1.000 BLURT', 'BLURT');
const total = balance.add('2.500 BLURT');

console.log(total.toString()); // 3.500 BLURT

const price = new Price(Asset.fromString('1.000 BLURT'), Asset.fromString('10.000 VESTS'));
console.log(price.convert(Asset.fromString('2.000 BLURT')).toString());

Documentation and application rules:

  • use Asset.fromString() or Asset.from() when you need SDK-owned parsing/validation;
  • pass an explicit symbol when constructing from a number; the legacy numeric default is not a Blurt documentation pattern;
  • preserve the symbol and precision when displaying values;
  • do not parse an asset string as a unitless number without knowing the symbol;
  • do not mix liquid BLURT, savings and vesting values as if they were the same thing;
  • use Asset.add(), subtract(), multiply() and divide() only with compatible symbols;
  • use Asset.min() / Asset.max() only for same-symbol comparisons;
  • use Price.convert() only when the supplied pair is correct for your workflow;
  • use SDK helpers or explicit conversion logic where the code already provides it;
  • keep fiat conversion, formatting policy and UI labels outside the SDK data model unless a helper explicitly documents them.

Operations

An operation is a single Layer 1 action.

Examples include:

  • comment/post/reply operations;
  • votes;
  • transfers;
  • custom JSON social actions;
  • witness votes;
  • account and authority changes.

Use “operation” when discussing the action being performed. Operation builders such as buildPostOperation() create operation payloads without signing or broadcasting.

Transactions

A transaction is a signed Layer 1 payload containing one or more operations.

Transactions add:

  • expiration;
  • reference block data;
  • signatures;
  • one or more operations.

Use “transaction” when discussing the signed payload submitted to the chain. A transaction can include multiple operations, and the required signatures must satisfy every operation in it.

Broadcast operations

Broadcasting sends a signed transaction to a Blurt RPC endpoint.

That is the side-effect boundary:

text
build operation -> inspect/confirm -> sign transaction -> broadcast transaction

Do not ask users for private keys just to build or inspect an operation. Key handling belongs only in signing and broadcast workflows.

See Broadcast safely.

Blocks

A block is an ordered unit of Layer 1 chain history. It contains transactions, and transactions contain operations.

For parsing workflows, track the block height you processed and decide whether you need latest head blocks or irreversible blocks.

Block conceptMeaningUse it for
Head blockLatest block known by an RPC nodelive dashboards and low-stakes monitoring
Reversible blockRecent block that may be affected by fork resolutiononly when your workflow accepts reorg handling
Last irreversible blockBlock considered irreversible by consensusindexing, accounting, replay and durable parsing

For block parsing, see Parse blockchain history.

Virtual operations

Virtual operations are emitted by protocol processing. They are Layer 1-derived history entries, but they are not directly signed by a user as normal operations.

Use them for understanding protocol effects such as rewards or derived account-history entries. Do not present them as user-submitted transactions.

Correct terminology

SayWhen
blockchain queryasking an RPC endpoint for data
operationindividual Layer 1 action
transactionsigned payload containing operations
broadcast operationsubmitting a signed transaction to Layer 1
blockchain parsingiterating blocks or operations to build an index, audit trail or processor
virtual operationprotocol-emitted history entry

Asset API details

Use the API reference for exact constructor behavior and method signatures: