diff --git a/src/common/gateway/entities/gateway.component.request.ts b/src/common/gateway/entities/gateway.component.request.ts index 33415672c..a3821082c 100644 --- a/src/common/gateway/entities/gateway.component.request.ts +++ b/src/common/gateway/entities/gateway.component.request.ts @@ -24,6 +24,7 @@ export enum GatewayComponentRequest { addressNonce = 'addressNonce', addressShard = 'addressShard', addressStorage = 'addressStorage', + addressKeys = 'addressKeys', guardianData = 'guardianData', addressTransactions = 'addressTransactions', simulateTransaction = 'simulateTransaction', diff --git a/src/endpoints/proxy/gateway.proxy.controller.ts b/src/endpoints/proxy/gateway.proxy.controller.ts index f5f53e82d..48f9fb434 100644 --- a/src/endpoints/proxy/gateway.proxy.controller.ts +++ b/src/endpoints/proxy/gateway.proxy.controller.ts @@ -46,6 +46,16 @@ export class GatewayProxyController { return await this.gatewayGet(`address/${address}/shard`, GatewayComponentRequest.addressShard); } + @Get('/address/:address/keys') + async getAddressKeys(@Param('address', ParseAddressPipe) address: string) { + try { + return await this.gatewayGet(`address/${address}/keys`, GatewayComponentRequest.addressKeys); + } catch (error: any) { + this.logger.error(`Error fetching address keys for address ${address}: ${error.message}`); + throw new BadRequestException(error.response?.data || 'An error occurred while fetching address keys'); + } + } + @Get('/address/:address/key/:key') async getAddressStorageKey(@Param('address', ParseAddressPipe) address: string, @Param('key') key: string) { // eslint-disable-next-line require-await