@heliofi/common 0.1.175 → 0.1.177

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 (98) hide show
  1. package/dist/src/domain/constants/helioPlay/index.d.ts +1 -0
  2. package/dist/src/domain/constants/helioPlay/index.js +18 -0
  3. package/dist/src/domain/constants/helioPlay/index.js.map +1 -0
  4. package/dist/src/domain/constants/helioPlay/previewDurationSeconds.d.ts +1 -0
  5. package/dist/src/domain/constants/helioPlay/previewDurationSeconds.js +5 -0
  6. package/dist/src/domain/constants/helioPlay/previewDurationSeconds.js.map +1 -0
  7. package/dist/src/domain/constants/index.d.ts +1 -0
  8. package/dist/src/domain/constants/index.js +1 -0
  9. package/dist/src/domain/constants/index.js.map +1 -1
  10. package/dist/src/domain/model/attachment/entities/BaseAttachment.d.ts +7 -0
  11. package/dist/src/domain/model/attachment/entities/BaseAttachment.js +8 -0
  12. package/dist/src/domain/model/attachment/entities/BaseAttachment.js.map +1 -0
  13. package/dist/src/domain/model/company/entities/BaseCompany.d.ts +13 -0
  14. package/dist/src/domain/model/company/entities/BaseCompany.js +8 -0
  15. package/dist/src/domain/model/company/entities/BaseCompany.js.map +1 -0
  16. package/dist/src/domain/model/company/entities/Company.d.ts +7 -0
  17. package/dist/src/domain/model/company/entities/Company.js +8 -0
  18. package/dist/src/domain/model/company/entities/Company.js.map +1 -0
  19. package/dist/src/domain/model/content/dtos/content.dto.d.ts +2 -1
  20. package/dist/src/domain/model/content/dtos/content.dto.js +6 -1
  21. package/dist/src/domain/model/content/dtos/content.dto.js.map +1 -1
  22. package/dist/src/domain/model/content/entities/Content.d.ts +2 -3
  23. package/dist/src/domain/model/content/entities/Content.js +3 -3
  24. package/dist/src/domain/model/content/entities/Content.js.map +1 -1
  25. package/dist/src/domain/model/currency/entities/BaseCurrency.d.ts +14 -0
  26. package/dist/src/domain/model/currency/entities/BaseCurrency.js +8 -0
  27. package/dist/src/domain/model/currency/entities/BaseCurrency.js.map +1 -0
  28. package/dist/src/domain/model/currency/entities/Currency.d.ts +5 -0
  29. package/dist/src/domain/model/currency/entities/Currency.js +8 -0
  30. package/dist/src/domain/model/currency/entities/Currency.js.map +1 -0
  31. package/dist/src/domain/model/location/entities/FetchifyFindAddress.d.ts +8 -0
  32. package/dist/src/domain/model/location/entities/FetchifyFindAddress.js +8 -0
  33. package/dist/src/domain/model/location/entities/FetchifyFindAddress.js.map +1 -0
  34. package/dist/src/domain/model/location/entities/FetchifyRetrieveAddress.d.ts +13 -0
  35. package/dist/src/domain/model/location/entities/FetchifyRetrieveAddress.js +8 -0
  36. package/dist/src/domain/model/location/entities/FetchifyRetrieveAddress.js.map +1 -0
  37. package/dist/src/domain/model/paylink/entities/OnlyContentAndTransactionPaylink.d.ts +3 -3
  38. package/dist/src/domain/model/paylink/entities/OnlyContentPaylink.d.ts +2 -2
  39. package/dist/src/domain/model/paylink/entities/ShallowEnrichedPaylink.d.ts +2 -2
  40. package/dist/src/domain/model/paystream/entities/ShallowEnrichedPaystream.d.ts +2 -2
  41. package/dist/src/domain/model/paystream-tx/entities/CheckoutStatus.d.ts +16 -0
  42. package/dist/src/domain/model/paystream-tx/entities/CheckoutStatus.entity.d.ts +1 -1
  43. package/dist/src/domain/model/paystream-tx/entities/CheckoutStatus.js +7 -0
  44. package/dist/src/domain/model/paystream-tx/entities/CheckoutStatus.js.map +1 -0
  45. package/dist/src/domain/model/paystream-tx/entities/PaystreamTxWithContent.d.ts +2 -2
  46. package/dist/src/domain/model/prepare-invoice/entities/PrepareInvoice.d.ts +5 -0
  47. package/dist/src/domain/model/prepare-invoice/entities/PrepareInvoice.js +8 -0
  48. package/dist/src/domain/model/prepare-invoice/entities/PrepareInvoice.js.map +1 -0
  49. package/dist/src/domain/model/prepare-stream/dtos/index.d.ts +3 -2
  50. package/dist/src/domain/model/prepare-stream/dtos/index.js +3 -2
  51. package/dist/src/domain/model/prepare-stream/dtos/index.js.map +1 -1
  52. package/dist/src/domain/model/prepare-stream/dtos/topUpStreamPrepare.dto.d.ts +4 -0
  53. package/dist/src/domain/model/prepare-stream/dtos/topUpStreamPrepare.dto.js +27 -0
  54. package/dist/src/domain/model/prepare-stream/dtos/topUpStreamPrepare.dto.js.map +1 -0
  55. package/dist/src/domain/model/prepare-transaction/entities/PrepareSwapTransaction.d.ts +5 -0
  56. package/dist/src/domain/model/prepare-transaction/entities/PrepareSwapTransaction.js +7 -0
  57. package/dist/src/domain/model/prepare-transaction/entities/PrepareSwapTransaction.js.map +1 -0
  58. package/dist/src/domain/model/prepare-transaction/entities/PrepareTransaction.d.ts +5 -0
  59. package/dist/src/domain/model/prepare-transaction/entities/PrepareTransaction.js +8 -0
  60. package/dist/src/domain/model/prepare-transaction/entities/PrepareTransaction.js.map +1 -0
  61. package/dist/src/domain/model/report/entities/ReportItem.d.ts +37 -0
  62. package/dist/src/domain/model/report/entities/ReportItem.js +7 -0
  63. package/dist/src/domain/model/report/entities/ReportItem.js.map +1 -0
  64. package/dist/src/domain/model/settle-transaction/dtos/settleTransaction.dto.d.ts +1 -1
  65. package/dist/src/domain/model/settle-transaction/dtos/settleTransaction.dto.js +1 -0
  66. package/dist/src/domain/model/settle-transaction/dtos/settleTransaction.dto.js.map +1 -1
  67. package/dist/src/domain/model/token-quoting/entities/TokenQuoting.d.ts +4 -0
  68. package/dist/src/domain/model/token-quoting/entities/TokenQuoting.js +8 -0
  69. package/dist/src/domain/model/token-quoting/entities/TokenQuoting.js.map +1 -0
  70. package/dist/src/domain/model/token-swap/entities/SwapRouteToken.d.ts +4 -0
  71. package/dist/src/domain/model/token-swap/entities/SwapRouteToken.js +8 -0
  72. package/dist/src/domain/model/token-swap/entities/SwapRouteToken.js.map +1 -0
  73. package/dist/src/domain/model/transaction-meta/entities/BaseTransactionMeta.d.ts +16 -0
  74. package/dist/src/domain/model/transaction-meta/entities/BaseTransactionMeta.js +26 -0
  75. package/dist/src/domain/model/transaction-meta/entities/BaseTransactionMeta.js.map +1 -0
  76. package/dist/src/domain/model/user/entities/BaseUser.d.ts +8 -0
  77. package/dist/src/domain/model/user/entities/BaseUser.js +8 -0
  78. package/dist/src/domain/model/user/entities/BaseUser.js.map +1 -0
  79. package/dist/src/domain/model/wallet/entities/BaseWallet.d.ts +5 -0
  80. package/dist/src/domain/model/wallet/entities/BaseWallet.js +8 -0
  81. package/dist/src/domain/model/wallet/entities/BaseWallet.js.map +1 -0
  82. package/dist/src/domain/model/wallet/entities/Wallet.d.ts +7 -0
  83. package/dist/src/domain/model/wallet/entities/Wallet.js +8 -0
  84. package/dist/src/domain/model/wallet/entities/Wallet.js.map +1 -0
  85. package/dist/src/domain/model/wallet/entities/WalletDetails.d.ts +4 -0
  86. package/dist/src/domain/model/wallet/entities/WalletDetails.js +8 -0
  87. package/dist/src/domain/model/wallet/entities/WalletDetails.js.map +1 -0
  88. package/dist/src/domain/services/BigIntCalculatorService.d.ts +1 -0
  89. package/dist/src/domain/services/BigIntCalculatorService.js +3 -0
  90. package/dist/src/domain/services/BigIntCalculatorService.js.map +1 -1
  91. package/dist/src/domain/services/PolygonExplorerService.d.ts +5 -0
  92. package/dist/src/domain/services/PolygonExplorerService.js +16 -0
  93. package/dist/src/domain/services/PolygonExplorerService.js.map +1 -0
  94. package/dist/src/domain/services/index.d.ts +1 -0
  95. package/dist/src/domain/services/index.js +1 -0
  96. package/dist/src/domain/services/index.js.map +1 -1
  97. package/dist/tsconfig.tsbuildinfo +1 -1
  98. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TokenQuoting.js","sourceRoot":"","sources":["../../../../../../src/domain/model/token-quoting/entities/TokenQuoting.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAEtC,MAAa,YAAa,SAAQ,eAAM;CAEvC;AAFD,oCAEC"}
