@requestnetwork/data-access 0.23.1-next.1351 → 0.23.1-next.710

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 (67) hide show
  1. package/README.md +0 -4
  2. package/dist/block.d.ts +4 -4
  3. package/dist/block.d.ts.map +1 -1
  4. package/dist/block.js +9 -9
  5. package/dist/block.js.map +1 -1
  6. package/dist/combined-data-access.d.ts +13 -0
  7. package/dist/combined-data-access.d.ts.map +1 -0
  8. package/dist/combined-data-access.js +44 -0
  9. package/dist/combined-data-access.js.map +1 -0
  10. package/dist/data-read.d.ts +17 -0
  11. package/dist/data-read.d.ts.map +1 -0
  12. package/dist/data-read.js +158 -0
  13. package/dist/data-read.js.map +1 -0
  14. package/dist/data-write.d.ts +10 -0
  15. package/dist/data-write.d.ts.map +1 -0
  16. package/dist/data-write.js +48 -0
  17. package/dist/data-write.js.map +1 -0
  18. package/dist/in-memory-indexer.d.ts +18 -0
  19. package/dist/in-memory-indexer.d.ts.map +1 -0
  20. package/dist/in-memory-indexer.js +110 -0
  21. package/dist/in-memory-indexer.js.map +1 -0
  22. package/dist/index.d.ts +6 -2
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +11 -5
  25. package/dist/index.js.map +1 -1
  26. package/dist/mock-data-access.d.ts +13 -0
  27. package/dist/mock-data-access.d.ts.map +1 -0
  28. package/dist/mock-data-access.js +29 -0
  29. package/dist/mock-data-access.js.map +1 -0
  30. package/dist/pending-store.d.ts +16 -0
  31. package/dist/pending-store.d.ts.map +1 -0
  32. package/dist/pending-store.js +33 -0
  33. package/dist/pending-store.js.map +1 -0
  34. package/dist/types.d.ts +7 -0
  35. package/dist/types.d.ts.map +1 -0
  36. package/dist/types.js +3 -0
  37. package/dist/types.js.map +1 -0
  38. package/package.json +18 -29
  39. package/CHANGELOG.md +0 -1466
  40. package/dist/data-access.d.ts +0 -140
  41. package/dist/data-access.d.ts.map +0 -1
  42. package/dist/data-access.js +0 -425
  43. package/dist/data-access.js.map +0 -1
  44. package/dist/ignored-location.d.ts +0 -58
  45. package/dist/ignored-location.d.ts.map +0 -1
  46. package/dist/ignored-location.js +0 -104
  47. package/dist/ignored-location.js.map +0 -1
  48. package/dist/interval-timer.d.ts +0 -36
  49. package/dist/interval-timer.d.ts.map +0 -1
  50. package/dist/interval-timer.js +0 -90
  51. package/dist/interval-timer.js.map +0 -1
  52. package/dist/transaction-index/index.d.ts +0 -5
  53. package/dist/transaction-index/index.d.ts.map +0 -1
  54. package/dist/transaction-index/index.js +0 -17
  55. package/dist/transaction-index/index.js.map +0 -1
  56. package/dist/transaction-index/location-by-topic.d.ts +0 -53
  57. package/dist/transaction-index/location-by-topic.d.ts.map +0 -1
  58. package/dist/transaction-index/location-by-topic.js +0 -111
  59. package/dist/transaction-index/location-by-topic.js.map +0 -1
  60. package/dist/transaction-index/timestamp-by-location.d.ts +0 -60
  61. package/dist/transaction-index/timestamp-by-location.d.ts.map +0 -1
  62. package/dist/transaction-index/timestamp-by-location.js +0 -116
  63. package/dist/transaction-index/timestamp-by-location.js.map +0 -1
  64. package/dist/transaction-index/transaction-index.d.ts +0 -74
  65. package/dist/transaction-index/transaction-index.d.ts.map +0 -1
  66. package/dist/transaction-index/transaction-index.js +0 -212
  67. package/dist/transaction-index/transaction-index.js.map +0 -1
