Rename srml to interfaces (#1198)

* Rename srml to interfaces

* newline, package.json
This commit is contained in:
Jaco Greeff
2019-07-26 12:08:17 +02:00
committed by GitHub
parent a0d7a52a5c
commit 2a37b8746d
129 changed files with 183 additions and 124 deletions
+3 -3
View File
@@ -3,7 +3,7 @@
// of the Apache-2.0 license. See the LICENSE file for details.
import { ProviderInterface } from '@polkadot/rpc-provider/types';
import { Hash, RuntimeVersion, SignedBlock } from '@polkadot/types/srml/types';
import { Hash, RuntimeVersion, SignedBlock } from '@polkadot/types/interfaces';
import { AnyFunction, Codec, CodecArg, RegistryTypes } from '@polkadot/types/types';
import {
ApiInterfaceRx, ApiInterfaceEvents, ApiOptions, ApiTypes, DecorateMethodOptions,
@@ -27,7 +27,7 @@ import { Event, getTypeRegistry, Metadata, Method, Null, u64 } from '@polkadot/t
import Linkage, { LinkageResult } from '@polkadot/types/codec/Linkage';
import { DEFAULT_VERSION as EXTRINSIC_DEFAULT_VERSION } from '@polkadot/types/primitive/Extrinsic/constants';
import { MethodFunction, ModulesWithMethods } from '@polkadot/types/primitive/Method';
import * as srmlTypes from '@polkadot/types/srml/definitions';
import * as interfacesTypes from '@polkadot/types/interfaces/definitions';
import { StorageEntry } from '@polkadot/types/primitive/StorageKey';
import { assert, compactStripLength, isFunction, isObject, isUndefined, logger, u8aToHex } from '@polkadot/util';
import { cryptoWaitReady } from '@polkadot/util-crypto';
@@ -143,7 +143,7 @@ export default abstract class ApiBase<ApiType> {
// we only re-register the types (global) if this is not a cloned instance
if (!options.source) {
// first register the definitions we have, i.e. those where there are no type classes
Object.values(srmlTypes).forEach(({ types }): void =>
Object.values(interfacesTypes).forEach(({ types }): void =>
this.registerTypes(types)
);
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { Balance, BlockNumber, Hash, Index } from '@polkadot/types/srml/types';
import { Balance, BlockNumber, Hash, Index } from '@polkadot/types/interfaces';
import { SignerPayload as ISignerPayload } from './types';
import { Address, ClassOf, Compact, ExtrinsicEra, Struct, u8, Method } from '@polkadot/types';
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { ExtrinsicStatus, EventRecord, Hash, Index, SignedBlock } from '@polkadot/types/srml/types';
import { ExtrinsicStatus, EventRecord, Hash, Index, SignedBlock } from '@polkadot/types/interfaces';
import { AnyNumber, AnyU8a, Callback, Codec, IExtrinsic, IExtrinsicEra, IKeyringPair, SignatureOptions } from '@polkadot/types/types';
import { ApiInterfaceRx, ApiTypes } from './types';
+1 -1
View File
@@ -4,7 +4,7 @@
// Simple non-runnable checks to test type definitions in the editor itself
import { Index } from '@polkadot/types/srml/types';
import { Index } from '@polkadot/types/interfaces';
import { ApiPromise } from '@polkadot/api';
import { HeaderExtended } from '@polkadot/api-derive';
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { Hash, RuntimeVersion } from '@polkadot/types/srml/types';
import { Hash, RuntimeVersion } from '@polkadot/types/interfaces';
import { AnyFunction, Callback, Codec, CodecArg, IExtrinsic, RegistryTypes, SignatureOptions } from '@polkadot/types/types';
import BN from 'bn.js';
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { EventRecord, SignedBlock } from '@polkadot/types/srml/types';
import { EventRecord, SignedBlock } from '@polkadot/types/interfaces';
import { U8a } from '@polkadot/types';
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { BlockNumber } from '@polkadot/types/srml/types';
import { BlockNumber } from '@polkadot/types/interfaces';
import BN from 'bn.js';
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { SignedBlock } from '@polkadot/types/srml/types';
import { SignedBlock } from '@polkadot/types/interfaces';
import WsProvider from '@polkadot/rpc-provider/ws';
import { Extrinsic } from '@polkadot/types';
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { EventRecord } from '@polkadot/types/srml/types';
import { EventRecord } from '@polkadot/types/interfaces';
import WsProvider from '@polkadot/rpc-provider/ws';
import { AccountId, ClassOf, Header, Option, Vec } from '@polkadot/types';
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { Hash } from '@polkadot/types/srml/types';
import { Hash } from '@polkadot/types/interfaces';
import fs from 'fs';
import path from 'path';
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { Balance, Index } from '@polkadot/types/srml/types';
import { Balance, Index } from '@polkadot/types/interfaces';
import BN from 'bn.js';
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { EventRecord, Hash, SessionIndex } from '@polkadot/types/srml/types';
import { EventRecord, Hash, SessionIndex } from '@polkadot/types/interfaces';
import { HeaderExtended } from '@polkadot/api-derive';
import WsProvider from '@polkadot/rpc-provider/ws';
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { EventRecord, Hash, Index, SignedBlock } from '@polkadot/types/srml/types';
import { EventRecord, Hash, Index, SignedBlock } from '@polkadot/types/interfaces';
import Keyring from '@polkadot/keyring';
import testingPairs from '@polkadot/keyring/testingPairs';
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { Balance } from '@polkadot/types/srml/types';
import { Balance } from '@polkadot/types/interfaces';
import BN from 'bn.js';
import { Observable } from 'rxjs';
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { Index } from '@polkadot/types/srml/types';
import { Index } from '@polkadot/types/interfaces';
import { Observable } from 'rxjs';
import { first, switchMap } from 'rxjs/operators';
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { SignedBlock, StorageChangeSet } from '@polkadot/types/srml/types';
import { SignedBlock, StorageChangeSet } from '@polkadot/types/interfaces';
import storage from '@polkadot/api-metadata/storage/static';
import WsProvider from '@polkadot/rpc-provider/ws';
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { ChainProperties } from '@polkadot/types/srml/types';
import { ChainProperties } from '@polkadot/types/interfaces';
import { ClassOf, Extrinsic, Vec } from '@polkadot/types';
import WsProvider from '@polkadot/rpc-provider/ws';
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { RuntimeVersion } from '@polkadot/types/srml/types';
import { RuntimeVersion } from '@polkadot/types/interfaces';
import { ClassOf, Header } from '@polkadot/types';
import WsProvider from '@polkadot/rpc-provider/ws';
+1 -1
View File
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { Balance, Hash, StorageData } from '@polkadot/types/srml/types';
import { Balance, Hash, StorageData } from '@polkadot/types/interfaces';
import fs from 'fs';
import path from 'path';
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { StorageChangeSet } from '@polkadot/types/srml/types';
import { StorageChangeSet } from '@polkadot/types/interfaces';
import WsProvider from '@polkadot/rpc-provider/ws';
import storage from '@polkadot/api-metadata/storage/static';