@@ -0,0 +1,4 @@
1
+ import { Entity } from '../../entity';
2
+ export declare class SwapRouteToken extends Entity {
3
+ routeToken: string;
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SwapRouteToken = void 0;
4
+ const entity_1 = require("../../entity");
5
+ class SwapRouteToken extends entity_1.Entity {
6
+ }
7
+ exports.SwapRouteToken = SwapRouteToken;
8
+ //# sourceMappingURL=SwapRouteToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwapRouteToken.js","sourceRoot":"","sources":["../../../../../../src/domain/model/token-swap/entities/SwapRouteToken.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAEtC,MAAa,cAAe,SAAQ,eAAM;CAEzC;AAFD,wCAEC"}
@@ -0,0 +1,16 @@
1
+ import { CustomerDetails } from '../../customer-details';
2
+ import { Entity } from '../../entity';
3
+ import { ProductDetails } from '../../product-details';
4
+ import { SplitAccount } from '../../split-account';
5
+ export declare class BaseTransactionMeta extends Entity {
6
+ id: string;
7
+ transactionSignature: string;
8
+ amount: bigint;
9
+ recipientPK: string;
10
+ senderPK: string;
11
+ customerDetails: CustomerDetails;
12
+ productDetails: ProductDetails;
13
+ splitRevenue: boolean;
14
+ remainingAccounts: SplitAccount[];
15
+ totalAmount: bigint;
16
+ }
@@ -0,0 +1,26 @@
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.BaseTransactionMeta = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const entity_1 = require("../../entity");
15
+ class BaseTransactionMeta extends entity_1.Entity {
16
+ }
17
+ __decorate([
18
+ (0, class_transformer_1.Transform)(({ value }) => BigInt(value)),
19
+ __metadata("design:type", BigInt)
20
+ ], BaseTransactionMeta.prototype, "amount", void 0);
21
+ __decorate([
22
+ (0, class_transformer_1.Transform)(({ value }) => BigInt(value)),
23
+ __metadata("design:type", BigInt)
24
+ ], BaseTransactionMeta.prototype, "totalAmount", void 0);
25
+ exports.BaseTransactionMeta = BaseTransactionMeta;
26
+ //# sourceMappingURL=BaseTransactionMeta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseTransactionMeta.js","sourceRoot":"","sources":["../../../../../../src/domain/model/transaction-meta/entities/BaseTransactionMeta.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA8C;AAE9C,yCAAsC;AAItC,MAAa,mBAAoB,SAAQ,eAAM;CAsB9C;AAjBC;IAAC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;;mDACzB;AAcf;IAAC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;;wDACpB;AArBtB,kDAsBC"}
@@ -0,0 +1,8 @@
1
+ import { Entity } from '../../entity';
2
+ export declare class BaseUser extends Entity {
3
+ id: string;
4
+ name?: string;
5
+ email?: string;
6
+ discordUsername?: string;
7
+ twitterUsername?: string;
8
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BaseUser = void 0;
4
+ const entity_1 = require("../../entity");
5
+ class BaseUser extends entity_1.Entity {
6
+ }
7
+ exports.BaseUser = BaseUser;
8
+ //# sourceMappingURL=BaseUser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseUser.js","sourceRoot":"","sources":["../../../../../../src/domain/model/user/entities/BaseUser.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAEtC,MAAa,QAAS,SAAQ,eAAM;CAUnC;AAVD,4BAUC"}
@@ -0,0 +1,5 @@
1
+ import { Entity } from '../../entity';
2
+ export declare class BaseWallet extends Entity {
3
+ id: string;
4
+ publicKey: string;
5
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BaseWallet = void 0;
4
+ const entity_1 = require("../../entity");
5
+ class BaseWallet extends entity_1.Entity {
6
+ }
7
+ exports.BaseWallet = BaseWallet;
8
+ //# sourceMappingURL=BaseWallet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseWallet.js","sourceRoot":"","sources":["../../../../../../src/domain/model/wallet/entities/BaseWallet.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAEtC,MAAa,UAAW,SAAQ,eAAM;CAIrC;AAJD,gCAIC"}
@@ -0,0 +1,7 @@
1
+ import type { Blockchain } from '../../blockchain';
2
+ import { BaseWallet } from './BaseWallet';
3
+ import { BlockchainEngine } from '../../blockchainEngine';
4
+ export declare class Wallet extends BaseWallet {
5
+ blockchain?: Blockchain;
6
+ blockchainEngine: BlockchainEngine;
7
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Wallet = void 0;
4
+ const BaseWallet_1 = require("./BaseWallet");
5
+ class Wallet extends BaseWallet_1.BaseWallet {
6
+ }
7
+ exports.Wallet = Wallet;
8
+ //# sourceMappingURL=Wallet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Wallet.js","sourceRoot":"","sources":["../../../../../../src/domain/model/wallet/entities/Wallet.ts"],"names":[],"mappings":";;;AACA,6CAA0C;AAG1C,MAAa,MAAO,SAAQ,uBAAU;CAIrC;AAJD,wBAIC"}
@@ -0,0 +1,4 @@
1
+ import { Entity } from '../../entity';
2
+ export declare class WalletDetails extends Entity {
3
+ isHelioX: boolean;
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WalletDetails = void 0;
4
+ const entity_1 = require("../../entity");
5
+ class WalletDetails extends entity_1.Entity {
6
+ }
7
+ exports.WalletDetails = WalletDetails;
8
+ //# sourceMappingURL=WalletDetails.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WalletDetails.js","sourceRoot":"","sources":["../../../../../../src/domain/model/wallet/entities/WalletDetails.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAEtC,MAAa,aAAc,SAAQ,eAAM;CAExC;AAFD,sCAEC"}
@@ -1,3 +1,4 @@
1
1
  export declare class BigIntCalculatorService {
2
2
  static calculatePercentage(amount: bigint, sharePercent: number): bigint;
3
+ static getBigintMultiplierFromDecimals(decimals: number): bigint;
3
4
  }
@@ -5,6 +5,9 @@ class BigIntCalculatorService {
5
5
  static calculatePercentage(amount, sharePercent) {
6
6
  return amount - (amount * BigInt(10000 - sharePercent * 100)) / 10000n;
7
7
  }
8
+ static getBigintMultiplierFromDecimals(decimals) {
9
+ return BigInt(1 + new Array(decimals).fill(0).join(''));
10
+ }
8
11
  }
9
12
  exports.BigIntCalculatorService = BigIntCalculatorService;
10
13
  //# sourceMappingURL=BigIntCalculatorService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BigIntCalculatorService.js","sourceRoot":"","sources":["../../../../src/domain/services/BigIntCalculatorService.ts"],"names":[],"mappings":";;;AAAA,MAAa,uBAAuB;IAClC,MAAM,CAAC,mBAAmB,CAAC,MAAc,EAAE,YAAoB;QAC7D,OAAO,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,GAAG,YAAY,GAAG,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACzE,CAAC;CACF;AAJD,0DAIC"}
1
+ {"version":3,"file":"BigIntCalculatorService.js","sourceRoot":"","sources":["../../../../src/domain/services/BigIntCalculatorService.ts"],"names":[],"mappings":";;;AAAA,MAAa,uBAAuB;IAClC,MAAM,CAAC,mBAAmB,CAAC,MAAc,EAAE,YAAoB;QAC7D,OAAO,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,GAAG,YAAY,GAAG,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACzE,CAAC;IAED,MAAM,CAAC,+BAA+B,CAAC,QAAgB;QACrD,OAAO,MAAM,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1D,CAAC;CACF;AARD,0DAQC"}
@@ -0,0 +1,5 @@
1
+ import { Environment } from '../constants';
2
+ export declare class PolygonExplorerService {
3
+ static getPolygonExplorerUrlByCluster(env: Environment): string | undefined;
4
+ static getPolygonExplorerTransactionURL(transactionID: string, env: Environment): string;
5
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PolygonExplorerService = void 0;
4
+ const constants_1 = require("../constants");
5
+ class PolygonExplorerService {
6
+ static getPolygonExplorerUrlByCluster(env) {
7
+ return env === constants_1.Environment.PROD
8
+ ? 'https://polygonscan.com'
9
+ : 'https://mumbai.polygonscan.com';
10
+ }
11
+ static getPolygonExplorerTransactionURL(transactionID, env) {
12
+ return `${PolygonExplorerService.getPolygonExplorerUrlByCluster(env)}/tx/${transactionID}`;
13
+ }
14
+ }
15
+ exports.PolygonExplorerService = PolygonExplorerService;
16
+ //# sourceMappingURL=PolygonExplorerService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PolygonExplorerService.js","sourceRoot":"","sources":["../../../../src/domain/services/PolygonExplorerService.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAE3C,MAAa,sBAAsB;IACjC,MAAM,CAAC,8BAA8B,CAAC,GAAgB;QACpD,OAAO,GAAG,KAAK,uBAAW,CAAC,IAAI;YAC7B,CAAC,CAAC,yBAAyB;YAC3B,CAAC,CAAC,gCAAgC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,gCAAgC,CACrC,aAAqB,EACrB,GAAgB;QAEhB,OAAO,GAAG,sBAAsB,CAAC,8BAA8B,CAC7D,GAAG,CACJ,OAAO,aAAa,EAAE,CAAC;IAC1B,CAAC;CACF;AAfD,wDAeC"}
@@ -6,3 +6,4 @@ export * from './FeeService';
6
6
  export * from './TransactionCalculatorService';
7
7
  export * from './TransactionSignService';
8
8
  export * from './SplitWalletService';
9
+ export * from './PolygonExplorerService';
@@ -22,4 +22,5 @@ __exportStar(require("./FeeService"), exports);
22
22
  __exportStar(require("./TransactionCalculatorService"), exports);
23
23
  __exportStar(require("./TransactionSignService"), exports);
24
24
  __exportStar(require("./SplitWalletService"), exports);
25
+ __exportStar(require("./PolygonExplorerService"), exports);
25
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/domain/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,oDAAkC;AAClC,mDAAiC;AACjC,mDAAiC;AACjC,+CAA6B;AAC7B,iEAA+C;AAC/C,2DAAyC;AACzC,uDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/domain/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,oDAAkC;AAClC,mDAAiC;AACjC,mDAAiC;AACjC,+CAA6B;AAC7B,iEAA+C;AAC/C,2DAAyC;AACzC,uDAAqC;AACrC,2DAAyC"}