@mixerx/oracles 1.0.0 → 3.0.0

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 (82) hide show
  1. package/README.md +90 -111
  2. package/dist/application/ports/ILogger.d.ts +0 -1
  3. package/dist/application/ports/ILogger.js +0 -1
  4. package/dist/domain/config/TokenDefaults.d.ts +0 -32
  5. package/dist/domain/config/TokenDefaults.js +7 -73
  6. package/dist/domain/exceptions.d.ts +8 -4
  7. package/dist/domain/exceptions.js +12 -4
  8. package/dist/domain/repositories.d.ts +3 -2
  9. package/dist/domain/repositories.js +10 -1
  10. package/dist/factory.d.ts +15 -46
  11. package/dist/factory.js +18 -28
  12. package/dist/index.d.ts +6 -1
  13. package/dist/index.js +4 -1
  14. package/dist/infrastructure/blockchain/staticProvider.d.ts +3 -0
  15. package/dist/infrastructure/blockchain/staticProvider.js +36 -0
  16. package/dist/infrastructure/config/ProtocolTokenConfig.d.ts +0 -1
  17. package/dist/infrastructure/config/ProtocolTokenConfig.js +7 -5
  18. package/dist/infrastructure/config/gasOracleConfigs.d.ts +2 -13
  19. package/dist/infrastructure/config/gasOracleConfigs.js +7 -34
  20. package/dist/infrastructure/gas/GasPriceOracle.d.ts +14 -17
  21. package/dist/infrastructure/gas/GasPriceOracle.js +89 -44
  22. package/dist/infrastructure/mixerx/MixerXFeeOracle.d.ts +99 -0
  23. package/dist/infrastructure/mixerx/MixerXFeeOracle.js +292 -0
  24. package/dist/infrastructure/multicall/MulticallProvider.d.ts +9 -3
  25. package/dist/infrastructure/multicall/MulticallProvider.js +48 -10
  26. package/dist/infrastructure/token-price/TokenPriceOracle.d.ts +10 -47
  27. package/dist/infrastructure/token-price/TokenPriceOracle.js +75 -107
  28. package/dist/types.d.ts +11 -2
  29. package/dist/types.js +0 -1
  30. package/package.json +37 -15
  31. package/dist/application/ports/ILogger.d.ts.map +0 -1
  32. package/dist/application/ports/ILogger.js.map +0 -1
  33. package/dist/application/ports/index.d.ts +0 -6
  34. package/dist/application/ports/index.d.ts.map +0 -1
  35. package/dist/application/ports/index.js +0 -18
  36. package/dist/application/ports/index.js.map +0 -1
  37. package/dist/application/services/TokenPriceService.d.ts +0 -61
  38. package/dist/application/services/TokenPriceService.d.ts.map +0 -1
  39. package/dist/application/services/TokenPriceService.js +0 -137
  40. package/dist/application/services/TokenPriceService.js.map +0 -1
  41. package/dist/domain/config/TokenDefaults.d.ts.map +0 -1
  42. package/dist/domain/config/TokenDefaults.js.map +0 -1
  43. package/dist/domain/config/index.d.ts +0 -2
  44. package/dist/domain/config/index.d.ts.map +0 -1
  45. package/dist/domain/config/index.js +0 -20
  46. package/dist/domain/config/index.js.map +0 -1
  47. package/dist/domain/exceptions.d.ts.map +0 -1
  48. package/dist/domain/exceptions.js.map +0 -1
  49. package/dist/domain/repositories.d.ts.map +0 -1
  50. package/dist/domain/repositories.js.map +0 -1
  51. package/dist/factory.d.ts.map +0 -1
  52. package/dist/factory.js.map +0 -1
  53. package/dist/index.d.ts.map +0 -1
  54. package/dist/index.js.map +0 -1
  55. package/dist/infrastructure/blockchain/contracts.d.ts +0 -20
  56. package/dist/infrastructure/blockchain/contracts.d.ts.map +0 -1
  57. package/dist/infrastructure/blockchain/contracts.js +0 -10
  58. package/dist/infrastructure/blockchain/contracts.js.map +0 -1
  59. package/dist/infrastructure/config/ProtocolTokenConfig.d.ts.map +0 -1
  60. package/dist/infrastructure/config/ProtocolTokenConfig.js.map +0 -1
  61. package/dist/infrastructure/config/gasOracleConfigs.d.ts.map +0 -1
  62. package/dist/infrastructure/config/gasOracleConfigs.js.map +0 -1
  63. package/dist/infrastructure/config/index.d.ts +0 -5
  64. package/dist/infrastructure/config/index.d.ts.map +0 -1
  65. package/dist/infrastructure/config/index.js +0 -11
  66. package/dist/infrastructure/config/index.js.map +0 -1
  67. package/dist/infrastructure/gas/GasPriceOracle.d.ts.map +0 -1
  68. package/dist/infrastructure/gas/GasPriceOracle.js.map +0 -1
  69. package/dist/infrastructure/multicall/MulticallProvider.d.ts.map +0 -1
  70. package/dist/infrastructure/multicall/MulticallProvider.js.map +0 -1
  71. package/dist/infrastructure/token-price/TokenPriceOracle.d.ts.map +0 -1
  72. package/dist/infrastructure/token-price/TokenPriceOracle.js.map +0 -1
  73. package/dist/infrastructure/token-price/index.d.ts +0 -3
  74. package/dist/infrastructure/token-price/index.d.ts.map +0 -1
  75. package/dist/infrastructure/token-price/index.js +0 -6
  76. package/dist/infrastructure/token-price/index.js.map +0 -1
  77. package/dist/infrastructure/tornado/TornadoFeeOracle.d.ts +0 -90
  78. package/dist/infrastructure/tornado/TornadoFeeOracle.d.ts.map +0 -1
  79. package/dist/infrastructure/tornado/TornadoFeeOracle.js +0 -230
  80. package/dist/infrastructure/tornado/TornadoFeeOracle.js.map +0 -1
  81. package/dist/types.d.ts.map +0 -1
  82. package/dist/types.js.map +0 -1
