Merge branch 'master' of github.com:polkadot-js/api

This commit is contained in:
Jaco Greeff
2019-01-08 13:39:45 +01:00
360 changed files with 2938 additions and 7683 deletions
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api",
"version": "0.37.8",
"version": "0.37.10",
"description": "An RxJS wrapper around the Polkadot JS RPC",
"main": "index.js",
"keywords": [
@@ -30,11 +30,11 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
"dependencies": {
"@babel/runtime": "^7.2.0",
"@polkadot/extrinsics": "^0.37.8",
"@polkadot/rpc-provider": "^0.37.8",
"@polkadot/rpc-rx": "^0.37.8",
"@polkadot/storage": "^0.37.8",
"@polkadot/types": "^0.37.8",
"@polkadot/extrinsics": "^0.37.10",
"@polkadot/rpc-provider": "^0.37.10",
"@polkadot/rpc-rx": "^0.37.10",
"@polkadot/storage": "^0.37.10",
"@polkadot/types": "^0.37.10",
"@types/rx": "^4.1.1",
"rxjs": "^6.3.3"
}
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-core",
"version": "0.37.8",
"version": "0.37.10",
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
"main": "index.js",
"keywords": [
@@ -30,9 +30,9 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
"dependencies": {
"@babel/runtime": "^7.2.0",
"@polkadot/jsonrpc": "^0.37.8",
"@polkadot/rpc-provider": "^0.37.8",
"@polkadot/types": "^0.37.8",
"@polkadot/jsonrpc": "^0.37.10",
"@polkadot/rpc-provider": "^0.37.10",
"@polkadot/types": "^0.37.10",
"@polkadot/util": "^0.33.30"
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-provider",
"version": "0.37.8",
"version": "0.37.10",
"description": "Transport providers for the API",
"main": "index.js",
"keywords": [
@@ -31,7 +31,7 @@
"dependencies": {
"@babel/runtime": "^7.2.0",
"@polkadot/keyring": "^0.33.30",
"@polkadot/storage": "^0.37.8",
"@polkadot/storage": "^0.37.10",
"@polkadot/util": "^0.33.30",
"@polkadot/util-crypto": "^0.33.30",
"@types/nock": "^9.3.0",
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-rx",
"version": "0.37.8",
"version": "0.37.10",
"description": "An RxJs wrapper around the Polkadot JS API",
"main": "index.js",
"keywords": [
@@ -30,8 +30,8 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-rx#readme",
"dependencies": {
"@babel/runtime": "^7.2.0",
"@polkadot/rpc-core": "^0.37.8",
"@polkadot/rpc-provider": "^0.37.8",
"@polkadot/rpc-core": "^0.37.10",
"@polkadot/rpc-provider": "^0.37.10",
"@types/rx": "^4.1.1",
"rxjs": "^6.3.3"
}
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/extrinsics",
"version": "0.37.8",
"version": "0.37.10",
"main": "index.js",
"repository": "https://github.com/polkadot-js/api.git",
"author": "Jaco Greeff <jacogr@gmail.com>",
@@ -11,7 +11,7 @@
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.2.0",
"@polkadot/types": "^0.37.8",
"@polkadot/types": "^0.37.10",
"@polkadot/util": "^0.33.30"
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/jsonrpc",
"version": "0.37.8",
"version": "0.37.10",
"description": "Method definitions for the Polkadot RPC layer",
"main": "index.js",
"engines": {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/storage",
"version": "0.37.8",
"version": "0.37.10",
"description": "Generic wrapper wrapper around state storage",
"main": "index.js",
"engines": {
@@ -31,7 +31,7 @@
"dependencies": {
"@babel/runtime": "^7.2.0",
"@polkadot/keyring": "^0.33.30",
"@polkadot/types": "^0.37.8",
"@polkadot/types": "^0.37.10",
"@polkadot/util": "^0.33.30",
"@polkadot/util-crypto": "^0.33.30"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types",
"version": "0.37.8",
"version": "0.37.10",
"description": "Implementation of the Parity codec",
"main": "index.js",
"keywords": [
+17 -10
View File
@@ -30,23 +30,30 @@ export default class Block extends Struct {
}
/**
* @description The [[Extrinsics]] conatined in the block
* @description Encodes a content [[Hash]] for the block
*/
get extrinsics (): Extrinsics {
return this.get('extrinsics') as Extrinsics;
}
/**
* @description Coinvenience getter, encoded the [[Hash]] for the block
*/
get hash (): Hash {
get contentHash (): Hash {
return new Hash(
blake2AsU8a(this.toU8a(), 256)
);
}
/**
* @description The [[Header]] in the block
* @description The [[Extrinsics]] contained in the block
*/
get extrinsics (): Extrinsics {
return this.get('extrinsics') as Extrinsics;
}
/**
* @description Block/header [[Hash]]
*/
get hash (): Hash {
return this.header.hash;
}
/**
* @description The [[Header]] of the block
*/
get header (): Header {
return this.get('header') as Header;
+8
View File
@@ -6,6 +6,7 @@ import { AnyU8a } from './types';
import Struct from './codec/Struct';
import Block, { BlockValue } from './Block';
import Hash from './Hash';
import Justification from './Justification';
type SignedBlockValue = {
@@ -33,6 +34,13 @@ export default class SignedBlock extends Struct {
return this.get('block') as Block;
}
/**
* @description Block/header [[Hash]]
*/
get hash (): Hash {
return this.block.hash;
}
/**
* @description The wrapped [[Justification]]
*/