Skip to content

Commit

Permalink
rename to HermesClient
Browse files Browse the repository at this point in the history
  • Loading branch information
cctdaniel committed Jun 7, 2024
1 parent 092db66 commit 6f4b64d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions apps/hermes/client/js/src/HermesClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type DurationInSeconds = number;
export type HexString = string;
export type DurationInMs = number;

export type HermesConnectionConfig = {
export type HermesClientConfig = {
/* Timeout of each request (for all of retries). Default: 5000ms */
timeout?: DurationInMs;
/**
Expand All @@ -30,7 +30,7 @@ export type HermesConnectionConfig = {
httpRetries?: number;
};

export class HermesConnection {
export class HermesClient {
private baseURL: string;
private timeout: DurationInMs;
private httpRetries: number;
Expand All @@ -39,9 +39,9 @@ export class HermesConnection {
* Constructs a new Connection.
*
* @param endpoint endpoint URL to the price service. Example: https://website/example/
* @param config Optional HermesConnectionConfig for custom configurations.
* @param config Optional HermesClientConfig for custom configurations.
*/
constructor(endpoint: string, config?: HermesConnectionConfig) {
constructor(endpoint: string, config?: HermesClientConfig) {
this.baseURL = endpoint;
this.timeout = config?.timeout ?? DEFAULT_TIMEOUT;
this.httpRetries = config?.httpRetries ?? DEFAULT_HTTP_RETRIES;
Expand Down
4 changes: 2 additions & 2 deletions apps/hermes/client/js/src/examples/HermesClient.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import yargs from "yargs";
import { hideBin } from "yargs/helpers";

import { HermesConnection } from "../index";
import { HermesClient } from "../HermesClient";

function sleep(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms));
Expand Down Expand Up @@ -29,7 +29,7 @@ const argv = yargs(hideBin(process.argv))
.parseSync();

async function run() {
const connection = new HermesConnection(argv.endpoint);
const connection = new HermesClient(argv.endpoint);

const priceIds = argv.priceIds as string[];

Expand Down

0 comments on commit 6f4b64d

Please sign in to comment.