@substrate/api-sidecar 11.3.0 → 11.3.1

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 (41) hide show
  1. package/README.md +8 -8
  2. package/build/package.json +14 -14
  3. package/build/src/chains-config/index.js +2 -0
  4. package/build/src/chains-config/index.js.map +1 -1
  5. package/build/src/chains-config/mantaControllers.d.ts +5 -0
  6. package/build/src/chains-config/mantaControllers.js +39 -0
  7. package/build/src/chains-config/mantaControllers.js.map +1 -0
  8. package/build/src/chains-config/metadata-consts/index.js +3 -0
  9. package/build/src/chains-config/metadata-consts/index.js.map +1 -1
  10. package/build/src/chains-config/metadata-consts/mantaConsts.d.ts +2 -0
  11. package/build/src/chains-config/metadata-consts/mantaConsts.js +11 -0
  12. package/build/src/chains-config/metadata-consts/mantaConsts.js.map +1 -0
  13. package/build/src/services/accounts/AccountsStakingPayoutsService.d.ts +11 -5
  14. package/build/src/services/accounts/AccountsStakingPayoutsService.js +16 -15
  15. package/build/src/services/accounts/AccountsStakingPayoutsService.js.map +1 -1
  16. package/build/src/services/accounts/AccountsStakingPayoutsService.spec.d.ts +1 -0
  17. package/build/src/services/accounts/AccountsStakingPayoutsService.spec.js +152 -0
  18. package/build/src/services/accounts/AccountsStakingPayoutsService.spec.js.map +1 -0
  19. package/build/src/services/test-helpers/mock/accounts/deriveNominators.d.ts +10 -0
  20. package/build/src/services/test-helpers/mock/accounts/deriveNominators.js +70 -0
  21. package/build/src/services/test-helpers/mock/accounts/deriveNominators.js.map +1 -0
  22. package/build/src/services/test-helpers/mock/accounts/deriveValidators.d.ts +18 -0
  23. package/build/src/services/test-helpers/mock/accounts/deriveValidators.js +28 -0
  24. package/build/src/services/test-helpers/mock/accounts/deriveValidators.js.map +1 -0
  25. package/build/src/services/test-helpers/mock/accounts/eraRewardPoints.d.ts +6 -0
  26. package/build/src/services/test-helpers/mock/accounts/eraRewardPoints.js +17 -0
  27. package/build/src/services/test-helpers/mock/accounts/eraRewardPoints.js.map +1 -0
  28. package/build/src/services/test-helpers/mock/accounts/index.d.ts +4 -0
  29. package/build/src/services/test-helpers/mock/accounts/index.js +17 -0
  30. package/build/src/services/test-helpers/mock/accounts/index.js.map +1 -0
  31. package/build/src/services/test-helpers/mock/accounts/ledger.d.ts +8 -0
  32. package/build/src/services/test-helpers/mock/accounts/ledger.js +19 -0
  33. package/build/src/services/test-helpers/mock/accounts/ledger.js.map +1 -0
  34. package/build/src/services/test-helpers/responses/accounts/stakingPayout.json +33 -0
  35. package/build/src/test-helpers/metadata/polkadotV9122Metadata.d.ts +1 -0
  36. package/build/src/test-helpers/metadata/polkadotV9122Metadata.js +5 -0
  37. package/build/src/test-helpers/metadata/polkadotV9122Metadata.js.map +1 -0
  38. package/build/src/test-helpers/registries/polkadotRegistry.d.ts +4 -0
  39. package/build/src/test-helpers/registries/polkadotRegistry.js +6 -1
  40. package/build/src/test-helpers/registries/polkadotRegistry.js.map +1 -1
  41. package/package.json +14 -14
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mockDeriveNominatedExposure = void 0;
4
+ exports.mockDeriveNominatedExposure = {
5
+ '15j4dg5GzsL1bw2U2AWgeyAk6QTxq43V7ZPbXdAmbVLjvDCK': [
6
+ {
7
+ validatorId: '15rq7GcKhBREzzh9c9Cg8AondmSd5eNxs4YLAseit6Yy2dyY',
8
+ validatorIndex: '0',
9
+ },
10
+ {
11
+ validatorId: '1W7neFxPiA76dthShJu3ZfJFNzyBjo3SrbafYQhT3GheLbD',
12
+ validatorIndex: '0',
13
+ },
14
+ {
15
+ validatorId: '13YDN239LTFZVFDuuyz8WTKHxMSCvEqiPQe1kyjABcRgxhNz',
16
+ validatorIndex: '3',
17
+ },
18
+ {
19
+ validatorId: '1eLUhRLQiikdt4zUrYdY4LwdwYDsStmjrqzGzC46XmuTatG',
20
+ validatorIndex: '1',
21
+ },
22
+ {
23
+ validatorId: '16Fwe1wFveAWmUJ8WucZmu87iyp5464m9hNqvUP8oE35nwc8',
24
+ validatorIndex: '0',
25
+ },
26
+ {
27
+ validatorId: '13HtFCrxyz55KgkPWcnhHPwE8f8GmZrfXR3uC6jNrihGzmqz',
28
+ validatorIndex: '0',
29
+ },
30
+ {
31
+ validatorId: '14CRo92REj3aXfUeonVSti1VEHgxhWbtKY9hwxvD5T3BBXkK',
32
+ validatorIndex: '0',
33
+ },
34
+ {
35
+ validatorId: '12MqEB7VLqKRgxCoGZXriPuo4GNYtaFiQ1tjMZhooPXAycM2',
36
+ validatorIndex: '1',
37
+ },
38
+ {
39
+ validatorId: '168bhPTpsgByfKqM2pgUfZ2wPxQQpgTwxsA9iTV7vAN4wQiU',
40
+ validatorIndex: '0',
41
+ },
42
+ {
43
+ validatorId: '12JZr1HgK8w6zsbBj6oAEVRkvisn8j3MrkXugqtvc4E8uwLo',
44
+ validatorIndex: '0',
45
+ },
46
+ {
47
+ validatorId: '13p9kJiRnfy8QSjFoovHzatuE7SW5xdddxDvk9mXtERueo9E',
48
+ validatorIndex: '0',
49
+ },
50
+ {
51
+ validatorId: '13N2NpDg6kU1vAGuPv9MkTj4YsaDmf7BKyr3TTxhV5sFmuhd',
52
+ validatorIndex: '0',
53
+ },
54
+ {
55
+ validatorId: '1HDgY7vpDjafR5NM8dbwm1b3Rrs4zATuSCHHbe7YgpKUKFw',
56
+ validatorIndex: '0',
57
+ },
58
+ {
59
+ validatorId: '12eZSMk8GJYE2Lq943dSEnMUoZs1ek7jU8QN3rEA1yPZPjcR',
60
+ validatorIndex: '0',
61
+ },
62
+ ],
63
+ '12JZr1HgK8w6zsbBj6oAEVRkvisn8j3MrkXugqtvc4E8uwLo': [
64
+ {
65
+ validatorId: '1HDgY7vpDjafR5NM8dbwm1b3Rrs4zATuSCHHbe7YgpKUKFw',
66
+ validatorIndex: '0',
67
+ },
68
+ ],
69
+ };
70
+ //# sourceMappingURL=deriveNominators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deriveNominators.js","sourceRoot":"","sources":["../../../../../../src/services/test-helpers/mock/accounts/deriveNominators.ts"],"names":[],"mappings":";;;AAAa,QAAA,2BAA2B,GAAG;IAC1C,kDAAkD,EAAE;QACnD;YACC,WAAW,EAAE,kDAAkD;YAC/D,cAAc,EAAE,GAAG;SACnB;QACD;YACC,WAAW,EAAE,iDAAiD;YAC9D,cAAc,EAAE,GAAG;SACnB;QACD;YACC,WAAW,EAAE,kDAAkD;YAC/D,cAAc,EAAE,GAAG;SACnB;QACD;YACC,WAAW,EAAE,iDAAiD;YAC9D,cAAc,EAAE,GAAG;SACnB;QACD;YACC,WAAW,EAAE,kDAAkD;YAC/D,cAAc,EAAE,GAAG;SACnB;QACD;YACC,WAAW,EAAE,kDAAkD;YAC/D,cAAc,EAAE,GAAG;SACnB;QACD;YACC,WAAW,EAAE,kDAAkD;YAC/D,cAAc,EAAE,GAAG;SACnB;QACD;YACC,WAAW,EAAE,kDAAkD;YAC/D,cAAc,EAAE,GAAG;SACnB;QACD;YACC,WAAW,EAAE,kDAAkD;YAC/D,cAAc,EAAE,GAAG;SACnB;QACD;YACC,WAAW,EAAE,kDAAkD;YAC/D,cAAc,EAAE,GAAG;SACnB;QACD;YACC,WAAW,EAAE,kDAAkD;YAC/D,cAAc,EAAE,GAAG;SACnB;QACD;YACC,WAAW,EAAE,kDAAkD;YAC/D,cAAc,EAAE,GAAG;SACnB;QACD;YACC,WAAW,EAAE,iDAAiD;YAC9D,cAAc,EAAE,GAAG;SACnB;QACD;YACC,WAAW,EAAE,kDAAkD;YAC/D,cAAc,EAAE,GAAG;SACnB;KACD;IACD,kDAAkD,EAAE;QACnD;YACC,WAAW,EAAE,iDAAiD;YAC9D,cAAc,EAAE,GAAG;SACnB;KACD;CACD,CAAC"}
@@ -0,0 +1,18 @@
1
+ export declare const mockDeriveValidatorExposure: {
2
+ '12JZr1HgK8w6zsbBj6oAEVRkvisn8j3MrkXugqtvc4E8uwLo': {
3
+ total: import("@polkadot/types").Compact<import("@polkadot/types").u128>;
4
+ own: import("@polkadot/types").Compact<import("@polkadot/types").u128>;
5
+ others: {
6
+ who: string;
7
+ value: import("@polkadot/types").Compact<import("@polkadot/types").u128>;
8
+ }[];
9
+ };
10
+ '1HDgY7vpDjafR5NM8dbwm1b3Rrs4zATuSCHHbe7YgpKUKFw': {
11
+ total: import("@polkadot/types").Compact<import("@polkadot/types").u128>;
12
+ own: import("@polkadot/types").Compact<import("@polkadot/types").u128>;
13
+ others: {
14
+ who: string;
15
+ value: import("@polkadot/types").Compact<import("@polkadot/types").u128>;
16
+ }[];
17
+ };
18
+ };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mockDeriveValidatorExposure = void 0;
4
+ const registries_1 = require("../../../../test-helpers/registries");
5
+ const value = registries_1.polkadotRegistryV9122.createType('Compact<u128>', BigInt(33223051661066606));
6
+ exports.mockDeriveValidatorExposure = {
7
+ '12JZr1HgK8w6zsbBj6oAEVRkvisn8j3MrkXugqtvc4E8uwLo': {
8
+ total: registries_1.polkadotRegistryV9122.createType('Compact<u128>', BigInt(33223251661066606)),
9
+ own: registries_1.polkadotRegistryV9122.createType('Compact<u128>', 200000000000),
10
+ others: [
11
+ {
12
+ who: '15j4dg5GzsL1bw2U2AWgeyAk6QTxq43V7ZPbXdAmbVLjvDCK',
13
+ value,
14
+ },
15
+ ],
16
+ },
17
+ '1HDgY7vpDjafR5NM8dbwm1b3Rrs4zATuSCHHbe7YgpKUKFw': {
18
+ total: registries_1.polkadotRegistryV9122.createType('Compact<u128>', BigInt(33223061661066606)),
19
+ own: registries_1.polkadotRegistryV9122.createType('Compact<u128>', 10000000000),
20
+ others: [
21
+ {
22
+ who: '15j4dg5GzsL1bw2U2AWgeyAk6QTxq43V7ZPbXdAmbVLjvDCK',
23
+ value,
24
+ },
25
+ ],
26
+ },
27
+ };
28
+ //# sourceMappingURL=deriveValidators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deriveValidators.js","sourceRoot":"","sources":["../../../../../../src/services/test-helpers/mock/accounts/deriveValidators.ts"],"names":[],"mappings":";;;AAAA,oEAA4E;AAE5E,MAAM,KAAK,GAAG,kCAAqB,CAAC,UAAU,CAC7C,eAAe,EACf,MAAM,CAAC,iBAAiB,CAAC,CACzB,CAAC;AAEW,QAAA,2BAA2B,GAAG;IAC1C,kDAAkD,EAAE;QACnD,KAAK,EAAE,kCAAqB,CAAC,UAAU,CACtC,eAAe,EACf,MAAM,CAAC,iBAAiB,CAAC,CACzB;QACD,GAAG,EAAE,kCAAqB,CAAC,UAAU,CAAC,eAAe,EAAE,YAAY,CAAC;QACpE,MAAM,EAAE;YACP;gBACC,GAAG,EAAE,kDAAkD;gBACvD,KAAK;aACL;SACD;KACD;IACD,iDAAiD,EAAE;QAClD,KAAK,EAAE,kCAAqB,CAAC,UAAU,CACtC,eAAe,EACf,MAAM,CAAC,iBAAiB,CAAC,CACzB;QACD,GAAG,EAAE,kCAAqB,CAAC,UAAU,CAAC,eAAe,EAAE,WAAW,CAAC;QACnE,MAAM,EAAE;YACP;gBACC,GAAG,EAAE,kDAAkD;gBACvD,KAAK;aACL;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { BTreeMap } from '@polkadot/types';
2
+ /** Used for StakingPayouts */
3
+ export declare const mockEraRewardPoints: {
4
+ total: import("@polkadot/types").u32;
5
+ individual: BTreeMap<import("@polkadot/types/types").Codec, import("@polkadot/types/types").Codec>;
6
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mockEraRewardPoints = void 0;
4
+ const types_1 = require("@polkadot/types");
5
+ const registries_1 = require("../../../../test-helpers/registries");
6
+ const rewardOne = registries_1.polkadotRegistryV9110.createType('u32', 3360);
7
+ const rewardTwo = registries_1.polkadotRegistryV9110.createType('u32', 4440);
8
+ const mockEraRewardsMap = new Map();
9
+ mockEraRewardsMap.set('12JZr1HgK8w6zsbBj6oAEVRkvisn8j3MrkXugqtvc4E8uwLo', rewardOne);
10
+ mockEraRewardsMap.set('1HDgY7vpDjafR5NM8dbwm1b3Rrs4zATuSCHHbe7YgpKUKFw', rewardTwo);
11
+ const bTree = new types_1.BTreeMap(registries_1.polkadotRegistryV9110, 'AccountId32', 'u32', mockEraRewardsMap);
12
+ /** Used for StakingPayouts */
13
+ exports.mockEraRewardPoints = {
14
+ total: registries_1.polkadotRegistryV9110.createType('u32', 968380),
15
+ individual: bTree,
16
+ };
17
+ //# sourceMappingURL=eraRewardPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eraRewardPoints.js","sourceRoot":"","sources":["../../../../../../src/services/test-helpers/mock/accounts/eraRewardPoints.ts"],"names":[],"mappings":";;;AAAA,2CAA2C;AAE3C,oEAA4E;AAE5E,MAAM,SAAS,GAAG,kCAAqB,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AAChE,MAAM,SAAS,GAAG,kCAAqB,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AAChE,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAE,CAAC;AACpC,iBAAiB,CAAC,GAAG,CACpB,kDAAkD,EAClD,SAAS,CACT,CAAC;AACF,iBAAiB,CAAC,GAAG,CACpB,iDAAiD,EACjD,SAAS,CACT,CAAC;AACF,MAAM,KAAK,GAAG,IAAI,gBAAQ,CACzB,kCAAqB,EACrB,aAAa,EACb,KAAK,EACL,iBAAiB,CACjB,CAAC;AAEF,8BAA8B;AACjB,QAAA,mBAAmB,GAAG;IAClC,KAAK,EAAE,kCAAqB,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC;IACtD,UAAU,EAAE,KAAK;CACjB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './deriveNominators';
2
+ export * from './deriveValidators';
3
+ export * from './eraRewardPoints';
4
+ export * from './ledger';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./deriveNominators"), exports);
14
+ __exportStar(require("./deriveValidators"), exports);
15
+ __exportStar(require("./eraRewardPoints"), exports);
16
+ __exportStar(require("./ledger"), exports);
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/services/test-helpers/mock/accounts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmC;AACnC,qDAAmC;AACnC,oDAAkC;AAClC,2CAAyB"}
@@ -0,0 +1,8 @@
1
+ /** Used in StakingPayouts */
2
+ export declare const mockLedger: {
3
+ stash: string;
4
+ total: string;
5
+ active: string;
6
+ unlocking: never[];
7
+ claimedRewards: number[];
8
+ };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mockLedger = void 0;
4
+ /** Used in StakingPayouts */
5
+ exports.mockLedger = {
6
+ stash: '1REAJ1k691g5Eqqg9gL7vvZCBG7FCCZ8zgQkZWd4va5ESih',
7
+ total: '0x0000000000000000001504e98b27599f',
8
+ active: '0x0000000000000000001504e98b27599f',
9
+ unlocking: [],
10
+ claimedRewards: [
11
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
12
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
13
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
14
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
15
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
16
+ 521, 522, 523, 524, 525, 526, 527, 528, 529,
17
+ ],
18
+ };
19
+ //# sourceMappingURL=ledger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ledger.js","sourceRoot":"","sources":["../../../../../../src/services/test-helpers/mock/accounts/ledger.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAChB,QAAA,UAAU,GAAG;IACzB,KAAK,EAAE,iDAAiD;IACxD,KAAK,EAAE,oCAAoC;IAC3C,MAAM,EAAE,oCAAoC;IAC5C,SAAS,EAAE,EAAE;IACb,cAAc,EAAE;QACf,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;QACzE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;QACzE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;QACzE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;QACzE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;QACzE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;KAC3C;CACD,CAAC"}
@@ -0,0 +1,33 @@
1
+ {
2
+ "at": {
3
+ "hash": "0x7b713de604a99857f6c25eacc115a4f28d2611a23d9ddff99ab0e4f1c17a8578",
4
+ "height": "789629"
5
+ },
6
+ "erasPayouts": [
7
+ {
8
+ "era": "533",
9
+ "totalEraRewardPoints": "968380",
10
+ "totalEraPayout": "2426740332127971",
11
+ "payouts": [
12
+ {
13
+ "claimed": false,
14
+ "nominatorExposure": "33223051661066608",
15
+ "nominatorStakingPayout": "8335838960366",
16
+ "totalValidatorExposure": "33223251661066608",
17
+ "totalValidatorRewardPoints": "3360",
18
+ "validatorCommission": "10000000",
19
+ "validatorId": "12JZr1HgK8w6zsbBj6oAEVRkvisn8j3MrkXugqtvc4E8uwLo"
20
+ },
21
+ {
22
+ "claimed": false,
23
+ "nominatorExposure": "33223051661066608",
24
+ "nominatorStakingPayout": "11015277392614",
25
+ "totalValidatorExposure": "33223061661066608",
26
+ "totalValidatorRewardPoints": "4440",
27
+ "validatorCommission": "10000000",
28
+ "validatorId": "1HDgY7vpDjafR5NM8dbwm1b3Rrs4zATuSCHHbe7YgpKUKFw"
29
+ }
30
+ ]
31
+ }
32
+ ]
33
+ }