]> git.codecow.com Git - libnemo.git/commitdiff
Start building RPC endpoint response schema.
authorChris Duncan <chris@codecow.com>
Mon, 3 Aug 2026 06:42:09 +0000 (23:42 -0700)
committerChris Duncan <chris@codecow.com>
Mon, 3 Aug 2026 06:42:09 +0000 (23:42 -0700)
src/lib/constants.ts

index 1706e6904b7e9d7461e072a946510da7acc86c9e..cb2664ce1ad6014701418c483ffc9614ff7d05de 100644 (file)
@@ -33,5 +33,48 @@ export const UNITS: Record<string, number> = 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',
+               ],
+       },
+}