@substrate/api-sidecar 17.5.1 → 18.0.0

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 (42) hide show
  1. package/build/package.json +14 -14
  2. package/build/src/chains-config/cache/lruCache.d.ts +2 -2
  3. package/build/src/chains-config/cache/lruCache.js +3 -6
  4. package/build/src/chains-config/cache/lruCache.js.map +1 -1
  5. package/build/src/controllers/accounts/AccountsStakingPayoutsController.js +54 -12
  6. package/build/src/controllers/accounts/AccountsStakingPayoutsController.js.map +1 -1
  7. package/build/src/services/accounts/AccountsStakingPayoutsService.d.ts +46 -18
  8. package/build/src/services/accounts/AccountsStakingPayoutsService.js +164 -49
  9. package/build/src/services/accounts/AccountsStakingPayoutsService.js.map +1 -1
  10. package/build/src/services/accounts/kusamaEarlyErasBlockInfo.json +2082 -0
  11. package/build/src/services/blocks/BlocksService.d.ts +2 -2
  12. package/build/src/services/blocks/BlocksService.js.map +1 -1
  13. package/build/src/services/blocks/BlocksService.spec.js +70 -3
  14. package/build/src/services/blocks/BlocksService.spec.js.map +1 -1
  15. package/build/src/services/blocks/XCMDecoder.d.ts +1 -1
  16. package/build/src/services/blocks/XCMDecoder.js +61 -46
  17. package/build/src/services/blocks/XCMDecoder.js.map +1 -1
  18. package/build/src/services/pallets/PalletsAssetConversionService.spec.js +1 -1
  19. package/build/src/services/pallets/PalletsAssetConversionService.spec.js.map +1 -1
  20. package/build/src/services/pallets/PalletsForeignAssetsService.js +2 -3
  21. package/build/src/services/pallets/PalletsForeignAssetsService.js.map +1 -1
  22. package/build/src/services/pallets/PalletsForeignAssetsService.spec.js +4 -4
  23. package/build/src/services/pallets/PalletsForeignAssetsService.spec.js.map +1 -1
  24. package/build/src/services/paras/ParasService.js +1 -1
  25. package/build/src/types/chains-config/ControllerConfig.d.ts +2 -2
  26. package/build/src/types/chains-config/ControllerConfig.js +1 -1
  27. package/build/src/types/responses/AccountStakingInfo.d.ts +3 -3
  28. package/build/src/types/responses/AccountStakingInfo.js +1 -1
  29. package/build/src/types/responses/BlockXCMMessages.d.ts +9 -4
  30. package/build/src/types/responses/BlockXCMMessages.js +1 -1
  31. package/build/src/types/responses/PalletAssetConversion.d.ts +3 -3
  32. package/build/src/types/responses/PalletAssetConversion.js +1 -1
  33. package/build/src/types/responses/SanitizedBackedCandidatesCommitments.d.ts +2 -1
  34. package/build/src/types/responses/SanitizedBackedCandidatesHorizontalMessage.d.ts +4 -0
  35. package/build/src/types/responses/SanitizedBackedCandidatesHorizontalMessage.js +18 -0
  36. package/build/src/types/responses/SanitizedBackedCandidatesHorizontalMessage.js.map +1 -0
  37. package/build/src/types/responses/SanitizedParachainInherentData.d.ts +3 -2
  38. package/build/src/types/responses/SanitizedParachainInherentData.js +1 -1
  39. package/build/src/types/responses/SanitizedParachainInherentDataHorizontalMessage.d.ts +4 -0
  40. package/build/src/types/responses/SanitizedParachainInherentDataHorizontalMessage.js +18 -0
  41. package/build/src/types/responses/SanitizedParachainInherentDataHorizontalMessage.js.map +1 -0
  42. package/package.json +14 -14
@@ -1,4 +1,4 @@
1
- import LRU from 'lru-cache';
1
+ import type { LRUCache } from 'lru-cache';
2
2
  import { QueryFeeDetailsCache } from '../../chains-config/cache';
3
3
  import { controllers } from '../../controllers';
4
4
  import { IBlock } from '../../types/responses';
