Skip to content

Commit

Permalink
feat: port to ES modules (#478)
Browse files Browse the repository at this point in the history
* initial browser support

* add package link script

* port api-common

* port api-database

* port api-development

* port api-http

* port api-sync

* port api-transaction-pool

* port api

* port bootstrap

* port cli

* port configuration-generator

* port consensus

* port webhooks

* port validator

* port validator-set-vote-weighted

* port validator-set-static

* port validation

* port utils

* port transactions

* port transaction-pool

* port test-framework

* port state

* port serializer

* port proposer

* port processor

* port p2p

* port networking-ntp

* port networking-dns

* port logger-winston

* port logger-pino

* port kernel

* port fees

* port fees-static

* port fees-managed

* port fees-burn

* port database

* port crypto-worker

* port crypto-wif

* port crypto-validation

* port crypto-transaction

* port crypto-transaction-vote

* port crypto-transaction-validator-resignation

* port crypto-transaction-validator-registration

* port crypto-transaction-username-resignation

* port crypto-transaction-username-registration

* port crypto-transaction-transfer

* port crypto-transaction-multi-signature-registration

* port crypto-transaction-multi-payment

* port crypto-signature-schnorr

* port crypto-signature-schnorr-secp256k1

* port crypto-signature-ed25519

* port crypto-signature-ecdsa

* port crypto-signature-bls12-381

* port crypto-messages

* port crypto-key-pair-schnorr

* port crypto-key-pair-ed25519

* port crypto-key-pair-ecdsa

* port crypto-key-pair-bls12-381

* port crypto-hash-wasm

* port crypto-hash-noble

* port crypto-hash-bcrypto

* port crypto-consensus-bls12-381

* port crypto-config

* port crypto-commit

* port crypto-block

* port crypto-address-ss58

* port crypto-address-keccak256

* port crypto-address-bech32m

* port crypto-address-bech32

* port crypto-address-base58

* port core

* port contracts

* port container

* update tsconfig to nodenext

* fix kleur/color

* update core/bin/run.js

* command fixes

* lmdb import fixes

* p2p fixes

* ajv fix

* get __dirname

* update pnpm-lock.yaml

* remove unused @pm2/io dependency

* replace fileURLToPath

* use filesystem service inside kernel

* cleanup

* update TypeScript to 5.4.2

* move __dirname into local scope

* replace fast-memoize with memoizee

* test-runner packacge

* re-export test-runner

* tests: utils

* tests: validation

* tests: crypto-config

* tests: container

* tests: kernel

* tests: transactions

* style: resolve style guide violations

* fix more tests

* fix transaction dependency lookup

* fix p2p tests

* more fixes

* fix cli and configuration-generator

* cli fixes

* kernel fixes

* transaction-pool

* all pass

* commit dirty

* style: resolve style guide violations

* fix api-http integration tests

* fix deps:check

* runtime fixes

---------

Co-authored-by: oXtxNt9U <[email protected]>
Co-authored-by: sebastijankuzner <[email protected]>
  • Loading branch information
3 people authored Mar 13, 2024
1 parent a699d1f commit e4fc997
Show file tree
Hide file tree
Showing 1,375 changed files with 3,988 additions and 3,539 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ jobs:
run: cd packages/serializer && pnpm run test
- name: Test state
run: cd packages/state && pnpm run test
- name: Test test-runner
run: cd packages/test-runner && pnpm run test
- name: Test test-framework
run: cd packages/test-framework && pnpm run test
- name: Test transaction-pool
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
},
"devDependencies": {
"@types/node": "20.11.16",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"c8": "^9.1.0",
"cross-env": "^7.0.3",
"del-cli": "^5.1.0",
Expand All @@ -61,7 +61,7 @@
"sort-package-json": "^2.7.0",
"tsm": "^2.3.0",
"typedoc": "^0.25.7",
"typescript": "5.3.3",
"typescript": "5.4.2",
"typesync": "^0.12.1",
"yaml": "^2.3.4"
}
Expand Down
1 change: 1 addition & 0 deletions packages/api-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Common API building blocks for the Mainsail blockchain",
"license": "GPL-3.0-only",
"contributors": [],
"type": "module",
"main": "distribution/index.js",
"types": "distribution/index.d.ts",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/api-common/source/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Hapi from "@hapi/hapi";
import { inject, injectable } from "@mainsail/container";
import { Contracts, Identifiers } from "@mainsail/contracts";

import { SchemaObject } from "./schemas";
import { SchemaObject } from "./schemas.js";

