@show-karma/karma-gap-sdk 0.4.16 → 0.4.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/core/abi/AirdropNFT.json +1 -1
  2. package/core/abi/Allo.json +860 -860
  3. package/core/abi/AlloRegistry.json +578 -578
  4. package/core/abi/CommunityResolverABI.json +506 -506
  5. package/core/abi/Donations.json +251 -251
  6. package/core/abi/EAS.json +1 -1
  7. package/core/abi/MultiAttester.json +746 -746
  8. package/core/abi/ProjectResolver.json +574 -574
  9. package/core/abi/SchemaRegistry.json +1 -1
  10. package/core/abi/index.d.ts +1114 -0
  11. package/core/abi/index.js +26 -0
  12. package/core/class/AllGapSchemas.d.ts +9 -0
  13. package/core/class/AllGapSchemas.js +19 -0
  14. package/core/class/Attestation.d.ts +173 -0
  15. package/core/class/Attestation.js +333 -0
  16. package/core/class/Fetcher.d.ts +175 -0
  17. package/core/class/Fetcher.js +13 -0
  18. package/core/class/GAP.d.ts +254 -0
  19. package/core/class/GAP.js +289 -0
  20. package/core/class/GapSchema.d.ts +34 -0
  21. package/core/class/GapSchema.js +62 -0
  22. package/core/class/Gelato/{Gelato.ts → Gelato.js} +0 -23
  23. package/core/class/GrantProgramRegistry/Allo.d.ts +17 -0
  24. package/core/class/GrantProgramRegistry/Allo.js +137 -0
  25. package/core/class/GrantProgramRegistry/AlloRegistry.d.ts +15 -0
  26. package/core/class/GrantProgramRegistry/AlloRegistry.js +70 -0
  27. package/core/class/GraphQL/AxiosGQL.d.ts +6 -0
  28. package/core/class/GraphQL/AxiosGQL.js +25 -0
  29. package/core/class/GraphQL/EASClient.d.ts +16 -0
  30. package/core/class/GraphQL/EASClient.js +26 -0
  31. package/core/class/GraphQL/GapEasClient.d.ts +71 -0
  32. package/core/class/GraphQL/GapEasClient.js +451 -0
  33. package/core/class/GraphQL/index.js +19 -0
  34. package/core/class/Schema.d.ts +233 -0
  35. package/core/class/Schema.js +490 -0
  36. package/core/class/SchemaError.d.ts +30 -0
  37. package/core/class/SchemaError.js +39 -0
  38. package/core/class/contract/GapContract.d.ts +102 -0
  39. package/core/class/contract/GapContract.js +285 -0
  40. package/core/class/entities/Community.d.ts +34 -0
  41. package/core/class/entities/Community.js +109 -0
  42. package/core/class/entities/ContributorProfile.d.ts +41 -0
  43. package/core/class/entities/ContributorProfile.js +69 -0
  44. package/core/class/entities/Grant.d.ts +54 -0
  45. package/core/class/entities/Grant.js +223 -0
  46. package/core/class/entities/GrantUpdate.d.ts +62 -0
  47. package/core/class/entities/GrantUpdate.js +114 -0
  48. package/core/class/entities/MemberOf.d.ts +11 -0
  49. package/core/class/entities/MemberOf.js +33 -0
  50. package/core/class/entities/Milestone.d.ts +168 -0
  51. package/core/class/entities/Milestone.js +657 -0
  52. package/core/class/entities/Project.d.ts +92 -0
  53. package/core/class/entities/Project.js +418 -0
  54. package/core/class/entities/ProjectImpact.d.ts +50 -0
  55. package/core/class/entities/ProjectImpact.js +112 -0
  56. package/core/class/entities/ProjectMilestone.d.ts +60 -0
  57. package/core/class/entities/ProjectMilestone.js +174 -0
  58. package/core/class/entities/ProjectPointer.d.ts +12 -0
  59. package/core/class/entities/ProjectPointer.js +22 -0
  60. package/core/class/entities/ProjectUpdate.d.ts +50 -0
  61. package/core/class/entities/ProjectUpdate.js +110 -0
  62. package/core/class/entities/Track.d.ts +16 -0
  63. package/core/class/entities/Track.js +21 -0
  64. package/core/class/entities/index.js +26 -0
  65. package/core/class/index.js +26 -0
  66. package/core/class/karma-indexer/GapIndexerClient.d.ts +66 -0
  67. package/core/class/karma-indexer/GapIndexerClient.js +207 -0
  68. package/core/class/karma-indexer/api/GapIndexerApi.d.ts +73 -0
  69. package/core/class/karma-indexer/api/GapIndexerApi.js +256 -0
  70. package/core/class/karma-indexer/api/types.d.ts +309 -0
  71. package/core/class/karma-indexer/api/types.js +2 -0
  72. package/core/class/remote-storage/IpfsStorage.d.ts +23 -0
  73. package/core/class/remote-storage/IpfsStorage.js +56 -0
  74. package/core/class/remote-storage/RemoteStorage.d.ts +41 -0
  75. package/core/class/remote-storage/RemoteStorage.js +38 -0
  76. package/core/class/types/allo.d.ts +78 -0
  77. package/core/class/types/allo.js +2 -0
  78. package/core/class/types/attestations.d.ts +173 -0
  79. package/core/class/types/attestations.js +66 -0
  80. package/core/consts.d.ts +50 -0
  81. package/core/consts.js +699 -0
  82. package/core/index.js +24 -0
  83. package/core/shared/types.d.ts +13 -0
  84. package/core/shared/types.js +2 -0
  85. package/core/types.d.ts +131 -0
  86. package/core/types.js +13 -0
  87. package/core/utils/gelato/index.js +19 -0
  88. package/core/utils/gelato/send-gelato-txn.d.ts +55 -0
  89. package/core/utils/gelato/send-gelato-txn.js +100 -0
  90. package/core/utils/gelato/sponsor-handler.d.ts +9 -0
  91. package/core/utils/gelato/sponsor-handler.js +60 -0
  92. package/core/utils/gelato/watch-gelato-txn.d.ts +7 -0
  93. package/core/utils/gelato/watch-gelato-txn.js +63 -0
  94. package/core/utils/get-date.d.ts +1 -0
  95. package/core/utils/get-date.js +7 -0
  96. package/core/utils/get-ipfs-data.d.ts +1 -0
  97. package/core/utils/get-ipfs-data.js +20 -0
  98. package/core/utils/get-web3-provider.d.ts +2 -0
  99. package/core/utils/get-web3-provider.js +18 -0
  100. package/core/utils/gql-queries.d.ts +12 -0
  101. package/core/utils/gql-queries.js +90 -0
  102. package/core/utils/index.js +23 -0
  103. package/core/utils/map-filter.d.ts +8 -0
  104. package/core/utils/map-filter.js +20 -0
  105. package/core/utils/serialize-bigint.d.ts +1 -0
  106. package/core/utils/serialize-bigint.js +8 -0
  107. package/core/utils/to-unix.d.ts +1 -0
  108. package/core/utils/to-unix.js +25 -0
  109. package/index.js +17 -0
  110. package/package.json +45 -45
  111. package/.cursorrules +0 -43
  112. package/core/abi/index.ts +0 -21
  113. package/core/class/AllGapSchemas.ts +0 -21
  114. package/core/class/Attestation.ts +0 -429
  115. package/core/class/Fetcher.ts +0 -224
  116. package/core/class/GAP.ts +0 -481
  117. package/core/class/GapSchema.ts +0 -93
  118. package/core/class/GrantProgramRegistry/Allo.ts +0 -188
  119. package/core/class/GrantProgramRegistry/AlloRegistry.ts +0 -101
  120. package/core/class/GraphQL/AxiosGQL.ts +0 -29
  121. package/core/class/GraphQL/EASClient.ts +0 -34
  122. package/core/class/GraphQL/GapEasClient.ts +0 -869
  123. package/core/class/Schema.ts +0 -659
  124. package/core/class/SchemaError.ts +0 -42
  125. package/core/class/contract/GapContract.ts +0 -457
  126. package/core/class/entities/Community.ts +0 -148
  127. package/core/class/entities/ContributorProfile.ts +0 -108
  128. package/core/class/entities/Grant.ts +0 -321
  129. package/core/class/entities/GrantUpdate.ts +0 -187
  130. package/core/class/entities/MemberOf.ts +0 -52
  131. package/core/class/entities/Milestone.ts +0 -898
  132. package/core/class/entities/Project.ts +0 -672
  133. package/core/class/entities/ProjectImpact.ts +0 -170
  134. package/core/class/entities/ProjectMilestone.ts +0 -254
  135. package/core/class/entities/ProjectPointer.ts +0 -39
  136. package/core/class/entities/ProjectUpdate.ts +0 -176
  137. package/core/class/entities/Track.ts +0 -32
  138. package/core/class/karma-indexer/GapIndexerClient.ts +0 -383
  139. package/core/class/karma-indexer/api/GapIndexerApi.ts +0 -446
  140. package/core/class/karma-indexer/api/types.ts +0 -313
  141. package/core/class/remote-storage/IpfsStorage.ts +0 -76
  142. package/core/class/remote-storage/RemoteStorage.ts +0 -65
  143. package/core/class/types/allo.ts +0 -93
  144. package/core/class/types/attestations.ts +0 -223
  145. package/core/consts.ts +0 -775
  146. package/core/scripts/create-grant.ts +0 -102
  147. package/core/scripts/create-program.ts +0 -43
  148. package/core/scripts/create-schemas.ts +0 -65
  149. package/core/scripts/deploy.ts +0 -65
  150. package/core/scripts/index.ts +0 -1
  151. package/core/scripts/milestone-multi-grants.ts +0 -125
  152. package/core/shared/types.ts +0 -13
  153. package/core/types.ts +0 -224
  154. package/core/utils/gelato/send-gelato-txn.ts +0 -114
  155. package/core/utils/gelato/sponsor-handler.ts +0 -77
  156. package/core/utils/gelato/watch-gelato-txn.ts +0 -67
  157. package/core/utils/get-date.ts +0 -3
  158. package/core/utils/get-ipfs-data.ts +0 -13
  159. package/core/utils/get-web3-provider.ts +0 -18
  160. package/core/utils/gql-queries.ts +0 -133
  161. package/core/utils/map-filter.ts +0 -21
  162. package/core/utils/serialize-bigint.ts +0 -7
  163. package/core/utils/to-unix.ts +0 -18
  164. package/create-community-example.ts +0 -119
  165. package/csv-upload/README.md +0 -74
  166. package/csv-upload/config.ts +0 -41
  167. package/csv-upload/example.csv +0 -2
  168. package/csv-upload/keys.example.json +0 -8
  169. package/csv-upload/scripts/run.ts +0 -417
  170. package/csv-upload/types.ts +0 -39
  171. package/docs/.gitkeep +0 -0
  172. package/docs/images/attestation-architecture.png +0 -0
  173. package/docs/images/dfd-get-projects.png +0 -0
  174. package/gap-schema.yaml +0 -155
  175. package/milestone-workflow-example.ts +0 -353
  176. package/readme.md +0 -872
  177. package/schemas/.gitkeep +0 -0
  178. package/schemas/GAP-schemas-1692135812877.json +0 -33
  179. package/test-file-indexer-api.ts +0 -25
  180. package/tsconfig.json +0 -26
  181. /package/{csv-upload/.gitkeep → core/class/Gelato/Gelato.d.ts} +0 -0
  182. /package/core/class/GraphQL/{index.ts → index.d.ts} +0 -0
  183. /package/core/class/entities/{index.ts → index.d.ts} +0 -0
  184. /package/core/class/{index.ts → index.d.ts} +0 -0
  185. /package/core/{index.ts → index.d.ts} +0 -0
  186. /package/core/utils/gelato/{index.ts → index.d.ts} +0 -0
  187. /package/core/utils/{index.ts → index.d.ts} +0 -0
  188. /package/{index.ts → index.d.ts} +0 -0
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./gelato"), exports);
18
+ __exportStar(require("./get-date"), exports);
19
+ __exportStar(require("./gql-queries"), exports);
20
+ __exportStar(require("./map-filter"), exports);
21
+ __exportStar(require("./serialize-bigint"), exports);
22
+ __exportStar(require("./to-unix"), exports);
23
+ __exportStar(require("./get-ipfs-data"), exports);
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Filters an array by its condition then maps it to the desired format.
3
+ * @param arr
4
+ * @param condition
5
+ * @param mapTo
6
+ * @returns
7
+ */
8
+ export declare function mapFilter<T = unknown, U = unknown>(arr: U[], condition: (item: U) => boolean, mapTo: (item: U) => T): T[];
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapFilter = void 0;
4
+ /**
5
+ * Filters an array by its condition then maps it to the desired format.
6
+ * @param arr
7
+ * @param condition
8
+ * @param mapTo
9
+ * @returns
10
+ */
11
+ function mapFilter(arr, condition, mapTo) {
12
+ const newArray = [];
13
+ for (const item of arr) {
14
+ if (condition(item)) {
15
+ newArray.push(mapTo(item));
16
+ }
17
+ }
18
+ return newArray;
19
+ }
20
+ exports.mapFilter = mapFilter;
@@ -0,0 +1 @@
1
+ export declare function serializeWithBigint(value: unknown): string;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.serializeWithBigint = void 0;
4
+ function serializeWithBigint(value) {
5
+ return JSON.stringify(value, (this,
6
+ (key, value) => (typeof value === "bigint" ? value.toString() : value)));
7
+ }
8
+ exports.serializeWithBigint = serializeWithBigint;
@@ -0,0 +1 @@
1
+ export declare function toUnix(value: number | Date | string): number;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toUnix = void 0;
4
+ function toUnix(value) {
5
+ switch (typeof value) {
6
+ case "number":
7
+ value = Math.round(value);
8
+ if (value.toString().length > 13)
9
+ throw new Error("Invalid timestamp length");
10
+ if (value.toString().length === 10)
11
+ return value;
12
+ return Math.floor(value / 1000);
13
+ case "string":
14
+ if (/\D/.test(value))
15
+ return null;
16
+ return toUnix(+value);
17
+ case "object":
18
+ if (value instanceof Date)
19
+ return toUnix(value.getTime());
20
+ return null;
21
+ default:
22
+ return null;
23
+ }
24
+ }
25
+ exports.toUnix = toUnix;
package/index.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./core"), exports);
package/package.json CHANGED
@@ -1,47 +1,47 @@
1
1
  {
2
- "name": "@show-karma/karma-gap-sdk",
3
- "publishConfig": {
4
- "access": "public"
5
- },
6
- "version": "0.4.16",
7
- "description": "Simple and easy interface between EAS and Karma GAP.",
8
- "main": "./index.js",
9
- "author": "KarmaHQ",
10
- "license": "MIT",
11
- "private": false,
12
- "repository": {
13
- "url": "git+https://github.com/show-karma/karma-gap-sdk.git",
14
- "type": "git"
15
- },
16
- "scripts": {
17
- "deploy": "npx ts-node ./core/scripts/deploy.ts",
18
- "csv-upload": "npx ts-node ./csv-upload/scripts/run.ts",
19
- "test-file": "npx ts-node ./test-file-indexer-api.ts",
20
- "test-milestone": "npx ts-node ./milestone-workflow-example.ts",
21
- "create-community": "npx ts-node ./create-community-example.ts",
22
- "publish-npm": "npm version patch && tsc && cd .dist && npm publish --scope=@show-karma/karma-gap-sdk --access public"
23
- },
24
- "dependencies": {
25
- "@allo-team/allo-v2-sdk": "^1.0.63",
26
- "@ethereum-attestation-service/eas-sdk": "1.4.2",
27
- "@gelatonetwork/relay-sdk": "^5.6.0",
28
- "@types/sha256": "^0.2.0",
29
- "axios": "^1.7.9",
30
- "dotenv": "^17.2.3",
31
- "ethers": "6.11.0",
32
- "sha256": "^0.2.0",
33
- "simple-ts-job-runner": "^1.0.12"
34
- },
35
- "overrides": {
36
- "ws": ">=8.17.1",
37
- "cookie": ">=0.7.0"
38
- },
39
- "devDependencies": {
40
- "@types/node": "^20.5.0",
41
- "eslint": "^8.47.0",
42
- "fast-csv": "^4.3.6",
43
- "husky": "^8.0.3",
44
- "prettier": "^3.0.1",
45
- "typescript": "^5.1.6"
46
- }
2
+ "name": "@show-karma/karma-gap-sdk",
3
+ "publishConfig": {
4
+ "access": "public"
5
+ },
6
+ "version": "0.4.18",
7
+ "description": "Simple and easy interface between EAS and Karma GAP.",
8
+ "main": "./index.js",
9
+ "author": "KarmaHQ",
10
+ "license": "MIT",
11
+ "private": false,
12
+ "repository": {
13
+ "url": "git+https://github.com/show-karma/karma-gap-sdk.git",
14
+ "type": "git"
15
+ },
16
+ "scripts": {
17
+ "deploy": "npx ts-node ./core/scripts/deploy.ts",
18
+ "csv-upload": "npx ts-node ./csv-upload/scripts/run.ts",
19
+ "test-file": "npx ts-node ./test-file-indexer-api.ts",
20
+ "test-milestone": "npx ts-node ./milestone-workflow-example.ts",
21
+ "create-community": "npx ts-node ./create-community-example.ts",
22
+ "publish-npm": "npm version patch && tsc && cd .dist && npm publish --scope=@show-karma/karma-gap-sdk --access public"
23
+ },
24
+ "dependencies": {
25
+ "@allo-team/allo-v2-sdk": "^1.0.63",
26
+ "@ethereum-attestation-service/eas-sdk": "1.4.2",
27
+ "@gelatonetwork/relay-sdk": "^5.6.0",
28
+ "@types/sha256": "^0.2.0",
29
+ "axios": "^1.7.9",
30
+ "dotenv": "^17.2.3",
31
+ "ethers": "6.11.0",
32
+ "sha256": "^0.2.0",
33
+ "simple-ts-job-runner": "^1.0.12"
34
+ },
35
+ "overrides": {
36
+ "ws": ">=8.17.1",
37
+ "cookie": ">=0.7.0"
38
+ },
39
+ "devDependencies": {
40
+ "@types/node": "^20.5.0",
41
+ "eslint": "^8.47.0",
42
+ "fast-csv": "^4.3.6",
43
+ "husky": "^8.0.3",
44
+ "prettier": "^3.0.1",
45
+ "typescript": "^5.1.6"
46
+ }
47
47
  }
