From 8bc7a08cfadc571e1b78193aefd8ce18565bb6f6 Mon Sep 17 00:00:00 2001 From: Greg Nazario Date: Tue, 10 Oct 2023 17:02:55 -0700 Subject: [PATCH] [utils] Rename files to camelCase --- src/api/aptos_config.ts | 2 +- src/core/account.ts | 2 +- src/index.ts | 2 +- src/transactions/transaction_builder/transaction_builder.ts | 2 +- src/types/index.ts | 2 +- src/utils/{api-endpoints.ts => apiEndpoints.ts} | 0 src/utils/const.ts | 2 +- src/utils/{hd-key.ts => hdKey.ts} | 0 tests/e2e/api/account.test.ts | 2 +- tests/e2e/api/general.test.ts | 2 +- tests/e2e/api/transaction.test.ts | 2 +- tests/unit/aptos_config.test.ts | 2 +- tests/unit/transaction_builder.test.ts | 2 +- 13 files changed, 11 insertions(+), 11 deletions(-) rename src/utils/{api-endpoints.ts => apiEndpoints.ts} (100%) rename src/utils/{hd-key.ts => hdKey.ts} (100%) diff --git a/src/api/aptos_config.ts b/src/api/aptos_config.ts index 867923f41..04e67f52a 100644 --- a/src/api/aptos_config.ts +++ b/src/api/aptos_config.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { AptosSettings, ClientConfig } from "../types"; -import { NetworkToNodeAPI, NetworkToFaucetAPI, NetworkToIndexerAPI, Network } from "../utils/api-endpoints"; +import { NetworkToNodeAPI, NetworkToFaucetAPI, NetworkToIndexerAPI, Network } from "../utils/apiEndpoints"; import { AptosApiType, DEFAULT_NETWORK } from "../utils/const"; /** diff --git a/src/core/account.ts b/src/core/account.ts index 2ef1f559b..43c8d903a 100644 --- a/src/core/account.ts +++ b/src/core/account.ts @@ -7,7 +7,7 @@ import { AccountAddress } from "./account_address"; import { Hex } from "./hex"; import { HexInput, SigningScheme } from "../types"; import { PrivateKey, PublicKey, Signature } from "../crypto/asymmetric_crypto"; -import { derivePath } from "../utils/hd-key"; +import { derivePath } from "../utils/hdKey"; import { AuthenticationKey } from "../crypto/authentication_key"; import { Ed25519PrivateKey, Ed25519PublicKey } from "../crypto/ed25519"; import { Secp256k1PrivateKey, Secp256k1PublicKey } from "../crypto/secp256k1"; diff --git a/src/index.ts b/src/index.ts index e2c6f2364..1ad785e98 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,5 +3,5 @@ export * from "./api"; export * from "./client"; -export * from "./utils/api-endpoints"; +export * from "./utils/apiEndpoints"; export * from "./bcs"; diff --git a/src/transactions/transaction_builder/transaction_builder.ts b/src/transactions/transaction_builder/transaction_builder.ts index 8d7563e75..b7a1b81c1 100644 --- a/src/transactions/transaction_builder/transaction_builder.ts +++ b/src/transactions/transaction_builder/transaction_builder.ts @@ -18,7 +18,7 @@ import { getInfo } from "../../internal/account"; import { getLedgerInfo } from "../../internal/general"; import { getGasPriceEstimation } from "../../internal/transaction"; import { HexInput, SigningScheme } from "../../types"; -import { NetworkToChainId } from "../../utils/api-endpoints"; +import { NetworkToChainId } from "../../utils/apiEndpoints"; import { DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW } from "../../utils/const"; import { AccountAuthenticator, diff --git a/src/types/index.ts b/src/types/index.ts index 8cf52c804..3baf491ed 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,7 +1,7 @@ // Copyright © Aptos Foundation // SPDX-License-Identifier: Apache-2.0 -import { Network } from "../utils/api-endpoints"; +import { Network } from "../utils/apiEndpoints"; export * from "./indexer"; diff --git a/src/utils/api-endpoints.ts b/src/utils/apiEndpoints.ts similarity index 100% rename from src/utils/api-endpoints.ts rename to src/utils/apiEndpoints.ts diff --git a/src/utils/const.ts b/src/utils/const.ts index 85b067573..84ec138b7 100644 --- a/src/utils/const.ts +++ b/src/utils/const.ts @@ -1,7 +1,7 @@ // Copyright © Aptos Foundation // SPDX-License-Identifier: Apache-2.0 -import { Network } from "./api-endpoints"; +import { Network } from "./apiEndpoints"; export const DEFAULT_NETWORK = Network.DEVNET; export const DEFAULT_TXN_TIMEOUT_SEC = 20; diff --git a/src/utils/hd-key.ts b/src/utils/hdKey.ts similarity index 100% rename from src/utils/hd-key.ts rename to src/utils/hdKey.ts diff --git a/tests/e2e/api/account.test.ts b/tests/e2e/api/account.test.ts index 587a7a7f6..9f5a55bee 100644 --- a/tests/e2e/api/account.test.ts +++ b/tests/e2e/api/account.test.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { Aptos, AptosConfig } from "../../../src"; -import { Network } from "../../../src/utils/api-endpoints"; +import { Network } from "../../../src/utils/apiEndpoints"; // TODO // add account getTransactions tests once sdk v2 supports faucet (which needs transaction operation support) diff --git a/tests/e2e/api/general.test.ts b/tests/e2e/api/general.test.ts index e9d843727..63e70e500 100644 --- a/tests/e2e/api/general.test.ts +++ b/tests/e2e/api/general.test.ts @@ -3,7 +3,7 @@ import { AptosConfig, Aptos } from "../../../src"; import { GraphqlQuery, ViewRequest } from "../../../src/types"; -import { Network } from "../../../src/utils/api-endpoints"; +import { Network } from "../../../src/utils/apiEndpoints"; describe("general api", () => { test("it fetches ledger info", async () => { diff --git a/tests/e2e/api/transaction.test.ts b/tests/e2e/api/transaction.test.ts index 671b84704..b25a7b322 100644 --- a/tests/e2e/api/transaction.test.ts +++ b/tests/e2e/api/transaction.test.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { AptosConfig, Aptos } from "../../../src"; -import { Network } from "../../../src/utils/api-endpoints"; +import { Network } from "../../../src/utils/apiEndpoints"; describe("transaction api", () => { test("it queries for the network estimated gas price", async () => { diff --git a/tests/unit/aptos_config.test.ts b/tests/unit/aptos_config.test.ts index 1b15aaf64..bc7c82959 100644 --- a/tests/unit/aptos_config.test.ts +++ b/tests/unit/aptos_config.test.ts @@ -3,7 +3,7 @@ import { AptosConfig } from "../../src"; import { AptosSettings } from "../../src/types"; -import { Network, NetworkToFaucetAPI, NetworkToNodeAPI, NetworkToIndexerAPI } from "../../src/utils/api-endpoints"; +import { Network, NetworkToFaucetAPI, NetworkToNodeAPI, NetworkToIndexerAPI } from "../../src/utils/apiEndpoints"; import { AptosApiType } from "../../src/utils/const"; describe("aptos config", () => { diff --git a/tests/unit/transaction_builder.test.ts b/tests/unit/transaction_builder.test.ts index af729aa2d..b22c4cef9 100644 --- a/tests/unit/transaction_builder.test.ts +++ b/tests/unit/transaction_builder.test.ts @@ -26,7 +26,7 @@ import { signTransaction, } from "../../src/transactions/transaction_builder/transaction_builder"; import { SigningScheme } from "../../src/types"; -import { Network } from "../../src/utils/api-endpoints"; +import { Network } from "../../src/utils/apiEndpoints"; import { SignedTransaction } from "../../src/transactions/instances/signedTransaction"; import { U64 } from "../../src/bcs/serializable/move-primitives"; import { MoveObject } from "../../src/bcs/serializable/move-structs";