From c7a433b2371b062c656855c305cbfe5d23862a7d Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Sun, 2 Aug 2026 23:42:09 -0700 Subject: [PATCH] Start building RPC endpoint response schema. --- src/lib/constants.ts | 45 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/src/lib/constants.ts b/src/lib/constants.ts index 1706e69..cb2664c 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -33,5 +33,48 @@ export const UNITS: Record = Object.freeze({ MRAI: 30, NANO: 30, KNANO: 33, - MNANO: 36 + MNANO: 36, }) + +export const SCHEMA = { + account_info: { + fields: [ + 'frontier', + 'open_block', + 'representative_block', + 'balance', + 'modified_timestamp', + 'block_count', + 'account_version', + 'confirmation_height', + 'confirmation_height_frontier', + 'representative', + 'weight', + 'receivable', + 'confirmed_balance', + 'confirmed_height', + 'confirmed_frontier', + 'confirmed_representative', + 'confirmed_receivable' + ], + }, + block_info: { + contents: { + fields: [ + 'type', + 'account', + 'previous', + 'representative', + 'balance', + 'link', + 'link_as_account', + 'signature', + 'work' + ], + }, + fields: [ + 'contents', + 'subtype', + ], + }, +} -- 2.52.0