@ar.io/sdk 3.5.1-alpha.3 → 3.5.1-alpha.4

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.
@@ -81,13 +81,12 @@ class ARIOReadable {
81
81
  }));
82
82
  }
83
83
  async getEpoch(epoch) {
84
+ const epochIndex = await this.computeEpochIndex(epoch);
84
85
  const currentIndex = await this.computeCurrentEpochIndex();
85
- const requestedEpochIndex = await this.computeEpochIndex(epoch);
86
- if (requestedEpochIndex !== undefined &&
87
- requestedEpochIndex < currentIndex) {
86
+ if (epochIndex !== undefined && epochIndex < currentIndex) {
88
87
  const epochData = await (0, arweave_js_1.getEpochDataFromGql)({
89
88
  arweave: this.arweave,
90
- epochIndex: requestedEpochIndex,
89
+ epochIndex: epochIndex,
91
90
  processId: this.process.processId,
92
91
  });
93
92
  return epochData;
@@ -209,13 +208,12 @@ class ARIOReadable {
209
208
  });
210
209
  }
211
210
  async getPrescribedObservers(epoch) {
212
- const requestedEpochIndex = await this.computeEpochIndex(epoch);
211
+ const epochIndex = await this.computeEpochIndex(epoch);
213
212
  const currentIndex = await this.computeCurrentEpochIndex();
214
- if (requestedEpochIndex !== undefined &&
215
- requestedEpochIndex < currentIndex) {
213
+ if (epochIndex !== undefined && epochIndex < currentIndex) {
216
214
  const epochData = await (0, arweave_js_1.getEpochDataFromGql)({
217
215
  arweave: this.arweave,
218
- epochIndex: requestedEpochIndex,
216
+ epochIndex: epochIndex,
219
217
  processId: this.process.processId,
220
218
  });
221
219
  return epochData?.prescribedObservers;
@@ -232,13 +230,12 @@ class ARIOReadable {
232
230
  });
233
231
  }
234
232
  async getPrescribedNames(epoch) {
235
- const requestedEpochIndex = await this.computeEpochIndex(epoch);
233
+ const epochIndex = await this.computeEpochIndex(epoch);
236
234
  const currentIndex = await this.computeCurrentEpochIndex();
237
- if (requestedEpochIndex !== undefined &&
238
- requestedEpochIndex < currentIndex) {
235
+ if (epochIndex !== undefined && epochIndex < currentIndex) {
239
236
  const epochData = await (0, arweave_js_1.getEpochDataFromGql)({
240
237
  arweave: this.arweave,
241
- epochIndex: requestedEpochIndex,
238
+ epochIndex: epochIndex,
242
239
  processId: this.process.processId,
243
240
  });
244
241
  return epochData?.prescribedNames;
@@ -256,13 +253,12 @@ class ARIOReadable {
256
253
  }
257
254
  // we need to find the epoch index for the epoch that is currently being distributed and fetch it from gql
258
255
  async getObservations(epoch) {
259
- const requestedEpochIndex = await this.computeEpochIndex(epoch);
256
+ const epochIndex = await this.computeEpochIndex(epoch);
260
257
  const currentIndex = await this.computeCurrentEpochIndex();
261
- if (requestedEpochIndex !== undefined &&
262
- requestedEpochIndex < currentIndex) {
258
+ if (epochIndex !== undefined && epochIndex < currentIndex) {
263
259
  const epochData = await (0, arweave_js_1.getEpochDataFromGql)({
264
260
  arweave: this.arweave,
265
- epochIndex: requestedEpochIndex,
261
+ epochIndex: epochIndex,
266
262
  processId: this.process.processId,
267
263
  });
268
264
  return epochData?.observations;
@@ -280,13 +276,12 @@ class ARIOReadable {
280
276
  });
281
277
  }
282
278
  async getDistributions(epoch) {
283
- const requestedEpochIndex = await this.computeEpochIndex(epoch);
279
+ const epochIndex = await this.computeEpochIndex(epoch);
284
280
  const currentIndex = await this.computeCurrentEpochIndex();
285
- if (requestedEpochIndex !== undefined &&
286
- requestedEpochIndex < currentIndex) {
281
+ if (epochIndex !== undefined && epochIndex < currentIndex) {
287
282
  const epochData = await (0, arweave_js_1.getEpochDataFromGql)({
288
283
  arweave: this.arweave,
289
- epochIndex: requestedEpochIndex,
284
+ epochIndex: epochIndex,
290
285
  processId: this.process.processId,
291
286
  });
292
287
  return epochData?.distributions;
@@ -29,7 +29,7 @@ exports.arioDevnetProcessId = exports.ARIO_DEVNET_PROCESS_ID;
29
29
  exports.ARIO_TESTNET_PROCESS_ID = 'agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA';
30
30
  exports.ANT_REGISTRY_ID = 'i_le_yKKPVstLTDSmkHRqf-wYphMnwB9OhleiTgMkWc';
31
31
  exports.MARIO_PER_ARIO = 1_000_000;
32
- exports.AOS_MODULE_ID = 'gFNGk70U9iwof9MyDqqKeizGa98w66-qCyFxupzXUnU';
33
- exports.ANT_LUA_ID = 'W2sHFPAZ86BJLrU-HPp2P7twdlmbFJbckbCe42ETX-4';
32
+ exports.AOS_MODULE_ID = '4uMwpOuU-YF9pKbqC73tmMCf2OLFUY8U0gCWEUCy-4M';
33
+ exports.ANT_LUA_ID = 's9drxRd-ylbJVtAi14tGmF7e42kA69PgfKUtgtmvAmU';
34
34
  exports.AO_AUTHORITY = 'fcoN_xJeisVsPXA-trzVAuIiqO3ydLQxM-L4XbrQKzY';
35
35
  exports.DEFAULT_SCHEDULER_ID = '_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA';
@@ -17,4 +17,4 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.version = void 0;
19
19
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
20
- exports.version = '3.5.1-alpha.3';
20
+ exports.version = '3.5.1-alpha.4';
@@ -77,13 +77,12 @@ export class ARIOReadable {
77
77
  }));
78
78
  }
79
79
  async getEpoch(epoch) {
80
+ const epochIndex = await this.computeEpochIndex(epoch);
80
81
  const currentIndex = await this.computeCurrentEpochIndex();
81
- const requestedEpochIndex = await this.computeEpochIndex(epoch);
82
- if (requestedEpochIndex !== undefined &&
83
- requestedEpochIndex < currentIndex) {
82
+ if (epochIndex !== undefined && epochIndex < currentIndex) {
84
83
  const epochData = await getEpochDataFromGql({
85
84
  arweave: this.arweave,
86
- epochIndex: requestedEpochIndex,
85
+ epochIndex: epochIndex,
87
86
  processId: this.process.processId,
88
87
  });
89
88
  return epochData;
@@ -205,13 +204,12 @@ export class ARIOReadable {
205
204
  });
206
205
  }
207
206
  async getPrescribedObservers(epoch) {
208
- const requestedEpochIndex = await this.computeEpochIndex(epoch);
207
+ const epochIndex = await this.computeEpochIndex(epoch);
209
208
  const currentIndex = await this.computeCurrentEpochIndex();
210
- if (requestedEpochIndex !== undefined &&
211
- requestedEpochIndex < currentIndex) {
209
+ if (epochIndex !== undefined && epochIndex < currentIndex) {
212
210
  const epochData = await getEpochDataFromGql({
213
211
  arweave: this.arweave,
214
- epochIndex: requestedEpochIndex,
212
+ epochIndex: epochIndex,
215
213
  processId: this.process.processId,
216
214
  });
217
215
  return epochData?.prescribedObservers;
@@ -228,13 +226,12 @@ export class ARIOReadable {
228
226
  });
229
227
  }
230
228
  async getPrescribedNames(epoch) {
231
- const requestedEpochIndex = await this.computeEpochIndex(epoch);
229
+ const epochIndex = await this.computeEpochIndex(epoch);
232
230
  const currentIndex = await this.computeCurrentEpochIndex();
233
- if (requestedEpochIndex !== undefined &&
234
- requestedEpochIndex < currentIndex) {
231
+ if (epochIndex !== undefined && epochIndex < currentIndex) {
235
232
  const epochData = await getEpochDataFromGql({
236
233
  arweave: this.arweave,
237
- epochIndex: requestedEpochIndex,
234
+ epochIndex: epochIndex,
238
235
  processId: this.process.processId,
239
236
  });
240
237
  return epochData?.prescribedNames;
@@ -252,13 +249,12 @@ export class ARIOReadable {
252
249
  }
253
250
  // we need to find the epoch index for the epoch that is currently being distributed and fetch it from gql
254
251
  async getObservations(epoch) {
255
- const requestedEpochIndex = await this.computeEpochIndex(epoch);
252
+ const epochIndex = await this.computeEpochIndex(epoch);
256
253
  const currentIndex = await this.computeCurrentEpochIndex();
257
- if (requestedEpochIndex !== undefined &&
258
- requestedEpochIndex < currentIndex) {
254
+ if (epochIndex !== undefined && epochIndex < currentIndex) {
259
255
  const epochData = await getEpochDataFromGql({
260
256
  arweave: this.arweave,
261
- epochIndex: requestedEpochIndex,
257
+ epochIndex: epochIndex,
262
258
  processId: this.process.processId,
263
259
  });
264
260
  return epochData?.observations;
@@ -276,13 +272,12 @@ export class ARIOReadable {
276
272
  });
277
273
  }
278
274
  async getDistributions(epoch) {
279
- const requestedEpochIndex = await this.computeEpochIndex(epoch);
275
+ const epochIndex = await this.computeEpochIndex(epoch);
280
276
  const currentIndex = await this.computeCurrentEpochIndex();
281
- if (requestedEpochIndex !== undefined &&
282
- requestedEpochIndex < currentIndex) {
277
+ if (epochIndex !== undefined && epochIndex < currentIndex) {
283
278
  const epochData = await getEpochDataFromGql({
284
279
  arweave: this.arweave,
285
- epochIndex: requestedEpochIndex,
280
+ epochIndex: epochIndex,
286
281
  processId: this.process.processId,
287
282
  });
288
283
  return epochData?.distributions;
@@ -26,7 +26,7 @@ export const arioDevnetProcessId = ARIO_DEVNET_PROCESS_ID;
26
26
  export const ARIO_TESTNET_PROCESS_ID = 'agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA';
27
27
  export const ANT_REGISTRY_ID = 'i_le_yKKPVstLTDSmkHRqf-wYphMnwB9OhleiTgMkWc';
28
28
  export const MARIO_PER_ARIO = 1_000_000;
29
- export const AOS_MODULE_ID = 'gFNGk70U9iwof9MyDqqKeizGa98w66-qCyFxupzXUnU';
30
- export const ANT_LUA_ID = 'W2sHFPAZ86BJLrU-HPp2P7twdlmbFJbckbCe42ETX-4';
29
+ export const AOS_MODULE_ID = '4uMwpOuU-YF9pKbqC73tmMCf2OLFUY8U0gCWEUCy-4M';
30
+ export const ANT_LUA_ID = 's9drxRd-ylbJVtAi14tGmF7e42kA69PgfKUtgtmvAmU';
31
31
  export const AO_AUTHORITY = 'fcoN_xJeisVsPXA-trzVAuIiqO3ydLQxM-L4XbrQKzY';
32
32
  export const DEFAULT_SCHEDULER_ID = '_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA';
@@ -14,4 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
17
- export const version = '3.5.1-alpha.3';
17
+ export const version = '3.5.1-alpha.4';
@@ -24,7 +24,7 @@ export declare const arioDevnetProcessId = "GaQrvEMKBpkjofgnBi_B3IgIDmY_XYelVLB6
24
24
  export declare const ARIO_TESTNET_PROCESS_ID = "agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA";
25
25
  export declare const ANT_REGISTRY_ID = "i_le_yKKPVstLTDSmkHRqf-wYphMnwB9OhleiTgMkWc";
26
26
  export declare const MARIO_PER_ARIO = 1000000;
27
- export declare const AOS_MODULE_ID = "gFNGk70U9iwof9MyDqqKeizGa98w66-qCyFxupzXUnU";
28
- export declare const ANT_LUA_ID = "W2sHFPAZ86BJLrU-HPp2P7twdlmbFJbckbCe42ETX-4";
27
+ export declare const AOS_MODULE_ID = "4uMwpOuU-YF9pKbqC73tmMCf2OLFUY8U0gCWEUCy-4M";
28
+ export declare const ANT_LUA_ID = "s9drxRd-ylbJVtAi14tGmF7e42kA69PgfKUtgtmvAmU";
29
29
  export declare const AO_AUTHORITY = "fcoN_xJeisVsPXA-trzVAuIiqO3ydLQxM-L4XbrQKzY";
30
30
  export declare const DEFAULT_SCHEDULER_ID = "_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA";
@@ -13,4 +13,4 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare const version = "3.5.1-alpha.2";
16
+ export declare const version = "3.5.1-alpha.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "3.5.1-alpha.3",
3
+ "version": "3.5.1-alpha.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"