@clonegod/ttd-sui-common 1.0.18 → 1.0.19

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.
@@ -4,7 +4,7 @@ export declare class LedgerService {
4
4
  private connection;
5
5
  constructor(connection: GrpcConnection);
6
6
  getServiceInfo(): Promise<unknown>;
7
- getEpoch(epoch?: number, includeCommittee?: boolean): Promise<unknown>;
7
+ getEpoch(epoch?: number, includeGasPrice?: boolean): Promise<unknown>;
8
8
  getCheckpoint(checkpointId?: string): Promise<any>;
9
9
  getObject(objectId: string, readMask?: string[]): Promise<unknown>;
10
10
  batchGetObjects(objectIds: string[], readMask?: string[]): Promise<unknown>;
@@ -29,16 +29,18 @@ class LedgerService {
29
29
  });
30
30
  }
31
31
  getEpoch(epoch_1) {
32
- return __awaiter(this, arguments, void 0, function* (epoch, includeCommittee = false) {
32
+ return __awaiter(this, arguments, void 0, function* (epoch, includeGasPrice = true) {
33
33
  return new Promise((resolve, reject) => {
34
34
  const request = {};
35
35
  if (epoch)
36
36
  request.epoch = epoch;
37
- if (!includeCommittee) {
38
- request.read_mask = {
39
- paths: ['epoch']
40
- };
37
+ const paths = ['epoch'];
38
+ if (includeGasPrice) {
39
+ paths.push('reference_gas_price');
41
40
  }
41
+ request.read_mask = {
42
+ paths: paths
43
+ };
42
44
  this.ledgerClient.GetEpoch(request, this.connection.getMetadata(), (error, response) => {
43
45
  if (error)
44
46
  reject(error);
@@ -76,6 +76,7 @@ const test_list_owned_objects = (wallet_address) => __awaiter(void 0, void 0, vo
76
76
  (0, dist_1.log_info)(`ownedObjects`, ownedObjects);
77
77
  });
78
78
  const main = () => __awaiter(void 0, void 0, void 0, function* () {
79
+ test_get_epoch();
79
80
  const wallet_address = '0x6367c8755b8c39cab7305bfa75cb17d050508d2e55f6862a7682377ad6d46ee7';
80
81
  const usdc_coin_type = '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC';
81
82
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-sui-common",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "Sui common library",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/index.js",