@polkadot/types/interfaces APIs
- AccountId
- BlockNumber
- Balance
- EventRecord
- Header
- Hash
- Event
- Extrinsic
- BlockHash
- BalanceOf
- SignedBlock
- Nominations
- EraIndex
- DispatchError
- H256
- SessionIndex
- RuntimeVersion
- Moment
- RuntimeDispatchInfo
- VoteThreshold
- StakingLedger
- AccountInfo
- ParaId
- Index
- Call
- Exposure
- Votes
- ChainProperties
- RegistrarInfo
- EraRewardPoints
- DispatchInfo
- AccountIndex
- Address
- ProxyDefinition
- ProxyType
- Voting
- Multisig
- Conviction
- Registration
- AccountInfoWithProviders
- AccountInfoWithRefCount
- UnappliedSlash
- Weight
- Proposal
- ActiveEraInfo
- SlashingSpans
- ValidatorId
- ValidatorPrefs
- OpenTip
- ChainType
- LockIdentifier
- ValidatorPrefsTo145
- ExtrinsicSignature
- Keys
- Timepoint
- Permill
- RegistrationJudgement
- IdentityInfo
- AccountData
- MultiLocation
- XcmpMessageFormat
- RecoveryConfig
- AssetId
- AssetDetails
- AssetMetadata
- BountyIndex
- BountyStatus
- Bounty
- Scheduled
- EthereumAddress
- StatementKind
- EcdsaSignature
- PrefabWasmModule
- ContractInfo
- ProposalIndex
- IndividualExposure
- Vote
- TreasuryProposal
- DigestItem
- Forcing
- ActiveGiltsTotal
- AuctionIndex
- LeasePeriodOf
- WinningData
- FundInfo
- ParaLifecycle
- HeadData
- ParaInfo
- CandidateReceipt
- ParaValidatorIndex
- ParaGenesisArgs
- ParachainProposal
- Approvals
- Bid
- BidKind
- SocietyVote
- ElectionStatus
- StorageEntryTypeLatest
- OpenTipTo225
- ExtrinsicStatus
- StorageEntryMetadataLatest
- ContractExecResultErr
- AccountId32
- IdentityJudgement
- IdentityFields
- H160
- ContractInstantiateResult
- FeeDetails
- WeightToFeeCoefficient
- DispatchResult
- LastRuntimeUpgradeInfo
- MetadataLatest
Other Related APIs
- @polkadot/types/interfaces#AccountId
- @polkadot/types/interfaces#BalanceOf
- @polkadot/types/interfaces#ParaId
- @polkadot/types/interfaces#ParaLifecycle
- @polkadot/types/interfaces#HeadData
- @polkadot/types/interfaces#ParaInfo
- @polkadot/types#Option
- @polkadot/types#Vec
- @polkadot/types/types#ITuple
- @polkadot/util#formatNumber
@polkadot/types/interfaces#ParaGenesisArgs TypeScript Examples
The following examples show how to use
@polkadot/types/interfaces#ParaGenesisArgs.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Upcoming.tsx From crust-apps with Apache License 2.0 | 6 votes |
optMulti = {
defaultValue: {
headHex: null,
leases: null,
lifecycle: null,
manager: null
},
transform: ([optHead, optGenesis, optLifecycle, optInfo, leases]: [Option<HeadData>, Option<ParaGenesisArgs>, Option<ParaLifecycle>, Option<ParaInfo>, Vec<Option<ITuple<[AccountId, BalanceOf]>>>]): MultiState => ({
headHex: optHead.isSome
? sliceHex(optHead.unwrap())
: optGenesis.isSome
? sliceHex(optGenesis.unwrap().genesisHead)
: null,
leases: leases
? leases
.map((optLease, period): LeaseInfo | null => {
if (optLease.isNone) {
return null;
}
const [accountId, balance] = optLease.unwrap();
return {
accountId,
balance,
period
};
})
.filter((item): item is LeaseInfo => !!item)
: [],
lifecycle: optLifecycle.unwrapOr(null),
manager: optInfo.isSome
? optInfo.unwrap().manager
: null
})
}