From 2981991b753d6ea5fef7b78107b59e73dbda9deb Mon Sep 17 00:00:00 2001 From: muXxer Date: Mon, 22 Apr 2024 21:10:01 +0200 Subject: [PATCH] Remove unused client functions --- src/models/IClient.ts | 11 ----------- src/models/clients/singleNodeClient.ts | 17 ----------------- 2 files changed, 28 deletions(-) diff --git a/src/models/IClient.ts b/src/models/IClient.ts index 2b69c3f..f2d8d35 100644 --- a/src/models/IClient.ts +++ b/src/models/IClient.ts @@ -9,11 +9,6 @@ export interface IClient { * @returns The node information. */ info(): Promise; - /** - * Get the list of peers. - * @returns The list of peers. - */ - peers(): Promise; /** * Add a new peer. * @param multiAddress The address of the peer to add. @@ -27,10 +22,4 @@ export interface IClient { * @returns Nothing. */ peerDelete(peerId: string): Promise; - /** - * Get a peer. - * @param peerId The peer to delete. - * @returns The details for the created peer. - */ - peer(peerId: string): Promise; } diff --git a/src/models/clients/singleNodeClient.ts b/src/models/clients/singleNodeClient.ts index 6614756..916ab89 100644 --- a/src/models/clients/singleNodeClient.ts +++ b/src/models/clients/singleNodeClient.ts @@ -95,14 +95,6 @@ export class SingleNodeClient implements IClient { return this.fetchJson(this._coreApiPath, "get", "info"); } - /** - * Get the list of peers. - * @returns The list of peers. - */ - public async peers(): Promise { - return this.fetchJson(this._managementApiPath, "get", "peers"); - } - /** * Add a new peer. * @param multiAddress The address of the peer to add. @@ -132,15 +124,6 @@ export class SingleNodeClient implements IClient { return this.fetchJson(this._managementApiPath, "delete", `peers/${peerId}`); } - /** - * Get a peer. - * @param peerId The peer to delete. - * @returns The details for the created peer. - */ - public async peer(peerId: string): Promise { - return this.fetchJson(this._managementApiPath, "get", `peers/${peerId}`); - } - /** * Perform a request in json format. * @param basePath The base path for the request.