@substrate/api-sidecar 11.4.1 → 12.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.
- package/README.md +1 -6
- package/build/package.json +2 -26
- package/build/src/main.js +2 -18
- package/build/src/main.js.map +1 -1
- package/package.json +2 -26
package/README.md
CHANGED
|
@@ -167,12 +167,7 @@ For more information on our configuration manager visit its readme [here](https:
|
|
|
167
167
|
#### Custom substrate types
|
|
168
168
|
|
|
169
169
|
Some chains require custom type definitions in order for Sidecar to know how to decode the data
|
|
170
|
-
retrieved from the node. Sidecar
|
|
171
|
-
the types for the chain you are trying to connect to may be out of date or may simply not exist in
|
|
172
|
-
@polkadot/apps-config.
|
|
173
|
-
|
|
174
|
-
Sidecar affords environment variables which allow the user to specify an absolute path to a JSON file
|
|
175
|
-
that contains type definitions in the corresponding formats. Consult polkadot-js/api for more info on
|
|
170
|
+
retrieved from the node. Sidecar affords environment variables which allow the user to specify an absolute path to a JSON file that contains type definitions in the corresponding formats. Consult polkadot-js/api for more info on
|
|
176
171
|
the type formats (see `RegisteredTypes`).
|
|
177
172
|
|
|
178
173
|
**N.B** Types set from environment variables will override the corresponding types pulled from
|
package/build/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "12.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",
|
|
@@ -54,8 +54,7 @@
|
|
|
54
54
|
"update-pjs-deps": "substrate-update-pjs-deps && yarn"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@polkadot/api": "8.
|
|
58
|
-
"@polkadot/apps-config": "0.112.1",
|
|
57
|
+
"@polkadot/api": "8.5.1",
|
|
59
58
|
"@polkadot/util-crypto": "9.2.1",
|
|
60
59
|
"@substrate/calc": "^0.2.8",
|
|
61
60
|
"argparse": "^2.0.1",
|
|
@@ -79,29 +78,6 @@
|
|
|
79
78
|
"tsc-watch": "^4.4.0"
|
|
80
79
|
},
|
|
81
80
|
"resolutions": {
|
|
82
|
-
"@polkadot/api": "8.4.2",
|
|
83
|
-
"@polkadot/api-augment": "8.4.2",
|
|
84
|
-
"@polkadot/api-base": "8.4.2",
|
|
85
|
-
"@polkadot/api-derive": "8.4.2",
|
|
86
|
-
"@polkadot/rpc-core": "8.4.2",
|
|
87
|
-
"@polkadot/rpc-augment": "8.4.2",
|
|
88
|
-
"@polkadot/rpc-provider": "8.4.2",
|
|
89
|
-
"@polkadot/types": "8.4.2",
|
|
90
|
-
"@polkadot/types-augment": "8.4.2",
|
|
91
|
-
"@polkadot/types-codec": "8.4.2",
|
|
92
|
-
"@polkadot/types-create": "8.4.2",
|
|
93
|
-
"@polkadot/types-support": "8.4.2",
|
|
94
|
-
"@polkadot/types-known": "8.4.2",
|
|
95
|
-
"@polkadot/keyring": "9.2.1",
|
|
96
|
-
"@polkadot/networks": "9.2.1",
|
|
97
|
-
"@polkadot/util": "9.2.1",
|
|
98
|
-
"@polkadot/util-crypto": "9.2.1",
|
|
99
|
-
"@polkadot/x-fetch": "9.2.1",
|
|
100
|
-
"@polkadot/x-global": "9.2.1",
|
|
101
|
-
"@polkadot/x-bigint": "9.2.1",
|
|
102
|
-
"@polkadot/x-ws": "9.2.1",
|
|
103
|
-
"@polkadot/wasm-crypto": "6.1.1",
|
|
104
|
-
"bn.js": "5.2.0",
|
|
105
81
|
"node-fetch": "2.6.7",
|
|
106
82
|
"prismjs": ">=1.23.0",
|
|
107
83
|
"typescript": "4.4.3"
|
package/build/src/main.js
CHANGED
|
@@ -41,8 +41,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
41
41
|
// Introduced via `@polkadot/api v7.0.1`.
|
|
42
42
|
require("@polkadot/api-augment");
|
|
43
43
|
const api_1 = require("@polkadot/api");
|
|
44
|
-
const apps = __importStar(require("@polkadot/apps-config/api"));
|
|
45
|
-
const endpoints_1 = require("@polkadot/apps-config/endpoints");
|
|
46
44
|
const rpc_provider_1 = require("@polkadot/rpc-provider");
|
|
47
45
|
const express_1 = require("express");
|
|
48
46
|
const package_json_1 = __importDefault(require("../package.json"));
|
|
@@ -66,10 +64,10 @@ async function main() {
|
|
|
66
64
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
67
65
|
typesBundle: TYPES_BUNDLE
|
|
68
66
|
? require(TYPES_BUNDLE)
|
|
69
|
-
:
|
|
67
|
+
: undefined,
|
|
70
68
|
typesChain: TYPES_CHAIN
|
|
71
69
|
? require(TYPES_CHAIN)
|
|
72
|
-
:
|
|
70
|
+
: undefined,
|
|
73
71
|
typesSpec: TYPES_SPEC
|
|
74
72
|
? require(TYPES_SPEC)
|
|
75
73
|
: undefined,
|
|
@@ -110,21 +108,7 @@ async function main() {
|
|
|
110
108
|
function startUpPrompt(wsUrl, chainName, implName) {
|
|
111
109
|
const { logger } = Log_1.Log;
|
|
112
110
|
const { config } = SidecarConfig_1.SidecarConfig;
|
|
113
|
-
/**
|
|
114
|
-
* Retrieving public endpoints from @polkadot/apps-config/endpoints
|
|
115
|
-
*/
|
|
116
|
-
const publicWsUrls = [];
|
|
117
|
-
const endpoints = (0, endpoints_1.createWsEndpoints)(() => '');
|
|
118
|
-
for (const endpoint of endpoints) {
|
|
119
|
-
if (endpoint.value && endpoint.info != 'local') {
|
|
120
|
-
publicWsUrls.push(endpoint.value);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
111
|
logger.info(`Connected to chain ${chainName} on the ${implName} client at ${config.SUBSTRATE.WS_URL}`);
|
|
124
|
-
const isPublicUrl = publicWsUrls.includes(wsUrl);
|
|
125
|
-
if (isPublicUrl) {
|
|
126
|
-
logger.info(`${wsUrl} is a public node. Too many users will overload this public endpoint. Switch to a privately hosted node when possible.`);
|
|
127
|
-
}
|
|
128
112
|
// Split the Url to check for 2 things. Secure connection, and if its a local IP.
|
|
129
113
|
const splitUrl = wsUrl.split(':');
|
|
130
114
|
// If its 'ws' its not a secure connection.
|
package/build/src/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":";;AAEA,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,yCAAyC;AACzC,iCAA+B;AAE/B,uCAA2C;AAC3C,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":";;AAEA,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,yCAAyC;AACzC,iCAA+B;AAE/B,uCAA2C;AAC3C,yDAAoD;AAEpD,qCAA+B;AAE/B,mEAA0C;AAC1C,gDAAwB;AACxB,mDAAwD;AACxD,+DAA4D;AAC5D,uCAAoC;AACpC,yDAA2C;AAC3C,2CAAwC;AACxC,mDAAgD;AAEhD,KAAK,UAAU,IAAI;IAClB,MAAM,EAAE,MAAM,EAAE,GAAG,6BAAa,CAAC;IACjC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAG,CAAC;IACvB,0CAA0C;IAC1C,IAAA,iCAAe,EAAC,MAAM,CAAC,CAAC;IAExB,MAAM,CAAC,IAAI,CAAC,YAAY,sBAAW,CAAC,OA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AC,CAAC,CAAC;AAEH,MAAM,IAAI,GAAG,IAAA,qBAAS,GAAE,CAAC;AAEzB,IAAI,IAAI,CAAC,OAAO,EAAE;IACjB,OAAO,CAAC,GAAG,CAAC,2BAA2B,sBAAW,CAAC,OAAO,EAAE,CAAC,CAAC;IAC9D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CAChB;KAAM;IACN,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;CAC1B"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "12.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",
|
|
@@ -54,8 +54,7 @@
|
|
|
54
54
|
"update-pjs-deps": "substrate-update-pjs-deps && yarn"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@polkadot/api": "8.
|
|
58
|
-
"@polkadot/apps-config": "0.112.1",
|
|
57
|
+
"@polkadot/api": "8.5.1",
|
|
59
58
|
"@polkadot/util-crypto": "9.2.1",
|
|
60
59
|
"@substrate/calc": "^0.2.8",
|
|
61
60
|
"argparse": "^2.0.1",
|
|
@@ -79,29 +78,6 @@
|
|
|
79
78
|
"tsc-watch": "^4.4.0"
|
|
80
79
|
},
|
|
81
80
|
"resolutions": {
|
|
82
|
-
"@polkadot/api": "8.4.2",
|
|
83
|
-
"@polkadot/api-augment": "8.4.2",
|
|
84
|
-
"@polkadot/api-base": "8.4.2",
|
|
85
|
-
"@polkadot/api-derive": "8.4.2",
|
|
86
|
-
"@polkadot/rpc-core": "8.4.2",
|
|
87
|
-
"@polkadot/rpc-augment": "8.4.2",
|
|
88
|
-
"@polkadot/rpc-provider": "8.4.2",
|
|
89
|
-
"@polkadot/types": "8.4.2",
|
|
90
|
-
"@polkadot/types-augment": "8.4.2",
|
|
91
|
-
"@polkadot/types-codec": "8.4.2",
|
|
92
|
-
"@polkadot/types-create": "8.4.2",
|
|
93
|
-
"@polkadot/types-support": "8.4.2",
|
|
94
|
-
"@polkadot/types-known": "8.4.2",
|
|
95
|
-
"@polkadot/keyring": "9.2.1",
|
|
96
|
-
"@polkadot/networks": "9.2.1",
|
|
97
|
-
"@polkadot/util": "9.2.1",
|
|
98
|
-
"@polkadot/util-crypto": "9.2.1",
|
|
99
|
-
"@polkadot/x-fetch": "9.2.1",
|
|
100
|
-
"@polkadot/x-global": "9.2.1",
|
|
101
|
-
"@polkadot/x-bigint": "9.2.1",
|
|
102
|
-
"@polkadot/x-ws": "9.2.1",
|
|
103
|
-
"@polkadot/wasm-crypto": "6.1.1",
|
|
104
|
-
"bn.js": "5.2.0",
|
|
105
81
|
"node-fetch": "2.6.7",
|
|
106
82
|
"prismjs": ">=1.23.0",
|
|
107
83
|
"typescript": "4.4.3"
|