@dhedge/backend-flatcoin-core 0.1.9 → 0.1.11

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.
package/dist/index.d.ts CHANGED
@@ -1,2 +1,24 @@
1
- export * from './entity';
2
- export * from './utils';
1
+ declare abstract class FlatcoinPriceParent {
2
+ id: number;
3
+ priceUsd: string;
4
+ priceUsdFormatted: number;
5
+ timestamp: number;
6
+ blockNumber: number;
7
+ }
8
+
9
+ declare class FlatcoinPriceOneDay extends FlatcoinPriceParent {
10
+ }
11
+
12
+ declare class FlatcoinPriceOneMonth extends FlatcoinPriceParent {
13
+ }
14
+
15
+ declare class FlatcoinPriceOneWeek extends FlatcoinPriceParent {
16
+ }
17
+
18
+ declare class FlatcoinPriceOneYear extends FlatcoinPriceParent {
19
+ }
20
+
21
+ declare class FlatcoinPrice extends FlatcoinPriceParent {
22
+ }
23
+
24
+ export { FlatcoinPrice, FlatcoinPriceOneDay, FlatcoinPriceOneMonth, FlatcoinPriceOneWeek, FlatcoinPriceOneYear, FlatcoinPriceParent };
package/dist/index.js CHANGED
@@ -1,18 +1,90 @@
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("./entity"), exports);
18
- __exportStar(require("./utils"), exports);
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result)
9
+ __defProp(target, key, result);
10
+ return result;
11
+ };
12
+
13
+ // src/entity/flatcoin.price.one.day.ts
14
+ import { Entity as Entity2 } from "typeorm";
15
+
16
+ // src/entity/flatcoin.price.parent.ts
17
+ import { Entity, PrimaryGeneratedColumn, Column } from "typeorm";
18
+ import { Field, ObjectType } from "@nestjs/graphql";
19
+ var FlatcoinPriceParent = class {
20
+ };
21
+ __decorateClass([
22
+ PrimaryGeneratedColumn({ name: "id" })
23
+ ], FlatcoinPriceParent.prototype, "id", 2);
24
+ __decorateClass([
25
+ Field(),
26
+ Column({ name: "price_usd", type: "numeric", precision: 30 })
27
+ ], FlatcoinPriceParent.prototype, "priceUsd", 2);
28
+ __decorateClass([
29
+ Field(),
30
+ Column({ name: "price_usd_formatted", type: "decimal", precision: 10, scale: 2 })
31
+ ], FlatcoinPriceParent.prototype, "priceUsdFormatted", 2);
32
+ __decorateClass([
33
+ Field(),
34
+ Column({ name: "timestamp", type: "numeric", precision: 25 })
35
+ ], FlatcoinPriceParent.prototype, "timestamp", 2);
36
+ __decorateClass([
37
+ Column({ name: "block_number", type: "numeric", precision: 25 })
38
+ ], FlatcoinPriceParent.prototype, "blockNumber", 2);
39
+ FlatcoinPriceParent = __decorateClass([
40
+ ObjectType(),
41
+ Entity()
42
+ ], FlatcoinPriceParent);
43
+
44
+ // src/entity/flatcoin.price.one.day.ts
45
+ var FlatcoinPriceOneDay = class extends FlatcoinPriceParent {
46
+ };
47
+ FlatcoinPriceOneDay = __decorateClass([
48
+ Entity2({ name: "flatcoin_prices_1d" })
49
+ ], FlatcoinPriceOneDay);
50
+
51
+ // src/entity/flatcoin.price.one.month.ts
52
+ import { Entity as Entity3 } from "typeorm";
53
+ var FlatcoinPriceOneMonth = class extends FlatcoinPriceParent {
54
+ };
55
+ FlatcoinPriceOneMonth = __decorateClass([
56
+ Entity3({ name: "flatcoin_prices_1m" })
57
+ ], FlatcoinPriceOneMonth);
58
+
59
+ // src/entity/flatcoin.price.one.week.ts
60
+ import { Entity as Entity4 } from "typeorm";
61
+ var FlatcoinPriceOneWeek = class extends FlatcoinPriceParent {
62
+ };
63
+ FlatcoinPriceOneWeek = __decorateClass([
64
+ Entity4({ name: "flatcoin_prices_1w" })
65
+ ], FlatcoinPriceOneWeek);
66
+
67
+ // src/entity/flatcoin.price.one.year.ts
68
+ import { Entity as Entity5 } from "typeorm";
69
+ var FlatcoinPriceOneYear = class extends FlatcoinPriceParent {
70
+ };
71
+ FlatcoinPriceOneYear = __decorateClass([
72
+ Entity5({ name: "flatcoin_prices_1y" })
73
+ ], FlatcoinPriceOneYear);
74
+
75
+ // src/entity/flatcoin.price.ts
76
+ import { Entity as Entity6 } from "typeorm";
77
+ var FlatcoinPrice = class extends FlatcoinPriceParent {
78
+ };
79
+ FlatcoinPrice = __decorateClass([
80
+ Entity6({ name: "flatcoin_prices" })
81
+ ], FlatcoinPrice);
82
+ export {
83
+ FlatcoinPrice,
84
+ FlatcoinPriceOneDay,
85
+ FlatcoinPriceOneMonth,
86
+ FlatcoinPriceOneWeek,
87
+ FlatcoinPriceOneYear,
88
+ FlatcoinPriceParent
89
+ };
90
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/entity/flatcoin.price.one.day.ts","../src/entity/flatcoin.price.parent.ts","../src/entity/flatcoin.price.one.month.ts","../src/entity/flatcoin.price.one.week.ts","../src/entity/flatcoin.price.one.year.ts","../src/entity/flatcoin.price.ts"],"sourcesContent":["import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices_1d' })\nexport class FlatcoinPriceOneDay extends FlatcoinPriceParent {}\n","import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';\nimport { Field, ObjectType } from '@nestjs/graphql';\n\n@ObjectType()\n@Entity()\nexport abstract class FlatcoinPriceParent {\n @PrimaryGeneratedColumn({ name: 'id' })\n id: number;\n\n @Field()\n @Column({ name: 'price_usd', type: 'numeric', precision: 30 })\n priceUsd: string;\n\n @Field()\n @Column({ name: 'price_usd_formatted', type: 'decimal', precision: 10, scale: 2 })\n priceUsdFormatted: number;\n\n @Field()\n @Column({ name: 'timestamp', type: 'numeric', precision: 25 })\n timestamp: number;\n\n @Column({ name: 'block_number', type: 'numeric', precision: 25 })\n blockNumber: number;\n}\n","import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices_1m' })\nexport class FlatcoinPriceOneMonth extends FlatcoinPriceParent {}\n","import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices_1w' })\nexport class FlatcoinPriceOneWeek extends FlatcoinPriceParent {}\n","import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices_1y' })\nexport class FlatcoinPriceOneYear extends FlatcoinPriceParent {}\n","import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices' })\nexport class FlatcoinPrice extends FlatcoinPriceParent {}\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,UAAAA,eAAc;;;ACAvB,SAAS,QAAQ,wBAAwB,cAAc;AACvD,SAAS,OAAO,kBAAkB;AAI3B,IAAe,sBAAf,MAAmC;AAkB1C;AAhBE;AAAA,EADC,uBAAuB,EAAE,MAAM,KAAK,CAAC;AAAA,GADlB,oBAEpB;AAIA;AAAA,EAFC,MAAM;AAAA,EACN,OAAO,EAAE,MAAM,aAAa,MAAM,WAAW,WAAW,GAAG,CAAC;AAAA,GALzC,oBAMpB;AAIA;AAAA,EAFC,MAAM;AAAA,EACN,OAAO,EAAE,MAAM,uBAAuB,MAAM,WAAW,WAAW,IAAI,OAAO,EAAE,CAAC;AAAA,GAT7D,oBAUpB;AAIA;AAAA,EAFC,MAAM;AAAA,EACN,OAAO,EAAE,MAAM,aAAa,MAAM,WAAW,WAAW,GAAG,CAAC;AAAA,GAbzC,oBAcpB;AAGA;AAAA,EADC,OAAO,EAAE,MAAM,gBAAgB,MAAM,WAAW,WAAW,GAAG,CAAC;AAAA,GAhB5C,oBAiBpB;AAjBoB,sBAAf;AAAA,EAFN,WAAW;AAAA,EACX,OAAO;AAAA,GACc;;;ADDf,IAAM,sBAAN,cAAkC,oBAAoB;AAAC;AAAjD,sBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,qBAAqB,CAAC;AAAA,GACzB;;;AEJb,SAAS,UAAAC,eAAc;AAIhB,IAAM,wBAAN,cAAoC,oBAAoB;AAAC;AAAnD,wBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,qBAAqB,CAAC;AAAA,GACzB;;;ACJb,SAAS,UAAAC,eAAc;AAIhB,IAAM,uBAAN,cAAmC,oBAAoB;AAAC;AAAlD,uBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,qBAAqB,CAAC;AAAA,GACzB;;;ACJb,SAAS,UAAAC,eAAc;AAIhB,IAAM,uBAAN,cAAmC,oBAAoB;AAAC;AAAlD,uBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,qBAAqB,CAAC;AAAA,GACzB;;;ACJb,SAAS,UAAAC,eAAc;AAIhB,IAAM,gBAAN,cAA4B,oBAAoB;AAAC;AAA3C,gBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,kBAAkB,CAAC;AAAA,GACtB;","names":["Entity","Entity","Entity","Entity","Entity","Entity","Entity","Entity","Entity","Entity"]}
package/package.json CHANGED
@@ -1,49 +1,40 @@
1
1
  {
2
2
  "name": "@dhedge/backend-flatcoin-core",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "Backend Flatcoin Core",
5
- "main": "dist/index.mjs",
6
- "types": "dist/index.d.mts",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
7
8
  "exports": {
8
9
  ".": {
9
- "types": "./dist/index.d.mts",
10
- "default": "./dist/index.mjs"
11
- },
12
- "./entity": {
13
- "types": "./dist/entity/index.d.mts",
14
- "default": "./dist/entity/index.mjs"
15
- },
16
- "./utils": {
17
- "types": "./dist/utils/index.d.mts",
18
- "default": "./dist/utils/index.mjs"
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
19
12
  },
20
13
  "./package.json": "./package.json"
21
14
  },
22
15
  "files": [
23
- "/entity",
24
- "/utils",
25
16
  "/dist"
26
17
  ],
18
+ "sideEffects": false,
27
19
  "dependencies": {
28
20
  "@nestjs/graphql": "^12.0.9",
29
- "typeorm": "^0.3.17",
30
- "ethers": "5.7.2"
21
+ "typeorm": "^0.3.17"
31
22
  },
32
23
  "devDependencies": {
33
24
  "@swc/core": "^1.3.90",
34
25
  "@types/dedent": "^0.7.0",
35
26
  "@types/fs-extra": "^11.0.1",
36
- "@typescript-eslint/eslint-plugin": "^5.0.0",
37
- "@typescript-eslint/parser": "^5.0.0",
27
+ "@typescript-eslint/eslint-plugin": "^6.7.2",
28
+ "@typescript-eslint/parser": "^6.7.2",
38
29
  "dedent": "^0.7.0",
39
- "eslint": "^8.0.1",
40
- "eslint-config-prettier": "^8.3.0",
41
- "eslint-plugin-prettier": "^4.0.0",
30
+ "eslint": "^8.49.0",
31
+ "eslint-config-prettier": "^9.0.0",
32
+ "eslint-plugin-prettier": "^5.0.0",
42
33
  "execa": "^7.1.1",
43
34
  "fs-extra": "^11.1.1",
44
- "prettier": "^2.3.2",
45
- "typescript": "^5.0.0",
46
- "rimraf": "5.0.5"
35
+ "prettier": "3.0.3",
36
+ "tsup": "^7.2.0",
37
+ "typescript": "^5.0.0"
47
38
  },
48
39
  "repository": {
49
40
  "type": "git",
@@ -53,11 +44,10 @@
53
44
  "scripts": {
54
45
  "lint": "eslint \"{src,apps,libs,test}/**/*.ts\"",
55
46
  "lint-fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
56
- "build": "rimraf -rf dist && tsc -p tsconfig.json",
47
+ "build": "tsup src/index.ts --format esm",
57
48
  "typecheck": "tsc --noEmit",
58
49
  "precommit": "npm run lint && npm run typecheck && npm run test",
59
- "prepublish:npm": "npm run build",
60
- "publish:npm": "npm publish",
50
+ "prepublish": "npm run build",
61
51
  "test": "vitest run --coverage"
62
52
  }
63
53
  }
@@ -1,6 +0,0 @@
1
- export declare class Apy {
2
- id: number;
3
- monthly: number;
4
- weekly: number;
5
- daily: number;
6
- }
@@ -1,41 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.Apy = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const graphql_1 = require("@nestjs/graphql");
15
- const utils_1 = require("../utils");
16
- let Apy = class Apy {
17
- };
18
- exports.Apy = Apy;
19
- __decorate([
20
- (0, typeorm_1.PrimaryGeneratedColumn)({ name: 'id' }),
21
- __metadata("design:type", Number)
22
- ], Apy.prototype, "id", void 0);
23
- __decorate([
24
- (0, graphql_1.Field)(() => graphql_1.Float, { nullable: false }),
25
- (0, typeorm_1.Column)({ name: 'monthly', type: 'decimal', precision: 30, scale: 2, transformer: utils_1.numericTransformer }),
26
- __metadata("design:type", Number)
27
- ], Apy.prototype, "monthly", void 0);
28
- __decorate([
29
- (0, graphql_1.Field)(() => graphql_1.Float, { nullable: false }),
30
- (0, typeorm_1.Column)({ name: 'weekly', type: 'decimal', precision: 30, scale: 2, transformer: utils_1.numericTransformer }),
31
- __metadata("design:type", Number)
32
- ], Apy.prototype, "weekly", void 0);
33
- __decorate([
34
- (0, graphql_1.Field)(() => graphql_1.Float, { nullable: false }),
35
- (0, typeorm_1.Column)({ name: 'daily', type: 'decimal', precision: 30, scale: 2, transformer: utils_1.numericTransformer }),
36
- __metadata("design:type", Number)
37
- ], Apy.prototype, "daily", void 0);
38
- exports.Apy = Apy = __decorate([
39
- (0, graphql_1.ObjectType)(),
40
- (0, typeorm_1.Entity)({ name: 'apy' })
41
- ], Apy);
@@ -1,3 +0,0 @@
1
- import { FlatcoinPriceParent } from './flatcoin.price.parent';
2
- export declare class FlatcoinPrice extends FlatcoinPriceParent {
3
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.FlatcoinPrice = void 0;
10
- const typeorm_1 = require("typeorm");
11
- const flatcoin_price_parent_1 = require("./flatcoin.price.parent");
12
- let FlatcoinPrice = class FlatcoinPrice extends flatcoin_price_parent_1.FlatcoinPriceParent {
13
- };
14
- exports.FlatcoinPrice = FlatcoinPrice;
15
- exports.FlatcoinPrice = FlatcoinPrice = __decorate([
16
- (0, typeorm_1.Entity)({ name: 'flatcoin_prices' })
17
- ], FlatcoinPrice);
@@ -1,3 +0,0 @@
1
- import { FlatcoinPriceParent } from './flatcoin.price.parent';
2
- export declare class FlatcoinPriceOneDay extends FlatcoinPriceParent {
3
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.FlatcoinPriceOneDay = void 0;
10
- const typeorm_1 = require("typeorm");
11
- const flatcoin_price_parent_1 = require("./flatcoin.price.parent");
12
- let FlatcoinPriceOneDay = class FlatcoinPriceOneDay extends flatcoin_price_parent_1.FlatcoinPriceParent {
13
- };
14
- exports.FlatcoinPriceOneDay = FlatcoinPriceOneDay;
15
- exports.FlatcoinPriceOneDay = FlatcoinPriceOneDay = __decorate([
16
- (0, typeorm_1.Entity)({ name: 'flatcoin_prices_1d' })
17
- ], FlatcoinPriceOneDay);
@@ -1,3 +0,0 @@
1
- import { FlatcoinPriceParent } from './flatcoin.price.parent';
2
- export declare class FlatcoinPriceOneMonth extends FlatcoinPriceParent {
3
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.FlatcoinPriceOneMonth = void 0;
10
- const typeorm_1 = require("typeorm");
11
- const flatcoin_price_parent_1 = require("./flatcoin.price.parent");
12
- let FlatcoinPriceOneMonth = class FlatcoinPriceOneMonth extends flatcoin_price_parent_1.FlatcoinPriceParent {
13
- };
14
- exports.FlatcoinPriceOneMonth = FlatcoinPriceOneMonth;
15
- exports.FlatcoinPriceOneMonth = FlatcoinPriceOneMonth = __decorate([
16
- (0, typeorm_1.Entity)({ name: 'flatcoin_prices_1m' })
17
- ], FlatcoinPriceOneMonth);
@@ -1,3 +0,0 @@
1
- import { FlatcoinPriceParent } from './flatcoin.price.parent';
2
- export declare class FlatcoinPriceOneWeek extends FlatcoinPriceParent {
3
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.FlatcoinPriceOneWeek = void 0;
10
- const typeorm_1 = require("typeorm");
11
- const flatcoin_price_parent_1 = require("./flatcoin.price.parent");
12
- let FlatcoinPriceOneWeek = class FlatcoinPriceOneWeek extends flatcoin_price_parent_1.FlatcoinPriceParent {
13
- };
14
- exports.FlatcoinPriceOneWeek = FlatcoinPriceOneWeek;
15
- exports.FlatcoinPriceOneWeek = FlatcoinPriceOneWeek = __decorate([
16
- (0, typeorm_1.Entity)({ name: 'flatcoin_prices_1w' })
17
- ], FlatcoinPriceOneWeek);
@@ -1,3 +0,0 @@
1
- import { FlatcoinPriceParent } from './flatcoin.price.parent';
2
- export declare class FlatcoinPriceOneYear extends FlatcoinPriceParent {
3
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.FlatcoinPriceOneYear = void 0;
10
- const typeorm_1 = require("typeorm");
11
- const flatcoin_price_parent_1 = require("./flatcoin.price.parent");
12
- let FlatcoinPriceOneYear = class FlatcoinPriceOneYear extends flatcoin_price_parent_1.FlatcoinPriceParent {
13
- };
14
- exports.FlatcoinPriceOneYear = FlatcoinPriceOneYear;
15
- exports.FlatcoinPriceOneYear = FlatcoinPriceOneYear = __decorate([
16
- (0, typeorm_1.Entity)({ name: 'flatcoin_prices_1y' })
17
- ], FlatcoinPriceOneYear);
@@ -1,7 +0,0 @@
1
- export declare abstract class FlatcoinPriceParent {
2
- id: number;
3
- priceUsd: string;
4
- priceUsdFormatted: number;
5
- timestamp: number;
6
- blockNumber: number;
7
- }
@@ -1,44 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.FlatcoinPriceParent = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const graphql_1 = require("@nestjs/graphql");
15
- let FlatcoinPriceParent = class FlatcoinPriceParent {
16
- };
17
- exports.FlatcoinPriceParent = FlatcoinPriceParent;
18
- __decorate([
19
- (0, typeorm_1.PrimaryGeneratedColumn)({ name: 'id' }),
20
- __metadata("design:type", Number)
21
- ], FlatcoinPriceParent.prototype, "id", void 0);
22
- __decorate([
23
- (0, graphql_1.Field)(),
24
- (0, typeorm_1.Column)({ name: 'price_usd', type: 'numeric', precision: 30 }),
25
- __metadata("design:type", String)
26
- ], FlatcoinPriceParent.prototype, "priceUsd", void 0);
27
- __decorate([
28
- (0, graphql_1.Field)(),
29
- (0, typeorm_1.Column)({ name: 'price_usd_formatted', type: 'decimal', precision: 10, scale: 2 }),
30
- __metadata("design:type", Number)
31
- ], FlatcoinPriceParent.prototype, "priceUsdFormatted", void 0);
32
- __decorate([
33
- (0, graphql_1.Field)(),
34
- (0, typeorm_1.Column)({ name: 'timestamp', type: 'numeric', precision: 25 }),
35
- __metadata("design:type", Number)
36
- ], FlatcoinPriceParent.prototype, "timestamp", void 0);
37
- __decorate([
38
- (0, typeorm_1.Column)({ name: 'block_number', type: 'numeric', precision: 25 }),
39
- __metadata("design:type", Number)
40
- ], FlatcoinPriceParent.prototype, "blockNumber", void 0);
41
- exports.FlatcoinPriceParent = FlatcoinPriceParent = __decorate([
42
- (0, graphql_1.ObjectType)(),
43
- (0, typeorm_1.Entity)()
44
- ], FlatcoinPriceParent);
@@ -1,7 +0,0 @@
1
- export * from './apy';
2
- export * from './flatcoin.price.one.day';
3
- export * from './flatcoin.price.one.month';
4
- export * from './flatcoin.price.one.week';
5
- export * from './flatcoin.price.one.year';
6
- export * from './flatcoin.price.parent';
7
- export * from './flatcoin.price';
@@ -1,23 +0,0 @@
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("./apy"), exports);
18
- __exportStar(require("./flatcoin.price.one.day"), exports);
19
- __exportStar(require("./flatcoin.price.one.month"), exports);
20
- __exportStar(require("./flatcoin.price.one.week"), exports);
21
- __exportStar(require("./flatcoin.price.one.year"), exports);
22
- __exportStar(require("./flatcoin.price.parent"), exports);
23
- __exportStar(require("./flatcoin.price"), exports);
@@ -1,12 +0,0 @@
1
- import { BigNumber } from 'ethers';
2
- declare class ColumnNumericTransformer {
3
- to(data: number): number;
4
- from(data: string): number;
5
- }
6
- export declare const numericTransformer: ColumnNumericTransformer;
7
- declare class ColumnBigNumberTransformer {
8
- to(data?: BigNumber): bigint | undefined;
9
- from(data?: bigint): BigNumber | null;
10
- }
11
- export declare const bigNumberTransformer: ColumnBigNumberTransformer;
12
- export {};
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.bigNumberTransformer = exports.numericTransformer = void 0;
4
- const ethers_1 = require("ethers");
5
- class ColumnNumericTransformer {
6
- to(data) {
7
- return data;
8
- }
9
- from(data) {
10
- return parseFloat(data);
11
- }
12
- }
13
- exports.numericTransformer = new ColumnNumericTransformer();
14
- class ColumnBigNumberTransformer {
15
- to(data) {
16
- return data?.toBigInt();
17
- }
18
- from(data) {
19
- return data ? ethers_1.BigNumber.from(data) : null;
20
- }
21
- }
22
- exports.bigNumberTransformer = new ColumnBigNumberTransformer();
@@ -1 +0,0 @@
1
- export * from './column.numeric.transformer';
@@ -1,17 +0,0 @@
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("./column.numeric.transformer"), exports);