Bump dev (w/ Node 16+ only) (#5603)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"description": "API generated augmentation",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=16"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-augment#readme",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"description": "Interfaces for interacting with contracts and contract ABIs",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=16"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-base#readme",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"description": "Interfaces for interacting with contracts and contract ABIs",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=16"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// Copyright 2017-2023 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiBase } from '@polkadot/api/base';
|
||||
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
||||
import type { WeightV2 } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { ApiBase } from '@polkadot/api/base';
|
||||
import { isFunction } from '@polkadot/util';
|
||||
|
||||
import { Abi } from '../Abi/index.js';
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiBase } from '@polkadot/api/base';
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
||||
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
||||
import type { AccountId, EventRecord, Hash } from '@polkadot/types/interfaces';
|
||||
import type { ISubmittableResult } from '@polkadot/types/types';
|
||||
import type { Abi } from '../Abi/index.js';
|
||||
import type { AbiConstructor, BlueprintOptions } from '../types.js';
|
||||
import type { MapConstructorExec } from './types.js';
|
||||
|
||||
import { SubmittableResult } from '@polkadot/api';
|
||||
import { ApiBase } from '@polkadot/api/base';
|
||||
import { BN_ZERO, isUndefined } from '@polkadot/util';
|
||||
|
||||
import { Abi } from '../Abi/index.js';
|
||||
import { applyOnEvent } from '../util.js';
|
||||
import { Base } from './Base.js';
|
||||
import { Contract } from './Contract.js';
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiBase } from '@polkadot/api/base';
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
||||
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
||||
import type { AccountId, EventRecord } from '@polkadot/types/interfaces';
|
||||
import type { ISubmittableResult } from '@polkadot/types/types';
|
||||
import type { Codec } from '@polkadot/types-codec/types';
|
||||
import type { Abi } from '../Abi/index.js';
|
||||
import type { AbiConstructor, BlueprintOptions } from '../types.js';
|
||||
import type { MapConstructorExec } from './types.js';
|
||||
|
||||
import { SubmittableResult } from '@polkadot/api';
|
||||
import { ApiBase } from '@polkadot/api/base';
|
||||
import { BN_ZERO, compactAddLength, isUndefined, isWasm, u8aToU8a } from '@polkadot/util';
|
||||
|
||||
import { Abi } from '../Abi/index.js';
|
||||
import { applyOnEvent } from '../util.js';
|
||||
import { Base } from './Base.js';
|
||||
import { Blueprint } from './Blueprint.js';
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiBase } from '@polkadot/api/base';
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
||||
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
||||
import type { Bytes } from '@polkadot/types';
|
||||
import type { AccountId, ContractExecResult, EventRecord, Weight, WeightV2 } from '@polkadot/types/interfaces';
|
||||
import type { ISubmittableResult } from '@polkadot/types/types';
|
||||
import type { Abi } from '../Abi/index.js';
|
||||
import type { AbiMessage, ContractCallOutcome, ContractOptions, DecodedEvent, WeightAll } from '../types.js';
|
||||
import type { ContractCallResult, ContractCallSend, ContractQuery, ContractTx, MapMessageQuery, MapMessageTx } from './types.js';
|
||||
|
||||
import { map } from 'rxjs';
|
||||
|
||||
import { SubmittableResult } from '@polkadot/api';
|
||||
import { ApiBase } from '@polkadot/api/base';
|
||||
import { BN, BN_HUNDRED, BN_ONE, BN_ZERO, isUndefined, logger } from '@polkadot/util';
|
||||
|
||||
import { Abi } from '../Abi/index.js';
|
||||
import { applyOnEvent } from '../util.js';
|
||||
import { Base } from './Base.js';
|
||||
import { convertWeight, withMeta } from './util.js';
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { ApiBase } from '@polkadot/api/base';
|
||||
import type { ApiBase } from '@polkadot/api/base';
|
||||
|
||||
import { TypeRegistry } from '@polkadot/types';
|
||||
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiPromise } from '@polkadot/api';
|
||||
import type { AccountId, Hash } from '@polkadot/types/interfaces';
|
||||
import type { Abi } from '../Abi/index.js';
|
||||
|
||||
import { ApiPromise, toPromiseMethod } from '@polkadot/api';
|
||||
import { toPromiseMethod } from '@polkadot/api';
|
||||
|
||||
import { Abi } from '../Abi/index.js';
|
||||
import { Blueprint, Code, Contract } from '../base/index.js';
|
||||
|
||||
export class BlueprintPromise extends Blueprint<'promise'> {
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiRx } from '@polkadot/api';
|
||||
import type { AccountId, Hash } from '@polkadot/types/interfaces';
|
||||
import type { Abi } from '../Abi/index.js';
|
||||
|
||||
import { ApiRx, toRxMethod } from '@polkadot/api';
|
||||
import { toRxMethod } from '@polkadot/api';
|
||||
|
||||
import { Abi } from '../Abi/index.js';
|
||||
import { Blueprint, Code, Contract } from '../base/index.js';
|
||||
|
||||
export class BlueprintRx extends Blueprint<'rxjs'> {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=16"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
/// <reference types="@polkadot/dev-test/globals.d.ts" />
|
||||
|
||||
import type { ApiPromise } from '@polkadot/api';
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Option, StorageKey } from '@polkadot/types';
|
||||
import type { Bounty, BountyIndex, Proposal, ProposalIndex } from '@polkadot/types/interfaces';
|
||||
@@ -11,8 +12,6 @@ import type { DeriveApi, DeriveCollectiveProposal } from '../types.js';
|
||||
|
||||
import { firstValueFrom, of } from 'rxjs';
|
||||
|
||||
import { ApiPromise } from '@polkadot/api';
|
||||
|
||||
import { BountyFactory } from '../test/bountyFactory.js';
|
||||
import { BytesFactory } from '../test/bytesFactory.js';
|
||||
import { createApiWithAugmentations } from '../test/helpers.js';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2023 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiPromise } from '@polkadot/api';
|
||||
import type { Bounty, BountyIndex } from '@polkadot/types/interfaces';
|
||||
import type { Codec, Constructor, InterfaceTypes, Registry } from '@polkadot/types/types';
|
||||
|
||||
import { ApiPromise } from '@polkadot/api';
|
||||
import { Option, StorageKey } from '@polkadot/types';
|
||||
|
||||
export class BountyFactory {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=16"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { AugmentedCall, DeriveCustom, QueryableCalls } from '@polkadot/api-base/types';
|
||||
import type { RpcInterface } from '@polkadot/rpc-core/types';
|
||||
import type { StorageKey, Text, u64 } from '@polkadot/types';
|
||||
import type { Metadata, StorageKey, Text, u64 } from '@polkadot/types';
|
||||
import type { Call, Hash, RuntimeVersion } from '@polkadot/types/interfaces';
|
||||
import type { DecoratedMeta } from '@polkadot/types/metadata/decorate/types';
|
||||
import type { StorageEntry } from '@polkadot/types/primitive/types';
|
||||
@@ -20,7 +20,7 @@ import { BehaviorSubject, combineLatest, from, map, of, switchMap, tap, toArray
|
||||
import { getAvailableDerives } from '@polkadot/api-derive';
|
||||
import { memo, RpcCore } from '@polkadot/rpc-core';
|
||||
import { WsProvider } from '@polkadot/rpc-provider';
|
||||
import { expandMetadata, GenericExtrinsic, Metadata, typeDefinitions, TypeRegistry } from '@polkadot/types';
|
||||
import { expandMetadata, GenericExtrinsic, typeDefinitions, TypeRegistry } from '@polkadot/types';
|
||||
import { getSpecRuntime } from '@polkadot/types-known';
|
||||
import { arrayChunk, arrayFlatten, assertReturn, BN, compactStripLength, lazyMethod, lazyMethods, logger, nextTick, objectSpread, stringCamelCase, stringUpperFirst, u8aConcatStrict, u8aToHex } from '@polkadot/util';
|
||||
import { blake2AsHex } from '@polkadot/util-crypto';
|
||||
|
||||
@@ -11,13 +11,12 @@ import type { StorageKey } from '@polkadot/types';
|
||||
import type { AccountId, Balance, DispatchErrorModule, Event, Header, Index } from '@polkadot/types/interfaces';
|
||||
import type { FrameSystemAccountInfo } from '@polkadot/types/lookup';
|
||||
import type { AnyTuple, IExtrinsic, IMethod } from '@polkadot/types/types';
|
||||
import type { SubmittableResult } from './index.js';
|
||||
|
||||
import { ApiPromise } from '@polkadot/api';
|
||||
import { createTestPairs } from '@polkadot/keyring/testingPairs';
|
||||
import { createTypeUnsafe, TypeRegistry } from '@polkadot/types/create';
|
||||
|
||||
import { SubmittableResult } from './index.js';
|
||||
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
async function calls (api: ApiPromise): Promise<void> {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// Copyright 2017-2023 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { Observable, Subscription } from 'rxjs';
|
||||
import type { Callback, Codec } from '@polkadot/types/types';
|
||||
import type { DecorateFn, DecorateMethodOptions, ObsInnerType, StorageEntryPromiseOverloads, UnsubscribePromise, VoidFn } from '../types/index.js';
|
||||
|
||||
import { catchError, EMPTY, Subscription, tap } from 'rxjs';
|
||||
import { catchError, EMPTY, tap } from 'rxjs';
|
||||
|
||||
import { isFunction, nextTick } from '@polkadot/util';
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
// Copyright 2017-2023 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { ApiOptions } from '../types/index.js';
|
||||
|
||||
import { from, Observable } from 'rxjs';
|
||||
import { from } from 'rxjs';
|
||||
|
||||
import { objectSpread } from '@polkadot/util';
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import type { Observable } from 'rxjs';
|
||||
import type { Address, ApplyExtrinsicResult, Call, Extrinsic, ExtrinsicEra, ExtrinsicStatus, Hash, Header, Index, RuntimeDispatchInfo, SignerPayload } from '@polkadot/types/interfaces';
|
||||
import type { Callback, Codec, Constructor, ISubmittableResult, SignatureOptions } from '@polkadot/types/types';
|
||||
import type { Registry } from '@polkadot/types-codec/types';
|
||||
import type { ApiBase } from '../base/index.js';
|
||||
import type { ApiInterfaceRx, ApiTypes, PromiseOrObs, SignerResult } from '../types/index.js';
|
||||
import type { AddressOrPair, SignerOptions, SubmittableDryRunResult, SubmittableExtrinsic, SubmittablePaymentResult, SubmittableResultResult, SubmittableResultSubscription } from './types.js';
|
||||
|
||||
@@ -14,7 +15,6 @@ import { catchError, first, map, mergeMap, of, switchMap, tap } from 'rxjs';
|
||||
|
||||
import { isBn, isFunction, isNumber, isString, isU8a, objectSpread } from '@polkadot/util';
|
||||
|
||||
import { ApiBase } from '../base/index.js';
|
||||
import { filterEvents, isKeyringPair } from '../util/index.js';
|
||||
import { SubmittableResult } from './Result.js';
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
import type { Call, Extrinsic } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types-codec/types';
|
||||
import type { ApiBase } from '../base/index.js';
|
||||
import type { ApiInterfaceRx, ApiTypes } from '../types/index.js';
|
||||
import type { SubmittableExtrinsic } from './types.js';
|
||||
|
||||
import { ApiBase } from '../base/index.js';
|
||||
import { createClass } from './createClass.js';
|
||||
|
||||
type Creator<ApiType extends ApiTypes> = (extrinsic: Call | Uint8Array | string) => SubmittableExtrinsic<ApiType>;
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { EventRecord } from '@polkadot/types/interfaces';
|
||||
|
||||
import { SubmittableResult } from '../index.js';
|
||||
import type { SubmittableResult } from '../index.js';
|
||||
|
||||
// log all events for the transfers, calling done() when finalized
|
||||
export const logEvents = (done: () => Record<string, unknown>): (r: SubmittableResult) => void =>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"description": "RPC generated augmentation",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=16"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-augment#readme",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=16"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"description": "Transport providers for the API",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=16"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
|
||||
"license": "Apache-2.0",
|
||||
@@ -35,9 +35,9 @@
|
||||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@substrate/connect": "0.7.23"
|
||||
"@substrate/connect": "0.7.24"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@substrate/connect": "0.7.23"
|
||||
"@substrate/connect": "0.7.24"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"description": "Type generation scripts",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=16"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/typegen#readme",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// Connects to the local chain and outputs a re-usable calls-only chain definition in the form
|
||||
// export default { chain: 'Development', genesisHash: '0x27b6d5e0f4fdce1c4d20b82406f193acacce0c19e0d2c0e7ca47725c2572a06a', ss58Format: 42, tokenDecimals: 0, tokenSymbol: 'UNIT'; metaCalls: 'bWV0...4AAA==' };
|
||||
|
||||
import process from 'process';
|
||||
import process from 'node:process';
|
||||
import yargs from 'yargs';
|
||||
import { hideBin } from 'yargs/helpers';
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import type { TypeDef } from '@polkadot/types-create/types';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
import path from 'path';
|
||||
import path from 'node:path';
|
||||
|
||||
import * as defaultDefinitions from '@polkadot/types/interfaces/definitions';
|
||||
import staticKusama from '@polkadot/types-support/metadata/static-kusama';
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { ModuleTypes } from '../util/imports.js';
|
||||
import type { TypeImports } from '../util/index.js';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
import path from 'path';
|
||||
import path from 'node:path';
|
||||
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
import * as defaultDefinitions from '@polkadot/types/interfaces/definitions';
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Metadata } from '@polkadot/types/metadata/Metadata';
|
||||
import type { Text } from '@polkadot/types/primitive';
|
||||
import type { Definitions, Registry } from '@polkadot/types/types';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { ExtraTypes } from './types.js';
|
||||
@@ -9,7 +10,6 @@ import type { ExtraTypes } from './types.js';
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
|
||||
import { Text } from '@polkadot/types/primitive';
|
||||
import lookupDefinitions from '@polkadot/types-augment/lookup/definitions';
|
||||
import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
import type { MetadataLatest, SiLookupTypeId } from '@polkadot/types/interfaces';
|
||||
import type { PortableRegistry } from '@polkadot/types/metadata';
|
||||
import type { Text } from '@polkadot/types/primitive';
|
||||
import type { Codec, DefinitionRpcParam } from '@polkadot/types/types';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
|
||||
@@ -15,7 +16,6 @@ import { hideBin } from 'yargs/helpers';
|
||||
import { Metadata, TypeRegistry, Vec } from '@polkadot/types';
|
||||
import * as definitions from '@polkadot/types/interfaces/definitions';
|
||||
import { getStorage as getSubstrateStorage } from '@polkadot/types/metadata/decorate/storage/getStorage';
|
||||
import { Text } from '@polkadot/types/primitive';
|
||||
import { unwrapStorageType } from '@polkadot/types/util';
|
||||
import kusamaMeta, { rpc as kusamaRpc, version as kusamaVer } from '@polkadot/types-support/metadata/static-kusama';
|
||||
import polkadotMeta, { rpc as polkadotRpc, version as polkadotVer } from '@polkadot/types-support/metadata/static-polkadot';
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Constructor, Registry } from '@polkadot/types/types';
|
||||
import type { UInt } from '@polkadot/types-codec';
|
||||
import type { TypeDef } from '@polkadot/types-create/types';
|
||||
import type { ModuleTypes, TypeImports } from './imports.js';
|
||||
|
||||
import { GenericAccountId, GenericCall, GenericLookupSource, GenericVote } from '@polkadot/types/generic';
|
||||
import { AllConvictions } from '@polkadot/types/interfaces/democracy/definitions';
|
||||
import { AbstractInt, bool, Compact, Enum, Null, Option, Struct, Tuple, UInt, Vec, WrapperKeepOpaque, WrapperOpaque } from '@polkadot/types-codec';
|
||||
import { AbstractInt, bool, Compact, Enum, Null, Option, Struct, Tuple, Vec, WrapperKeepOpaque, WrapperOpaque } from '@polkadot/types-codec';
|
||||
import { getTypeDef, TypeDefInfo } from '@polkadot/types-create';
|
||||
import { isChildClass, stringify } from '@polkadot/util';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
import type { TypeRegistry } from '@polkadot/types/create';
|
||||
|
||||
export function registerDefinitions (registry: TypeRegistry, extras: Record<string, Record<string, { types: Record<string, any> }>>): void {
|
||||
Object.values(extras).forEach((def): void => {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"description": "Types generated augmentation",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=16"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-augment#readme",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"description": "Implementation of the SCALE codec",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=16"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-codec#readme",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { Bool, Option } from '@polkadot/types-codec';
|
||||
import type { CodecTo } from '@polkadot/types-codec/types';
|
||||
|
||||
import { TypeRegistry } from '@polkadot/types';
|
||||
import { Bool, Enum, Option, Struct, Text, U32, Vec } from '@polkadot/types-codec';
|
||||
import { Enum, Struct, Text, U32, Vec } from '@polkadot/types-codec';
|
||||
|
||||
import { TEST_A } from './Struct.data.js';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"description": "Type creator helpers",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=16"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-create#readme",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
// Copyright 2017-2023 @polkadot/types-create authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Bytes } from '@polkadot/types-codec';
|
||||
import type { Codec, CodecClass, IU8a, Registry } from '@polkadot/types-codec/types';
|
||||
import type { CreateOptions } from '../types/index.js';
|
||||
|
||||
import { Bytes, Option } from '@polkadot/types-codec';
|
||||
import { Option } from '@polkadot/types-codec';
|
||||
import { isHex, isU8a, u8aEq, u8aToHex, u8aToU8a } from '@polkadot/util';
|
||||
|
||||
import { createClassUnsafe } from './class.js';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"description": "Known type definitions",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=16"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"description": "Supporting files for types, mostly for testing",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=16"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-support#readme",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"description": "Implementation of the Parity codec",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=16"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
/// <reference types="@polkadot/dev-test/globals.d.ts" />
|
||||
|
||||
import { CodecSet, Int } from '@polkadot/types-codec';
|
||||
import type { CodecSet } from '@polkadot/types-codec';
|
||||
|
||||
import { Int } from '@polkadot/types-codec';
|
||||
|
||||
import { createClass, TypeRegistry } from './index.js';
|
||||
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
|
||||
import type { GenericEthereumAccountId as AccountId } from './AccountId.js';
|
||||
|
||||
import { Raw } from '@polkadot/types-codec';
|
||||
|
||||
import { TypeRegistry } from '../create/index.js';
|
||||
import { GenericEthereumAccountId as AccountId } from './AccountId.js';
|
||||
|
||||
describe('EthereumAccountId', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
|
||||
/// <reference types="@polkadot/dev-test/globals.d.ts" />
|
||||
|
||||
import type { GenericAccountIndex as AccountIndex } from '../generic/index.js';
|
||||
import type { GenericEthereumAccountId as AccountId, GenericEthereumLookupSource as Address } from './index.js';
|
||||
|
||||
import { TypeRegistry } from '../create/index.js';
|
||||
import { GenericAccountIndex as AccountIndex } from '../generic/index.js';
|
||||
import { GenericEthereumAccountId as AccountId, GenericEthereumLookupSource as Address } from './index.js';
|
||||
|
||||
describe('EthereumLookupSource', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
// Copyright 2017-2023 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Bytes } from '@polkadot/types-codec';
|
||||
import type { AnyJson, BareOpts, Registry } from '@polkadot/types-codec/types';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { BlockHash } from '../interfaces/chain/index.js';
|
||||
import type { ExtrinsicPayloadV4 } from '../interfaces/extrinsics/index.js';
|
||||
import type { ExtrinsicPayloadValue, ICompact, IKeyringPair, INumber } from '../types/index.js';
|
||||
import type { GenericExtrinsicEra } from './ExtrinsicEra.js';
|
||||
|
||||
import { AbstractBase, Bytes } from '@polkadot/types-codec';
|
||||
import { AbstractBase } from '@polkadot/types-codec';
|
||||
import { u8aToHex } from '@polkadot/util';
|
||||
|
||||
import { DEFAULT_VERSION } from './constants.js';
|
||||
import { GenericExtrinsicEra } from './ExtrinsicEra.js';
|
||||
|
||||
interface ExtrinsicPayloadOptions {
|
||||
version?: number;
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Copyright 2017-2023 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Text, Vec } from '@polkadot/types-codec';
|
||||
import type { Registry } from '@polkadot/types-codec/types';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { Address, BlockHash, Call, ExtrinsicEra, Hash } from '../interfaces/index.js';
|
||||
import type { Codec, ICompact, INumber, IRuntimeVersion, ISignerPayload, SignerPayloadJSON, SignerPayloadRaw } from '../types/index.js';
|
||||
|
||||
import { Option, Struct, Text, Vec } from '@polkadot/types-codec';
|
||||
import { Option, Struct } from '@polkadot/types-codec';
|
||||
import { objectProperty, objectSpread, u8aToHex } from '@polkadot/util';
|
||||
|
||||
export interface SignerPayloadType extends Codec {
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { SignOptions } from '@polkadot/keyring/types';
|
||||
import type { Bytes } from '@polkadot/types-codec';
|
||||
import type { Inspect, Registry } from '@polkadot/types-codec/types';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { BlockHash } from '../../interfaces/chain/index.js';
|
||||
import type { ExtrinsicEra } from '../../interfaces/extrinsics/index.js';
|
||||
import type { ExtrinsicPayloadValue, ICompact, IKeyringPair, INumber, IOption } from '../../types/index.js';
|
||||
|
||||
import { Bytes, Enum, Struct } from '@polkadot/types-codec';
|
||||
import { Enum, Struct } from '@polkadot/types-codec';
|
||||
import { objectSpread } from '@polkadot/util';
|
||||
|
||||
import { sign } from '../util.js';
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
// Copyright 2017-2023 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Option, Text, u32, Vec } from '@polkadot/types-codec';
|
||||
import type { Registry } from '@polkadot/types-codec/types';
|
||||
import type { Codec } from '../types/index.js';
|
||||
|
||||
import { Json, Option, Text, u32, Vec } from '@polkadot/types-codec';
|
||||
import { Json } from '@polkadot/types-codec';
|
||||
import { isFunction, isNull, isUndefined } from '@polkadot/util';
|
||||
|
||||
function createValue (registry: Registry, type: string, value: unknown, asArray = true): Option<Codec> {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
// Copyright 2017-2023 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Bytes, u32 } from '@polkadot/types-codec';
|
||||
import type { AnyU8a, Registry } from '@polkadot/types-codec/types';
|
||||
import type { AccountId, RawAuraPreDigest, RawBabePreDigestCompat } from '../interfaces/index.js';
|
||||
|
||||
import { Bytes, U8aFixed, u32 } from '@polkadot/types-codec';
|
||||
import { U8aFixed } from '@polkadot/types-codec';
|
||||
import { BN, bnToU8a, isNumber, stringToU8a, u8aToHex, u8aToString } from '@polkadot/util';
|
||||
|
||||
export const CID_AURA = /*#__PURE__*/ stringToU8a('aura');
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
|
||||
/// <reference types="@polkadot/dev-test/globals.d.ts" />
|
||||
|
||||
import type { GenericAccountId as AccountId, GenericAccountIndex as AccountIndex, GenericLookupSource as LookupSource } from './index.js';
|
||||
|
||||
import { TypeRegistry } from '../create/index.js';
|
||||
import { GenericAccountId as AccountId, GenericAccountIndex as AccountIndex, GenericLookupSource as LookupSource } from './index.js';
|
||||
|
||||
describe('LookupSource', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
// Copyright 2017-2023 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Option, Text, Type, Vec } from '@polkadot/types-codec';
|
||||
import type { Option, Text, Type, u32, Vec } from '@polkadot/types-codec';
|
||||
import type { AnyString, LookupString, Registry } from '@polkadot/types-codec/types';
|
||||
import type { ILookup, TypeDef } from '@polkadot/types-create/types';
|
||||
import type { PortableType } from '../../interfaces/metadata/index.js';
|
||||
import type { SiField, SiLookupTypeId, SiType, SiTypeDefArray, SiTypeDefBitSequence, SiTypeDefCompact, SiTypeDefComposite, SiTypeDefSequence, SiTypeDefTuple, SiTypeDefVariant, SiTypeParameter, SiVariant } from '../../interfaces/scaleInfo/index.js';
|
||||
|
||||
import { sanitize, Struct, u32 } from '@polkadot/types-codec';
|
||||
import { sanitize, Struct } from '@polkadot/types-codec';
|
||||
import { getTypeDef, TypeDefInfo, withTypeString } from '@polkadot/types-create';
|
||||
import { assertUnreachable, isNumber, isString, logger, objectSpread, stringCamelCase, stringify, stringPascalCase } from '@polkadot/util';
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
import type { ICompact, Inspect, INumber } from '@polkadot/types-codec/types';
|
||||
import type { StorageEntryMetadataLatest, StorageHasher } from '../../../interfaces/metadata/index.js';
|
||||
import type { StorageKey } from '../../../primitive/index.js';
|
||||
import type { StorageEntry, StorageEntryIterator } from '../../../primitive/types.js';
|
||||
import type { Registry } from '../../../types/index.js';
|
||||
|
||||
@@ -10,7 +11,6 @@ import { Raw } from '@polkadot/types-codec';
|
||||
import { compactAddLength, compactStripLength, isUndefined, objectSpread, stringCamelCase, u8aConcat, u8aToU8a } from '@polkadot/util';
|
||||
import { xxhashAsU8a } from '@polkadot/util-crypto';
|
||||
|
||||
import { StorageKey } from '../../../primitive/index.js';
|
||||
import { getSiName } from '../../util/index.js';
|
||||
import { getHasher } from './getHasher.js';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2023 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Option, Text, u8 } from '@polkadot/types-codec';
|
||||
import type { AnyJson, Registry } from '@polkadot/types-codec/types';
|
||||
import type { MetadataLatest, PalletCallMetadataLatest } from '../../interfaces/metadata/index.js';
|
||||
|
||||
import { Option, Text, u8 } from '@polkadot/types-codec';
|
||||
import { objectSpread } from '@polkadot/util';
|
||||
|
||||
interface ModuleMetadataTrimmed {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
// Copyright 2017-2023 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Bytes } from '@polkadot/types-codec';
|
||||
import type { IU8a, Registry } from '@polkadot/types-codec/types';
|
||||
import type { H256 } from '../interfaces/runtime/index.js';
|
||||
|
||||
import { Bytes, Enum } from '@polkadot/types-codec';
|
||||
import { Enum } from '@polkadot/types-codec';
|
||||
import { isString, isU8a, u8aToU8a } from '@polkadot/util';
|
||||
|
||||
/** @internal */
|
||||
|
||||
Reference in New Issue
Block a user