@@ -1,74 +0,0 @@
1
- import { DataAccessTypes } from '@requestnetwork/types';
2
- import * as Keyv from 'keyv';
3
- /**
4
- * An in-memory implementation of the transaction index.
5
- */
6
- export default class TransactionIndex implements DataAccessTypes.ITransactionIndex {
7
- private locationByTopic?;
8
- private timestampByLocation;
9
- private indexedLocation;
10
- /**
11
- * Constructor of TransactionIndex
12
- * @param store a Keyv store to persist the index
13
- */
14
- constructor(store?: Keyv.Store<any>);
15
- initialize(): Promise<void>;
16
- /**
17
- * Get the last indexed timestamp
18
- */
19
- getLastTransactionTimestamp(): Promise<number | null>;
20
- /**
21
- * Adds a transaction to the index, for indexing by channel, topic and timestamp
22
- *
23
- * @param dataId the dataId to index
24
- * @param header the headers of the block (containing channels and topics)
25
- * @param timestamp the timestamp of the transaction
26
- */
27
- addTransaction(dataId: string, header: DataAccessTypes.IBlockHeader, timestamp: number): Promise<void>;
28
- /**
29
- * Removes a transaction from the index
30
- *
31
- * @param dataId the dataId to remove
32
- */
33
- removeTransaction(dataId: string): Promise<void>;
34
- /**
35
- * Update timestamp for a dataId
36
- *
37
- * @param dataId the dataId to index
38
- * @param timestamp the timestamp of the transaction
39
- */
40
- updateTimestamp(dataId: string, timestamp: number): Promise<void>;
41
- /**
42
- * Get a list of transactions indexed by channel id
43
- * @param channelId channel id to retrieve the transaction from
44
- * @param timestampBoundaries timestamp boundaries of the transactions search
45
- * @returns list of location of a channel
46
- */
47
- getStorageLocationList(channelId: string, timestampBoundaries?: DataAccessTypes.ITimestampBoundaries): Promise<string[]>;
48
- /**
49
- * Get a list of channels indexed by topic
50
- * @param topic topic to retrieve the channelIds from
51
- * @param timestampBoundaries timestamp boundaries of the transactions search
52
- * @returns list of location of the channels indexed by the topic
53
- */
54
- getChannelIdsForTopic(topic: string, timestampBoundaries?: DataAccessTypes.ITimestampBoundaries | undefined): Promise<string[]>;
55
- /**
56
- * Get a list of channels indexed by topics
57
- * @param topics topics to retrieve the channelIds from
58
- * @param timestampBoundaries timestamp boundaries of the transactions search
59
- * @returns list of location of the channels indexed by the topics
60
- */
61
- getChannelIdsForMultipleTopics(topics: string[], timestampBoundaries?: DataAccessTypes.ITimestampBoundaries | undefined): Promise<string[]>;
62
- /**
63
- * the list of indexed locations
64
- */
65
- getIndexedLocations(): Promise<string[]>;
66
- /**
67
- * Update the list of data ids stored
68
- *
69
- * @param dataId data id to add to the list
70
- * @returns
71
- */
72
- private updateIndexedLocation;
73
- }
74
- //# sourceMappingURL=transaction-index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transaction-index.d.ts","sourceRoot":"","sources":["../../src/transaction-index/transaction-index.ts"],"names":[],"mappings":"AAAA,OA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CAAC;IA+BpB;;OAEG;IACU,mBAAmB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAKrD;;;;;OAKG;YACW,qBAAqB;CAYpC"}
@@ -1,212 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const Bluebird = require("bluebird");
13
- const Keyv = require("keyv");
14
- const location_by_topic_1 = require("./location-by-topic");
15
- const timestamp_by_location_1 = require("./timestamp-by-location");
16
- /**
17
- * An in-memory implementation of the transaction index.
18
- */
19
- class TransactionIndex {
20
- /**
21
- * Constructor of TransactionIndex
22
- * @param store a Keyv store to persist the index
23
- */
24
- constructor(store) {
25
- this.timestampByLocation = new timestamp_by_location_1.default(store);
26
- this.locationByTopic = new location_by_topic_1.default(store);
27
- this.indexedLocation = new Keyv({
28
- namespace: 'indexedLocation',
29
- store,
30
- });
31
- }
32
- // tslint:disable-next-line: no-empty
33
- initialize() {
34
- return __awaiter(this, void 0, void 0, function* () { });
35
- }
36
- /**
37
- * Get the last indexed timestamp
38
- */
39
- getLastTransactionTimestamp() {
40
- return this.timestampByLocation.getLastTransactionTimestamp();
41
- }
42
- /**
43
- * Adds a transaction to the index, for indexing by channel, topic and timestamp
44
- *
45
- * @param dataId the dataId to index
46
- * @param header the headers of the block (containing channels and topics)
47
- * @param timestamp the timestamp of the transaction
48
- */
49
- addTransaction(dataId, header, timestamp) {
50
- return __awaiter(this, void 0, void 0, function* () {
51
- if (!this.locationByTopic) {
52
- throw new Error('TransactionIndex must be initialized');
53
- }
54
- // topic the dataId with block topic
55
- yield this.locationByTopic.pushStorageLocationIndexedWithBlockTopics(dataId, header);
56
- // add the timestamp in the index
57
- yield this.timestampByLocation.pushTimestampByLocation(dataId, timestamp);
58
- yield this.updateIndexedLocation(dataId);
59
- });
60
- }
61
- /**
62
- * Removes a transaction from the index
63
- *
64
- * @param dataId the dataId to remove
65
- */
66
- removeTransaction(dataId) {
67
- return __awaiter(this, void 0, void 0, function* () {
68
- if (!this.locationByTopic) {
69
- throw new Error('TransactionIndex must be initialized');
70
- }
71
- // remove the timestamp in the index
72
- yield this.timestampByLocation.removeIndexedDataId(dataId);
73
- });
74
- }
75
- /**
76
- * Update timestamp for a dataId
77
- *
78
- * @param dataId the dataId to index
79
- * @param timestamp the timestamp of the transaction
80
- */
81
- updateTimestamp(dataId, timestamp) {
82
- return __awaiter(this, void 0, void 0, function* () {
83
- if (!this.timestampByLocation) {
84
- throw new Error('TransactionIndex must be initialized');
85
- }
86
- // update the timestamp in the index
87
- yield this.timestampByLocation.updateTimestampByLocation(dataId, timestamp);
88
- });
89
- }
90
- /**
91
- * Get a list of transactions indexed by channel id
92
- * @param channelId channel id to retrieve the transaction from
93
- * @param timestampBoundaries timestamp boundaries of the transactions search
94
- * @returns list of location of a channel
95
- */
96
- getStorageLocationList(channelId, timestampBoundaries) {
97
- return __awaiter(this, void 0, void 0, function* () {
98
- if (!this.locationByTopic) {
99
- throw new Error('TransactionIndex must be initialized');
100
- }
101
- // get transaction locations for the given channel
102
- let storageLocationList = yield this.locationByTopic.getStorageLocationsFromChannelId(channelId);
103
- storageLocationList = yield Bluebird.filter(storageLocationList, (dataId) => __awaiter(this, void 0, void 0, function* () {
104
- // if the dataId has not been suppressed
105
- const exist = (yield this.timestampByLocation.getTimestampFromLocation(dataId)) !== null;
106
- // if boundaries are passed, only return locations of transaction within these boundaries
107
- const inTimeBoundaries = !timestampBoundaries ||
108
- (yield this.timestampByLocation.isDataInBoundaries(dataId, timestampBoundaries));
109
- return exist && inTimeBoundaries;
110
- }));
111
- return storageLocationList;
112
- });
113
- }
114
- /**
115
- * Get a list of channels indexed by topic
116
- * @param topic topic to retrieve the channelIds from
117
- * @param timestampBoundaries timestamp boundaries of the transactions search
118
- * @returns list of location of the channels indexed by the topic
119
- */
120
- getChannelIdsForTopic(topic, timestampBoundaries) {
121
- return __awaiter(this, void 0, void 0, function* () {
122
- if (!this.locationByTopic) {
123
- throw new Error('TransactionIndex must be initialized');
124
- }
125
- // get channels for given topic
126
- const channelIds = yield this.locationByTopic.getChannelIdsFromTopic(topic);
127
- // if boundaries are passed, only return channelIds with transactions within these boundaries
128
- if (timestampBoundaries) {
129
- const result = [];
130
- // check for each channel if one of its transactions occurred during the given boundaries
131
- for (const channelId of channelIds) {
132
- const txLocations = yield this.locationByTopic.getStorageLocationsFromChannelId(channelId);
133
- for (const txLocation of txLocations) {
134
- const isInBoundaries = yield this.timestampByLocation.isDataInBoundaries(txLocation, timestampBoundaries);
135
- if (isInBoundaries) {
136
- result.push(channelId);
137
- break;
138
- }
139
- }
140
- }
141
- return result;
142
- }
143
- else {
144
- return channelIds;
145
- }
146
- });
147
- }
148
- /**
149
- * Get a list of channels indexed by topics
150
- * @param topics topics to retrieve the channelIds from
151
- * @param timestampBoundaries timestamp boundaries of the transactions search
152
- * @returns list of location of the channels indexed by the topics
153
- */
154
- getChannelIdsForMultipleTopics(topics, timestampBoundaries) {
155
- return __awaiter(this, void 0, void 0, function* () {
156
- if (!this.locationByTopic) {
157
- throw new Error('TransactionIndex must be initialized');
158
- }
159
- // get channels for given topics
160
- const channelIds = yield this.locationByTopic.getChannelIdsFromMultipleTopics(topics);
161
- // if boundaries are passed, only return channelIds with transactions within these boundaries
162
- if (timestampBoundaries) {
163
- const result = [];
164
- // check for each channel if one of its transactions occurred inside the given boundaries
165
- for (const channelId of channelIds) {
166
- const txLocations = yield this.locationByTopic.getStorageLocationsFromChannelId(channelId);
167
- for (const txLocation of txLocations) {
168
- const isInBoundaries = yield this.timestampByLocation.isDataInBoundaries(txLocation, timestampBoundaries);
169
- if (isInBoundaries) {
170
- result.push(channelId);
171
- break;
172
- }
173
- }
174
- }
175
- return result;
176
- }
177
- else {
178
- return channelIds;
179
- }
180
- });
181
- }
182
- /**
183
- * the list of indexed locations
184
- */
185
- getIndexedLocations() {
186
- return __awaiter(this, void 0, void 0, function* () {
187
- const listDataIds = yield this.indexedLocation.get('list');
188
- return listDataIds || [];
189
- });
190
- }
191
- /**
192
- * Update the list of data ids stored
193
- *
194
- * @param dataId data id to add to the list
195
- * @returns
196
- */
197
- updateIndexedLocation(dataId) {
198
- return __awaiter(this, void 0, void 0, function* () {
199
- let listDataIds = yield this.indexedLocation.get('list');
200
- if (!listDataIds) {
201
- listDataIds = [];
202
- }
203
- // push it if not already done
204
- if (!listDataIds.includes(dataId)) {
205
- listDataIds.push(dataId);
206
- yield this.indexedLocation.set('list', listDataIds);
207
- }
208
- });
209
- }
210
- }
211
- exports.default = TransactionIndex;
212
- //# sourceMappingURL=transaction-index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transaction-index.js","sourceRoot":"","sources":["../../src/transaction-index/transaction-index.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,qCAAqC;AACrC,6BAA6B;AAE7B,2DAAkD;AAClD,mEAA0D;AAE1D;;GAEG;AAEH,MAAqB,gBAAgB;IAWnC;;;OAGG;IACH,YAAY,KAAuB;QACjC,IAAI,CAAC,mBAAmB,GAAG,IAAI,+BAAmB,CAAC,KAAK,CAAC,CAAC;QAC1D,IAAI,CAAC,eAAe,GAAG,IAAI,2BAAe,CAAC,KAAK,CAAC,CAAC;QAElD,IAAI,CAAC,eAAe,GAAG,IAAI,IAAI,CAAW;YACxC,SAAS,EAAE,iBAAiB;YAC5B,KAAK;SACN,CAAC,CAAC;IACL,CAAC;IAED,qCAAqC;IACxB,UAAU;8DAAmB,CAAC;KAAA;IAE3C;;OAEG;IACI,2BAA2B;QAChC,OAA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