Files
nym/nym-api/tests/src/endpoints/Network.ts
T
2023-09-22 17:38:03 +02:00

30 lines
831 B
TypeScript

import { NetworkDetails, NymContracts, NymContractsDetailed } from "../types/NetworkTypes";
import { APIClient } from "./abstracts/APIClient";
export default class NetworkTypes extends APIClient {
constructor() {
super("/");
}
public async getNetworkDetails(): Promise<NetworkDetails> {
const response = await this.restClient.sendGet({
route: `network/details`,
});
return response.data;
}
public async getNymContractInfo(): Promise<NymContracts> {
const response = await this.restClient.sendGet({
route: `network/nym-contracts`,
});
return response.data;
}
public async getNymContractDetailedInfo(): Promise<NymContractsDetailed> {
const response = await this.restClient.sendGet({
route: `network/nym-contracts-detailed`,
});
return response.data;
}
}