From 9b5883335b96abed3bcc9b7aaad72a09a4a429bb Mon Sep 17 00:00:00 2001 From: Rafa Cardenas <253999660+rafa-stacks@users.noreply.github.com> Date: Mon, 17 Aug 2026 11:07:44 -0600 Subject: [PATCH 1/2] rename branch refs to main --- .github/workflows/ci.yml | 4 ++-- client/README.md | 2 +- client/src/generated/schema.d.ts | 2 +- docs/getting-started.md | 2 +- docs/how-to/how-to-use-image-cache-service.md | 2 +- docs/overview.md | 8 ++++---- openapi.yaml | 2 +- src/api/schemas.ts | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 635852d8..f397549e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: CI on: push: branches: - - master + - main - develop - beta - next @@ -131,7 +131,7 @@ jobs: LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0") LATEST_VERSION=${LATEST_TAG#v} - if [ "$BRANCH" = "master" ]; then + if [ "$BRANCH" = "main" ]; then BUMP=$(npx conventional-recommended-bump -p conventionalcommits) NEXT_VERSION=$(npx semver "$LATEST_VERSION" -i "$BUMP") elif [ "$BRANCH" = "alpha" ] || [ "$BRANCH" = "beta" ]; then diff --git a/client/README.md b/client/README.md index 2dae8562..5d18b243 100644 --- a/client/README.md +++ b/client/README.md @@ -49,7 +49,7 @@ Check if the API is ready and which chain tip it has indexed. const { data, error } = await client.GET('/metadata/v1/'); if (data) { - console.log(data.server_version); // e.g. "token-metadata-api v0.0.1 (master:a1b2c3)" + console.log(data.server_version); // e.g. "token-metadata-api v0.0.1 (main:a1b2c3)" console.log(data.status); // e.g. "ready" console.log(data.chain_tip); // { block_height: 150000, index_block_hash: "0x..." } | null } diff --git a/client/src/generated/schema.d.ts b/client/src/generated/schema.d.ts index 44a29aac..9484c23e 100644 --- a/client/src/generated/schema.d.ts +++ b/client/src/generated/schema.d.ts @@ -821,7 +821,7 @@ export interface operations { }; content: { "application/json": { - /** @example token-metadata-api v0.0.1 (master:a1b2c3) */ + /** @example token-metadata-api v0.0.1 (main:a1b2c3) */ server_version: string; /** @example ready */ status: string; diff --git a/docs/getting-started.md b/docs/getting-started.md index 25185a24..7f9c3b42 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -16,7 +16,7 @@ This section helps you to initiate the service by following the steps below. `git clone https://github.com/hirosystems/token-metadata-api.git` -1. Create a `.env` file and specify the appropriate values to configure access to the Stacks API database, the Token metadata API local database, and the Stacks node RPC interface. See [`env.ts`](https://github.com/hirosystems/token-metadata-api/tree/master/src/env.ts) for all available configuration options. +1. Create a `.env` file and specify the appropriate values to configure access to the Stacks API database, the Token metadata API local database, and the Stacks node RPC interface. See [`env.ts`](https://github.com/hirosystems/token-metadata-api/tree/main/src/env.ts) for all available configuration options. 2. Build the app (NodeJS v18+ is required) diff --git a/docs/how-to/how-to-use-image-cache-service.md b/docs/how-to/how-to-use-image-cache-service.md index 9fbe722c..a7593293 100644 --- a/docs/how-to/how-to-use-image-cache-service.md +++ b/docs/how-to/how-to-use-image-cache-service.md @@ -11,5 +11,5 @@ The Token metadata API allows you to specify the path to a custom script that ca * Protects original image hosts from [DDoS attacks](https://wikipedia.org/wiki/Denial-of-service_attack) * Increases user privacy -An example IMGIX processor script is included in [`config/image-cache.js`](https://github.com/hirosystems/token-metadata-api/blob/master/config/image-cache.js). +An example IMGIX processor script is included in [`config/image-cache.js`](https://github.com/hirosystems/token-metadata-api/blob/main/config/image-cache.js). You can customize the script path by altering the `METADATA_IMAGE_CACHE_PROCESSOR` environment variable. \ No newline at end of file diff --git a/docs/overview.md b/docs/overview.md index c12ee72b..3a397ebb 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -38,15 +38,15 @@ The following is the internal architectural diagram of the Token metadata API. #### Blockchain importer -The [`BlockchainImporter`](https://github.com/hirosystems/token-metadata-api/tree/master/src/token-processor/blockchain-api/blockchain-importer.ts) is a component in the Token metadata API that takes token contracts from the API database. This component is only used on service boot. +The [`BlockchainImporter`](https://github.com/hirosystems/token-metadata-api/tree/main/src/token-processor/blockchain-api/blockchain-importer.ts) is a component in the Token metadata API that takes token contracts from the API database. This component is only used on service boot. -It connects to the Stacks Blockchain API database and scans the entire `smart_contracts` table looking for any contract that conforms to [SIP-009](https://github.com/stacksgov/sips/blob/main/sips/sip-009/sip-009-nft-standard.md), SIP-010 or SIP-013. When it finds a token contract, it creates a [`ProcessSmartContractJob`](https://github.com/hirosystems/token-metadata-api/tree/master/src/token-processor/queue/job/process-smart-contract-job.ts) and adds it to the [Job queue](#job-queue), ßso its tokens can be read and processed thereafter. +It connects to the Stacks Blockchain API database and scans the entire `smart_contracts` table looking for any contract that conforms to [SIP-009](https://github.com/stacksgov/sips/blob/main/sips/sip-009/sip-009-nft-standard.md), SIP-010 or SIP-013. When it finds a token contract, it creates a [`ProcessSmartContractJob`](https://github.com/hirosystems/token-metadata-api/tree/main/src/token-processor/queue/job/process-smart-contract-job.ts) and adds it to the [Job queue](#job-queue), ßso its tokens can be read and processed thereafter. This process runs only once. If the Token metadata API is ever restarted, though, this component re-scans the API `smart_contracts` table from the last processed block height. It can pick up any newer contracts it might have missed while the service was unavailable. #### Smart contract monitor -The [`BlockchainSmartContractMonitor`](https://github.com/hirosystems/token-metadata-api/tree/master/src/token-processor/blockchain-api/blockchain-smart-contract-monitor.ts) component constantly listens to the following Stacks Blockchain API events: +The [`BlockchainSmartContractMonitor`](https://github.com/hirosystems/token-metadata-api/tree/main/src/token-processor/blockchain-api/blockchain-smart-contract-monitor.ts) component constantly listens to the following Stacks Blockchain API events: * **Smart contract log events** @@ -60,7 +60,7 @@ This process is kept alive throughout the entire service lifetime. #### Job queue -The role of the [`JobQueue`](https://github.com/hirosystems/token-metadata-api/tree/master/src/token-processor/queue/job-queue.ts) is to perform all the smart contract and token processing in the service. +The role of the [`JobQueue`](https://github.com/hirosystems/token-metadata-api/tree/main/src/token-processor/queue/job-queue.ts) is to perform all the smart contract and token processing in the service. It is a priority queue that organizes all necessary work for contract ingestion and token metadata processing. Every job this queue processes corresponds to one row in the `jobs` DB table, which marks its processing status and related objects to be worked on (smart contract or token). diff --git a/openapi.yaml b/openapi.yaml index f31c8795..4c0e7924 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -940,7 +940,7 @@ paths: properties: server_version: type: string - example: token-metadata-api v0.0.1 (master:a1b2c3) + example: token-metadata-api v0.0.1 (main:a1b2c3) status: type: string example: ready diff --git a/src/api/schemas.ts b/src/api/schemas.ts index ad58e1ad..f546293a 100644 --- a/src/api/schemas.ts +++ b/src/api/schemas.ts @@ -420,7 +420,7 @@ export const SearchResponse = Type.Array(SearchResultItem, { export const ApiStatusResponse = Type.Object( { - server_version: Type.String({ examples: ['token-metadata-api v0.0.1 (master:a1b2c3)'] }), + server_version: Type.String({ examples: ['token-metadata-api v0.0.1 (main:a1b2c3)'] }), status: Type.String({ examples: ['ready'] }), chain_tip: Nullable( Type.Object({ From 2c7b16d7f41bfd9342f1ccc014b96d9be92a06cf Mon Sep 17 00:00:00 2001 From: Rafa Cardenas <253999660+rafa-stacks@users.noreply.github.com> Date: Mon, 17 Aug 2026 11:11:55 -0600 Subject: [PATCH 2/2] remove develop/beta --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f397549e..63ac61c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,8 +4,6 @@ on: push: branches: - main - - develop - - beta - next tags-ignore: - '**'