From 742cf0fc614c95c72180bc2320fd4bb3e93577a5 Mon Sep 17 00:00:00 2001 From: Scott Twiname Date: Wed, 7 Aug 2024 15:03:36 +1200 Subject: [PATCH] Sync @subql dependencies (#130) * Update @subql deps * Apply sync code changes, enable strict TS, endpoint configs * Move function to use single api instance * Fix filtering issue with undefined filter options --------- Co-authored-by: stwiname --- packages/common-algorand/CHANGELOG.md | 5 + packages/common-algorand/package.json | 2 +- .../common-algorand/src/project/models.ts | 34 +- packages/common-algorand/src/project/types.ts | 1 - packages/common-algorand/src/project/utils.ts | 5 +- .../versioned/ProjectManifestVersioned.ts | 6 +- .../src/project/versioned/v1_0_0/model.ts | 38 +- packages/node/CHANGELOG.md | 5 + packages/node/Dockerfile | 1 + packages/node/package.json | 10 +- packages/node/src/admin/admin.module.ts | 13 - packages/node/src/algorand/algorand.spec.ts | 5 +- packages/node/src/algorand/api.algorand.ts | 112 +-- packages/node/src/algorand/api.connection.ts | 8 +- .../node/src/algorand/api.service.algorand.ts | 15 +- .../node/src/algorand/utils.algorand.spec.ts | 35 +- packages/node/src/algorand/utils.algorand.ts | 2 +- packages/node/src/app.module.ts | 16 +- .../node/src/configure/SubqueryProject.ts | 177 +--- .../node/src/configure/configure.module.ts | 4 +- .../algorand-block-dispatcher.ts | 4 +- .../worker-block-dispatcher.service.ts | 3 +- .../dictionary/algorandDictionary.service.ts | 8 +- .../dictionary/v1/algorandDictionaryV1.ts | 36 +- .../node/src/indexer/dynamic-ds.service.ts | 2 +- packages/node/src/indexer/fetch.module.ts | 18 +- packages/node/src/indexer/fetch.service.ts | 29 +- packages/node/src/indexer/indexer.manager.ts | 3 +- .../src/indexer/worker/worker-fetch.module.ts | 24 +- .../node/src/indexer/worker/worker.module.ts | 3 +- .../node/src/indexer/worker/worker.service.ts | 7 +- packages/node/src/indexer/worker/worker.ts | 4 +- packages/node/src/init.ts | 30 +- packages/node/src/meta/meta.controller.ts | 15 - packages/node/src/meta/meta.module.ts | 16 - packages/node/src/meta/meta.service.ts | 26 - .../src/subcommands/forceClean.service.ts | 2 +- packages/types/CHANGELOG.md | 2 + packages/types/package.json | 6 +- packages/types/src/project.ts | 11 +- tsconfig.json | 3 +- yarn.lock | 849 ++++-------------- 42 files changed, 453 insertions(+), 1142 deletions(-) delete mode 100644 packages/node/src/admin/admin.module.ts delete mode 100644 packages/node/src/meta/meta.controller.ts delete mode 100644 packages/node/src/meta/meta.module.ts delete mode 100644 packages/node/src/meta/meta.service.ts diff --git a/packages/common-algorand/CHANGELOG.md b/packages/common-algorand/CHANGELOG.md index c589830f..47df633b 100644 --- a/packages/common-algorand/CHANGELOG.md +++ b/packages/common-algorand/CHANGELOG.md @@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Removed +- `apiKey` option from network config, please use endpoint config and specify the `X-Indexer-API-Token` header instead (#130) + +### Added +- Suport for network endpoint config providing the ability to set headers (#130) ## [4.0.0] - 2024-07-03 ### Added diff --git a/packages/common-algorand/package.json b/packages/common-algorand/package.json index 040d2b59..8164ce8a 100644 --- a/packages/common-algorand/package.json +++ b/packages/common-algorand/package.json @@ -14,7 +14,7 @@ "main": "dist/index.js", "license": "GPL-3.0", "dependencies": { - "@subql/common": "^4.0.0", + "@subql/common": "^5.0.0", "@subql/types-algorand": "workspace:*" }, "peerDependencies": { diff --git a/packages/common-algorand/src/project/models.ts b/packages/common-algorand/src/project/models.ts index 32a32d81..d767a880 100644 --- a/packages/common-algorand/src/project/models.ts +++ b/packages/common-algorand/src/project/models.ts @@ -95,10 +95,10 @@ export class TransactionFilter implements AlgorandTransactionFilter { export class BlockHandler implements AlgorandBlockHandler { @IsEnum(AlgorandHandlerKind, {groups: [AlgorandHandlerKind.Block]}) - kind: AlgorandHandlerKind.Block; + kind!: AlgorandHandlerKind.Block; @IsString() - handler: string; + handler!: string; @IsOptional() @ValidateNested() @@ -113,18 +113,18 @@ export class TransactionHandler implements AlgorandTransactionHandler { filter?: AlgorandTransactionFilter; @IsEnum(AlgorandHandlerKind, {groups: [AlgorandHandlerKind.Block]}) - kind: AlgorandHandlerKind.Transaction; + kind!: AlgorandHandlerKind.Transaction; @IsString() - handler: string; + handler!: string; } export class CustomHandler implements AlgorandCustomHandler { @IsString() - kind: string; + kind!: string; @IsString() - handler: string; + handler!: string; @IsObject() @IsOptional() @@ -147,34 +147,34 @@ export class RuntimeMapping implements BaseMapping { }) @IsArray() @ValidateNested() - handlers: AlgorandRuntimeHandler[]; + handlers!: AlgorandRuntimeHandler[]; @IsString() - file: string; + file!: string; } export class CustomMapping implements BaseMapping { @IsArray() @Type(() => CustomHandler) @ValidateNested() - handlers: CustomHandler[]; + handlers!: CustomHandler[]; @IsString() - file: string; + file!: string; } export class RuntimeDataSourceBase extends BaseDataSource implements AlgorandRuntimeDataSource { @IsEnum(AlgorandDataSourceKind, {groups: [AlgorandDataSourceKind.Runtime]}) - kind: AlgorandDataSourceKind.Runtime; + kind!: AlgorandDataSourceKind.Runtime; @Type(() => RuntimeMapping) @ValidateNested() - mapping: RuntimeMapping; + mapping!: RuntimeMapping; } export class FileReferenceImpl implements FileReference { @IsString() - file: string; + file!: string; } export class CustomDataSourceBase @@ -182,17 +182,17 @@ export class CustomDataSourceBase { @IsString() - kind: K; + kind!: K; @Type(() => CustomMapping) @ValidateNested() - mapping: M; + mapping!: M; @Type(() => FileReferenceImpl) @ValidateNested({each: true}) - assets: Map; + assets!: Map; @Type(() => ProcessorImpl) @IsObject() - processor: Processor; + processor!: Processor; } diff --git a/packages/common-algorand/src/project/types.ts b/packages/common-algorand/src/project/types.ts index 77a21a99..a74e961d 100644 --- a/packages/common-algorand/src/project/types.ts +++ b/packages/common-algorand/src/project/types.ts @@ -20,4 +20,3 @@ export { } from '@subql/types-algorand'; export type IAlgorandProjectManifest = IProjectManifest; -export type TokenHeader = Record; diff --git a/packages/common-algorand/src/project/utils.ts b/packages/common-algorand/src/project/utils.ts index d575129e..5273a8fe 100644 --- a/packages/common-algorand/src/project/utils.ts +++ b/packages/common-algorand/src/project/utils.ts @@ -2,6 +2,7 @@ // SPDX-License-Identifier: GPL-3.0 import { + SecondLayerHandlerProcessorArray, SecondLayerHandlerProcessor, AlgorandCustomDataSource, AlgorandDataSource, @@ -11,13 +12,13 @@ import { } from '@subql/types-algorand'; export function isBlockHandlerProcessor, E>( - hp: SecondLayerHandlerProcessor + hp: SecondLayerHandlerProcessorArray ): hp is SecondLayerHandlerProcessor { return hp.baseHandlerKind === AlgorandHandlerKind.Block; } export function isTransactionHandlerProcessor, E>( - hp: SecondLayerHandlerProcessor + hp: SecondLayerHandlerProcessorArray ): hp is SecondLayerHandlerProcessor { return hp.baseHandlerKind === AlgorandHandlerKind.Transaction; } diff --git a/packages/common-algorand/src/project/versioned/ProjectManifestVersioned.ts b/packages/common-algorand/src/project/versioned/ProjectManifestVersioned.ts index f8392e04..898657b1 100644 --- a/packages/common-algorand/src/project/versioned/ProjectManifestVersioned.ts +++ b/packages/common-algorand/src/project/versioned/ProjectManifestVersioned.ts @@ -42,7 +42,7 @@ export class AlgorandProjectManifestVersioned implements IAlgorandProjectManifes return this._impl as ProjectManifestV1_0_0Impl; } - toDeployment(): string | undefined { + toDeployment(): string { return this._impl.deployment.toYaml(); } @@ -62,11 +62,11 @@ export class AlgorandProjectManifestVersioned implements IAlgorandProjectManifes return this._impl.specVersion; } - get description(): string { + get description(): string | undefined { return this._impl.description; } - get repository(): string { + get repository(): string | undefined { return this._impl.repository; } } diff --git a/packages/common-algorand/src/project/versioned/v1_0_0/model.ts b/packages/common-algorand/src/project/versioned/v1_0_0/model.ts index ef7448f7..88065ce6 100644 --- a/packages/common-algorand/src/project/versioned/v1_0_0/model.ts +++ b/packages/common-algorand/src/project/versioned/v1_0_0/model.ts @@ -23,13 +23,11 @@ import {plainToInstance, Transform, Type} from 'class-transformer'; import {Equals, IsArray, IsObject, IsOptional, IsString, Validate, ValidateNested, validateSync} from 'class-validator'; import yaml from 'js-yaml'; import {CustomDataSourceBase, RuntimeDataSourceBase} from '../../models'; -import {TokenHeader} from '../../types'; -import {IsStringOrObject} from '../../validation/is-string-or-object.validation'; const ALGORAND_NODE_NAME = `@subql/node-algorand`; export class AlgorandRunnerNodeImpl implements NodeSpec { @Equals(ALGORAND_NODE_NAME, {message: `Runner algorand node name incorrect, suppose be '${ALGORAND_NODE_NAME}'`}) - name: string; + name!: string; @IsString() @Validate(SemverVersionValidator) @@ -40,27 +38,23 @@ export class AlgorandRunnerSpecsImpl implements RunnerSpecs { @IsObject() @ValidateNested() @Type(() => AlgorandRunnerNodeImpl) - node: NodeSpec; + node!: NodeSpec; @IsObject() @ValidateNested() @Type(() => RunnerQueryBaseModel) - query: QuerySpec; + query!: QuerySpec; } export class ProjectNetworkDeploymentV1_0_0 { @IsString() - chainId: string; + chainId!: string; @IsOptional() @IsArray() bypassBlocks?: (number | string)[]; } -export class ProjectNetworkV1_0_0 extends CommonProjectNetworkV1_0_0 { - @IsStringOrObject() - @IsOptional() - apiKey?: string | TokenHeader; -} +export class ProjectNetworkV1_0_0 extends CommonProjectNetworkV1_0_0 {} export class AlgorandRuntimeDataSourceV1_0_0Impl extends RuntimeDataSourceBase { validate(): void { @@ -85,7 +79,7 @@ export class RuntimeDataSourceTemplateImpl implements RuntimeDatasourceTemplate { @IsString() - name: string; + name!: string; } export class CustomDataSourceTemplateImpl @@ -93,7 +87,7 @@ export class CustomDataSourceTemplateImpl implements CustomDatasourceTemplate { @IsString() - name: string; + name!: string; } export class DeploymentV1_0_0 extends BaseDeploymentV1_0_0 { @@ -105,11 +99,11 @@ export class DeploymentV1_0_0 extends BaseDeploymentV1_0_0 { }) @ValidateNested() @Type(() => ProjectNetworkDeploymentV1_0_0) - network: ProjectNetworkDeploymentV1_0_0; + network!: ProjectNetworkDeploymentV1_0_0; @IsObject() @ValidateNested() @Type(() => AlgorandRunnerSpecsImpl) - runner: RunnerSpecs; + runner!: RunnerSpecs; @IsArray() @ValidateNested() @@ -120,7 +114,7 @@ export class DeploymentV1_0_0 extends BaseDeploymentV1_0_0 { }, keepDiscriminatorProperty: true, }) - dataSources: (AlgorandCustomDataSource | AlgorandRuntimeDataSource)[]; + dataSources!: (AlgorandCustomDataSource | AlgorandRuntimeDataSource)[]; @IsOptional() @IsArray() @ValidateNested() @@ -146,19 +140,19 @@ export class ProjectManifestV1_0_0Impl specVersion = '1.0.0'; @IsString() - name: string; + name!: string; @IsString() - version: string; + version!: string; @IsObject() @ValidateNested() @Type(() => ProjectNetworkV1_0_0) - network: ProjectNetworkV1_0_0; + network!: ProjectNetworkV1_0_0; @ValidateNested() @Type(() => FileType) - schema: FileType; + schema!: FileType; @IsArray() @ValidateNested() @@ -169,7 +163,7 @@ export class ProjectManifestV1_0_0Impl }, keepDiscriminatorProperty: true, }) - dataSources: (AlgorandRuntimeDataSource | AlgorandCustomDataSource)[]; + dataSources!: (AlgorandRuntimeDataSource | AlgorandCustomDataSource)[]; @IsOptional() @IsArray() @@ -186,7 +180,7 @@ export class ProjectManifestV1_0_0Impl @IsObject() @ValidateNested() @Type(() => AlgorandRunnerSpecsImpl) - runner: RunnerSpecs; + runner!: RunnerSpecs; @IsOptional() @IsObject() diff --git a/packages/node/CHANGELOG.md b/packages/node/CHANGELOG.md index 5dbd69aa..47bd708e 100644 --- a/packages/node/CHANGELOG.md +++ b/packages/node/CHANGELOG.md @@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- Update dependencies and apply dependent changes (#130) + +### Added +- Support for specifying headers for network endpoints (#130) ## [3.12.0] - 2024-07-03 ### Changed diff --git a/packages/node/Dockerfile b/packages/node/Dockerfile index 7a84afcc..804ff1b8 100644 --- a/packages/node/Dockerfile +++ b/packages/node/Dockerfile @@ -41,6 +41,7 @@ RUN mkdir -p .monitor && \ # Make the user not ROOT USER 1000 +ENV TZ=utc # Set Entry point and command ENTRYPOINT ["/sbin/tini", "--", "/usr/local/lib/node_modules/@subql/node-algorand/bin/run"] diff --git a/packages/node/package.json b/packages/node/package.json index 2b6f48a9..98744859 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -24,14 +24,13 @@ "@nestjs/event-emitter": "^2.0.0", "@nestjs/platform-express": "^9.4.0", "@nestjs/schedule": "^3.0.1", + "@subql/common": "^5.0.0", "@subql/common-algorand": "workspace:*", - "@subql/node-core": "^10.10.0", + "@subql/node-core": "^14.0.0", "@subql/types-algorand": "workspace:*", - "algosdk": "^2.2.0", - "axios": "^1.3.4", + "algosdk": "^2.8.0", "lodash": "^4.17.21", "reflect-metadata": "^0.1.13", - "rimraf": "^3.0.2", "yargs": "^16.2.0" }, "devDependencies": { @@ -44,7 +43,8 @@ "@types/tar": "^6.1.1", "@types/yargs": "^16.0.4", "dotenv": "^15.0.1", - "nodemon": "^2.0.15" + "nodemon": "^2.0.15", + "rimraf": "^6.0.1" }, "peerDependencies": { "@subql/utils": "*" diff --git a/packages/node/src/admin/admin.module.ts b/packages/node/src/admin/admin.module.ts deleted file mode 100644 index fa4e6425..00000000 --- a/packages/node/src/admin/admin.module.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2020-2024 SubQuery Pte Ltd authors & contributors -// SPDX-License-Identifier: GPL-3.0 - -import { Module } from '@nestjs/common'; -import { adminControllers, adminServices } from '@subql/node-core'; -import { FetchModule } from '../indexer/fetch.module'; - -@Module({ - imports: [FetchModule], - controllers: [...adminControllers], - providers: [...adminServices], -}) -export class AdminModule {} diff --git a/packages/node/src/algorand/algorand.spec.ts b/packages/node/src/algorand/algorand.spec.ts index af58e5d8..d72fae14 100644 --- a/packages/node/src/algorand/algorand.spec.ts +++ b/packages/node/src/algorand/algorand.spec.ts @@ -122,17 +122,16 @@ describe('Algorand RPC', () => { }); // This is failing since switching from algo explorer api. This is due to a node configuration limit - it.skip('paginate large blocks', async () => { + it('paginate large blocks', async () => { [app, apiService] = await prepareApiService( testnetEndpoint, testnetChainId, ); const failingBlock = 27739202; // testnet - const passingBlock = 27739200; // testnet const api = apiService.api; const paginateSpy = jest.spyOn(api, 'paginatedTransactions'); - const result = await api.getBlockByHeight(failingBlock)(); + const result = await api.getBlockByHeight(failingBlock); expect(paginateSpy).toHaveBeenCalledTimes(3); expect(result.transactions.length).toEqual(13916); }); diff --git a/packages/node/src/algorand/api.algorand.ts b/packages/node/src/algorand/api.algorand.ts index 9e098a98..7f5dc4dd 100644 --- a/packages/node/src/algorand/api.algorand.ts +++ b/packages/node/src/algorand/api.algorand.ts @@ -1,56 +1,79 @@ // Copyright 2020-2024 SubQuery Pte Ltd authors & contributors // SPDX-License-Identifier: GPL-3.0 -import { TokenHeader } from '@subql/common-algorand'; +import assert from 'assert'; import { delay, getLogger, IBlock } from '@subql/node-core'; import { AlgorandBlock, AlgorandTransaction, SafeAPI, } from '@subql/types-algorand'; +import { IEndpointConfig } from '@subql/types-core'; import algosdk, { Indexer } from 'algosdk'; -import axios from 'axios'; import { omit } from 'lodash'; import { camelCaseObjectKey, formatBlockUtil } from './utils.algorand'; const logger = getLogger('api.algorand'); export class AlgorandApi { - private genesisHash: string; - private chain: string; - api: Indexer; - private blockCache: AlgorandBlock[]; + private _genesisHash?: string; + private _chain?: string; + readonly api: Indexer; + private blockCache: AlgorandBlock[] = []; private paginationLimit = 10000; - constructor(private endpoint: string, private token?: string | TokenHeader) { - this.token = token ?? ''; - this.blockCache = []; + private constructor(endpoint: string, config: IEndpointConfig) { + this.api = new algosdk.Indexer( + config.headers?.['X-Indexer-API-Token'] ?? '', + endpoint, + new URL(endpoint).port, // Specify the port, by default it will be an empty string, we don't want undefined because it then defaults to 8080 + config.headers, + ); } - async init(): Promise { + static async create( + endpoint: string, + config: IEndpointConfig, + ): Promise { + const api = new AlgorandApi(endpoint, config); + // get genesisHash in block - const urlEndpoint = new URL(this.endpoint); - const baseServer = `${urlEndpoint.protocol}//${urlEndpoint.host}${urlEndpoint.pathname}`; + const block = await api.api.lookupBlock(1).do(); + + api._genesisHash = block['genesis-hash'] ?? ''; + api._chain = block['genesis-id'] ?? ''; + + return api; + } + + private get genesisHash(): string { + assert(this._genesisHash, 'genesisHash not initialized'); + return this._genesisHash; + } - this.api = new algosdk.Indexer(this.token, baseServer, urlEndpoint.port); + private get chain(): string { + assert(this._chain, 'chain not initialized'); + return this._chain; + } - const block = await this.api.lookupBlock(1).do(); + async getLatestBlockHeader(): Promise { + const checkHealth = await this.api.makeHealthCheck().do(); + const block = await this.getHeaderOnly(checkHealth.round); - this.genesisHash = block['genesis-hash'] ?? ''; - this.chain = block['genesis-id'] ?? ''; + return block; } async getBlockByHeight(height: number): Promise { try { const blockInfo = await this.api.lookupBlock(height).do(); return this.constructBlock(camelCaseObjectKey(blockInfo)); - } catch (error) { + } catch (error: any) { if (error.message.includes('Max transactions limit exceeded')) { logger.warn('Max transactions limit exceeded, paginating transactions'); return this.combinePaginateBlock(height); } else { - logger.error(`failed to fetch Block at round ${height}`); + logger.error(error, `failed to fetch Block at round ${height}`); throw error; } } @@ -58,17 +81,8 @@ export class AlgorandApi { async getHeaderOnly(block: number): Promise { try { - const result = ( - await axios({ - params: { - 'header-only': true, - }, - method: 'get', - url: `/v2/blocks/${block}`, - baseURL: this.endpoint, - }) - ).data; - return result; + const result = await this.api.lookupBlock(block).headerOnly(true).do(); + return this.constructBlock(result as AlgorandBlock); } catch (e) { logger.error('Failed to fetch round header', e); throw e; @@ -80,24 +94,23 @@ export class AlgorandApi { nextToken?: string, ): Promise { try { - const result: { transactions: AlgorandTransaction[] } = ( - await axios({ - params: { - round: blockHeight, - limit: this.paginationLimit, - next: nextToken && nextToken, - }, - method: 'get', - url: `/v2/transactions`, - baseURL: this.endpoint, - }) - ).data; + let req = this.api + .searchForTransactions() + .round(blockHeight) + .limit(this.paginationLimit); + + if (nextToken) { + req = req.nextToken(nextToken); + } + + const result = await req.do(); /* Maximum number of results to return. There could be additional pages even if the limit is not reached. https://developer.algorand.org/docs/rest-apis/indexer/#get-v2transactions Hence, the condition below */ + if (result.transactions.length > 0) { const nextPage = await this.paginatedTransactions( blockHeight, @@ -106,7 +119,7 @@ export class AlgorandApi { return result.transactions.concat(nextPage); } return result.transactions; - } catch (e) { + } catch (e: any) { logger.error(e, 'Failed to paginated transactions'); throw e; } @@ -133,12 +146,12 @@ export class AlgorandApi { const newBlock = { ...block, getTransactionsByGroup: (groupId: string) => - transactions.filter((tx) => tx.group === groupId), + transactions?.filter((tx) => tx.group === groupId) ?? [], toJSON() { return omit(this, ['getTransactionsByGroup', 'toJSON']); }, }; - const transactions = newBlock.transactions.map((tx) => ({ + const transactions = newBlock.transactions?.map((tx) => ({ ...tx, block: newBlock, toJSON() { @@ -170,7 +183,7 @@ export class AlgorandApi { } getSafeApi(height: number): SafeAPIService { - return new SafeAPIService(this, height, this.endpoint); + return new SafeAPIService(this, height); } async fetchBlocks(blockNums: number[]): Promise[]> { let blocks: AlgorandBlock[] = []; @@ -197,7 +210,7 @@ export class AlgorandApi { return formattedBlocks; } - private blockInCache(number: number): AlgorandBlock { + private blockInCache(number: number): AlgorandBlock | undefined { for (let i = 0; i < this.blockCache.length; i++) { if (this.blockCache[i].round === number) { const block = this.blockCache[i]; @@ -236,16 +249,13 @@ export class AlgorandApi { currentRound = checkHealth.round; } } + throw new Error(`Unable to get block hash for round ${round}`); } } export class SafeAPIService implements SafeAPI { readonly indexer: Indexer; - private readonly height; - private readonly endpoint; - constructor(private api: AlgorandApi, height: number, endpoint: string) { - this.height = height; - this.endpoint = endpoint; + constructor(private api: AlgorandApi, private readonly height: number) { this.indexer = api.api; } async getBlock(): Promise { diff --git a/packages/node/src/algorand/api.connection.ts b/packages/node/src/algorand/api.connection.ts index f1c80367..51d7f3d8 100644 --- a/packages/node/src/algorand/api.connection.ts +++ b/packages/node/src/algorand/api.connection.ts @@ -9,6 +9,7 @@ import { getLogger, IBlock, } from '@subql/node-core'; +import { IEndpointConfig } from '@subql/types-core'; import { BlockContent } from '../indexer/types'; import { AlgorandApi, SafeAPIService } from './api.algorand'; @@ -32,17 +33,16 @@ export class AlgorandApiConnection this.networkMeta = { chain: unsafeApi.getChainId(), genesisHash: unsafeApi.getGenesisHash(), - specName: undefined, + specName: 'algorand', }; } static async create( endpoint: string, + config: IEndpointConfig, fetchBlocksBatches: FetchFunc, ): Promise { - const api = new AlgorandApi(endpoint); - - await api.init(); + const api = await AlgorandApi.create(endpoint, config); return new AlgorandApiConnection(api, fetchBlocksBatches); } diff --git a/packages/node/src/algorand/api.service.algorand.ts b/packages/node/src/algorand/api.service.algorand.ts index a21a0d9f..9e019b94 100644 --- a/packages/node/src/algorand/api.service.algorand.ts +++ b/packages/node/src/algorand/api.service.algorand.ts @@ -34,21 +34,14 @@ export class AlgorandApiService extends ApiService< } async init(): Promise { - let network; - try { - network = this.project.network; - } catch (e) { - exitWithError( - new Error(`Failed to init api`, { cause: e }), - logger, + await this.createConnections(this.project.network, (endpoint, config) => + AlgorandApiConnection.create(endpoint, config, this.fetchBlockBatches), ); + } catch (e) { + exitWithError(new Error(`Failed to init api`, { cause: e }), logger); } - await this.createConnections(network, (endpoint) => - AlgorandApiConnection.create(endpoint, this.fetchBlockBatches), - ); - return this; } diff --git a/packages/node/src/algorand/utils.algorand.spec.ts b/packages/node/src/algorand/utils.algorand.spec.ts index 38fe0852..f9cfab45 100644 --- a/packages/node/src/algorand/utils.algorand.spec.ts +++ b/packages/node/src/algorand/utils.algorand.spec.ts @@ -24,29 +24,31 @@ describe('Algorand Filters', () => { }); it('returns true with no filter', () => { - expect(filterTransaction(block.transactions[13])).toBeTruthy(); + expect(filterTransaction(block.transactions![13])).toBeTruthy(); }); it('can fillter by sender', () => { expect( - filterTransaction(block.transactions[13], { + filterTransaction(block.transactions![13], { sender: '5GMADASEGJ324HR4GI2XZ2BNSN77ND45LLF4F4XDTAYX3YM6TX5YEU4FEA', }), ).toBeTruthy(); expect( - filterTransaction(block.transactions[13], { sender: 'WRONG_ADDRESSS' }), + filterTransaction(block.transactions![13], { + sender: 'WRONG_ADDRESSS', + }), ).toBeFalsy(); }); it('can fillter by receiver', () => { expect( - filterTransaction(block.transactions[18], { + filterTransaction(block.transactions![18], { receiver: 'V6CK3HRC4JBRBDIBB4JWOBMYNUYIP7SYHRPVHH5ZMJQME337C57IBIZVFI', }), ).toBeTruthy(); expect( - filterTransaction(block.transactions[18], { + filterTransaction(block.transactions![18], { receiver: 'WRONG_ADDRESSS', }), ).toBeFalsy(); @@ -54,30 +56,41 @@ describe('Algorand Filters', () => { it('can fillter by application id', () => { expect( - filterTransaction(block.transactions[13], { applicationId: 971368268 }), + filterTransaction(block.transactions![13], { + applicationId: 971368268, + }), ).toBeTruthy(); expect( - filterTransaction(block.transactions[13], { applicationId: 0 }), + filterTransaction(block.transactions![13], { applicationId: 0 }), ).toBeFalsy(); }); it('can fillter by application args', () => { // Filter single argument (function signature) expect( - filterTransaction(block.transactions[13], { + filterTransaction(block.transactions![13], { applicationArgs: ['udVC+w=='], }), ).toBeTruthy(); // Filter all arguments expect( - filterTransaction(block.transactions[13], { + filterTransaction(block.transactions![13], { applicationArgs: ['udVC+w==', 'AQ==', 'AA==', 'AQ==', 'AQ=='], }), ).toBeTruthy(); // Filter specific argument expect( - filterTransaction(block.transactions[13], { - applicationArgs: ['udVC+w==', null, null, null, 'AQ=='], + filterTransaction(block.transactions![13], { + applicationArgs: ['udVC+w==', null, null, null, 'AQ=='] as any, + }), + ).toBeTruthy(); + }); + + it('should not filter undefined options', () => { + expect( + filterTransaction(block.transactions![4], { + sender: 'ZW3ISEHZUHPO7OZGMKLKIIMKVICOUDRCERI454I3DB2BH52HGLSO67W754', + receiver: undefined, }), ).toBeTruthy(); }); diff --git a/packages/node/src/algorand/utils.algorand.ts b/packages/node/src/algorand/utils.algorand.ts index c04b220f..e8d24d73 100644 --- a/packages/node/src/algorand/utils.algorand.ts +++ b/packages/node/src/algorand/utils.algorand.ts @@ -137,11 +137,11 @@ export function filterTransaction( for (const key in filterByKey) { if ( mappingFilterTransaction[txn.txType] && + filterByKey[key] !== undefined && !txComparator( filterByKey[key], get(txn, mappingFilterTransaction[txn.txType][key]), ) - // filterByKey[key] !== get(txn, mappingFilterTransaction[txn.txType][key]) ) { return false; } diff --git a/packages/node/src/app.module.ts b/packages/node/src/app.module.ts index a987ef27..d317738f 100644 --- a/packages/node/src/app.module.ts +++ b/packages/node/src/app.module.ts @@ -4,11 +4,14 @@ import { Module } from '@nestjs/common'; import { EventEmitterModule } from '@nestjs/event-emitter'; import { ScheduleModule } from '@nestjs/schedule'; -import { DbModule } from '@subql/node-core'; -import { AdminModule } from './admin/admin.module'; +import { CoreModule, DbModule, MetaModule } from '@subql/node-core'; import { ConfigureModule } from './configure/configure.module'; import { FetchModule } from './indexer/fetch.module'; -import { MetaModule } from './meta/meta.module'; + +// eslint-disable-next-line @typescript-eslint/no-var-requires +const { version: algorandSdkVersion } = require('algosdk/package.json'); +// eslint-disable-next-line @typescript-eslint/no-var-requires +const { version: packageVersion } = require('../package.json'); @Module({ imports: [ @@ -16,9 +19,12 @@ import { MetaModule } from './meta/meta.module'; EventEmitterModule.forRoot(), ConfigureModule.register(), ScheduleModule.forRoot(), + CoreModule, FetchModule, - MetaModule, - AdminModule, + MetaModule.forRoot({ + version: packageVersion, + sdkVersion: { name: 'algosdk', version: algorandSdkVersion }, + }), ], controllers: [], }) diff --git a/packages/node/src/configure/SubqueryProject.ts b/packages/node/src/configure/SubqueryProject.ts index 97574033..a2ddc96b 100644 --- a/packages/node/src/configure/SubqueryProject.ts +++ b/packages/node/src/configure/SubqueryProject.ts @@ -1,36 +1,20 @@ // Copyright 2020-2024 SubQuery Pte Ltd authors & contributors // SPDX-License-Identifier: GPL-3.0 -import assert from 'assert'; -import { Injectable } from '@nestjs/common'; -import { validateSemver } from '@subql/common'; import { parseAlgorandProjectManifest, - ProjectManifestV1_0_0Impl, BlockFilter, isRuntimeDs, AlgorandHandlerKind, isCustomDs, } from '@subql/common-algorand'; -import { - CronFilter, - insertBlockFiltersCronSchedules, - loadProjectTemplates, - updateDataSourcesV1_0_0, -} from '@subql/node-core'; +import { BaseSubqueryProject, CronFilter } from '@subql/node-core'; import { AlgorandDataSource, CustomDatasourceTemplate, RuntimeDatasourceTemplate, } from '@subql/types-algorand'; -import { - IProjectNetworkConfig, - ParentProject, - Reader, - RunnerSpecs, -} from '@subql/types-core'; -import { buildSchemaFromString } from '@subql/utils'; -import { GraphQLSchema } from 'graphql'; +import { IProjectNetworkConfig, Reader } from '@subql/types-core'; const { version: packageVersion } = require('../../package.json'); @@ -40,149 +24,34 @@ export type AlgorandProjectDsTemplate = export type SubqlProjectBlockFilter = BlockFilter & CronFilter; -const NOT_SUPPORT = (name: string) => { - throw new Error(`Manifest specVersion ${name}() is not supported`); -}; - // This is the runtime type after we have mapped genesisHash to chainId and endpoint/dict have been provided when dealing with deployments type NetworkConfig = IProjectNetworkConfig & { chainId: string }; -@Injectable() -export class SubqueryProject { - #dataSources: AlgorandDataSource[]; - - constructor( - readonly id: string, - readonly root: string, - readonly network: NetworkConfig, - dataSources: AlgorandDataSource[], - readonly schema: GraphQLSchema, - readonly templates: AlgorandProjectDsTemplate[], - readonly runner?: RunnerSpecs, - readonly parent?: ParentProject, - ) { - this.#dataSources = dataSources; - } - - get dataSources(): AlgorandDataSource[] { - return this.#dataSources; - } - - async applyCronTimestamps( - getTimestamp: (height: number) => Promise, - ): Promise { - this.#dataSources = await insertBlockFiltersCronSchedules( - this.dataSources, - getTimestamp, - isRuntimeDs, - AlgorandHandlerKind.Block, - ); - } - - static async create( - path: string, - rawManifest: unknown, - reader: Reader, - root: string, - networkOverrides?: Partial, - ): Promise { - // rawManifest and reader can be reused here. - // It has been pre-fetched and used for rebase manifest runner options with args - // in order to generate correct configs. - - // But we still need reader here, because path can be remote or local - // and the `loadProjectManifest(projectPath)` only support local mode - if (rawManifest === undefined) { - throw new Error(`Get manifest from project path ${path} failed`); - } - - const manifest = parseAlgorandProjectManifest(rawManifest); - - if (!manifest.isV1_0_0) { - NOT_SUPPORT('<1.0.0'); - } - - return loadProjectFromManifestBase( - manifest.asV1_0_0, - reader, - path, - root, - networkOverrides, - ); - } -} - -function processChainId(network: any): NetworkConfig { - if (network.chainId && network.genesisHash) { - throw new Error('Please only provide one of chainId and genesisHash'); - } else if (network.genesisHash && !network.chainId) { - network.chainId = network.genesisHash; - } - delete network.genesisHash; - return network; -} -type SUPPORT_MANIFEST = ProjectManifestV1_0_0Impl; +export type SubqueryProject = BaseSubqueryProject< + AlgorandDataSource, + AlgorandProjectDsTemplate, + NetworkConfig +>; -async function loadProjectFromManifestBase( - projectManifest: SUPPORT_MANIFEST, - reader: Reader, +export async function createSubQueryProject( path: string, - root: string, - networkOverrides?: Partial, + rawManifest: unknown, + reader: Reader, + root: string, // If project local then directory otherwise temp directory + networkOverrides?: Partial, ): Promise { - if (typeof projectManifest.network.endpoint === 'string') { - projectManifest.network.endpoint = [projectManifest.network.endpoint]; - } - - const network = processChainId({ - ...projectManifest.network, - ...networkOverrides, - }); - - if (!network.endpoint) { - throw new Error( - `Network endpoint must be provided for network. chainId="${network.chainId}"`, - ); - } - - let schemaString: string; - try { - schemaString = await reader.getFile(projectManifest.schema.file); - } catch (e) { - throw new Error( - `unable to fetch the schema from ${projectManifest.schema.file}`, - ); - } - const schema = buildSchemaFromString(schemaString); - - const templates = await loadProjectTemplates( - projectManifest.templates, - root, - reader, - isCustomDs, - ); - const runner = projectManifest.runner; - assert( - validateSemver(packageVersion, runner.node.version), - new Error( - `Runner require node version ${runner.node.version}, current node ${packageVersion}`, - ), - ); - - const dataSources = await updateDataSourcesV1_0_0( - projectManifest.dataSources, + const project = await BaseSubqueryProject.create({ + parseManifest: (raw) => parseAlgorandProjectManifest(raw).asV1_0_0, + path, + rawManifest, reader, root, + nodeSemver: packageVersion, + blockHandlerKind: AlgorandHandlerKind.Block, + networkOverrides, + isRuntimeDs, isCustomDs, - ); - return new SubqueryProject( - reader.root ? reader.root : path, //TODO, need to method to get project_id - root, - network, - dataSources, - schema, - templates, - runner, - projectManifest.parent, - ); + }); + + return project; } diff --git a/packages/node/src/configure/configure.module.ts b/packages/node/src/configure/configure.module.ts index de172d9b..4716d8c0 100644 --- a/packages/node/src/configure/configure.module.ts +++ b/packages/node/src/configure/configure.module.ts @@ -4,7 +4,7 @@ import { DynamicModule, Global, Module } from '@nestjs/common'; import { NodeConfig, registerApp } from '@subql/node-core'; import { yargsOptions } from '../yargs'; -import { SubqueryProject } from './SubqueryProject'; +import { createSubQueryProject, SubqueryProject } from './SubqueryProject'; const pjson = require('../../package.json'); @@ -18,7 +18,7 @@ export class ConfigureModule { const { argv } = yargsOptions; return registerApp( argv, - SubqueryProject.create.bind(SubqueryProject), + createSubQueryProject, yargsOptions.showHelp.bind(yargsOptions), pjson, ); diff --git a/packages/node/src/indexer/blockDispatcher/algorand-block-dispatcher.ts b/packages/node/src/indexer/blockDispatcher/algorand-block-dispatcher.ts index f663b79a..d0f1f688 100644 --- a/packages/node/src/indexer/blockDispatcher/algorand-block-dispatcher.ts +++ b/packages/node/src/indexer/blockDispatcher/algorand-block-dispatcher.ts @@ -6,5 +6,7 @@ import { AlgorandBlock } from '@subql/types-algorand'; export interface IAlgorandBlockDispatcher extends IBlockDispatcher { - init(onDynamicDsCreated: (height: number) => Promise): Promise; + init( + onDynamicDsCreated: (height: number) => Promise | void, + ): Promise; } diff --git a/packages/node/src/indexer/blockDispatcher/worker-block-dispatcher.service.ts b/packages/node/src/indexer/blockDispatcher/worker-block-dispatcher.service.ts index 7a80d89e..199f180a 100644 --- a/packages/node/src/indexer/blockDispatcher/worker-block-dispatcher.service.ts +++ b/packages/node/src/indexer/blockDispatcher/worker-block-dispatcher.service.ts @@ -90,7 +90,6 @@ export class WorkerBlockDispatcherService worker: IndexerWorker, height: number, ): Promise { - // const start = new Date(); - await worker.fetchBlock(height, null); + await worker.fetchBlock(height, 0 /* Unused with algorand */); } } diff --git a/packages/node/src/indexer/dictionary/algorandDictionary.service.ts b/packages/node/src/indexer/dictionary/algorandDictionary.service.ts index 422bb036..41cb5625 100644 --- a/packages/node/src/indexer/dictionary/algorandDictionary.service.ts +++ b/packages/node/src/indexer/dictionary/algorandDictionary.service.ts @@ -54,6 +54,7 @@ export class AlgorandDictionaryService extends DictionaryService< ); } } + this.init(dictionariesV1); } @@ -65,11 +66,4 @@ export class AlgorandDictionaryService extends DictionaryService< ) { super(project.network.chainId, nodeConfig, eventEmitter); } - - private getV1Dictionary(): AlgorandDictionaryV1 | undefined { - // TODO this needs to be removed once Algorand supports V2 dictionaries - return this._dictionaries[ - this._currentDictionaryIndex - ] as AlgorandDictionaryV1; - } } diff --git a/packages/node/src/indexer/dictionary/v1/algorandDictionaryV1.ts b/packages/node/src/indexer/dictionary/v1/algorandDictionaryV1.ts index 4f27c438..799515d3 100644 --- a/packages/node/src/indexer/dictionary/v1/algorandDictionaryV1.ts +++ b/packages/node/src/indexer/dictionary/v1/algorandDictionaryV1.ts @@ -13,18 +13,18 @@ import { AlgorandBlockFilter, AlgorandDataSource } from '@subql/types-algorand'; import { DictionaryQueryCondition, DictionaryQueryEntry as DictionaryV1QueryEntry, - DsProcessor, } from '@subql/types-core'; import { sortBy, uniqBy } from 'lodash'; import { SubqueryProject } from '../../../configure/SubqueryProject'; import { isBaseHandler, isCustomHandler } from '../../../utils/project'; +import { DsProcessorService } from '../../ds-processor.service'; -function getBaseHandlerKind< - P extends DsProcessor = DsProcessor, ->( +type GetDsProcessor = DsProcessorService['getDsProcessor']; + +function getBaseHandlerKind( ds: AlgorandDataSource, handler: AlgorandHandler, - getDsProcessor: (ds: AlgorandDataSource) => P, + getDsProcessor: GetDsProcessor, ): AlgorandHandlerKind { if (isRuntimeDs(ds) && isBaseHandler(handler)) { return handler.kind; @@ -42,13 +42,10 @@ function getBaseHandlerKind< } } -function getBaseHandlerFilters< - T extends AlgorandRuntimeHandlerFilter, - P extends DsProcessor = DsProcessor, ->( +function getBaseHandlerFilters( ds: AlgorandDataSource, handlerKind: string, - getDsProcessor: (ds: AlgorandDataSource) => P, + getDsProcessor: GetDsProcessor, ): T[] { if (isCustomDs(ds)) { const plugin = getDsProcessor(ds); @@ -62,11 +59,9 @@ function getBaseHandlerFilters< } // eslint-disable-next-line complexity -function buildDictionaryV1QueryEntries< - P extends DsProcessor = DsProcessor, ->( +function buildDictionaryV1QueryEntries( dataSources: AlgorandDataSource[], - getDsProcessor: (ds: AlgorandDataSource) => P, + getDsProcessor: GetDsProcessor, ): DictionaryV1QueryEntry[] { const queryEntries: DictionaryV1QueryEntry[] = []; @@ -75,14 +70,13 @@ function buildDictionaryV1QueryEntries< const baseHandlerKind = getBaseHandlerKind(ds, handler, getDsProcessor); let filterList: AlgorandRuntimeHandlerFilter[]; if (isCustomDs(ds)) { - //const processor = plugin.handlerProcessors[handler.kind]; filterList = getBaseHandlerFilters( ds, handler.kind, getDsProcessor, ); } else { - filterList = [handler.filter]; + filterList = handler.filter ? [handler.filter] : []; } // Filter out any undefined filterList = filterList.filter(Boolean); @@ -131,10 +125,8 @@ export class AlgorandDictionaryV1 extends DictionaryV1 { constructor( project: SubqueryProject, nodeConfig: NodeConfig, - protected getDsProcessor: ( - ds: AlgorandDataSource, - ) => DsProcessor, - dictionaryUrl?: string, + protected getDsProcessor: GetDsProcessor, + dictionaryUrl: string, chainId?: string, ) { super(dictionaryUrl, chainId ?? project.network.chainId, nodeConfig); @@ -143,8 +135,8 @@ export class AlgorandDictionaryV1 extends DictionaryV1 { static async create( project: SubqueryProject, nodeConfig: NodeConfig, - getDsProcessor: (ds: AlgorandDataSource) => DsProcessor, - dictionaryUrl?: string, + getDsProcessor: GetDsProcessor, + dictionaryUrl: string, chainId?: string, ): Promise { const dictionary = new AlgorandDictionaryV1( diff --git a/packages/node/src/indexer/dynamic-ds.service.ts b/packages/node/src/indexer/dynamic-ds.service.ts index aa861e21..d198e2f3 100644 --- a/packages/node/src/indexer/dynamic-ds.service.ts +++ b/packages/node/src/indexer/dynamic-ds.service.ts @@ -46,7 +46,7 @@ export class DynamicDsService extends BaseDynamicDsService< return dsObj; } catch (e) { - throw new Error(`Unable to create dynamic datasource.\n ${e.message}`); + throw new Error(`Unable to create dynamic datasource.`, { cause: e }); } } } diff --git a/packages/node/src/indexer/fetch.module.ts b/packages/node/src/indexer/fetch.module.ts index 1819a1ee..44c8f1a9 100644 --- a/packages/node/src/indexer/fetch.module.ts +++ b/packages/node/src/indexer/fetch.module.ts @@ -4,10 +4,7 @@ import { Module } from '@nestjs/common'; import { EventEmitter2 } from '@nestjs/event-emitter'; import { - PoiBenchmarkService, - IndexingBenchmarkService, StoreService, - PoiService, PoiSyncService, NodeConfig, ConnectionPoolService, @@ -15,8 +12,8 @@ import { ConnectionPoolStateManager, IProjectUpgradeService, InMemoryCacheService, - SandboxService, MonitorService, + CoreModule, } from '@subql/node-core'; import { AlgorandApiConnection, AlgorandApiService } from '../algorand'; import { SubqueryProject } from '../configure/SubqueryProject'; @@ -33,11 +30,8 @@ import { ProjectService } from './project.service'; import { UnfinalizedBlocksService } from './unfinalizedBlocks.service'; @Module({ + imports: [CoreModule], providers: [ - InMemoryCacheService, - StoreService, - StoreCacheService, - ConnectionPoolService, UnfinalizedBlocksService, { provide: AlgorandApiService, @@ -57,7 +51,6 @@ import { UnfinalizedBlocksService } from './unfinalizedBlocks.service'; inject: ['ISubqueryProject', ConnectionPoolService, EventEmitter2], }, IndexerManager, - ConnectionPoolStateManager, { provide: 'IBlockDispatcher', useFactory: ( @@ -124,21 +117,14 @@ import { UnfinalizedBlocksService } from './unfinalizedBlocks.service'; ], }, FetchService, - ConnectionPoolService, - IndexingBenchmarkService, - PoiBenchmarkService, AlgorandDictionaryService, - SandboxService, DsProcessorService, DynamicDsService, - PoiService, - PoiSyncService, { useClass: ProjectService, provide: 'IProjectService', }, MonitorService, ], - exports: [StoreService, StoreCacheService, MonitorService, PoiService], }) export class FetchModule {} diff --git a/packages/node/src/indexer/fetch.service.ts b/packages/node/src/indexer/fetch.service.ts index 5c9a8117..8cca040d 100644 --- a/packages/node/src/indexer/fetch.service.ts +++ b/packages/node/src/indexer/fetch.service.ts @@ -9,13 +9,25 @@ import { AlgorandHandlerKind, AlgorandDataSource, } from '@subql/common-algorand'; -import { NodeConfig, BaseFetchService, getModulos } from '@subql/node-core'; +import { + NodeConfig, + BaseFetchService, + getModulos, + Header, + StoreCacheService, +} from '@subql/node-core'; import { AlgorandBlock } from '@subql/types-algorand'; -import { AlgorandApi, AlgorandApiService, calcInterval } from '../algorand'; +import { + AlgorandApi, + AlgorandApiService, + algorandBlockToHeader, + calcInterval, +} from '../algorand'; import { SubqueryProject } from '../configure/SubqueryProject'; import { IAlgorandBlockDispatcher } from './blockDispatcher'; import { AlgorandDictionaryService } from './dictionary'; import { ProjectService } from './project.service'; +import { UnfinalizedBlocksService } from './unfinalizedBlocks.service'; const BLOCK_TIME_VARIANCE = 5000; //ms @@ -35,8 +47,10 @@ export class FetchService extends BaseFetchService< @Inject('IBlockDispatcher') blockDispatcher: IAlgorandBlockDispatcher, dictionaryService: AlgorandDictionaryService, + unfinalizedBlocksService: UnfinalizedBlocksService, eventEmitter: EventEmitter2, schedulerRegistry: SchedulerRegistry, + storeCacheService: StoreCacheService, ) { super( nodeConfig, @@ -46,6 +60,8 @@ export class FetchService extends BaseFetchService< dictionaryService, eventEmitter, schedulerRegistry, + unfinalizedBlocksService, + storeCacheService, ); } @@ -53,13 +69,14 @@ export class FetchService extends BaseFetchService< return this.apiService.unsafeApi; } - protected async getFinalizedHeight(): Promise { - const checkHealth = await this.api.api.makeHealthCheck().do(); - return checkHealth.round; + protected async getFinalizedHeader(): Promise
{ + const block = await this.api.getLatestBlockHeader(); + return algorandBlockToHeader(block); } protected async getBestHeight(): Promise { - return this.getFinalizedHeight(); + const checkHealth = await this.api.api.makeHealthCheck().do(); + return checkHealth.round; } protected async getChainId(): Promise { diff --git a/packages/node/src/indexer/indexer.manager.ts b/packages/node/src/indexer/indexer.manager.ts index 9fa19e8e..36f64738 100644 --- a/packages/node/src/indexer/indexer.manager.ts +++ b/packages/node/src/indexer/indexer.manager.ts @@ -93,7 +93,8 @@ export class IndexerManager extends BaseIndexerManager< getVM: (d: AlgorandDataSource) => Promise, ): Promise { await this.indexBlockContent(block, dataSources, getVM); - for (const tx of block.transactions) { + + for (const tx of block.transactions ?? []) { await this.indexBlockTransactionContent(tx, dataSources, getVM); } } diff --git a/packages/node/src/indexer/worker/worker-fetch.module.ts b/packages/node/src/indexer/worker/worker-fetch.module.ts index fdc4d785..38e59f66 100644 --- a/packages/node/src/indexer/worker/worker-fetch.module.ts +++ b/packages/node/src/indexer/worker/worker-fetch.module.ts @@ -6,14 +6,8 @@ import { EventEmitter2 } from '@nestjs/event-emitter'; import { ConnectionPoolService, WorkerDynamicDsService, - ConnectionPoolStateManager, - WorkerConnectionPoolStateManager, - InMemoryCacheService, - WorkerInMemoryCacheService, - SandboxService, - MonitorService, - WorkerMonitorService, WorkerUnfinalizedBlocksService, + WorkerCoreModule, } from '@subql/node-core'; import { AlgorandApiService, AlgorandApiConnection } from '../../algorand'; import { SubqueryProject } from '../../configure/SubqueryProject'; @@ -25,14 +19,9 @@ import { UnfinalizedBlocksService } from '../unfinalizedBlocks.service'; import { WorkerService } from './worker.service'; @Module({ + imports: [WorkerCoreModule], providers: [ IndexerManager, - { - provide: ConnectionPoolStateManager, - useFactory: () => - new WorkerConnectionPoolStateManager((global as any).host), - }, - ConnectionPoolService, { provide: AlgorandApiService, useFactory: async ( @@ -50,7 +39,6 @@ import { WorkerService } from './worker.service'; }, inject: ['ISubqueryProject', ConnectionPoolService, EventEmitter2], }, - SandboxService, DsProcessorService, { provide: DynamicDsService, @@ -65,14 +53,6 @@ import { WorkerService } from './worker.service'; useFactory: () => new WorkerUnfinalizedBlocksService((global as any).host), }, - { - provide: MonitorService, - useFactory: () => new WorkerMonitorService((global as any).host), - }, - { - provide: InMemoryCacheService, - useFactory: () => new WorkerInMemoryCacheService((global as any).host), - }, WorkerService, ], exports: [], diff --git a/packages/node/src/indexer/worker/worker.module.ts b/packages/node/src/indexer/worker/worker.module.ts index fe6dfd91..f48ffc20 100644 --- a/packages/node/src/indexer/worker/worker.module.ts +++ b/packages/node/src/indexer/worker/worker.module.ts @@ -4,7 +4,7 @@ import { Module } from '@nestjs/common'; import { EventEmitterModule } from '@nestjs/event-emitter'; import { ScheduleModule } from '@nestjs/schedule'; -import { DbModule } from '@subql/node-core'; +import { DbModule, WorkerCoreModule } from '@subql/node-core'; import { ConfigureModule } from '../../configure/configure.module'; import { WorkerFetchModule } from './worker-fetch.module'; @@ -14,6 +14,7 @@ import { WorkerFetchModule } from './worker-fetch.module'; EventEmitterModule.forRoot(), ConfigureModule.register(), ScheduleModule.forRoot(), + WorkerCoreModule, WorkerFetchModule, ], controllers: [], diff --git a/packages/node/src/indexer/worker/worker.service.ts b/packages/node/src/indexer/worker/worker.service.ts index 7a001404..4d98a38c 100644 --- a/packages/node/src/indexer/worker/worker.service.ts +++ b/packages/node/src/indexer/worker/worker.service.ts @@ -8,6 +8,7 @@ import { BaseWorkerService, IProjectUpgradeService, IBlock, + ProcessBlockResponse, } from '@subql/node-core'; import { AlgorandBlock, AlgorandDataSource } from '@subql/types-algorand'; import { AlgorandApiService } from '../../algorand'; @@ -16,12 +17,6 @@ import { BlockContent } from '../types'; export type FetchBlockResponse = { parentHash: string } | undefined; -export type ProcessBlockResponse = { - dynamicDsCreated: boolean; - blockHash: string; - reindexBlockHeight: number; -}; - export type WorkerStatusResponse = { threadId: number; isIndexing: boolean; diff --git a/packages/node/src/indexer/worker/worker.ts b/packages/node/src/indexer/worker/worker.ts index 7830aa7e..d7eb9211 100644 --- a/packages/node/src/indexer/worker/worker.ts +++ b/packages/node/src/indexer/worker/worker.ts @@ -31,7 +31,7 @@ import { WorkerService } from './worker.service'; const logger = getLogger(`worker #${threadId}`); -async function initWorker(startHeight: number): Promise { +async function initWorker(startHeight?: number): Promise { try { const app = await NestFactory.create(WorkerModule, { logger: new NestLogger(!!argv.debug), // TIP: If the worker is crashing comment out this line for better logging @@ -46,7 +46,7 @@ async function initWorker(startHeight: number): Promise { const workerService = app.get(WorkerService); initWorkerServices(app, workerService); - } catch (e) { + } catch (e: any) { console.log('Failed to start worker', e); logger.error(e, 'Failed to start worker'); throw e; diff --git a/packages/node/src/init.ts b/packages/node/src/init.ts index 11a4f451..d76f60f5 100644 --- a/packages/node/src/init.ts +++ b/packages/node/src/init.ts @@ -2,8 +2,12 @@ // SPDX-License-Identifier: GPL-3.0 import { NestFactory } from '@nestjs/core'; -import { findAvailablePort } from '@subql/common'; -import { exitWithError, getLogger, NestLogger } from '@subql/node-core'; +import { + exitWithError, + getLogger, + getValidPort, + NestLogger, +} from '@subql/node-core'; import { AppModule } from './app.module'; import { FetchService } from './indexer/fetch.service'; import { yargsOptions } from './yargs'; @@ -11,32 +15,12 @@ const pjson = require('../package.json'); const { argv } = yargsOptions; -const DEFAULT_PORT = 3000; const logger = getLogger('subql-node'); export async function bootstrap(): Promise { logger.info(`Current ${pjson.name} version is ${pjson.version}`); - const validate = (x: any) => { - const p = parseInt(x); - return isNaN(p) ? null : p; - }; - - const port = validate(argv.port) ?? (await findAvailablePort(DEFAULT_PORT)); - if (!port) { - exitWithError( - `Unable to find available port (tried ports in range (${port}..${ - port + 10 - })). Try setting a free port manually by setting the --port flag`, - logger, - ); - } - - if (argv.unsafe) { - logger.warn( - 'UNSAFE MODE IS ENABLED. This is not recommended for most projects and will not be supported by our hosted service', - ); - } + const port = await getValidPort(argv.port); try { const app = await NestFactory.create(AppModule, { diff --git a/packages/node/src/meta/meta.controller.ts b/packages/node/src/meta/meta.controller.ts deleted file mode 100644 index fa7b0618..00000000 --- a/packages/node/src/meta/meta.controller.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2020-2024 SubQuery Pte Ltd authors & contributors -// SPDX-License-Identifier: GPL-3.0 - -import { Controller, Get } from '@nestjs/common'; -import { MetaService } from './meta.service'; - -@Controller('meta') -export class MetaController { - constructor(private metaService: MetaService) {} - - @Get() - getMeta() { - return this.metaService.getMeta(); - } -} diff --git a/packages/node/src/meta/meta.module.ts b/packages/node/src/meta/meta.module.ts deleted file mode 100644 index cc474236..00000000 --- a/packages/node/src/meta/meta.module.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2020-2024 SubQuery Pte Ltd authors & contributors -// SPDX-License-Identifier: GPL-3.0 - -import { Module } from '@nestjs/common'; -import { metaControllers, metaServices } from '@subql/node-core'; -import { PrometheusModule } from '@willsoto/nestjs-prometheus'; -import { FetchModule } from '../indexer/fetch.module'; -import { MetaController } from './meta.controller'; -import { MetaService } from './meta.service'; - -@Module({ - imports: [PrometheusModule.register(), FetchModule], - controllers: [...metaControllers, MetaController], - providers: [...metaServices, MetaService], -}) -export class MetaModule {} diff --git a/packages/node/src/meta/meta.service.ts b/packages/node/src/meta/meta.service.ts deleted file mode 100644 index 0d833359..00000000 --- a/packages/node/src/meta/meta.service.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2020-2024 SubQuery Pte Ltd authors & contributors -// SPDX-License-Identifier: GPL-3.0 - -import { Injectable } from '@nestjs/common'; -import { - BaseMetaService, - NodeConfig, - StoreCacheService, -} from '@subql/node-core'; - -// eslint-disable-next-line @typescript-eslint/no-var-requires -const { version: algorandSdkVersion } = require('algosdk/package.json'); -// eslint-disable-next-line @typescript-eslint/no-var-requires -const { version: packageVersion } = require('../../package.json'); - -@Injectable() -export class MetaService extends BaseMetaService { - protected packageVersion = packageVersion; - protected sdkVersion(): { name: string; version: string } { - return { name: 'algorandSdkVersion', version: algorandSdkVersion }; - } - - constructor(nodeConfig: NodeConfig, storeCacheService: StoreCacheService) { - super(storeCacheService, nodeConfig); - } -} diff --git a/packages/node/src/subcommands/forceClean.service.ts b/packages/node/src/subcommands/forceClean.service.ts index 01264be0..5ed982bf 100644 --- a/packages/node/src/subcommands/forceClean.service.ts +++ b/packages/node/src/subcommands/forceClean.service.ts @@ -80,7 +80,7 @@ export class ForceCleanService { } logger.info('force cleaned schema and tables'); - } catch (err) { + } catch (err: any) { logger.error(err, 'failed to force clean'); throw err; } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 6f078020..f5ef7e92 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- Update dependencies (#130) ## [3.4.0] - 2024-07-03 ### Changed diff --git a/packages/types/package.json b/packages/types/package.json index 0b6caab1..eeb0e378 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -17,13 +17,13 @@ "/dist" ], "peerDependencies": { - "algosdk": "^2.2.0" + "algosdk": "^2.8.0" }, "devDependencies": { "@types/app-module-path": "^2.2.0", - "algosdk": "^2.2.0" + "algosdk": "^2.8.0" }, "dependencies": { - "@subql/types-core": "^0.9.0" + "@subql/types-core": "^1.0.0" } } diff --git a/packages/types/src/project.ts b/packages/types/src/project.ts index 83ec4d96..57903255 100644 --- a/packages/types/src/project.ts +++ b/packages/types/src/project.ts @@ -55,6 +55,11 @@ export type RuntimeHandlerInputMap = { [AlgorandHandlerKind.Transaction]: AlgorandTransaction; }; +export type RuntimeFilterMap = { + [AlgorandHandlerKind.Block]: AlgorandBlockFilter; + [AlgorandHandlerKind.Transaction]: AlgorandTransactionFilter; +}; + export type AlgorandBlockFilter = BlockFilter; /** @@ -220,10 +225,10 @@ export type SecondLayerHandlerProcessor< E, DS extends AlgorandCustomDataSource = AlgorandCustomDataSource > = - | SecondLayerHandlerProcessor_0_0_0 - | SecondLayerHandlerProcessor_1_0_0; + | SecondLayerHandlerProcessor_0_0_0 + | SecondLayerHandlerProcessor_1_0_0; -type SecondLayerHandlerProcessorArray< +export type SecondLayerHandlerProcessorArray< K extends string, F extends Record, T, diff --git a/tsconfig.json b/tsconfig.json index 4f309d9b..0e7b07a8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,7 +23,8 @@ "@subql/types-algorand": ["packages/types/src"], "@subql/types-algorand/*": ["packages/types/src/*"] }, - "skipLibCheck": true + "skipLibCheck": true, + "strict": true, }, "references": [ {"path": "packages/common-algorand"}, diff --git a/yarn.lock b/yarn.lock index 4b170f0d..1228e198 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1795,42 +1795,17 @@ __metadata: languageName: node linkType: hard -"@ipld/dag-cbor@npm:^6.0.3": - version: 6.0.15 - resolution: "@ipld/dag-cbor@npm:6.0.15" +"@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" dependencies: - cborg: ^1.5.4 - multiformats: ^9.5.4 - checksum: c4ac8d7d271b9dd093c43495b1f24c3cdb7f10487aac529c2010c53a3320439ac9b17f53f02177e022735a1aae3d921f359c7020f765b72f94799ec3ff8e7207 - languageName: node - linkType: hard - -"@ipld/dag-cbor@npm:^7.0.0": - version: 7.0.3 - resolution: "@ipld/dag-cbor@npm:7.0.3" - dependencies: - cborg: ^1.6.0 - multiformats: ^9.5.4 - checksum: c0c59907ab6146a214c1ecb2341cc02904bc952255e15544554990690f7841380a87636d5937aaa23e9004b1c141e90238277d088ed6932b5b0e6d2e6ee1fe02 - languageName: node - linkType: hard - -"@ipld/dag-json@npm:^8.0.1": - version: 8.0.11 - resolution: "@ipld/dag-json@npm:8.0.11" - dependencies: - cborg: ^1.5.4 - multiformats: ^9.5.4 - checksum: 5ce25e4ed4004839a0dc18a51b09d0e2bda02a00bc15e8066809ddcedf5927ef8829a7dacaaf71ba0eb1c8699599130389af6d137da1d6f524394f5ddb0763f0 - languageName: node - linkType: hard - -"@ipld/dag-pb@npm:^2.1.3": - version: 2.1.18 - resolution: "@ipld/dag-pb@npm:2.1.18" - dependencies: - multiformats: ^9.5.4 - checksum: 46b9a7dabf6e87698fc268f88d94b710ba3988e26ab7918bcdf10c4356e15eb32393b6ab56eaf0d8936b369cb77456e491495f1025f78b099f1bd26cc5ccda06 + string-width: ^5.1.2 + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: ^7.0.1 + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: ^8.1.0 + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 4a473b9b32a7d4d3cfb7a614226e555091ff0c5a29a1734c28c72a182c2f6699b26fc6b5c2131dfd841e86b185aea714c72201d7c98c2fba5f17709333a67aeb languageName: node linkType: hard @@ -2488,6 +2463,13 @@ __metadata: languageName: node linkType: hard +"@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 6ad6a00fc4f2f2cfc6bff76fb1d88b8ee20bc0601e18ebb01b6d4be583733a860239a521a7fbca73b612e66705078809483549d2b18f370eb346c5155c8e4a0f + languageName: node + linkType: hard + "@polkadot/networks@npm:12.6.2": version: 12.6.2 resolution: "@polkadot/networks@npm:12.6.2" @@ -2666,79 +2648,6 @@ __metadata: languageName: node linkType: hard -"@protobufjs/aspromise@npm:^1.1.1, @protobufjs/aspromise@npm:^1.1.2": - version: 1.1.2 - resolution: "@protobufjs/aspromise@npm:1.1.2" - checksum: 011fe7ef0826b0fd1a95935a033a3c0fd08483903e1aa8f8b4e0704e3233406abb9ee25350ec0c20bbecb2aad8da0dcea58b392bbd77d6690736f02c143865d2 - languageName: node - linkType: hard - -"@protobufjs/base64@npm:^1.1.2": - version: 1.1.2 - resolution: "@protobufjs/base64@npm:1.1.2" - checksum: 67173ac34de1e242c55da52c2f5bdc65505d82453893f9b51dc74af9fe4c065cf4a657a4538e91b0d4a1a1e0a0642215e31894c31650ff6e3831471061e1ee9e - languageName: node - linkType: hard - -"@protobufjs/codegen@npm:^2.0.4": - version: 2.0.4 - resolution: "@protobufjs/codegen@npm:2.0.4" - checksum: 59240c850b1d3d0b56d8f8098dd04787dcaec5c5bd8de186fa548de86b86076e1c50e80144b90335e705a044edf5bc8b0998548474c2a10a98c7e004a1547e4b - languageName: node - linkType: hard - -"@protobufjs/eventemitter@npm:^1.1.0": - version: 1.1.0 - resolution: "@protobufjs/eventemitter@npm:1.1.0" - checksum: 0369163a3d226851682f855f81413cbf166cd98f131edb94a0f67f79e75342d86e89df9d7a1df08ac28be2bc77e0a7f0200526bb6c2a407abbfee1f0262d5fd7 - languageName: node - linkType: hard - -"@protobufjs/fetch@npm:^1.1.0": - version: 1.1.0 - resolution: "@protobufjs/fetch@npm:1.1.0" - dependencies: - "@protobufjs/aspromise": ^1.1.1 - "@protobufjs/inquire": ^1.1.0 - checksum: 3fce7e09eb3f1171dd55a192066450f65324fd5f7cc01a431df01bb00d0a895e6bfb5b0c5561ce157ee1d886349c90703d10a4e11a1a256418ff591b969b3477 - languageName: node - linkType: hard - -"@protobufjs/float@npm:^1.0.2": - version: 1.0.2 - resolution: "@protobufjs/float@npm:1.0.2" - checksum: 5781e1241270b8bd1591d324ca9e3a3128d2f768077a446187a049e36505e91bc4156ed5ac3159c3ce3d2ba3743dbc757b051b2d723eea9cd367bfd54ab29b2f - languageName: node - linkType: hard - -"@protobufjs/inquire@npm:^1.1.0": - version: 1.1.0 - resolution: "@protobufjs/inquire@npm:1.1.0" - checksum: ca06f02eaf65ca36fb7498fc3492b7fc087bfcc85c702bac5b86fad34b692bdce4990e0ef444c1e2aea8c034227bd1f0484be02810d5d7e931c55445555646f4 - languageName: node - linkType: hard - -"@protobufjs/path@npm:^1.1.2": - version: 1.1.2 - resolution: "@protobufjs/path@npm:1.1.2" - checksum: 856eeb532b16a7aac071cacde5c5620df800db4c80cee6dbc56380524736205aae21e5ae47739114bf669ab5e8ba0e767a282ad894f3b5e124197cb9224445ee - languageName: node - linkType: hard - -"@protobufjs/pool@npm:^1.1.0": - version: 1.1.0 - resolution: "@protobufjs/pool@npm:1.1.0" - checksum: d6a34fbbd24f729e2a10ee915b74e1d77d52214de626b921b2d77288bd8f2386808da2315080f2905761527cceffe7ec34c7647bd21a5ae41a25e8212ff79451 - languageName: node - linkType: hard - -"@protobufjs/utf8@npm:^1.1.0": - version: 1.1.0 - resolution: "@protobufjs/utf8@npm:1.1.0" - checksum: f9bf3163d13aaa3b6f5e6fbf37a116e094ea021c0e1f2a7ccd0e12a29e2ce08dafba4e8b36e13f8ed7397e1591610ce880ed1289af4d66cf4ace8a36a9557278 - languageName: node - linkType: hard - "@scure/base@npm:^1.1.5": version: 1.1.7 resolution: "@scure/base@npm:1.1.7" @@ -2782,7 +2691,7 @@ __metadata: version: 0.0.0-use.local resolution: "@subql/common-algorand@workspace:packages/common-algorand" dependencies: - "@subql/common": ^4.0.0 + "@subql/common": ^5.0.0 "@subql/types-algorand": "workspace:*" "@types/bn.js": 4.11.6 "@types/js-yaml": ^4.0.4 @@ -2796,21 +2705,20 @@ __metadata: languageName: unknown linkType: soft -"@subql/common@npm:4.0.0, @subql/common@npm:^4.0.0": - version: 4.0.0 - resolution: "@subql/common@npm:4.0.0" +"@subql/common@npm:5.0.0, @subql/common@npm:^5.0.0": + version: 5.0.0 + resolution: "@subql/common@npm:5.0.0" dependencies: - "@subql/types-core": 0.9.0 + "@subql/types-core": 1.0.0 axios: ^0.28.0 class-transformer: ^0.5.1 class-validator: ^0.14.0 fs-extra: ^10.1.0 - ipfs-http-client: 56 js-yaml: ^4.1.0 reflect-metadata: ^0.1.13 semver: ^7.5.2 update-notifier: 5.1.0 - checksum: 7c3b0f88aa9d6b388ce6129d1bb385d7269edd441b5970522e42911ac812862d9d2336a92dca8f3aa5b0bf4d56c2de32ccc68fa986f44de26d6fd027a492bdf0 + checksum: ce520fd2a95240ba69425e3a9cadd0a3bdb4e07c4fbd22162e4f864d611d2651fdab1c178dd5128e1aa0ade5bb6f2f9a8c10c33ed0e43380f225b96437627817 languageName: node linkType: hard @@ -2825,8 +2733,9 @@ __metadata: "@nestjs/schedule": ^3.0.1 "@nestjs/schematics": ^9.2.0 "@nestjs/testing": ^9.4.0 + "@subql/common": ^5.0.0 "@subql/common-algorand": "workspace:*" - "@subql/node-core": ^10.10.0 + "@subql/node-core": ^14.0.0 "@subql/types-algorand": "workspace:*" "@types/express": ^4.17.13 "@types/jest": ^27.4.0 @@ -2834,13 +2743,12 @@ __metadata: "@types/pino": ^6.3.12 "@types/tar": ^6.1.1 "@types/yargs": ^16.0.4 - algosdk: ^2.2.0 - axios: ^1.3.4 + algosdk: ^2.8.0 dotenv: ^15.0.1 lodash: ^4.17.21 nodemon: ^2.0.15 reflect-metadata: ^0.1.13 - rimraf: ^3.0.2 + rimraf: ^6.0.1 yargs: ^16.2.0 peerDependencies: "@subql/utils": "*" @@ -2849,18 +2757,18 @@ __metadata: languageName: unknown linkType: soft -"@subql/node-core@npm:^10.10.0": - version: 10.10.0 - resolution: "@subql/node-core@npm:10.10.0" +"@subql/node-core@npm:^14.0.0": + version: 14.0.0 + resolution: "@subql/node-core@npm:14.0.0" dependencies: "@apollo/client": ^3.8.8 "@nestjs/common": ^9.4.0 "@nestjs/event-emitter": ^2.0.0 "@nestjs/schedule": ^3.0.1 - "@subql/common": 4.0.0 - "@subql/testing": 2.2.0 - "@subql/types": 3.8.0 - "@subql/utils": 2.12.0 + "@subql/common": 5.0.0 + "@subql/testing": 2.2.1 + "@subql/types": 3.10.0 + "@subql/utils": 2.13.1 "@willsoto/nestjs-prometheus": ^5.4.0 async-lock: ^1.4.0 async-mutex: ^0.4.0 @@ -2878,16 +2786,16 @@ __metadata: toposort-class: ^1.0.1 vm2: ^3.9.19 yargs: ^16.2.0 - checksum: 5954bf41c23eb29a189f6200330c8858228b32920f1919ee73d83d51bae5f9194daf96f19151102c8f876df676ba7be39058b93e14074364f1af700b48cea2f9 + checksum: 2c6430b3518b16c2aa629b22d1136d5d87719e44d8f4ff12dd5096d5c7d4e7389f04f495a87d9522cc955bd8af6eafa21a0ee39996b0d0749aa5b1eff01bec97 languageName: node linkType: hard -"@subql/testing@npm:2.2.0": - version: 2.2.0 - resolution: "@subql/testing@npm:2.2.0" +"@subql/testing@npm:2.2.1": + version: 2.2.1 + resolution: "@subql/testing@npm:2.2.1" dependencies: - "@subql/types-core": ^0.8.0 - checksum: 21bc10d8e664514566243f6bc37007093b694de28ebce5432abd29852535ab2d83478b47ddfab56fa5b4af03b3974509d6f4da1653b6e4db5595477f1768d573 + "@subql/types-core": ^0.9.1 + checksum: 0e2529ec5e3c0b1360f51c3ad7d536b7d63efa9fdafa956c388c7547a23eeca0b9d1445b27010d9fa249b2541882c8009c8f2a4a49a00ef78d94e55c9675f392 languageName: node linkType: hard @@ -2895,46 +2803,46 @@ __metadata: version: 0.0.0-use.local resolution: "@subql/types-algorand@workspace:packages/types" dependencies: - "@subql/types-core": ^0.9.0 + "@subql/types-core": ^1.0.0 "@types/app-module-path": ^2.2.0 - algosdk: ^2.2.0 + algosdk: ^2.8.0 peerDependencies: - algosdk: ^2.2.0 + algosdk: ^2.8.0 languageName: unknown linkType: soft -"@subql/types-core@npm:0.9.0, @subql/types-core@npm:^0.9.0": - version: 0.9.0 - resolution: "@subql/types-core@npm:0.9.0" +"@subql/types-core@npm:1.0.0, @subql/types-core@npm:^1.0.0": + version: 1.0.0 + resolution: "@subql/types-core@npm:1.0.0" dependencies: package-json-type: ^1.0.3 - checksum: e219221a2d8ebcb8281295ee67665e32b96924da32da67735cf041621b46a88f8e1787a0dab1f01c3af22af907aa862627f5b5fcbce48943cbb3050c04e70ccc + checksum: 3bed1a6a0b2b8f68d5c13306ee59f68d049d0917eb1588594f96cb125eebc51f321f910157b068a0b5f8a3a36a72fae8c96a22ea77b5adc0410e84330d887405 languageName: node linkType: hard -"@subql/types-core@npm:^0.8.0": - version: 0.8.0 - resolution: "@subql/types-core@npm:0.8.0" +"@subql/types-core@npm:^0.9.1": + version: 0.9.1 + resolution: "@subql/types-core@npm:0.9.1" dependencies: package-json-type: ^1.0.3 - checksum: 4523ab756a794cee0a40d7d107395c4cf3ab238457787babe8038a1f0a5ce2badabb8cfbd00d500142a567c037b470a4e0d54095e6be65440082a489e735449e + checksum: cb6ae7220f02e76f8a05bdb5572b2864c8686523c756aadbcd0f3aeab5099acd93eac1cba04a81e2cb02e5e07bd9569ec46565ba78bf1f6213cb2dc2476951f7 languageName: node linkType: hard -"@subql/types@npm:3.8.0": - version: 3.8.0 - resolution: "@subql/types@npm:3.8.0" +"@subql/types@npm:3.10.0": + version: 3.10.0 + resolution: "@subql/types@npm:3.10.0" dependencies: - "@subql/types-core": 0.9.0 + "@subql/types-core": 1.0.0 peerDependencies: "@polkadot/api": ^11 - checksum: 8268fd013ef4705c4bfa85c4102396cc0017b5add0bab09ec244e923e5015ff4498209435387f4423b0c1a5a43de240710706704997493ddecd1dc6b98e23b12 + checksum: 5d01a5afcb58e4e4d1a2d52ef6ac1816dec688224620a0226c28b9fd2b550c99baac9ed12623d17d7726f2560d6342bf64f8eccd0c51dd0959c6e50783be1361 languageName: node linkType: hard -"@subql/utils@npm:2.12.0": - version: 2.12.0 - resolution: "@subql/utils@npm:2.12.0" +"@subql/utils@npm:2.13.1": + version: 2.13.1 + resolution: "@subql/utils@npm:2.13.1" dependencies: "@polkadot/util": ^12.6.2 "@polkadot/util-crypto": ^12.6.2 @@ -2950,7 +2858,7 @@ __metadata: rotating-file-stream: ^3.0.2 semver: ^7.5.2 tar: ^6.2.1 - checksum: 8429de153814ce5d9f468b16395ccae572c3d53719f92c7104939c50ca12899805ebd31b5a65789efde87b390b465e6dcbb86ce6ec7e48864ff5bd8aa2ba5c4f + checksum: eab0f5d4933dc6c56bbadbd82235c37beeaa9789372187ff523e08b46b41ce39eff406cfd6dfb955e396e0183def56901ef52396fb5f778b1247762a7e95a439 languageName: node linkType: hard @@ -3256,13 +3164,6 @@ __metadata: languageName: node linkType: hard -"@types/long@npm:^4.0.1": - version: 4.0.2 - resolution: "@types/long@npm:4.0.2" - checksum: d16cde7240d834cf44ba1eaec49e78ae3180e724cd667052b194a372f350d024cba8dd3f37b0864931683dab09ca935d52f0c4c1687178af5ada9fc85b0635f4 - languageName: node - linkType: hard - "@types/mdast@npm:^3.0.0": version: 3.0.14 resolution: "@types/mdast@npm:3.0.14" @@ -3286,7 +3187,7 @@ __metadata: languageName: node linkType: hard -"@types/minimatch@npm:^3.0.3, @types/minimatch@npm:^3.0.4": +"@types/minimatch@npm:^3.0.3": version: 3.0.5 resolution: "@types/minimatch@npm:3.0.5" checksum: c41d136f67231c3131cf1d4ca0b06687f4a322918a3a5adddc87ce90ed9dbd175a3610adee36b106ae68c0b92c637c35e02b58c8a56c424f71d30993ea220b92 @@ -3310,7 +3211,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:>=13.7.0": +"@types/node@npm:*": version: 20.1.4 resolution: "@types/node@npm:20.1.4" checksum: bffa6a6e92831cc805b13658c55be8e04abe3202d5e57ddd7fee4cfbe269656a1f475909a9f9514e1aff50310d0d90c516ac2c649cb6f1c77d4b1079c2fd1e88 @@ -3824,13 +3725,12 @@ __metadata: languageName: node linkType: hard -"algosdk@npm:^2.2.0": - version: 2.3.0 - resolution: "algosdk@npm:2.3.0" +"algosdk@npm:^2.8.0": + version: 2.8.0 + resolution: "algosdk@npm:2.8.0" dependencies: algo-msgpack-with-bigint: ^2.1.1 buffer: ^6.0.3 - cross-fetch: ^3.1.5 hi-base32: ^0.5.1 js-sha256: ^0.9.0 js-sha3: ^0.8.0 @@ -3838,7 +3738,7 @@ __metadata: json-bigint: ^1.0.0 tweetnacl: ^1.0.3 vlq: ^2.0.4 - checksum: cbb31ff42b5320b263fbb56037f370c4008083f61b85d5465bdef8ca9ab8dfc3820cda2dbb3b4123ab98f939b81822ff5c789e8980ee4b5c9114603952290212 + checksum: 17c61f1bef36d5c91a2bcc44f66d285237780878bf951d6120c49954a8c88a0259dac06d271df5ba5dae923485e251fd47a107d32703740936d12505e0fd2d1e languageName: node linkType: hard @@ -3906,13 +3806,6 @@ __metadata: languageName: node linkType: hard -"any-signal@npm:^3.0.0": - version: 3.0.1 - resolution: "any-signal@npm:3.0.1" - checksum: 073eb14c365b7552f9f16fbf36cd76171e4a0fe156a8faa865fe1d5ac4ed2f5c5ab6e3faad0ac0d4c69511b5892971c5573baa8a1cbf85fe250d0c54ff0734ff - languageName: node - linkType: hard - "anymatch@npm:^3.0.3, anymatch@npm:~3.1.2": version: 3.1.3 resolution: "anymatch@npm:3.1.3" @@ -4100,17 +3993,6 @@ __metadata: languageName: node linkType: hard -"axios@npm:^1.3.4": - version: 1.4.0 - resolution: "axios@npm:1.4.0" - dependencies: - follow-redirects: ^1.15.0 - form-data: ^4.0.0 - proxy-from-env: ^1.1.0 - checksum: 7fb6a4313bae7f45e89d62c70a800913c303df653f19eafec88e56cea2e3821066b8409bc68be1930ecca80e861c52aa787659df0ffec6ad4d451c7816b9386b - languageName: node - linkType: hard - "babel-jest@npm:^29.7.0": version: 29.7.0 resolution: "babel-jest@npm:29.7.0" @@ -4283,15 +4165,6 @@ __metadata: languageName: node linkType: hard -"blob-to-it@npm:^1.0.1": - version: 1.0.4 - resolution: "blob-to-it@npm:1.0.4" - dependencies: - browser-readablestream-to-it: ^1.0.3 - checksum: e7fbebe5bd7b8187a4a88203639777456596a0cc68372e7b2dbcfbae6dea2b80e2a89522140039b538140bc3e3a6b1e90d1778e725eb8899070f799e61591751 - languageName: node - linkType: hard - "bn.js@npm:^5.2.1": version: 5.2.1 resolution: "bn.js@npm:5.2.1" @@ -4390,13 +4263,6 @@ __metadata: languageName: node linkType: hard -"browser-readablestream-to-it@npm:^1.0.0, browser-readablestream-to-it@npm:^1.0.1, browser-readablestream-to-it@npm:^1.0.3": - version: 1.0.3 - resolution: "browser-readablestream-to-it@npm:1.0.3" - checksum: 07895bbc54cdeea62c8e9b7e32d374ec5c340ed1d0bc0c6cd6f1e0561ad931b160a3988426c763672ddf38ac1f75e45b9d8ae267b43f387183edafcad625f30a - languageName: node - linkType: hard - "browserslist@npm:^4.21.3, browserslist@npm:^4.21.5": version: 4.21.5 resolution: "browserslist@npm:4.21.5" @@ -4460,7 +4326,7 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^6.0.1, buffer@npm:^6.0.3": +"buffer@npm:^6.0.3": version: 6.0.3 resolution: "buffer@npm:6.0.3" dependencies: @@ -4572,24 +4438,6 @@ __metadata: languageName: node linkType: hard -"cborg@npm:^1.5.4": - version: 1.10.1 - resolution: "cborg@npm:1.10.1" - bin: - cborg: cli.js - checksum: f4b3bc2065fdbd51ac0d60df859b53b621af0e69c5c82f60d318fc3e594f14fe6bd618b84077c00ff5aa698f229ec8223528087aea9bca9cbdb0d8e040bc18b1 - languageName: node - linkType: hard - -"cborg@npm:^1.6.0": - version: 1.10.2 - resolution: "cborg@npm:1.10.2" - bin: - cborg: cli.js - checksum: 7743a8f125046ac27fb371c4ea18af54fbe853f7210f1ffacc6504a79566480c39d52ac4fbc1a5b5155e27b13c3b58955dc29db1bf20c4d651549d55fec2fa7f - languageName: node - linkType: hard - "chalk@npm:^2.0.0, chalk@npm:^2.3.2, chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" @@ -5039,7 +4887,7 @@ __metadata: languageName: node linkType: hard -"cross-fetch@npm:^3.1.5, cross-fetch@npm:^3.1.6": +"cross-fetch@npm:^3.1.6": version: 3.1.6 resolution: "cross-fetch@npm:3.1.6" dependencies: @@ -5080,16 +4928,6 @@ __metadata: languageName: node linkType: hard -"dag-jose@npm:^1.0.0": - version: 1.0.0 - resolution: "dag-jose@npm:1.0.0" - dependencies: - "@ipld/dag-cbor": ^6.0.3 - multiformats: ^9.0.2 - checksum: 2d95e938f08c383718dd6f07d92063f164bb85be831f624f122687ca3f4d365a76320c3f6f16cfbe013c581198504728abd226567775ef35fb40176e1cb23112 - languageName: node - linkType: hard - "dayjs@npm:^1.10.7": version: 1.11.7 resolution: "dayjs@npm:1.11.7" @@ -5294,17 +5132,6 @@ __metadata: languageName: node linkType: hard -"dns-over-http-resolver@npm:^1.2.3": - version: 1.2.3 - resolution: "dns-over-http-resolver@npm:1.2.3" - dependencies: - debug: ^4.3.1 - native-fetch: ^3.0.0 - receptacle: ^1.3.2 - checksum: 3cc1a1d77fc43e7a8a12453da987b80860ac96dc1031386c5eb1a39154775a87cfa1d50c0eaa5ea5e397e898791654608f6e2acf03f750f4098ab8822bb7d928 - languageName: node - linkType: hard - "doctrine@npm:^2.1.0": version: 2.1.0 resolution: "doctrine@npm:2.1.0" @@ -5374,15 +5201,6 @@ __metadata: languageName: node linkType: hard -"electron-fetch@npm:^1.7.2": - version: 1.9.1 - resolution: "electron-fetch@npm:1.9.1" - dependencies: - encoding: ^0.1.13 - checksum: 33b5d363b9a234288e847237ef34536bd415f31cba3b1c69b2ae4679a2bae66fb7ded2b576b90a0b7cd240e3df71cf16f2b961d4ab82864df02b6b53cf49f05c - languageName: node - linkType: hard - "electron-to-chromium@npm:^1.4.284": version: 1.4.394 resolution: "electron-to-chromium@npm:1.4.394" @@ -5467,13 +5285,6 @@ __metadata: languageName: node linkType: hard -"err-code@npm:^3.0.1": - version: 3.0.1 - resolution: "err-code@npm:3.0.1" - checksum: aede1f1d5ebe6d6b30b5e3175e3cc13e67de2e2e1ad99ce4917e957d7b59e8451ed10ee37dbc6493521920a47082c479b9097e5c39438d4aff4cc84438568a5a - languageName: node - linkType: hard - "error-ex@npm:^1.3.1": version: 1.3.2 resolution: "error-ex@npm:1.3.2" @@ -5975,13 +5786,6 @@ __metadata: languageName: node linkType: hard -"fast-fifo@npm:^1.0.0": - version: 1.2.0 - resolution: "fast-fifo@npm:1.2.0" - checksum: 6a65f9ee015ae6aa96d590f02d755253329323afa2712a87fa945210a298d14763262a86a0872905bce639f54f99f149fb6a95c88153742928ddec10b9c852f6 - languageName: node - linkType: hard - "fast-glob@npm:^3.2.9": version: 3.2.12 resolution: "fast-glob@npm:3.2.12" @@ -6162,6 +5966,16 @@ __metadata: languageName: node linkType: hard +"foreground-child@npm:^3.1.0": + version: 3.2.1 + resolution: "foreground-child@npm:3.2.1" + dependencies: + cross-spawn: ^7.0.0 + signal-exit: ^4.0.1 + checksum: 3e2e844d6003c96d70affe8ae98d7eaaba269a868c14d997620c088340a8775cd5d2d9043e6ceebae1928d8d9a874911c4d664b9a267e8995945df20337aebc0 + languageName: node + linkType: hard + "form-data@npm:^3.0.0": version: 3.0.1 resolution: "form-data@npm:3.0.1" @@ -6312,13 +6126,6 @@ __metadata: languageName: node linkType: hard -"get-iterator@npm:^1.0.2": - version: 1.0.2 - resolution: "get-iterator@npm:1.0.2" - checksum: 4a819aa91ecb61f4fd507bd62e3468d55f642f06011f944c381a739a21f685c36a37feb9324c8971e7c0fc70ca172066c45874fa2d1dcdf4b4fb8e43f16058c2 - languageName: node - linkType: hard - "get-package-type@npm:^0.1.0": version: 0.1.0 resolution: "get-package-type@npm:0.1.0" @@ -6407,6 +6214,22 @@ __metadata: languageName: node linkType: hard +"glob@npm:^11.0.0": + version: 11.0.0 + resolution: "glob@npm:11.0.0" + dependencies: + foreground-child: ^3.1.0 + jackspeak: ^4.0.1 + minimatch: ^10.0.0 + minipass: ^7.1.2 + package-json-from-dist: ^1.0.0 + path-scurry: ^2.0.0 + bin: + glob: dist/esm/bin.mjs + checksum: 8a2dd914d5776987be5244624d9491bbcaf19f2387e06783737003ff696ebfd2264190c47014f8709c1c02d8bc892f17660cf986c587b107e194c0a3151ab333 + languageName: node + linkType: hard + "glob@npm:^7.1.3, glob@npm:^7.1.4": version: 7.2.3 resolution: "glob@npm:7.2.3" @@ -6841,24 +6664,6 @@ __metadata: languageName: node linkType: hard -"interface-datastore@npm:^6.0.2": - version: 6.1.1 - resolution: "interface-datastore@npm:6.1.1" - dependencies: - interface-store: ^2.0.2 - nanoid: ^3.0.2 - uint8arrays: ^3.0.0 - checksum: a0388adabf029be229bbfce326bbe64fd3353373512e7e6ed4283e06710bfa141db118e3536f8535a65016a0abeec631b888d42790b00637879d6ae56cf728cd - languageName: node - linkType: hard - -"interface-store@npm:^2.0.2": - version: 2.0.2 - resolution: "interface-store@npm:2.0.2" - checksum: 0e80adb1de9ff57687cfa1b08499702b72cacf33a7e0320ac7781989f3685d73f2a84996358f540250229afa19c7acebf03085087762f718035622ea6a1a5b8a - languageName: node - linkType: hard - "internal-slot@npm:^1.0.5": version: 1.0.5 resolution: "internal-slot@npm:1.0.5" @@ -6870,13 +6675,6 @@ __metadata: languageName: node linkType: hard -"ip-regex@npm:^4.0.0": - version: 4.3.0 - resolution: "ip-regex@npm:4.3.0" - checksum: 7ff904b891221b1847f3fdf3dbb3e6a8660dc39bc283f79eb7ed88f5338e1a3d1104b779bc83759159be266249c59c2160e779ee39446d79d4ed0890dfd06f08 - languageName: node - linkType: hard - "ip@npm:^2.0.0": version: 2.0.1 resolution: "ip@npm:2.0.1" @@ -6891,107 +6689,6 @@ __metadata: languageName: node linkType: hard -"ipfs-core-types@npm:^0.10.3": - version: 0.10.3 - resolution: "ipfs-core-types@npm:0.10.3" - dependencies: - "@ipld/dag-pb": ^2.1.3 - interface-datastore: ^6.0.2 - ipfs-unixfs: ^6.0.3 - multiaddr: ^10.0.0 - multiformats: ^9.5.1 - checksum: 2a36b0ac72b98011aed333b57253d87fd5888e9e102fa3dd8f9e2dcf1b5e8c8f5582fbe3957ec24a445cec207943ea4ce4cc839770a794b273fd8b66a7a0de9d - languageName: node - linkType: hard - -"ipfs-core-utils@npm:^0.14.3": - version: 0.14.3 - resolution: "ipfs-core-utils@npm:0.14.3" - dependencies: - any-signal: ^3.0.0 - blob-to-it: ^1.0.1 - browser-readablestream-to-it: ^1.0.1 - debug: ^4.1.1 - err-code: ^3.0.1 - ipfs-core-types: ^0.10.3 - ipfs-unixfs: ^6.0.3 - ipfs-utils: ^9.0.6 - it-all: ^1.0.4 - it-map: ^1.0.4 - it-peekable: ^1.0.2 - it-to-stream: ^1.0.0 - merge-options: ^3.0.4 - multiaddr: ^10.0.0 - multiaddr-to-uri: ^8.0.0 - multiformats: ^9.5.1 - nanoid: ^3.1.23 - parse-duration: ^1.0.0 - timeout-abort-controller: ^3.0.0 - uint8arrays: ^3.0.0 - checksum: ed1bceef0677e050a06db3cc0fdd659ffaac256d89fedfa01633747675c1519ba01985d5adf5db40d7d82631028c363564a2c53678b9a665c54c75d287065d08 - languageName: node - linkType: hard - -"ipfs-http-client@npm:56": - version: 56.0.3 - resolution: "ipfs-http-client@npm:56.0.3" - dependencies: - "@ipld/dag-cbor": ^7.0.0 - "@ipld/dag-json": ^8.0.1 - "@ipld/dag-pb": ^2.1.3 - any-signal: ^3.0.0 - dag-jose: ^1.0.0 - debug: ^4.1.1 - err-code: ^3.0.1 - ipfs-core-types: ^0.10.3 - ipfs-core-utils: ^0.14.3 - ipfs-utils: ^9.0.6 - it-first: ^1.0.6 - it-last: ^1.0.4 - merge-options: ^3.0.4 - multiaddr: ^10.0.0 - multiformats: ^9.5.1 - parse-duration: ^1.0.0 - stream-to-it: ^0.2.2 - uint8arrays: ^3.0.0 - checksum: d45fe955b368655ff37bbaeaa72eb968399cffb6ac1ae44bd7898d834259fbe8b2394b73626d2338cd753b57b4f99ebaa8e7dfbead887c73f36c0070185cd9d6 - languageName: node - linkType: hard - -"ipfs-unixfs@npm:^6.0.3": - version: 6.0.9 - resolution: "ipfs-unixfs@npm:6.0.9" - dependencies: - err-code: ^3.0.1 - protobufjs: ^6.10.2 - checksum: 025d852c3cfb09b813b35f7a4f7a06bd0ff904f88b35cdf54c6ea1eb021f1597ab9c2739adabbae9cfe645a2323598bd7974ff4a8898701bc4ba92842bf21736 - languageName: node - linkType: hard - -"ipfs-utils@npm:^9.0.6": - version: 9.0.14 - resolution: "ipfs-utils@npm:9.0.14" - dependencies: - any-signal: ^3.0.0 - browser-readablestream-to-it: ^1.0.0 - buffer: ^6.0.1 - electron-fetch: ^1.7.2 - err-code: ^3.0.1 - is-electron: ^2.2.0 - iso-url: ^1.1.5 - it-all: ^1.0.4 - it-glob: ^1.0.1 - it-to-stream: ^1.0.0 - merge-options: ^3.0.4 - nanoid: ^3.1.20 - native-fetch: ^3.0.0 - node-fetch: ^2.6.8 - react-native-fetch-api: ^3.0.0 - stream-to-it: ^0.2.2 - checksum: 08108e03ea7b90e0fa11b76a4e24bd29d7e027c603494b53c1cc37b367fb559eaeea7b0f10b2e83ee419d50cdcb4d8105febdf185cab75c7e55afd4c8ed51aba - languageName: node - linkType: hard - "is-alphabetical@npm:^1.0.0": version: 1.0.4 resolution: "is-alphabetical@npm:1.0.4" @@ -7114,13 +6811,6 @@ __metadata: languageName: node linkType: hard -"is-electron@npm:^2.2.0": - version: 2.2.2 - resolution: "is-electron@npm:2.2.2" - checksum: de5aa8bd8d72c96675b8d0f93fab4cc21f62be5440f65bc05c61338ca27bd851a64200f31f1bf9facbaa01b3dbfed7997b2186741d84b93b63e0aff1db6a9494 - languageName: node - linkType: hard - "is-extglob@npm:^2.1.1": version: 2.1.1 resolution: "is-extglob@npm:2.1.1" @@ -7182,15 +6872,6 @@ __metadata: languageName: node linkType: hard -"is-ip@npm:^3.1.0": - version: 3.1.0 - resolution: "is-ip@npm:3.1.0" - dependencies: - ip-regex: ^4.0.0 - checksum: da2c2b282407194adf2320bade0bad94be9c9d0bdab85ff45b1b62d8185f31c65dff3884519d57bf270277e5ea2046c7916a6e5a6db22fe4b7ddcdd3760f23eb - languageName: node - linkType: hard - "is-lambda@npm:^1.0.1": version: 1.0.1 resolution: "is-lambda@npm:1.0.1" @@ -7242,7 +6923,7 @@ __metadata: languageName: node linkType: hard -"is-plain-obj@npm:^2.0.0, is-plain-obj@npm:^2.1.0": +"is-plain-obj@npm:^2.0.0": version: 2.1.0 resolution: "is-plain-obj@npm:2.1.0" checksum: cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa @@ -7375,13 +7056,6 @@ __metadata: languageName: node linkType: hard -"iso-url@npm:^1.1.5": - version: 1.2.1 - resolution: "iso-url@npm:1.2.1" - checksum: 1af98c4ed6a39598407fd8c3c13e997c978985f477af2be3390d2aa3e422b4b5992ffbb0dac68656b165c71850fff748ac1309d29d4f2a728707d76bf0f98557 - languageName: node - linkType: hard - "istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": version: 3.2.0 resolution: "istanbul-lib-coverage@npm:3.2.0" @@ -7447,65 +7121,6 @@ __metadata: languageName: node linkType: hard -"it-all@npm:^1.0.4": - version: 1.0.6 - resolution: "it-all@npm:1.0.6" - checksum: 7ca9a528c08ebe2fc8a3c93a41409219d18325ed31fedb9834ebac2822f0b2a96d7abcb6cbfa092114ab4d5f08951e694c7a2c3929ce4b5300769e710ae665db - languageName: node - linkType: hard - -"it-first@npm:^1.0.6": - version: 1.0.7 - resolution: "it-first@npm:1.0.7" - checksum: 0c9106d29120f02e68a08118de328437fb44c966385635d672684d4f0321ee22ca470a30f390132bdb454da0d4d3abb82c796dad8e391a827f1a3446711c7685 - languageName: node - linkType: hard - -"it-glob@npm:^1.0.1": - version: 1.0.2 - resolution: "it-glob@npm:1.0.2" - dependencies: - "@types/minimatch": ^3.0.4 - minimatch: ^3.0.4 - checksum: 629e7b66510006041df98882acfd73ac785836d51fc3ffa5c83c7099f931b3287a64c5a3772e7c1e46b63f1d511a9222f5b637c50f1c738222b46d104ff2e91c - languageName: node - linkType: hard - -"it-last@npm:^1.0.4": - version: 1.0.6 - resolution: "it-last@npm:1.0.6" - checksum: bc7b68ddd6cae902f0095d0c7ccb0078abdfa41fbf55862a9df9e30ae74be08282b5b3d21f40e6103af0d202144974e216d3c44f3e8f93c2c3f890322b02fcfa - languageName: node - linkType: hard - -"it-map@npm:^1.0.4": - version: 1.0.6 - resolution: "it-map@npm:1.0.6" - checksum: 5eb9da69e5d58624c79cea13dd8eeffe8a1ab6a28a527ac4d0301304279ffbe8da94faf50aa269e2a1630c94dc30a6bfe7a135bfb0c7e887216efad7c41a9f52 - languageName: node - linkType: hard - -"it-peekable@npm:^1.0.2": - version: 1.0.3 - resolution: "it-peekable@npm:1.0.3" - checksum: 6e9d68cbf582e301f191b8ad2660957c12c8100804a298fd5732ee35f2dd466a6af64d88d91343f2614675b4d4fb546618335303e9356659a9a0868c08b1ca54 - languageName: node - linkType: hard - -"it-to-stream@npm:^1.0.0": - version: 1.0.0 - resolution: "it-to-stream@npm:1.0.0" - dependencies: - buffer: ^6.0.3 - fast-fifo: ^1.0.0 - get-iterator: ^1.0.2 - p-defer: ^3.0.0 - p-fifo: ^1.0.0 - readable-stream: ^3.6.0 - checksum: e0c5a3f3c90d4bc52686217865b8fa202f64bd3af493dec0fdacd58b4237166fb68935ff2823ed0a16414ba5becb9a5fb8c98f3ec99584789776d7277c1d129f - languageName: node - linkType: hard - "iterare@npm:1.2.1": version: 1.2.1 resolution: "iterare@npm:1.2.1" @@ -7513,6 +7128,19 @@ __metadata: languageName: node linkType: hard +"jackspeak@npm:^4.0.1": + version: 4.0.1 + resolution: "jackspeak@npm:4.0.1" + dependencies: + "@isaacs/cliui": ^8.0.2 + "@pkgjs/parseargs": ^0.11.0 + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 7989d19eddeff0631ef653df413e26290db77dc3791438bd12b56bed1c0b24d5d535fdfec13cf35775cd5b47f8ee57d36fd0bceaf2df672b1f523533fd4184cc + languageName: node + linkType: hard + "jest-changed-files@npm:^29.7.0": version: 29.7.0 resolution: "jest-changed-files@npm:29.7.0" @@ -8348,13 +7976,6 @@ __metadata: languageName: node linkType: hard -"long@npm:^4.0.0": - version: 4.0.0 - resolution: "long@npm:4.0.0" - checksum: 16afbe8f749c7c849db1f4de4e2e6a31ac6e617cead3bdc4f9605cb703cd20e1e9fc1a7baba674ffcca57d660a6e5b53a9e236d7b25a295d3855cca79cc06744 - languageName: node - linkType: hard - "longest-streak@npm:^2.0.0": version: 2.0.4 resolution: "longest-streak@npm:2.0.4" @@ -8394,6 +8015,13 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^11.0.0": + version: 11.0.0 + resolution: "lru-cache@npm:11.0.0" + checksum: c29385f9369b1a566e1db9eda9a4b12f6507de906e5720ca12844dd775b7139c42b8e5837e7d5162bcc292ce4d3eecfa74ec2856c6afcc0caa2e3c9ea3a17f27 + languageName: node + linkType: hard + "lru-cache@npm:^5.1.1": version: 5.1.1 resolution: "lru-cache@npm:5.1.1" @@ -8539,15 +8167,6 @@ __metadata: languageName: node linkType: hard -"merge-options@npm:^3.0.4": - version: 3.0.4 - resolution: "merge-options@npm:3.0.4" - dependencies: - is-plain-obj: ^2.1.0 - checksum: d86ddb3dd6e85d558dbf25dc944f3527b6bacb944db3fdda6e84a3f59c4e4b85231095f58b835758b9a57708342dee0f8de0dffa352974a48221487fe9f4584f - languageName: node - linkType: hard - "merge-stream@npm:^2.0.0": version: 2.0.0 resolution: "merge-stream@npm:2.0.0" @@ -8637,6 +8256,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^10.0.0": + version: 10.0.1 + resolution: "minimatch@npm:10.0.1" + dependencies: + brace-expansion: ^2.0.1 + checksum: f5b63c2f30606091a057c5f679b067f84a2cd0ffbd2dbc9143bda850afd353c7be81949ff11ae0c86988f07390eeca64efd7143ee05a0dab37f6c6b38a2ebb6c + languageName: node + linkType: hard + "minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -8736,6 +8364,13 @@ __metadata: languageName: node linkType: hard +"minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 2bfd325b95c555f2b4d2814d49325691c7bee937d753814861b0b49d5edcda55cbbf22b6b6a60bb91eddac8668771f03c5ff647dcd9d0f798e9548b9cdc46ee3 + languageName: node + linkType: hard + "minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": version: 2.1.2 resolution: "minizlib@npm:2.1.2" @@ -8825,36 +8460,6 @@ __metadata: languageName: node linkType: hard -"multiaddr-to-uri@npm:^8.0.0": - version: 8.0.0 - resolution: "multiaddr-to-uri@npm:8.0.0" - dependencies: - multiaddr: ^10.0.0 - checksum: c70d1f4d98d4eee6f7e47e4bd5b3aeae8394339c455bed3cccfc38a11aa7f61681b5cdfa02f338687d2181526318f66d00c370dca6bf633955be6bfd87cb833d - languageName: node - linkType: hard - -"multiaddr@npm:^10.0.0": - version: 10.0.1 - resolution: "multiaddr@npm:10.0.1" - dependencies: - dns-over-http-resolver: ^1.2.3 - err-code: ^3.0.1 - is-ip: ^3.1.0 - multiformats: ^9.4.5 - uint8arrays: ^3.0.0 - varint: ^6.0.0 - checksum: d53aaf7efd52ee5e6413ef36ececd29239ceb5c1f048c1fa9b820442226dc232067312d25e509a2571a14047465fb934dd35029c7f3166f4d02d13e3c501925d - languageName: node - linkType: hard - -"multiformats@npm:^9.0.2, multiformats@npm:^9.4.2, multiformats@npm:^9.4.5, multiformats@npm:^9.5.1, multiformats@npm:^9.5.4": - version: 9.9.0 - resolution: "multiformats@npm:9.9.0" - checksum: d3e8c1be400c09a014f557ea02251a2710dbc9fca5aa32cc702ff29f636c5471e17979f30bdcb0a9cbb556f162a8591dc2e1219c24fc21394a56115b820bb84e - languageName: node - linkType: hard - "multimatch@npm:^4.0.0": version: 4.0.0 resolution: "multimatch@npm:4.0.0" @@ -8868,24 +8473,6 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:^3.0.2, nanoid@npm:^3.1.20, nanoid@npm:^3.1.23": - version: 3.3.6 - resolution: "nanoid@npm:3.3.6" - bin: - nanoid: bin/nanoid.cjs - checksum: 7d0eda657002738aa5206107bd0580aead6c95c460ef1bdd0b1a87a9c7ae6277ac2e9b945306aaa5b32c6dcb7feaf462d0f552e7f8b5718abfc6ead5c94a71b3 - languageName: node - linkType: hard - -"native-fetch@npm:^3.0.0": - version: 3.0.0 - resolution: "native-fetch@npm:3.0.0" - peerDependencies: - node-fetch: "*" - checksum: eec8cc78d6da4d0f3f56055e3e557473ac86dd35fd40053ea268d644af7b20babc891d2b53ef821b77ed2428265f60b85e49d754c555de89bfa071a743b853bb - languageName: node - linkType: hard - "natural-compare-lite@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare-lite@npm:1.4.0" @@ -9196,23 +8783,6 @@ __metadata: languageName: node linkType: hard -"p-defer@npm:^3.0.0": - version: 3.0.0 - resolution: "p-defer@npm:3.0.0" - checksum: ac3b0976a1c76b67cca1a34e00f7299b0cc230891f820749686aa84f8947326bbe0f8e3b7d9ca511578ee06f0c1a6e0ff68c8e9c325eac455f09d99f91697161 - languageName: node - linkType: hard - -"p-fifo@npm:^1.0.0": - version: 1.0.0 - resolution: "p-fifo@npm:1.0.0" - dependencies: - fast-fifo: ^1.0.0 - p-defer: ^3.0.0 - checksum: 4cdce44ff8266351014a460705a804c02760e5b721a018dbef6fae7d25caf83af2e343be58810297473383c1783bb7048388cb5c22938b3f904818531bc44ee7 - languageName: node - linkType: hard - "p-limit@npm:^1.1.0": version: 1.3.0 resolution: "p-limit@npm:1.3.0" @@ -9290,6 +8860,13 @@ __metadata: languageName: node linkType: hard +"package-json-from-dist@npm:^1.0.0": + version: 1.0.0 + resolution: "package-json-from-dist@npm:1.0.0" + checksum: ac706ec856a5a03f5261e4e48fa974f24feb044d51f84f8332e2af0af04fbdbdd5bbbfb9cbbe354190409bc8307c83a9e38c6672c3c8855f709afb0006a009ea + languageName: node + linkType: hard + "package-json-type@npm:^1.0.3": version: 1.0.3 resolution: "package-json-type@npm:1.0.3" @@ -9318,13 +8895,6 @@ __metadata: languageName: node linkType: hard -"parse-duration@npm:^1.0.0": - version: 1.0.3 - resolution: "parse-duration@npm:1.0.3" - checksum: 3302572593be6725de06aadb9e8c99ff25cff063b8cf536f54e0fc39e5533c8c5e0979f420618ff2923041076bdc1980f7cc3a642852b008d5ee96234c8c2bd2 - languageName: node - linkType: hard - "parse-entities@npm:^2.0.0": version: 2.0.0 resolution: "parse-entities@npm:2.0.0" @@ -9427,6 +8997,16 @@ __metadata: languageName: node linkType: hard +"path-scurry@npm:^2.0.0": + version: 2.0.0 + resolution: "path-scurry@npm:2.0.0" + dependencies: + lru-cache: ^11.0.0 + minipass: ^7.1.2 + checksum: 9953ce3857f7e0796b187a7066eede63864b7e1dfc14bf0484249801a5ab9afb90d9a58fc533ebb1b552d23767df8aa6a2c6c62caf3f8a65f6ce336a97bbb484 + languageName: node + linkType: hard + "path-to-regexp@npm:0.1.7": version: 0.1.7 resolution: "path-to-regexp@npm:0.1.7" @@ -9786,30 +9366,6 @@ __metadata: languageName: node linkType: hard -"protobufjs@npm:^6.10.2": - version: 6.11.4 - resolution: "protobufjs@npm:6.11.4" - dependencies: - "@protobufjs/aspromise": ^1.1.2 - "@protobufjs/base64": ^1.1.2 - "@protobufjs/codegen": ^2.0.4 - "@protobufjs/eventemitter": ^1.1.0 - "@protobufjs/fetch": ^1.1.0 - "@protobufjs/float": ^1.0.2 - "@protobufjs/inquire": ^1.1.0 - "@protobufjs/path": ^1.1.2 - "@protobufjs/pool": ^1.1.0 - "@protobufjs/utf8": ^1.1.0 - "@types/long": ^4.0.1 - "@types/node": ">=13.7.0" - long: ^4.0.0 - bin: - pbjs: bin/pbjs - pbts: bin/pbts - checksum: b2fc6a01897b016c2a7e43a854ab4a3c57080f61be41e552235436e7a730711b8e89e47cb4ae52f0f065b5ab5d5989fc932f390337ce3a8ccf07203415700850 - languageName: node - linkType: hard - "protocols@npm:^1.4.0": version: 1.4.8 resolution: "protocols@npm:1.4.8" @@ -9991,15 +9547,6 @@ __metadata: languageName: node linkType: hard -"react-native-fetch-api@npm:^3.0.0": - version: 3.0.0 - resolution: "react-native-fetch-api@npm:3.0.0" - dependencies: - p-defer: ^3.0.0 - checksum: f10f435060551c470711ba0b3663e3d49c7701aae84ea645d66992d756b13e923fb5762b324d3583d85c1c0def4138b9cc3f686bab1c1bc10d3ad82dc7175c99 - languageName: node - linkType: hard - "readable-stream@npm:^2.2.2": version: 2.3.8 resolution: "readable-stream@npm:2.3.8" @@ -10035,15 +9582,6 @@ __metadata: languageName: node linkType: hard -"receptacle@npm:^1.3.2": - version: 1.3.2 - resolution: "receptacle@npm:1.3.2" - dependencies: - ms: ^2.1.1 - checksum: 7c5011f19e6ddcb759c1e6756877cee3c9eb78fbd1278eca4572d75f74993f0ccdc1e5f7761de6e682dff5344ee94f7a69bc492e2e8eb81d8777774a2399ce9c - languageName: node - linkType: hard - "reflect-metadata@npm:^0.1.13": version: 0.1.13 resolution: "reflect-metadata@npm:0.1.13" @@ -10258,13 +9796,6 @@ __metadata: languageName: node linkType: hard -"retimer@npm:^3.0.0": - version: 3.0.0 - resolution: "retimer@npm:3.0.0" - checksum: f88309196e9d4f2d4be0c76eafc27a9f102c74b40b391ce730785b052c345d7bd59c3e4411a4c422f89f19a42b97b28034639e2f06c63133a06ec8958e9e7516 - languageName: node - linkType: hard - "retry-as-promised@npm:^7.0.3": version: 7.0.4 resolution: "retry-as-promised@npm:7.0.4" @@ -10304,6 +9835,18 @@ __metadata: languageName: node linkType: hard +"rimraf@npm:^6.0.1": + version: 6.0.1 + resolution: "rimraf@npm:6.0.1" + dependencies: + glob: ^11.0.0 + package-json-from-dist: ^1.0.0 + bin: + rimraf: dist/esm/bin.mjs + checksum: 8ba5b84131c1344e9417cb7e8c05d8368bb73cbe5dd4c1d5eb49fc0b558209781658d18c450460e30607d0b7865bb067482839a2f343b186b07ae87715837e66 + languageName: node + linkType: hard + "rotating-file-stream@npm:^3.0.2": version: 3.1.0 resolution: "rotating-file-stream@npm:3.1.0" @@ -10527,6 +10070,13 @@ __metadata: languageName: node linkType: hard +"signal-exit@npm:^4.0.1": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 64c757b498cb8629ffa5f75485340594d2f8189e9b08700e69199069c8e3070fb3e255f7ab873c05dc0b3cec412aea7402e10a5990cb6a050bd33ba062a6c549 + languageName: node + linkType: hard + "signale@npm:^1.4.0": version: 1.4.0 resolution: "signale@npm:1.4.0" @@ -10710,15 +10260,6 @@ __metadata: languageName: node linkType: hard -"stream-to-it@npm:^0.2.2": - version: 0.2.4 - resolution: "stream-to-it@npm:0.2.4" - dependencies: - get-iterator: ^1.0.2 - checksum: 0725dd8ddb889829cab70b81a883d5a09cd34272ccd44fad195de9fb900a8588fbf801490b6418ae5e234c128743ad829c50cfcd6686fab3b50bb6e76d59238c - languageName: node - linkType: hard - "streamsearch@npm:^1.1.0": version: 1.1.0 resolution: "streamsearch@npm:1.1.0" @@ -10750,7 +10291,7 @@ __metadata: languageName: node linkType: hard -"string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.0.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.2, string-width@npm:^4.2.3": +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.0.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.2, string-width@npm:^4.2.3": version: 4.2.3 resolution: "string-width@npm:4.2.3" dependencies: @@ -10761,7 +10302,7 @@ __metadata: languageName: node linkType: hard -"string-width@npm:^5.0.0": +"string-width@npm:^5.0.0, string-width@npm:^5.0.1, string-width@npm:^5.1.2": version: 5.1.2 resolution: "string-width@npm:5.1.2" dependencies: @@ -10823,7 +10364,7 @@ __metadata: languageName: node linkType: hard -"strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": version: 6.0.1 resolution: "strip-ansi@npm:6.0.1" dependencies: @@ -11046,15 +10587,6 @@ __metadata: languageName: node linkType: hard -"timeout-abort-controller@npm:^3.0.0": - version: 3.0.0 - resolution: "timeout-abort-controller@npm:3.0.0" - dependencies: - retimer: ^3.0.0 - checksum: c74387e6472a1e151d89b4af8c2a18ac72d566f3cd6ec9b203e3cda969fb5c54acba0a8d20cda8e9772efda52e27bea59c3423bab785b65f0287c9419184607e - languageName: node - linkType: hard - "tmpl@npm:1.0.5": version: 1.0.5 resolution: "tmpl@npm:1.0.5" @@ -11397,15 +10929,6 @@ __metadata: languageName: node linkType: hard -"uint8arrays@npm:^3.0.0": - version: 3.1.1 - resolution: "uint8arrays@npm:3.1.1" - dependencies: - multiformats: ^9.4.2 - checksum: b93b6c3f0a526b116799f3a3409bd4b5d5553eb3e73e485998ece7974742254fbc0d2f7988dd21ac86c4b974552f45d9ae9cf9cba9647e529f8eb1fdd2ed84d0 - languageName: node - linkType: hard - "unbox-primitive@npm:^1.0.2": version: 1.0.2 resolution: "unbox-primitive@npm:1.0.2" @@ -11756,13 +11279,6 @@ __metadata: languageName: node linkType: hard -"varint@npm:^6.0.0": - version: 6.0.0 - resolution: "varint@npm:6.0.0" - checksum: 7684113c9d497c01e40396e50169c502eb2176203219b96e1c5ac965a3e15b4892bd22b7e48d87148e10fffe638130516b6dbeedd0efde2b2d0395aa1772eea7 - languageName: node - linkType: hard - "vary@npm:^1, vary@npm:~1.1.2": version: 1.1.2 resolution: "vary@npm:1.1.2" @@ -11918,6 +11434,17 @@ __metadata: languageName: node linkType: hard +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: ^4.0.0 + string-width: ^4.1.0 + strip-ansi: ^6.0.0 + checksum: a790b846fd4505de962ba728a21aaeda189b8ee1c7568ca5e817d85930e06ef8d1689d49dbf0e881e8ef84436af3a88bc49115c2e2788d841ff1b8b5b51a608b + languageName: node + linkType: hard + "wrap-ansi@npm:^6.2.0": version: 6.2.0 resolution: "wrap-ansi@npm:6.2.0" @@ -11929,14 +11456,14 @@ __metadata: languageName: node linkType: hard -"wrap-ansi@npm:^7.0.0": - version: 7.0.0 - resolution: "wrap-ansi@npm:7.0.0" +"wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" dependencies: - ansi-styles: ^4.0.0 - string-width: ^4.1.0 - strip-ansi: ^6.0.0 - checksum: a790b846fd4505de962ba728a21aaeda189b8ee1c7568ca5e817d85930e06ef8d1689d49dbf0e881e8ef84436af3a88bc49115c2e2788d841ff1b8b5b51a608b + ansi-styles: ^6.1.0 + string-width: ^5.0.1 + strip-ansi: ^7.0.1 + checksum: 371733296dc2d616900ce15a0049dca0ef67597d6394c57347ba334393599e800bab03c41d4d45221b6bc967b8c453ec3ae4749eff3894202d16800fdfe0e238 languageName: node linkType: hard