@autonomys/auto-consensus 1.5.16 → 1.5.18

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.
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export * from './info';
6
6
  export * from './position';
7
7
  export * from './remark';
8
8
  export * from './staking';
9
+ export * from './transactionFees';
9
10
  export * from './transfer';
10
11
  export * from './types';
11
12
  export * from './utils';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAE1B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAE1B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
package/dist/index.js CHANGED
@@ -23,6 +23,7 @@ __exportStar(require("./info"), exports);
23
23
  __exportStar(require("./position"), exports);
24
24
  __exportStar(require("./remark"), exports);
25
25
  __exportStar(require("./staking"), exports);
26
+ __exportStar(require("./transactionFees"), exports);
26
27
  __exportStar(require("./transfer"), exports);
27
28
  __exportStar(require("./types"), exports);
28
29
  __exportStar(require("./utils"), exports);
@@ -0,0 +1,6 @@
1
+ import { ApiPromise } from '@polkadot/api';
2
+ export declare const transactionByteFee: (api: ApiPromise) => Promise<{
3
+ next: number;
4
+ current: number;
5
+ }>;
6
+ //# sourceMappingURL=transactionFees.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transactionFees.d.ts","sourceRoot":"","sources":["../src/transactionFees.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAQ1C,eAAO,MAAM,kBAAkB,GAAU,KAAK,UAAU;;;EASvD,CAAA"}
@@ -0,0 +1,26 @@
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
+ exports.transactionByteFee = void 0;
13
+ const zod_1 = require("zod");
14
+ const TransactionByteFeeSchema = zod_1.z.object({
15
+ current: zod_1.z.number(),
16
+ next: zod_1.z.number(),
17
+ });
18
+ const transactionByteFee = (api) => __awaiter(void 0, void 0, void 0, function* () {
19
+ yield api.isReady;
20
+ // Query transactionFees.transactionByteFee
21
+ const transactionByteFee = yield api.query.transactionFees
22
+ .transactionByteFee()
23
+ .then((v) => TransactionByteFeeSchema.parse(v.toJSON()));
24
+ return transactionByteFee;
25
+ });
26
+ exports.transactionByteFee = transactionByteFee;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autonomys/auto-consensus",
3
- "version": "1.5.16",
3
+ "version": "1.5.18",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -25,7 +25,7 @@
25
25
  "README.md"
26
26
  ],
27
27
  "dependencies": {
28
- "@autonomys/auto-utils": "^1.5.16"
28
+ "@autonomys/auto-utils": "^1.5.18"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/jest": "^29.5.14",
@@ -35,5 +35,5 @@
35
35
  "ts-jest": "^29.3.1",
36
36
  "typescript": "^5.8.3"
37
37
  },
38
- "gitHead": "7242b27a7d9e095399c3d87209767f012355340b"
38
+ "gitHead": "b339864e15c46187ddcc75ebeed3d8170fbe7c9e"
39
39
  }