@substrate/api-sidecar 14.4.0 → 14.5.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 (77) hide show
  1. package/README.md +1 -2
  2. package/build/package.json +5 -4
  3. package/build/src/App.d.ts +3 -1
  4. package/build/src/App.js +1 -1
  5. package/build/src/App.js.map +1 -1
  6. package/build/src/SidecarConfig.js +1 -0
  7. package/build/src/SidecarConfig.js.map +1 -1
  8. package/build/src/Specs.js +5 -0
  9. package/build/src/Specs.js.map +1 -1
  10. package/build/src/chains-config/defaultControllers.js +2 -0
  11. package/build/src/chains-config/defaultControllers.js.map +1 -1
  12. package/build/src/chains-config/kusamaControllers.js +2 -0
  13. package/build/src/chains-config/kusamaControllers.js.map +1 -1
  14. package/build/src/chains-config/polkadotControllers.js +2 -0
  15. package/build/src/chains-config/polkadotControllers.js.map +1 -1
  16. package/build/src/chains-config/statemineControllers.js +1 -0
  17. package/build/src/chains-config/statemineControllers.js.map +1 -1
  18. package/build/src/chains-config/statemintControllers.js +2 -0
  19. package/build/src/chains-config/statemintControllers.js.map +1 -1
  20. package/build/src/chains-config/westendControllers.js +2 -0
  21. package/build/src/chains-config/westendControllers.js.map +1 -1
  22. package/build/src/controllers/index.d.ts +3 -1
  23. package/build/src/controllers/index.js +2 -0
  24. package/build/src/controllers/index.js.map +1 -1
  25. package/build/src/controllers/pallets/PalletsConstsController.d.ts +20 -0
  26. package/build/src/controllers/pallets/PalletsConstsController.js +70 -0
  27. package/build/src/controllers/pallets/PalletsConstsController.js.map +1 -0
  28. package/build/src/controllers/pallets/PalletsDispatchablesController.d.ts +28 -0
  29. package/build/src/controllers/pallets/PalletsDispatchablesController.js +80 -0
  30. package/build/src/controllers/pallets/PalletsDispatchablesController.js.map +1 -0
  31. package/build/src/controllers/pallets/index.d.ts +2 -0
  32. package/build/src/controllers/pallets/index.js +5 -1
  33. package/build/src/controllers/pallets/index.js.map +1 -1
  34. package/build/src/main.js +3 -1
  35. package/build/src/main.js.map +1 -1
  36. package/build/src/services/AbstractPalletsService.d.ts +5 -3
  37. package/build/src/services/AbstractPalletsService.js +40 -5
  38. package/build/src/services/AbstractPalletsService.js.map +1 -1
  39. package/build/src/services/pallets/PalletsConstantsService.d.ts +19 -0
  40. package/build/src/services/pallets/PalletsConstantsService.js +72 -0
  41. package/build/src/services/pallets/PalletsConstantsService.js.map +1 -0
  42. package/build/src/services/pallets/PalletsConstantsService.spec.d.ts +1 -0
  43. package/build/src/services/pallets/PalletsConstantsService.spec.js +93 -0
  44. package/build/src/services/pallets/PalletsConstantsService.spec.js.map +1 -0
  45. package/build/src/services/pallets/PalletsDispatchablesService.d.ts +19 -0
  46. package/build/src/services/pallets/PalletsDispatchablesService.js +74 -0
  47. package/build/src/services/pallets/PalletsDispatchablesService.js.map +1 -0
  48. package/build/src/services/pallets/PalletsDispatchablesService.spec.d.ts +1 -0
  49. package/build/src/services/pallets/PalletsDispatchablesService.spec.js +93 -0
  50. package/build/src/services/pallets/PalletsDispatchablesService.spec.js.map +1 -0
  51. package/build/src/services/pallets/PalletsErrorsService.spec.js +2 -2
  52. package/build/src/services/pallets/index.d.ts +2 -0
  53. package/build/src/services/pallets/index.js +2 -0
  54. package/build/src/services/pallets/index.js.map +1 -1
  55. package/build/src/services/transaction/TransactionSubmitService.spec.js +1 -0
  56. package/build/src/services/transaction/TransactionSubmitService.spec.js.map +1 -1
  57. package/build/src/types/requests.d.ts +8 -0
  58. package/build/src/types/responses/PalletConstants.d.ts +10 -0
  59. package/build/src/types/responses/PalletConstants.js +18 -0
  60. package/build/src/types/responses/PalletConstants.js.map +1 -0
  61. package/build/src/types/responses/PalletConstantsItem.d.ts +6 -0
  62. package/build/src/types/responses/PalletConstantsItem.js +18 -0
  63. package/build/src/types/responses/PalletConstantsItem.js.map +1 -0
  64. package/build/src/types/responses/PalletDispatchables.d.ts +10 -0
  65. package/build/src/types/responses/PalletDispatchables.js +18 -0
  66. package/build/src/types/responses/PalletDispatchables.js.map +1 -0
  67. package/build/src/types/responses/PalletDispatchablesItem.d.ts +6 -0
  68. package/build/src/types/responses/PalletDispatchablesItem.js +18 -0
  69. package/build/src/types/responses/PalletDispatchablesItem.js.map +1 -0
  70. package/build/src/types/responses/index.d.ts +4 -0
  71. package/build/src/types/responses/index.js +4 -0
  72. package/build/src/types/responses/index.js.map +1 -1
  73. package/build/src/types/sidecar-config/CONFIG.d.ts +1 -0
  74. package/build/src/types/sidecar-config/CONFIG.js +1 -0
  75. package/build/src/types/sidecar-config/CONFIG.js.map +1 -1
  76. package/build/src/types/sidecar-config/SidecarConfig.d.ts +1 -0
  77. package/package.json +5 -4
