@ar.io/sdk 2.1.0-alpha.5 → 2.1.0-alpha.7

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.
@@ -204,7 +204,6 @@ class AoANTWriteable extends AoANTReadable {
204
204
  ];
205
205
  return this.process.send({
206
206
  tags,
207
- data: {},
208
207
  signer: this.signer,
209
208
  });
210
209
  }
@@ -223,7 +222,6 @@ class AoANTWriteable extends AoANTReadable {
223
222
  ];
224
223
  return this.process.send({
225
224
  tags,
226
- data: {},
227
225
  signer: this.signer,
228
226
  });
229
227
  }
@@ -242,7 +240,6 @@ class AoANTWriteable extends AoANTReadable {
242
240
  ];
243
241
  return this.process.send({
244
242
  tags,
245
- data: {},
246
243
  signer: this.signer,
247
244
  });
248
245
  }
@@ -264,7 +261,6 @@ class AoANTWriteable extends AoANTReadable {
264
261
  { name: 'Transaction-Id', value: transactionId },
265
262
  { name: 'TTL-Seconds', value: ttlSeconds.toString() },
266
263
  ],
267
- data: { transactionId, ttlSeconds },
268
264
  signer: this.signer,
269
265
  });
270
266
  }
@@ -282,7 +278,6 @@ class AoANTWriteable extends AoANTReadable {
282
278
  { name: 'Action', value: 'Remove-Record' },
283
279
  { name: 'Sub-Domain', value: undername },
284
280
  ],
285
- data: { undername },
286
281
  signer: this.signer,
287
282
  });
288
283
  }
@@ -300,7 +295,6 @@ class AoANTWriteable extends AoANTReadable {
300
295
  { name: 'Action', value: 'Set-Ticker' },
301
296
  { name: 'Ticker', value: ticker },
302
297
  ],
303
- data: { ticker },
304
298
  signer: this.signer,
305
299
  });
306
300
  }
@@ -318,7 +312,6 @@ class AoANTWriteable extends AoANTReadable {
318
312
  { name: 'Action', value: 'Set-Name' },
319
313
  { name: 'Name', value: name },
320
314
  ],
321
- data: { name },
322
315
  signer: this.signer,
323
316
  });
324
317
  }
@@ -91,7 +91,7 @@ class AOProcess {
91
91
  process: this.processId,
92
92
  // TODO: any other default tags we want to add?
93
93
  tags: [...tags, { name: 'AR-IO-SDK', value: version_js_1.version }],
94
- data: typeof data !== 'string' ? JSON.stringify(data) : data,
94
+ data,
95
95
  signer,
96
96
  });
97
97
  this.logger.debug(`Sent message to process`, {
@@ -544,10 +544,6 @@ class IOWriteable extends IOReadable {
544
544
  value: params.failedGateways.join(','),
545
545
  },
546
546
  ],
547
- data: {
548
- reportTxId: params.reportTxId,
549
- failedGateways: params.failedGateways,
550
- },
551
547
  });
552
548
  }
553
549
  async buyRecord(params, options) {
@@ -18,4 +18,4 @@
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.version = void 0;
20
20
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
21
- exports.version = '2.1.0-alpha.5';
21
+ exports.version = '2.1.0-alpha.7';
@@ -199,7 +199,6 @@ export class AoANTWriteable extends AoANTReadable {
199
199
  ];
200
200
  return this.process.send({
201
201
  tags,
202
- data: {},
203
202
  signer: this.signer,
204
203
  });
205
204
  }
@@ -218,7 +217,6 @@ export class AoANTWriteable extends AoANTReadable {
218
217
  ];
219
218
  return this.process.send({
220
219
  tags,
221
- data: {},
222
220
  signer: this.signer,
223
221
  });
224
222
  }
@@ -237,7 +235,6 @@ export class AoANTWriteable extends AoANTReadable {
237
235
  ];
238
236
  return this.process.send({
239
237
  tags,
240
- data: {},
241
238
  signer: this.signer,
242
239
  });
243
240
  }
@@ -259,7 +256,6 @@ export class AoANTWriteable extends AoANTReadable {
259
256
  { name: 'Transaction-Id', value: transactionId },
260
257
  { name: 'TTL-Seconds', value: ttlSeconds.toString() },
261
258
  ],
262
- data: { transactionId, ttlSeconds },
263
259
  signer: this.signer,
264
260
  });
265
261
  }
@@ -277,7 +273,6 @@ export class AoANTWriteable extends AoANTReadable {
277
273
  { name: 'Action', value: 'Remove-Record' },
278
274
  { name: 'Sub-Domain', value: undername },
279
275
  ],
280
- data: { undername },
281
276
  signer: this.signer,
282
277
  });
283
278
  }
