Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09831fe325 | ||
|
|
c7dda6fe85 | ||
|
|
285bbab055 | ||
|
|
b73010a506 | ||
|
|
9c951fe1cb | ||
|
|
f7dfb633d6 | ||
|
|
e32286b610 | ||
|
|
fe2687b514 | ||
|
|
1adde99e1b | ||
|
|
33dcc9c8aa | ||
|
|
db563bc131 | ||
|
|
35d2fa31e0 | ||
|
|
399637280c | ||
|
|
f46916b215 | ||
|
|
94aa79d1e5 | ||
|
|
10dacf1d16 | ||
|
|
bdaacfdd56 | ||
|
|
4fa77b3654 | ||
|
|
400e14d6c9 | ||
|
|
09f247432f | ||
|
|
fd195dd4f0 | ||
|
|
0038227680 | ||
|
|
89dec0bc0b | ||
|
|
a55a835504 | ||
|
|
c1266a6657 | ||
|
|
b78f08e2e6 | ||
|
|
298ef03787 | ||
|
|
dd80b1873c | ||
|
|
f7672e053b | ||
|
|
281e9d2dee |
@@ -2,7 +2,7 @@ name: 'Lock Threads'
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '3 0/5 * * *'
|
||||
- cron: '30 1/2 * * *'
|
||||
|
||||
jobs:
|
||||
lock:
|
||||
|
||||
@@ -7,7 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
check:
|
||||
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.issue.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
|
||||
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: 'Close stale issues and PRs'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '2 2 * * *'
|
||||
- cron: '30 2/2 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
build
|
||||
coverage
|
||||
packages
|
||||
@@ -0,0 +1,4 @@
|
||||
// Copyright 2017-2021 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
module.exports = require('@polkadot/dev/config/prettier.cjs');
|
||||
@@ -1,5 +1,23 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 4.14.1 Jun 14, 2021
|
||||
|
||||
Upgrade priority: Low. Internal adjustment only, no major external usage changes.
|
||||
|
||||
Contributed:
|
||||
|
||||
- Adjust types for uniques (Thanks to https://github.com/hamidra)
|
||||
- Add `ValidationCodeHash` type (Thanks to https://github.com/andresilva)
|
||||
- Extend `OriginCaller` type creation (Thanks to https://github.com/xlc)
|
||||
|
||||
Changes:
|
||||
|
||||
- Do strict length checking on `[u8; <length>]` type inputs
|
||||
- Adjust keys/entries retrieval batch sizes
|
||||
- Add upgrade block for Kusama 9040
|
||||
- Use `BN` imports from `@polkadot/util`
|
||||
|
||||
|
||||
## 4.13.1 Jun 6, 2021
|
||||
|
||||
Upgrade priority: Medium. Required for users connecting to Statemine and future Kusama upgrades.
|
||||
|
||||
@@ -27,5 +27,6 @@ module.exports = {
|
||||
'<rootDir>/packages/types/build',
|
||||
'<rootDir>/packages/types-known/build'
|
||||
],
|
||||
testTimeout: 10000,
|
||||
transformIgnorePatterns: ['/node_modules/(?!@polkadot|@babel/runtime/helpers/esm/)']
|
||||
};
|
||||
|
||||
+6
-6
@@ -25,14 +25,14 @@
|
||||
"test:watch": "polkadot-dev-run-test --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.14.3",
|
||||
"@babel/register": "^7.13.16",
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/dev": "^0.62.38",
|
||||
"@polkadot/ts": "^0.3.86",
|
||||
"@babel/core": "^7.14.5",
|
||||
"@babel/register": "^7.14.5",
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/dev": "^0.62.42",
|
||||
"@polkadot/ts": "^0.3.90",
|
||||
"@polkadot/typegen": "workspace:packages/typegen",
|
||||
"@types/jest": "^26.0.23",
|
||||
"copyfiles": "^2.4.1"
|
||||
},
|
||||
"version": "4.13.1"
|
||||
"version": "4.14.1"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api-contract",
|
||||
"version": "4.13.1",
|
||||
"version": "4.14.1",
|
||||
"type": "module",
|
||||
"description": "Interfaces for interacting with contracts and contract ABIs",
|
||||
"main": "index.js",
|
||||
@@ -19,11 +19,10 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/api": "4.13.1",
|
||||
"@polkadot/types": "4.13.1",
|
||||
"@polkadot/util": "^6.7.1",
|
||||
"@polkadot/x-rxjs": "^6.7.1",
|
||||
"bn.js": "^4.11.9"
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/api": "4.14.1",
|
||||
"@polkadot/types": "4.14.1",
|
||||
"@polkadot/util": "^6.8.1",
|
||||
"@polkadot/x-rxjs": "^6.8.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,12 +9,10 @@ import type { AnyJson, CodecArg, ISubmittableResult } from '@polkadot/types/type
|
||||
import type { AbiMessage, ContractCallOutcome, ContractOptions, DecodedEvent } from '../types';
|
||||
import type { ContractCallResult, ContractCallSend, ContractQuery, ContractTx, MapMessageQuery, MapMessageTx } from './types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { SubmittableResult } from '@polkadot/api';
|
||||
import { ApiBase } from '@polkadot/api/base';
|
||||
import { createTypeUnsafe } from '@polkadot/types';
|
||||
import { assert, BN_HUNDRED, BN_ONE, BN_ZERO, bnToBn, isFunction, isUndefined, logger } from '@polkadot/util';
|
||||
import { assert, BN, BN_HUNDRED, BN_ONE, BN_ZERO, bnToBn, isFunction, isUndefined, logger } from '@polkadot/util';
|
||||
import { map } from '@polkadot/x-rxjs/operators';
|
||||
|
||||
import { Abi } from '../Abi';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
||||
import type { ApiTypes, ObsInnerType } from '@polkadot/api/types';
|
||||
import type { AccountId } from '@polkadot/types/interfaces';
|
||||
import type { CodecArg } from '@polkadot/types/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Observable } from '@polkadot/x-rxjs';
|
||||
import type { AbiMessage, BlueprintOptions, ContractCallOutcome, ContractOptions } from '../types';
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { SubmittableResult } from '@polkadot/api';
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
||||
import type { ApiTypes } from '@polkadot/api/types';
|
||||
import type { CodecArg } from '@polkadot/types/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { AbiConstructor, BlueprintOptions } from '../types';
|
||||
import type { BlueprintDeploy, ContractGeneric } from './types';
|
||||
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-contract', version: '4.13.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-contract', version: '4.14.1' };
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { ApiBase } from '@polkadot/api/base';
|
||||
import type { ApiTypes } from '@polkadot/api/types';
|
||||
import type { Text, u64 } from '@polkadot/types';
|
||||
import type { ContractExecResultResult, ContractSelector } from '@polkadot/types/interfaces';
|
||||
import type { Codec, CodecArg, TypeDef } from '@polkadot/types/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Abi } from '.';
|
||||
|
||||
export interface ContractBase<ApiType extends ApiTypes> {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2021 @polkadot/rpc-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { SubmittableResult } from '@polkadot/api';
|
||||
import type { EventRecord } from '@polkadot/types/interfaces';
|
||||
import type { CodecArg } from '@polkadot/types/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { BlueprintOptions, ContractOptions } from './types';
|
||||
|
||||
import { isBigInt, isBn, isNumber, isString } from '@polkadot/util';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api-derive",
|
||||
"version": "4.13.1",
|
||||
"version": "4.14.1",
|
||||
"type": "module",
|
||||
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
|
||||
"main": "index.js",
|
||||
@@ -19,17 +19,16 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/api": "4.13.1",
|
||||
"@polkadot/rpc-core": "4.13.1",
|
||||
"@polkadot/types": "4.13.1",
|
||||
"@polkadot/util": "^6.7.1",
|
||||
"@polkadot/util-crypto": "^6.7.1",
|
||||
"@polkadot/x-rxjs": "^6.7.1",
|
||||
"bn.js": "^4.11.9"
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/api": "4.14.1",
|
||||
"@polkadot/rpc-core": "4.14.1",
|
||||
"@polkadot/types": "4.14.1",
|
||||
"@polkadot/util": "^6.8.1",
|
||||
"@polkadot/util-crypto": "^6.8.1",
|
||||
"@polkadot/x-rxjs": "^6.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.7.1",
|
||||
"@polkadot/rpc-provider": "4.13.1"
|
||||
"@polkadot/keyring": "^6.8.1",
|
||||
"@polkadot/rpc-provider": "4.14.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,9 +7,7 @@ import type { AccountId, AccountIndex, Address, Balance, BalanceLock, BalanceLoc
|
||||
import type { Observable } from '@polkadot/x-rxjs';
|
||||
import type { DeriveBalancesAccount, DeriveBalancesAccountData, DeriveBalancesAll, DeriveBalancesAllAccountData } from '../types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { bnMax, isFunction } from '@polkadot/util';
|
||||
import { BN, bnMax, isFunction } from '@polkadot/util';
|
||||
import { combineLatest, of } from '@polkadot/x-rxjs';
|
||||
import { map, switchMap } from '@polkadot/x-rxjs/operators';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { ApiInterfaceRx } from '@polkadot/api/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Observable } from '@polkadot/x-rxjs';
|
||||
import type { DeriveContractFees } from '../types';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { ApiInterfaceRx } from '@polkadot/api/types';
|
||||
import type { Option } from '@polkadot/types';
|
||||
import type { AccountId, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, Vote, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Observable } from '@polkadot/x-rxjs';
|
||||
import type { DeriveDemocracyLock } from '../types';
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { ApiInterfaceRx } from '@polkadot/api/types';
|
||||
import type { ReferendumIndex } from '@polkadot/types/interfaces';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Observable } from '@polkadot/x-rxjs';
|
||||
|
||||
import { of } from '@polkadot/x-rxjs';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { ApiInterfaceRx } from '@polkadot/api/types';
|
||||
import type { Option, Vec } from '@polkadot/types';
|
||||
import type { AccountId, ReferendumInfo, ReferendumInfoTo239, Vote, Voting, VotingDelegating, VotingDirectVote } from '@polkadot/types/interfaces';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Observable } from '@polkadot/x-rxjs';
|
||||
import type { DeriveBalancesAccount, DeriveReferendum, DeriveReferendumVote, DeriveReferendumVotes } from '../types';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { ApiInterfaceRx } from '@polkadot/api/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Observable } from '@polkadot/x-rxjs';
|
||||
|
||||
import { bnSqrt } from '@polkadot/util';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { Vec } from '@polkadot/types';
|
||||
import type { AccountId, Balance, BlockNumber, Hash, PropIndex, Proposal, ReferendumIndex, ReferendumInfoTo239, ReferendumStatus, Vote, VoteThreshold } from '@polkadot/types/interfaces';
|
||||
import type { BN } from '@polkadot/util';
|
||||
|
||||
export interface DeriveDemocracyLock {
|
||||
balance: Balance;
|
||||
|
||||
@@ -7,9 +7,7 @@ import type { AccountId, Balance, BlockNumber, PreimageStatus, Proposal, Referen
|
||||
import type { ITuple } from '@polkadot/types/types';
|
||||
import type { DeriveProposalImage, DeriveReferendum, DeriveReferendumVote, DeriveReferendumVotes, DeriveReferendumVoteState } from '../types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { bnSqrt } from '@polkadot/util';
|
||||
import { BN, bnSqrt } from '@polkadot/util';
|
||||
|
||||
type PreimageInfo = [Bytes, AccountId, Balance, BlockNumber];
|
||||
type OldPreimage = ITuple<PreimageInfo>;
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-derive', version: '4.13.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-derive', version: '4.14.1' };
|
||||
|
||||
@@ -5,9 +5,7 @@ import type { ApiInterfaceRx } from '@polkadot/api/types';
|
||||
import type { Balance, StakingLedger, UnlockChunk } from '@polkadot/types/interfaces';
|
||||
import type { DeriveSessionInfo, DeriveStakingAccount, DeriveStakingKeys, DeriveStakingQuery, DeriveUnlocking } from '../types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { BN_ZERO } from '@polkadot/util';
|
||||
import { BN, BN_ZERO } from '@polkadot/util';
|
||||
import { combineLatest, Observable } from '@polkadot/x-rxjs';
|
||||
import { map, switchMap } from '@polkadot/x-rxjs/operators';
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { ApiInterfaceRx } from '@polkadot/api/types';
|
||||
import type { Option, u32 } from '@polkadot/types';
|
||||
import type { ActiveEraInfo, EraIndex } from '@polkadot/types/interfaces';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Observable } from '@polkadot/x-rxjs';
|
||||
|
||||
import { BN_ONE, BN_ZERO } from '@polkadot/util';
|
||||
import { map } from '@polkadot/x-rxjs/operators';
|
||||
|
||||
import { memo } from '../util';
|
||||
@@ -23,12 +24,12 @@ export function erasHistoric (instanceId: string, api: ApiInterfaceRx): (withAct
|
||||
const activeEra: BN = activeEraOpt.unwrapOrDefault().index;
|
||||
let lastEra = activeEra;
|
||||
|
||||
while (lastEra.gten(0) && (result.length < max)) {
|
||||
while (lastEra.gte(BN_ZERO) && (result.length < max)) {
|
||||
if ((lastEra !== activeEra) || (withActive === true)) {
|
||||
result.push(api.registry.createType('EraIndex', lastEra));
|
||||
}
|
||||
|
||||
lastEra = lastEra.subn(1);
|
||||
lastEra = lastEra.sub(BN_ONE);
|
||||
}
|
||||
|
||||
// go from oldest to newest
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { ApiInterfaceRx } from '@polkadot/api/types';
|
||||
import type { AccountId, EraIndex, StakingLedger } from '@polkadot/types/interfaces';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Observable } from '@polkadot/x-rxjs';
|
||||
import type { DeriveEraPoints, DeriveEraPrefs, DeriveEraRewards, DeriveEraValPrefs, DeriveStakerExposure, DeriveStakerReward, DeriveStakerRewardValidator } from '../types';
|
||||
import type { DeriveStakingQuery } from './types';
|
||||
@@ -164,17 +164,21 @@ export function _stakerRewards (instanceId: string, api: ApiInterfaceRx): (accou
|
||||
const [allValidators, stashValidators] = allUniqValidators(allRewards);
|
||||
|
||||
return api.derive.staking.queryMulti(allValidators, { withLedger: true }).pipe(
|
||||
map((queriedVals): DeriveStakerReward[][] => {
|
||||
return queries.map(({ stakingLedger }, index): DeriveStakerReward[] => {
|
||||
const rewards = allRewards[index];
|
||||
const ownValidators = stashValidators[index].map((validatorId): [string, DeriveStakingQuery] => [
|
||||
validatorId,
|
||||
queriedVals.find((q) => q.accountId.eq(validatorId)) as DeriveStakingQuery
|
||||
]);
|
||||
|
||||
return filterRewards(eras, ownValidators, { rewards, stakingLedger });
|
||||
});
|
||||
})
|
||||
map((queriedVals): DeriveStakerReward[][] =>
|
||||
queries.map(({ stakingLedger }, index): DeriveStakerReward[] =>
|
||||
filterRewards(
|
||||
eras,
|
||||
stashValidators[index].map((validatorId): [string, DeriveStakingQuery] => [
|
||||
validatorId,
|
||||
queriedVals.find((q) => q.accountId.eq(validatorId)) as DeriveStakingQuery
|
||||
]),
|
||||
{
|
||||
rewards: allRewards[index],
|
||||
stakingLedger
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
})
|
||||
)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { AccountId, Balance, EraIndex, Exposure, RewardDestination, RewardPoint, StakingLedger, ValidatorPrefs } from '@polkadot/types/interfaces';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { DeriveSessionIndexes } from '../session/types';
|
||||
|
||||
export type DeriveEraValPoints = Record<string, RewardPoint>;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import BN from 'bn.js';
|
||||
import { BN } from '@polkadot/util';
|
||||
|
||||
export const FALLBACK_MAX_HASH_COUNT = 250;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { u32 } from '@polkadot/types';
|
||||
import type { AccountId, Balance, BalanceLock, BalanceLockTo212, BalanceOf, Bid, BidKind, BlockNumber, Bounty, BountyIndex, Hash, Index, Proposal, ProposalIndex, SetIndex, SocietyVote, StrikeCount, TreasuryProposal, Votes, VouchingStatus } from '@polkadot/types/interfaces';
|
||||
import type { BN } from '@polkadot/util';
|
||||
|
||||
export * from './accounts/types';
|
||||
export * from './council/types';
|
||||
|
||||
+12
-13
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api",
|
||||
"version": "4.13.1",
|
||||
"version": "4.14.1",
|
||||
"type": "module",
|
||||
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
|
||||
"main": "index.js",
|
||||
@@ -19,18 +19,17 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/api-derive": "4.13.1",
|
||||
"@polkadot/keyring": "^6.7.1",
|
||||
"@polkadot/metadata": "4.13.1",
|
||||
"@polkadot/rpc-core": "4.13.1",
|
||||
"@polkadot/rpc-provider": "4.13.1",
|
||||
"@polkadot/types": "4.13.1",
|
||||
"@polkadot/types-known": "4.13.1",
|
||||
"@polkadot/util": "^6.7.1",
|
||||
"@polkadot/util-crypto": "^6.7.1",
|
||||
"@polkadot/x-rxjs": "^6.7.1",
|
||||
"bn.js": "^4.11.9",
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/api-derive": "4.14.1",
|
||||
"@polkadot/keyring": "^6.8.1",
|
||||
"@polkadot/metadata": "4.14.1",
|
||||
"@polkadot/rpc-core": "4.14.1",
|
||||
"@polkadot/rpc-provider": "4.14.1",
|
||||
"@polkadot/types": "4.14.1",
|
||||
"@polkadot/types-known": "4.14.1",
|
||||
"@polkadot/util": "^6.8.1",
|
||||
"@polkadot/util-crypto": "^6.8.1",
|
||||
"@polkadot/x-rxjs": "^6.8.1",
|
||||
"eventemitter3": "^4.0.7"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,6 @@ import type { AnyFunction, AnyTuple, CallFunction, Codec, CodecArg as Arg, Defin
|
||||
import type { SubmittableExtrinsic } from '../submittable/types';
|
||||
import type { ApiInterfaceRx, ApiOptions, ApiTypes, DecoratedErrors, DecoratedEvents, DecoratedRpc, DecoratedRpcSection, DecorateMethod, PaginationOptions, QueryableConsts, QueryableModuleStorage, QueryableStorage, QueryableStorageEntry, QueryableStorageMulti, QueryableStorageMultiArg, SubmittableExtrinsicFunction, SubmittableExtrinsics, SubmittableModuleExtrinsics } from '../types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { decorateDerive, ExactDerive } from '@polkadot/api-derive';
|
||||
import { memo } from '@polkadot/api-derive/util';
|
||||
import { expandMetadata, Metadata } from '@polkadot/metadata';
|
||||
@@ -20,7 +18,7 @@ import { WsProvider } from '@polkadot/rpc-provider';
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
import { DEFAULT_VERSION as EXTRINSIC_DEFAULT_VERSION } from '@polkadot/types/extrinsic/constants';
|
||||
import { unwrapStorageType } from '@polkadot/types/primitive/StorageKey';
|
||||
import { arrayChunk, arrayFlatten, assert, compactStripLength, logger, u8aToHex } from '@polkadot/util';
|
||||
import { arrayChunk, arrayFlatten, assert, BN, compactStripLength, logger, u8aToHex } from '@polkadot/util';
|
||||
import { BehaviorSubject, combineLatest, Observable, of } from '@polkadot/x-rxjs';
|
||||
import { map, switchMap, tap, toArray } from '@polkadot/x-rxjs/operators';
|
||||
|
||||
@@ -39,8 +37,8 @@ interface MetaDecoration {
|
||||
}
|
||||
|
||||
// the max amount of keys/values that we will retrieve at once
|
||||
const PAGE_SIZE_K = 768; // limited since the trie lookups are heavy
|
||||
const PAGE_SIZE_V = 256; // limited since the data may be very large
|
||||
const PAGE_SIZE_K = 1000; // limit aligned with the 1k on the node (trie lookups are heavy)
|
||||
const PAGE_SIZE_V = 250; // limited since the data may be very large (e.g. misfiring elections)
|
||||
|
||||
const l = logger('api/init');
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// Copyright 2017-2021 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { RpcInterfaceMethod } from '@polkadot/rpc-core/types';
|
||||
import type { Text } from '@polkadot/types';
|
||||
import type { ChainProperties, Hash, RuntimeVersion } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Observable, Subscription } from '@polkadot/x-rxjs';
|
||||
import type { ApiBase, ApiOptions, ApiTypes, DecorateMethod } from '../types';
|
||||
import type { VersionedRegistry } from './types';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2021 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { Metadata } from '@polkadot/metadata';
|
||||
import type { Constants } from '@polkadot/metadata/decorate/types';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
|
||||
export interface VersionedRegistry {
|
||||
isDefault: boolean;
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api', version: '4.13.1' };
|
||||
export const packageInfo = { name: '@polkadot/api', version: '4.14.1' };
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
// Augment the modules
|
||||
import '@polkadot/api/augment';
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { DeriveCustom, ExactDerive } from '@polkadot/api-derive';
|
||||
import type { Metadata } from '@polkadot/metadata';
|
||||
import type { RpcInterface } from '@polkadot/rpc-core/types';
|
||||
@@ -12,6 +11,7 @@ import type { ProviderInterface, ProviderInterfaceEmitted } from '@polkadot/rpc-
|
||||
import type { ExtDef } from '@polkadot/types/extrinsic/signedExtensions/types';
|
||||
import type { Hash, RuntimeVersion } from '@polkadot/types/interfaces';
|
||||
import type { DefinitionRpc, DefinitionRpcSub, RegisteredTypes, Registry, SignatureOptions, Signer } from '@polkadot/types/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { ApiBase } from '../base';
|
||||
import type { DeriveAllSections } from '../util/decorate';
|
||||
import type { QueryableConsts } from './consts';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/metadata",
|
||||
"version": "4.13.1",
|
||||
"version": "4.14.1",
|
||||
"type": "module",
|
||||
"description": "Helpers to extract information from runtime metadata",
|
||||
"main": "index.js",
|
||||
@@ -19,14 +19,13 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/types": "4.13.1",
|
||||
"@polkadot/types-known": "4.13.1",
|
||||
"@polkadot/util": "^6.7.1",
|
||||
"@polkadot/util-crypto": "^6.7.1",
|
||||
"bn.js": "^4.11.9"
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/types": "4.14.1",
|
||||
"@polkadot/types-known": "4.14.1",
|
||||
"@polkadot/util": "^6.8.1",
|
||||
"@polkadot/util-crypto": "^6.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.7.1"
|
||||
"@polkadot/keyring": "^6.8.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
// Copyright 2017-2021 @polkadot/metadata authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { createTestPairs } from '@polkadot/keyring/testingPairs';
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
import { BN } from '@polkadot/util';
|
||||
|
||||
import { Metadata } from '../../Metadata';
|
||||
import metadataStatic from '../../static';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2021 @polkadot/metadata authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { StorageEntryMetadataLatest, StorageHasher } from '@polkadot/types/interfaces/metadata';
|
||||
import type { StorageEntry } from '@polkadot/types/primitive/types';
|
||||
import type { Codec, Registry } from '@polkadot/types/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
|
||||
import { Raw } from '@polkadot/types/codec';
|
||||
import { StorageKey, Type } from '@polkadot/types/primitive';
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/metadata', version: '4.13.1' };
|
||||
export const packageInfo = { name: '@polkadot/metadata', version: '4.14.1' };
|
||||
|
||||
@@ -8,12 +8,19 @@ import { Type } from '@polkadot/types/primitive';
|
||||
import { getModuleTypes } from '@polkadot/types-known';
|
||||
import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
// FIXME: Need some sort of solution for specifying these
|
||||
// Since we don't have insight into the origin specification, we can only define what we know about
|
||||
// in a pure Substrate/Polkadot implementation, any other custom origins won't be handled at all
|
||||
const KNOWN_ORIGINS: Record<string, string> = {
|
||||
/* eslint-disable sort-keys */
|
||||
// Substrate/Polkadot
|
||||
Council: 'CollectiveOrigin',
|
||||
System: 'SystemOrigin',
|
||||
TechnicalCommittee: 'CollectiveOrigin'
|
||||
TechnicalCommittee: 'CollectiveOrigin',
|
||||
// Acala
|
||||
Authority: 'AuthorityOrigin',
|
||||
GeneralCouncil: 'CollectiveOrigin'
|
||||
/* eslint-enable sort-keys */
|
||||
};
|
||||
|
||||
const BOXES = [['<', '>'], ['<', ','], [',', '>'], ['(', ')'], ['(', ','], [',', ','], [',', ')']];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/rpc-core",
|
||||
"version": "4.13.1",
|
||||
"version": "4.14.1",
|
||||
"type": "module",
|
||||
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
|
||||
"main": "index.js",
|
||||
@@ -19,14 +19,14 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/metadata": "4.13.1",
|
||||
"@polkadot/rpc-provider": "4.13.1",
|
||||
"@polkadot/types": "4.13.1",
|
||||
"@polkadot/util": "^6.7.1",
|
||||
"@polkadot/x-rxjs": "^6.7.1"
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/metadata": "4.14.1",
|
||||
"@polkadot/rpc-provider": "4.14.1",
|
||||
"@polkadot/types": "4.14.1",
|
||||
"@polkadot/util": "^6.8.1",
|
||||
"@polkadot/x-rxjs": "^6.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.7.1"
|
||||
"@polkadot/keyring": "^6.8.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', version: '4.13.1' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', version: '4.14.1' };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/rpc-provider",
|
||||
"version": "4.13.1",
|
||||
"version": "4.14.1",
|
||||
"type": "module",
|
||||
"description": "Transport providers for the API",
|
||||
"main": "index.js",
|
||||
@@ -19,19 +19,18 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/types": "4.13.1",
|
||||
"@polkadot/util": "^6.7.1",
|
||||
"@polkadot/util-crypto": "^6.7.1",
|
||||
"@polkadot/x-fetch": "^6.7.1",
|
||||
"@polkadot/x-global": "^6.7.1",
|
||||
"@polkadot/x-ws": "^6.7.1",
|
||||
"bn.js": "^4.11.9",
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/types": "4.14.1",
|
||||
"@polkadot/util": "^6.8.1",
|
||||
"@polkadot/util-crypto": "^6.8.1",
|
||||
"@polkadot/x-fetch": "^6.8.1",
|
||||
"@polkadot/x-global": "^6.8.1",
|
||||
"@polkadot/x-ws": "^6.8.1",
|
||||
"eventemitter3": "^4.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.7.1",
|
||||
"@polkadot/metadata": "4.13.1",
|
||||
"@polkadot/keyring": "^6.8.1",
|
||||
"@polkadot/metadata": "4.14.1",
|
||||
"mock-socket": "^9.0.3",
|
||||
"nock": "^13.1.0"
|
||||
}
|
||||
|
||||
@@ -14,18 +14,18 @@ const ERROR_SUBSCRIBE = 'HTTP Provider does not have subscriptions, use WebSocke
|
||||
const l = logger('api-http');
|
||||
|
||||
/**
|
||||
* # @polkadot/rpc-provider/https
|
||||
* # @polkadot/rpc-provider
|
||||
*
|
||||
* @name HttpProvider
|
||||
*
|
||||
* @description The HTTP Provider allows sending requests using HTTP to a HTTP RPC server TCP port. It does not support subscriptions so you won't be able to listen to events such as new blocks or balance changes. It is usually preferrable using the [[WsProvider]].
|
||||
* @description The HTTP Provider allows sending requests using HTTP to a HTTP RPC server TCP port. It does not support subscriptions so you won't be able to listen to events such as new blocks or balance changes. It is usually preferable using the [[WsProvider]].
|
||||
*
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* import Api from '@polkadot/api/promise';
|
||||
* import HttpProvider from '@polkadot/rpc-provider/http';
|
||||
* import { HttpProvider } from '@polkadot/rpc-provider';
|
||||
*
|
||||
* const provider = new HttpProvider('http://127.0.0.1:9933');
|
||||
* const api = new Api(provider);
|
||||
|
||||
@@ -8,7 +8,6 @@ import type { Codec, Registry } from '@polkadot/types/types';
|
||||
import type { ProviderInterface, ProviderInterfaceEmitCb, ProviderInterfaceEmitted } from '../types';
|
||||
import type { MockStateDb, MockStateSubscriptionCallback, MockStateSubscriptions } from './types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
import EventEmitter from 'eventemitter3';
|
||||
|
||||
import { createTestKeyring } from '@polkadot/keyring/testing';
|
||||
@@ -17,7 +16,7 @@ import rpcMetadata from '@polkadot/metadata/static';
|
||||
import jsonrpc from '@polkadot/types/interfaces/jsonrpc';
|
||||
import rpcHeader from '@polkadot/types/json/Header.004.json';
|
||||
import rpcSignedBlock from '@polkadot/types/json/SignedBlock.004.immortal.json';
|
||||
import { assert, bnToU8a, logger, u8aToHex } from '@polkadot/util';
|
||||
import { assert, BN, bnToU8a, logger, u8aToHex } from '@polkadot/util';
|
||||
import { randomAsU8a } from '@polkadot/util-crypto';
|
||||
|
||||
const INTERVAL = 1000;
|
||||
@@ -57,7 +56,7 @@ export class MockProvider implements ProviderInterface {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-unsafe-member-access
|
||||
chain_getBlock: () => this.registry.createType('SignedBlock', rpcSignedBlock.result).toJSON(),
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
chain_getBlockHash: () => '0x1234',
|
||||
chain_getBlockHash: () => '0x1234000000000000000000000000000000000000000000000000000000000000',
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
chain_getFinalizedHead: () => this.registry.createType('Header', rpcHeader.result).hash,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', version: '4.13.1' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', version: '4.14.1' };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/typegen",
|
||||
"version": "4.13.1",
|
||||
"version": "4.14.1",
|
||||
"type": "module",
|
||||
"description": "Type generation scripts",
|
||||
"main": "index.js",
|
||||
@@ -26,14 +26,14 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/typegen#readme",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.14.3",
|
||||
"@babel/register": "^7.13.16",
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/api": "4.13.1",
|
||||
"@polkadot/metadata": "4.13.1",
|
||||
"@polkadot/rpc-provider": "4.13.1",
|
||||
"@polkadot/types": "4.13.1",
|
||||
"@polkadot/util": "^6.7.1",
|
||||
"@babel/core": "^7.14.5",
|
||||
"@babel/register": "^7.14.5",
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/api": "4.14.1",
|
||||
"@polkadot/metadata": "4.14.1",
|
||||
"@polkadot/rpc-provider": "4.14.1",
|
||||
"@polkadot/types": "4.14.1",
|
||||
"@polkadot/util": "^6.8.1",
|
||||
"handlebars": "^4.7.7",
|
||||
"websocket": "^1.0.34",
|
||||
"yargs": "^17.0.1"
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/typegen', version: '4.13.1' };
|
||||
export const packageInfo = { name: '@polkadot/typegen', version: '4.14.1' };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/types-known",
|
||||
"version": "4.13.1",
|
||||
"version": "4.14.1",
|
||||
"type": "module",
|
||||
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
|
||||
"main": "index.js",
|
||||
@@ -19,13 +19,9 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/networks": "^6.7.1",
|
||||
"@polkadot/types": "4.13.1",
|
||||
"@polkadot/util": "^6.7.1",
|
||||
"bn.js": "^4.11.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bn.js": "^4.11.6"
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/networks": "^6.8.1",
|
||||
"@polkadot/types": "4.14.1",
|
||||
"@polkadot/util": "^6.8.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
import './detectPackage';
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { Text } from '@polkadot/types';
|
||||
import type { ExtDef } from '@polkadot/types/extrinsic/signedExtensions/types';
|
||||
import type { Hash } from '@polkadot/types/interfaces';
|
||||
import type { ChainUpgradeVersion, CodecHasher, DefinitionRpc, DefinitionRpcSub, OverrideModuleType, OverrideVersionedType, Registry, RegistryTypes } from '@polkadot/types/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
|
||||
import { bnToBn, isUndefined } from '@polkadot/util';
|
||||
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-known', version: '4.13.1' };
|
||||
export const packageInfo = { name: '@polkadot/types-known', version: '4.14.1' };
|
||||
|
||||
@@ -4,10 +4,8 @@
|
||||
import type { ChainUpgrades } from '@polkadot/types/types';
|
||||
import type { ChainUpgradesRaw } from './types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import networks from '@polkadot/networks';
|
||||
import { assert, hexToU8a, stringify } from '@polkadot/util';
|
||||
import { assert, BN, hexToU8a, stringify } from '@polkadot/util';
|
||||
|
||||
import kusama from './kusama';
|
||||
import polkadot from './polkadot';
|
||||
|
||||
@@ -12,7 +12,8 @@ const upgrades: ChainUpgradesRaw = [
|
||||
[2201991, 1062], [2671528, 2005], [2704202, 2007], [2728002, 2008], [2832534, 2011],
|
||||
[2962294, 2012], [3240000, 2013], [3274408, 2015], [3323565, 2019], [3534175, 2022],
|
||||
[3860281, 2023], [4143129, 2024], [4401242, 2025], [4841367, 2026], [5961600, 2027],
|
||||
[6137912, 2028], [6561855, 2029], [7100891, 2030], [7468792, 9010], [7668600, 9030]
|
||||
[6137912, 2028], [6561855, 2029], [7100891, 2030], [7468792, 9010], [7668600, 9030],
|
||||
[7812476, 9040]
|
||||
];
|
||||
|
||||
export default upgrades;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/types",
|
||||
"version": "4.13.1",
|
||||
"version": "4.14.1",
|
||||
"type": "module",
|
||||
"description": "Implementation of the Parity codec",
|
||||
"main": "index.js",
|
||||
@@ -19,15 +19,15 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/metadata": "4.13.1",
|
||||
"@polkadot/util": "^6.7.1",
|
||||
"@polkadot/util-crypto": "^6.7.1",
|
||||
"@polkadot/x-rxjs": "^6.7.1",
|
||||
"@types/bn.js": "^4.11.6",
|
||||
"bn.js": "^4.11.9"
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/metadata": "4.14.1",
|
||||
"@polkadot/util": "^6.8.1",
|
||||
"@polkadot/util-crypto": "^6.8.1",
|
||||
"@polkadot/x-rxjs": "^6.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.7.1"
|
||||
"@polkadot/keyring": "^6.8.1",
|
||||
"@types/bn.js": "^4.11.6",
|
||||
"bn.js": "^4.11.9"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ import type { DoubleMapTypeLatest, DoubleMapTypeV10, DoubleMapTypeV11, DoubleMap
|
||||
import type { MmrLeafProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
|
||||
import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
|
||||
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, Retriable, Scheduling, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, Statement, SubId, SystemInherentData, TransientValidationData, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersDataTuple, WinningData, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
|
||||
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, Retriable, Scheduling, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, Statement, SubId, SystemInherentData, TransientValidationData, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationCodeHash, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersDataTuple, WinningData, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
|
||||
import type { FeeDetails, InclusionFee, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { Approvals } from '@polkadot/types/interfaces/poll';
|
||||
import type { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces/proxy';
|
||||
@@ -955,6 +955,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<usize>': Option<usize>;
|
||||
'Option<USize>': Option<USize>;
|
||||
'Option<ValidationCode>': Option<ValidationCode>;
|
||||
'Option<ValidationCodeHash>': Option<ValidationCodeHash>;
|
||||
'Option<ValidationData>': Option<ValidationData>;
|
||||
'Option<ValidationDataType>': Option<ValidationDataType>;
|
||||
'Option<ValidationFunctionParams>': Option<ValidationFunctionParams>;
|
||||
@@ -1828,6 +1829,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<usize>': Vec<usize>;
|
||||
'Vec<USize>': Vec<USize>;
|
||||
'Vec<ValidationCode>': Vec<ValidationCode>;
|
||||
'Vec<ValidationCodeHash>': Vec<ValidationCodeHash>;
|
||||
'Vec<ValidationData>': Vec<ValidationData>;
|
||||
'Vec<ValidationDataType>': Vec<ValidationDataType>;
|
||||
'Vec<ValidationFunctionParams>': Vec<ValidationFunctionParams>;
|
||||
@@ -2701,6 +2703,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
usize: usize;
|
||||
USize: USize;
|
||||
ValidationCode: ValidationCode;
|
||||
ValidationCodeHash: ValidationCodeHash;
|
||||
ValidationData: ValidationData;
|
||||
ValidationDataType: ValidationDataType;
|
||||
ValidationFunctionParams: ValidationFunctionParams;
|
||||
|
||||
@@ -5,9 +5,7 @@ import type { CodecHash, Hash } from '../interfaces/runtime';
|
||||
import type { AnyNumber, Codec, Registry } from '../types';
|
||||
import type { UIntBitLength } from './types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { assert, BN_BILLION, BN_HUNDRED, BN_MILLION, BN_QUINTILL, BN_ZERO, bnToBn, bnToHex, bnToU8a, formatBalance, formatNumber, hexToBn, isHex, isString, isU8a, stringify, u8aToBn } from '@polkadot/util';
|
||||
import { assert, BN, BN_BILLION, BN_HUNDRED, BN_MILLION, BN_QUINTILL, BN_ZERO, bnToBn, bnToHex, bnToU8a, formatBalance, formatNumber, hexToBn, isHex, isString, isU8a, stringify, u8aToBn } from '@polkadot/util';
|
||||
|
||||
export const DEFAULT_UINT_BITS = 64;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import BN from 'bn.js';
|
||||
import { BN } from '@polkadot/util';
|
||||
|
||||
import { TypeRegistry } from '../create';
|
||||
import { U32 } from '../primitive';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { CodecHash, Hash } from '../interfaces';
|
||||
import type { AnyJson, AnyNumber, Constructor, ICompact, InterfaceTypes, Registry } from '../types';
|
||||
import type { CompactEncodable } from './types';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import type { CodecTo } from '../types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
import { BN } from '@polkadot/util';
|
||||
|
||||
import { TypeRegistry } from '../create';
|
||||
import { U64 } from '../primitive';
|
||||
|
||||
@@ -5,9 +5,7 @@ import type { CodecHash, Hash } from '../interfaces/runtime';
|
||||
import type { AnyNumber, Codec, Registry } from '../types';
|
||||
import type { UIntBitLength } from './types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { bnToBn, bnToHex, bnToU8a, isString, isU8a, u8aToBn } from '@polkadot/util';
|
||||
import { BN, bnToBn, bnToHex, bnToU8a, isString, isU8a, u8aToBn } from '@polkadot/util';
|
||||
|
||||
const BITLENGTH: UIntBitLength = 64;
|
||||
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
import type { CodecHash, Hash } from '../interfaces/runtime';
|
||||
import type { Codec, Constructor, Registry } from '../types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { assert, bnToBn, bnToU8a, isBn, isNumber, isString, isU8a, isUndefined, stringCamelCase, stringify, stringUpperFirst, u8aToBn, u8aToHex, u8aToU8a } from '@polkadot/util';
|
||||
import { assert, BN, bnToBn, bnToU8a, isBn, isNumber, isString, isU8a, isUndefined, stringCamelCase, stringify, stringUpperFirst, u8aToBn, u8aToHex, u8aToU8a } from '@polkadot/util';
|
||||
|
||||
import { compareArray } from './utils';
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ describe('U8aFixed', (): void => {
|
||||
|
||||
it('constructs from number[]', (): void => {
|
||||
expect(
|
||||
new (U8aFixed.with(32))(registry, [0x02, 0x03]).toU8a()
|
||||
new (U8aFixed.with(32))(registry, [0x02, 0x03, 0x00, 0x00]).toU8a()
|
||||
).toEqual(
|
||||
new Uint8Array([0x02, 0x03, 0x00, 0x00])
|
||||
);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import type { AnyU8a, Constructor, Registry } from '../types';
|
||||
import type { U8aBitLength } from './types';
|
||||
|
||||
import { isString, u8aToU8a } from '@polkadot/util';
|
||||
import { assert, isString, u8aToU8a } from '@polkadot/util';
|
||||
|
||||
import { Raw } from './Raw';
|
||||
|
||||
@@ -14,20 +14,16 @@ function decodeU8aFixed (value: AnyU8a, bitLength: U8aBitLength): AnyU8a {
|
||||
return decodeU8aFixed(u8aToU8a(value), bitLength);
|
||||
}
|
||||
|
||||
// ensure that we have an actual u8a with the full length as specified by
|
||||
// the bitLength input (padded with zeros as required)
|
||||
const byteLength = bitLength / 8;
|
||||
const sub = value.subarray(0, byteLength);
|
||||
|
||||
if (sub.length === byteLength) {
|
||||
return sub;
|
||||
}
|
||||
|
||||
const u8a = new Uint8Array(byteLength);
|
||||
|
||||
u8a.set(sub, 0);
|
||||
if (!value || !value.length) {
|
||||
return u8a;
|
||||
}
|
||||
|
||||
return u8a;
|
||||
assert(value.length >= byteLength, () => `Expected at least ${byteLength} bytes (${bitLength} bits), found ${value.length} bytes`);
|
||||
|
||||
return value.subarray(0, byteLength);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import BN from 'bn.js';
|
||||
import BNOrig from 'bn.js';
|
||||
|
||||
import { BN, BN_TWO, isBn } from '@polkadot/util';
|
||||
|
||||
import { TypeRegistry } from '../create';
|
||||
import { UInt } from '.';
|
||||
@@ -9,6 +11,21 @@ import { UInt } from '.';
|
||||
describe('UInt', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
it('still has the BN interfaces', (): void => {
|
||||
expect([
|
||||
new UInt(registry, 32).mul(BN_TWO).toNumber(),
|
||||
new UInt(registry, 64).divn(2).toNumber()
|
||||
]).toEqual([64, 32]);
|
||||
});
|
||||
|
||||
it('is a BN instance', (): void => {
|
||||
const test = new UInt(registry, 16);
|
||||
|
||||
expect(isBn(test)).toBe(true);
|
||||
expect(BNOrig.isBN(test)).toBe(true);
|
||||
expect(test instanceof BN).toBe(true);
|
||||
});
|
||||
|
||||
it('fails on a number that is too large for the bits specified', (): void => {
|
||||
expect(
|
||||
(): UInt => new UInt(registry, '12345678901234567890123456789012345678901234567890', 32)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Codec } from '../types';
|
||||
|
||||
export interface CompactEncodable extends Codec {
|
||||
|
||||
@@ -69,7 +69,7 @@ describe('EthereumAccountId', (): void => {
|
||||
testEncode('toHex', '0x4119b2e6c3cb618f4f0b93ac77f9beec7ff02887');
|
||||
testEncode('toJSON', '0x4119b2e6c3Cb618F4f0B93ac77f9BeeC7FF02887');
|
||||
testEncode('toString', '0x4119b2e6c3Cb618F4f0B93ac77f9BeeC7FF02887');
|
||||
testEncode('toString', '0x0000000000000000000000000000000000000000', '0x00');
|
||||
testEncode('toString', '0x0000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000000');
|
||||
testEncode('toU8a', Uint8Array.from([
|
||||
0x41, 0x19, 0xb2, 0xe6, 0xc3, 0xcb, 0x61, 0x8f, 0x4f, 0x0b,
|
||||
0x93, 0xac, 0x77, 0xf9, 0xbe, 0xec, 0x7f, 0xf0, 0x28, 0x87
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Registry } from '../types';
|
||||
|
||||
import { isBigInt, isBn, isHex, isNumber, isU8a, u8aConcat, u8aToBn, u8aToHex, u8aToU8a } from '@polkadot/util';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { AnyU8a, IExtrinsicEra, Registry } from '../types';
|
||||
|
||||
import { assert, bnToBn, formatNumber, hexToU8a, isHex, isObject, isU8a, u8aToBn, u8aToU8a } from '@polkadot/util';
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { createTestPairs } from '@polkadot/keyring/testingPairs';
|
||||
import { decorateExtrinsics, Metadata } from '@polkadot/metadata';
|
||||
import rpcMetadata from '@polkadot/metadata/static';
|
||||
import { BN } from '@polkadot/util';
|
||||
|
||||
import { TypeRegistry } from '../../create';
|
||||
import { GenericExtrinsicV4 as Extrinsic } from '.';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import BN from 'bn.js';
|
||||
import { BN } from '@polkadot/util';
|
||||
|
||||
import { TypeRegistry } from '../create';
|
||||
import { GenericAccountIndex as AccountIndex } from '.';
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
|
||||
import type { AnyNumber, Registry } from '../types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { bnToBn, isBigInt, isBn, isHex, isNumber, isU8a } from '@polkadot/util';
|
||||
import { BN, bnToBn, isBigInt, isBn, isHex, isNumber, isU8a } from '@polkadot/util';
|
||||
import { decodeAddress, encodeAddress } from '@polkadot/util-crypto';
|
||||
|
||||
import { u32 } from '../primitive/U32';
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
import type { AccountId } from '../interfaces/runtime';
|
||||
import type { AnyU8a, Registry } from '../types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
|
||||
import { bnToU8a, isNumber, stringToU8a, u8aToHex, u8aToString } from '@polkadot/util';
|
||||
import { BN, bnToU8a, isNumber, stringToU8a, u8aToHex, u8aToString } from '@polkadot/util';
|
||||
|
||||
import { U8aFixed } from '../codec/U8aFixed';
|
||||
import { Bytes } from '../primitive/Bytes';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Registry } from '../types';
|
||||
|
||||
import { isBigInt, isBn, isHex, isNumber, isU8a, u8aConcat, u8aToBn, u8aToHex, u8aToU8a } from '@polkadot/util';
|
||||
|
||||
@@ -111,7 +111,7 @@ export default {
|
||||
erasureRoot: 'Hash',
|
||||
signature: 'CollatorSignature',
|
||||
paraHead: 'Hash',
|
||||
validationCodeHash: 'Hash'
|
||||
validationCodeHash: 'ValidationCodeHash'
|
||||
},
|
||||
CandidateHash: 'Hash',
|
||||
CandidateInfo: {
|
||||
@@ -381,6 +381,7 @@ export default {
|
||||
codeUpgradeAllowed: 'Option<RelayChainBlockNumber>'
|
||||
},
|
||||
ValidationCode: 'Bytes',
|
||||
ValidationCodeHash: 'Hash',
|
||||
ValidationData: {
|
||||
persisted: 'PersistedValidationData',
|
||||
transient: 'TransientValidationData'
|
||||
|
||||
@@ -117,7 +117,7 @@ export interface CandidateDescriptor extends Struct {
|
||||
readonly erasureRoot: Hash;
|
||||
readonly signature: CollatorSignature;
|
||||
readonly paraHead: Hash;
|
||||
readonly validationCodeHash: Hash;
|
||||
readonly validationCodeHash: ValidationCodeHash;
|
||||
}
|
||||
|
||||
/** @name CandidateHash */
|
||||
@@ -615,6 +615,9 @@ export interface UpwardMessage extends Bytes {}
|
||||
/** @name ValidationCode */
|
||||
export interface ValidationCode extends Bytes {}
|
||||
|
||||
/** @name ValidationCodeHash */
|
||||
export interface ValidationCodeHash extends Hash {}
|
||||
|
||||
/** @name ValidationData */
|
||||
export interface ValidationData extends Struct {
|
||||
readonly persisted: PersistedValidationData;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
|
||||
import BN from 'bn.js';
|
||||
import { BN } from '@polkadot/util';
|
||||
|
||||
import { TypeRegistry } from '../../create';
|
||||
import json1 from '../../json/Header.001.json';
|
||||
|
||||
@@ -12,7 +12,7 @@ describe('StorageChangeSet', (): void => {
|
||||
|
||||
describe('construction', (): void => {
|
||||
const set = registry.createType('StorageChangeSet', {
|
||||
block: '0x1234',
|
||||
block: '0x1234000000000000000000000000000000000000000000000000000000000000',
|
||||
changes: [
|
||||
['0xab', '0xcd']
|
||||
]
|
||||
|
||||
@@ -34,8 +34,7 @@ describe('EventRecord', (): void => {
|
||||
const er = records[0];
|
||||
|
||||
expect(er.phase.type).toEqual('ApplyExtrinsic');
|
||||
// additional payment info, weight u64 (vs u32)
|
||||
expect(records.toHex()).toEqual(`${hex as string}00000000000000000000`);
|
||||
expect(records.toHex()).toEqual(hex);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -18,10 +18,11 @@ export default {
|
||||
issuer: 'AccountId',
|
||||
admin: 'AccountId',
|
||||
freezer: 'AccountId',
|
||||
totalTeposit: 'DepositBalance',
|
||||
totalDeposit: 'DepositBalance',
|
||||
freeHolding: 'bool',
|
||||
instances: 'u32',
|
||||
instanceMetadatas: 'u32',
|
||||
attributes: 'u32',
|
||||
isFrozen: 'bool'
|
||||
},
|
||||
DestroyWitness: {
|
||||
|
||||
@@ -10,10 +10,11 @@ export interface ClassDetails extends Struct {
|
||||
readonly issuer: AccountId;
|
||||
readonly admin: AccountId;
|
||||
readonly freezer: AccountId;
|
||||
readonly totalTeposit: DepositBalance;
|
||||
readonly totalDeposit: DepositBalance;
|
||||
readonly freeHolding: bool;
|
||||
readonly instances: u32;
|
||||
readonly instanceMetadatas: u32;
|
||||
readonly attributes: u32;
|
||||
readonly isFrozen: bool;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"changes": [
|
||||
[
|
||||
"0xcc956bdb7605e3547539f321ac2bc95c",
|
||||
"0x0800000000000000000001000000000000"
|
||||
"0x08000000000000000000010000000000000000000000000000000000000000000000000000"
|
||||
]
|
||||
]
|
||||
},
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types', version: '4.13.1' };
|
||||
export const packageInfo = { name: '@polkadot/types', version: '4.14.1' };
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Hash } from '../interfaces/runtime';
|
||||
import type { Registry } from './registry';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { SignOptions } from '@polkadot/keyring/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { FunctionMetadataLatest, StorageEntryMetadataLatest } from '../interfaces/metadata';
|
||||
import type { Hash } from '../interfaces/runtime';
|
||||
import type { AnyTuple, ArgsDef, Codec } from './codec';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type BN from 'bn.js';
|
||||
import type { Metadata } from '@polkadot/metadata';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Observable } from '@polkadot/x-rxjs';
|
||||
import type { ExtDef } from '../extrinsic/signedExtensions/types';
|
||||
import type { CodecHash, Hash } from '../interfaces/runtime';
|
||||
|
||||
Reference in New Issue
Block a user