From c493c2c386f0dadaa087d63eda99730308227d55 Mon Sep 17 00:00:00 2001 From: Daniel Porteous Date: Mon, 26 Feb 2024 14:27:21 +0000 Subject: [PATCH] Use node API via API Gateway --- src/api/general.ts | 2 +- src/api/transaction.ts | 2 +- src/types/index.ts | 2 +- src/utils/apiEndpoints.ts | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/api/general.ts b/src/api/general.ts index 0e1270b4b..8aa4e03be 100644 --- a/src/api/general.ts +++ b/src/api/general.ts @@ -108,7 +108,7 @@ export class General { * @param args.data Object that describes table item * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version * - * @example https://fullnode.devnet.aptoslabs.com/v1/accounts/0x1/resource/0x1::coin::CoinInfo%3C0x1::aptos_coin::AptosCoin%3E + * @example https://api.devnet.aptoslabs.com/v1/accounts/0x1/resource/0x1::coin::CoinInfo%3C0x1::aptos_coin::AptosCoin%3E * { * data.key_type = "address" // Move type of table key * data.value_type = "u128" // Move type of table value diff --git a/src/api/transaction.ts b/src/api/transaction.ts index 2978df265..da375d9e9 100644 --- a/src/api/transaction.ts +++ b/src/api/transaction.ts @@ -155,7 +155,7 @@ export class Transaction { /** * Gives an estimate of the gas unit price required to get a * transaction on chain in a reasonable amount of time. - * For more information {@link https://fullnode.mainnet.aptoslabs.com/v1/spec#/operations/estimate_gas_price} + * For more information {@link https://api.mainnet.aptoslabs.com/v1/spec#/operations/estimate_gas_price} * * @returns Object holding the outputs of the estimate gas API * @example diff --git a/src/types/index.ts b/src/types/index.ts index 3d07ee70f..af55a683a 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -213,7 +213,7 @@ export interface Client { /** * The API request type * - * @param url - the url to make the request to, i.e https://fullnode.aptoslabs.devnet.com/v1 + * @param url - the url to make the request to, i.e https://fullnode.devnet.aptoslabs.com/v1 * @param method - the request method "GET" | "POST" * @param endpoint (optional) - the endpoint to make the request to, i.e transactions * @param body (optional) - the body of the request diff --git a/src/utils/apiEndpoints.ts b/src/utils/apiEndpoints.ts index 2858de818..d0677da5c 100644 --- a/src/utils/apiEndpoints.ts +++ b/src/utils/apiEndpoints.ts @@ -10,9 +10,9 @@ export const NetworkToIndexerAPI: Record = { }; export const NetworkToNodeAPI: Record = { - mainnet: "https://fullnode.mainnet.aptoslabs.com/v1", - testnet: "https://fullnode.testnet.aptoslabs.com/v1", - devnet: "https://fullnode.devnet.aptoslabs.com/v1", + mainnet: "https://api.mainnet.aptoslabs.com/v1", + testnet: "https://api.testnet.aptoslabs.com/v1", + devnet: "https://api.devnet.aptoslabs.com/v1", randomnet: "https://fullnode.random.aptoslabs.com/v1", local: "http://127.0.0.1:8080/v1", };