@@ -0,0 +1,10 @@
1
+ import { Text } from '@polkadot/types';
2
+ import { PalletConstantMetadataLatest } from '@polkadot/types/interfaces';
3
+ import { IAt } from '.';
4
+ import { IPallet } from './Pallet';
5
+ export interface IPalletConstants extends IPallet {
6
+ at: IAt;
7
+ pallet: string;
8
+ palletIndex: number;
9
+ items: PalletConstantMetadataLatest[] | Text[];
10
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // Copyright 2017-2022 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=PalletConstants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PalletConstants.js","sourceRoot":"","sources":["../../../../src/types/responses/PalletConstants.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"}
@@ -0,0 +1,6 @@
1
+ import { PalletCallMetadataLatest } from '@polkadot/types/interfaces';
2
+ import { IPallet } from '.';
3
+ export interface IPalletConstantsItem extends IPallet {
4
+ constantsItem: string;
5
+ metadata: PalletCallMetadataLatest | undefined;
6
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // Copyright 2017-2022 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=PalletConstantsItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PalletConstantsItem.js","sourceRoot":"","sources":["../../../../src/types/responses/PalletConstantsItem.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"}
@@ -0,0 +1,10 @@
1
+ import { Text } from '@polkadot/types';
2
+ import { FunctionMetadataLatest } from '@polkadot/types/interfaces';
3
+ import { IAt } from '.';
4
+ import { IPallet } from './Pallet';
5
+ export interface IPalletDispatchables extends IPallet {
6
+ at: IAt;
7
+ pallet: string;
8
+ palletIndex: number;
9
+ items: [] | FunctionMetadataLatest[] | Text[];
10
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // Copyright 2017-2022 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=PalletDispatchables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PalletDispatchables.js","sourceRoot":"","sources":["../../../../src/types/responses/PalletDispatchables.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"}
@@ -0,0 +1,6 @@
1
+ import { FunctionMetadataLatest } from '@polkadot/types/interfaces';
2
+ import { IPallet } from '.';
3
+ export interface IPalletDispatchableItem extends IPallet {
4
+ dispatchableItem: string;
5
+ metadata: FunctionMetadataLatest | undefined;
6
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // Copyright 2017-2022 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=PalletDispatchablesItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PalletDispatchablesItem.js","sourceRoot":"","sources":["../../../../src/types/responses/PalletDispatchablesItem.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"}
@@ -15,6 +15,10 @@ export * from './NodeNetwork';
15
15
  export * from './NodeTransactionPool';
16
16
  export * from './NodeVersion';
17
17
  export * from './Pallet';
18
+ export * from './PalletConstants';
19
+ export * from './PalletConstantsItem';
20
+ export * from './PalletDispatchables';
21
+ export * from './PalletDispatchablesItem';
18
22
  export * from './PalletErrors';
19
23
  export * from './PalletErrorsItem';
20
24
  export * from './PalletEvents';
@@ -46,6 +46,10 @@ __exportStar(require("./NodeNetwork"), exports);
46
46
  __exportStar(require("./NodeTransactionPool"), exports);
47
47
  __exportStar(require("./NodeVersion"), exports);
48
48
  __exportStar(require("./Pallet"), exports);
49
+ __exportStar(require("./PalletConstants"), exports);
50
+ __exportStar(require("./PalletConstantsItem"), exports);
51
+ __exportStar(require("./PalletDispatchables"), exports);
52
+ __exportStar(require("./PalletDispatchablesItem"), exports);
49
53
  __exportStar(require("./PalletErrors"), exports);
50
54
  __exportStar(require("./PalletErrorsItem"), exports);
51
55
  __exportStar(require("./PalletEvents"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/responses/index.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;;;;;;;;;;;;;;;;AAExE,kDAAgC;AAChC,uDAAqC;AACrC,mDAAiC;AACjC,uDAAqC;AACrC,0DAAwC;AACxC,uDAAqC;AACrC,2CAAyB;AACzB,uCAAqB;AACrB,0CAAwB;AACxB,+CAA6B;AAC7B,8CAA4B;AAC5B,gDAA8B;AAC9B,iDAA+B;AAC/B,gDAA8B;AAC9B,wDAAsC;AACtC,gDAA8B;AAC9B,2CAAyB;AACzB,iDAA+B;AAC/B,qDAAmC;AACnC,iDAA+B;AAC/B,qDAAmC;AACnC,0DAAwC;AACxC,0DAAwC;AACxC,4DAA0C;AAC1C,kDAAgC;AAChC,sDAAoC;AACpC,0CAAwB;AACxB,2CAAyB;AACzB,gDAA8B;AAC9B,kDAAgC;AAChC,kDAAgC;AAChC,+DAA6C;AAC7C,mDAAiC;AACjC,+DAA6C;AAC7C,iEAA+C;AAC/C,sDAAoC;AACpC,wDAAsC;AACtC,oDAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/responses/index.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;;;;;;;;;;;;;;;;AAExE,kDAAgC;AAChC,uDAAqC;AACrC,mDAAiC;AACjC,uDAAqC;AACrC,0DAAwC;AACxC,uDAAqC;AACrC,2CAAyB;AACzB,uCAAqB;AACrB,0CAAwB;AACxB,+CAA6B;AAC7B,8CAA4B;AAC5B,gDAA8B;AAC9B,iDAA+B;AAC/B,gDAA8B;AAC9B,wDAAsC;AACtC,gDAA8B;AAC9B,2CAAyB;AACzB,oDAAkC;AAClC,wDAAsC;AACtC,wDAAsC;AACtC,4DAA0C;AAC1C,iDAA+B;AAC/B,qDAAmC;AACnC,iDAA+B;AAC/B,qDAAmC;AACnC,0DAAwC;AACxC,0DAAwC;AACxC,4DAA0C;AAC1C,kDAAgC;AAChC,sDAAoC;AACpC,0CAAwB;AACxB,2CAAyB;AACzB,gDAA8B;AAC9B,kDAAgC;AAChC,kDAAgC;AAChC,+DAA6C;AAC7C,mDAAiC;AACjC,+DAA6C;AAC7C,iEAA+C;AAC/C,sDAAoC;AACpC,wDAAsC;AACtC,oDAAkC"}
@@ -4,6 +4,7 @@
4
4
  export declare enum CONFIG {
5
5
  BIND_HOST = "BIND_HOST",
6
6
  PORT = "PORT",
7
+ KEEP_ALIVE_TIMEOUT = "KEEP_ALIVE_TIMEOUT",
7
8
  URL = "URL",
8
9
  LEVEL = "LEVEL",
9
10
  JSON = "JSON",
@@ -23,6 +23,7 @@ var CONFIG;
23
23
  (function (CONFIG) {
24
24
  CONFIG["BIND_HOST"] = "BIND_HOST";
25
25
  CONFIG["PORT"] = "PORT";
26
+ CONFIG["KEEP_ALIVE_TIMEOUT"] = "KEEP_ALIVE_TIMEOUT";
26
27
  CONFIG["URL"] = "URL";
27
28
  CONFIG["LEVEL"] = "LEVEL";
28
29
  CONFIG["JSON"] = "JSON";
@@ -1 +1 @@
1
- {"version":3,"file":"CONFIG.js","sourceRoot":"","sources":["../../../../src/types/sidecar-config/CONFIG.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;;;AAExE;;GAEG;AACH,IAAY,MAgBX;AAhBD,WAAY,MAAM;IACjB,iCAAuB,CAAA;IACvB,uBAAa,CAAA;IACb,qBAAW,CAAA;IACX,yBAAe,CAAA;IACf,uBAAa,CAAA;IACb,mCAAyB,CAAA;IACzB,mCAAyB,CAAA;IACzB,uCAA6B,CAAA;IAC7B,qCAA2B,CAAA;IAC3B,mCAAyB,CAAA;IACzB,yBAAe,CAAA;IACf,yBAAe,CAAA;IACf,mCAAyB,CAAA;IACzB,qDAA2C,CAAA;IAC3C,6CAAmC,CAAA;AACpC,CAAC,EAhBW,MAAM,GAAN,cAAM,KAAN,cAAM,QAgBjB"}
1
+ {"version":3,"file":"CONFIG.js","sourceRoot":"","sources":["../../../../src/types/sidecar-config/CONFIG.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;;;AAExE;;GAEG;AACH,IAAY,MAiBX;AAjBD,WAAY,MAAM;IACjB,iCAAuB,CAAA;IACvB,uBAAa,CAAA;IACb,mDAAyC,CAAA;IACzC,qBAAW,CAAA;IACX,yBAAe,CAAA;IACf,uBAAa,CAAA;IACb,mCAAyB,CAAA;IACzB,mCAAyB,CAAA;IACzB,uCAA6B,CAAA;IAC7B,qCAA2B,CAAA;IAC3B,mCAAyB,CAAA;IACzB,yBAAe,CAAA;IACf,yBAAe,CAAA;IACf,mCAAyB,CAAA;IACzB,qDAA2C,CAAA;IAC3C,6CAAmC,CAAA;AACpC,CAAC,EAjBW,MAAM,GAAN,cAAM,KAAN,cAAM,QAiBjB"}
@@ -16,6 +16,7 @@ interface ISidecarConfigSubstrate {
16
16
  interface ISidecarConfigExpress {
17
17
  HOST: string;
18
18
  PORT: number;
19
+ KEEP_ALIVE_TIMEOUT: number;
19
20
  }
20
21
  interface ISidecarConfigLog {
21
22
  LEVEL: string;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "14.4.0",
2
+ "version": "14.5.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",
@@ -26,6 +26,7 @@
26
26
  "main": "node ./build/src/main.js",
27
27
  "dev": "tsc-watch --onSuccess \"yarn run main\"",
28
28
  "deploy": "yarn build && npm publish",
29
+ "inspect": "node --inspect=127.0.0.1:8081 ./build/src/main.js",
29
30
  "build": "substrate-exec-rimraf build/ && substrate-exec-tsc && echo Build Finished",
30
31
  "build:calc": "bash ./calc/build.sh",
31
32
  "build:docker": "docker build -t substrate-api-sidecar .",
@@ -49,9 +50,9 @@
49
50
  "test:test-release": "yarn build:scripts && node scripts/build/runYarnPack.js"
50
51
  },
51
52
  "dependencies": {
52
- "@polkadot/api": "^9.14.1",
53
- "@polkadot/api-contract": "^9.14.1",
54
- "@polkadot/util-crypto": "^10.4.1",
53
+ "@polkadot/api": "^10.0.1",
54
+ "@polkadot/api-contract": "^10.0.1",
55
+ "@polkadot/util-crypto": "^11.0.1",
55
56
  "@substrate/calc": "^0.3.1",
56
57
  "argparse": "^2.0.1",
57
58
  "confmgr": "^1.0.10",