Skip to content

Commit

Permalink
Use node API via API Gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
banool committed Feb 26, 2024
1 parent ed792bd commit 3b01d73
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/api/general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/api/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,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
Expand Down
2 changes: 1 addition & 1 deletion src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/utils/apiEndpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export const NetworkToIndexerAPI: Record<string, string> = {
};

export const NetworkToNodeAPI: Record<string, string> = {
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",
local: "http://127.0.0.1:8080/v1",
};

Expand Down

0 comments on commit 3b01d73

Please sign in to comment.