@@ -35,7 +35,7 @@ export interface ControllerOptions {
35
35
  /**
36
36
  * LRU cache that stores the 2 most recent queries.
37
37
  */
38
- blockStore: LRU<string, IBlock>;
38
+ blockStore: LRUCache<string, IBlock>;
39
39
  /**
40
40
  * Cache for storing runtime versions that either have queryFeeDetails, or dont.
41
41
  */
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2017-2022 Parity Technologies (UK) Ltd.
2
+ // Copyright 2017-2024 Parity Technologies (UK) Ltd.
3
3
  // This file is part of Substrate API Sidecar.
4
4
  //
5
5
  // Substrate API Sidecar is free software: you can redistribute it and/or modify
@@ -1,11 +1,11 @@
1
- import type { RewardDestination } from '@polkadot/types/interfaces';
1
+ import type { Option } from '@polkadot/types/codec';
2
2
  import type { AccountId } from '@polkadot/types/interfaces/runtime';
3
- import type { PalletStakingStakingLedger } from '@polkadot/types/lookup';
3
+ import type { PalletStakingRewardDestination, PalletStakingStakingLedger } from '@polkadot/types/lookup';
4
4
  import { IAt } from '.';
5
5
  export interface IAccountStakingInfo {
6
6
  at: IAt;
7
7
  controller: AccountId;
8
- rewardDestination: RewardDestination;
8
+ rewardDestination: Option<PalletStakingRewardDestination>;
9
9
  numSlashingSpans: number;
10
10
  staking: PalletStakingStakingLedger;
11
11
  }
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2017-2022 Parity Technologies (UK) Ltd.
2
+ // Copyright 2017-2024 Parity Technologies (UK) Ltd.
3
3
  // This file is part of Substrate API Sidecar.
4
4
  //
5
5
  // Substrate API Sidecar is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
1
1
  export interface IUpwardMessage {
2
- paraId: string;
2
+ originParaId: string;
3
3
  data: string;
4
4
  }
5
5
  export interface IDownwardMessage {
@@ -7,13 +7,18 @@ export interface IDownwardMessage {
7
7
  msg: string;
8
8
  data: string;
9
9
  }
10
- export interface IHorizontalMessage {
10
+ export interface IHorizontalMessageInParachain {
11
11
  sentAt: string;
12
- paraId: string;
12
+ originParaId: string;
13
+ data: string;
14
+ }
15
+ export interface IHorizontalMessageInRelayChain {
16
+ originParaId: string;
17
+ destinationParaId: string;
13
18
  data: string;
14
19
  }
15
20
  export interface IMessages {
16
- horizontalMessages?: IHorizontalMessage[];
21
+ horizontalMessages?: (IHorizontalMessageInParachain | IHorizontalMessageInRelayChain)[];
17
22
  downwardMessages?: IDownwardMessage[];
18
23
  upwardMessages?: IUpwardMessage[];
19
24
  }
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2017-2023 Parity Technologies (UK) Ltd.
2
+ // Copyright 2017-2024 Parity Technologies (UK) Ltd.
3
3
  // This file is part of Substrate API Sidecar.
4
4
  //
5
5
  // Substrate API Sidecar is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
1
1
  import { Option } from '@polkadot/types/codec';
2
- import { PalletAssetConversionNativeOrAssetId, PalletAssetConversionPoolInfo, XcmV3MultiLocation } from '@polkadot/types/lookup';
2
+ import type { FrameSupportTokensFungibleUnionOfNativeOrWithId, PalletAssetConversionPoolInfo, StagingXcmV3MultiLocation } from '@polkadot/types/lookup';
3
3
  import { Codec } from '@polkadot/types/types';
4
4
  import type { ITuple } from '@polkadot/types-codec/types';
5
5
  import { IAt } from '.';
@@ -9,8 +9,8 @@ export interface ILiquidityId {
9
9
  }
10
10
  export interface ILiquidityPoolsInfo {
11
11
  reserves: ITuple<[
12
- PalletAssetConversionNativeOrAssetId | XcmV3MultiLocation,
13
- PalletAssetConversionNativeOrAssetId | XcmV3MultiLocation
12
+ FrameSupportTokensFungibleUnionOfNativeOrWithId | StagingXcmV3MultiLocation,
13
+ FrameSupportTokensFungibleUnionOfNativeOrWithId | StagingXcmV3MultiLocation
14
14
  ]>;
15
15
  lpToken: Option<PalletAssetConversionPoolInfo>;
16
16
  }
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2017-2022 Parity Technologies (UK) Ltd.
2
+ // Copyright 2017-2024 Parity Technologies (UK) Ltd.
3
3
  // This file is part of Substrate API Sidecar.
4
4
  //
5
5
  // Substrate API Sidecar is free software: you can redistribute it and/or modify
@@ -1,6 +1,7 @@
1
+ import type { ISanitizedBackedCandidateHorizontalMessage } from './SanitizedBackedCandidatesHorizontalMessage';
1
2
  export interface ISanitizedBackedCandidateCommitments {
2
3
  upwardMessages: string[];
3
- horizontalMessages: string[];
4
+ horizontalMessages: ISanitizedBackedCandidateHorizontalMessage[];
4
5
  newValidationCode: string | undefined;
5
6
  headData: `0x${string}`;
6
7
  processedDownwardMessages: string;
@@ -0,0 +1,4 @@
1
+ export interface ISanitizedBackedCandidateHorizontalMessage {
2
+ recipient: string;
3
+ data: string;
4
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // Copyright 2017-2024 Parity Technologies (UK) Ltd.
3
+ // This file is part of Substrate API Sidecar.
4
+ //
5
+ // Substrate API Sidecar is free software: you can redistribute it and/or modify
6
+ // it under the terms of the GNU General Public License as published by
7
+ // the Free Software Foundation, either version 3 of the License, or
8
+ // (at your option) any later version.
9
+ //
10
+ // This program is distributed in the hope that it will be useful,
11
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ // GNU General Public License for more details.
14
+ //
15
+ // You should have received a copy of the GNU General Public License
16
+ // along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ //# sourceMappingURL=SanitizedBackedCandidatesHorizontalMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SanitizedBackedCandidatesHorizontalMessage.js","sourceRoot":"","sources":["../../../../src/types/responses/SanitizedBackedCandidatesHorizontalMessage.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,8CAA8C;AAC9C,EAAE;AACF,gFAAgF;AAChF,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,kEAAkE;AAClE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,wEAAwE"}
@@ -1,8 +1,9 @@
1
- import { IDownwardMessage, IHorizontalMessage } from './BlockXCMMessages';
1
+ import { IDownwardMessage } from './BlockXCMMessages';
2
+ import { ISanitizedParachainInherentDataHorizontalMessage } from './SanitizedParachainInherentDataHorizontalMessage';
2
3
  import { ISanitizedParachainValidationData } from './SanitizedParachainValidationData';
3
4
  export interface ISanitizedParachainInherentData {
4
5
  validationData: ISanitizedParachainValidationData;
5
6
  relayChainState: `0x${string}`[];
6
7
  downwardMessages: IDownwardMessage[];
7
- horizontalMessages: Map<string, IHorizontalMessage[]>;
8
+ horizontalMessages: Map<string, ISanitizedParachainInherentDataHorizontalMessage[]>;
8
9
  }
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2017-2023 Parity Technologies (UK) Ltd.
2
+ // Copyright 2017-2024 Parity Technologies (UK) Ltd.
3
3
  // This file is part of Substrate API Sidecar.
4
4
  //
5
5
  // Substrate API Sidecar is free software: you can redistribute it and/or modify
@@ -0,0 +1,4 @@
1
+ export interface ISanitizedParachainInherentDataHorizontalMessage {
2
+ sentAt: string;
3
+ data: string;
4
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // Copyright 2017-2024 Parity Technologies (UK) Ltd.
3
+ // This file is part of Substrate API Sidecar.
4
+ //
5
+ // Substrate API Sidecar is free software: you can redistribute it and/or modify
6
+ // it under the terms of the GNU General Public License as published by
7
+ // the Free Software Foundation, either version 3 of the License, or
8
+ // (at your option) any later version.
9
+ //
10
+ // This program is distributed in the hope that it will be useful,
11
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ // GNU General Public License for more details.
14
+ //
15
+ // You should have received a copy of the GNU General Public License
16
+ // along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ //# sourceMappingURL=SanitizedParachainInherentDataHorizontalMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SanitizedParachainInherentDataHorizontalMessage.js","sourceRoot":"","sources":["../../../../src/types/responses/SanitizedParachainInherentDataHorizontalMessage.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,8CAA8C;AAC9C,EAAE;AACF,gFAAgF;AAChF,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,kEAAkE;AAClE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,wEAAwE"}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "17.5.1",
2
+ "version": "18.0.0",
3
3
  "name": "@substrate/api-sidecar",
4
4
  "description": "REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.",
5
5
  "homepage": "https://github.com/paritytech/substrate-api-sidecar#readme",
@@ -50,29 +50,29 @@
50
50
  "test:test-release": "yarn build:scripts && node scripts/build/runYarnPack.js"
51
51
  },
52
52
  "dependencies": {
53
- "@polkadot/api": "^10.11.2",
54
- "@polkadot/api-contract": "^10.11.2",
53
+ "@polkadot/api": "^10.12.4",
54
+ "@polkadot/api-contract": "^10.12.4",
55
55
  "@polkadot/util-crypto": "^12.6.2",
56
56
  "@substrate/calc": "^0.3.1",
57
57
  "argparse": "^2.0.1",
58
58
  "confmgr": "^1.0.10",
59
- "express": "^4.18.1",
59
+ "express": "^4.18.3",
60
60
  "express-winston": "^4.2.0",
61
61
  "http-errors": "^2.0.0",
62
- "lru-cache": "^7.13.1",
63
- "prom-client": "^14.2.0",
64
- "rxjs": "^7.5.6",
65
- "winston": "^3.8.1"
62
+ "lru-cache": "^10.2.0",
63
+ "prom-client": "^15.1.0",
64
+ "rxjs": "^7.8.1",
65
+ "winston": "^3.12.0"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@substrate/dev": "^0.7.1",
69
- "@types/argparse": "2.0.10",
70
- "@types/express": "^4.17.17",
71
- "@types/express-serve-static-core": "^4.17.36",
72
- "@types/http-errors": "1.8.2",
69
+ "@types/argparse": "2.0.15",
70
+ "@types/express": "^4.17.21",
71
+ "@types/express-serve-static-core": "^4.17.43",
72
+ "@types/http-errors": "2.0.4",
73
73
  "@types/lru-cache": "^7.10.10",
74
- "@types/morgan": "1.9.3",
75
- "@types/triple-beam": "^1.3.2",
74
+ "@types/morgan": "1.9.9",
75
+ "@types/triple-beam": "^1.3.5",
76
76
  "ts-node-dev": "^2.0.0"
77
77
  },
78
78
  "keywords": [