Add errors/events Md interface endpoints (#3084)

This commit is contained in:
Jaco Greeff
2021-01-21 09:31:40 +01:00
committed by GitHub
parent 21039dec1f
commit 3721a11f34
11 changed files with 107 additions and 105 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
"@babel/runtime": "^7.12.5",
"@polkadot/api": "3.5.2-3",
"@polkadot/types": "3.5.2-3",
"@polkadot/util": "^5.3.2-1",
"@polkadot/util": "^5.3.2-3",
"@polkadot/x-rxjs": "3.5.2-1",
"bn.js": "^4.11.9"
}
+3 -3
View File
@@ -17,13 +17,13 @@
"@polkadot/api": "3.5.2-3",
"@polkadot/rpc-core": "3.5.2-3",
"@polkadot/types": "3.5.2-3",
"@polkadot/util": "^5.3.2-1",
"@polkadot/util-crypto": "^5.3.2-1",
"@polkadot/util": "^5.3.2-3",
"@polkadot/util-crypto": "^5.3.2-3",
"@polkadot/x-rxjs": "3.5.2-1",
"bn.js": "^4.11.9"
},
"devDependencies": {
"@polkadot/keyring": "^5.3.2-1",
"@polkadot/keyring": "^5.3.2-3",
"@polkadot/rpc-provider": "3.5.2-3"
}
}
+3 -3
View File
@@ -18,14 +18,14 @@
"dependencies": {
"@babel/runtime": "^7.12.5",
"@polkadot/api-derive": "3.5.2-3",
"@polkadot/keyring": "^5.3.2-1",
"@polkadot/keyring": "^5.3.2-3",
"@polkadot/metadata": "3.5.2-3",
"@polkadot/rpc-core": "3.5.2-3",
"@polkadot/rpc-provider": "3.5.2-3",
"@polkadot/types": "3.5.2-3",
"@polkadot/types-known": "3.5.2-3",
"@polkadot/util": "^5.3.2-1",
"@polkadot/util-crypto": "^5.3.2-1",
"@polkadot/util": "^5.3.2-3",
"@polkadot/util-crypto": "^5.3.2-3",
"@polkadot/x-rxjs": "3.5.2-1",
"bn.js": "^4.11.9",
"eventemitter3": "^4.0.7"
+3 -3
View File
@@ -19,11 +19,11 @@
"@babel/runtime": "^7.12.5",
"@polkadot/types": "3.5.2-3",
"@polkadot/types-known": "3.5.2-3",
"@polkadot/util": "^5.3.2-1",
"@polkadot/util-crypto": "^5.3.2-1",
"@polkadot/util": "^5.3.2-3",
"@polkadot/util-crypto": "^5.3.2-3",
"bn.js": "^4.11.9"
},
"devDependencies": {
"@polkadot/keyring": "^5.3.2-1"
"@polkadot/keyring": "^5.3.2-3"
}
}
+2 -2
View File
@@ -17,10 +17,10 @@
"@polkadot/metadata": "3.5.2-3",
"@polkadot/rpc-provider": "3.5.2-3",
"@polkadot/types": "3.5.2-3",
"@polkadot/util": "^5.3.2-1",
"@polkadot/util": "^5.3.2-3",
"@polkadot/x-rxjs": "3.5.2-1"
},
"devDependencies": {
"@polkadot/keyring": "^5.3.2-1"
"@polkadot/keyring": "^5.3.2-3"
}
}
+5 -5
View File
@@ -15,15 +15,15 @@
"dependencies": {
"@babel/runtime": "^7.12.5",
"@polkadot/types": "3.5.2-3",
"@polkadot/util": "^5.3.2-1",
"@polkadot/util-crypto": "^5.3.2-1",
"@polkadot/x-fetch": "^5.3.2-1",
"@polkadot/x-ws": "^5.3.2-1",
"@polkadot/util": "^5.3.2-3",
"@polkadot/util-crypto": "^5.3.2-3",
"@polkadot/x-fetch": "^5.3.2-3",
"@polkadot/x-ws": "^5.3.2-3",
"bn.js": "^4.11.9",
"eventemitter3": "^4.0.7"
},
"devDependencies": {
"@polkadot/keyring": "^5.3.2-1",
"@polkadot/keyring": "^5.3.2-3",
"@polkadot/metadata": "3.5.2-3",
"mock-socket": "^9.0.3",
"nock": "^13.0.5"
+1 -1
View File
@@ -27,7 +27,7 @@
"@polkadot/metadata": "3.5.2-3",
"@polkadot/rpc-provider": "3.5.2-3",
"@polkadot/types": "3.5.2-3",
"@polkadot/util": "^5.3.2-1",
"@polkadot/util": "^5.3.2-3",
"handlebars": "^4.7.6",
"websocket": "^1.0.33",
"yargs": "^16.2.0"
+2
View File
@@ -275,6 +275,7 @@ function addEvents (metadata: MetadataLatest): string {
const args = func.args.map((type): string => '`' + type.toString() + '`').join(', ');
return {
interface: '`' + `api.events.${stringCamelCase(meta.name)}.${methodName}.is` + '`',
name: `${methodName}(${args})`,
...(func.documentation.length && { summary: func.documentation })
};
@@ -296,6 +297,7 @@ function addErrors (metadata: MetadataLatest): string {
items: moduleMetadata.errors
.sort(sortByName)
.map((error) => ({
interface: '`' + `api.errors.${stringCamelCase(moduleMetadata.name)}.${error.name.toString()}.is` + '`',
name: error.name.toString(),
...(error.documentation.length && { summary: error.documentation })
})),
+1 -1
View File
@@ -15,7 +15,7 @@
"dependencies": {
"@babel/runtime": "^7.12.5",
"@polkadot/types": "3.5.2-3",
"@polkadot/util": "^5.3.2-1",
"@polkadot/util": "^5.3.2-3",
"bn.js": "^4.11.9"
},
"devDependencies": {
+3 -3
View File
@@ -18,13 +18,13 @@
"dependencies": {
"@babel/runtime": "^7.12.5",
"@polkadot/metadata": "3.5.2-3",
"@polkadot/util": "^5.3.2-1",
"@polkadot/util-crypto": "^5.3.2-1",
"@polkadot/util": "^5.3.2-3",
"@polkadot/util-crypto": "^5.3.2-3",
"@polkadot/x-rxjs": "3.5.2-1",
"@types/bn.js": "^4.11.6",
"bn.js": "^4.11.9"
},
"devDependencies": {
"@polkadot/keyring": "^5.3.2-1"
"@polkadot/keyring": "^5.3.2-3"
}
}
+83 -83
View File
@@ -1624,7 +1624,7 @@ __metadata:
"@babel/runtime": ^7.12.5
"@polkadot/api": 3.5.2-3
"@polkadot/types": 3.5.2-3
"@polkadot/util": ^5.3.2-1
"@polkadot/util": ^5.3.2-3
"@polkadot/x-rxjs": 3.5.2-1
bn.js: ^4.11.9
languageName: unknown
@@ -1636,12 +1636,12 @@ __metadata:
dependencies:
"@babel/runtime": ^7.12.5
"@polkadot/api": 3.5.2-3
"@polkadot/keyring": ^5.3.2-1
"@polkadot/keyring": ^5.3.2-3
"@polkadot/rpc-core": 3.5.2-3
"@polkadot/rpc-provider": 3.5.2-3
"@polkadot/types": 3.5.2-3
"@polkadot/util": ^5.3.2-1
"@polkadot/util-crypto": ^5.3.2-1
"@polkadot/util": ^5.3.2-3
"@polkadot/util-crypto": ^5.3.2-3
"@polkadot/x-rxjs": 3.5.2-1
bn.js: ^4.11.9
languageName: unknown
@@ -1653,14 +1653,14 @@ __metadata:
dependencies:
"@babel/runtime": ^7.12.5
"@polkadot/api-derive": 3.5.2-3
"@polkadot/keyring": ^5.3.2-1
"@polkadot/keyring": ^5.3.2-3
"@polkadot/metadata": 3.5.2-3
"@polkadot/rpc-core": 3.5.2-3
"@polkadot/rpc-provider": 3.5.2-3
"@polkadot/types": 3.5.2-3
"@polkadot/types-known": 3.5.2-3
"@polkadot/util": ^5.3.2-1
"@polkadot/util-crypto": ^5.3.2-1
"@polkadot/util": ^5.3.2-3
"@polkadot/util-crypto": ^5.3.2-3
"@polkadot/x-rxjs": 3.5.2-1
bn.js: ^4.11.9
eventemitter3: ^4.0.7
@@ -1758,17 +1758,17 @@ __metadata:
languageName: node
linkType: hard
"@polkadot/keyring@npm:^5.3.2-1":
version: 5.3.2-1
resolution: "@polkadot/keyring@npm:5.3.2-1"
"@polkadot/keyring@npm:^5.3.2-3":
version: 5.3.2-3
resolution: "@polkadot/keyring@npm:5.3.2-3"
dependencies:
"@babel/runtime": ^7.12.5
"@polkadot/util": 5.3.2-1
"@polkadot/util-crypto": 5.3.2-1
"@polkadot/util": 5.3.2-3
"@polkadot/util-crypto": 5.3.2-3
peerDependencies:
"@polkadot/util": 5.3.2-1
"@polkadot/util-crypto": 5.3.2-1
checksum: a64f423044c0cb363d6367fb05331a035edd1c8debb9b9cc00e4b6600411d7b872f13f6d2248fc1b125e3993c76f953a70c4daf6c3ab21a64d62e89b5e86822f
"@polkadot/util": 5.3.2-3
"@polkadot/util-crypto": 5.3.2-3
checksum: 23385f243239faebcc4a380a407801c38a1d63b26ff6a08398f274dc2236112cc0ccda5fc934a7577944b78c5295fde4161ef448b2642f314fca18f2373bedff
languageName: node
linkType: hard
@@ -1777,21 +1777,21 @@ __metadata:
resolution: "@polkadot/metadata@workspace:packages/metadata"
dependencies:
"@babel/runtime": ^7.12.5
"@polkadot/keyring": ^5.3.2-1
"@polkadot/keyring": ^5.3.2-3
"@polkadot/types": 3.5.2-3
"@polkadot/types-known": 3.5.2-3
"@polkadot/util": ^5.3.2-1
"@polkadot/util-crypto": ^5.3.2-1
"@polkadot/util": ^5.3.2-3
"@polkadot/util-crypto": ^5.3.2-3
bn.js: ^4.11.9
languageName: unknown
linkType: soft
"@polkadot/networks@npm:5.3.2-1":
version: 5.3.2-1
resolution: "@polkadot/networks@npm:5.3.2-1"
"@polkadot/networks@npm:5.3.2-3":
version: 5.3.2-3
resolution: "@polkadot/networks@npm:5.3.2-3"
dependencies:
"@babel/runtime": ^7.12.5
checksum: a2504d3e3df50b6ac42816d3e230068fb3b6027f487248bcc5781160d2ad66d6f35039f5e72f144687ebfdfd715975ddc8492f0f44f4935637d4cbf97dcccbb2
checksum: 92877ed49fc7b0322272d0e937577170208f8da513b631b682d1a7fe1edb5634c0595a24d2d588dec88d5862a7160d524901867dd7643765d7d96b905009aec2
languageName: node
linkType: hard
@@ -1800,11 +1800,11 @@ __metadata:
resolution: "@polkadot/rpc-core@workspace:packages/rpc-core"
dependencies:
"@babel/runtime": ^7.12.5
"@polkadot/keyring": ^5.3.2-1
"@polkadot/keyring": ^5.3.2-3
"@polkadot/metadata": 3.5.2-3
"@polkadot/rpc-provider": 3.5.2-3
"@polkadot/types": 3.5.2-3
"@polkadot/util": ^5.3.2-1
"@polkadot/util": ^5.3.2-3
"@polkadot/x-rxjs": 3.5.2-1
languageName: unknown
linkType: soft
@@ -1814,13 +1814,13 @@ __metadata:
resolution: "@polkadot/rpc-provider@workspace:packages/rpc-provider"
dependencies:
"@babel/runtime": ^7.12.5
"@polkadot/keyring": ^5.3.2-1
"@polkadot/keyring": ^5.3.2-3
"@polkadot/metadata": 3.5.2-3
"@polkadot/types": 3.5.2-3
"@polkadot/util": ^5.3.2-1
"@polkadot/util-crypto": ^5.3.2-1
"@polkadot/x-fetch": ^5.3.2-1
"@polkadot/x-ws": ^5.3.2-1
"@polkadot/util": ^5.3.2-3
"@polkadot/util-crypto": ^5.3.2-3
"@polkadot/x-fetch": ^5.3.2-3
"@polkadot/x-ws": ^5.3.2-3
bn.js: ^4.11.9
eventemitter3: ^4.0.7
mock-socket: ^9.0.3
@@ -1848,7 +1848,7 @@ __metadata:
"@polkadot/metadata": 3.5.2-3
"@polkadot/rpc-provider": 3.5.2-3
"@polkadot/types": 3.5.2-3
"@polkadot/util": ^5.3.2-1
"@polkadot/util": ^5.3.2-3
"@types/websocket": ^1.0.1
"@types/yargs": ^15.0.12
handlebars: ^4.7.6
@@ -1869,7 +1869,7 @@ __metadata:
dependencies:
"@babel/runtime": ^7.12.5
"@polkadot/types": 3.5.2-3
"@polkadot/util": ^5.3.2-1
"@polkadot/util": ^5.3.2-3
"@types/bn.js": ^4.11.6
bn.js: ^4.11.9
languageName: unknown
@@ -1880,25 +1880,25 @@ __metadata:
resolution: "@polkadot/types@workspace:packages/types"
dependencies:
"@babel/runtime": ^7.12.5
"@polkadot/keyring": ^5.3.2-1
"@polkadot/keyring": ^5.3.2-3
"@polkadot/metadata": 3.5.2-3
"@polkadot/util": ^5.3.2-1
"@polkadot/util-crypto": ^5.3.2-1
"@polkadot/util": ^5.3.2-3
"@polkadot/util-crypto": ^5.3.2-3
"@polkadot/x-rxjs": 3.5.2-1
"@types/bn.js": ^4.11.6
bn.js: ^4.11.9
languageName: unknown
linkType: soft
"@polkadot/util-crypto@npm:5.3.2-1, @polkadot/util-crypto@npm:^5.3.2-1":
version: 5.3.2-1
resolution: "@polkadot/util-crypto@npm:5.3.2-1"
"@polkadot/util-crypto@npm:5.3.2-3, @polkadot/util-crypto@npm:^5.3.2-3":
version: 5.3.2-3
resolution: "@polkadot/util-crypto@npm:5.3.2-3"
dependencies:
"@babel/runtime": ^7.12.5
"@polkadot/networks": 5.3.2-1
"@polkadot/util": 5.3.2-1
"@polkadot/wasm-crypto": ^3.1.1
"@polkadot/x-randomvalues": 5.3.2-1
"@polkadot/networks": 5.3.2-3
"@polkadot/util": 5.3.2-3
"@polkadot/wasm-crypto": ^3.1.2-4
"@polkadot/x-randomvalues": 5.3.2-3
base-x: ^3.0.8
blakejs: ^1.1.0
bn.js: ^4.11.9
@@ -1910,75 +1910,75 @@ __metadata:
tweetnacl: ^1.0.3
xxhashjs: ^0.2.2
peerDependencies:
"@polkadot/util": 5.3.2-1
checksum: db59b5157825e53836c9a4a3321212337eb7b1a087162a3248d894bfcc671e06b8760f5e1ef98fb475acc474a463ae95c270a74834a15ebd8a977aeced05b31f
"@polkadot/util": 5.3.2-3
checksum: 814c91febaa69147972abb51622212e6819320762f12d3d98c67ee3a71efa63a42620f0bdeb738819978f78d409d96dee5719528540863fee6a04f0883300f73
languageName: node
linkType: hard
"@polkadot/util@npm:5.3.2-1, @polkadot/util@npm:^5.3.2-1":
version: 5.3.2-1
resolution: "@polkadot/util@npm:5.3.2-1"
"@polkadot/util@npm:5.3.2-3, @polkadot/util@npm:^5.3.2-3":
version: 5.3.2-3
resolution: "@polkadot/util@npm:5.3.2-3"
dependencies:
"@babel/runtime": ^7.12.5
"@polkadot/x-textdecoder": 5.3.2-1
"@polkadot/x-textencoder": 5.3.2-1
"@polkadot/x-textdecoder": 5.3.2-3
"@polkadot/x-textencoder": 5.3.2-3
"@types/bn.js": ^4.11.6
bn.js: ^4.11.9
camelcase: ^5.3.1
ip-regex: ^4.2.0
checksum: 4f6e1a4152911238fb81ed7710fc93544a9c6d4c209600be542e7cad6c5d07ef527d28dda0743a3d45c51e202b42aff1e1b5ea0a0ccd97d34b4f15dee556bf2b
checksum: 847cf9e9ab9a124b18b0d0a648d2f3cf2345c0788194db8070beca2593d3e47997df4d1ba616dee1e4a1083303441a04ef10e759b7dd10ba313d8d6bf3d1b7b8
languageName: node
linkType: hard
"@polkadot/wasm-crypto-asmjs@npm:^3.1.1":
version: 3.1.1
resolution: "@polkadot/wasm-crypto-asmjs@npm:3.1.1"
"@polkadot/wasm-crypto-asmjs@npm:^3.1.2-4":
version: 3.1.2-4
resolution: "@polkadot/wasm-crypto-asmjs@npm:3.1.2-4"
dependencies:
"@babel/runtime": ^7.12.5
checksum: 6f8f10452e89ba7e3cabbd38f521cd379180c6efec644a79b7e39c04eb00dbba50a121a695cfc02578ec123c3139ce2aa128b193f11ed49e1e9f624685350e8a
checksum: e23ecec8538ff4ec46bd9894c3900860272b12ea71864f746d5c1ba203d8cd412e86001f0f3c98b5ddd9807d1be33a4cc2206f3a53236572bc202de9f8e3beb3
languageName: node
linkType: hard
"@polkadot/wasm-crypto-wasm@npm:^3.1.1":
version: 3.1.1
resolution: "@polkadot/wasm-crypto-wasm@npm:3.1.1"
"@polkadot/wasm-crypto-wasm@npm:^3.1.2-4":
version: 3.1.2-4
resolution: "@polkadot/wasm-crypto-wasm@npm:3.1.2-4"
dependencies:
"@babel/runtime": ^7.12.5
checksum: f96eda239fa4632359983ef12d776268ed2f16a12cc888e594f3ca43f09b42cc389ad248bbccb99b801b59ad672e2961a9e3dff9377ede067588d4de541df6fa
checksum: e11c5065dbcfbd26d54cc9b483fba08e3feeb00ac0000eea7269bd33b0ee1114c3e3feca5a4f3b888cfb4587ae4112b0bc38510143703123a2d17cb5d9184134
languageName: node
linkType: hard
"@polkadot/wasm-crypto@npm:^3.1.1":
version: 3.1.1
resolution: "@polkadot/wasm-crypto@npm:3.1.1"
"@polkadot/wasm-crypto@npm:^3.1.2-4":
version: 3.1.2-4
resolution: "@polkadot/wasm-crypto@npm:3.1.2-4"
dependencies:
"@babel/runtime": ^7.12.5
"@polkadot/wasm-crypto-asmjs": ^3.1.1
"@polkadot/wasm-crypto-wasm": ^3.1.1
"@polkadot/wasm-crypto-asmjs": ^3.1.2-4
"@polkadot/wasm-crypto-wasm": ^3.1.2-4
peerDependencies:
"@polkadot/util": "*"
"@polkadot/x-randomvalues": "*"
checksum: a7b3d029d88669ea9775c8cfe166a44a06ba243283c03fa0547bf4c6144c5440260a0bd1a6acc9c67b57ab707c406d681a2e52af5e7da3ebe8bb4fdeff071c66
checksum: db473558ee494d6da64ee315f1d8af2f13c5d3f8bffab7708929379ba4cb56526a169640a5071575868da326e86c93c9d4a5c83f8d1b206dbab8b1d965170dca
languageName: node
linkType: hard
"@polkadot/x-fetch@npm:^5.3.2-1":
version: 5.3.2-1
resolution: "@polkadot/x-fetch@npm:5.3.2-1"
"@polkadot/x-fetch@npm:^5.3.2-3":
version: 5.3.2-3
resolution: "@polkadot/x-fetch@npm:5.3.2-3"
dependencies:
"@babel/runtime": ^7.12.5
"@types/node-fetch": ^2.5.8
node-fetch: ^2.6.1
checksum: b523afe9466bff38307d1f45b4356c69f9cceb808211f69d93163a194f99efebef71707f89c80b814aef5a029e209edb664960095336e0a6e9a5ce575d738d37
checksum: f2b95d67f99e5df746e34e399c09f210a06f0b8a4bdf1acd93862b04ba3fe4c4d27e48c036edcdfb621aea735305dc46b2d90ec4bd494315be955c3a7b029f0c
languageName: node
linkType: hard
"@polkadot/x-randomvalues@npm:5.3.2-1":
version: 5.3.2-1
resolution: "@polkadot/x-randomvalues@npm:5.3.2-1"
"@polkadot/x-randomvalues@npm:5.3.2-3":
version: 5.3.2-3
resolution: "@polkadot/x-randomvalues@npm:5.3.2-3"
dependencies:
"@babel/runtime": ^7.12.5
checksum: 6b08e40aa4273b171a76c75f1c0db89bf525eed8878183097fdd6e484d50752b06d266885703bb4ffa9ff22f8c9b7d44ee9310c5c77e0238a316011782949c25
checksum: dc4564369b8f45e35b8f8cd0e7c56bcc0a9d644c6c24d2059364ec016790cce3a8933e2a6f61eada37baa06ac553b32f7d1b3c90c76263a92f34b905d390949a
languageName: node
linkType: hard
@@ -1992,32 +1992,32 @@ __metadata:
languageName: node
linkType: hard
"@polkadot/x-textdecoder@npm:5.3.2-1":
version: 5.3.2-1
resolution: "@polkadot/x-textdecoder@npm:5.3.2-1"
"@polkadot/x-textdecoder@npm:5.3.2-3":
version: 5.3.2-3
resolution: "@polkadot/x-textdecoder@npm:5.3.2-3"
dependencies:
"@babel/runtime": ^7.12.5
checksum: edc52a77a4feb7e0fafd300dd1b1c01f85847100bd7601efd45476f55508bbac936c4e9d89b4ed3e58bd128c2d5341a69c5d4b5d4309fd4566b3bcb27c51810a
checksum: fa78fefad97ba0fb072d56c22f2e8c1b16c5c80e451234b3a92155519dee6543ee5701d52b778bb271aedf8d3d6d7c7b485252c2c8e12be90f1e6d6ba248cd40
languageName: node
linkType: hard
"@polkadot/x-textencoder@npm:5.3.2-1":
version: 5.3.2-1
resolution: "@polkadot/x-textencoder@npm:5.3.2-1"
"@polkadot/x-textencoder@npm:5.3.2-3":
version: 5.3.2-3
resolution: "@polkadot/x-textencoder@npm:5.3.2-3"
dependencies:
"@babel/runtime": ^7.12.5
checksum: 9c15afb1ea945a0a2c831e592944b34346690ac5f7d716ee5983b86714b6800777293226d720b2d6c826465816ba8bf388fdaaf230d02416388a264ba150e2c6
checksum: ee01c30d3ab1ab113d9c375405d337b6ecce09d53534919c6990411bc3b1ff0755266d7b18200ae7abd25e136adc577aada0426af1254b121f540d89340ee8ae
languageName: node
linkType: hard
"@polkadot/x-ws@npm:^5.3.2-1":
version: 5.3.2-1
resolution: "@polkadot/x-ws@npm:5.3.2-1"
"@polkadot/x-ws@npm:^5.3.2-3":
version: 5.3.2-3
resolution: "@polkadot/x-ws@npm:5.3.2-3"
dependencies:
"@babel/runtime": ^7.12.5
"@types/websocket": ^1.0.1
websocket: ^1.0.33
checksum: a071d3cbadfcf735b42df8e67f9e6d8e34f3eb15a47b82d5a3793a6976e0316442e0f165887c8a28f6b0bd2a1f9c756bbe7a0138349a1e75c08f74267a1593cc
checksum: 2c9189358791d3f5773f0af4c0459342748e7b3d8ebcd3f2d65e52715c41c0d42b55c4eda6a5ce9ccc28c06a14870c1f8a9cc8215fca7b67ac22ea7cfa11a839
languageName: node
linkType: hard