Add documentation and examples (#145)
* Add documentation * Justification u8a decoding and json encoding (#146) * Decode Justifications * Json encoding for justifications * Bump deps * Allow extrinsic length encoding to operate on u8a[] (#148) * Fix config and move generated doc to a subfolder * Cleanup extrinsic encoding (#150) * Cleanup extrinsic encoding * Removed now-defunct type * Add uncheckedLength encoding * Add examples * Ignore package-lock since we use yarn * Cleanup examples * Add gitbook config and some base files for the doc * Do not make full doc mandatory for now * Add contributing guide, polish doc and samples * Update the deps of all samples and add yarn scripts Fix and regenerate the doc * Fix Contributing guide
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
|
||||
[](https://polkadot.js.org)  [](https://github.com/Flet/semistandard) [](https://www.npmjs.com/package/@polkadot/storage) [](https://travis-ci.org/polkadot-js/api) [](https://codeclimate.com/github/polkadot-js/api/maintainability) [](https://coveralls.io/github/polkadot-js/api?branch=master) [](https://david-dm.org/polkadot-js/api?path=packages/type-storage) [](https://david-dm.org/polkadot-js/api?path=packages/type-storage#info=devDependencies)
|
||||
|
||||
@polkadot/storage
|
||||
=================
|
||||
|
||||
An base interface to the storage layer
|
||||
|
||||
## Index
|
||||
|
||||
### Type aliases
|
||||
|
||||
* [Keygen](#keygen)
|
||||
* [Storage$Key$Value](#storage_key_value)
|
||||
* [Storage$Sections](#storage_sections)
|
||||
* [Storages](#storages)
|
||||
|
||||
### Functions
|
||||
|
||||
* [bindKey](#bindkey)
|
||||
* [formatParams](#formatparams)
|
||||
|
||||
---
|
||||
|
||||
## Type aliases
|
||||
|
||||
<a id="keygen"></a>
|
||||
|
||||
### Keygen
|
||||
|
||||
**Ƭ Keygen**: *`function`*
|
||||
|
||||
*Defined in [key/index.ts:14](https://github.com/chevdor/polkadot-js-api/blob/461228c/packages/type-storage/src/key/index.ts#L14)*
|
||||
|
||||
#### Type declaration
|
||||
▸(...keyParams: *`Array`<[Storage$Key$Value](#storage_key_value)>*): `Uint8Array`
|
||||
|
||||
**Parameters:**
|
||||
|
||||
| Param | Type |
|
||||
| ------ | ------ |
|
||||
| `Rest` keyParams | `Array`<[Storage$Key$Value](#storage_key_value)> |
|
||||
|
||||
**Returns:** `Uint8Array`
|
||||
|
||||
___
|
||||
<a id="storage_key_value"></a>
|
||||
|
||||
### Storage$Key$Value
|
||||
|
||||
**Ƭ Storage$Key$Value**: * `number` | `BN` | `Uint8Array` | `string`
|
||||
*
|
||||
|
||||
*Defined in [types.d.ts:8](https://github.com/chevdor/polkadot-js-api/blob/461228c/packages/type-storage/src/types.d.ts#L8)*
|
||||
|
||||
___
|
||||
<a id="storage_sections"></a>
|
||||
|
||||
### Storage$Sections
|
||||
|
||||
**Ƭ Storage$Sections**: *`keyof Storages`*
|
||||
|
||||
*Defined in [types.d.ts:23](https://github.com/chevdor/polkadot-js-api/blob/461228c/packages/type-storage/src/types.d.ts#L23)*
|
||||
|
||||
___
|
||||
<a id="storages"></a>
|
||||
|
||||
### Storages
|
||||
|
||||
**Ƭ Storages**: *`object`*
|
||||
|
||||
*Defined in [types.d.ts:10](https://github.com/chevdor/polkadot-js-api/blob/461228c/packages/type-storage/src/types.d.ts#L10)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
___
|
||||
|
||||
## Functions
|
||||
|
||||
<a id="bindkey"></a>
|
||||
|
||||
### bindKey
|
||||
|
||||
▸ **bindKey**<`T`>(__namedParameters: *`object`*): [Keygen](#keygen)
|
||||
|
||||
*Defined in [key/index.ts:16](https://github.com/chevdor/polkadot-js-api/blob/461228c/packages/type-storage/src/key/index.ts#L16)*
|
||||
|
||||
**Type parameters:**
|
||||
|
||||
#### T
|
||||
**Parameters:**
|
||||
|
||||
| Param | Type |
|
||||
| ------ | ------ |
|
||||
| __namedParameters | `object` |
|
||||
|
||||
**Returns:** [Keygen](#keygen)
|
||||
|
||||
___
|
||||
<a id="formatparams"></a>
|
||||
|
||||
### formatParams
|
||||
|
||||
▸ **formatParams**(params: *`Params`*, values?: *[Storage$Key$Value](#storage_key_value)[]*): `Array`<`Uint8Array`>
|
||||
|
||||
*Defined in [key/params.ts:15](https://github.com/chevdor/polkadot-js-api/blob/461228c/packages/type-storage/src/key/params.ts#L15)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
| Param | Type | Default value |
|
||||
| ------ | ------ | ------ |
|
||||
| params | `Params` | - |
|
||||
| `Default value` values | [Storage$Key$Value](#storage_key_value)[] | [] |
|
||||
|
||||
**Returns:** `Array`<`Uint8Array`>
|
||||
|
||||
___
|
||||
|
||||
Reference in New Issue
Block a user