From dae452223219f5f77e590d51b2e045d194ff39a2 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Mon, 23 Feb 2026 21:20:52 +0200 Subject: [PATCH] expose escrow addresses in status endpoint --- src/@types/OceanNode.ts | 5 +++++ src/components/core/utils/statusHandler.ts | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/@types/OceanNode.ts b/src/@types/OceanNode.ts index 15b616dd4..265e098e7 100644 --- a/src/@types/OceanNode.ts +++ b/src/@types/OceanNode.ts @@ -169,6 +169,10 @@ export interface StorageTypes { url: boolean } +export interface AddressPerChain { + [chainId: string]: string +} + export interface OceanNodeStatus { id: string publicKey: string @@ -179,6 +183,7 @@ export interface OceanNodeStatus { p2p: boolean provider: OceanNodeProvider[] indexer: OceanNodeIndexer[] + escrowAddress: AddressPerChain supportedStorage: StorageTypes platform: any uptime?: number // seconds since start diff --git a/src/components/core/utils/statusHandler.ts b/src/components/core/utils/statusHandler.ts index c69d2c069..2b7d73c9c 100644 --- a/src/components/core/utils/statusHandler.ts +++ b/src/components/core/utils/statusHandler.ts @@ -131,6 +131,7 @@ export async function status( p2p: config.hasP2P, provider: [], indexer: [], + escrowAddress: {}, supportedStorage: getSupportedStorageTypes(config), // uptime: process.uptime(), platform: platformInfo, @@ -142,6 +143,11 @@ export async function status( if (config.supportedNetworks) { nodeStatus.provider = getProviderInfo(config) nodeStatus.indexer = await getIndexerInfo(oceanNode, config) + for (const chain of Object.keys(config.supportedNetworks)) { + nodeStatus.escrowAddress[chain] = oceanNode.escrow.getEscrowContractAddressForChain( + parseInt(chain) + ) + } } // only these 2 might change between requests nodeStatus.platform.freemem = os.freemem()