@@ -295,7 +290,6 @@ export class AoANTWriteable extends AoANTReadable {
295
290
  { name: 'Action', value: 'Set-Ticker' },
296
291
  { name: 'Ticker', value: ticker },
297
292
  ],
298
- data: { ticker },
299
293
  signer: this.signer,
300
294
  });
301
295
  }
@@ -313,7 +307,6 @@ export class AoANTWriteable extends AoANTReadable {
313
307
  { name: 'Action', value: 'Set-Name' },
314
308
  { name: 'Name', value: name },
315
309
  ],
316
- data: { name },
317
310
  signer: this.signer,
318
311
  });
319
312
  }
@@ -88,7 +88,7 @@ export class AOProcess {
88
88
  process: this.processId,
89
89
  // TODO: any other default tags we want to add?
90
90
  tags: [...tags, { name: 'AR-IO-SDK', value: version }],
91
- data: typeof data !== 'string' ? JSON.stringify(data) : data,
91
+ data,
92
92
  signer,
93
93
  });
94
94
  this.logger.debug(`Sent message to process`, {
@@ -539,10 +539,6 @@ export class IOWriteable extends IOReadable {
539
539
  value: params.failedGateways.join(','),
540
540
  },
541
541
  ],
542
- data: {
543
- reportTxId: params.reportTxId,
544
- failedGateways: params.failedGateways,
545
- },
546
542
  });
547
543
  }
548
544
  async buyRecord(params, options) {
@@ -15,4 +15,4 @@
15
15
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
17
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
18
- export const version = '2.1.0-alpha.5';
18
+ export const version = '2.1.0-alpha.7';
@@ -16,12 +16,12 @@ export declare class AOProcess implements AOContract {
16
16
  }>;
17
17
  retries?: number;
18
18
  }): Promise<K>;
19
- send<I, K>({ tags, data, signer, retries, }: {
19
+ send<K>({ tags, data, signer, retries, }: {
20
20
  tags: Array<{
21
21
  name: string;
22
22
  value: string;
23
23
  }>;
24
- data?: I;
24
+ data?: string | undefined;
25
25
  signer: AoSigner;
26
26
  retries?: number;
27
27
  }): Promise<{
package/lib/types/io.d.ts CHANGED
@@ -57,12 +57,12 @@ export interface AOContract {
57
57
  }[];
58
58
  retries?: number;
59
59
  }): Promise<K>;
60
- send<I, K>({ tags, data, signer, }: {
60
+ send<K>({ tags, data, signer, }: {
61
61
  tags: {
62
62
  name: string;
63
63
  value: string;
64
64
  }[];
65
- data: I;
65
+ data: string | undefined;
66
66
  signer: AoSigner;
67
67
  }): Promise<{
68
68
  id: string;
@@ -264,6 +264,14 @@ export type AoGatewayStats = {
264
264
  observedEpochCount: number;
265
265
  prescribedEpochCount: number;
266
266
  };
267
+ export type AoGatewayWeights = {
268
+ compositeWeight: number;
269
+ gatewayRewardRatioWeight: number;
270
+ tenureWeight: number;
271
+ observerRewardRatioWeight: number;
272
+ normalizedCompositeWeight: number;
273
+ stakeWeight: number;
274
+ };
267
275
  export type AoGateway = {
268
276
  settings: GatewaySettings;
269
277
  stats: AoGatewayStats;
@@ -275,6 +283,7 @@ export type AoGateway = {
275
283
  observerAddress: WalletAddress;
276
284
  operatorStake: number;
277
285
  status: 'joined' | 'leaving';
286
+ weights: AoGatewayWeights;
278
287
  };
279
288
  export type AoBalanceWithAddress = {
280
289
  address: WalletAddress;
@@ -14,4 +14,4 @@
14
14
  * You should have received a copy of the GNU Affero General Public License
15
15
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
- export declare const version = "2.1.0-alpha.4";
17
+ export declare const version = "2.1.0-alpha.6";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "2.1.0-alpha.5",
3
+ "version": "2.1.0-alpha.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"
@@ -109,6 +109,7 @@
109
109
  "husky": "^8.0.3",
110
110
  "jest": "^29.7.0",
111
111
  "lint-staged": "^15.2.2",
112
+ "markdown-toc-gen": "^1.0.1",
112
113
  "prettier": "^3.0.2",
113
114
  "rimraf": "^5.0.1",
114
115
  "semantic-release": "^21.0.7",
@@ -131,6 +132,9 @@
131
132
  "lint-staged": {
132
133
  "**/*.{ts,js,mjs,cjs,md,json}": [
133
134
  "prettier --write ."
135
+ ],
136
+ "**/*.md": [
137
+ "markdown-toc-gen insert"
134
138
  ]
135
139
  }
136
140
  }