@centrifuge/sdk 0.1.0 → 0.2.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 (141) hide show
  1. package/README.md +1 -1
  2. package/dist/Centrifuge.d.ts.map +1 -1
  3. package/dist/Centrifuge.js +9 -7
  4. package/dist/Centrifuge.js.map +1 -1
  5. package/dist/abi/MerkleProofManagerFactory.abi.d.ts +3 -0
  6. package/dist/abi/MerkleProofManagerFactory.abi.d.ts.map +1 -0
  7. package/dist/abi/MerkleProofManagerFactory.abi.js +2 -0
  8. package/dist/abi/MerkleProofManagerFactory.abi.js.map +1 -0
  9. package/dist/abi/index.d.ts +12 -0
  10. package/dist/abi/index.d.ts.map +1 -1
  11. package/dist/abi/index.js +2 -0
  12. package/dist/abi/index.js.map +1 -1
  13. package/dist/entities/Investor.d.ts.map +1 -1
  14. package/dist/entities/Investor.js +4 -4
  15. package/dist/entities/Investor.js.map +1 -1
  16. package/dist/entities/MerkleProofManager.d.ts.map +1 -1
  17. package/dist/entities/MerkleProofManager.js +1 -1
  18. package/dist/entities/MerkleProofManager.js.map +1 -1
  19. package/dist/entities/OnOffRampManager.js +4 -4
  20. package/dist/entities/OnOffRampManager.js.map +1 -1
  21. package/dist/entities/OnOffRampManager.test.js +2 -2
  22. package/dist/entities/OnOffRampManager.test.js.map +1 -1
  23. package/dist/entities/Pool.d.ts.map +1 -1
  24. package/dist/entities/Pool.js +13 -13
  25. package/dist/entities/Pool.js.map +1 -1
  26. package/dist/entities/PoolNetwork.d.ts +2 -0
  27. package/dist/entities/PoolNetwork.d.ts.map +1 -1
  28. package/dist/entities/PoolNetwork.js +32 -8
  29. package/dist/entities/PoolNetwork.js.map +1 -1
  30. package/dist/entities/PoolNetwork.test.js +38 -0
  31. package/dist/entities/PoolNetwork.test.js.map +1 -1
  32. package/dist/entities/Reports/PoolSharePricesReport.js +1 -1
  33. package/dist/entities/Reports/PoolSharePricesReport.js.map +1 -1
  34. package/dist/entities/ShareClass.d.ts.map +1 -1
  35. package/dist/entities/ShareClass.js +13 -13
  36. package/dist/entities/ShareClass.js.map +1 -1
  37. package/dist/entities/Vault.js +2 -2
  38. package/dist/entities/Vault.js.map +1 -1
  39. package/dist/types/index.d.ts +2 -0
  40. package/dist/types/index.d.ts.map +1 -1
  41. package/package.json +1 -1
  42. package/dist/config/protocol.d.ts +0 -3
  43. package/dist/config/protocol.d.ts.map +0 -1
  44. package/dist/config/protocol.js +0 -7
  45. package/dist/config/protocol.js.map +0 -1
  46. package/dist/entities/IndexerQueries/assetSnapshots.d.ts +0 -69
  47. package/dist/entities/IndexerQueries/assetSnapshots.d.ts.map +0 -1
  48. package/dist/entities/IndexerQueries/assetSnapshots.js +0 -91
  49. package/dist/entities/IndexerQueries/assetSnapshots.js.map +0 -1
  50. package/dist/entities/IndexerQueries/assetTransactions.d.ts +0 -93
  51. package/dist/entities/IndexerQueries/assetTransactions.d.ts.map +0 -1
  52. package/dist/entities/IndexerQueries/assetTransactions.js +0 -75
  53. package/dist/entities/IndexerQueries/assetTransactions.js.map +0 -1
  54. package/dist/entities/IndexerQueries/epochs.d.ts +0 -45
  55. package/dist/entities/IndexerQueries/epochs.d.ts.map +0 -1
  56. package/dist/entities/IndexerQueries/epochs.js +0 -51
  57. package/dist/entities/IndexerQueries/epochs.js.map +0 -1
  58. package/dist/entities/IndexerQueries/index.d.ts +0 -40
  59. package/dist/entities/IndexerQueries/index.d.ts.map +0 -1
  60. package/dist/entities/IndexerQueries/index.js +0 -45
  61. package/dist/entities/IndexerQueries/index.js.map +0 -1
  62. package/dist/entities/IndexerQueries/investorTransactions.d.ts +0 -50
  63. package/dist/entities/IndexerQueries/investorTransactions.d.ts.map +0 -1
  64. package/dist/entities/IndexerQueries/investorTransactions.js +0 -55
  65. package/dist/entities/IndexerQueries/investorTransactions.js.map +0 -1
  66. package/dist/entities/IndexerQueries/poolFeeSnapshots.d.ts +0 -48
  67. package/dist/entities/IndexerQueries/poolFeeSnapshots.d.ts.map +0 -1
  68. package/dist/entities/IndexerQueries/poolFeeSnapshots.js +0 -62
  69. package/dist/entities/IndexerQueries/poolFeeSnapshots.js.map +0 -1
  70. package/dist/entities/IndexerQueries/poolFeeTransactions.d.ts +0 -34
  71. package/dist/entities/IndexerQueries/poolFeeTransactions.d.ts.map +0 -1
  72. package/dist/entities/IndexerQueries/poolFeeTransactions.js +0 -37
  73. package/dist/entities/IndexerQueries/poolFeeTransactions.js.map +0 -1
  74. package/dist/entities/IndexerQueries/poolSnapshots.d.ts +0 -79
  75. package/dist/entities/IndexerQueries/poolSnapshots.d.ts.map +0 -1
  76. package/dist/entities/IndexerQueries/poolSnapshots.js +0 -112
  77. package/dist/entities/IndexerQueries/poolSnapshots.js.map +0 -1
  78. package/dist/entities/IndexerQueries/trancheCurrencyBalance.d.ts +0 -76
  79. package/dist/entities/IndexerQueries/trancheCurrencyBalance.d.ts.map +0 -1
  80. package/dist/entities/IndexerQueries/trancheCurrencyBalance.js +0 -63
  81. package/dist/entities/IndexerQueries/trancheCurrencyBalance.js.map +0 -1
  82. package/dist/entities/IndexerQueries/trancheSnapshots.d.ts +0 -70
  83. package/dist/entities/IndexerQueries/trancheSnapshots.d.ts.map +0 -1
  84. package/dist/entities/IndexerQueries/trancheSnapshots.js +0 -76
  85. package/dist/entities/IndexerQueries/trancheSnapshots.js.map +0 -1
  86. package/dist/entities/Reports/Processor.d.ts +0 -46
  87. package/dist/entities/Reports/Processor.d.ts.map +0 -1
  88. package/dist/entities/Reports/Processor.js +0 -471
  89. package/dist/entities/Reports/Processor.js.map +0 -1
  90. package/dist/entities/Reports/Processor.test.d.ts +0 -2
  91. package/dist/entities/Reports/Processor.test.d.ts.map +0 -1
  92. package/dist/entities/Reports/Processor.test.js +0 -767
  93. package/dist/entities/Reports/Processor.test.js.map +0 -1
  94. package/dist/entities/Reports/Reports.test.d.ts +0 -2
  95. package/dist/entities/Reports/Reports.test.d.ts.map +0 -1
  96. package/dist/entities/Reports/Reports.test.js +0 -559
  97. package/dist/entities/Reports/Reports.test.js.map +0 -1
  98. package/dist/entities/Reports/index.d.ts +0 -21
  99. package/dist/entities/Reports/index.d.ts.map +0 -1
  100. package/dist/entities/Reports/index.js +0 -144
  101. package/dist/entities/Reports/index.js.map +0 -1
  102. package/dist/tests/mocks/mockAssetSnapshots.d.ts +0 -3
  103. package/dist/tests/mocks/mockAssetSnapshots.d.ts.map +0 -1
  104. package/dist/tests/mocks/mockAssetSnapshots.js +0 -56
  105. package/dist/tests/mocks/mockAssetSnapshots.js.map +0 -1
  106. package/dist/tests/mocks/mockAssetTransactions.d.ts +0 -3
  107. package/dist/tests/mocks/mockAssetTransactions.d.ts.map +0 -1
  108. package/dist/tests/mocks/mockAssetTransactions.js +0 -86
  109. package/dist/tests/mocks/mockAssetTransactions.js.map +0 -1
  110. package/dist/tests/mocks/mockEpochs.d.ts +0 -3
  111. package/dist/tests/mocks/mockEpochs.d.ts.map +0 -1
  112. package/dist/tests/mocks/mockEpochs.js +0 -26
  113. package/dist/tests/mocks/mockEpochs.js.map +0 -1
  114. package/dist/tests/mocks/mockInvestorCurrencyBalance.d.ts +0 -3
  115. package/dist/tests/mocks/mockInvestorCurrencyBalance.d.ts.map +0 -1
  116. package/dist/tests/mocks/mockInvestorCurrencyBalance.js +0 -29
  117. package/dist/tests/mocks/mockInvestorCurrencyBalance.js.map +0 -1
  118. package/dist/tests/mocks/mockInvestorTransactions.d.ts +0 -3
  119. package/dist/tests/mocks/mockInvestorTransactions.d.ts.map +0 -1
  120. package/dist/tests/mocks/mockInvestorTransactions.js +0 -35
  121. package/dist/tests/mocks/mockInvestorTransactions.js.map +0 -1
  122. package/dist/tests/mocks/mockPoolFeeSnapshot.d.ts +0 -3
  123. package/dist/tests/mocks/mockPoolFeeSnapshot.d.ts.map +0 -1
  124. package/dist/tests/mocks/mockPoolFeeSnapshot.js +0 -68
  125. package/dist/tests/mocks/mockPoolFeeSnapshot.js.map +0 -1
  126. package/dist/tests/mocks/mockPoolFeeTransactions.d.ts +0 -11
  127. package/dist/tests/mocks/mockPoolFeeTransactions.d.ts.map +0 -1
  128. package/dist/tests/mocks/mockPoolFeeTransactions.js +0 -20
  129. package/dist/tests/mocks/mockPoolFeeTransactions.js.map +0 -1
  130. package/dist/tests/mocks/mockPoolSnapshots.d.ts +0 -3
  131. package/dist/tests/mocks/mockPoolSnapshots.d.ts.map +0 -1
  132. package/dist/tests/mocks/mockPoolSnapshots.js +0 -66
  133. package/dist/tests/mocks/mockPoolSnapshots.js.map +0 -1
  134. package/dist/tests/mocks/mockTrancheSnapshots.d.ts +0 -3
  135. package/dist/tests/mocks/mockTrancheSnapshots.d.ts.map +0 -1
  136. package/dist/tests/mocks/mockTrancheSnapshots.js +0 -112
  137. package/dist/tests/mocks/mockTrancheSnapshots.js.map +0 -1
  138. package/dist/types/reports.d.ts +0 -336
  139. package/dist/types/reports.d.ts.map +0 -1
  140. package/dist/types/reports.js +0 -2
  141. package/dist/types/reports.js.map +0 -1
