]> git.codecow.com Git - libnemo.git/commitdiff
Add more RPC endpoints to schema.
authorChris Duncan <chris@codecow.com>
Mon, 3 Aug 2026 21:31:45 +0000 (14:31 -0700)
committerChris Duncan <chris@codecow.com>
Mon, 3 Aug 2026 21:31:45 +0000 (14:31 -0700)
src/lib/rpc/account_representative.ts [new file with mode: 0644]
src/lib/rpc/accounts_balances.ts [new file with mode: 0644]
src/lib/rpc/accounts_frontiers.ts [new file with mode: 0644]
src/lib/rpc/accounts_representatives.ts [new file with mode: 0644]
src/lib/rpc/block_info.ts
src/lib/rpc/blocks_info.ts [new file with mode: 0644]
src/lib/rpc/process.ts
src/lib/rpc/schema.ts

diff --git a/src/lib/rpc/account_representative.ts b/src/lib/rpc/account_representative.ts
new file mode 100644 (file)
index 0000000..3ea15a7
--- /dev/null
@@ -0,0 +1,8 @@
+//! SPDX-FileCopyrightText: 2026 Chris Duncan <chris@codecow.com>
+//! SPDX-License-Identifier: GPL-3.0-or-later
+
+export const account_representative = Object.freeze({
+       fields: [
+               'representative',
+       ],
+})
diff --git a/src/lib/rpc/accounts_balances.ts b/src/lib/rpc/accounts_balances.ts
new file mode 100644 (file)
index 0000000..ecf49b1
--- /dev/null
@@ -0,0 +1,16 @@
+//! SPDX-FileCopyrightText: 2026 Chris Duncan <chris@codecow.com>
+//! SPDX-License-Identifier: GPL-3.0-or-later
+
+export const accounts_balances = Object.freeze({
+       fields: [
+               'balances',
+       ],
+       balances: {
+               address: {
+                       fields: [
+                               'balance',
+                               'receivable',
+                       ],
+               },
+       },
+})
diff --git a/src/lib/rpc/accounts_frontiers.ts b/src/lib/rpc/accounts_frontiers.ts
new file mode 100644 (file)
index 0000000..90ac81f
--- /dev/null
@@ -0,0 +1,19 @@
+//! SPDX-FileCopyrightText: 2026 Chris Duncan <chris@codecow.com>
+//! SPDX-License-Identifier: GPL-3.0-or-later
+
+export const accounts_frontiers = Object.freeze({
+       fields: [
+               'errors',
+               'frontiers',
+       ],
+       errors: {
+               address: {
+                       error: {},
+               },
+       },
+       frontiers: {
+               address: {
+                       hash: {},
+               },
+       },
+})
diff --git a/src/lib/rpc/accounts_representatives.ts b/src/lib/rpc/accounts_representatives.ts
new file mode 100644 (file)
index 0000000..5d58d0e
--- /dev/null
@@ -0,0 +1,18 @@
+//! SPDX-FileCopyrightText: 2026 Chris Duncan <chris@codecow.com>
+//! SPDX-License-Identifier: GPL-3.0-or-later
+
+export const accounts_representatives = Object.freeze({
+       fields: [
+               'representatives',
+       ],
+       errors: {
+               address: {
+                       error: {},
+               },
+       },
+       representatives: {
+               address: {
+                       representative: {},
+               },
+       },
+})
index f286d064548db7ce1c9f48cd086f38b94670d074..fc2ec56312f88b5bcd75a420a6ddf5a538b40c62 100644 (file)
@@ -2,6 +2,18 @@
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 export const block_info = Object.freeze({
+       fields: [
+               'amount',
+               'balance',
+               'block_account',
+               'confirmed',
+               'contents',
+               'height',
+               'linked_account',
+               'local_timestamp',
+               'subtype',
+               'successor',
+       ],
        contents: {
                fields: [
                        'account',
@@ -15,16 +27,4 @@ export const block_info = Object.freeze({
                        'work',
                ],
        },
-       fields: [
-               'amount',
-               'balance',
-               'block_account',
-               'confirmed',
-               'contents',
-               'height',
-               'linked_account',
-               'local_timestamp',
-               'subtype',
-               'successor',
-       ],
 })
diff --git a/src/lib/rpc/blocks_info.ts b/src/lib/rpc/blocks_info.ts
new file mode 100644 (file)
index 0000000..532dc27
--- /dev/null
@@ -0,0 +1,37 @@
+//! SPDX-FileCopyrightText: 2026 Chris Duncan <chris@codecow.com>
+//! SPDX-License-Identifier: GPL-3.0-or-later
+
+export const blocks_info = Object.freeze({
+       fields: [
+               'blocks',
+       ],
+       blocks: {
+               hash: {
+                       fields: [
+                               'amount',
+                               'balance',
+                               'block_account',
+                               'confirmed',
+                               'contents',
+                               'height',
+                               'linked_account',
+                               'local_timestamp',
+                               'subtype',
+                               'successor',
+                       ],
+                       contents: {
+                               fields: [
+                                       'account',
+                                       'balance',
+                                       'link',
+                                       'link_as_account',
+                                       'previous',
+                                       'representative',
+                                       'signature',
+                                       'type',
+                                       'work',
+                               ],
+                       },
+               },
+       },
+})
index 99461d417dd650ba18e87e31a7b995007562684d..776bc9b8ec43494156ad41ac3c3bde1d1c8be7a9 100644 (file)
@@ -2,6 +2,13 @@
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
 export const process = Object.freeze({
+       fields: [
+               'action',
+               'async',
+               'block',
+               'json_block',
+               'subtype',
+       ],
        block: {
                fields: [
                        'account',
@@ -15,11 +22,4 @@ export const process = Object.freeze({
                        'work',
                ],
        },
-       fields: [
-               'action',
-               'async',
-               'block',
-               'json_block',
-               'subtype',
-       ],
 })
index a88be1f914b5ce7f46118c4f8b6210dab53f5912..d4655b7c0651f131fb0db1f3d9a4515a35ee7658 100644 (file)
@@ -1,11 +1,21 @@
 //! SPDX-FileCopyrightText: 2026 Chris Duncan <chris@codecow.com>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 import { account_info } from './account_info'
+import { account_representative } from './account_representative'
+import { accounts_balances } from './accounts_balances'
+import { accounts_frontiers } from './accounts_frontiers'
+import { accounts_representatives } from './accounts_representatives'
 import { block_info } from './block_info'
+import { blocks_info } from './blocks_info'
 import { process } from './process'
 
 export const Schema = Object.freeze({
        account_info,
+       account_representative,
+       accounts_balances,
+       accounts_frontiers,
+       accounts_representatives,
        block_info,
+       blocks_info,
        process,
 })