package/.cursorrules DELETED
@@ -1,43 +0,0 @@
1
- # Karma GAP SDK - Cursor Rules
2
-
3
- ## Project Overview
4
- The Karma GAP SDK is a library for easy integration with the Grantee Accountability Protocol. It provides tools to fetch and display Communities, Projects, Members, Grants, Milestones, and their dependencies, as well as create, update, and delete these entities. The SDK also supports gasless transactions with Gelato Relay and custom API endpoints for faster queries.
5
-
6
- ## Architecture Guidelines
7
- When working with this codebase, understand that it follows a modular architecture with these key components:
8
-
9
- 1. **GAP Facade** - Centralizes resources within the SDK, providing tools and methods to retrieve attestations and convert them into concrete objects.
10
- 2. **Attestations** - Base module for handling various types of attestations available at EAS. Can be inherited for specific attestation types.
11
- 3. **Schemas** - Abstract module that establishes connection with the EAS infrastructure. Contains parameters, methods, and interactions for blockchain communication.
12
- 4. **Entities** - Represents specific attestation types customized for specific requirements. Always extends the Attestation module.
13
- 5. **Fetcher** - Abstract module for interacting with EAS or custom API to retrieve attestations and transform them into Attestation instances.
14
- 6. **Contract** - Custom intermediary contract to add an abstraction layer to the original EAS contracts.
15
-
16
- ## Entity Types
17
- The SDK supports various entity types that represent different attestation types in the Grantee Accountability Protocol: Use the `gap-schema.yaml` file to understand the different types of attestations and their relationships.
18
-
19
- ## Code Style Guidelines
20
- - Use TypeScript for all new code
21
- - Follow the existing module pattern when adding new features
22
- - Maintain proper inheritance hierarchy for new entities (extend from Attestation)
23
- - Document all public methods and classes with JSDoc comments
24
- - Use async/await for asynchronous operations
25
- - Implement proper error handling with custom error classes
26
-
27
- ## Integration Features
28
- The SDK includes several integration features:
29
-
30
- - **Gelato Integration** - For gasless transactions
31
- - **GraphQL** - For data fetching
32
- - **Remote Storage** - For storing data remotely
33
- - **Karma Indexer** - For efficient data retrieval
34
-
35
- ## Testing Guidelines
36
- - Write unit tests for all new functionality
37
- - Ensure backward compatibility when modifying existing code
38
- - Test with both custom API and direct blockchain access
39
-
40
- ## Documentation
41
- - Update the README.md when adding new features
42
- - Include examples for new functionality
43
- - Document any breaking changes
package/core/abi/index.ts DELETED
@@ -1,21 +0,0 @@
1
- import AirdropNFT from "./AirdropNFT.json";
2
- import Allo from "./Allo.json";
3
- import AlloRegistry from "./AlloRegistry.json";
4
- import CommunityResolverABI from "./CommunityResolverABI.json";
5
- import Donations from "./Donations.json";
6
- import EAS from "./EAS.json";
7
- import MultiAttester from "./MultiAttester.json";
8
- import ProjectResolver from "./ProjectResolver.json";
9
- import SchemaRegistry from "./SchemaRegistry.json";
10
-
11
- export const abis = {
12
- AirdropNFT,
13
- Allo,
14
- AlloRegistry,
15
- CommunityResolverABI,
16
- Donations,
17
- EAS,
18
- MultiAttester,
19
- ProjectResolver,
20
- SchemaRegistry,
21
- };
@@ -1,21 +0,0 @@
1
- import { MountEntities, Networks } from "../../core/consts";
2
- import { SchemaInterface, TNetwork, TSchemaName } from "../types";
3
- import { GAP } from "./GAP";
4
- import { GapSchema } from "./GapSchema";
5
-
6
- export class AllGapSchemas {
7
- public allSchemas: { [network: string]: SchemaInterface<TSchemaName>[] } = {};
8
-
9
- constructor() {
10
- Object.keys(Networks).forEach((network) => {
11
- this.allSchemas[network] = Object.values(
12
- MountEntities(Networks[network])
13
- );
14
- });
15
- }
16
-
17
- findSchema(name: TSchemaName, network: TNetwork) {
18
- const schema = this.allSchemas[network].find((s) => s.name === name);
19
- return new GapSchema(schema, GAP.getInstance({ network }), false, false);
20
- }
21
- }