@cardano-sdk/projection-typeorm 0.2.3 → 0.3.1

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 (73) hide show
  1. package/dist/cjs/entity/CurrentPoolMetrics.entity.d.ts +5 -4
  2. package/dist/cjs/entity/CurrentPoolMetrics.entity.d.ts.map +1 -1
  3. package/dist/cjs/entity/CurrentPoolMetrics.entity.js +1 -0
  4. package/dist/cjs/entity/CurrentPoolMetrics.entity.js.map +1 -1
  5. package/dist/cjs/entity/Handle.entity.d.ts +10 -0
  6. package/dist/cjs/entity/Handle.entity.d.ts.map +1 -0
  7. package/dist/cjs/entity/Handle.entity.js +43 -0
  8. package/dist/cjs/entity/Handle.entity.js.map +1 -0
  9. package/dist/cjs/entity/PoolMetadata.entity.js +1 -1
  10. package/dist/cjs/entity/PoolMetadata.entity.js.map +1 -1
  11. package/dist/cjs/entity/PoolRegistration.entity.d.ts +4 -1
  12. package/dist/cjs/entity/PoolRegistration.entity.d.ts.map +1 -1
  13. package/dist/cjs/entity/PoolRegistration.entity.js +6 -0
  14. package/dist/cjs/entity/PoolRegistration.entity.js.map +1 -1
  15. package/dist/cjs/entity/index.d.ts +1 -0
  16. package/dist/cjs/entity/index.d.ts.map +1 -1
  17. package/dist/cjs/entity/index.js +1 -0
  18. package/dist/cjs/entity/index.js.map +1 -1
  19. package/dist/cjs/operators/index.d.ts +1 -0
  20. package/dist/cjs/operators/index.d.ts.map +1 -1
  21. package/dist/cjs/operators/index.js +1 -0
  22. package/dist/cjs/operators/index.js.map +1 -1
  23. package/dist/cjs/operators/storeAssets.d.ts +7 -1
  24. package/dist/cjs/operators/storeAssets.d.ts.map +1 -1
  25. package/dist/cjs/operators/storeAssets.js +41 -17
  26. package/dist/cjs/operators/storeAssets.js.map +1 -1
  27. package/dist/cjs/operators/storeHandles.d.ts +4 -0
  28. package/dist/cjs/operators/storeHandles.d.ts.map +1 -0
  29. package/dist/cjs/operators/storeHandles.js +85 -0
  30. package/dist/cjs/operators/storeHandles.js.map +1 -0
  31. package/dist/cjs/operators/storeStakeKeys.js +1 -1
  32. package/dist/cjs/operators/storeStakeKeys.js.map +1 -1
  33. package/dist/cjs/operators/util.d.ts +1 -1
  34. package/dist/cjs/operators/util.d.ts.map +1 -1
  35. package/dist/cjs/operators/util.js.map +1 -1
  36. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  37. package/dist/esm/entity/CurrentPoolMetrics.entity.d.ts +5 -4
  38. package/dist/esm/entity/CurrentPoolMetrics.entity.d.ts.map +1 -1
  39. package/dist/esm/entity/CurrentPoolMetrics.entity.js +1 -0
  40. package/dist/esm/entity/CurrentPoolMetrics.entity.js.map +1 -1
  41. package/dist/esm/entity/Handle.entity.d.ts +10 -0
  42. package/dist/esm/entity/Handle.entity.d.ts.map +1 -0
  43. package/dist/esm/entity/Handle.entity.js +40 -0
  44. package/dist/esm/entity/Handle.entity.js.map +1 -0
  45. package/dist/esm/entity/PoolMetadata.entity.js +1 -1
  46. package/dist/esm/entity/PoolMetadata.entity.js.map +1 -1
  47. package/dist/esm/entity/PoolRegistration.entity.d.ts +4 -1
  48. package/dist/esm/entity/PoolRegistration.entity.d.ts.map +1 -1
  49. package/dist/esm/entity/PoolRegistration.entity.js +7 -1
  50. package/dist/esm/entity/PoolRegistration.entity.js.map +1 -1
  51. package/dist/esm/entity/index.d.ts +1 -0
  52. package/dist/esm/entity/index.d.ts.map +1 -1
  53. package/dist/esm/entity/index.js +1 -0
  54. package/dist/esm/entity/index.js.map +1 -1
  55. package/dist/esm/operators/index.d.ts +1 -0
  56. package/dist/esm/operators/index.d.ts.map +1 -1
  57. package/dist/esm/operators/index.js +1 -0
  58. package/dist/esm/operators/index.js.map +1 -1
  59. package/dist/esm/operators/storeAssets.d.ts +7 -1
  60. package/dist/esm/operators/storeAssets.d.ts.map +1 -1
  61. package/dist/esm/operators/storeAssets.js +40 -16
  62. package/dist/esm/operators/storeAssets.js.map +1 -1
  63. package/dist/esm/operators/storeHandles.d.ts +4 -0
  64. package/dist/esm/operators/storeHandles.d.ts.map +1 -0
  65. package/dist/esm/operators/storeHandles.js +82 -0
  66. package/dist/esm/operators/storeHandles.js.map +1 -0
  67. package/dist/esm/operators/storeStakeKeys.js +1 -1
  68. package/dist/esm/operators/storeStakeKeys.js.map +1 -1
  69. package/dist/esm/operators/util.d.ts +1 -1
  70. package/dist/esm/operators/util.d.ts.map +1 -1
  71. package/dist/esm/operators/util.js.map +1 -1
  72. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  73. package/package.json +8 -17
