From 25cb1573ce8f77bacab23c240a4c9ccfedd80680 Mon Sep 17 00:00:00 2001 From: dp <25910069+davidp94@users.noreply.github.com> Date: Tue, 16 Apr 2024 11:05:20 +0300 Subject: [PATCH] chore: remove get Transactions indexers API --- indexers/indexers-api.md | 165 --------------------------------------- 1 file changed, 165 deletions(-) diff --git a/indexers/indexers-api.md b/indexers/indexers-api.md index b4dcbcd74..fd1638594 100644 --- a/indexers/indexers-api.md +++ b/indexers/indexers-api.md @@ -152,171 +152,6 @@ await fetch(GRAPHQL_ENDPOINT, {
-## Get Activity History - -::: code-group - -```javascript [EVM Chain] -const GRAPHQL_ENDPOINT = "https://gql-router.xdefi.services/graphql"; -const query = `query GetTransactions($address: String!, $first: Int, $after: String) { - ${chain.key} { // [!code highlight] - transactions(address: $address, first: $first, after: $after) { - edges { - node { - blockNumber - hash - status - timestamp - transfers { - amount { - value - } - fromAddress - toAddress - } - } - } - pageInfo { - hasNextPage - hasPreviousPage - } - } - } -}`; - -await fetch(GRAPHQL_ENDPOINT, { - method: "POST", - headers: { - "Content-Type": "application/json", - "apollographql-client-name": "docs-indexers-api", - "apollographql-client-version": "v1.0", - }, - body: JSON.stringify({ - query, - variables: { - address: address // Input address // [!code highlight] - first: 1, - after: null, - }, - }), -}) - .then((response) => response.json()) - .then((result) => { - console.log(result); - // Do something with the result - }); -``` - -```javascript [CosmosChain] -const GRAPHQL_ENDPOINT = "https://gql-router.xdefi.services/graphql"; -const query = `query GetTransactions($address: String!, $first: Int, $after: String) { - ${chain.key} { // [!code highlight] - transactions(address: $address, first: $first, after: $after) { - edges { - node { - blockHeight - hash - signers - status - timestamp - transfers { - amount { - value - } - fromAddress - toAddress - } - } - } - pageInfo { - hasPreviousPage - hasNextPage - } - } - } -}`; - -await fetch(GRAPHQL_ENDPOINT, { - method: "POST", - headers: { - "Content-Type": "application/json", - "apollographql-client-name": "docs-indexers-api", - "apollographql-client-version": "v1.0", - }, - body: JSON.stringify({ - query, - variables: { - address: address // Input address // [!code highlight] - first: 1, - after: null, - }, - }), -}) - .then((response) => response.json()) - .then((result) => { - console.log(result); - // Do something with the result - }); -``` - -```javascript [Other Chain] -const GRAPHQL_ENDPOINT = "https://gql-router.xdefi.services/graphql"; -const query = `query GetTransactions($address: String!, $first: Int!, $after: String) { - ${chain.key} { // [!code highlight] - transactionsV3(address: $address, first: $first, after: $after) { - edges { - node { - blockNumber - hash - status - timestamp - inputs { - amount { - value - } - address - } - outputs { - amount { - value - } - address - } - } - } - pageInfo { - hasNextPage - hasPreviousPage - } - } - } -}`; - -await fetch(GRAPHQL_ENDPOINT, { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ - query, - variables: { - address: address // Input address // [!code highlight] - first: 1, - after: null, - }, - }), -}) - .then((response) => response.json()) - .then((result) => { - console.log(result); - // Do something with the result - }); -``` - -::: - - - ## Get Gas Fee ::: code-group