Move types.d.ts -> types.ts (#421)
* Move types.d.ts -> types.ts * Bump common deps
This commit is contained in:
@@ -2,9 +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 { Observable } from 'rxjs';
|
||||
import { AccountId, Balance, BlockNumber, bool as Bool, Header, PropIndex, Proposal, ReferendumIndex, u32, VoteThreshold } from '@polkadot/types/index';
|
||||
import { Tuple } from '@polkadot/types/codec';
|
||||
import { AccountId, Balance, bool as Bool } from '@polkadot/types/index';
|
||||
|
||||
import ApiBase from './Base';
|
||||
import ApiCalls from './Calls';
|
||||
@@ -21,14 +19,14 @@ export type RxBalance = {
|
||||
votingBalance: Balance,
|
||||
stakingBalance: Balance,
|
||||
nominators?: Array<RxBalance>
|
||||
}
|
||||
};
|
||||
|
||||
export type RxFees = {
|
||||
baseFee: Balance,
|
||||
byteFee: Balance,
|
||||
creationFee: Balance,
|
||||
existentialDeposit: Balance,
|
||||
transferFee: Balance,
|
||||
transferFee: Balance
|
||||
};
|
||||
|
||||
export type RxReferendumVote = {
|
||||
@@ -39,4 +37,4 @@ export type RxReferendumVote = {
|
||||
|
||||
export type RxBalanceMap = {
|
||||
[index: string]: RxBalance
|
||||
}
|
||||
};
|
||||
@@ -7,10 +7,7 @@ import { ExtrinsicFunction } from '@polkadot/types/Method';
|
||||
import { StorageFunction } from '@polkadot/types/StorageKey';
|
||||
import { ApiBaseInterface } from '../types';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import Rpc from '@polkadot/rpc-core/index';
|
||||
import { Hash, RuntimeVersion } from '@polkadot/types/index';
|
||||
import RuntimeMetadata, { FunctionMetadata } from '@polkadot/types/Metadata';
|
||||
|
||||
import SubmittableExtrinsic from './SubmittableExtrinsic';
|
||||
|
||||
@@ -9,8 +9,6 @@ import { ApiBaseInterface } from '../types';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import RpcRx from '@polkadot/rpc-rx/index';
|
||||
import { Hash, RuntimeVersion } from '@polkadot/types/index';
|
||||
import RuntimeMetadata, { FunctionMetadata } from '@polkadot/types/Metadata';
|
||||
|
||||
import SubmittableExtrinsic from './SubmittableExtrinsic';
|
||||
|
||||
@@ -2,12 +2,9 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import RpcRx from '@polkadot/rpc-rx/index';
|
||||
import { RpcRxInterface$Events } from '@polkadot/rpc-rx/types';
|
||||
import { Hash, RuntimeVersion } from '@polkadot/types/index';
|
||||
import RuntimeMetadata, { FunctionMetadata } from '@polkadot/types/Metadata';
|
||||
import { ExtrinsicFunction } from '@polkadot/types/Method';
|
||||
import { StorageFunction } from '@polkadot/types/StorageKey';
|
||||
import RuntimeMetadata from '@polkadot/types/Metadata';
|
||||
|
||||
export type ApiInterface$Events = RpcRxInterface$Events | 'ready';
|
||||
|
||||
@@ -17,7 +14,7 @@ export interface ApiBaseInterface<R, S, E> {
|
||||
readonly runtimeVersion: RuntimeVersion;
|
||||
readonly query: S;
|
||||
readonly rpc: R;
|
||||
readonly tx: E
|
||||
readonly tx: E;
|
||||
|
||||
on: (type: ApiInterface$Events, handler: (...args: Array<any>) => any) => void;
|
||||
}
|
||||
@@ -33,6 +33,6 @@
|
||||
"@polkadot/jsonrpc": "^0.32.10",
|
||||
"@polkadot/rpc-provider": "^0.32.10",
|
||||
"@polkadot/types": "^0.32.10",
|
||||
"@polkadot/util": "^0.33.5"
|
||||
"@polkadot/util": "^0.33.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import interfaces from '@polkadot/jsonrpc/index';
|
||||
|
||||
export interface RpcInterface$Section$Method {
|
||||
(...params: Array<any>): Promise<any>;
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.1.5",
|
||||
"@polkadot/keyring": "^0.33.5",
|
||||
"@polkadot/keyring": "^0.33.6",
|
||||
"@polkadot/storage": "^0.32.10",
|
||||
"@polkadot/util": "^0.33.5",
|
||||
"@polkadot/util-crypto": "^0.33.5",
|
||||
"@polkadot/util": "^0.33.6",
|
||||
"@polkadot/util-crypto": "^0.33.6",
|
||||
"@types/nock": "^9.3.0",
|
||||
"eventemitter3": "^3.1.0",
|
||||
"isomorphic-fetch": "^2.2.1",
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import EventEmitter from 'eventemitter3';
|
||||
import { Logger } from '@polkadot/util/types';
|
||||
|
||||
export type MockState$Subscription$Callback = (error: Error | null, value: any) => void;
|
||||
|
||||
export type MockState$Subscriptions = {
|
||||
@@ -42,9 +42,9 @@ export type ProviderInterface$Emitted = 'connected' | 'disconnected';
|
||||
export type ProviderInterface$EmitCb = (value?: any) => any;
|
||||
|
||||
export interface ProviderInterface {
|
||||
isConnected (): boolean,
|
||||
on (type: ProviderInterface$Emitted, sub: ProviderInterface$EmitCb): void,
|
||||
send (method: string, params: Array<any>): Promise<any>,
|
||||
subscribe (type: string, method: string, params: Array<any>, cb: ProviderInterface$Callback): Promise<number>,
|
||||
unsubscribe (type: string, method: string, id: number): Promise<boolean>
|
||||
isConnected (): boolean;
|
||||
on (type: ProviderInterface$Emitted, sub: ProviderInterface$EmitCb): void;
|
||||
send (method: string, params: Array<any>): Promise<any>;
|
||||
subscribe (type: string, method: string, params: Array<any>, cb: ProviderInterface$Callback): Promise<number>;
|
||||
unsubscribe (type: string, method: string, id: number): Promise<boolean>;
|
||||
}
|
||||
@@ -20,4 +20,4 @@ export type RpcRxInterface = {
|
||||
|
||||
isConnected: () => Observable<boolean>
|
||||
on: (type: RpcRxInterface$Events, handler: (...args: Array<any>) => any) => void;
|
||||
}
|
||||
};
|
||||
@@ -12,6 +12,6 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.1.5",
|
||||
"@polkadot/types": "^0.32.10",
|
||||
"@polkadot/util": "^0.33.5"
|
||||
"@polkadot/util": "^0.33.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-storage#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.1.5",
|
||||
"@polkadot/keyring": "^0.33.5",
|
||||
"@polkadot/keyring": "^0.33.6",
|
||||
"@polkadot/types": "^0.32.10",
|
||||
"@polkadot/util": "^0.33.5",
|
||||
"@polkadot/util-crypto": "^0.33.5"
|
||||
"@polkadot/util": "^0.33.6",
|
||||
"@polkadot/util-crypto": "^0.33.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
import { StorageFunction } from '@polkadot/types/StorageKey';
|
||||
|
||||
import BN from 'bn.js';
|
||||
import * as substrate from './substrate';
|
||||
|
||||
type Substrate = keyof typeof substrate;
|
||||
@@ -30,7 +30,7 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.1.5",
|
||||
"@polkadot/keyring": "^0.33.5",
|
||||
"@polkadot/util": "^0.33.5"
|
||||
"@polkadot/keyring": "^0.33.6",
|
||||
"@polkadot/util": "^0.33.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,13 +15,13 @@ export type AnyU8a = Uint8Array | Array<number> | string;
|
||||
|
||||
export interface Codec {
|
||||
encodedLength: number;
|
||||
toHex(): string
|
||||
toJSON(): any;
|
||||
toString(): string;
|
||||
toU8a(isBare?: boolean): Uint8Array;
|
||||
toHex (): string;
|
||||
toJSON (): any;
|
||||
toString (): string;
|
||||
toU8a (isBare?: boolean): Uint8Array;
|
||||
}
|
||||
|
||||
export type CodecTo = 'toHex' | 'toJSON' | 'toString' | 'toU8a'
|
||||
export type CodecTo = 'toHex' | 'toJSON' | 'toString' | 'toU8a';
|
||||
|
||||
export type CodecTypes = keyof typeof Classes;
|
||||
|
||||
@@ -1348,14 +1348,14 @@
|
||||
typedoc-plugin-markdown "^1.1.19"
|
||||
typescript "^3.1.6"
|
||||
|
||||
"@polkadot/keyring@^0.33.5":
|
||||
version "0.33.5"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-0.33.5.tgz#3b797470f7f2c7bffda397238c5211c74be35684"
|
||||
integrity sha512-17feezWuRP4XXJ7Z4xB3zwS/3csXxDAo63OwYlnoZHS8uaoXyXofrQ+iuTYJvJAi0p8XmnmXFVkq5I6SKsY23w==
|
||||
"@polkadot/keyring@^0.33.6":
|
||||
version "0.33.6"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-0.33.6.tgz#f15976d42c1e81c04911eb17f812a5a65105d4e0"
|
||||
integrity sha512-EG/lzemE8hbKATFcm0gecCxqwoEU7F+gqQjfYDLI5q4ZX4EoJyrMAg34achik3OXZTiLSlSo2/7UomRPxhEbGw==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.1.5"
|
||||
"@polkadot/util" "^0.33.5"
|
||||
"@polkadot/util-crypto" "^0.33.5"
|
||||
"@polkadot/util" "^0.33.6"
|
||||
"@polkadot/util-crypto" "^0.33.6"
|
||||
"@types/bs58" "^3.0.30"
|
||||
bs58 "^4.0.1"
|
||||
|
||||
@@ -1364,13 +1364,13 @@
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.39.tgz#39d3578eaafd96cbc0270b1479fabab7e16e5723"
|
||||
integrity sha512-NQM1uT+qi8onV0jtGjH7QmJvDTNFNYTEzjaoVZN2tDHi1/tVu1CP66qZGSGsS19JZJSK3ERSFb0vP8CkE7EUuA==
|
||||
|
||||
"@polkadot/util-crypto@^0.33.5":
|
||||
version "0.33.5"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.33.5.tgz#b9049dd1d4a5bde65192068ecf49f84a8a39da0f"
|
||||
integrity sha512-3fy2fPtDeQybqMeOPY0kz4WhNKS1EoGKe4JoQiTmwLQNVZZ18Ry8eBTjbgMC0Lq2EtB9wZISXSQvbK/Bcd6B9A==
|
||||
"@polkadot/util-crypto@^0.33.6":
|
||||
version "0.33.6"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.33.6.tgz#42d5b54b929293abb886deefe67e9e8313c5c276"
|
||||
integrity sha512-lHU0Jz0nmEdR3mfBLgX2eHjiyJTmV2R379BH5dtJfvmj5auXq+Auxjs1u2qVqlsA6MCM6KaEZ3JDBPljQwC3fg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.1.5"
|
||||
"@polkadot/util" "^0.33.5"
|
||||
"@polkadot/util" "^0.33.6"
|
||||
"@types/bip39" "^2.4.0"
|
||||
bip39 "^2.5.0"
|
||||
blakejs "^1.1.0"
|
||||
@@ -1378,10 +1378,10 @@
|
||||
tweetnacl "^1.0.0"
|
||||
xxhashjs "^0.2.2"
|
||||
|
||||
"@polkadot/util@^0.33.5":
|
||||
version "0.33.5"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.33.5.tgz#af2f2980e5d6cba73550861b16f959623961826a"
|
||||
integrity sha512-61u7Z0fnmNPZyQlOObizuwN2pdIhxEryS9frDg8V0+fmktHGktqKlJBjeu2ldbQz/YM4k7VD6I7TgmfNKUcv1A==
|
||||
"@polkadot/util@^0.33.6":
|
||||
version "0.33.6"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.33.6.tgz#ffab3346892ce1b8f657ba6c9aa6902eded64a1c"
|
||||
integrity sha512-dm3kHloH50ASB0n7q9wyawE/tzFnEBYfPRtb2PNstCZ8xJ28pT5VS36UYgjWI6WkkozKz+v8gqYf2qsk9uxz5A==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.1.5"
|
||||
"@types/bn.js" "^4.11.3"
|
||||
|
||||
Reference in New Issue
Block a user