diff --git a/app/v1/account/[account]/nonce/route.ts b/app/v1/account/[account]/nonce/route.ts index 35ac42f..aba1d91 100644 --- a/app/v1/account/[account]/nonce/route.ts +++ b/app/v1/account/[account]/nonce/route.ts @@ -5,7 +5,7 @@ import { decode } from 'punycode' /** * @swagger - * /api/account/{account}/nonce: + * /v1/account/{account}/nonce: * get: * tags: [Accounts] * description: Returns the account's nonce diff --git a/app/v1/block/[block_id]/route.ts b/app/v1/block/[block_id]/route.ts index 9065d75..79f202d 100644 --- a/app/v1/block/[block_id]/route.ts +++ b/app/v1/block/[block_id]/route.ts @@ -6,7 +6,7 @@ import { decodeOperations } from '@/utils/operations' /** * @swagger - * /api/block/{block_id}: + * /v1/block/{block_id}: * get: * tags: [Blocks] * description: Input a block id or number. Return data about that block and its receipt. diff --git a/app/v1/chain/fork_heads/route.ts b/app/v1/chain/fork_heads/route.ts index e4b6991..8df8eda 100644 --- a/app/v1/chain/fork_heads/route.ts +++ b/app/v1/chain/fork_heads/route.ts @@ -3,7 +3,7 @@ import { getProvider } from '@/utils/providers' /** * @swagger - * /api/chain/fork_heads: + * /v1/chain/fork_heads: * get: * tags: [Chain] * description: Returns the chain's fork heads diff --git a/app/v1/chain/head_info/route.ts b/app/v1/chain/head_info/route.ts index f75adca..34d3bb1 100644 --- a/app/v1/chain/head_info/route.ts +++ b/app/v1/chain/head_info/route.ts @@ -3,7 +3,7 @@ import { getProvider } from '@/utils/providers' /** * @swagger - * /api/chain/head_info: + * /v1/chain/head_info: * get: * tags: [Chain] * description: Returns the chain's head info diff --git a/app/v1/chain/id/route.ts b/app/v1/chain/id/route.ts index a90207c..ff33f51 100644 --- a/app/v1/chain/id/route.ts +++ b/app/v1/chain/id/route.ts @@ -3,7 +3,7 @@ import { getProvider } from '@/utils/providers' /** * @swagger - * /api/chain/id: + * /v1/chain/id: * get: * tags: [Chain] * description: Returns the chain id diff --git a/app/v1/chain/resource_limits/route.ts b/app/v1/chain/resource_limits/route.ts index ef6489d..d840d07 100644 --- a/app/v1/chain/resource_limits/route.ts +++ b/app/v1/chain/resource_limits/route.ts @@ -3,7 +3,7 @@ import { getProvider } from '@/utils/providers' /** * @swagger - * /api/chain/resource_limits: + * /v1/chain/resource_limits: * get: * tags: [Chain] * description: Returns the chain's resource limits diff --git a/app/v1/contract/[contract_id]/read/[method]/route.ts b/app/v1/contract/[contract_id]/[method]/route.ts similarity index 96% rename from app/v1/contract/[contract_id]/read/[method]/route.ts rename to app/v1/contract/[contract_id]/[method]/route.ts index 20e030d..87a0980 100644 --- a/app/v1/contract/[contract_id]/read/[method]/route.ts +++ b/app/v1/contract/[contract_id]/[method]/route.ts @@ -4,7 +4,7 @@ import { AppError, handleError, getErrorMessage } from '@/utils/errors' /** * @swagger - * /api/contract/{contract_id}/read/{method}: + * /v1/contract/{contract_id}/{method}: * get: * tags: [Contracts] * description: Read the contract contract using the method and arguments provided @@ -89,7 +89,7 @@ export async function GET( /** * @swagger - * /api/contract/{contract_id}/read/{method}: + * /v1/contract/{contract_id}/{method}: * post: * tags: [Contracts] * description: Read the contract using the method and arguments provided @@ -108,7 +108,6 @@ export async function GET( * description: Method of the contract to call * required: true * example: balance_of - * - $ref: '#/components/parameters/X-JSON-RPC-URL' * requestBody: * description: Arguments for the method call * required: true diff --git a/app/v1/contract/[contract_id]/abi/route.ts b/app/v1/contract/[contract_id]/abi/route.ts index d773469..e30d9d1 100644 --- a/app/v1/contract/[contract_id]/abi/route.ts +++ b/app/v1/contract/[contract_id]/abi/route.ts @@ -7,7 +7,7 @@ import protobufjs from 'protobufjs' /** * @swagger - * /api/contract/{contract_id}/abi: + * /v1/contract/{contract_id}/abi: * get: * tags: [Contracts] * description: Returns the contract's ABI diff --git a/app/v1/decode/events/route.ts b/app/v1/decode/events/route.ts index 379453f..63240d4 100644 --- a/app/v1/decode/events/route.ts +++ b/app/v1/decode/events/route.ts @@ -5,7 +5,7 @@ import { decodeEvents } from '@/utils/events' /** * @swagger - * /api/decode/events: + * /v1/decode/events: * post: * tags: [Decode] * description: This endpoint takes an array of "encoded" events and returns an array of "decoded" events. Feel free to test the example request body and response below before testing out your own data. diff --git a/app/v1/decode/operations/route.ts b/app/v1/decode/operations/route.ts index cb9ce31..5bfb42b 100644 --- a/app/v1/decode/operations/route.ts +++ b/app/v1/decode/operations/route.ts @@ -5,7 +5,7 @@ import { decodeOperations } from '@/utils/operations' /** * @swagger - * /api/decode/operations: + * /v1/decode/operations: * post: * tags: [Decode] * description: This endpoint takes an array of 'encoded' operations and returns an array of 'decoded' operations. Feel free to test the example request body and response below before testing out your own data. diff --git a/app/v1/nft/[contract_id]/balance/[account]/route.ts b/app/v1/nft/[contract_id]/balance/[account]/route.ts index 0dac5cf..f3ff458 100644 --- a/app/v1/nft/[contract_id]/balance/[account]/route.ts +++ b/app/v1/nft/[contract_id]/balance/[account]/route.ts @@ -4,7 +4,7 @@ import { getNFTContract } from '@/utils/tokens' /** * @swagger - * /api/nft/{contract_id}/balance/{account}: + * /v1/nft/{contract_id}/balance/{account}: * get: * tags: [Non Fungible Tokens] * description: Returns the non fungible token's account balance. diff --git a/app/v1/nft/[contract_id]/info/route.ts b/app/v1/nft/[contract_id]/info/route.ts index 0534ab3..31d600f 100644 --- a/app/v1/nft/[contract_id]/info/route.ts +++ b/app/v1/nft/[contract_id]/info/route.ts @@ -5,7 +5,7 @@ import { utils } from 'koilib' /** * @swagger - * /api/nft/{contract_id}/info: + * /v1/nft/{contract_id}/info: * get: * tags: [Non Fungible Tokens] * description: Returns information about the non fungible token, such as its name, symbol, total supply, and URI. diff --git a/app/v1/nft/[contract_id]/name/route.ts b/app/v1/nft/[contract_id]/name/route.ts index d84d6f5..5c807d7 100644 --- a/app/v1/nft/[contract_id]/name/route.ts +++ b/app/v1/nft/[contract_id]/name/route.ts @@ -4,7 +4,7 @@ import { getNFTContract } from '@/utils/tokens' /** * @swagger - * /api/nft/{contract_id}/name: + * /v1/nft/{contract_id}/name: * get: * tags: [Non Fungible Tokens] * description: Returns the name of the non fungible token. diff --git a/app/v1/nft/[contract_id]/symbol/route.ts b/app/v1/nft/[contract_id]/symbol/route.ts index 852869d..c75c0e8 100644 --- a/app/v1/nft/[contract_id]/symbol/route.ts +++ b/app/v1/nft/[contract_id]/symbol/route.ts @@ -4,7 +4,7 @@ import { getNFTContract } from '@/utils/tokens' /** * @swagger - * /api/nft/{contract_id}/symbol: + * /v1/nft/{contract_id}/symbol: * get: * tags: [Non Fungible Tokens] * description: Returns the symbol of the non fungible token. diff --git a/app/v1/nft/[contract_id]/total_supply/route.ts b/app/v1/nft/[contract_id]/total_supply/route.ts index 51afcbf..038fa42 100644 --- a/app/v1/nft/[contract_id]/total_supply/route.ts +++ b/app/v1/nft/[contract_id]/total_supply/route.ts @@ -4,7 +4,7 @@ import { getNFTContract } from '@/utils/tokens' /** * @swagger - * /api/nft/{contract_id}/total_supply: + * /v1/nft/{contract_id}/total_supply: * get: * tags: [Non Fungible Tokens] * description: Returns the total supply of the non fungible token. diff --git a/app/v1/nft/[contract_id]/uri/route.ts b/app/v1/nft/[contract_id]/uri/route.ts index 93983ba..33d379a 100644 --- a/app/v1/nft/[contract_id]/uri/route.ts +++ b/app/v1/nft/[contract_id]/uri/route.ts @@ -4,7 +4,7 @@ import { getNFTContract } from '@/utils/tokens' /** * @swagger - * /api/nft/{contract_id}/uri: + * /v1/nft/{contract_id}/uri: * get: * tags: [Non Fungible Tokens] * description: Returns the URI associated with the non fungible token contract. diff --git a/app/v1/token/[contract_id]/balance/[account]/route.ts b/app/v1/token/[contract_id]/balance/[account]/route.ts index 6e69d45..42f3ec9 100644 --- a/app/v1/token/[contract_id]/balance/[account]/route.ts +++ b/app/v1/token/[contract_id]/balance/[account]/route.ts @@ -6,7 +6,7 @@ import { utils } from 'koilib' /** * @swagger - * /api/token/{contract_id}/balance/{account}: + * /v1/token/{contract_id}/balance/{account}: * get: * tags: [Fungible Tokens] * description: Returns the fungible token balance for a specific account diff --git a/app/v1/token/[contract_id]/decimals/route.ts b/app/v1/token/[contract_id]/decimals/route.ts index c6b99c3..6bcd93a 100644 --- a/app/v1/token/[contract_id]/decimals/route.ts +++ b/app/v1/token/[contract_id]/decimals/route.ts @@ -4,7 +4,7 @@ import { getFTContract } from '@/utils/tokens' /** * @swagger - * /api/token/{contract_id}/decimals: + * /v1/token/{contract_id}/decimals: * get: * tags: [Fungible Tokens] * description: Returns the number of decimals for a fungible token diff --git a/app/v1/token/[contract_id]/info/route.ts b/app/v1/token/[contract_id]/info/route.ts index 2e15280..ac87eca 100644 --- a/app/v1/token/[contract_id]/info/route.ts +++ b/app/v1/token/[contract_id]/info/route.ts @@ -5,7 +5,7 @@ import { utils } from 'koilib' /** * @swagger - * /api/token/{contract_id}/info: + * /v1/token/{contract_id}/info: * get: * tags: [Fungible Tokens] * description: Returns the fungible token's information such as name, symbol, decimals, and total supply diff --git a/app/v1/token/[contract_id]/name/route.ts b/app/v1/token/[contract_id]/name/route.ts index a512085..494d045 100644 --- a/app/v1/token/[contract_id]/name/route.ts +++ b/app/v1/token/[contract_id]/name/route.ts @@ -4,7 +4,7 @@ import { getFTContract } from '@/utils/tokens' /** * @swagger - * /api/token/{contract_id}/name: + * /v1/token/{contract_id}/name: * get: * tags: [Fungible Tokens] * description: Returns the name of the fungible token diff --git a/app/v1/token/[contract_id]/symbol/route.ts b/app/v1/token/[contract_id]/symbol/route.ts index ae2ff55..7732423 100644 --- a/app/v1/token/[contract_id]/symbol/route.ts +++ b/app/v1/token/[contract_id]/symbol/route.ts @@ -4,7 +4,7 @@ import { getFTContract } from '@/utils/tokens' /** * @swagger - * /api/token/{contract_id}/symbol: + * /v1/token/{contract_id}/symbol: * get: * tags: [Fungible Tokens] * description: Returns the symbol of the fungible token diff --git a/app/v1/token/[contract_id]/total_supply/route.ts b/app/v1/token/[contract_id]/total_supply/route.ts index 9f64da7..a38ed93 100644 --- a/app/v1/token/[contract_id]/total_supply/route.ts +++ b/app/v1/token/[contract_id]/total_supply/route.ts @@ -5,7 +5,7 @@ import { utils } from 'koilib' /** * @swagger - * /api/token/{contract_id}/total_supply: + * /v1/token/{contract_id}/total_supply: * get: * tags: [Fungible Tokens] * description: Returns the total supply of the fungible token diff --git a/app/v1/transaction/[transaction_id]/route.ts b/app/v1/transaction/[transaction_id]/route.ts index 22bd7e8..ca99f56 100644 --- a/app/v1/transaction/[transaction_id]/route.ts +++ b/app/v1/transaction/[transaction_id]/route.ts @@ -6,7 +6,7 @@ import { interfaces } from 'koilib' /** * @swagger - * /api/transaction/{transaction_id}: + * /v1/transaction/{transaction_id}: * get: * tags: [Transactions] * description: Returns detailed information about a specific transaction. diff --git a/app/v1/transaction/prepare/route.ts b/app/v1/transaction/prepare/route.ts index 1f96c8b..655d9d4 100644 --- a/app/v1/transaction/prepare/route.ts +++ b/app/v1/transaction/prepare/route.ts @@ -5,7 +5,7 @@ import { NextRequest, NextResponse } from 'next/server' /** * @swagger - * /api/transaction/prepare: + * /v1/transaction/prepare: * post: * tags: [Transactions] * description: This endpoint takes a transaction and an optional provider and/or payer, then returns a prepared transaction object. diff --git a/app/v1/transaction/submit/route.ts b/app/v1/transaction/submit/route.ts index 38bb752..1646faa 100644 --- a/app/v1/transaction/submit/route.ts +++ b/app/v1/transaction/submit/route.ts @@ -6,7 +6,7 @@ import { revalidatePath } from 'next/cache' /** * @swagger - * /api/transaction/submit: + * /v1/transaction/submit: * post: * tags: [Transactions] * description: This endpoint takes a transaction and submits it to the JSON RPC node.