import type BN (as applicable) (#2262)

This commit is contained in:
Jaco Greeff
2020-05-11 14:45:14 +02:00
committed by GitHub
parent 4f5cb0f35e
commit 8491ab8ca6
18 changed files with 78 additions and 79 deletions
+1 -1
View File
@@ -30,7 +30,7 @@
"@polkadot/api": "1.14.0-beta.6",
"@polkadot/rpc-core": "1.14.0-beta.6",
"@polkadot/types": "1.14.0-beta.6",
"@polkadot/util": "^2.10.0-beta.3",
"@polkadot/util": "^2.10.0-beta.5",
"bn.js": "^5.1.1",
"rxjs": "^6.5.5"
}
+3 -3
View File
@@ -32,13 +32,13 @@
"@polkadot/rpc-core": "1.14.0-beta.6",
"@polkadot/rpc-provider": "1.14.0-beta.6",
"@polkadot/types": "1.14.0-beta.6",
"@polkadot/util": "^2.10.0-beta.3",
"@polkadot/util-crypto": "^2.10.0-beta.3",
"@polkadot/util": "^2.10.0-beta.5",
"@polkadot/util-crypto": "^2.10.0-beta.5",
"bn.js": "^5.1.1",
"memoizee": "^0.4.14",
"rxjs": "^6.5.5"
},
"devDependencies": {
"@polkadot/keyring": "^2.10.0-beta.3"
"@polkadot/keyring": "^2.10.0-beta.5"
}
}
+1 -1
View File
@@ -2,9 +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 type BN from 'bn.js';
import { AccountId, Balance, BlockNumber, Hash, Proposal, PropIndex, ReferendumInfoTo239, ReferendumStatus, Vote, ReferendumIndex, VoteThreshold } from '@polkadot/types/interfaces';
import BN from 'bn.js';
import { Vec } from '@polkadot/types';
export interface DeriveDispatch {
+1 -2
View File
@@ -2,11 +2,10 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import type BN from 'bn.js';
import { AccountId, Balance, EraIndex, Exposure, Keys, RewardDestination, RewardPoint, StakingLedger, ValidatorPrefs } from '@polkadot/types/interfaces';
import { DeriveSessionIndexes } from '../session/types';
import BN from 'bn.js';
export type DeriveEraValPoints = Record<string, RewardPoint>;
export type DeriveEraValPrefs = Record<string, ValidatorPrefs>;
+1 -1
View File
@@ -2,9 +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 type BN from 'bn.js';
import { AccountId, Balance, BalanceLock, BalanceLockTo212, BalanceOf, Bid, BidKind, BlockNumber, Hash, Index, Proposal, ProposalIndex, SetIndex, SocietyVote, StrikeCount, TreasuryProposal, Votes, VoteIndex, VouchingStatus } from '@polkadot/types/interfaces';
import BN from 'bn.js';
import { u32 } from '@polkadot/types';
export * from './accounts/types';
+4 -4
View File
@@ -28,19 +28,19 @@
"dependencies": {
"@babel/runtime": "^7.9.6",
"@polkadot/api-derive": "1.14.0-beta.6",
"@polkadot/keyring": "^2.10.0-beta.3",
"@polkadot/keyring": "^2.10.0-beta.5",
"@polkadot/metadata": "1.14.0-beta.6",
"@polkadot/rpc-core": "1.14.0-beta.6",
"@polkadot/rpc-provider": "1.14.0-beta.6",
"@polkadot/types": "1.14.0-beta.6",
"@polkadot/types-known": "1.14.0-beta.6",
"@polkadot/util": "^2.10.0-beta.3",
"@polkadot/util-crypto": "^2.10.0-beta.3",
"@polkadot/util": "^2.10.0-beta.5",
"@polkadot/util-crypto": "^2.10.0-beta.5",
"bn.js": "^5.1.1",
"eventemitter3": "^4.0.1",
"rxjs": "^6.5.5"
},
"devDependencies": {
"@polkadot/keyring": "^2.10.0-beta.3"
"@polkadot/keyring": "^2.10.0-beta.5"
}
}
+3 -3
View File
@@ -29,11 +29,11 @@
"@babel/runtime": "^7.9.6",
"@polkadot/types": "1.14.0-beta.6",
"@polkadot/types-known": "1.14.0-beta.6",
"@polkadot/util": "^2.10.0-beta.3",
"@polkadot/util-crypto": "^2.10.0-beta.3",
"@polkadot/util": "^2.10.0-beta.5",
"@polkadot/util-crypto": "^2.10.0-beta.5",
"bn.js": "^5.1.1"
},
"devDependencies": {
"@polkadot/keyring": "^2.10.0-beta.3"
"@polkadot/keyring": "^2.10.0-beta.5"
}
}
+2 -2
View File
@@ -30,11 +30,11 @@
"@polkadot/metadata": "1.14.0-beta.6",
"@polkadot/rpc-provider": "1.14.0-beta.6",
"@polkadot/types": "1.14.0-beta.6",
"@polkadot/util": "^2.10.0-beta.3",
"@polkadot/util": "^2.10.0-beta.5",
"memoizee": "^0.4.14",
"rxjs": "^6.5.5"
},
"devDependencies": {
"@polkadot/keyring": "^2.10.0-beta.3"
"@polkadot/keyring": "^2.10.0-beta.5"
}
}
+3 -3
View File
@@ -29,15 +29,15 @@
"@babel/runtime": "^7.9.6",
"@polkadot/metadata": "1.14.0-beta.6",
"@polkadot/types": "1.14.0-beta.6",
"@polkadot/util": "^2.10.0-beta.3",
"@polkadot/util-crypto": "^2.10.0-beta.3",
"@polkadot/util": "^2.10.0-beta.5",
"@polkadot/util-crypto": "^2.10.0-beta.5",
"bn.js": "^5.1.1",
"eventemitter3": "^4.0.1",
"isomorphic-fetch": "^2.2.1",
"websocket": "^1.0.31"
},
"devDependencies": {
"@polkadot/keyring": "^2.10.0-beta.3",
"@polkadot/keyring": "^2.10.0-beta.5",
"mock-socket": "^9.0.3",
"nock": "^12.0.3"
}
+1 -1
View File
@@ -40,7 +40,7 @@
"@polkadot/metadata": "1.14.0-beta.6",
"@polkadot/rpc-provider": "1.14.0-beta.6",
"@polkadot/types": "1.14.0-beta.6",
"@polkadot/util": "^2.10.0-beta.3",
"@polkadot/util": "^2.10.0-beta.5",
"handlebars": "^4.7.6",
"websocket": "^1.0.31",
"yargs": "^15.3.1"
+1 -1
View File
@@ -28,7 +28,7 @@
"dependencies": {
"@babel/runtime": "^7.9.6",
"@polkadot/types": "1.14.0-beta.6",
"@polkadot/util": "^2.10.0-beta.3",
"@polkadot/util": "^2.10.0-beta.5",
"bn.js": "^5.1.1"
},
"devDependencies": {
+2 -2
View File
@@ -2,9 +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 type BN from 'bn.js';
import { Registry, RegistryTypes, OverrideModuleType, OverrideVersionedType } from '@polkadot/types/types';
import BN from 'bn.js';
import { Text } from '@polkadot/types';
import { bnToBn, isUndefined } from '@polkadot/util';
@@ -48,7 +48,7 @@ export function getModuleTypes ({ knownTypes }: Registry, section: string): Over
/**
* @description Based on the chain and runtimeVersion, get the applicable types (ready for registration)
*/
export function getSpecTypes ({ knownTypes }: Registry, chainName: Text | string, specName: Text | string, specVersion: BN | number): RegistryTypes {
export function getSpecTypes ({ knownTypes }: Registry, chainName: Text | string, specName: Text | string, specVersion: BigInt | BN | number): RegistryTypes {
const _chainName = chainName.toString();
const _specName = specName.toString();
const _specVersion = bnToBn(specVersion).toNumber();
+3 -3
View File
@@ -28,15 +28,15 @@
"dependencies": {
"@babel/runtime": "^7.9.6",
"@polkadot/metadata": "1.14.0-beta.6",
"@polkadot/util": "^2.10.0-beta.3",
"@polkadot/util-crypto": "^2.10.0-beta.3",
"@polkadot/util": "^2.10.0-beta.5",
"@polkadot/util-crypto": "^2.10.0-beta.5",
"@types/bn.js": "^4.11.6",
"bn.js": "^5.1.1",
"memoizee": "^0.4.14",
"rxjs": "^6.5.5"
},
"devDependencies": {
"@polkadot/keyring": "^2.10.0-beta.3",
"@polkadot/keyring": "^2.10.0-beta.5",
"@types/memoizee": "^0.4.4"
}
}
+1 -2
View File
@@ -3,13 +3,12 @@
// of the Apache-2.0 license. See the LICENSE file for details.
/* eslint-disable @typescript-eslint/interface-name-prefix */
import type BN from 'bn.js';
import { SignOptions } from '@polkadot/keyring/types';
import { Hash } from '../interfaces/runtime';
import { FunctionMetadataLatest } from '../interfaces/metadata';
import { ArgsDef, Codec } from './codec';
import BN from 'bn.js';
export interface ICompact<T> extends Codec {
toBn (): BN;
toNumber (): number;
+2 -2
View File
@@ -2,13 +2,13 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import type BN from 'bn.js';
import { ChainProperties } from '../interfaces/system';
import { CallFunction } from './calls';
import { Codec, Constructor } from './codec';
import { AnyJson } from './helpers';
import BN from 'bn.js';
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface InterfaceTypes { }