@polkadot-api/json-rpc-provider 0.1.1-canary.f1c6573 → 0.2.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/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/package.json +8 -18
- package/dist/esm/index.mjs +0 -5
- package/dist/esm/index.mjs.map +0 -1
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["export type JsonRpcId = string | number | null\n\nexport type JsonRpcRequest<T = any> = {\n jsonrpc: \"2.0\"\n method: string\n params?: T\n id?: JsonRpcId\n}\n\nexport type JsonRpcError<T = any> = {\n code: number\n message: string\n data?: T\n}\n\nexport type JsonRpcResponse<T = any> = {\n jsonrpc: \"2.0\"\n id: JsonRpcId\n} & (\n | {\n result: T\n }\n | {\n error: JsonRpcError<T>\n }\n)\n\nexport type JsonRpcMessage<T = any> = JsonRpcRequest<T> | JsonRpcResponse<T>\n\nexport interface JsonRpcConnection<T = any> {\n send: (message: JsonRpcRequest<T>) => void\n disconnect: () => void\n}\n\nexport declare type JsonRpcProvider<T = any> = (\n onMessage: (message: JsonRpcMessage<T>) => void,\n) => JsonRpcConnection\n\nexport const isRequest = <T>(\n msg: JsonRpcMessage<T>,\n): msg is JsonRpcRequest<T> => \"method\" in msg\n\nexport const isResponse = <T>(\n msg: JsonRpcMessage<T>,\n): msg is JsonRpcResponse<T> => !(\"method\" in msg)\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["export type JsonRpcId = string | number | null\n\nexport type JsonRpcRequest<T = any> = {\n jsonrpc: \"2.0\"\n method: string\n params?: T\n id?: JsonRpcId\n}\n\nexport type JsonRpcError<T = any> = {\n code: number\n message: string\n data?: T\n}\n\nexport type JsonRpcResponse<T = any> = {\n jsonrpc: \"2.0\"\n id: JsonRpcId\n} & (\n | {\n result: T\n }\n | {\n error: JsonRpcError<T>\n }\n)\n\nexport type JsonRpcMessage<T = any> = JsonRpcRequest<T> | JsonRpcResponse<T>\n\nexport interface JsonRpcConnection<T = any> {\n send: (message: JsonRpcRequest<T>) => void\n disconnect: () => void\n}\n\nexport declare type JsonRpcProvider<T = any> = (\n onMessage: (message: JsonRpcMessage<T>) => void,\n) => JsonRpcConnection\n\nexport const isRequest = <T>(\n msg: JsonRpcMessage<T>,\n): msg is JsonRpcRequest<T> => \"method\" in msg\n\nexport const isResponse = <T>(\n msg: JsonRpcMessage<T>,\n): msg is JsonRpcResponse<T> => !(\"method\" in msg)\n"],"names":[],"mappings":"AAsCO,MAAM,SAAA,GAAY,CACvB,GAAA,KAC6B,QAAA,IAAY;AAEpC,MAAM,UAAA,GAAa,CACxB,GAAA,KAC8B,EAAE,QAAA,IAAY,GAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polkadot-api/json-rpc-provider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"author": "Josep M Sobrepere (https://github.com/josepot)",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,28 +8,18 @@
|
|
|
8
8
|
},
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"sideEffects": false,
|
|
11
|
+
"type": "module",
|
|
11
12
|
"exports": {
|
|
12
13
|
".": {
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"require": "./dist/min/index.js",
|
|
17
|
-
"default": "./dist/index.js"
|
|
18
|
-
},
|
|
19
|
-
"import": "./dist/esm/index.mjs",
|
|
20
|
-
"require": "./dist/index.js",
|
|
21
|
-
"default": "./dist/index.js"
|
|
22
|
-
},
|
|
23
|
-
"module": "./dist/esm/index.mjs",
|
|
24
|
-
"import": "./dist/esm/index.mjs",
|
|
25
|
-
"require": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"module": "./dist/index.js",
|
|
16
|
+
"import": "./dist/index.js",
|
|
26
17
|
"default": "./dist/index.js"
|
|
27
|
-
}
|
|
28
|
-
"./package.json": "./package.json"
|
|
18
|
+
}
|
|
29
19
|
},
|
|
30
20
|
"main": "./dist/index.js",
|
|
31
|
-
"module": "./dist/
|
|
32
|
-
"browser": "./dist/
|
|
21
|
+
"module": "./dist/index.js",
|
|
22
|
+
"browser": "./dist/index.js",
|
|
33
23
|
"types": "./dist/index.d.ts",
|
|
34
24
|
"files": [
|
|
35
25
|
"dist"
|
package/dist/esm/index.mjs
DELETED
package/dist/esm/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/index.ts"],"sourcesContent":["export type JsonRpcId = string | number | null\n\nexport type JsonRpcRequest<T = any> = {\n jsonrpc: \"2.0\"\n method: string\n params?: T\n id?: JsonRpcId\n}\n\nexport type JsonRpcError<T = any> = {\n code: number\n message: string\n data?: T\n}\n\nexport type JsonRpcResponse<T = any> = {\n jsonrpc: \"2.0\"\n id: JsonRpcId\n} & (\n | {\n result: T\n }\n | {\n error: JsonRpcError<T>\n }\n)\n\nexport type JsonRpcMessage<T = any> = JsonRpcRequest<T> | JsonRpcResponse<T>\n\nexport interface JsonRpcConnection<T = any> {\n send: (message: JsonRpcRequest<T>) => void\n disconnect: () => void\n}\n\nexport declare type JsonRpcProvider<T = any> = (\n onMessage: (message: JsonRpcMessage<T>) => void,\n) => JsonRpcConnection\n\nexport const isRequest = <T>(\n msg: JsonRpcMessage<T>,\n): msg is JsonRpcRequest<T> => \"method\" in msg\n\nexport const isResponse = <T>(\n msg: JsonRpcMessage<T>,\n): msg is JsonRpcResponse<T> => !(\"method\" in msg)\n"],"names":[],"mappings":"AAsCO,MAAM,SAAA,GAAY,CACvB,GAAA,KAC6B,QAAA,IAAY;AAEpC,MAAM,UAAA,GAAa,CACxB,GAAA,KAC8B,EAAE,QAAA,IAAY,GAAA;;;;"}
|