NetworkCoinsBalanceResult network.coins-balance-result@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
network
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/network/coins-balance-result.v1.json

network.coins-balance-result@1: the answer of network.coins.credit and network.coins.debit on OpenVibe.Network. POST /internal/coins/credit and POST /internal/coins/debit → { balance }: the wallet's OpenCoins right after this mutation (a replayed idempotency_key answers the balance right after the original one). Refusals are listed on network.coins-change-request@1.

Fields

FieldTypeRequiredDescriptionConstraints
balanceintegeryes
  • minimum 0

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: balance
{
  "balance": 1375
}
Rejected: negative
{
  "balance": -3
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('network.coins-balance-result@1', value);   // { valid, errors: [{ path, message }] }