Cleanup interfaces/rpc, types to correct locations (#2084)
* Cleanup interfaces/rcp, types to correct locations * Update import locations
This commit is contained in:
@@ -5,15 +5,19 @@ import { AnyNumber, Codec, IExtrinsic } from '@polkadot/types/types';
|
||||
import { HashMap, Option, Vec } from '@polkadot/types/codec';
|
||||
import { Bytes, Null, StorageKey, Text, bool, u32, u64 } from '@polkadot/types/primitive';
|
||||
import { Metadata } from '@polkadot/types';
|
||||
import { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
|
||||
import { EpochAuthorship } from '@polkadot/types/interfaces/babe';
|
||||
import { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
import { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
import { ContractCallRequest, ContractExecResult } from '@polkadot/types/interfaces/contracts';
|
||||
import { CreatedBlock } from '@polkadot/types/interfaces/engine';
|
||||
import { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||
import { StorageKind } from '@polkadot/types/interfaces/offchain';
|
||||
import { BlockHash, ChainProperties, ExtrinsicOrHash, ExtrinsicStatus, Health, NetworkState, PeerInfo, RpcMethods, RuntimeDispatchInfo, RuntimeVersion } from '@polkadot/types/interfaces/rpc';
|
||||
import { RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import { RpcMethods } from '@polkadot/types/interfaces/rpc';
|
||||
import { AccountId, BlockNumber, H256, Hash, Header, Index, Justification, KeyValue, SignedBlock, StorageData } from '@polkadot/types/interfaces/runtime';
|
||||
import { NodeRole } from '@polkadot/types/interfaces/system';
|
||||
import { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||
import { ChainProperties, Health, NetworkState, NodeRole, PeerInfo } from '@polkadot/types/interfaces/system';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
declare module '@polkadot/rpc-core/types.jsonrpc' {
|
||||
|
||||
@@ -5,9 +5,11 @@ 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';
|
||||
import { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/types/interfaces/attestations';
|
||||
import { RawAuraPreDigest } from '@polkadot/types/interfaces/aura';
|
||||
import { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
|
||||
import { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
|
||||
import { BabeAuthorityWeight, BabeBlockWeight, BabeWeight, EpochAuthorship, MaybeVrf, RawBabePreDigest, RawBabePreDigestCompat, RawBabePreDigestPrimary, RawBabePreDigestPrimaryTo159, RawBabePreDigestSecondary, RawBabePreDigestSecondaryTo159, RawBabePreDigestTo159, SlotNumber, VrfData, VrfProof } from '@polkadot/types/interfaces/babe';
|
||||
import { AccountData, BalanceLock, BalanceLockTo212, Reasons, ReleasesBalances, VestingSchedule, WithdrawReasons } from '@polkadot/types/interfaces/balances';
|
||||
import { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
import { EthereumAddress } from '@polkadot/types/interfaces/claims';
|
||||
import { MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';
|
||||
import { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
@@ -25,13 +27,15 @@ import { CallMetadataV0, DoubleMapTypeLatest, DoubleMapTypeV10, DoubleMapTypeV11
|
||||
import { StorageKind } from '@polkadot/types/interfaces/offchain';
|
||||
import { Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
|
||||
import { AttestedCandidate, AuctionIndex, Bidder, CandidateReceipt, CollatorId, CollatorSignature, EgressQueueRoot, HeadData, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, LeasePeriod, LeasePeriodOf, NewBidder, ParaId, ParaIdOf, ParaInfo, ParaScheduling, ParachainDispatchOrigin, Retriable, SlotRange, SubId, UpwardMessage, ValidityAttestation, WinningData, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
|
||||
import { RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
|
||||
import { ApiId, BlockHash, ChainProperties, ExtrinsicOrHash, ExtrinsicStatus, Health, KeyValueOption, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, RpcMethods, RuntimeDispatchInfo, RuntimeVersion, RuntimeVersionApi, StorageChangeSet } from '@polkadot/types/interfaces/rpc';
|
||||
import { RpcMethods } from '@polkadot/types/interfaces/rpc';
|
||||
import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, ChangesTrieConfiguration, Consensus, ConsensusEngineId, Digest, DigestItem, DispatchClass, DispatchInfo, DispatchInfoTo190, Fixed64, H160, H256, H512, Hash, Header, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, Moment, Origin, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Seal, SealV0, SignedBlock, StorageData, ValidatorId, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
|
||||
import { FullIdentification, IdentificationTuple, Keys, SessionIndex, SessionKeys1, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6 } from '@polkadot/types/interfaces/session';
|
||||
import { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
|
||||
import { ActiveEraInfo, CompactAssignments, CompactScore, ElectionCompute, ElectionResult, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, PhragmenScore, Points, ReleasesStaking, RewardDestination, RewardPoint, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196 } from '@polkadot/types/interfaces/staking';
|
||||
import { AccountInfo, DigestOf, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, EventRecordTo76, Key, LastRuntimeUpgradeInfo, NodeRole, Phase, RefCount } from '@polkadot/types/interfaces/system';
|
||||
import { ApiId, KeyValueOption, RuntimeVersion, RuntimeVersionApi, StorageChangeSet } from '@polkadot/types/interfaces/state';
|
||||
import { AccountInfo, ChainProperties, DigestOf, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, EventRecordTo76, Health, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, Phase, RefCount } from '@polkadot/types/interfaces/system';
|
||||
import { OpenTip, OpenTipFinder, OpenTipTip, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
|
||||
import { Multiplier } from '@polkadot/types/interfaces/txpayment';
|
||||
import { Multisig, Timepoint } from '@polkadot/types/interfaces/utility';
|
||||
@@ -853,6 +857,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
AccountInfo: AccountInfo;
|
||||
'Option<AccountInfo>': Option<AccountInfo>;
|
||||
'Vec<AccountInfo>': Vec<AccountInfo>;
|
||||
ChainProperties: ChainProperties;
|
||||
'Option<ChainProperties>': Option<ChainProperties>;
|
||||
'Vec<ChainProperties>': Vec<ChainProperties>;
|
||||
DigestOf: DigestOf;
|
||||
'Option<DigestOf>': Option<DigestOf>;
|
||||
'Vec<DigestOf>': Vec<DigestOf>;
|
||||
@@ -890,15 +897,45 @@ declare module '@polkadot/types/types/registry' {
|
||||
EventRecordTo76: EventRecordTo76;
|
||||
'Option<EventRecordTo76>': Option<EventRecordTo76>;
|
||||
'Vec<EventRecordTo76>': Vec<EventRecordTo76>;
|
||||
Health: Health;
|
||||
'Option<Health>': Option<Health>;
|
||||
'Vec<Health>': Vec<Health>;
|
||||
Key: Key;
|
||||
'Option<Key>': Option<Key>;
|
||||
'Vec<Key>': Vec<Key>;
|
||||
LastRuntimeUpgradeInfo: LastRuntimeUpgradeInfo;
|
||||
'Option<LastRuntimeUpgradeInfo>': Option<LastRuntimeUpgradeInfo>;
|
||||
'Vec<LastRuntimeUpgradeInfo>': Vec<LastRuntimeUpgradeInfo>;
|
||||
NetworkState: NetworkState;
|
||||
'Option<NetworkState>': Option<NetworkState>;
|
||||
'Vec<NetworkState>': Vec<NetworkState>;
|
||||
NetworkStatePeerset: NetworkStatePeerset;
|
||||
'Option<NetworkStatePeerset>': Option<NetworkStatePeerset>;
|
||||
'Vec<NetworkStatePeerset>': Vec<NetworkStatePeerset>;
|
||||
NetworkStatePeersetInfo: NetworkStatePeersetInfo;
|
||||
'Option<NetworkStatePeersetInfo>': Option<NetworkStatePeersetInfo>;
|
||||
'Vec<NetworkStatePeersetInfo>': Vec<NetworkStatePeersetInfo>;
|
||||
NodeRole: NodeRole;
|
||||
'Option<NodeRole>': Option<NodeRole>;
|
||||
'Vec<NodeRole>': Vec<NodeRole>;
|
||||
NotConnectedPeer: NotConnectedPeer;
|
||||
'Option<NotConnectedPeer>': Option<NotConnectedPeer>;
|
||||
'Vec<NotConnectedPeer>': Vec<NotConnectedPeer>;
|
||||
Peer: Peer;
|
||||
'Option<Peer>': Option<Peer>;
|
||||
'Vec<Peer>': Vec<Peer>;
|
||||
PeerEndpoint: PeerEndpoint;
|
||||
'Option<PeerEndpoint>': Option<PeerEndpoint>;
|
||||
'Vec<PeerEndpoint>': Vec<PeerEndpoint>;
|
||||
PeerEndpointAddr: PeerEndpointAddr;
|
||||
'Option<PeerEndpointAddr>': Option<PeerEndpointAddr>;
|
||||
'Vec<PeerEndpointAddr>': Vec<PeerEndpointAddr>;
|
||||
PeerPing: PeerPing;
|
||||
'Option<PeerPing>': Option<PeerPing>;
|
||||
'Vec<PeerPing>': Vec<PeerPing>;
|
||||
PeerInfo: PeerInfo;
|
||||
'Option<PeerInfo>': Option<PeerInfo>;
|
||||
'Vec<PeerInfo>': Vec<PeerInfo>;
|
||||
Phase: Phase;
|
||||
'Option<Phase>': Option<Phase>;
|
||||
'Vec<Phase>': Vec<Phase>;
|
||||
@@ -1548,60 +1585,30 @@ declare module '@polkadot/types/types/registry' {
|
||||
MetadataAll: MetadataAll;
|
||||
'Option<MetadataAll>': Option<MetadataAll>;
|
||||
'Vec<MetadataAll>': Vec<MetadataAll>;
|
||||
ApiId: ApiId;
|
||||
'Option<ApiId>': Option<ApiId>;
|
||||
'Vec<ApiId>': Vec<ApiId>;
|
||||
BlockHash: BlockHash;
|
||||
'Option<BlockHash>': Option<BlockHash>;
|
||||
'Vec<BlockHash>': Vec<BlockHash>;
|
||||
ChainProperties: ChainProperties;
|
||||
'Option<ChainProperties>': Option<ChainProperties>;
|
||||
'Vec<ChainProperties>': Vec<ChainProperties>;
|
||||
RpcMethods: RpcMethods;
|
||||
'Option<RpcMethods>': Option<RpcMethods>;
|
||||
'Vec<RpcMethods>': Vec<RpcMethods>;
|
||||
ExtrinsicOrHash: ExtrinsicOrHash;
|
||||
'Option<ExtrinsicOrHash>': Option<ExtrinsicOrHash>;
|
||||
'Vec<ExtrinsicOrHash>': Vec<ExtrinsicOrHash>;
|
||||
ExtrinsicStatus: ExtrinsicStatus;
|
||||
'Option<ExtrinsicStatus>': Option<ExtrinsicStatus>;
|
||||
'Vec<ExtrinsicStatus>': Vec<ExtrinsicStatus>;
|
||||
Health: Health;
|
||||
'Option<Health>': Option<Health>;
|
||||
'Vec<Health>': Vec<Health>;
|
||||
KeyValueOption: KeyValueOption;
|
||||
'Option<KeyValueOption>': Option<KeyValueOption>;
|
||||
'Vec<KeyValueOption>': Vec<KeyValueOption>;
|
||||
NetworkState: NetworkState;
|
||||
'Option<NetworkState>': Option<NetworkState>;
|
||||
'Vec<NetworkState>': Vec<NetworkState>;
|
||||
Peer: Peer;
|
||||
'Option<Peer>': Option<Peer>;
|
||||
'Vec<Peer>': Vec<Peer>;
|
||||
NotConnectedPeer: NotConnectedPeer;
|
||||
'Option<NotConnectedPeer>': Option<NotConnectedPeer>;
|
||||
'Vec<NotConnectedPeer>': Vec<NotConnectedPeer>;
|
||||
PeerEndpoint: PeerEndpoint;
|
||||
'Option<PeerEndpoint>': Option<PeerEndpoint>;
|
||||
'Vec<PeerEndpoint>': Vec<PeerEndpoint>;
|
||||
PeerEndpointAddr: PeerEndpointAddr;
|
||||
'Option<PeerEndpointAddr>': Option<PeerEndpointAddr>;
|
||||
'Vec<PeerEndpointAddr>': Vec<PeerEndpointAddr>;
|
||||
PeerPing: PeerPing;
|
||||
'Option<PeerPing>': Option<PeerPing>;
|
||||
'Vec<PeerPing>': Vec<PeerPing>;
|
||||
NetworkStatePeerset: NetworkStatePeerset;
|
||||
'Option<NetworkStatePeerset>': Option<NetworkStatePeerset>;
|
||||
'Vec<NetworkStatePeerset>': Vec<NetworkStatePeerset>;
|
||||
NetworkStatePeersetInfo: NetworkStatePeersetInfo;
|
||||
'Option<NetworkStatePeersetInfo>': Option<NetworkStatePeersetInfo>;
|
||||
'Vec<NetworkStatePeersetInfo>': Vec<NetworkStatePeersetInfo>;
|
||||
PeerInfo: PeerInfo;
|
||||
'Option<PeerInfo>': Option<PeerInfo>;
|
||||
'Vec<PeerInfo>': Vec<PeerInfo>;
|
||||
RpcMethods: RpcMethods;
|
||||
'Option<RpcMethods>': Option<RpcMethods>;
|
||||
'Vec<RpcMethods>': Vec<RpcMethods>;
|
||||
BlockHash: BlockHash;
|
||||
'Option<BlockHash>': Option<BlockHash>;
|
||||
'Vec<BlockHash>': Vec<BlockHash>;
|
||||
StorageKind: StorageKind;
|
||||
'Option<StorageKind>': Option<StorageKind>;
|
||||
'Vec<StorageKind>': Vec<StorageKind>;
|
||||
RuntimeDispatchInfo: RuntimeDispatchInfo;
|
||||
'Option<RuntimeDispatchInfo>': Option<RuntimeDispatchInfo>;
|
||||
'Vec<RuntimeDispatchInfo>': Vec<RuntimeDispatchInfo>;
|
||||
ApiId: ApiId;
|
||||
'Option<ApiId>': Option<ApiId>;
|
||||
'Vec<ApiId>': Vec<ApiId>;
|
||||
KeyValueOption: KeyValueOption;
|
||||
'Option<KeyValueOption>': Option<KeyValueOption>;
|
||||
'Vec<KeyValueOption>': Vec<KeyValueOption>;
|
||||
RuntimeVersionApi: RuntimeVersionApi;
|
||||
'Option<RuntimeVersionApi>': Option<RuntimeVersionApi>;
|
||||
'Vec<RuntimeVersionApi>': Vec<RuntimeVersionApi>;
|
||||
@@ -1611,8 +1618,5 @@ declare module '@polkadot/types/types/registry' {
|
||||
StorageChangeSet: StorageChangeSet;
|
||||
'Option<StorageChangeSet>': Option<StorageChangeSet>;
|
||||
'Vec<StorageChangeSet>': Vec<StorageChangeSet>;
|
||||
StorageKind: StorageKind;
|
||||
'Option<StorageKind>': Option<StorageKind>;
|
||||
'Vec<StorageKind>': Vec<StorageKind>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,5 +96,26 @@ export default {
|
||||
type: 'ExtrinsicStatus'
|
||||
}
|
||||
},
|
||||
types: {}
|
||||
types: {
|
||||
ExtrinsicOrHash: {
|
||||
_enum: {
|
||||
Hash: 'Hash',
|
||||
Extrinsic: 'Bytes'
|
||||
}
|
||||
},
|
||||
ExtrinsicStatus: {
|
||||
_enum: {
|
||||
Future: 'Null',
|
||||
Ready: 'Null',
|
||||
Broadcast: 'Vec<Text>',
|
||||
InBlock: 'Hash',
|
||||
Retracted: 'Hash',
|
||||
FinalityTimeout: 'Hash',
|
||||
Finalized: 'Hash',
|
||||
Usurped: 'Hash',
|
||||
Dropped: 'Null',
|
||||
Invalid: 'Null'
|
||||
}
|
||||
}
|
||||
}
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,36 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import { Enum, Vec } from '@polkadot/types/codec';
|
||||
import { Bytes, Text } from '@polkadot/types/primitive';
|
||||
import { Hash } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name ExtrinsicOrHash */
|
||||
export interface ExtrinsicOrHash extends Enum {
|
||||
readonly isHash: boolean;
|
||||
readonly asHash: Hash;
|
||||
readonly isExtrinsic: boolean;
|
||||
readonly asExtrinsic: Bytes;
|
||||
}
|
||||
|
||||
/** @name ExtrinsicStatus */
|
||||
export interface ExtrinsicStatus extends Enum {
|
||||
readonly isFuture: boolean;
|
||||
readonly isReady: boolean;
|
||||
readonly isBroadcast: boolean;
|
||||
readonly asBroadcast: Vec<Text>;
|
||||
readonly isInBlock: boolean;
|
||||
readonly asInBlock: Hash;
|
||||
readonly isRetracted: boolean;
|
||||
readonly asRetracted: Hash;
|
||||
readonly isFinalityTimeout: boolean;
|
||||
readonly asFinalityTimeout: Hash;
|
||||
readonly isFinalized: boolean;
|
||||
readonly asFinalized: Hash;
|
||||
readonly isUsurped: boolean;
|
||||
readonly asUsurped: Hash;
|
||||
readonly isDropped: boolean;
|
||||
readonly isInvalid: boolean;
|
||||
}
|
||||
|
||||
export type PHANTOM_AUTHOR = 'author';
|
||||
|
||||
@@ -80,5 +80,7 @@ export default {
|
||||
type: 'Header'
|
||||
}
|
||||
},
|
||||
types: {}
|
||||
types: {
|
||||
BlockHash: 'Hash'
|
||||
}
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import { Hash } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name BlockHash */
|
||||
export interface BlockHash extends Hash {}
|
||||
|
||||
export type PHANTOM_CHAIN = 'chain';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import { Struct } from '@polkadot/types/codec';
|
||||
import { bool } from '@polkadot/types/primitive';
|
||||
import { BlockHash } from '@polkadot/types/interfaces/rpc';
|
||||
import { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
|
||||
/** @name CreatedBlock */
|
||||
export interface CreatedBlock extends Struct {
|
||||
|
||||
@@ -22,5 +22,11 @@ export default {
|
||||
type: 'RuntimeDispatchInfo'
|
||||
}
|
||||
},
|
||||
types: {}
|
||||
types: {
|
||||
RuntimeDispatchInfo: {
|
||||
weight: 'Weight',
|
||||
class: 'DispatchClass',
|
||||
partialFee: 'Balance'
|
||||
}
|
||||
}
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import { Struct } from '@polkadot/types/codec';
|
||||
import { Balance, DispatchClass, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name RuntimeDispatchInfo */
|
||||
export interface RuntimeDispatchInfo extends Struct {
|
||||
readonly weight: Weight;
|
||||
readonly class: DispatchClass;
|
||||
readonly partialFee: Balance;
|
||||
}
|
||||
|
||||
export type PHANTOM_PAYMENT = 'payment';
|
||||
|
||||
@@ -13,113 +13,9 @@ export default {
|
||||
}
|
||||
},
|
||||
types: {
|
||||
ApiId: '[u8; 8]',
|
||||
BlockHash: 'Hash',
|
||||
ChainProperties: {
|
||||
ss58Format: 'Option<u8>',
|
||||
tokenDecimals: 'Option<u32>',
|
||||
tokenSymbol: 'Option<Text>'
|
||||
},
|
||||
ExtrinsicOrHash: {
|
||||
_enum: {
|
||||
Hash: 'Hash',
|
||||
Extrinsic: 'Bytes'
|
||||
}
|
||||
},
|
||||
ExtrinsicStatus: {
|
||||
_enum: {
|
||||
Future: 'Null',
|
||||
Ready: 'Null',
|
||||
Broadcast: 'Vec<Text>',
|
||||
InBlock: 'Hash',
|
||||
Retracted: 'Hash',
|
||||
FinalityTimeout: 'Hash',
|
||||
Finalized: 'Hash',
|
||||
Usurped: 'Hash',
|
||||
Dropped: 'Null',
|
||||
Invalid: 'Null'
|
||||
}
|
||||
},
|
||||
Health: {
|
||||
peers: 'u64',
|
||||
isSyncing: 'bool',
|
||||
shouldHavePeers: 'bool'
|
||||
},
|
||||
KeyValueOption: '(StorageKey, Option<StorageData>)',
|
||||
NetworkState: {
|
||||
peerId: 'Text',
|
||||
listenedAddresses: 'Vec<Text>',
|
||||
externalAddresses: 'Vec<Text>',
|
||||
connectedPeers: 'HashMap<Text, Peer>',
|
||||
notConnectedPeers: 'HashMap<Text, NotConnectedPeer>',
|
||||
averageDownloadPerSec: 'u64',
|
||||
averageUploadPerSec: 'u64',
|
||||
peerset: 'NetworkStatePeerset'
|
||||
},
|
||||
Peer: {
|
||||
enabled: 'bool',
|
||||
endpoint: 'PeerEndpoint',
|
||||
knownAddresses: 'Vec<Text>',
|
||||
latestPingTime: 'PeerPing',
|
||||
open: 'bool',
|
||||
versionString: 'Text'
|
||||
},
|
||||
NotConnectedPeer: {
|
||||
knownAddresses: 'Vec<Text>',
|
||||
latestPingTime: 'Option<PeerPing>',
|
||||
versionString: 'Option<Text>'
|
||||
},
|
||||
PeerEndpoint: {
|
||||
listening: 'PeerEndpointAddr'
|
||||
},
|
||||
PeerEndpointAddr: {
|
||||
_alias: {
|
||||
localAddr: 'local_addr',
|
||||
sendBackAddr: 'send_back_addr'
|
||||
},
|
||||
localAddr: 'Text',
|
||||
sendBackAddr: 'Text'
|
||||
},
|
||||
PeerPing: {
|
||||
nanos: 'u64',
|
||||
secs: 'u64'
|
||||
},
|
||||
NetworkStatePeerset: {
|
||||
messageQueue: 'u64',
|
||||
nodes: 'HashMap<Text, NetworkStatePeersetInfo>'
|
||||
},
|
||||
NetworkStatePeersetInfo: {
|
||||
connected: 'bool',
|
||||
reputation: 'u64'
|
||||
},
|
||||
PeerInfo: {
|
||||
peerId: 'Text',
|
||||
roles: 'Text',
|
||||
protocolVersion: 'u32',
|
||||
bestHash: 'Hash',
|
||||
bestNumber: 'BlockNumber'
|
||||
},
|
||||
RpcMethods: {
|
||||
version: 'u32',
|
||||
methods: 'Vec<Text>'
|
||||
},
|
||||
RuntimeDispatchInfo: {
|
||||
weight: 'Weight',
|
||||
class: 'DispatchClass',
|
||||
partialFee: 'Balance'
|
||||
},
|
||||
RuntimeVersionApi: '(ApiId, u32)',
|
||||
RuntimeVersion: {
|
||||
specName: 'Text',
|
||||
implName: 'Text',
|
||||
authoringVersion: 'u32',
|
||||
specVersion: 'u32',
|
||||
implVersion: 'u32',
|
||||
apis: 'Vec<RuntimeVersionApi>'
|
||||
},
|
||||
StorageChangeSet: {
|
||||
block: 'Hash',
|
||||
changes: 'Vec<KeyValueOption>'
|
||||
}
|
||||
}
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,128 +1,8 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
import { Enum, HashMap, Option, Struct, U8aFixed, Vec } from '@polkadot/types/codec';
|
||||
import { Bytes, StorageKey, Text, bool, u32, u64, u8 } from '@polkadot/types/primitive';
|
||||
import { Balance, BlockNumber, DispatchClass, Hash, StorageData, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name ApiId */
|
||||
export interface ApiId extends U8aFixed {}
|
||||
|
||||
/** @name BlockHash */
|
||||
export interface BlockHash extends Hash {}
|
||||
|
||||
/** @name ChainProperties */
|
||||
export interface ChainProperties extends Struct {
|
||||
readonly ss58Format: Option<u8>;
|
||||
readonly tokenDecimals: Option<u32>;
|
||||
readonly tokenSymbol: Option<Text>;
|
||||
}
|
||||
|
||||
/** @name ExtrinsicOrHash */
|
||||
export interface ExtrinsicOrHash extends Enum {
|
||||
readonly isHash: boolean;
|
||||
readonly asHash: Hash;
|
||||
readonly isExtrinsic: boolean;
|
||||
readonly asExtrinsic: Bytes;
|
||||
}
|
||||
|
||||
/** @name ExtrinsicStatus */
|
||||
export interface ExtrinsicStatus extends Enum {
|
||||
readonly isFuture: boolean;
|
||||
readonly isReady: boolean;
|
||||
readonly isBroadcast: boolean;
|
||||
readonly asBroadcast: Vec<Text>;
|
||||
readonly isInBlock: boolean;
|
||||
readonly asInBlock: Hash;
|
||||
readonly isRetracted: boolean;
|
||||
readonly asRetracted: Hash;
|
||||
readonly isFinalityTimeout: boolean;
|
||||
readonly asFinalityTimeout: Hash;
|
||||
readonly isFinalized: boolean;
|
||||
readonly asFinalized: Hash;
|
||||
readonly isUsurped: boolean;
|
||||
readonly asUsurped: Hash;
|
||||
readonly isDropped: boolean;
|
||||
readonly isInvalid: boolean;
|
||||
}
|
||||
|
||||
/** @name Health */
|
||||
export interface Health extends Struct {
|
||||
readonly peers: u64;
|
||||
readonly isSyncing: bool;
|
||||
readonly shouldHavePeers: bool;
|
||||
}
|
||||
|
||||
/** @name KeyValueOption */
|
||||
export interface KeyValueOption extends ITuple<[StorageKey, Option<StorageData>]> {}
|
||||
|
||||
/** @name NetworkState */
|
||||
export interface NetworkState extends Struct {
|
||||
readonly peerId: Text;
|
||||
readonly listenedAddresses: Vec<Text>;
|
||||
readonly externalAddresses: Vec<Text>;
|
||||
readonly connectedPeers: HashMap<Text, Peer>;
|
||||
readonly notConnectedPeers: HashMap<Text, NotConnectedPeer>;
|
||||
readonly averageDownloadPerSec: u64;
|
||||
readonly averageUploadPerSec: u64;
|
||||
readonly peerset: NetworkStatePeerset;
|
||||
}
|
||||
|
||||
/** @name NetworkStatePeerset */
|
||||
export interface NetworkStatePeerset extends Struct {
|
||||
readonly messageQueue: u64;
|
||||
readonly nodes: HashMap<Text, NetworkStatePeersetInfo>;
|
||||
}
|
||||
|
||||
/** @name NetworkStatePeersetInfo */
|
||||
export interface NetworkStatePeersetInfo extends Struct {
|
||||
readonly connected: bool;
|
||||
readonly reputation: u64;
|
||||
}
|
||||
|
||||
/** @name NotConnectedPeer */
|
||||
export interface NotConnectedPeer extends Struct {
|
||||
readonly knownAddresses: Vec<Text>;
|
||||
readonly latestPingTime: Option<PeerPing>;
|
||||
readonly versionString: Option<Text>;
|
||||
}
|
||||
|
||||
/** @name Peer */
|
||||
export interface Peer extends Struct {
|
||||
readonly enabled: bool;
|
||||
readonly endpoint: PeerEndpoint;
|
||||
readonly knownAddresses: Vec<Text>;
|
||||
readonly latestPingTime: PeerPing;
|
||||
readonly open: bool;
|
||||
readonly versionString: Text;
|
||||
}
|
||||
|
||||
/** @name PeerEndpoint */
|
||||
export interface PeerEndpoint extends Struct {
|
||||
readonly listening: PeerEndpointAddr;
|
||||
}
|
||||
|
||||
/** @name PeerEndpointAddr */
|
||||
export interface PeerEndpointAddr extends Struct {
|
||||
readonly localAddr: Text;
|
||||
readonly sendBackAddr: Text;
|
||||
}
|
||||
|
||||
/** @name PeerInfo */
|
||||
export interface PeerInfo extends Struct {
|
||||
readonly peerId: Text;
|
||||
readonly roles: Text;
|
||||
readonly protocolVersion: u32;
|
||||
readonly bestHash: Hash;
|
||||
readonly bestNumber: BlockNumber;
|
||||
}
|
||||
|
||||
/** @name PeerPing */
|
||||
export interface PeerPing extends Struct {
|
||||
readonly nanos: u64;
|
||||
readonly secs: u64;
|
||||
}
|
||||
import { Struct, Vec } from '@polkadot/types/codec';
|
||||
import { Text, u32 } from '@polkadot/types/primitive';
|
||||
|
||||
/** @name RpcMethods */
|
||||
export interface RpcMethods extends Struct {
|
||||
@@ -130,30 +10,4 @@ export interface RpcMethods extends Struct {
|
||||
readonly methods: Vec<Text>;
|
||||
}
|
||||
|
||||
/** @name RuntimeDispatchInfo */
|
||||
export interface RuntimeDispatchInfo extends Struct {
|
||||
readonly weight: Weight;
|
||||
readonly class: DispatchClass;
|
||||
readonly partialFee: Balance;
|
||||
}
|
||||
|
||||
/** @name RuntimeVersion */
|
||||
export interface RuntimeVersion extends Struct {
|
||||
readonly specName: Text;
|
||||
readonly implName: Text;
|
||||
readonly authoringVersion: u32;
|
||||
readonly specVersion: u32;
|
||||
readonly implVersion: u32;
|
||||
readonly apis: Vec<RuntimeVersionApi>;
|
||||
}
|
||||
|
||||
/** @name RuntimeVersionApi */
|
||||
export interface RuntimeVersionApi extends ITuple<[ApiId, u32]> {}
|
||||
|
||||
/** @name StorageChangeSet */
|
||||
export interface StorageChangeSet extends Struct {
|
||||
readonly block: Hash;
|
||||
readonly changes: Vec<KeyValueOption>;
|
||||
}
|
||||
|
||||
export type PHANTOM_RPC = 'rpc';
|
||||
|
||||
@@ -306,5 +306,21 @@ export default {
|
||||
type: 'StorageChangeSet'
|
||||
}
|
||||
},
|
||||
types: {}
|
||||
types: {
|
||||
ApiId: '[u8; 8]',
|
||||
KeyValueOption: '(StorageKey, Option<StorageData>)',
|
||||
RuntimeVersionApi: '(ApiId, u32)',
|
||||
RuntimeVersion: {
|
||||
specName: 'Text',
|
||||
implName: 'Text',
|
||||
authoringVersion: 'u32',
|
||||
specVersion: 'u32',
|
||||
implVersion: 'u32',
|
||||
apis: 'Vec<RuntimeVersionApi>'
|
||||
},
|
||||
StorageChangeSet: {
|
||||
block: 'Hash',
|
||||
changes: 'Vec<KeyValueOption>'
|
||||
}
|
||||
}
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,34 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
import { Option, Struct, U8aFixed, Vec } from '@polkadot/types/codec';
|
||||
import { StorageKey, Text, u32 } from '@polkadot/types/primitive';
|
||||
import { Hash, StorageData } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name ApiId */
|
||||
export interface ApiId extends U8aFixed {}
|
||||
|
||||
/** @name KeyValueOption */
|
||||
export interface KeyValueOption extends ITuple<[StorageKey, Option<StorageData>]> {}
|
||||
|
||||
/** @name RuntimeVersion */
|
||||
export interface RuntimeVersion extends Struct {
|
||||
readonly specName: Text;
|
||||
readonly implName: Text;
|
||||
readonly authoringVersion: u32;
|
||||
readonly specVersion: u32;
|
||||
readonly implVersion: u32;
|
||||
readonly apis: Vec<RuntimeVersionApi>;
|
||||
}
|
||||
|
||||
/** @name RuntimeVersionApi */
|
||||
export interface RuntimeVersionApi extends ITuple<[ApiId, u32]> {}
|
||||
|
||||
/** @name StorageChangeSet */
|
||||
export interface StorageChangeSet extends Struct {
|
||||
readonly block: Hash;
|
||||
readonly changes: Vec<KeyValueOption>;
|
||||
}
|
||||
|
||||
export type PHANTOM_STATE = 'state';
|
||||
|
||||
@@ -73,6 +73,11 @@ export default {
|
||||
refcount: 'RefCount',
|
||||
data: 'AccountData'
|
||||
},
|
||||
ChainProperties: {
|
||||
ss58Format: 'Option<u8>',
|
||||
tokenDecimals: 'Option<u32>',
|
||||
tokenSymbol: 'Option<Text>'
|
||||
},
|
||||
DigestOf: 'Digest',
|
||||
DispatchError: {
|
||||
_enum: {
|
||||
@@ -105,11 +110,34 @@ export default {
|
||||
phase: 'Phase',
|
||||
event: 'Event'
|
||||
},
|
||||
Health: {
|
||||
peers: 'u64',
|
||||
isSyncing: 'bool',
|
||||
shouldHavePeers: 'bool'
|
||||
},
|
||||
Key: 'Bytes',
|
||||
LastRuntimeUpgradeInfo: {
|
||||
specVersion: 'Compact<u32>',
|
||||
specName: 'Text'
|
||||
},
|
||||
NetworkState: {
|
||||
peerId: 'Text',
|
||||
listenedAddresses: 'Vec<Text>',
|
||||
externalAddresses: 'Vec<Text>',
|
||||
connectedPeers: 'HashMap<Text, Peer>',
|
||||
notConnectedPeers: 'HashMap<Text, NotConnectedPeer>',
|
||||
averageDownloadPerSec: 'u64',
|
||||
averageUploadPerSec: 'u64',
|
||||
peerset: 'NetworkStatePeerset'
|
||||
},
|
||||
NetworkStatePeerset: {
|
||||
messageQueue: 'u64',
|
||||
nodes: 'HashMap<Text, NetworkStatePeersetInfo>'
|
||||
},
|
||||
NetworkStatePeersetInfo: {
|
||||
connected: 'bool',
|
||||
reputation: 'u64'
|
||||
},
|
||||
NodeRole: {
|
||||
_enum: {
|
||||
Full: 'Null',
|
||||
@@ -118,6 +146,41 @@ export default {
|
||||
UnknownRole: 'u8'
|
||||
}
|
||||
},
|
||||
NotConnectedPeer: {
|
||||
knownAddresses: 'Vec<Text>',
|
||||
latestPingTime: 'Option<PeerPing>',
|
||||
versionString: 'Option<Text>'
|
||||
},
|
||||
Peer: {
|
||||
enabled: 'bool',
|
||||
endpoint: 'PeerEndpoint',
|
||||
knownAddresses: 'Vec<Text>',
|
||||
latestPingTime: 'PeerPing',
|
||||
open: 'bool',
|
||||
versionString: 'Text'
|
||||
},
|
||||
PeerEndpoint: {
|
||||
listening: 'PeerEndpointAddr'
|
||||
},
|
||||
PeerEndpointAddr: {
|
||||
_alias: {
|
||||
localAddr: 'local_addr',
|
||||
sendBackAddr: 'send_back_addr'
|
||||
},
|
||||
localAddr: 'Text',
|
||||
sendBackAddr: 'Text'
|
||||
},
|
||||
PeerPing: {
|
||||
nanos: 'u64',
|
||||
secs: 'u64'
|
||||
},
|
||||
PeerInfo: {
|
||||
peerId: 'Text',
|
||||
roles: 'Text',
|
||||
protocolVersion: 'u32',
|
||||
bestHash: 'Hash',
|
||||
bestNumber: 'BlockNumber'
|
||||
},
|
||||
Phase: {
|
||||
_enum: {
|
||||
ApplyExtrinsic: 'u32',
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
/* eslint-disable */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
import { Compact, Enum, Option, Result, Struct, U8aFixed, Vec } from '@polkadot/types/codec';
|
||||
import { Compact, Enum, HashMap, Option, Result, Struct, U8aFixed, Vec } from '@polkadot/types/codec';
|
||||
import { GenericEvent } from '@polkadot/types/generic';
|
||||
import { Bytes, Text, u32, u8 } from '@polkadot/types/primitive';
|
||||
import { Bytes, Text, bool, u32, u64, u8 } from '@polkadot/types/primitive';
|
||||
import { AccountData } from '@polkadot/types/interfaces/balances';
|
||||
import { Digest, Hash, Index } from '@polkadot/types/interfaces/runtime';
|
||||
import { BlockNumber, Digest, Hash, Index } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name AccountInfo */
|
||||
export interface AccountInfo extends Struct {
|
||||
@@ -15,6 +15,13 @@ export interface AccountInfo extends Struct {
|
||||
readonly data: AccountData;
|
||||
}
|
||||
|
||||
/** @name ChainProperties */
|
||||
export interface ChainProperties extends Struct {
|
||||
readonly ss58Format: Option<u8>;
|
||||
readonly tokenDecimals: Option<u32>;
|
||||
readonly tokenSymbol: Option<Text>;
|
||||
}
|
||||
|
||||
/** @name DigestOf */
|
||||
export interface DigestOf extends Digest {}
|
||||
|
||||
@@ -80,6 +87,13 @@ export interface EventRecordTo76 extends Struct {
|
||||
readonly event: Event;
|
||||
}
|
||||
|
||||
/** @name Health */
|
||||
export interface Health extends Struct {
|
||||
readonly peers: u64;
|
||||
readonly isSyncing: bool;
|
||||
readonly shouldHavePeers: bool;
|
||||
}
|
||||
|
||||
/** @name Key */
|
||||
export interface Key extends Bytes {}
|
||||
|
||||
@@ -89,6 +103,30 @@ export interface LastRuntimeUpgradeInfo extends Struct {
|
||||
readonly specName: Text;
|
||||
}
|
||||
|
||||
/** @name NetworkState */
|
||||
export interface NetworkState extends Struct {
|
||||
readonly peerId: Text;
|
||||
readonly listenedAddresses: Vec<Text>;
|
||||
readonly externalAddresses: Vec<Text>;
|
||||
readonly connectedPeers: HashMap<Text, Peer>;
|
||||
readonly notConnectedPeers: HashMap<Text, NotConnectedPeer>;
|
||||
readonly averageDownloadPerSec: u64;
|
||||
readonly averageUploadPerSec: u64;
|
||||
readonly peerset: NetworkStatePeerset;
|
||||
}
|
||||
|
||||
/** @name NetworkStatePeerset */
|
||||
export interface NetworkStatePeerset extends Struct {
|
||||
readonly messageQueue: u64;
|
||||
readonly nodes: HashMap<Text, NetworkStatePeersetInfo>;
|
||||
}
|
||||
|
||||
/** @name NetworkStatePeersetInfo */
|
||||
export interface NetworkStatePeersetInfo extends Struct {
|
||||
readonly connected: bool;
|
||||
readonly reputation: u64;
|
||||
}
|
||||
|
||||
/** @name NodeRole */
|
||||
export interface NodeRole extends Enum {
|
||||
readonly isFull: boolean;
|
||||
@@ -98,6 +136,49 @@ export interface NodeRole extends Enum {
|
||||
readonly asUnknownRole: u8;
|
||||
}
|
||||
|
||||
/** @name NotConnectedPeer */
|
||||
export interface NotConnectedPeer extends Struct {
|
||||
readonly knownAddresses: Vec<Text>;
|
||||
readonly latestPingTime: Option<PeerPing>;
|
||||
readonly versionString: Option<Text>;
|
||||
}
|
||||
|
||||
/** @name Peer */
|
||||
export interface Peer extends Struct {
|
||||
readonly enabled: bool;
|
||||
readonly endpoint: PeerEndpoint;
|
||||
readonly knownAddresses: Vec<Text>;
|
||||
readonly latestPingTime: PeerPing;
|
||||
readonly open: bool;
|
||||
readonly versionString: Text;
|
||||
}
|
||||
|
||||
/** @name PeerEndpoint */
|
||||
export interface PeerEndpoint extends Struct {
|
||||
readonly listening: PeerEndpointAddr;
|
||||
}
|
||||
|
||||
/** @name PeerEndpointAddr */
|
||||
export interface PeerEndpointAddr extends Struct {
|
||||
readonly localAddr: Text;
|
||||
readonly sendBackAddr: Text;
|
||||
}
|
||||
|
||||
/** @name PeerInfo */
|
||||
export interface PeerInfo extends Struct {
|
||||
readonly peerId: Text;
|
||||
readonly roles: Text;
|
||||
readonly protocolVersion: u32;
|
||||
readonly bestHash: Hash;
|
||||
readonly bestNumber: BlockNumber;
|
||||
}
|
||||
|
||||
/** @name PeerPing */
|
||||
export interface PeerPing extends Struct {
|
||||
readonly nanos: u64;
|
||||
readonly secs: u64;
|
||||
}
|
||||
|
||||
/** @name Phase */
|
||||
export interface Phase extends Enum {
|
||||
readonly isApplyExtrinsic: boolean;
|
||||
|
||||
@@ -2,8 +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 { ExtrinsicStatus } from '../interfaces/author';
|
||||
import { EcdsaSignature, Ed25519Signature, Sr25519Signature } from '../interfaces/extrinsics';
|
||||
import { ExtrinsicStatus } from '../interfaces/rpc';
|
||||
import { Address, Balance, Call, H256, Index } from '../interfaces/runtime';
|
||||
import { EventRecord } from '../interfaces/system';
|
||||
import { Codec } from './codec';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { ChainProperties } from '../interfaces/rpc';
|
||||
import { ChainProperties } from '../interfaces/system';
|
||||
import { OverrideModuleType } from '../known/types';
|
||||
import { CallFunction } from './calls';
|
||||
import { Codec, Constructor } from './codec';
|
||||
|
||||
Reference in New Issue
Block a user