@@ -1,4 +1,5 @@
1
1
  import { Cardano } from '@cardano-sdk/core';
2
+ import { Percent } from '@cardano-sdk/util';
2
3
  import { StakePoolEntity } from './StakePool.entity';
3
4
  export declare class CurrentPoolMetricsEntity {
4
5
  stakePoolId?: Cardano.PoolId;
@@ -9,9 +10,9 @@ export declare class CurrentPoolMetricsEntity {
9
10
  activeStake?: Cardano.Lovelace;
10
11
  liveStake?: Cardano.Lovelace;
11
12
  livePledge?: Cardano.Lovelace;
12
- liveSaturation?: Cardano.Percent;
13
- activeSize?: Cardano.Percent;
14
- liveSize?: Cardano.Percent;
15
- apy?: Cardano.Percent;
13
+ liveSaturation?: Percent;
14
+ activeSize?: Percent;
15
+ liveSize?: Percent;
16
+ apy?: Percent;
16
17
  }
17
18
  //# sourceMappingURL=CurrentPoolMetrics.entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CurrentPoolMetrics.entity.d.ts","sourceRoot":"","sources":["../../../src/entity/CurrentPoolMetrics.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,qBACa,wBAAwB;IAGnC,WAAW,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC;IAG7B,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC;IAInB,SAAS,CAAC,EAAE,eAAe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 -13,6 +13,7 @@ exports.CurrentPoolMetricsEntity = void 0;
13
13
  const util_1 = require("./util");
14
14
  const core_1 = require("@cardano-sdk/core");
15
15
  const typeorm_1 = require("typeorm");
16
+ const util_2 = require("@cardano-sdk/util");
16
17
  const StakePool_entity_1 = require("./StakePool.entity");
17
18
  const transformers_1 = require("./transformers");
18
19
  let CurrentPoolMetricsEntity = class CurrentPoolMetricsEntity {
@@ -1 +1 @@
1
- {"version":3,"file":"CurrentPoolMetrics.entity.js","sourceRoot":"","sources":["../../../src/entity/CurrentPoolMetrics.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iCAA2E;AAC3E,4CAA4C;AAC5C,qCAA8E;AAC9E,yDAAqD;AACrD,iDAAuC;AAGhC,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;CAsCpC,CAAA;AApCC;IAAC,IAAA,uBAAa,EAAC,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6DACf;AAE7B;IAAC,IAAA,gBAAM,GAAE;;sDACU;AAEnB;IAAC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,kCAAe,EAAE,mCAA4B,CAAC;IAC7D,IAAA,oBAAU,GAAE;8BACD,kCAAe;2DAAC;AAE5B;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;8DACN;AAEtB;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;gEACJ;AAExB;IAAC,IAAA,gBAAM,EAAC,0BAAmB,CAAC;;6DACG;AAE/B;IAAC,IAAA,gBAAM,EAAC,0BAAmB,CAAC;;2DACC;AAE7B;IAAC,IAAA,gBAAM,EAAC,0BAAmB,CAAC;;4DACE;AAE9B;IAAC,IAAA,gBAAM,EAAC,EAAE,WAAW,EAAE,oBAAK,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;gEACf;AAEjC;IAAC,IAAA,gBAAM,EAAC,EAAE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W,EAAE,oBAAK,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;gEACvB;AAEzB;IAAC,IAAA,gBAAM,EAAC,EAAE,WAAW,EAAE,oBAAK,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;4DAC3B;AAErB;IAAC,IAAA,gBAAM,EAAC,EAAE,WAAW,EAAE,oBAAK,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;0DAC7B;AAEnB;IAAC,IAAA,gBAAM,EAAC,EAAE,WAAW,EAAE,oBAAK,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;qDAClC;AArCH,wBAAwB;IADpC,IAAA,gBAAM,GAAE;GACI,wBAAwB,CAsCpC;AAtCY,4DAAwB"}
@@ -0,0 +1,10 @@
1
+ import { AssetEntity } from './Asset.entity';
2
+ import { Cardano } from '@cardano-sdk/core';
3
+ export declare class HandleEntity {
4
+ handle?: string;
5
+ cardanoAddress?: Cardano.PaymentAddress;
6
+ asset?: AssetEntity;
7
+ policyId?: Cardano.PolicyId;
8
+ hasDatum?: boolean;
9
+ }
10
+ //# sourceMappingURL=Handle.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Handle.entity.d.ts","sourceRoot":"","sources":["../../../src/entity/Handle.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,qBACa,YAAY;IAEvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,cAAc,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;IAGxC,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC;IAE5B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
@@ -0,0 +1,43 @@
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.HandleEntity = void 0;
13
+ const Asset_entity_1 = require("./Asset.entity");
14
+ const core_1 = require("@cardano-sdk/core");
15
+ const typeorm_1 = require("typeorm");
16
+ let HandleEntity = class HandleEntity {
17
+ };
18
+ __decorate([
19
+ (0, typeorm_1.PrimaryColumn)(),
20
+ __metadata("design:type", String)
21
+ ], HandleEntity.prototype, "handle", void 0);
22
+ __decorate([
23
+ (0, typeorm_1.Column)({ nullable: true }),
24
+ __metadata("design:type", String)
25
+ ], HandleEntity.prototype, "cardanoAddress", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.OneToOne)(() => Asset_entity_1.AssetEntity, { onDelete: 'CASCADE' }),
28
+ (0, typeorm_1.JoinColumn)(),
29
+ __metadata("design:type", Asset_entity_1.AssetEntity)
30
+ ], HandleEntity.prototype, "asset", void 0);
31
+ __decorate([
32
+ (0, typeorm_1.Column)(),
33
+ __metadata("design:type", String)
34
+ ], HandleEntity.prototype, "policyId", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)(),
37
+ __metadata("design:type", Boolean)
38
+ ], HandleEntity.prototype, "hasDatum", void 0);
39
+ HandleEntity = __decorate([
40
+ (0, typeorm_1.Entity)()
41
+ ], HandleEntity);
42
+ exports.HandleEntity = HandleEntity;
43
+ //# sourceMappingURL=Handle.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Handle.entity.js","sourceRoot":"","sources":["../../../src/entity/Handle.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA6C;AAC7C,4CAA4C;AAC5C,qCAA8E;AAGvE,IAAM,YAAY,GAAlB,MAAM,YAAY;CAYxB,CAAA;AAXC;IAAC,IAAA,uBAAa,GAAE;;4CACA;AAChB;IAAC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACa;AACxC;IAAC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,0BAAW,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACpD,IAAA,oBAAU,GAAE;8BACL,0BAAW;2CAAC;AACpB;IAAC,IAAA,gBAAM,GAAE;;8CACmB;AAC5B;IAAC,IAAA,gBAAM,GAAE;;8CACU;AAXR,YAAY;IADxB,IAAA,gBAAM,GAAE;GACI,YAAY,CAYxB;AAZY,oCAAY"}
@@ -53,7 +53,7 @@ __decorate([
53
53
  ], PoolMetadataEntity.prototype, "stakePool", void 0);
