Convert jsonrpc & typings to definitions (#2064)
* Convert jsonrpc & typings to definitions * Handle empty interface generation (no types) * Move jsonrpc/create to rpc-core/create * Create imports * Remove jsonrpc package, generate rpc-core from defs * Debug :) * Generate RPC definitions via interfaces * Generate md docs * Remove @polkadot/jsonrpc refs (at least packages) * No empty types * Add PAHNTOM "cleanup" gen * *sigh* regex loop * Update mock for no jsonrpc * Add definition export types * Cleanup linting * Mocking 1 fix * Mocking 2 fix * rpc-core tests updates * CHANGELOG & docs * Add jsonrpc (already mapped) to interfaces * Add aliasses for RPCs * Fix rpc-core tests
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Compact, Option, Raw, Vec } from '@polkadot/types/codec';
|
||||
import { BitVec, Bytes, Data, Null, StorageKey, Text, Type, U256, Unconstructable, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types/primitive';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { AnyJson, ArrayElementType, Registry } from '../types';
|
||||
import democracyDef from '../interfaces/democracy/definitions';
|
||||
import { AllConvictions } from '../interfaces/democracy/definitions';
|
||||
import { Conviction } from '../interfaces/democracy';
|
||||
|
||||
import { isBoolean, isNumber, isU8a, isUndefined } from '@polkadot/util';
|
||||
@@ -11,12 +11,10 @@ import { isBoolean, isNumber, isU8a, isUndefined } from '@polkadot/util';
|
||||
import U8aFixed from '../codec/U8aFixed';
|
||||
import Bool from '../primitive/Bool';
|
||||
|
||||
export const convictionNames = democracyDef.types.Conviction._enum;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
type InputTypes = boolean | number | Boolean | Uint8Array | {
|
||||
aye: boolean;
|
||||
conviction?: number | ArrayElementType<typeof convictionNames>;
|
||||
conviction?: number | ArrayElementType<typeof AllConvictions>;
|
||||
};
|
||||
|
||||
// For votes, the topmost bit indicated aye/nay, the lower bits indicate the conviction
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright 2017-2020 @polkadot/types authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {
|
||||
nextIndex: {
|
||||
alias: ['system_accountNextIndex'],
|
||||
description: 'Retrieves the next accountIndex as available on the node',
|
||||
params: [
|
||||
{
|
||||
name: 'accountId',
|
||||
type: 'AccountId'
|
||||
}
|
||||
],
|
||||
type: 'Index'
|
||||
}
|
||||
},
|
||||
types: {}
|
||||
} as Definitions;
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export type PHANTOM_ACCOUNT = 'account';
|
||||
@@ -2,7 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
BlockAttestations: {
|
||||
receipt: 'CandidateReceipt',
|
||||
@@ -18,4 +21,4 @@ export default {
|
||||
},
|
||||
MoreAttestations: {}
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Struct, Vec } from '@polkadot/types/codec';
|
||||
import { CandidateReceipt, ParaId } from '@polkadot/types/interfaces/parachains';
|
||||
@@ -24,3 +24,5 @@ export interface IncludedBlocks extends Struct {
|
||||
|
||||
/** @name MoreAttestations */
|
||||
export interface MoreAttestations extends Struct {}
|
||||
|
||||
export type PHANTOM_ATTESTATIONS = 'attestations';
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
RawAuraPreDigest: {
|
||||
slotNumber: 'u64'
|
||||
}
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Struct } from '@polkadot/types/codec';
|
||||
import { u64 } from '@polkadot/types/primitive';
|
||||
@@ -8,3 +8,5 @@ import { u64 } from '@polkadot/types/primitive';
|
||||
export interface RawAuraPreDigest extends Struct {
|
||||
readonly slotNumber: u64;
|
||||
}
|
||||
|
||||
export type PHANTOM_AURA = 'aura';
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
// Copyright 2017-2020 @polkadot/types authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {
|
||||
hasKey: {
|
||||
description: 'Returns true if the keystore has private keys for the given public key and key type.',
|
||||
params: [
|
||||
{
|
||||
name: 'publicKey',
|
||||
type: 'Bytes'
|
||||
},
|
||||
{
|
||||
name: 'keyType',
|
||||
type: 'Text'
|
||||
}
|
||||
],
|
||||
type: 'bool'
|
||||
},
|
||||
hasSessionKeys: {
|
||||
description: 'Returns true if the keystore has private keys for the given session public keys.',
|
||||
params: [
|
||||
{
|
||||
name: 'sessionKeys',
|
||||
type: 'Bytes'
|
||||
}
|
||||
],
|
||||
type: 'bool'
|
||||
},
|
||||
removeExtrinsic: {
|
||||
description: 'Remove given extrinsic from the pool and temporarily ban it to prevent reimporting',
|
||||
params: [
|
||||
{
|
||||
name: 'bytesOrHash',
|
||||
type: 'Vec<ExtrinsicOrHash>'
|
||||
}
|
||||
],
|
||||
type: 'Vec<Hash>'
|
||||
},
|
||||
insertKey: {
|
||||
description: 'Insert a key into the keystore.',
|
||||
params: [
|
||||
{
|
||||
name: 'keyType',
|
||||
type: 'Text'
|
||||
},
|
||||
{
|
||||
name: 'suri',
|
||||
type: 'Text'
|
||||
},
|
||||
{
|
||||
name: 'publicKey',
|
||||
type: 'Bytes'
|
||||
}
|
||||
],
|
||||
type: 'Bytes'
|
||||
},
|
||||
rotateKeys: {
|
||||
description: 'Generate new session keys and returns the corresponding public keys',
|
||||
params: [],
|
||||
type: 'Bytes'
|
||||
},
|
||||
pendingExtrinsics: {
|
||||
description: 'Returns all pending extrinsics, potentially grouped by sender',
|
||||
params: [],
|
||||
type: 'Vec<Extrinsic>'
|
||||
},
|
||||
submitExtrinsic: {
|
||||
isSigned: true,
|
||||
description: 'Submit a fully formatted extrinsic for block inclusion',
|
||||
params: [
|
||||
{
|
||||
name: 'extrinsic',
|
||||
type: 'Extrinsic'
|
||||
}
|
||||
],
|
||||
type: 'Hash'
|
||||
},
|
||||
submitAndWatchExtrinsic: {
|
||||
description: 'Submit and subscribe to watch an extrinsic until unsubscribed',
|
||||
isSigned: true,
|
||||
params: [
|
||||
{
|
||||
name: 'extrinsic',
|
||||
type: 'Extrinsic'
|
||||
}
|
||||
],
|
||||
pubsub: [
|
||||
'extrinsicUpdate',
|
||||
'submitAndWatchExtrinsic',
|
||||
'unwatchExtrinsic'
|
||||
],
|
||||
type: 'ExtrinsicStatus'
|
||||
}
|
||||
},
|
||||
types: {}
|
||||
} as Definitions;
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export type PHANTOM_AUTHOR = 'author';
|
||||
@@ -2,7 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
UncleEntryItem: {
|
||||
_enum: {
|
||||
@@ -11,4 +14,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
import { Enum, Option } from '@polkadot/types/codec';
|
||||
@@ -12,3 +12,5 @@ export interface UncleEntryItem extends Enum {
|
||||
readonly isUncle: boolean;
|
||||
readonly asUncle: ITuple<[Hash, Option<AccountId>]>;
|
||||
}
|
||||
|
||||
export type PHANTOM_AUTHORSHIP = 'authorship';
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
BabeAuthorityWeight: 'u64',
|
||||
BabeBlockWeight: 'u32',
|
||||
@@ -59,4 +62,4 @@ export default {
|
||||
VrfData: '[u8; 32]',
|
||||
VrfProof: '[u8; 64]'
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Enum, Option, Struct, U8aFixed } from '@polkadot/types/codec';
|
||||
import { u32, u64 } from '@polkadot/types/primitive';
|
||||
@@ -81,3 +81,5 @@ export interface VrfData extends U8aFixed {}
|
||||
|
||||
/** @name VrfProof */
|
||||
export interface VrfProof extends U8aFixed {}
|
||||
|
||||
export type PHANTOM_BABE = 'babe';
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
AccountData: {
|
||||
free: 'Balance',
|
||||
@@ -42,4 +45,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Enum, Set, Struct } from '@polkadot/types/codec';
|
||||
import { Balance, BlockNumber, LockIdentifier } from '@polkadot/types/interfaces/runtime';
|
||||
@@ -55,3 +55,5 @@ export interface WithdrawReasons extends Set {
|
||||
readonly isFee: boolean;
|
||||
readonly isTip: boolean;
|
||||
}
|
||||
|
||||
export type PHANTOM_BALANCES = 'balances';
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
// Copyright 2017-2020 @polkadot/types authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {
|
||||
getHeader: {
|
||||
alias: ['chain_getHead'],
|
||||
description: 'Retrieves the header for a specific block',
|
||||
params: [
|
||||
{
|
||||
name: 'hash',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'Header'
|
||||
},
|
||||
getBlock: {
|
||||
description: 'Get header and body of a relay chain block',
|
||||
params: [
|
||||
{
|
||||
name: 'hash',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'SignedBlock'
|
||||
},
|
||||
getBlockHash: {
|
||||
description: 'Get the block hash for a specific block',
|
||||
params: [
|
||||
{
|
||||
name: 'blockNumber',
|
||||
type: 'BlockNumber',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'BlockHash'
|
||||
},
|
||||
getFinalizedHead: {
|
||||
alias: ['chain_getFinalisedHead'],
|
||||
description: 'Get hash of the last finalized block in the canon chain',
|
||||
params: [],
|
||||
type: 'BlockHash'
|
||||
},
|
||||
subscribeNewHeads: {
|
||||
alias: ['chain_unsubscribeNewHeads', 'subscribe_newHead', 'unsubscribe_newHead'],
|
||||
description: 'Retrieves the best header via subscription',
|
||||
params: [],
|
||||
// NOTE These still has the aliassed version, compatible with 1.x
|
||||
pubsub: [
|
||||
'newHead',
|
||||
'subscribeNewHead',
|
||||
'unsubscribeNewHead'
|
||||
],
|
||||
type: 'Header'
|
||||
},
|
||||
subscribeFinalizedHeads: {
|
||||
alias: ['chain_subscribeFinalisedHeads', 'chain_unsubscribeFinalisedHeads'],
|
||||
description: 'Retrieves the best finalized header via subscription',
|
||||
params: [],
|
||||
pubsub: [
|
||||
'finalizedHead',
|
||||
'subscribeFinalizedHeads',
|
||||
'unsubscribeFinalizedHeads'
|
||||
],
|
||||
type: 'Header'
|
||||
},
|
||||
subscribeAllHeads: {
|
||||
description: 'Retrieves the newest header via subscription',
|
||||
params: [],
|
||||
pubsub: [
|
||||
'allHead',
|
||||
'subscribeAllHeads',
|
||||
'unsubscribeAllHeads'
|
||||
],
|
||||
type: 'Header'
|
||||
}
|
||||
},
|
||||
types: {}
|
||||
} as Definitions;
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export type PHANTOM_CHAIN = 'chain';
|
||||
@@ -2,8 +2,11 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
EthereumAddress: 'H160'
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { H160 } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name EthereumAddress */
|
||||
export interface EthereumAddress extends H160 {}
|
||||
|
||||
export type PHANTOM_CLAIMS = 'claims';
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
MemberCount: 'u32',
|
||||
ProposalIndex: 'u32',
|
||||
@@ -20,4 +23,4 @@ export default {
|
||||
end: 'BlockNumber'
|
||||
}
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Struct, Vec } from '@polkadot/types/codec';
|
||||
import { u32 } from '@polkadot/types/primitive';
|
||||
@@ -27,3 +27,5 @@ export interface VotesTo230 extends Struct {
|
||||
readonly ayes: Vec<AccountId>;
|
||||
readonly nays: Vec<AccountId>;
|
||||
}
|
||||
|
||||
export type PHANTOM_COLLECTIVE = 'collective';
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
AuthorityId: 'AccountId'
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { AccountId } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name AuthorityId */
|
||||
export interface AuthorityId extends AccountId {}
|
||||
|
||||
export type PHANTOM_CONSENSUS = 'consensus';
|
||||
|
||||
@@ -2,7 +2,45 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {
|
||||
call: {
|
||||
description: 'Executes a call to a contract',
|
||||
params: [
|
||||
{
|
||||
name: 'callRequest',
|
||||
type: 'ContractCallRequest'
|
||||
},
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'ContractExecResult'
|
||||
},
|
||||
getStorage: {
|
||||
description: 'Returns the value under a specified storage key in a contract',
|
||||
params: [
|
||||
{
|
||||
name: 'address',
|
||||
type: 'AccountId'
|
||||
},
|
||||
{
|
||||
name: 'key',
|
||||
type: 'H256'
|
||||
},
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'Option<Bytes>'
|
||||
}
|
||||
},
|
||||
types: {
|
||||
AliveContractInfo: {
|
||||
trieId: 'TrieId',
|
||||
@@ -85,4 +123,4 @@ export default {
|
||||
TombstoneContractInfo: 'Hash',
|
||||
TrieId: 'Bytes'
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Compact, Enum, Option, Raw, Struct, U8aFixed } from '@polkadot/types/codec';
|
||||
import { Bytes, Null, bool, u32, u64, u8 } from '@polkadot/types/primitive';
|
||||
@@ -113,3 +113,5 @@ export interface TombstoneContractInfo extends Hash {}
|
||||
|
||||
/** @name TrieId */
|
||||
export interface TrieId extends Bytes {}
|
||||
|
||||
export type PHANTOM_CONTRACTS = 'contracts';
|
||||
|
||||
@@ -41,3 +41,10 @@ export { default as parachains } from './parachains/definitions';
|
||||
// pull in metadata & rpc last, assuming that is uses info from above
|
||||
export { default as metadata } from './metadata/definitions';
|
||||
export { default as rpc } from './rpc/definitions';
|
||||
|
||||
// rpc-only definitions
|
||||
export { default as account } from './account/definitions';
|
||||
export { default as author } from './author/definitions';
|
||||
export { default as chain } from './chain/definitions';
|
||||
export { default as payment } from './payment/definitions';
|
||||
export { default as state } from './state/definitions';
|
||||
|
||||
@@ -2,25 +2,32 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
const AllConvictions = [
|
||||
// 0.1x votes, unlocked.
|
||||
'None',
|
||||
// 1x votes, locked for an enactment period following a successful vote.
|
||||
'Locked1x',
|
||||
// 2x votes, locked for 2x enactment periods following a successful vote.
|
||||
'Locked2x',
|
||||
// 3x votes, locked for 4x...
|
||||
'Locked3x',
|
||||
// 4x votes, locked for 8x...
|
||||
'Locked4x',
|
||||
// 5x votes, locked for 16x...
|
||||
'Locked5x',
|
||||
/// 6x votes, locked for 32x...
|
||||
'Locked6x'
|
||||
];
|
||||
|
||||
export { AllConvictions };
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
Conviction: {
|
||||
_enum: [
|
||||
// 0.1x votes, unlocked.
|
||||
'None',
|
||||
// 1x votes, locked for an enactment period following a successful vote.
|
||||
'Locked1x',
|
||||
// 2x votes, locked for 2x enactment periods following a successful vote.
|
||||
'Locked2x',
|
||||
// 3x votes, locked for 4x...
|
||||
'Locked3x',
|
||||
// 4x votes, locked for 8x...
|
||||
'Locked4x',
|
||||
// 5x votes, locked for 16x...
|
||||
'Locked5x',
|
||||
/// 6x votes, locked for 32x...
|
||||
'Locked6x'
|
||||
]
|
||||
_enum: AllConvictions
|
||||
},
|
||||
PropIndex: 'u32',
|
||||
Proposal: 'Call',
|
||||
@@ -36,4 +43,4 @@ export default {
|
||||
delay: 'BlockNumber'
|
||||
}
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Enum, Struct } from '@polkadot/types/codec';
|
||||
import { u32 } from '@polkadot/types/primitive';
|
||||
@@ -39,3 +39,5 @@ export interface ReferendumInfo extends Struct {
|
||||
readonly threshold: VoteThreshold;
|
||||
readonly delay: BlockNumber;
|
||||
}
|
||||
|
||||
export type PHANTOM_DEMOCRACY = 'democracy';
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
ApprovalFlag: 'u32',
|
||||
SetIndex: 'u32',
|
||||
@@ -22,4 +25,4 @@ export default {
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Enum, Struct } from '@polkadot/types/codec';
|
||||
import { GenericVote } from '@polkadot/types/generic';
|
||||
@@ -32,3 +32,5 @@ export interface VoteThreshold extends Enum {
|
||||
readonly isSupermajorityrejection: boolean;
|
||||
readonly isSimplemajority: boolean;
|
||||
}
|
||||
|
||||
export type PHANTOM_ELECTIONS = 'elections';
|
||||
|
||||
@@ -2,7 +2,45 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {
|
||||
createBlock: {
|
||||
description: 'Instructs the manual-seal authorship task to create a new block',
|
||||
params: [
|
||||
{
|
||||
name: 'createEmpty',
|
||||
type: 'bool'
|
||||
},
|
||||
{
|
||||
name: 'finalize',
|
||||
type: 'bool'
|
||||
},
|
||||
{
|
||||
name: 'parentHash',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'CreatedBlock'
|
||||
},
|
||||
finalizeBlock: {
|
||||
description: 'Instructs the manual-seal authorship task to finalize a block',
|
||||
params: [
|
||||
{
|
||||
name: 'hash',
|
||||
type: 'BlockHash'
|
||||
},
|
||||
{
|
||||
name: 'justification',
|
||||
type: 'Justification',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'bool'
|
||||
}
|
||||
},
|
||||
types: {
|
||||
CreatedBlock: {
|
||||
hash: 'BlockHash',
|
||||
@@ -17,4 +55,4 @@ export default {
|
||||
isNewBest: 'bool'
|
||||
}
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Struct } from '@polkadot/types/codec';
|
||||
import { bool } from '@polkadot/types/primitive';
|
||||
@@ -20,3 +20,5 @@ export interface ImportedAux extends Struct {
|
||||
readonly needsFinalityProof: bool;
|
||||
readonly isNewBest: bool;
|
||||
}
|
||||
|
||||
export type PHANTOM_ENGINE = 'engine';
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
Account: {
|
||||
nonce: 'U256',
|
||||
@@ -14,4 +17,4 @@ export default {
|
||||
data: 'Bytes'
|
||||
}
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Struct, Vec } from '@polkadot/types/codec';
|
||||
import { Bytes, U256 } from '@polkadot/types/primitive';
|
||||
@@ -17,3 +17,5 @@ export interface Log extends Struct {
|
||||
readonly topics: Vec<H256>;
|
||||
readonly data: Bytes;
|
||||
}
|
||||
|
||||
export type PHANTOM_EVM = 'evm';
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
Extrinsic: 'GenericExtrinsic',
|
||||
ExtrinsicEra: 'GenericExtrinsicEra',
|
||||
@@ -40,4 +43,4 @@ export default {
|
||||
Ed25519Signature: 'H512',
|
||||
Sr25519Signature: 'H512'
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Enum, U8aFixed } from '@polkadot/types/codec';
|
||||
import { GenericExtrinsic, GenericExtrinsicEra, GenericExtrinsicPayload, GenericExtrinsicPayloadUnknown, GenericExtrinsicPayloadV1, GenericExtrinsicPayloadV2, GenericExtrinsicPayloadV3, GenericExtrinsicPayloadV4, GenericExtrinsicSignatureV1, GenericExtrinsicSignatureV2, GenericExtrinsicSignatureV3, GenericExtrinsicSignatureV4, GenericExtrinsicUnknown, GenericExtrinsicV1, GenericExtrinsicV2, GenericExtrinsicV3, GenericExtrinsicV4, GenericImmortalEra, GenericMortalEra, GenericSignerPayload } from '@polkadot/types/extrinsic';
|
||||
@@ -86,3 +86,5 @@ export interface SignerPayload extends GenericSignerPayload {}
|
||||
|
||||
/** @name Sr25519Signature */
|
||||
export interface Sr25519Signature extends H512 {}
|
||||
|
||||
export type PHANTOM_EXTRINSICS = 'extrinsics';
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
AssetOptions: {
|
||||
initalIssuance: 'Compact<Balance>',
|
||||
@@ -26,4 +29,4 @@ export default {
|
||||
},
|
||||
PermissionLatest: 'PermissionsV1'
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Compact, Enum, Struct } from '@polkadot/types/codec';
|
||||
import { AccountId, Balance } from '@polkadot/types/interfaces/runtime';
|
||||
@@ -32,3 +32,5 @@ export interface PermissionVersions extends Enum {
|
||||
readonly isV1: boolean;
|
||||
readonly asV1: PermissionsV1;
|
||||
}
|
||||
|
||||
export type PHANTOM_GENERICASSET = 'genericAsset';
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
AuthorityIndex: 'u64',
|
||||
AuthorityList: 'Vec<NextAuthority>',
|
||||
@@ -39,4 +42,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
import { Enum, Struct, Vec } from '@polkadot/types/codec';
|
||||
@@ -50,3 +50,5 @@ export interface StoredState extends Enum {
|
||||
readonly isPendingResume: boolean;
|
||||
readonly asPendingResume: PendingResume;
|
||||
}
|
||||
|
||||
export type PHANTOM_GRANDPA = 'grandpa';
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
IdentityFields: {
|
||||
_set: {
|
||||
@@ -54,4 +57,4 @@ export default {
|
||||
fields: 'IdentityFields'
|
||||
}
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
import { Enum, Option, Set, Struct, Vec } from '@polkadot/types/codec';
|
||||
@@ -65,3 +65,5 @@ export interface Registration extends Struct {
|
||||
|
||||
/** @name RegistrationJudgement */
|
||||
export interface RegistrationJudgement extends ITuple<[RegistrarIndex, IdentityJudgement]> {}
|
||||
|
||||
export type PHANTOM_IDENTITY = 'identity';
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
AuthIndex: 'u32',
|
||||
AuthoritySignature: 'Signature',
|
||||
@@ -19,4 +22,4 @@ export default {
|
||||
externalAddresses: 'Vec<OpaqueMultiaddr>'
|
||||
}
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Struct, Vec } from '@polkadot/types/codec';
|
||||
import { Bytes, u32 } from '@polkadot/types/primitive';
|
||||
@@ -32,3 +32,5 @@ export interface OpaqueNetworkState extends Struct {
|
||||
|
||||
/** @name OpaquePeerId */
|
||||
export interface OpaquePeerId extends Bytes {}
|
||||
|
||||
export type PHANTOM_IMONLINE = 'imOnline';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
// Copyright 2017-2020 @polkadot/types authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { DefinitionRpcExt, DefinitionRpcSub } from '../types';
|
||||
|
||||
import * as definitions from './definitions';
|
||||
|
||||
const jsonrpc: Record<string, Record<string, DefinitionRpcExt>> = {};
|
||||
|
||||
Object
|
||||
.keys(definitions)
|
||||
.filter((key) => Object.keys(definitions[key as 'babe'].rpc || {}).length !== 0)
|
||||
.forEach((section): void => {
|
||||
jsonrpc[section] = {};
|
||||
|
||||
Object
|
||||
.entries(definitions[section as 'babe'].rpc)
|
||||
.forEach(([method, def]): void => {
|
||||
const isSubscription = !!(def as DefinitionRpcSub).pubsub;
|
||||
|
||||
jsonrpc[section][method] = ({ ...def, isSubscription, jsonrpc: `${section}_${method}`, method, section });
|
||||
});
|
||||
});
|
||||
|
||||
export default jsonrpc;
|
||||
@@ -2,7 +2,23 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
const AllHashers = {
|
||||
Blake2_128: null, // eslint-disable-line @typescript-eslint/camelcase
|
||||
Blake2_256: null, // eslint-disable-line @typescript-eslint/camelcase
|
||||
Blake2_128Concat: null, // eslint-disable-line @typescript-eslint/camelcase
|
||||
Twox128: null,
|
||||
Twox256: null,
|
||||
Twox64Concat: null,
|
||||
// new in v11
|
||||
Identity: null
|
||||
};
|
||||
|
||||
export { AllHashers };
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
// v0
|
||||
CallMetadataV0: {
|
||||
@@ -486,16 +502,7 @@ export default {
|
||||
items: 'Vec<StorageEntryMetadataV11>'
|
||||
},
|
||||
StorageHasherV11: {
|
||||
_enum: {
|
||||
Blake2_128: null, // eslint-disable-line @typescript-eslint/camelcase
|
||||
Blake2_256: null, // eslint-disable-line @typescript-eslint/camelcase
|
||||
Blake2_128Concat: null, // eslint-disable-line @typescript-eslint/camelcase
|
||||
Twox128: null,
|
||||
Twox256: null,
|
||||
Twox64Concat: null,
|
||||
// new in v11
|
||||
Identity: null
|
||||
}
|
||||
_enum: AllHashers
|
||||
},
|
||||
|
||||
// This always maps to the latest
|
||||
@@ -533,4 +540,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
import { Enum, Option, Struct, Vec } from '@polkadot/types/codec';
|
||||
@@ -865,3 +865,5 @@ export interface StorageMetadataV8 extends StorageMetadataV7 {}
|
||||
|
||||
/** @name StorageMetadataV9 */
|
||||
export interface StorageMetadataV9 extends StorageMetadataV8 {}
|
||||
|
||||
export type PHANTOM_METADATA = 'metadata';
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
Kind: '[u8; 16]',
|
||||
OffenceDetails: {
|
||||
@@ -14,4 +17,4 @@ export default {
|
||||
ReportIdOf: 'Hash',
|
||||
Reporter: 'AccountId'
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Struct, U8aFixed, Vec } from '@polkadot/types/codec';
|
||||
import { Bytes } from '@polkadot/types/primitive';
|
||||
@@ -26,3 +26,5 @@ export interface Reporter extends AccountId {}
|
||||
|
||||
/** @name ReportIdOf */
|
||||
export interface ReportIdOf extends Hash {}
|
||||
|
||||
export type PHANTOM_OFFENCES = 'offences';
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
AttestedCandidate: {
|
||||
candidate: 'CandidateReceipt',
|
||||
@@ -100,4 +103,4 @@ export default {
|
||||
WinningDataEntry: '(AccountId, ParaIdOf, BalanceOf)',
|
||||
WinningData: '[WinningDataEntry; 10]'
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
import { Enum, Struct, Vec } from '@polkadot/types/codec';
|
||||
@@ -151,3 +151,5 @@ export interface WinningData extends Vec<WinningDataEntry> {}
|
||||
|
||||
/** @name WinningDataEntry */
|
||||
export interface WinningDataEntry extends ITuple<[AccountId, ParaIdOf, BalanceOf]> {}
|
||||
|
||||
export type PHANTOM_PARACHAINS = 'parachains';
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
// Copyright 2017-2020 @polkadot/types authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {
|
||||
queryInfo: {
|
||||
description: 'Retrieves the fee information for an encoded extrinsic',
|
||||
params: [
|
||||
{
|
||||
name: 'extrinsic',
|
||||
type: 'Bytes'
|
||||
},
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'RuntimeDispatchInfo'
|
||||
}
|
||||
},
|
||||
types: {}
|
||||
} as Definitions;
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export type PHANTOM_PAYMENT = 'payment';
|
||||
@@ -2,7 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
ActiveRecovery: {
|
||||
created: 'BlockNumber',
|
||||
@@ -16,4 +19,4 @@ export default {
|
||||
threshold: 'u16'
|
||||
}
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Struct, Vec } from '@polkadot/types/codec';
|
||||
import { u16 } from '@polkadot/types/primitive';
|
||||
@@ -19,3 +19,5 @@ export interface RecoveryConfig extends Struct {
|
||||
readonly friends: Vec<AccountId>;
|
||||
readonly threshold: u16;
|
||||
}
|
||||
|
||||
export type PHANTOM_RECOVERY = 'recovery';
|
||||
|
||||
@@ -2,7 +2,16 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {
|
||||
methods: {
|
||||
description: 'Retrieves the list of RPC methods that are exposed by the node',
|
||||
params: [],
|
||||
type: 'RpcMethods'
|
||||
}
|
||||
},
|
||||
types: {
|
||||
ApiId: '[u8; 8]',
|
||||
BlockHash: 'Hash',
|
||||
@@ -113,4 +122,4 @@ export default {
|
||||
changes: 'Vec<KeyValueOption>'
|
||||
}
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
import { Enum, HashMap, Option, Struct, U8aFixed, Vec } from '@polkadot/types/codec';
|
||||
@@ -155,3 +155,5 @@ export interface StorageChangeSet extends Struct {
|
||||
readonly block: Hash;
|
||||
readonly changes: Vec<KeyValueOption>;
|
||||
}
|
||||
|
||||
export type PHANTOM_RPC = 'rpc';
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
AccountId: 'GenericAccountId',
|
||||
AccountIdOf: 'AccountId',
|
||||
@@ -85,4 +88,4 @@ export default {
|
||||
Seal: '(ConsensusEngineId, Bytes)',
|
||||
Consensus: '(ConsensusEngineId, Bytes)'
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
import { Compact, Enum, Int, Struct, U8aFixed, Vec } from '@polkadot/types/codec';
|
||||
@@ -185,3 +185,5 @@ export interface Weight extends u32 {}
|
||||
|
||||
/** @name WeightMultiplier */
|
||||
export interface WeightMultiplier extends Fixed64 {}
|
||||
|
||||
export type PHANTOM_RUNTIME = 'runtime';
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
// The runtime definition of SessionKeys are passed as a Trait to session
|
||||
// Defined in `node/runtime/src/lib.rs` as follow
|
||||
// impl_opaque_keys! {
|
||||
@@ -24,10 +26,11 @@ const keyTypes = {
|
||||
};
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
...keyTypes,
|
||||
FullIdentification: 'Exposure',
|
||||
IdentificationTuple: '(ValidatorId, FullIdentification)',
|
||||
SessionIndex: 'u32'
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
import { u32 } from '@polkadot/types/primitive';
|
||||
@@ -35,3 +35,5 @@ export interface SessionKeys5 extends ITuple<[AccountId, AccountId, AccountId, A
|
||||
|
||||
/** @name SessionKeys6 */
|
||||
export interface SessionKeys6 extends ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]> {}
|
||||
|
||||
export type PHANTOM_SESSION = 'session';
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
Bid: {
|
||||
who: 'AccountId',
|
||||
@@ -28,4 +31,4 @@ export default {
|
||||
_enum: ['Vouching', 'Banned']
|
||||
}
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
import { Enum, Struct } from '@polkadot/types/codec';
|
||||
@@ -43,3 +43,5 @@ export interface VouchingStatus extends Enum {
|
||||
readonly isVouching: boolean;
|
||||
readonly isBanned: boolean;
|
||||
}
|
||||
|
||||
export type PHANTOM_SOCIETY = 'society';
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
const deprecated = {
|
||||
Points: 'u32',
|
||||
EraPoints: {
|
||||
@@ -11,6 +13,7 @@ const deprecated = {
|
||||
};
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
...deprecated,
|
||||
ActiveEraInfo: {
|
||||
@@ -156,4 +159,4 @@ export default {
|
||||
validatorPayment: 'Compact<Balance>'
|
||||
}
|
||||
}
|
||||
};
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
/* eslint-disable */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
import { BTreeMap, Compact, Enum, Option, Struct, Vec } from '@polkadot/types/codec';
|
||||
@@ -218,3 +218,5 @@ export interface ValidatorPrefsTo145 extends Struct {
|
||||
export interface ValidatorPrefsTo196 extends Struct {
|
||||
readonly validatorPayment: Compact<Balance>;
|
||||
}
|
||||
|
||||
export type PHANTOM_STAKING = 'staking';
|
||||
|
||||
@@ -0,0 +1,295 @@
|
||||
// Copyright 2017-2020 @polkadot/types authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {
|
||||
call: {
|
||||
alias: ['state_callAt'],
|
||||
description: 'Perform a call to a builtin on the chain',
|
||||
params: [
|
||||
{
|
||||
name: 'method',
|
||||
type: 'Text'
|
||||
},
|
||||
{
|
||||
name: 'data',
|
||||
type: 'Bytes'
|
||||
},
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'Bytes'
|
||||
},
|
||||
getKeys: {
|
||||
description: 'Retrieves the keys with a certain prefix',
|
||||
params: [
|
||||
{
|
||||
name: 'key',
|
||||
type: 'StorageKey'
|
||||
},
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'Vec<StorageKey>'
|
||||
},
|
||||
getKeysPaged: {
|
||||
alias: ['state_getKeysPagedAt'],
|
||||
description: 'Returns the keys with prefix with pagination support.',
|
||||
params: [
|
||||
{
|
||||
name: 'key',
|
||||
type: 'StorageKey'
|
||||
},
|
||||
{
|
||||
name: 'count',
|
||||
type: 'u32'
|
||||
},
|
||||
{
|
||||
name: 'startKey',
|
||||
type: 'StorageKey',
|
||||
isOptional: true
|
||||
},
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'Vec<StorageKey>'
|
||||
},
|
||||
getStorage: {
|
||||
alias: ['state_getStorageAt'],
|
||||
description: 'Retrieves the storage for a key',
|
||||
params: [
|
||||
{
|
||||
name: 'key',
|
||||
type: 'StorageKey'
|
||||
},
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'StorageData'
|
||||
},
|
||||
getStorageHash: {
|
||||
alias: ['state_getStorageHashAt'],
|
||||
description: 'Retrieves the storage hash',
|
||||
params: [
|
||||
{
|
||||
name: 'key',
|
||||
type: 'StorageKey'
|
||||
},
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'Hash'
|
||||
},
|
||||
getStorageSize: {
|
||||
alias: ['state_getStorageSizeAt'],
|
||||
description: 'Retrieves the storage size',
|
||||
params: [
|
||||
{
|
||||
name: 'key',
|
||||
type: 'StorageKey'
|
||||
},
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'u64'
|
||||
},
|
||||
getChildKeys: {
|
||||
description: 'Retrieves the keys with prefix of a specific child storage',
|
||||
params: [
|
||||
{
|
||||
name: 'childStorageKey',
|
||||
type: 'StorageKey'
|
||||
},
|
||||
{
|
||||
name: 'childDefinition',
|
||||
type: 'StorageKey'
|
||||
},
|
||||
{
|
||||
name: 'childType',
|
||||
type: 'u32'
|
||||
},
|
||||
{
|
||||
name: 'key',
|
||||
type: 'StorageKey'
|
||||
},
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'Vec<StorageKey>'
|
||||
},
|
||||
getChildStorage: {
|
||||
description: 'Retrieves the child storage for a key',
|
||||
params: [
|
||||
{
|
||||
name: 'childStorageKey',
|
||||
type: 'StorageKey'
|
||||
},
|
||||
{
|
||||
name: 'childDefinition',
|
||||
type: 'StorageKey'
|
||||
},
|
||||
{
|
||||
name: 'childType',
|
||||
type: 'u32'
|
||||
},
|
||||
{
|
||||
name: 'key',
|
||||
type: 'StorageKey'
|
||||
},
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'StorageData'
|
||||
},
|
||||
getChildStorageHash: {
|
||||
description: 'Retrieves the child storage hash',
|
||||
params: [
|
||||
{
|
||||
name: 'childStorageKey',
|
||||
type: 'StorageKey'
|
||||
},
|
||||
{
|
||||
name: 'childDefinition',
|
||||
type: 'StorageKey'
|
||||
},
|
||||
{
|
||||
name: 'childType',
|
||||
type: 'u32'
|
||||
},
|
||||
{
|
||||
name: 'key',
|
||||
type: 'StorageKey'
|
||||
},
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'Hash'
|
||||
},
|
||||
getChildStorageSize: {
|
||||
description: 'Retrieves the child storage size',
|
||||
params: [
|
||||
{
|
||||
name: 'childStorageKey',
|
||||
type: 'StorageKey'
|
||||
},
|
||||
{
|
||||
name: 'childDefinition',
|
||||
type: 'StorageKey'
|
||||
},
|
||||
{
|
||||
name: 'childType',
|
||||
type: 'u32'
|
||||
},
|
||||
{
|
||||
name: 'key',
|
||||
type: 'StorageKey'
|
||||
},
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'u64'
|
||||
},
|
||||
getMetadata: {
|
||||
description: 'Returns the runtime metadata',
|
||||
params: [
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'Metadata'
|
||||
},
|
||||
getRuntimeVersion: {
|
||||
alias: ['chain_getRuntimeVersion'],
|
||||
description: 'Get the runtime version',
|
||||
params: [
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'RuntimeVersion'
|
||||
},
|
||||
queryStorage: {
|
||||
description: 'Query historical storage entries (by key) starting from a start block',
|
||||
params: [
|
||||
{
|
||||
name: 'keys',
|
||||
type: 'Vec<StorageKey>'
|
||||
},
|
||||
{
|
||||
name: 'startBlock',
|
||||
type: 'Hash'
|
||||
},
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'Vec<StorageChangeSet>'
|
||||
},
|
||||
subscribeRuntimeVersion: {
|
||||
alias: ['chain_subscribeRuntimeVersion', 'chain_unsubscribeRuntimeVersion'],
|
||||
description: 'Retrieves the runtime version via subscription',
|
||||
params: [],
|
||||
pubsub: [
|
||||
'runtimeVersion',
|
||||
'subscribeRuntimeVersion',
|
||||
'unsubscribeRuntimeVersion'
|
||||
],
|
||||
type: 'RuntimeVersion'
|
||||
},
|
||||
subscribeStorage: {
|
||||
description: 'Subscribes to storage changes for the provided keys',
|
||||
params: [
|
||||
{
|
||||
name: 'keys',
|
||||
type: 'Vec<StorageKey>'
|
||||
}
|
||||
],
|
||||
pubsub: [
|
||||
'storage',
|
||||
'subscribeStorage',
|
||||
'unsubscribeStorage'
|
||||
],
|
||||
type: 'StorageChangeSet'
|
||||
}
|
||||
},
|
||||
types: {}
|
||||
} as Definitions;
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user