Re-add StorageData from 0.82.0-beta.96 (not an alias) (#1240)
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
// This software may be modified and distributed under the terms
|
// This software may be modified and distributed under the terms
|
||||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||||
|
|
||||||
import { Balance, Hash, Moment, StorageData } from '@polkadot/types/interfaces';
|
import { Balance, Hash, Moment } from '@polkadot/types/interfaces';
|
||||||
|
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
@@ -15,7 +15,7 @@ import testingPairs from '@polkadot/keyring/testingPairs';
|
|||||||
import { KeyringPair } from '@polkadot/keyring/types';
|
import { KeyringPair } from '@polkadot/keyring/types';
|
||||||
import Rpc from '@polkadot/rpc-core';
|
import Rpc from '@polkadot/rpc-core';
|
||||||
import WsProvider from '@polkadot/rpc-provider/ws';
|
import WsProvider from '@polkadot/rpc-provider/ws';
|
||||||
import { Bytes, Metadata, StorageKey } from '@polkadot/types';
|
import { Bytes, Metadata, StorageData, StorageKey } from '@polkadot/types';
|
||||||
|
|
||||||
import flipperAbi from '../../../../api-contract/test/contracts/flipper.json';
|
import flipperAbi from '../../../../api-contract/test/contracts/flipper.json';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import { ProviderInterface } from '@polkadot/rpc-provider/types';
|
import { ProviderInterface } from '@polkadot/rpc-provider/types';
|
||||||
import { RpcSection, RpcMethod } from '@polkadot/jsonrpc/types';
|
import { RpcSection, RpcMethod } from '@polkadot/jsonrpc/types';
|
||||||
import { StorageChangeSet, StorageData } from '@polkadot/types/interfaces';
|
import { StorageChangeSet } from '@polkadot/types/interfaces';
|
||||||
import { AnyJson, Codec } from '@polkadot/types/types';
|
import { AnyJson, Codec } from '@polkadot/types/types';
|
||||||
import { RpcInterface, RpcInterfaceMethod, RpcInterfaceSection } from './types';
|
import { RpcInterface, RpcInterfaceMethod, RpcInterfaceSection } from './types';
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ import memoizee from 'memoizee';
|
|||||||
import { combineLatest, from, Observable, Observer, of, throwError } from 'rxjs';
|
import { combineLatest, from, Observable, Observer, of, throwError } from 'rxjs';
|
||||||
import { catchError, map, publishReplay, refCount, switchMap } from 'rxjs/operators';
|
import { catchError, map, publishReplay, refCount, switchMap } from 'rxjs/operators';
|
||||||
import interfaces from '@polkadot/jsonrpc';
|
import interfaces from '@polkadot/jsonrpc';
|
||||||
import { ClassOf, Option, StorageKey, Vec, createClass } from '@polkadot/types';
|
import { ClassOf, Option, StorageData, StorageKey, Vec, createClass } from '@polkadot/types';
|
||||||
import { createTypeUnsafe } from '@polkadot/types/codec/createType';
|
import { createTypeUnsafe } from '@polkadot/types/codec/createType';
|
||||||
import { ExtError, assert, isFunction, isNull, isNumber, logger } from '@polkadot/util';
|
import { ExtError, assert, isFunction, isNull, isNumber, logger } from '@polkadot/util';
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||||
|
|
||||||
import { Compact, Option, Vec } from './codec';
|
import { Compact, Option, Vec } from './codec';
|
||||||
import { Bytes, Data, Fixed64, H160, H256, H512, Null, StorageHasher, StorageKey, Text, Type, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from './primitive';
|
import { Bytes, Data, Fixed64, H160, H256, H512, Null, StorageData, StorageHasher, StorageKey, Text, Type, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from './primitive';
|
||||||
import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, Consensus, ConsensusEngineId, Digest, DigestItem, Ed25519Signature, Extrinsic, ExtrinsicEra, ExtrinsicPayload, Hash, Header, ImmortalEra, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, Moment, MortalEra, Origin, Perbill, Permill, Phantom, PreRuntime, Seal, SealV0, Signature, SignedBlock, Sr25519Signature, StorageData, ValidatorId, Weight, WeightMultiplier } from './interfaces/runtime';
|
import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, Consensus, ConsensusEngineId, Digest, DigestItem, Ed25519Signature, Extrinsic, ExtrinsicEra, ExtrinsicPayload, Hash, Header, ImmortalEra, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, Moment, MortalEra, Origin, Perbill, Permill, Phantom, PreRuntime, Seal, SealV0, Signature, SignedBlock, Sr25519Signature, ValidatorId, Weight, WeightMultiplier } from './interfaces/runtime';
|
||||||
import { AuthorityId } from './interfaces/consensus';
|
import { AuthorityId } from './interfaces/consensus';
|
||||||
import { Keys, SessionIndex } from './interfaces/session';
|
import { Keys, SessionIndex } from './interfaces/session';
|
||||||
import { AuthorityWeight, NextAuthority, PendingPause, PendingResume, StoredPendingChange, StoredState } from './interfaces/grandpa';
|
import { AuthorityWeight, NextAuthority, PendingPause, PendingResume, StoredPendingChange, StoredState } from './interfaces/grandpa';
|
||||||
@@ -65,6 +65,9 @@ export interface InterfaceRegistry {
|
|||||||
Null: Null;
|
Null: Null;
|
||||||
'Option<Null>': Option<Null>;
|
'Option<Null>': Option<Null>;
|
||||||
'Vec<Null>': Vec<Null>;
|
'Vec<Null>': Vec<Null>;
|
||||||
|
StorageData: StorageData;
|
||||||
|
'Option<StorageData>': Option<StorageData>;
|
||||||
|
'Vec<StorageData>': Vec<StorageData>;
|
||||||
StorageHasher: StorageHasher;
|
StorageHasher: StorageHasher;
|
||||||
'Option<StorageHasher>': Option<StorageHasher>;
|
'Option<StorageHasher>': Option<StorageHasher>;
|
||||||
'Vec<StorageHasher>': Vec<StorageHasher>;
|
'Vec<StorageHasher>': Vec<StorageHasher>;
|
||||||
@@ -172,9 +175,6 @@ export interface InterfaceRegistry {
|
|||||||
WeightMultiplier: WeightMultiplier;
|
WeightMultiplier: WeightMultiplier;
|
||||||
'Option<WeightMultiplier>': Option<WeightMultiplier>;
|
'Option<WeightMultiplier>': Option<WeightMultiplier>;
|
||||||
'Vec<WeightMultiplier>': Vec<WeightMultiplier>;
|
'Vec<WeightMultiplier>': Vec<WeightMultiplier>;
|
||||||
StorageData: StorageData;
|
|
||||||
'Option<StorageData>': Option<StorageData>;
|
|
||||||
'Vec<StorageData>': Vec<StorageData>;
|
|
||||||
KeyValue: KeyValue;
|
KeyValue: KeyValue;
|
||||||
'Option<KeyValue>': Option<KeyValue>;
|
'Option<KeyValue>': Option<KeyValue>;
|
||||||
'Vec<KeyValue>': Vec<KeyValue>;
|
'Vec<KeyValue>': Vec<KeyValue>;
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
import { Codec } from '../../types';
|
import { Codec } from '../../types';
|
||||||
import { Enum, Option, Struct, Vec } from '../../codec';
|
import { Enum, Option, Struct, Vec } from '../../codec';
|
||||||
import { Bytes, StorageKey, Text, bool, u32, u64, u8 } from '../../primitive';
|
import { Bytes, StorageData, StorageKey, Text, bool, u32, u64, u8 } from '../../primitive';
|
||||||
import { BlockNumber, Hash, StorageData } from '../runtime';
|
import { BlockNumber, Hash } from '../runtime';
|
||||||
|
|
||||||
/** Vec<u8> */
|
/** Vec<u8> */
|
||||||
export type ApiId = Vec<u8>;
|
export type ApiId = Vec<u8>;
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ export default {
|
|||||||
WeightMultiplier: 'Fixed64',
|
WeightMultiplier: 'Fixed64',
|
||||||
|
|
||||||
// storage helpers
|
// storage helpers
|
||||||
StorageData: 'Bytes',
|
|
||||||
KeyValue: '(StorageKey, StorageData)',
|
KeyValue: '(StorageKey, StorageData)',
|
||||||
|
|
||||||
// signatures (used in block & extrinsics)
|
// signatures (used in block & extrinsics)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { Codec } from '../../types';
|
import { Codec } from '../../types';
|
||||||
import { Compact, Struct, Vec } from '../../codec';
|
import { Compact, Struct, Vec } from '../../codec';
|
||||||
import { Bytes, Fixed64, GenericAccountId, GenericAccountIndex, GenericAddress, GenericBlock, GenericCall, GenericConsensusEngineId, GenericDigest, GenericDigestItem, GenericExtrinsic, GenericExtrinsicEra, GenericExtrinsicPayload, GenericImmortalEra, GenericMortalEra, GenericOrigin, H256, H512, Null, StorageKey, u128, u32, u64, u8 } from '../../primitive';
|
import { Bytes, Fixed64, GenericAccountId, GenericAccountIndex, GenericAddress, GenericBlock, GenericCall, GenericConsensusEngineId, GenericDigest, GenericDigestItem, GenericExtrinsic, GenericExtrinsicEra, GenericExtrinsicPayload, GenericImmortalEra, GenericMortalEra, GenericOrigin, H256, H512, Null, StorageData, StorageKey, u128, u32, u64, u8 } from '../../primitive';
|
||||||
|
|
||||||
/** GenericAccountId */
|
/** GenericAccountId */
|
||||||
export type AccountId = GenericAccountId;
|
export type AccountId = GenericAccountId;
|
||||||
@@ -134,9 +134,6 @@ export interface SignedBlock extends Struct {
|
|||||||
/** Signature */
|
/** Signature */
|
||||||
export type Sr25519Signature = Signature;
|
export type Sr25519Signature = Signature;
|
||||||
|
|
||||||
/** Bytes */
|
|
||||||
export type StorageData = Bytes;
|
|
||||||
|
|
||||||
/** AccountId */
|
/** AccountId */
|
||||||
export type ValidatorId = AccountId;
|
export type ValidatorId = AccountId;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
// Copyright 2017-2019 @polkadot/types authors & contributors
|
||||||
|
// This software may be modified and distributed under the terms
|
||||||
|
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||||
|
|
||||||
|
import Bytes from './Bytes';
|
||||||
|
|
||||||
|
// NOTE Seperate class so StorageData !== Bytes, but rather an extension of it.
|
||||||
|
// Alternatively the construction check in Bytes will yield false positives for
|
||||||
|
// eg. StorageKey (which extends Bytes)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name StorageData
|
||||||
|
* @description
|
||||||
|
* Data retrieved via Storage queries and data for key-value pairs
|
||||||
|
*/
|
||||||
|
export default class StorageData extends Bytes {
|
||||||
|
}
|
||||||
@@ -26,6 +26,7 @@ export { default as Fixed64 } from './I64Fixed';
|
|||||||
export { default as i128 } from './I128';
|
export { default as i128 } from './I128';
|
||||||
export { default as i256 } from './I256';
|
export { default as i256 } from './I256';
|
||||||
export { default as Null } from './Null';
|
export { default as Null } from './Null';
|
||||||
|
export { default as StorageData } from './StorageData';
|
||||||
export { default as StorageHasher } from './StorageHasher';
|
export { default as StorageHasher } from './StorageHasher';
|
||||||
export { default as StorageKey } from './StorageKey';
|
export { default as StorageKey } from './StorageKey';
|
||||||
export { default as Text } from './Text';
|
export { default as Text } from './Text';
|
||||||
|
|||||||
Reference in New Issue
Block a user