54
54
  __decorate([
55
55
  (0, typeorm_1.JoinColumn)(),
56
- (0, typeorm_1.OneToOne)(() => PoolRegistration_entity_1.PoolRegistrationEntity, util_1.DeleteCascadeRelationOptions),
56
+ (0, typeorm_1.OneToOne)(() => PoolRegistration_entity_1.PoolRegistrationEntity, (poolUpdate) => poolUpdate.metadata, util_1.DeleteCascadeRelationOptions),
57
57
  __metadata("design:type", PoolRegistration_entity_1.PoolRegistrationEntity)
58
58
  ], PoolMetadataEntity.prototype, "poolUpdate", void 0);
59
59
  PoolMetadataEntity = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"PoolMetadata.entity.js","sourceRoot":"","sources":["../../../src/entity/PoolMetadata.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qCAAyG;AACzG,iCAAsD;AACtD,uEAAmE;AACnE,yDAAqD;AAG9C,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAuB9B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AACd;IAAC,IAAA,gBAAM,EAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACuB;AAC3D;IAAC,IAAA,oBAAU,EAAC,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IAC1C,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kCAAe,CAAC;8BACrB,kCAAe;qDAAC;AAC5B;IAAC,IAAA,oBAAU,GAAE;IACZ,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,gDAAsB,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,mCAA4B,CAAC;8BAC7F,gDAAsB;sDAAC;AAtBzB,kBAAkB;IAD9B,IAAA,gBAAM,GAAE;GACI,kBAAkB,CAuB9B;AAvBY,gDAAkB"}
@@ -1,5 +1,7 @@
1
1
  import { BlockEntity } from './Block.entity';
2
2
  import { Cardano } from '@cardano-sdk/core';
3
+ import { Percent } from '@cardano-sdk/util';
4
+ import { PoolMetadataEntity } from './PoolMetadata.entity';
3
5
  import { StakePoolEntity } from './StakePool.entity';