@@ -1,90 +0,0 @@
1
- import { GasPriceOracle, GasPriceParams } from '../gas/GasPriceOracle';
2
- import { TokenPriceOracle } from '../token-price/TokenPriceOracle';
3
- import { ITokenPriceRepository } from '../../domain/repositories';
4
- import { ChainId } from '../config/gasOracleConfigs';
5
- import { ILogger } from '../../application/ports/ILogger';
6
- export interface TornadoFeeOracleOptions {
7
- chainId: ChainId;
8
- rpcUrl: string;
9
- relayerFeePercent: number;
10
- gasPriceOracle?: GasPriceOracle;
11
- tokenPriceOracle?: TokenPriceOracle;
12
- priceRepository?: ITokenPriceRepository;
13
- logger?: ILogger;
14
- multicallAddress?: string;
15
- offchainOracleAddress?: string;
16
- }
17
- export interface WithdrawalFeeInput {
18
- currency: string;
19
- amount: bigint;
20
- decimals: number;
21
- refund?: string;
22
- txType?: 'relayer_withdrawal' | 'user_withdrawal' | 'relayer_withdrawal_check_v4';
23
- }
24
- export interface FeeCalculationResult {
25
- gasCost: bigint;
26
- relayerFee: bigint;
27
- refundAmount: bigint;
28
- totalFee: bigint;
29
- currency: string;
30
- }
31
- /**
32
- * TornadoFeeOracle
33
- * Calculates fees for Tornado Cash withdrawals
34
- * Based on @tornado/tornado-oracles TornadoFeeOracleV5
35
- *
36
- * Features:
37
- * - Smart gas limit bumping (10% for relayer, 30% for user)
38
- * - Token price conversion (ETH↔Token)
39
- * - Refund calculation for non-ETH tokens
40
- * - EIP-1559 and Legacy support
41
- */
42
- export declare class TornadoFeeOracle {
43
- private chainId;
44
- private relayerFeePercent;
45
- private gasPriceOracle;
46
- private tokenPriceOracle?;
47
- private priceRepository?;
48
- private logger;
49
- constructor(options: TornadoFeeOracleOptions);
50
- /**
51
- * Calculate withdrawal fee
52
- * Main method matching TornadoFeeOracleV5.calculateWithdrawalFeeViaRelayer
53
- */
54
- calculateWithdrawalFee(input: WithdrawalFeeInput): Promise<FeeCalculationResult>;
55
- /**
56
- * Get gas parameters for transaction
57
- */
58
- private getGasParams;
59
- /**
60
- * Calculate gas cost in wei
61
- */
62
- private calculateGasCost;
63
- /**
64
- * Calculate relayer fee
65
- */
66
- private calculateRelayerFee;
67
- /**
68
- * Get gas limit for operation and token
69
- * Uses centralized TokenDefaults to eliminate duplication
70
- */
71
- private getGasLimit;
72
- /**
73
- * Get bump percent based on transaction type (V5 smart bumping)
74
- * Uses centralized TokenDefaults to eliminate duplication
75
- */
76
- private getBumpPercent;
77
- /**
78
- * Get token price in ETH (wei per token unit)
79
- */
80
- private getTokenPrice;
81
- /**
82
- * Get gas parameters for direct use
83
- */
84
- getGasParameters(isLegacy?: boolean): Promise<GasPriceParams>;
85
- /**
86
- * Get chain ID
87
- */
88
- getChainId(): ChainId;
89
- }
90
- //# sourceMappingURL=TornadoFeeOracle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TornadoFeeOracle.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/tornado/TornadoFeeOracle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE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K,EAAE,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA6FtF;;OAEG;YACW,YAAY;IAU1B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAmBxB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAQ3B;;;OAGG;IACH,OAAO,CAAC,WAAW;IAWnB;;;OAGG;IACH,OAAO,CAAC,cAAc;IAItB;;OAEG;YACW,aAAa;IAqB3B;;OAEG;IACG,gBAAgB,CAAC,QAAQ,GAAE,OAAe,GAAG,OAAO,CAAC,cAAc,CAAC;IAI1E;;OAEG;IACH,UAAU,IAAI,OAAO;CAGtB"}
@@ -1,230 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TornadoFeeOracle = void 0;
4
- const GasPriceOracle_1 = require("../gas/GasPriceOracle");
5
- const TokenPriceOracle_1 = require("../token-price/TokenPriceOracle");
6
- const ILogger_1 = require("../../application/ports/ILogger");
7
- const TokenDefaults_1 = require("../../domain/config/TokenDefaults");
8
- // NOTE: Gas limits now imported from TokenDefaults (centralized configuration)
9
- // This eliminates duplication between TornadoFeeOracle, ChainConfigs, and FeeCalculator
10
- /**
11
- * TornadoFeeOracle
12
- * Calculates fees for Tornado Cash withdrawals
13
- * Based on @tornado/tornado-oracles TornadoFeeOracleV5
14
- *
15
- * Features:
16
- * - Smart gas limit bumping (10% for relayer, 30% for user)
17
- * - Token price conversion (ETH↔Token)
18
- * - Refund calculation for non-ETH tokens
19
- * - EIP-1559 and Legacy support
20
- */
21
- class TornadoFeeOracle {
22
- chainId;
23
- relayerFeePercent;
24
- gasPriceOracle;
25
- tokenPriceOracle;
26
- priceRepository;
27
- logger;
28
- constructor(options) {
29
- this.chainId = options.chainId;
30
- this.relayerFeePercent = options.relayerFeePercent;
31
- // Initialize gas price oracle
32
- this.gasPriceOracle = options.gasPriceOracle ?? new GasPriceOracle_1.GasPriceOracle({
33
- chainId: options.chainId,
34
- rpcUrl: options.rpcUrl,
35
- logger: options.logger ?? new ILogger_1.ConsoleLogger('LegacyGasOracle'),
36
- });
37
- // Initialize token price oracle if RPC provided
38
- if (options.tokenPriceOracle) {
39
- this.tokenPriceOracle = options.tokenPriceOracle;
40
- }
41
- else if (options.rpcUrl) {
42
- this.tokenPriceOracle = new TokenPriceOracle_1.TokenPriceOracle(options.rpcUrl, options.chainId, options.offchainOracleAddress, options.multicallAddress);
43
- }
44
- this.priceRepository = options.priceRepository;
45
- this.logger = options.logger ?? new ILogger_1.ConsoleLogger('TornadoFeeOracle');
46
- }
47
- /**
48
- * Calculate withdrawal fee
49
- * Main method matching TornadoFeeOracleV5.calculateWithdrawalFeeViaRelayer
50
- */
51
- async calculateWithdrawalFee(input) {
52
- const { currency, amount, decimals, refund, txType = 'relayer_withdrawal' } = input;
53
- const currencyLower = currency.toLowerCase();
54
- // 1. Get gas parameters
55
- const gasParams = await this.getGasParams(txType);
56
- const gasLimit = this.getGasLimit(currencyLower, txType);
57
- const gasPriceWei = gasParams.maxFeePerGas
58
- ? BigInt(gasParams.maxFeePerGas)
59
- : gasParams.gasPrice
60
- ? BigInt(gasParams.gasPrice)
61
- : 0n;
62
- // 2. Calculate gas cost in wei
63
- const gasCostWei = this.calculateGasCost(gasParams, currencyLower, txType);
64
- // 3. Calculate relayer fee
65
- const relayerFee = this.calculateRelayerFee(amount);
66
- this.logger.debug('TornadoFeeOracle fee inputs', {
67
- chainId: this.chainId,
68
- currency: currencyLower,
69
- amount: amount.toString(),
70
- decimals,
71
- refund,
72
- txType,
73
- gasLimit,
74
- gasPriceWei: gasPriceWei.toString(),
75
- maxFeePerGas: gasParams.maxFeePerGas,
76
- maxPriorityFeePerGas: gasParams.maxPriorityFeePerGas,
77
- gasPrice: gasParams.gasPrice,
78
- relayerFeePercent: this.relayerFeePercent,
79
- });
80
- // 4. For ETH, calculation is simple
81
- if (currencyLower === 'eth') {
82
- const totalFee = gasCostWei + relayerFee;
83
- this.logger.debug('TornadoFeeOracle fee breakdown', {
84
- gasCost: gasCostWei.toString(),
85
- relayerFee: relayerFee.toString(),
86
- totalFee: totalFee.toString(),
87
- currency: 'eth',
88
- });
89
- return {
90
- gasCost: gasCostWei,
91
- relayerFee,
92
- refundAmount: 0n,
93
- totalFee,
94
- currency: 'eth',
95
- };
96
- }
97
- // 5. For tokens, convert ETH costs to token
98
- const tokenPriceInEth = await this.getTokenPrice(currencyLower);
99
- if (!tokenPriceInEth) {
100
- throw new Error(`No price available for ${currency}`);
101
- }
102
- // Convert gas cost from ETH to token
103
- // Formula: (ethAmount * 10^decimals) / price
104
- const decimalsFactor = BigInt(10 ** decimals);
105
- const gasCostInToken = (gasCostWei * decimalsFactor) / tokenPriceInEth;
106
- // Relayer fee is already in token units
107
- const relayerFeeInToken = relayerFee;
108
- // Calculate refund in token if provided
109
- let refundInToken = 0n;
110
- if (refund && BigInt(refund) > 0) {
111
- const refundWei = BigInt(refund);
112
- refundInToken = (refundWei * decimalsFactor) / tokenPriceInEth;
113
- }
114
- // Total fee
115
- const totalFee = gasCostInToken + relayerFeeInToken + refundInToken;
116
- this.logger.debug('TornadoFeeOracle fee breakdown', {
117
- tokenPriceInEth: tokenPriceInEth.toString(),
118
- gasCostInToken: gasCostInToken.toString(),
119
- relayerFeeInToken: relayerFeeInToken.toString(),
120
- refundInToken: refundInToken.toString(),
121
- totalFee: totalFee.toString(),
122
- });
123
- return {
124
- gasCost: gasCostInToken,
125
- relayerFee: relayerFeeInToken,
126
- refundAmount: refundInToken,
127
- totalFee,
128
- currency: currencyLower,
129
- };
130
- }
131
- /**
132
- * Get gas parameters for transaction
133
- */
134
- async getGasParams(txType) {
135
- const bumpPercent = this.getBumpPercent(txType);
136
- return this.gasPriceOracle.getTxGasParams({
137
- isLegacy: false,
138
- bumpPercent,
139
- legacySpeed: 'fast',
140
- });
141
- }
142
- /**
143
- * Calculate gas cost in wei
144
- */
145
- calculateGasCost(gasParams, currency, txType) {
146
- const gasLimit = this.getGasLimit(currency, txType);
147
- // Extract gas price from params (EIP-1559 or Legacy)
148
- let gasPriceWei;
149
- if (gasParams.maxFeePerGas) {
150
- // EIP-1559: use maxFeePerGas
151
- gasPriceWei = BigInt(gasParams.maxFeePerGas);
152
- }
153
- else if (gasParams.gasPrice) {
154
- // Legacy: use gasPrice
155
- gasPriceWei = BigInt(gasParams.gasPrice);
156
- }
157
- else {
158
- throw new Error('Invalid gas parameters');
159
- }
160
- return gasPriceWei * BigInt(gasLimit);
161
- }
162
- /**
163
- * Calculate relayer fee
164
- */
165
- calculateRelayerFee(amount) {
166
- const percent = this.relayerFeePercent;
167
- // Apply fee percentage
168
- // Formula: amount * percent (where percent is 0.004 for 0.4%)
169
- const fee = (amount * BigInt(Math.round(percent * 1e6))) / BigInt(1e6);
170
- return fee;
171
- }
172
- /**
173
- * Get gas limit for operation and token
174
- * Uses centralized TokenDefaults to eliminate duplication
175
- */
176
- getGasLimit(currency, txType) {
177
- // Check if it's a mining operation
178
- if (txType.includes('mining')) {
179
- const operation = txType.includes('reward') ? 'reward' : 'withdraw';
180
- return (0, TokenDefaults_1.getMiningGasLimit)(operation);
181
- }
182
- // Regular Tornado withdraw
183
- return (0, TokenDefaults_1.getTornadoGasLimit)(currency);
184
- }
185
- /**
186
- * Get bump percent based on transaction type (V5 smart bumping)
187
- * Uses centralized TokenDefaults to eliminate duplication
188
- */
189
- getBumpPercent(txType) {
190
- return (0, TokenDefaults_1.getBumpPercent)(txType);
191
- }
192
- /**
193
- * Get token price in ETH (wei per token unit)
194
- */
195
- async getTokenPrice(symbol) {
196
- // Try price repository first (Redis)
197
- if (this.priceRepository) {
198
- const price = await this.priceRepository.getPrice(symbol);
199
- if (price)
200
- return price;
201
- }
202
- // Fallback to token price oracle
203
- if (this.tokenPriceOracle) {
204
- try {
205
- const prices = await this.tokenPriceOracle.fetchPrices();
206
- const price = prices[symbol.toLowerCase()];
207
- if (price)
208
- return BigInt(price);
209
- }
210
- catch {
211
- // Ignore error, will return null
212
- }
213
- }
214
- return null;
215
- }
216
- /**
217
- * Get gas parameters for direct use
218
- */
219
- async getGasParameters(isLegacy = false) {
220
- return this.gasPriceOracle.getTxGasParams({ isLegacy });
221
- }
222
- /**
223
- * Get chain ID
224
- */
225
- getChainId() {
226
- return this.chainId;
227
- }
228
- }
229
- exports.TornadoFeeOracle = TornadoFeeOracle;
230
- //# sourceMappingURL=TornadoFeeOracle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TornadoFeeOracle.js","sourceRoot":"","sources":["../../../src/infrastructure/tornado/TornadoFeeOracle.ts"],"names":[],"mappings":";;;AAAA,0DAAuE;AACvE,sEAAmE;AAGnE,6DAAyE;AACzE,qEAM2C;AA8B3C,+EAA+E;AAC/E,wFAAwF;AAExF;;;;;;;;;;GAUG;AACH,MAAa,gBAAgB;IACnB,OAAO,CAAU;IACjB,iBAAiB,CAAS;IAC1B,cAAc,CAAiB;IAC/B,gBAAgB,CAAoB;IACpC,eAAe,CAAyB;IACxC,MAAM,CAAU;IAExB,YAAY,OAAgC;QAC1C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;QAEnD,8BAA8B;QAC9B,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,IAAI,IAAI,+BAAc,CAAC;YACjE,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,IAAI,uBAAa,CAAC,iBAAiB,CAAC;SAC/D,CAAC,CAAC;QAEH,gDAAgD;QAChD,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;YAC7B,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;QACnD,CAAC;aAAM,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YAC1B,IAAI,CAAC,gBAAgB,GAAG,IAAI,mCAAgB,CAC1C,OAAO,CAAC,MAAM,EACd,OA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,MAAM,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC1D,IAAI,KAAK;gBAAE,OAAO,KAAK,CAAC;QAC1B,CAAC;QAED,iCAAiC;QACjC,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC;gBACzD,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;gBAC3C,IAAI,KAAK;oBAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;YAClC,CAAC;YAAC,MAAM,CAAC;gBACP,iCAAiC;YACnC,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,gBAAgB,CAAC,WAAoB,KAAK;QAC9C,OAAO,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED;;OAEG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF;AA9OD,4CA8OC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B"}
package/dist/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}