@@ -1,68 +0,0 @@
1
- import { Balance } from '../../utils/BigInt.js';
2
- export const mockPoolFeeSnapshots = {
3
- '2024-01-01': [
4
- {
5
- pendingAmount: new Balance(0n, 6),
6
- poolFee: { name: 'poolFee 1' },
7
- poolFeeId: 'poolFee-1',
8
- sumAccruedAmount: new Balance(0n, 6),
9
- sumChargedAmount: new Balance(0n, 6),
10
- sumPaidAmount: new Balance(0n, 6),
11
- sumAccruedAmountByPeriod: new Balance(0n, 6),
12
- sumChargedAmountByPeriod: new Balance(0n, 6),
13
- sumPaidAmountByPeriod: new Balance(0n, 6),
14
- timestamp: '2024-01-01T12:00:00Z',
15
- poolCurrency: {
16
- decimals: 6,
17
- },
18
- },
19
- {
20
- pendingAmount: new Balance(0n, 6),
21
- poolFee: { name: 'poolFee 2' },
22
- poolFeeId: 'poolFee-2',
23
- sumAccruedAmount: new Balance(0n, 6),
24
- sumChargedAmount: new Balance(0n, 6),
25
- sumPaidAmount: new Balance(0n, 6),
26
- sumAccruedAmountByPeriod: new Balance(0n, 6),
27
- sumChargedAmountByPeriod: new Balance(0n, 6),
28
- sumPaidAmountByPeriod: new Balance(0n, 6),
29
- timestamp: '2024-01-01T12:00:00Z',
30
- poolCurrency: {
31
- decimals: 6,
32
- },
33
- },
34
- ],
35
- '2024-01-02': [
36
- {
37
- pendingAmount: new Balance(0n, 6),
38
- poolFee: { name: 'poolFee 1' },
39
- poolFeeId: 'poolFee-1',
40
- sumAccruedAmount: new Balance(0n, 6),
41
- sumChargedAmount: new Balance(0n, 6),
42
- sumPaidAmount: new Balance(0n, 6),
43
- sumAccruedAmountByPeriod: new Balance(0n, 6),
44
- sumChargedAmountByPeriod: new Balance(0n, 6),
45
- sumPaidAmountByPeriod: new Balance(0n, 6),
46
- timestamp: '2024-01-02T12:00:00Z',
47
- poolCurrency: {
48
- decimals: 6,
49
- },
50
- },
51
- {
52
- pendingAmount: new Balance(0n, 6),
53
- poolFee: { name: 'poolFee 2' },
54
- poolFeeId: 'poolFee-2',
55
- sumAccruedAmount: new Balance(0n, 6),
56
- sumChargedAmount: new Balance(0n, 6),
57
- sumPaidAmount: new Balance(0n, 6),
58
- sumAccruedAmountByPeriod: new Balance(0n, 6),
59
- sumChargedAmountByPeriod: new Balance(0n, 6),
60
- sumPaidAmountByPeriod: new Balance(0n, 6),
61
- timestamp: '2024-01-02T12:00:00Z',
62
- poolCurrency: {
63
- decimals: 6,
64
- },
65
- },
66
- ],
67
- };
68
- //# sourceMappingURL=mockPoolFeeSnapshot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mockPoolFeeSnapshot.js","sourceRoot":"","sources":["../../../src/tests/mocks/mockPoolFeeSnapshot.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAE/C,MAAM,CAAC,MAAM,oBAAoB,GAA2B;IAC1D,YAAY,EAAE;QACZ;YACE,aAAa,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YACjC,OAAO,EAA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WAAW,EAAE;YAC9B,SAAS,EAAE,WAAW;YACtB,gBAAgB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YACpC,gBAAgB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YACpC,aAAa,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YACjC,wBAAwB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YAC5C,wBAAwB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YAC5C,qBAAqB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YACzC,SAAS,EAAE,sBAAsB;YACjC,YAAY,EAAE;gBACZ,QAAQ,EAAE,CAAC;aACZ;SACF;QACD;YACE,aAAa,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YACjC,OAAO,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;YAC9B,SAAS,EAAE,WAAW;YACtB,gBAAgB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YACpC,gBAAgB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YACpC,aAAa,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YACjC,wBAAwB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YAC5C,wBAAwB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YAC5C,qBAAqB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YACzC,SAAS,EAAE,sBAAsB;YACjC,YAAY,EAAE;gBACZ,QAAQ,EAAE,CAAC;aACZ;SACF;KACF;CACF,CAAA"}
@@ -1,11 +0,0 @@
1
- import { PoolFeeTransaction } from '../../entities/IndexerQueries/poolFeeTransactions.js';
2
- import { Balance } from '../../utils/BigInt.js';
3
- export declare const mockFeeTransactions: {
4
- feeId: string;
5
- type: PoolFeeTransaction["type"];
6
- timestamp: string;
7
- blockNumber: string;
8
- epochNumber: number;
9
- amount: Balance;
10
- }[];
11
- //# sourceMappingURL=mockPoolFeeTransactions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mockPoolFeeTransactions.d.ts","sourceRoot":"","sources":["../../../src/tests/mocks/mockPoolFeeTransactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAA;AACzF,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,eAAO,MAAM,mBAAmB;;UAGT,kBAAkB,CAAC,MAAM,CAAC;;;;;GAchD,CAAA"}
@@ -1,20 +0,0 @@
1
- import { Balance } from '../../utils/BigInt.js';
2
- export const mockFeeTransactions = [
3
- {
4
- feeId: 'fee-1',
5
- type: 'ACCRUED',
6
- timestamp: '2024-01-01T00:00:00Z',
7
- blockNumber: '1',
8
- epochNumber: 1,
9
- amount: new Balance(1000000n, 6),
10
- },
11
- {
12
- feeId: 'fee-2',
13
- type: 'PAID',
14
- timestamp: '2024-01-02T00:00:00Z',
15
- blockNumber: '2',
16
- epochNumber: 2,
17
- amount: new Balance(2000000n, 6),
18
- },
19
- ];
20
- //# sourceMappingURL=mockPoolFeeTransactions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mockPoolFeeTransactions.js","sourceRoot":"","sources":["../../../src/tests/mocks/mockPoolFeeTransactions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC;QACE,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,SAAuC;QAC7C,SAAS,EAAE,sBAAsB;QACjC,WAAW,EAAE,GAAG;QAChB,WAAW,EAAE,CAAC;QACd,MAAM,EAAE,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;KACjC;IACD;QACE,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,MAAoC;QAC1C,SAAS,EAAE,sBAAsB;QACjC,WAAW,EAAE,GAAG;QAChB,WAAW,EAAE,CAAC;QACd,MAAM,EAAE,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;KACjC;CACF,CAAA"}
@@ -1,3 +0,0 @@
1
- import { PoolSnapshot } from '../../entities/IndexerQueries/poolSnapshots.js';
2
- export declare const mockPoolSnapshots: PoolSnapshot[];
3
- //# sourceMappingURL=mockPoolSnapshots.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mockPoolSnapshots.d.ts","sourceRoot":"","sources":["../../../src/tests/mocks/mockPoolSnapshots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAA;AAG7E,eAAO,MAAM,iBAAiB,EAAE,YAAY,EA+D3C,CAAA"}
@@ -1,66 +0,0 @@
1
- import { Balance } from '../../utils/BigInt.js';
2
- export const mockPoolSnapshots = [
3
- {
4
- id: 'pool-10',
5
- poolId: 'pool-1',
6
- timestamp: '2024-01-01T12:00:00Z',
7
- netAssetValue: new Balance(0n, 6),
8
- totalReserve: new Balance(0n, 6),
9
- offchainCashValue: new Balance(0n, 6),
10
- portfolioValuation: new Balance(0n, 6),
11
- sumPoolFeesChargedAmountByPeriod: new Balance(0n, 6),
12
- sumPoolFeesAccruedAmountByPeriod: new Balance(0n, 6),
13
- sumPoolFeesPaidAmountByPeriod: new Balance(0n, 6),
14
- sumBorrowedAmountByPeriod: new Balance(0n, 6),
15
- sumPrincipalRepaidAmountByPeriod: new Balance(0n, 6),
16
- sumInterestRepaidAmountByPeriod: new Balance(0n, 6),
17
- sumUnscheduledRepaidAmountByPeriod: new Balance(0n, 6),
18
- sumRepaidAmountByPeriod: new Balance(0n, 6),
19
- sumInvestedAmountByPeriod: new Balance(0n, 6),
20
- sumRedeemedAmountByPeriod: new Balance(0n, 6),
21
- sumPoolFeesPendingAmount: new Balance(0n, 6),
22
- sumDebtWrittenOffByPeriod: new Balance(0n, 6),
23
- sumInterestAccruedByPeriod: new Balance(0n, 6),
24
- sumRealizedProfitFifoByPeriod: new Balance(0n, 6),
25
- sumUnrealizedProfitAtMarketPrice: new Balance(0n, 6),
26
- sumUnrealizedProfitAtNotional: new Balance(0n, 6),
27
- sumUnrealizedProfitByPeriod: new Balance(0n, 6),
28
- poolValue: new Balance(0n, 6),
29
- poolCurrency: {
30
- decimals: 6,
31
- },
32
- tranches: ['pool1-0x6756e091ae798a8e51e12e27ee8facdf', 'pool1-0xda64aae939e4d3a981004619f1709d8f'],
33
- },
34
- {
35
- id: 'pool-11',
36
- poolId: 'pool-1',
37
- timestamp: '2024-01-02T12:00:00Z',
38
- netAssetValue: new Balance(0n, 6),
39
- totalReserve: new Balance(0n, 6),
40
- offchainCashValue: new Balance(0n, 6),
41
- portfolioValuation: new Balance(0n, 6),
42
- sumPoolFeesChargedAmountByPeriod: new Balance(0n, 6),
43
- sumPoolFeesAccruedAmountByPeriod: new Balance(0n, 6),
44
- sumPoolFeesPaidAmountByPeriod: new Balance(0n, 6),
45
- sumBorrowedAmountByPeriod: new Balance(0n, 6),
46
- sumPrincipalRepaidAmountByPeriod: new Balance(0n, 6),
47
- sumInterestRepaidAmountByPeriod: new Balance(0n, 6),
48
- sumUnscheduledRepaidAmountByPeriod: new Balance(0n, 6),
49
- sumRepaidAmountByPeriod: new Balance(0n, 6),
50
- sumInvestedAmountByPeriod: new Balance(0n, 6),
51
- sumRedeemedAmountByPeriod: new Balance(0n, 6),
52
- sumPoolFeesPendingAmount: new Balance(0n, 6),
53
- sumDebtWrittenOffByPeriod: new Balance(0n, 6),
54
- sumInterestAccruedByPeriod: new Balance(0n, 6),
55
- sumRealizedProfitFifoByPeriod: new Balance(0n, 6),
56
- sumUnrealizedProfitAtMarketPrice: new Balance(0n, 6),
57
- sumUnrealizedProfitAtNotional: new Balance(0n, 6),
58
- sumUnrealizedProfitByPeriod: new Balance(0n, 6),
59
- poolValue: new Balance(0n, 6),
60
- poolCurrency: {
61
- decimals: 6,
62
- },
63
- tranches: ['pool1-0x6756e091ae798a8e51e12e27ee8facdf', 'pool1-0xda64aae939e4d3a981004619f1709d8f'],
64
- },
65
- ];
66
- //# sourceMappingURL=mockPoolSnapshots.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mockPoolSnapshots.js","sourceRoot":"","sources":["../../../src/tests/mocks/mockPoolSnapshots.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAE/C,MAAM,CAAC,MAAM,iBAAiB,GAAmB;IAC/C;QACE,EAAE,EAAE,SAAS;QACb,MAAM,EAAE,QAAQ;QAChB,SAAS,EAAE,sBAAsB;QACjC,aAAa,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACjC,YAAY,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAChC,iBAAiB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACrC,kBAAkB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACtC,gCAAgC,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACpD,gCAAgC,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACpD,6BAA6B,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACjD,yBAAyB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7C,gCAAgC,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACpD,+BAA+B,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACnD,kCAAkC,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACtD,uBAAuB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAC3C,yBAAyB,EAAE,IA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D,yBAAyB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7C,gCAAgC,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACpD,+BAA+B,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACnD,kCAAkC,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACtD,uBAAuB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAC3C,yBAAyB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7C,yBAAyB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7C,wBAAwB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAC5C,yBAAyB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7C,0BAA0B,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAC9C,6BAA6B,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACjD,gCAAgC,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACpD,6BAA6B,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACjD,2BAA2B,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAC/C,SAAS,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7B,YAAY,EAAE;YACZ,QAAQ,EAAE,CAAC;SACZ;QACD,QAAQ,EAAE,CAAC,0CAA0C,EAAE,0CAA0C,CAAC;KACnG;CACF,CAAA"}
@@ -1,3 +0,0 @@
1
- import { TrancheSnapshotsByDate } from '../../entities/IndexerQueries/trancheSnapshots.js';
2
- export declare const mockTrancheSnapshots: TrancheSnapshotsByDate;
3
- //# sourceMappingURL=mockTrancheSnapshots.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mockTrancheSnapshots.d.ts","sourceRoot":"","sources":["../../../src/tests/mocks/mockTrancheSnapshots.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAA;AAE1F,eAAO,MAAM,oBAAoB,EAAE,sBA6GlC,CAAA"}
@@ -1,112 +0,0 @@
1
- import { Balance, Perquintill, Price } from '../../utils/BigInt.js';
2
- export const mockTrancheSnapshots = {
3
- '2024-01-01': [
4
- {
5
- id: 'tranche-1',
6
- price: Price.fromFloat('1.00'),
7
- timestamp: '2024-01-01T00:00:00Z',
8
- trancheId: 'senior',
9
- poolId: 'pool-1',
10
- tokenSupply: new Balance(0n, 6),
11
- pool: {
12
- currency: {
13
- decimals: 6,
14
- symbol: 'USDC',
15
- },
16
- },
17
- outstandingInvestOrders: new Balance(0n, 6),
18
- outstandingRedeemOrders: new Balance(0n, 6),
19
- fulfilledInvestOrders: new Balance(0n, 6),
20
- fulfilledRedeemOrders: new Balance(0n, 6),
21
- yield7DaysAnnualized: null,
22
- yield30DaysAnnualized: null,
23
- yield90DaysAnnualized: null,
24
- yieldSinceInception: new Perquintill(0n),
25
- yieldMTD: null,
26
- yieldQTD: null,
27
- yieldYTD: null,
28
- yieldSinceLastPeriod: null,
29
- },
30
- {
31
- id: 'tranche-2',
32
- price: Price.fromFloat('1.12'),
33
- timestamp: '2024-01-01T00:00:00Z',
34
- trancheId: 'junior',
35
- poolId: 'pool-1',
36
- tokenSupply: new Balance(0n, 6),
37
- pool: {
38
- currency: {
39
- decimals: 6,
40
- symbol: 'USDC',
41
- },
42
- },
43
- outstandingInvestOrders: new Balance(0n, 6),
44
- outstandingRedeemOrders: new Balance(0n, 6),
45
- fulfilledInvestOrders: new Balance(0n, 6),
46
- fulfilledRedeemOrders: new Balance(0n, 6),
47
- yield7DaysAnnualized: null,
48
- yield30DaysAnnualized: null,
49
- yield90DaysAnnualized: null,
50
- yieldSinceInception: new Perquintill(0n),
51
- yieldMTD: null,
52
- yieldQTD: null,
53
- yieldYTD: null,
54
- yieldSinceLastPeriod: null,
55
- },
56
- ],
57
- '2024-01-02': [
58
- {
59
- id: 'tranche-1',
60
- price: Price.fromFloat('1.00'),
61
- timestamp: '2024-01-02T00:00:00Z',
62
- trancheId: 'senior',
63
- poolId: 'pool-1',
64
- tokenSupply: new Balance(0n, 6),
65
- pool: {
66
- currency: {
67
- decimals: 6,
68
- symbol: 'USDC',
69
- },
70
- },
71
- outstandingInvestOrders: new Balance(0n, 6),
72
- outstandingRedeemOrders: new Balance(0n, 6),
73
- fulfilledInvestOrders: new Balance(0n, 6),
74
- fulfilledRedeemOrders: new Balance(0n, 6),
75
- yield7DaysAnnualized: null,
76
- yield30DaysAnnualized: null,
77
- yield90DaysAnnualized: null,
78
- yieldSinceInception: new Perquintill(0n),
79
- yieldMTD: null,
80
- yieldQTD: null,
81
- yieldYTD: null,
82
- yieldSinceLastPeriod: null,
83
- },
84
- {
85
- id: 'tranche-2',
86
- price: Price.fromFloat('1.12'),
87
- timestamp: '2024-01-02T00:00:00Z',
88
- trancheId: 'junior',
89
- poolId: 'pool-1',
90
- tokenSupply: new Balance(0n, 6),
91
- pool: {
92
- currency: {
93
- decimals: 6,
94
- symbol: 'USDC',
95
- },
96
- },
97
- outstandingInvestOrders: new Balance(0n, 6),
98
- outstandingRedeemOrders: new Balance(0n, 6),
99
- fulfilledInvestOrders: new Balance(0n, 6),
100
- fulfilledRedeemOrders: new Balance(0n, 6),
101
- yield7DaysAnnualized: null,
102
- yield30DaysAnnualized: null,
103
- yield90DaysAnnualized: null,
104
- yieldSinceInception: new Perquintill(0n),
105
- yieldMTD: null,
106
- yieldQTD: null,
107
- yieldYTD: null,
108
- yieldSinceLastPeriod: null,
109
- },
110
- ],
111
- };
112
- //# sourceMappingURL=mockTrancheSnapshots.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mockTrancheSnapshots.js","sourceRoot":"","sources":["../../../src/tests/mocks/mockTrancheSnapshots.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AAE,IAAI,WAAW,CAAC,EAAE,CAAC;YACxC,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,IAAI;YACd,oBAAoB,EAAE,IAAI;SAC3B;QACD;YACE,EAAE,EAAE,WAAW;YACf,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;YAC9B,SAAS,EAAE,sBAAsB;YACjC,SAAS,EAAE,QAAQ;YACnB,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YAC/B,IAAI,EAAE;gBACJ,QAAQ,EAAE;oBACR,QAAQ,EAAE,CAAC;oBACX,MAAM,EAAE,MAAM;iBACf;aACF;YACD,uBAAuB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YAC3C,uBAAuB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YAC3C,qBAAqB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YACzC,qBAAqB,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YACzC,oBAAoB,EAAE,IAAI;YAC1B,qBAAqB,EAAE,IAAI;YAC3B,qBAAqB,EAAE,IAAI;YAC3B,mBAAmB,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;YACxC,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,IAAI;YACd,oBAAoB,EAAE,IAAI;SAC3B;KACF;CACF,CAAA"}
@@ -1,336 +0,0 @@
1
- import { AssetSnapshot } from '../entities/IndexerQueries/assetSnapshots.js';
2
- import { AssetTransaction, AssetTransactionType } from '../entities/IndexerQueries/assetTransactions.js';
3
- import { Epoch } from '../entities/IndexerQueries/epochs.js';
4
- import { InvestorTransaction, SubqueryInvestorTransactionType } from '../entities/IndexerQueries/investorTransactions.js';
5
- import { PoolFeeSnapshotsByDate } from '../entities/IndexerQueries/poolFeeSnapshots.js';
6
- import { PoolFeeTransaction } from '../entities/IndexerQueries/poolFeeTransactions.js';
7
- import { PoolSnapshot } from '../entities/IndexerQueries/poolSnapshots.js';
8
- import { TrancheCurrencyBalance } from '../entities/IndexerQueries/trancheCurrencyBalance.js';
9
- import { TrancheSnapshotsByDate } from '../entities/IndexerQueries/trancheSnapshots.js';
10
- import { PoolMetadata } from '../types/poolMetadata.js';
11
- import { Balance, Perquintill, Price, Rate } from '../utils/BigInt.js';
12
- import { GroupBy } from '../utils/date.js';
13
- export type ReportFilter = {
14
- from?: string;
15
- to?: string;
16
- groupBy?: GroupBy;
17
- };
18
- export type DataReportFilter = {
19
- to?: string;
20
- from?: string;
21
- };
22
- export type Report = 'balanceSheet' | 'cashflow' | 'profitAndLoss';
23
- export type DataReport = 'investorTransactions' | 'assetTransactions' | 'feeTransactions' | 'tokenPrice' | 'assetList' | 'investorList' | 'ordersList' | 'assetTimeSeries';
24
- /**
25
- * Balance sheet type
26
- */
27
- export type BalanceSheetReport = {
28
- type: 'balanceSheet';
29
- timestamp: string;
30
- assetValuation: Balance;
31
- onchainReserve: Balance;
32
- offchainCash: Balance;
33
- accruedFees: Balance;
34
- netAssetValue: Balance;
35
- tranches?: {
36
- name: string;
37
- timestamp: string;
38
- tokenId: string;
39
- tokenSupply: Balance;
40
- tokenPrice: Price | null;
41
- trancheValue: Balance;
42
- }[];
43
- totalCapital?: Balance;
44
- };
45
- export type BalanceSheetData = {
46
- poolSnapshots: PoolSnapshot[];
47
- trancheSnapshots: TrancheSnapshotsByDate;
48
- };
49
- /**
50
- * Cashflow types
51
- */
52
- export type CashflowReportBase = {
53
- type: 'cashflow';
54
- timestamp: string;
55
- principalPayments: Balance;
56
- interestPayments: Balance;
57
- netCashflowAsset: Balance;
58
- fees: {
59
- name: string;
60
- amount: Balance;
61
- timestamp: string;
62
- feeId: string;
63
- }[];
64
- netCashflowAfterFees: Balance;
65
- investments: Balance;
66
- redemptions: Balance;
67
- activitiesCashflow: Balance;
68
- totalCashflow: Balance;
69
- endCashBalance: {
70
- balance: Balance;
71
- };
72
- };
73
- export type CashflowReportPublicCredit = CashflowReportBase & {
74
- subtype: 'publicCredit';
75
- realizedPL?: Balance;
76
- assetPurchases?: Balance;
77
- };
78
- export type CashflowReportPrivateCredit = CashflowReportBase & {
79
- subtype: 'privateCredit';
80
- assetFinancing?: Balance;
81
- };
82
- export type CashflowReport = CashflowReportPublicCredit | CashflowReportPrivateCredit;
83
- export type CashflowData = {
84
- poolSnapshots: PoolSnapshot[];
85
- poolFeeSnapshots: PoolFeeSnapshotsByDate;
86
- metadata: PoolMetadata | undefined | null;
87
- };
88
- /**
89
- * Profit and loss types
90
- */
91
- export type ProfitAndLossReportBase = {
92
- type: 'profitAndLoss';
93
- timestamp: string;
94
- profitAndLossFromAsset: Balance;
95
- interestPayments: Balance;
96
- otherPayments: Balance;
97
- totalExpenses: Balance;
98
- totalProfitAndLoss: Balance;
99
- fees: {
100
- name: string;
101
- amount: Balance;
102
- timestamp: string;
103
- feeId: string;
104
- }[];
105
- };
106
- export type ProfitAndLossReportPublicCredit = ProfitAndLossReportBase & {
107
- subtype: 'publicCredit';
108
- totalIncome: Balance;
109
- };
110
- export type ProfitAndLossReportPrivateCredit = ProfitAndLossReportBase & {
111
- subtype: 'privateCredit';
112
- interestAccrued: Balance;
113
- assetWriteOffs: Balance;
114
- };
115
- export type ProfitAndLossReport = ProfitAndLossReportPublicCredit | ProfitAndLossReportPrivateCredit;
116
- export type ProfitAndLossData = {
117
- poolSnapshots: PoolSnapshot[];
118
- poolFeeSnapshots: PoolFeeSnapshotsByDate;
119
- metadata: PoolMetadata | undefined | null;
120
- };
121
- /**
122
- * Investor transactions types
123
- */
124
- export type InvestorTransactionsData = {
125
- investorTransactions: InvestorTransaction[];
126
- };
127
- export type InvestorTransactionsReport = {
128
- type: 'investorTransactions';
129
- timestamp: string;
130
- chainId: number | 'centrifuge';
131
- account: string;
132
- epoch: string;
133
- transactionType: SubqueryInvestorTransactionType;
134
- currencyAmount: Balance;
135
- trancheTokenId: string;
136
- trancheTokenAmount: Balance;
137
- price: Price;
138
- transactionHash: string;
139
- };
140
- export type InvestorTransactionsReportFilter = {
141
- tokenId?: string;
142
- transactionType?: 'orders' | 'executions' | 'transfers' | 'all';
143
- network?: number | 'centrifuge' | 'all';
144
- address?: string;
145
- to?: string;
146
- from?: string;
147
- };
148
- /**
149
- * Asset transactions types
150
- */
151
- export type AssetTransactionsData = {
152
- assetTransactions: AssetTransaction[];
153
- };
154
- export type AssetTransactionReport = {
155
- type: 'assetTransactions';
156
- timestamp: string;
157
- assetId: string;
158
- epoch: string;
159
- transactionType: AssetTransactionType;
160
- amount: Balance;
161
- name: string;
162
- principalAmount: Balance | null;
163
- interestAmount: Balance | null;
164
- transactionHash: string;
165
- fromAsset?: {
166
- id: string;
167
- name: string;
168
- };
169
- toAsset?: {
170
- id: string;
171
- name: string;
172
- };
173
- };
174
- export type AssetTransactionReportFilter = {
175
- from?: string;
176
- to?: string;
177
- assetId?: string;
178
- transactionType?: 'created' | 'financed' | 'repaid' | 'priced' | 'closed' | 'cashTransfer' | 'all';
179
- };
180
- /**
181
- * Fee transactions types
182
- */
183
- export type FeeTransactionsData = {
184
- poolFeeTransactions: PoolFeeTransaction[];
185
- };
186
- export type FeeTransactionReport = {
187
- type: 'feeTransactions';
188
- timestamp: string;
189
- feeId: string;
190
- amount: Balance | null;
191
- transactionType: PoolFeeTransaction['type'];
192
- };
193
- export type FeeTransactionReportFilter = {
194
- from?: string;
195
- to?: string;
196
- transactionType?: 'directChargeMade' | 'directChargeCanceled' | 'accrued' | 'paid' | 'all';
197
- };
198
- /**
199
- * Token price types
200
- */
201
- export type TokenPriceData = {
202
- trancheSnapshots: TrancheSnapshotsByDate;
203
- };
204
- export type TokenPriceReport = {
205
- type: 'tokenPrice';
206
- timestamp: string;
207
- tranches: {
208
- id: string;
209
- price: Price;
210
- supply: Balance;
211
- timestamp: string;
212
- yieldMTD: Perquintill | null;
213
- yieldQTD: Perquintill | null;
214
- yieldYTD: Perquintill | null;
215
- yield7daysAnnualized: Perquintill | null;
216
- yield30daysAnnualized: Perquintill | null;
217
- yield90daysAnnualized: Perquintill | null;
218
- yieldSinceInception: Perquintill | null;
219
- }[];
220
- };
221
- export type TokenPriceReportFilter = {
222
- from?: string;
223
- to?: string;
224
- groupBy?: GroupBy;
225
- };
226
- /**
227
- * Asset list types
228
- */
229
- export type AssetListData = {
230
- assetSnapshots: AssetSnapshot[];
231
- metadata: PoolMetadata | undefined | null;
232
- };
233
- export type AssetListReportBase = {
234
- type: 'assetList';
235
- timestamp: string;
236
- assetId: string;
237
- presentValue: Balance | undefined;
238
- name: string;
239
- };
240
- export type AssetListReportPublicCredit = {
241
- subtype: 'publicCredit';
242
- faceValue: Balance | undefined;
243
- outstandingQuantity: Balance | undefined;
244
- currentPrice: Price | undefined;
245
- maturityDate: string | undefined;
246
- unrealizedProfit: Balance | undefined;
247
- realizedProfit: Balance | undefined;
248
- };
249
- export type AssetListReportPrivateCredit = {
250
- subtype: 'privateCredit';
251
- outstandingPrincipal: Balance | undefined;
252
- outstandingInterest: Balance | undefined;
253
- repaidPrincipal: Balance | undefined;
254
- repaidInterest: Balance | undefined;
255
- repaidUnscheduled: Balance | undefined;
256
- originationDate: number | undefined;
257
- maturityDate: string | undefined;
258
- valuationMethod: string | undefined;
259
- advanceRate: Rate | undefined;
260
- collateralValue: Balance | undefined;
261
- probabilityOfDefault: Rate | undefined;
262
- lossGivenDefault: Rate | undefined;
263
- discountRate: Rate | undefined;
264
- };
265
- export type AssetListReport = AssetListReportBase & (AssetListReportPublicCredit | AssetListReportPrivateCredit);
266
- export type AssetListReportFilter = {
267
- from?: string;
268
- to?: string;
269
- status?: 'ongoing' | 'repaid' | 'overdue' | 'all';
270
- };
271
- /**
272
- * Investor list types
273
- */
274
- export type InvestorListData = {
275
- trancheCurrencyBalance: TrancheCurrencyBalance[];
276
- };
277
- export type InvestorListReport = {
278
- type: 'investorList';
279
- chainId: number | 'centrifuge' | 'all';
280
- accountId: string;
281
- evmAddress?: string;
282
- position: Balance;
283
- poolPercentage: Rate;
284
- pendingInvest: Balance;
285
- pendingRedeem: Balance;
286
- trancheId: string;
287
- };
288
- export type InvestorListReportFilter = {
289
- from?: string;
290
- to?: string;
291
- trancheId?: string;
292
- network?: number | 'centrifuge' | 'all';
293
- address?: string;
294
- };
295
- /**
296
- * Orders list types
297
- */
298
- export type OrdersListData = {
299
- poolEpochs: Epoch[];
300
- };
301
- export type OrdersListReport = {
302
- type: 'ordersList';
303
- epoch: string;
304
- timestamp: string;
305
- netAssetValue: Balance;
306
- navPerShare: Price;
307
- lockedInvestments: Balance;
308
- lockedRedemptions: Balance;
309
- executedInvestments: Balance;
310
- executedRedemptions: Balance;
311
- paidFees: Balance;
312
- };
313
- export type OrdersListReportFilter = {
314
- from?: string;
315
- to?: string;
316
- };
317
- /**
318
- * Asset time series types
319
- */
320
- export type AssetTimeSeriesData = {
321
- assetSnapshots: AssetSnapshot[];
322
- };
323
- export type AssetTimeSeriesReport = {
324
- type: 'assetTimeSeries';
325
- timestamp: string;
326
- currentPrice: Balance;
327
- assetId: string;
328
- name: string;
329
- };
330
- export type AssetTimeSeriesReportFilter = {
331
- from?: string;
332
- to?: string;
333
- assetId?: string;
334
- name?: string;
335
- };
336
- //# sourceMappingURL=reports.d.ts.map