4
6
  export declare class PoolRegistrationEntity {
5
7
  id?: bigint;
@@ -7,13 +9,14 @@ export declare class PoolRegistrationEntity {
7
9
  pledge?: bigint;
8
10
  cost?: bigint;
9
11
  margin?: Cardano.Fraction;
10
- marginPercent?: Cardano.Percent;
12
+ marginPercent?: Percent;
11
13
  relays?: Cardano.Relay[];
12
14
  owners?: Cardano.RewardAccount[];
13
15
  vrf?: Cardano.VrfVkHex;
14
16
  metadataUrl?: string | null;
15
17
  metadataHash?: string | null;
16
18
  stakePool?: StakePoolEntity;
19
+ metadata?: PoolMetadataEntity | null;
17
20
  block?: BlockEntity;
18
21
  }
19
22
  //# sourceMappingURL=PoolRegistration.entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PoolRegistration.entity.d.ts","sourceRoot":"","sources":["../../../src/entity/PoolRegistration.entity.ts"],"names":[],"mappings":"AAEA,OAAO,EA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AM,CAAC,EAAE,MAAM,CAAC;IAEhB,IAAI,CAAC,EAAE,MAAM,CAAC;IAKd,MAAM,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC;IAE1B,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;IAEzB,MAAM,CAAC,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC;IAEjC,GAAG,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC;IAEvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAG7B,SAAS,CAAC,EAAE,eAAe,CAAC;IAE5B,QAAQ,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAGrC,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB"}
@@ -14,6 +14,8 @@ const util_1 = require("./util");
14
14
  const Block_entity_1 = require("./Block.entity");
15
15
  const core_1 = require("@cardano-sdk/core");
16
16
  const typeorm_1 = require("typeorm");
17
+ const util_2 = require("@cardano-sdk/util");
18
+ const PoolMetadata_entity_1 = require("./PoolMetadata.entity");
17
19
  const StakePool_entity_1 = require("./StakePool.entity");
18
20
  let PoolRegistrationEntity = class PoolRegistrationEntity {
19
21
  };
@@ -66,6 +68,10 @@ __decorate([
66
68
  (0, typeorm_1.ManyToOne)(() => StakePool_entity_1.StakePoolEntity, (stakePool) => stakePool.registrations, util_1.DeleteCascadeRelationOptions),
67
69
  __metadata("design:type", StakePool_entity_1.StakePoolEntity)
68
70
  ], PoolRegistrationEntity.prototype, "stakePool", void 0);
71
+ __decorate([
72
+ (0, typeorm_1.OneToOne)(() => PoolMetadata_entity_1.PoolMetadataEntity, (metadata) => metadata.poolUpdate),
73
+ __metadata("design:type", Object)
74
+ ], PoolRegistrationEntity.prototype, "metadata", void 0);
69
75
  __decorate([
70
76
  (0, typeorm_1.ManyToOne)(() => Block_entity_1.BlockEntity, util_1.DeleteCascadeRelationOptions),
71
77
  (0, typeorm_1.JoinColumn)(),
@@ -1 +1 @@
1
- {"version":3,"file":"PoolRegistration.entity.js","sourceRoot":"","sources":["../../../src/entity/PoolRegistration.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iCAA2E;AAC3E,iDAA6C;AAC7C,4CAA4C;AAC5C,qCAA+E;AAC/E,yDAAqD;AAG9C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;CAoClC,CAAA;AA/BC;IAAC,IAAA,uBAAa,EAAC,0BAAmB,CAAC;;kDACvB;AACZ;IAAC,IAAA,gBAAM,GAAE;;6DAC6B;AACtC;IAAC,IAAA,gBAAM,EAAC,0BAAmB,CAAC;;sDACZ;AAChB;IAAC,IAAA,gBAAM,EAAC,0BAAmB,CAAC;;oDACd;AAId;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;sDACA;AAC1B;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;;6DACK;AAChC;IAAC,IAAA,gBAAM,EAAC,OAAO,CAAC;;sDACS;AACzB;IAAC,IAAA,gBAAM,EAAC,OAAO,CAAC;;sDACiB;AACjC;IAAC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDACd;AACvB;IAAC,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DACV;AAC5B;IAAC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4DACxB;AAC7B;IAAC,IAAA,oBAAU,GAAE;IACZ,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kCAAe,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,mCAA4B,CAAC;8B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AAM,EAAE,CAAC;;4DACxB;AAC7B;IAAC,IAAA,oBAAU,GAAE;IACZ,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kCAAe,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,mCAA4B,CAAC;8BAC3F,kCAAe;yDAAC;AAC5B;IAAC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,wCAAkB,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC;;wDACjC;AACrC;IAAC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,0BAAW,EAAE,mCAA4B,CAAC;IAC1D,IAAA,oBAAU,GAAE;8BACL,0BAAW;qDAAC;AArCT,sBAAsB;IADlC,IAAA,gBAAM,GAAE;GACI,sBAAsB,CAsClC;AAtCY,wDAAsB"}
@@ -9,4 +9,5 @@ export * from './Asset.entity';
9
9
  export * from './Tokens.entity';
10
10
  export * from './Output.entity';
11
11
  export * from './CurrentPoolMetrics.entity';
12
+ export * from './Handle.entity';
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC"}
@@ -25,4 +25,5 @@ __exportStar(require("./Asset.entity"), exports);
25
25
  __exportStar(require("./Tokens.entity"), exports);
26
26
  __exportStar(require("./Output.entity"), exports);
27
27
  __exportStar(require("./CurrentPoolMetrics.entity"), exports);
28
+ __exportStar(require("./Handle.entity"), exports);
28
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entity/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,iDAA+B;AAC/B,oDAAkC;AAClC,qDAAmC;AACnC,0DAAwC;AACxC,4DAA0C;AAC1C,wDAAsC;AACtC,iDAA+B;AAC/B,kDAAgC;AAChC,kDAAgC;AAChC,8DAA4C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entity/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,iDAA+B;AAC/B,oDAAkC;AAClC,qDAAmC;AACnC,0DAAwC;AACxC,4DAA0C;AAC1C,wDAAsC;AACtC,iDAA+B;AAC/B,kDAAgC;AAChC,kDAAgC;AAChC,8DAA4C;AAC5C,kDAAgC"}
@@ -5,6 +5,7 @@ export * from './withTypeormTransaction';
5
5
  export * from './storeBlock';
6
6
  export * from './storeAssets';
7
7
  export * from './storeUtxo';
8
+ export * from './storeHandles';
8
9
  export * from './util';
9
10
  export * from './storePoolMetricsUpdateJob';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/operators/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/operators/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,6BAA6B,CAAC"}
@@ -21,6 +21,7 @@ __exportStar(require("./withTypeormTransaction"), exports);
21
21
  __exportStar(require("./storeBlock"), exports);
22
22
  __exportStar(require("./storeAssets"), exports);
23
23
  __exportStar(require("./storeUtxo"), exports);
24
+ __exportStar(require("./storeHandles"), exports);
24
25
  __exportStar(require("./util"), exports);
25
26
  __exportStar(require("./storePoolMetricsUpdateJob"), exports);
26
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/operators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,oDAAkC;AAClC,8DAA4C;AAC5C,2DAAyC;AACzC,+CAA6B;AAC7B,gDAA8B;AAC9B,8CAA4B;AAC5B,yCAAuB;AACvB,8DAA4C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/operators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,oDAAkC;AAClC,8DAA4C;AAC5C,2DAAyC;AACzC,+CAA6B;AAC7B,gDAA8B;AAC9B,8CAA4B;AAC5B,iDAA+B;AAC/B,yCAAuB;AACvB,8DAA4C"}
@@ -1,3 +1,9 @@
1
+ import { Cardano } from '@cardano-sdk/core';
1
2
  import { Mappers } from '@cardano-sdk/projection';
2
- export declare const storeAssets: <SourceExtraRollForwardPropsIn extends import("@cardano-sdk/projection").WithNetworkInfo & import("@cardano-sdk/projection").WithEpochNo & import("@cardano-sdk/projection").WithEpochBoundary & import("./withTypeormTransaction").WithTypeormContext & Mappers.WithMint, SourceExtraRollBackwardPropsIn extends import("@cardano-sdk/projection").WithNetworkInfo & import("@cardano-sdk/projection").WithEpochNo & import("@cardano-sdk/projection").WithEpochBoundary & import("./withTypeormTransaction").WithTypeormContext & Mappers.WithMint & import("@cardano-sdk/projection").WithBlock>() => import("@cardano-sdk/projection").ExtChainSyncOperator<SourceExtraRollForwardPropsIn, SourceExtraRollBackwardPropsIn, {}, {}>;
3
+ declare type MintedAssetSupplies = Partial<Record<Cardano.AssetId, bigint>>;
4
+ export declare type WithMintedAssetSupplies = {
5
+ mintedAssetTotalSupplies: MintedAssetSupplies;
6
+ };
7
+ export declare const storeAssets: <SourceExtraRollForwardPropsIn extends import("@cardano-sdk/projection").WithNetworkInfo & import("@cardano-sdk/projection").WithEpochNo & import("@cardano-sdk/projection").WithEpochBoundary & import("./withTypeormTransaction").WithTypeormContext & Mappers.WithMint, SourceExtraRollBackwardPropsIn extends import("@cardano-sdk/projection").WithNetworkInfo & import("@cardano-sdk/projection").WithEpochNo & import("@cardano-sdk/projection").WithEpochBoundary & import("./withTypeormTransaction").WithTypeormContext & Mappers.WithMint & import("@cardano-sdk/projection").WithBlock>() => import("@cardano-sdk/projection").ExtChainSyncOperator<SourceExtraRollForwardPropsIn, SourceExtraRollBackwardPropsIn, WithMintedAssetSupplies, WithMintedAssetSupplies>;
8
+ export {};
3
9
  //# sourceMappingURL=storeAssets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"storeAssets.d.ts","sourceRoot":"","sources":["../../../src/operators/storeAssets.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAGlD,eAAO,MAAM,WAAW,wsBAoBvB,CAAC"}
1
+ {"version":3,"file":"storeAssets.d.ts","sourceRoot":"","sources":["../../../src/operators/storeAssets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAsB,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAIlD,aAAK,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAOpE,oBAAY,uBAAuB,GAAG;IACpC,wBAAwB,EAAE,mBAAmB,CAAC;CAC/C,CAAC;AAwCF,eAAO,MAAM,WAAW,kvBASvB,CAAC"}
@@ -1,27 +1,51 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.storeAssets = void 0;
4
- const Asset_entity_1 = require("../entity/Asset.entity");
4
+ const entity_1 = require("../entity");
5
5
  const core_1 = require("@cardano-sdk/core");
6
6
  const util_1 = require("./util");
7
- exports.storeAssets = (0, util_1.typeormOperator)(async ({ mint, block: { header }, eventType, queryRunner }) => {
8
- const repository = queryRunner.manager.getRepository(Asset_entity_1.AssetEntity);
9
- if (eventType === core_1.ChainSyncEventType.RollForward) {
10
- for (const { assetId, quantity } of mint) {
11
- const storedAsset = await repository.findOne({ select: { supply: true }, where: { id: assetId } });
12
- await (storedAsset
13
- ? repository.increment({ id: assetId }, 'supply', quantity.toString())
14
- : repository.insert({
15
- firstMintBlock: { slot: header.slot },
16
- id: assetId,
17
- supply: quantity
18
- }));
7
+ const rollForward = async ({ mint, queryRunner, header }) => {
8
+ const mintedAssetTotalSupplies = {};
9
+ const repository = queryRunner.manager.getRepository(entity_1.AssetEntity);
10
+ for (const { assetId, quantity } of mint) {
11
+ const storedAsset = await repository.findOne({ select: { supply: true }, where: { id: assetId } });
12
+ if (storedAsset) {
13
+ const newSupply = storedAsset.supply + quantity;
14
+ await repository.update({ id: assetId }, { supply: newSupply });
15
+ mintedAssetTotalSupplies[assetId] = newSupply;
19
16
  }
20
- }
21
- else {
22
- for (const { assetId, quantity } of mint) {
23
- await repository.increment({ id: assetId }, 'supply', (-quantity).toString());
17
+ else {
18
+ await repository.insert({
19
+ firstMintBlock: { slot: header.slot },
20
+ id: assetId,
21
+ supply: quantity
22
+ });
23
+ mintedAssetTotalSupplies[assetId] = quantity;
24
24
  }
25
25
  }
26
+ return mintedAssetTotalSupplies;
27
+ };
28
+ const rollBackward = async ({ mint, queryRunner }) => {
29
+ const mintedAssetTotalSupplies = {};
30
+ for (const { assetId, quantity } of mint) {
31
+ const isPositiveQuantity = quantity > 0n;
32
+ const absQuantity = isPositiveQuantity ? quantity : -1n * quantity;
33
+ const queryResponse = await queryRunner.manager
34
+ .createQueryBuilder(entity_1.AssetEntity, 'asset')
35
+ .update()
36
+ .set({ supply: () => `supply ${isPositiveQuantity ? '-' : '+'} ${absQuantity}` })
37
+ .where({ id: assetId })
38
+ .returning(['supply'])
39
+ .execute();
40
+ mintedAssetTotalSupplies[assetId] = queryResponse.affected === 0 ? 0n : BigInt(queryResponse.raw[0].supply);
41
+ }
42
+ return mintedAssetTotalSupplies;
43
+ };
44
+ exports.storeAssets = (0, util_1.typeormOperator)(async ({ mint, block: { header }, eventType, queryRunner }) => {
45
+ const storeAssetEventParams = { header, mint, queryRunner };
46
+ const mintedAssetTotalSupplies = eventType === core_1.ChainSyncEventType.RollForward
47
+ ? await rollForward(storeAssetEventParams)
48
+ : await rollBackward(storeAssetEventParams);
49
+ return { mintedAssetTotalSupplies };
26
50
  });
27
51
  //# sourceMappingURL=storeAssets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"storeAssets.js","sourceRoot":"","sources":["../../../src/operators/storeAssets.ts"],"names":[],"mappings":";;;AAAA,yDAAqD;AACrD,4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';
2
+ import { WithMintedAssetSupplies } from './storeAssets';
3
+ export declare const storeHandles: <SourceExtraRollForwardPropsIn extends import("@cardano-sdk/projection").WithNetworkInfo & import("@cardano-sdk/projection").WithEpochNo & import("@cardano-sdk/projection").WithEpochBoundary & import("./withTypeormTransaction").WithTypeormContext & Mappers.WithHandles & Mappers.WithMint & WithMintedAssetSupplies, SourceExtraRollBackwardPropsIn extends import("@cardano-sdk/projection").WithNetworkInfo & import("@cardano-sdk/projection").WithEpochNo & import("@cardano-sdk/projection").WithEpochBoundary & import("./withTypeormTransaction").WithTypeormContext & Mappers.WithHandles & Mappers.WithMint & WithMintedAssetSupplies & import("@cardano-sdk/projection").WithBlock>() => import("@cardano-sdk/projection").ExtChainSyncOperator<SourceExtraRollForwardPropsIn, SourceExtraRollBackwardPropsIn, {}, {}>;
4
+ //# sourceMappingURL=storeHandles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storeHandles.d.ts","sourceRoot":"","sources":["../../../src/operators/storeHandles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAgGxD,eAAO,MAAM,YAAY,wyBAiBxB,CAAC"}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.storeHandles = void 0;
4
+ const entity_1 = require("../entity");
5
+ const core_1 = require("@cardano-sdk/core");
6
+ const util_1 = require("./util");
7
+ const getOwner = async (queryRunner, assetId) => {
8
+ const rows = await queryRunner.manager
9
+ .createQueryBuilder('tokens', 't')
10
+ .innerJoinAndSelect('output', 'o', 'o.id = t.output_id')
11
+ .select('address, o.datum')
12
+ .distinct()
13
+ .where('o.consumed_at_slot IS NULL')
14
+ .andWhere('t.asset_id = :assetId', { assetId })
15
+ .getRawMany();
16
+ if (rows.length !== 1)
17
+ return {
18
+ cardanoAddress: null,
19
+ hasDatum: false
20
+ };
21
+ return {
22
+ cardanoAddress: rows[0].address,
23
+ hasDatum: !!rows[0].datum
24
+ };
25
+ };
26
+ const getSupply = async (queryRunner, assetId) => {
27
+ const asset = await queryRunner.manager
28
+ .getRepository(entity_1.AssetEntity)
29
+ .findOne({ select: { supply: true }, where: { id: assetId } });
30
+ if (!asset)
31
+ return 0n;
32
+ return asset.supply;
33
+ };
34
+ const rollForward = async ({ handles, queryRunner }) => {
35
+ const handleRepository = queryRunner.manager.getRepository(entity_1.HandleEntity);
36
+ for (const { assetId, handle, policyId, latestOwnerAddress, datum, totalSupply } of handles) {
37
+ if (totalSupply === 1n) {
38
+ const { cardanoAddress, hasDatum } = latestOwnerAddress
39
+ ? { cardanoAddress: latestOwnerAddress, hasDatum: !!datum }
40
+ : await getOwner(queryRunner, assetId);
41
+ await handleRepository.upsert({
42
+ asset: assetId,
43
+ cardanoAddress,
44
+ handle,
45
+ hasDatum,
46
+ policyId
47
+ }, {
48
+ conflictPaths: {
49
+ handle: true
50
+ }
51
+ });
52
+ }
53
+ else {
54
+ await handleRepository.update({ handle }, { cardanoAddress: null });
55
+ }
56
+ }
57
+ };
58
+ const rollBackward = async ({ handles, queryRunner }) => {
59
+ const handleRepository = queryRunner.manager.getRepository(entity_1.HandleEntity);
60
+ for (const { assetId, handle, totalSupply } of handles) {
61
+ const newOwnerAddressAndDatum = totalSupply === 1n ? await getOwner(queryRunner, assetId) : { cardanoAddress: null, hasDatum: false };
62
+ await handleRepository.update({ handle }, newOwnerAddressAndDatum);
63
+ }
64
+ };
65
+ const withTotalSupplies = (queryRunner, handles, mintedAssetTotalSupplies) => Promise.all(handles.map(async (handle) => ({
66
+ ...handle,
67
+ totalSupply: mintedAssetTotalSupplies[handle.assetId] || (await getSupply(queryRunner, handle.assetId))
68
+ })));
69
+ exports.storeHandles = (0, util_1.typeormOperator)(async ({ mint, handles, queryRunner, eventType, block, mintedAssetTotalSupplies }) => {
70
+ const handleEventParams = {
71
+ block,
72
+ handles: await withTotalSupplies(queryRunner, handles, mintedAssetTotalSupplies),
73
+ mint,
74
+ queryRunner
75
+ };
76
+ try {
77
+ eventType === core_1.ChainSyncEventType.RollForward
78
+ ? await rollForward(handleEventParams)
79
+ : await rollBackward(handleEventParams);
80
+ }
81
+ catch (error) {
82
+ throw new Error(error.message);
83
+ }
84
+ });
85
+ //# sourceMappingURL=storeHandles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storeHandles.js","sourceRoot":"","sources":["../../../src/operators/storeHandles.ts"],"names":[],"mappings":";;;AAAA,sCAAsD;AACtD,4CAAgE;AAIhE,iCAAyC;AAWzC,MAAM,QAAQ,GAAG,KAAK,EACpB,WAAwB,EACxB,OAAe,EACyD,EAAE;IAC1E,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,OAAO;SACnC,kBAAkB,CAAC,QAAQ,EAAE,GAAG,CAAC;SACjC,kBAAkB,CAAC,QAAQ,EAAE,GAAG,EAAE,oBAAoB,CAAC;SACvD,MAAM,CAAC,kBAAkB,CAAC;SAC1B,QAAQ,EAAE;SACV,KAAK,CAAC,4BAA4B,CAAC;SACnC,QAAQ,CAAC,uBAAuB,EAAE,EAAE,OAAO,EAAE,CAAC;SAC9C,UAAU,EAAE,CAAC;IAChB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QACnB,OAAO;YACL,cAAc,EAAE,IAAI;YACpB,QAAQ,EAAE,KAAK;SAChB,CAAC;IACJ,OAAO;QACL,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO;QAC/B,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK;KAC1B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,KAAK,EAAE,WAAwB,EAAE,OAAwB,EAAE,EAAE;IAC7E,MAAM,KAAK,GAAG,MAAM,WAAW,CAAC,OAAO;SACpC,aAAa,CAAC,oBAAW,CAAC;SAC1B,OAAO,CAAC,EAAE,MAAM,EAA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,KAAe,CAAC,OAAO,CAAC,CAAC;KAC3C;AACH,CAAC,CACF,CAAC"}
@@ -7,6 +7,6 @@ exports.storeStakeKeys = (0, util_1.typeormOperator)(async ({ queryRunner, stake
7
7
  const repository = queryRunner.manager.getRepository(StakeKey_entity_1.StakeKeyEntity);
8
8
  const createAll = insert.length > 0 ? repository.insert(insert.map((hash) => ({ hash }))) : Promise.resolve();
9
9
  const deleteAll = del.length > 0 ? repository.delete(del) : Promise.resolve();
10
- return Promise.all([createAll, deleteAll]);
10
+ await Promise.all([createAll, deleteAll]);
11
11
  });
12
12
  //# sourceMappingURL=storeStakeKeys.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"storeStakeKeys.js","sourceRoot":"","sources":["../../../src/operators/storeStakeKeys.ts"],"names":[],"mappings":";;;AACA,+DAA2D;AAC3D,iCAAyC;AAE5B,QAAA,cAAc,GAAG,IAAA,sBAAe,EAC3C,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;IACpD,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,gCAAc,CAAC,CAAC;IACrE,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IAC9G,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IAC9E,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAC7C,CAAC,CACF,CAAC"}
1
+ {"version":3,"file":"storeStakeKeys.js","sourceRoot":"","sources":["../../../src/operators/storeStakeKeys.ts"],"names":[],"mappings":";;;AACA,+DAA2D;AAC3D,iCAAyC;AAE5B,QAAA,cAAc,GAAG,IAAA,sBAAe,EAC3C,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;IACpD,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,gCAAc,CAAC,CAAC;IACrE,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IAC9G,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IAC9E,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAC5C,CAAC,CACF,CAAC"}
@@ -3,5 +3,5 @@ import { WithTypeormContext } from './withTypeormTransaction';
3
3
  export declare const certificatePointerToId: ({ slot, certIndex, txIndex }: Mappers.CertificatePointer) => bigint;
4
4
  export declare const MaxCertificatePointerIdTxIndex = 99999;
5
5
  export declare const MaxCertificatePointerIdCertificateIndex = 9999;
6
- export declare const typeormOperator: <PropsIn = {}, PropsOut extends {} = {}>(op: (evt: ProjectionEvent<WithTypeormContext & PropsIn>) => Promise<void | PropsOut>) => <SourceExtraRollForwardPropsIn extends import("@cardano-sdk/projection").WithNetworkInfo & import("@cardano-sdk/projection").WithEpochNo & import("@cardano-sdk/projection").WithEpochBoundary & WithTypeormContext & PropsIn, SourceExtraRollBackwardPropsIn extends import("@cardano-sdk/projection").WithNetworkInfo & import("@cardano-sdk/projection").WithEpochNo & import("@cardano-sdk/projection").WithEpochBoundary & WithTypeormContext & PropsIn & import("@cardano-sdk/projection").WithBlock>() => import("@cardano-sdk/projection").ExtChainSyncOperator<SourceExtraRollForwardPropsIn, SourceExtraRollBackwardPropsIn, PropsOut, PropsOut>;
6
+ export declare const typeormOperator: <PropsIn = {}, PropsOut extends {} = {}>(op: (evt: ProjectionEvent<WithTypeormContext & PropsIn>) => Promise<{} extends PropsOut ? void : PropsOut>) => <SourceExtraRollForwardPropsIn extends import("@cardano-sdk/projection").WithNetworkInfo & import("@cardano-sdk/projection").WithEpochNo & import("@cardano-sdk/projection").WithEpochBoundary & WithTypeormContext & PropsIn, SourceExtraRollBackwardPropsIn extends import("@cardano-sdk/projection").WithNetworkInfo & import("@cardano-sdk/projection").WithEpochNo & import("@cardano-sdk/projection").WithEpochBoundary & WithTypeormContext & PropsIn & import("@cardano-sdk/projection").WithBlock>() => import("@cardano-sdk/projection").ExtChainSyncOperator<SourceExtraRollForwardPropsIn, SourceExtraRollBackwardPropsIn, PropsOut, PropsOut>;
7
7
  //# sourceMappingURL=util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/operators/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,OAAO,EAAE,eAAe,EAA4B,MAAM,yBAAyB,CAAC;AAClH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAO9D,eAAO,MAAM,sBAAsB,iCAAkC,QAAQ,kBAAkB,WACf,CAAC;AAEjF,eAAO,MAAM,8BAA8B,QAAS,CAAC;AACrD,eAAO,MAAM,uCAAuC,OAAO,CAAC;AAE5D,eAAO,MAAM,eAAe,8vBAKzB,CAAC"}
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/operators/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,OAAO,EAAE,eAAe,EAA4B,MAAM,yBAAyB,CAAC;AAClH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAO9D,eAAO,MAAM,sBAAsB,iCAAkC,QAAQ,kBAAkB,WACf,CAAC;AAEjF,eAAO,MAAM,8BAA8B,QAAS,CAAC;AACrD,eAAO,MAAM,uCAAuC,OAAO,CAAC;AAE5D,eAAO,MAAM,eAAe,oxBAKzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/operators/util.ts"],"names":[],"mappings":";;;AAAA,wDAAkH;AAElH,+BAA4B;AAMrB,MAAM,sBAAsB,GAAG,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAA8B,EAAE,EAAE,CACjG,MAAM,CAAC,IAAI,CAAC,GAAG,YAAe,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,MAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AADpE,QAAA,sBAAsB,0BAC8C;AAEpE,QAAA,8BAA8B,GAAG,KAAM,CAAC;AACxC,QAAA,uCAAuC,GAAG,IAAI,CAAC;AAErD,MAAM,eAAe,GAAG,CAC7B,EAAoF,EACpF,EAAE,CACF,IAAA,qCAAwB,EAA+D,CAAC,GAAG,EAAE,EAAE,CAC7F,IAAA,WAAI,EAAC,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAC3F,CAAC;AALS,QAAA,eAAe,mBAKxB"}
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/operators/util.ts"],"names":[],"mappings":";;;AAAA,wDAAkH;AAElH,+BAA4B;AAMrB,MAAM,sBAAsB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