Fix types documentation links (#445)

* Fix types documentation links

* Adjust CSS selector

* Don't include Summary in the README
This commit is contained in:
Jaco Greeff
2018-12-06 12:11:56 +01:00
committed by GitHub
parent 6ee9f3eb62
commit b52a86eab0
5 changed files with 132 additions and 6 deletions
+3 -3
View File
@@ -450,20 +450,20 @@ export class RuntimeModuleMetadata extends Struct {
* @description
* The runtime metadata as a decoded structure
*/
export default class RuntimeMetadata extends Struct {
export default class Metadata extends Struct {
constructor (value?: any) {
super({
outerEvent: OuterEventMetadata,
modules: Vector.with(RuntimeModuleMetadata),
outerDispatch: OuterDispatchMetadata
}, RuntimeMetadata.decodeMetadata(value));
}, Metadata.decodeMetadata(value));
}
static decodeMetadata (value: string | Uint8Array | object): object | Uint8Array {
if (isHex(value)) {
// We receive this as an hex in the JSON output from the Node.
// Convert to u8a and use the U8a version to do the actual parsing.
return RuntimeMetadata.decodeMetadata(hexToU8a(value));
return Metadata.decodeMetadata(hexToU8a(value));
} else if (isU8a(value)) {
// HACK 13 Oct 2018 - For current running BBQ nodes, Metadata is not properly
// encoded, it does not have a length prefix. For latest substrate master, it
+3
View File
@@ -2,6 +2,9 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
// NOTE When adding any types here, we need to update the coumentation links as
// well - <root>/docs/SUMMARY.md as well as ../README.md
// NOTE We are not re-exporting the index.ts from codec here. The reasoning being
// that these should be enough to actually _use_ the codec, i.e. from a api-user
// perspective these are the value classes. (Codec is for the cases where you need