Skip to content

Commit

Permalink
Use indexer API via API Gateway (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
banool authored Mar 15, 2024
1 parent 5d80f34 commit de93669
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
All notable changes to the Aptos TypeScript SDK will be captured in this file. This changelog is written by hand for now. It adheres to the format set out by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

# Unreleased
- Use indexer API via API Gateway

# 1.10.0 (2024-03-11)

Expand Down
2 changes: 1 addition & 1 deletion src/api/general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class General {
/**
* A generic function for retrieving data from Aptos Indexer.
* For more detailed queries specification see
* {@link https://cloud.hasura.io/public/graphiql?endpoint=https://indexer.mainnet.aptoslabs.com/v1/graphql}
* {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}
*
* @param args.query.query A GraphQL query
* @param args.query.variables The variables for the query
Expand Down
2 changes: 1 addition & 1 deletion src/types/codegen.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
overwrite: true
documents: src/internal/queries/**/*.graphql
schema: https://indexer.mainnet.aptoslabs.com/v1/graphql
schema: https://api.mainnet.aptoslabs.com/v1/graphql
generates:
src/types/generated/types.ts:
plugins:
Expand Down
6 changes: 3 additions & 3 deletions src/utils/apiEndpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// SPDX-License-Identifier: Apache-2.0

export const NetworkToIndexerAPI: Record<string, string> = {
mainnet: "https://indexer.mainnet.aptoslabs.com/v1/graphql",
testnet: "https://indexer-testnet.staging.gcp.aptosdev.com/v1/graphql",
devnet: "https://indexer-devnet.staging.gcp.aptosdev.com/v1/graphql",
mainnet: "https://api.mainnet.aptoslabs.com/v1/graphql",
testnet: "https://api.testnet.aptoslabs.com/v1/graphql",
devnet: "https://api.devnet.aptoslabs.com/v1/graphql",
randomnet: "https://indexer-randomnet.hasura.app/v1/graphql",
local: "http://127.0.0.1:8090/v1/graphql",
};
Expand Down
2 changes: 1 addition & 1 deletion src/utils/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const RAW_TRANSACTION_WITH_DATA_SALT = "APTOS::RawTransactionWithData";
* The list of supported Processor types for our indexer api.
*
* These can be found from the processor_status table in the indexer database.
* {@link https://cloud.hasura.io/public/graphiql?endpoint=https://indexer.mainnet.aptoslabs.com/v1/graphql}
* {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}
*/
export enum ProcessorType {
ACCOUNT_TRANSACTION_PROCESSOR = "account_transactions_processor",
Expand Down

0 comments on commit de93669

Please sign in to comment.