@injectable()
export abstract class AbstractController {
Expand Down
10 changes: 5 additions & 5 deletions packages/api-common/source/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from "./controller";
export * as Plugins from "./plugins";
export * as Schemas from "./schemas";
export * from "./server";
export * from "./service-provider";
export * from "./controller.js";
export * as Plugins from "./plugins/index.js";
export * as Schemas from "./schemas.js";
export * from "./server.js";
export * from "./service-provider.js";
12 changes: 6 additions & 6 deletions packages/api-common/source/plugins/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export { commaArrayQuery } from "./comma-separated-query";
export { dotSeparatedQuery } from "./dot-separated-query";
export { pagination } from "./pagination";
export { rateLimit } from "./rate-limit";
export { responseHeaders } from "./response-headers";
export { whitelist } from "./whitelist";
export { commaArrayQuery } from "./comma-separated-query.js";
export { dotSeparatedQuery } from "./dot-separated-query.js";
export { pagination } from "./pagination/index.js";
export { rateLimit } from "./rate-limit.js";
export { responseHeaders } from "./response-headers.js";
export { whitelist } from "./whitelist.js";
6 changes: 3 additions & 3 deletions packages/api-common/source/plugins/pagination/extension.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Based on https://github.com/fknop/hapi-pagination

import Hoek from "@hapi/hoek";
import { applyToDefaults, assert } from "@hapi/hoek";
import { Utils } from "@mainsail/kernel";
import Qs from "querystring";

Expand Down Expand Up @@ -50,7 +50,7 @@ export class Extension {
const { source } = request.response;
const results = Array.isArray(source) ? source : source.results;

Hoek.assert(Array.isArray(results), "The results must be an array");
assert(Array.isArray(results), "The results must be an array");

// strip prefix in baseUri, we want a "clean" relative path
const baseUri = request.url.pathname.slice(this.routePathPrefix.length) + "?";
Expand All @@ -69,7 +69,7 @@ export class Extension {
const getUri = (page: number | null): string | null =>
/* istanbul ignore next */
// tslint:disable-next-line: no-null-keyword
page ? baseUri + Qs.stringify(Hoek.applyToDefaults({ ...query, ...request.orig.query }, { page })) : null;
page ? baseUri + Qs.stringify(applyToDefaults({ ...query, ...request.orig.query }, { page })) : null;

Check warning on line 72 in packages/api-common/source/plugins/pagination/extension.ts

View workflow job for this annotation

GitHub Actions / source (20.x)

Use destructured variables over properties

Check warning on line 72 in packages/api-common/source/plugins/pagination/extension.ts

View workflow job for this annotation

GitHub Actions / source (20.x)

Use `undefined` instead of `null`

const newSource = {
data: results,
Expand Down
4 changes: 2 additions & 2 deletions packages/api-common/source/plugins/pagination/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Based on https://github.com/fknop/hapi-pagination

import { getConfig } from "./config";
import { Extension } from "./extension";
import { getConfig } from "./config.js";
import { Extension } from "./extension.js";

export const pagination = {
name: "hapi-pagination",
Expand Down
2 changes: 1 addition & 1 deletion packages/api-common/source/plugins/rate-limit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Hapi from "@hapi/hapi";
import mm from "nanomatch";
import { RateLimiterMemory, RateLimiterRes, RLWrapperBlackAndWhite } from "rate-limiter-flexible";

import { getIp } from "../utils";
import { getIp } from "../utils/index.js";

type RateLimitPluginData = {
remaining: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/api-common/source/plugins/whitelist.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Boom from "@hapi/boom";
import { Utils } from "@mainsail/kernel";

import { getIp } from "../utils";
import { getIp } from "../utils/index.js";

export const whitelist = {
name: "whitelist",
Expand Down
3 changes: 2 additions & 1 deletion packages/api-common/source/schemas.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Joi from "joi";
import { describe } from "../../test-framework";

import { describe } from "../../test-framework/source";
import * as schemas from "./schemas";

describe<{}>("Schemas", ({ it, assert }) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/api-common/source/service-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Contracts } from "@mainsail/contracts";
import { Providers } from "@mainsail/kernel";
import Joi from "joi";

import { AbstractServer } from "./server";
import { AbstractServer } from "./server.js";

export type ServerConstructor<T extends AbstractServer> = new (...arguments_: any[]) => T;
export abstract class AbstractServiceProvider<T extends AbstractServer> extends Providers.ServiceProvider {
Expand Down
2 changes: 1 addition & 1 deletion packages/api-common/source/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./get-ip";
export * from "./get-ip.js";
1 change: 1 addition & 0 deletions packages/api-database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "API database for the Mainsail blockchain",
"license": "GPL-3.0-only",
"contributors": [],
"type": "module",
"main": "distribution/index.js",
"types": "distribution/index.d.ts",
"files": [
Expand Down
8 changes: 4 additions & 4 deletions packages/api-database/source/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import {
TransactionType,
ValidatorRound,
Wallet,
} from "./models";
import type { ExtendedRepository } from "./repositories/repository-extension";
import type { Criteria, Options, Pagination, ResultsPage, Sorting } from "./search";
} from "./models/index.js";
import type { ExtendedRepository } from "./repositories/repository-extension.js";
import type { Criteria, Options, Pagination, ResultsPage, Sorting } from "./search/index.js";

export type RepositoryDataSource = DataSource | EntityManager;

Expand Down Expand Up @@ -128,7 +128,7 @@ export type StateRepositoryFactory = (customDataSource?: RepositoryDataSource) =
export type WalletRepositoryFactory = (customDataSource?: RepositoryDataSource) => WalletRepository;

export { Entity, Repository } from "typeorm";
export { PostgresConnectionOptions } from "typeorm/driver/postgres/PostgresConnectionOptions";
export { PostgresConnectionOptions } from "typeorm/driver/postgres/PostgresConnectionOptions.js";

export interface Migrations {
run(): Promise<void>;
Expand Down
12 changes: 6 additions & 6 deletions packages/api-database/source/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * as Contracts from "./contracts";
export * from "./identifiers";
export * as Models from "./models";
export * as Repositories from "./repositories";
export * as Search from "./search";
export * from "./service-provider";
export * as Contracts from "./contracts.js";
export * from "./identifiers.js";
export * as Models from "./models/index.js";
export * as Repositories from "./repositories/index.js";
export * as Search from "./search/index.js";
export * from "./service-provider.js";
4 changes: 2 additions & 2 deletions packages/api-database/source/migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { inject, injectable } from "@mainsail/container";
import { Contracts, Identifiers } from "@mainsail/contracts";
import { DataSource, QueryFailedError } from "typeorm";

import { Migrations as ApiDatabaseContracts_Migrations } from "./contracts";
import { Identifiers as ApiDatabaseIdentifiers } from "./identifiers";
import { Migrations as ApiDatabaseContracts_Migrations } from "./contracts.js";
import { Identifiers as ApiDatabaseIdentifiers } from "./identifiers.js";

@injectable()
export class Migrations implements ApiDatabaseContracts_Migrations {
Expand Down
22 changes: 11 additions & 11 deletions packages/api-database/source/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export * from "./api-node";
export * from "./block";
export * from "./configuration";
export * from "./mempool-transaction";
export * from "./peer";
export * from "./plugin";
export * from "./state";
export * from "./transaction";
export * from "./transaction-type";
export * from "./validator-round";
export * from "./wallet";
export * from "./api-node.js";
export * from "./block.js";
export * from "./configuration.js";
export * from "./mempool-transaction.js";
export * from "./peer.js";
export * from "./plugin.js";
export * from "./state.js";
export * from "./transaction.js";
export * from "./transaction-type.js";
export * from "./validator-round.js";
export * from "./wallet.js";
2 changes: 1 addition & 1 deletion packages/api-database/source/models/mempool-transaction.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Column, Entity } from "typeorm";

import { vendorFieldTransformer } from "../transformers/vendor-field";
import { vendorFieldTransformer } from "../transformers/vendor-field.js";

@Entity({
name: "mempool_transactions",
Expand Down
2 changes: 1 addition & 1 deletion packages/api-database/source/models/transaction.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Column, Entity } from "typeorm";

import { vendorFieldTransformer } from "../transformers/vendor-field";
import { vendorFieldTransformer } from "../transformers/vendor-field.js";

@Entity({
name: "transactions",
Expand Down
10 changes: 5 additions & 5 deletions packages/api-database/source/repositories/api-node-repository.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ApiNodeRepository, ApiNodeRepositoryExtension, RepositoryDataSource } from "../contracts";
import { ApiNode } from "../models/api-node";
import { Criteria, Options, Pagination, ResultsPage, Sorting } from "../search";
import { ApiNodeFilter } from "../search/filters";
import { makeExtendedRepository } from "./repository-extension";
import { ApiNodeRepository, ApiNodeRepositoryExtension, RepositoryDataSource } from "../contracts.js";
import { ApiNode } from "../models/api-node.js";
import { ApiNodeFilter } from "../search/filters/index.js";
import { Criteria, Options, Pagination, ResultsPage, Sorting } from "../search/index.js";
import { makeExtendedRepository } from "./repository-extension.js";

export const makeApiNodeRepository = (dataSource: RepositoryDataSource): ApiNodeRepository =>
makeExtendedRepository<ApiNode, ApiNodeRepositoryExtension>(ApiNode, dataSource, {
Expand Down
10 changes: 5 additions & 5 deletions packages/api-database/source/repositories/block-repository.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { BlockRepository, BlockRepositoryExtension, RepositoryDataSource } from "../contracts";
import { Block } from "../models/block";
import { Criteria, Options, Pagination, ResultsPage, Sorting } from "../search";
import { BlockFilter } from "../search/filters";
import { makeExtendedRepository } from "./repository-extension";
import { BlockRepository, BlockRepositoryExtension, RepositoryDataSource } from "../contracts.js";
import { Block } from "../models/block.js";
import { BlockFilter } from "../search/filters/index.js";
import { Criteria, Options, Pagination, ResultsPage, Sorting } from "../search/index.js";
import { makeExtendedRepository } from "./repository-extension.js";

export const makeBlockRepository = (dataSource: RepositoryDataSource): BlockRepository =>
makeExtendedRepository<Block, BlockRepositoryExtension>(Block, dataSource, {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ConfigurationRepository, ConfigurationRepositoryExtension, RepositoryDataSource } from "../contracts";
import { Configuration } from "../models";
import { makeExtendedRepository } from "./repository-extension";
import { ConfigurationRepository, ConfigurationRepositoryExtension, RepositoryDataSource } from "../contracts.js";
import { Configuration } from "../models/index.js";
import { makeExtendedRepository } from "./repository-extension.js";

export const makeConfigurationRepository = (dataSource: RepositoryDataSource): ConfigurationRepository =>
makeExtendedRepository<Configuration, ConfigurationRepositoryExtension>(Configuration, dataSource, {
Expand Down
22 changes: 11 additions & 11 deletions packages/api-database/source/repositories/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export { makeApiNodeRepository } from "./api-node-repository";
export { makeBlockRepository } from "./block-repository";
export { makeConfigurationRepository } from "./configuration-repository";
export { makeMempoolTransactionRepository } from "./mempool-transaction-repository";
export { makePeerRepository } from "./peer-repository";
export { makePluginRepository } from "./plugin-repository";
export { makeStateRepository } from "./state-repository";
export { makeTransactionRepository } from "./transaction-repository";
export { makeTransactionTypeRepository } from "./transaction-type-repository";
export { makeValidatorRoundRepository } from "./validator-round-repository";
export { makeWalletRepository } from "./wallet-repository";
export { makeApiNodeRepository } from "./api-node-repository.js";
export { makeBlockRepository } from "./block-repository.js";
export { makeConfigurationRepository } from "./configuration-repository.js";
export { makeMempoolTransactionRepository } from "./mempool-transaction-repository.js";
export { makePeerRepository } from "./peer-repository.js";
export { makePluginRepository } from "./plugin-repository.js";
export { makeStateRepository } from "./state-repository.js";
export { makeTransactionRepository } from "./transaction-repository.js";
export { makeTransactionTypeRepository } from "./transaction-type-repository.js";
export { makeValidatorRoundRepository } from "./validator-round-repository.js";
export { makeWalletRepository } from "./wallet-repository.js";
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import {
MempoolTransactionRepository,
MempoolTransactionRepositoryExtension,
RepositoryDataSource,
} from "../contracts";
import { MempoolTransaction } from "../models";
import { makeExtendedRepository } from "./repository-extension";
} from "../contracts.js";
import { MempoolTransaction } from "../models/index.js";
import { makeExtendedRepository } from "./repository-extension.js";

export const makeMempoolTransactionRepository = (dataSource: RepositoryDataSource): MempoolTransactionRepository =>
makeExtendedRepository<MempoolTransaction, MempoolTransactionRepositoryExtension>(MempoolTransaction, dataSource, {
Expand Down
10 changes: 5 additions & 5 deletions packages/api-database/source/repositories/peer-repository.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { PeerRepository, PeerRepositoryExtension, RepositoryDataSource } from "../contracts";
import { Peer } from "../models/peer";
import { Criteria, Options, Pagination, ResultsPage, Sorting } from "../search";
import { PeerFilter } from "../search/filters";
import { makeExtendedRepository } from "./repository-extension";
import { PeerRepository, PeerRepositoryExtension, RepositoryDataSource } from "../contracts.js";
import { Peer } from "../models/peer.js";
import { PeerFilter } from "../search/filters/index.js";
import { Criteria, Options, Pagination, ResultsPage, Sorting } from "../search/index.js";
import { makeExtendedRepository } from "./repository-extension.js";

export const makePeerRepository = (dataSource: RepositoryDataSource): PeerRepository =>
makeExtendedRepository<Peer, PeerRepositoryExtension>(Peer, dataSource, {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PluginRepository, PluginRepositoryExtension, RepositoryDataSource } from "../contracts";
import { Plugin } from "../models";
import { makeExtendedRepository } from "./repository-extension";
import { PluginRepository, PluginRepositoryExtension, RepositoryDataSource } from "../contracts.js";
import { Plugin } from "../models/index.js";
import { makeExtendedRepository } from "./repository-extension.js";

export const makePluginRepository = (dataSource: RepositoryDataSource): PluginRepository =>
makeExtendedRepository<Plugin, PluginRepositoryExtension>(Plugin, dataSource, {});
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { EntityTarget, ObjectLiteral, Repository, SelectQueryBuilder } from "typeorm";

import { RepositoryDataSource } from "../contracts";
import { Expressions, Options, Pagination, QueryHelper, ResultsPage, Sorting } from "../search";
import { Expression } from "../search/expressions";
import { RepositoryDataSource } from "../contracts.js";
import { Expression } from "../search/expressions.js";
import { Expressions, Options, Pagination, QueryHelper, ResultsPage, Sorting } from "../search/index.js";

export interface RepositoryExtension<TEntity extends ObjectLiteral> {
queryHelper: QueryHelper<TEntity>;
Expand Down
6 changes: 3 additions & 3 deletions packages/api-database/source/repositories/state-repository.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { RepositoryDataSource, StateRepository, StateRepositoryExtension } from "../contracts";
import { State } from "../models";
import { makeExtendedRepository } from "./repository-extension";
import { RepositoryDataSource, StateRepository, StateRepositoryExtension } from "../contracts.js";
import { State } from "../models/index.js";
import { makeExtendedRepository } from "./repository-extension.js";

export const makeStateRepository = (dataSource: RepositoryDataSource): StateRepository =>
makeExtendedRepository<State, StateRepositoryExtension>(State, dataSource, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import {
TransactionRepository,
TransactionRepositoryExtension,
WalletRepository,
} from "../contracts";
import { Transaction } from "../models";
import { Criteria, Options, Pagination, ResultsPage, Sorting } from "../search";
import { TransactionFilter } from "../search/filters/transaction-filter";
import { makeExtendedRepository } from "./repository-extension";
} from "../contracts.js";
import { Transaction } from "../models/index.js";
import { TransactionFilter } from "../search/filters/transaction-filter.js";
import { Criteria, Options, Pagination, ResultsPage, Sorting } from "../search/index.js";
import { makeExtendedRepository } from "./repository-extension.js";

export const makeTransactionRepository = (dataSource: RepositoryDataSource): TransactionRepository =>
makeExtendedRepository<Transaction, TransactionRepositoryExtension>(Transaction, dataSource, {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { RepositoryDataSource, TransactionTypeRepository, TransactionTypeRepositoryExtension } from "../contracts";
import { TransactionType } from "../models/transaction-type";
import { makeExtendedRepository } from "./repository-extension";
import { RepositoryDataSource, TransactionTypeRepository, TransactionTypeRepositoryExtension } from "../contracts.js";
import { TransactionType } from "../models/transaction-type.js";
import { makeExtendedRepository } from "./repository-extension.js";

export const makeTransactionTypeRepository = (dataSource: RepositoryDataSource): TransactionTypeRepository =>
makeExtendedRepository<TransactionType, TransactionTypeRepositoryExtension>(TransactionType, dataSource, {});
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { RepositoryDataSource, ValidatorRoundRepository, ValidatorRoundRepositoryExtension } from "../contracts";
import { ValidatorRound } from "../models/validator-round";
import { makeExtendedRepository } from "./repository-extension";
import { RepositoryDataSource, ValidatorRoundRepository, ValidatorRoundRepositoryExtension } from "../contracts.js";
import { ValidatorRound } from "../models/validator-round.js";
import { makeExtendedRepository } from "./repository-extension.js";

export const makeValidatorRoundRepository = (dataSource: RepositoryDataSource): ValidatorRoundRepository =>
makeExtendedRepository<ValidatorRound, ValidatorRoundRepositoryExtension>(ValidatorRound, dataSource, {
Expand Down
Loading

0 comments on commit e4fc997

Please sign in to comment.