From 0592f9552d1e281564ac831e6485cfa3fddb2c75 Mon Sep 17 00:00:00 2001 From: tarikgul Date: Tue, 26 Oct 2021 16:54:38 -0400 Subject: [PATCH 01/16] add historicApi to crowdloans-info --- src/services/paras/ParasService.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/services/paras/ParasService.ts b/src/services/paras/ParasService.ts index 56f0c4bb7..bcb290668 100644 --- a/src/services/paras/ParasService.ts +++ b/src/services/paras/ParasService.ts @@ -46,9 +46,12 @@ export class ParasService extends AbstractService { hash: BlockHash, paraId: number ): Promise { + const { api } = this; + const historicApi = await api.at(hash); + const [fund, { number }] = await Promise.all([ - this.api.query.crowdloan.funds.at>(hash, paraId), - this.api.rpc.chain.getHeader(hash), + historicApi.query.crowdloan.funds>(paraId), + api.rpc.chain.getHeader(hash), ]); if (!fund) { From 85377b6d14f75d0ad264c9bfc7f031692601d236 Mon Sep 17 00:00:00 2001 From: tarikgul Date: Tue, 26 Oct 2021 17:08:48 -0400 Subject: [PATCH 02/16] add assertQueryModule check --- src/services/paras/ParasService.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/services/paras/ParasService.ts b/src/services/paras/ParasService.ts index bcb290668..9724ab0cb 100644 --- a/src/services/paras/ParasService.ts +++ b/src/services/paras/ParasService.ts @@ -1,3 +1,4 @@ +import { QueryableModuleStorage } from '@polkadot/api/types'; import { u32 } from '@polkadot/types'; import { Option, Vec } from '@polkadot/types/codec'; import { @@ -49,6 +50,8 @@ export class ParasService extends AbstractService { const { api } = this; const historicApi = await api.at(hash); + this.assertQueryModule(historicApi.query.crowdloan, 'crowdloan'); + const [fund, { number }] = await Promise.all([ historicApi.query.crowdloan.funds>(paraId), api.rpc.chain.getHeader(hash), @@ -459,4 +462,22 @@ export class ParasService extends AbstractService { return ranges; } + + /** + * Parachains pallets and modules are not available on all runtimes. This + * verifies that by checking if the module exists. If it doesnt it will throw an error + * + * @param queryFn The QueryModuleStorage key that we want to check exists + * @param mod Module we are checking + */ + private assertQueryModule( + queryFn: QueryableModuleStorage<'promise'>, + mod: string + ): void { + if (!queryFn) { + throw Error( + `The runtime does not include the ${mod} module at this block` + ); + } + } } From 6302683b8c82037c41f62eed795a0d58c83f4ecb Mon Sep 17 00:00:00 2001 From: tarikgul Date: Tue, 26 Oct 2021 17:26:16 -0400 Subject: [PATCH 03/16] add historicApi to crowdloans --- src/services/paras/ParasService.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/services/paras/ParasService.ts b/src/services/paras/ParasService.ts index 9724ab0cb..f00c95363 100644 --- a/src/services/paras/ParasService.ts +++ b/src/services/paras/ParasService.ts @@ -95,11 +95,14 @@ export class ParasService extends AbstractService { * @param includeFundInfo wether or not to include `FundInfo` for every crowdloan */ async crowdloans(hash: BlockHash): Promise { + const { api } = this; + const historicApi = await api.at(hash); + + this.assertQueryModule(historicApi.query.crowdloan, 'crowdloan') + const [{ number }, funds] = await Promise.all([ - this.api.rpc.chain.getHeader(hash), - this.api.query.crowdloan.funds.entriesAt, [ParaId]>( - hash - ), + api.rpc.chain.getHeader(hash), + historicApi.query.crowdloan.funds.entries, [ParaId]>(), ]); const fundsByParaId = funds.map(([keys, fundInfo]) => { From 47d48f657568428c595dddb785a5fdd1e2225b0c Mon Sep 17 00:00:00 2001 From: tarikgul Date: Tue, 26 Oct 2021 17:59:54 -0400 Subject: [PATCH 04/16] add historicApi to leases-info and leases/current --- src/services/paras/ParasService.ts | 35 ++++++++++++++++++------------ 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/src/services/paras/ParasService.ts b/src/services/paras/ParasService.ts index f00c95363..b193e588a 100644 --- a/src/services/paras/ParasService.ts +++ b/src/services/paras/ParasService.ts @@ -1,5 +1,5 @@ -import { QueryableModuleStorage } from '@polkadot/api/types'; import { u32 } from '@polkadot/types'; +import { ApiDecoration, QueryableModuleStorage } from '@polkadot/api/types'; import { Option, Vec } from '@polkadot/types/codec'; import { AccountId, @@ -128,13 +128,17 @@ export class ParasService extends AbstractService { * @param paraId ID of para to get lease info of */ async leaseInfo(hash: BlockHash, paraId: number): Promise { + const { api } = this; + const historicApi = await api.at(hash); + + this.assertQueryModule(historicApi.query.paras, 'paras'); + const [leases, { number }, paraLifecycleOpt] = await Promise.all([ - this.api.query.slots.leases.at< + historicApi.query.slots.leases< Vec>> - >(hash, paraId), + >(paraId), this.api.rpc.chain.getHeader(hash), - this.api.query.paras.paraLifecycles.at>( - hash, + historicApi.query.paras.paraLifecycles>( paraId ), ]); @@ -148,7 +152,7 @@ export class ParasService extends AbstractService { let leasesFormatted; if (leases.length) { const currentLeasePeriodIndex = - this.leasePeriodIndexAt(blockNumber).toNumber(); + this.leasePeriodIndexAt(historicApi, blockNumber).toNumber(); leasesFormatted = leases.reduce((acc, curLeaseOpt, idx) => { if (curLeaseOpt.isSome) { @@ -170,9 +174,9 @@ export class ParasService extends AbstractService { let onboardingAs: ParaType | undefined; if (paraLifecycleOpt.isSome && paraLifecycleOpt.unwrap().isOnboarding) { const paraGenesisArgs = - await this.api.query.paras.upcomingParasGenesis.at< + await historicApi.query.paras.upcomingParasGenesis< Option - >(hash, paraId); + >(paraId); if (paraGenesisArgs.isSome) { onboardingAs = paraGenesisArgs.unwrap().parachain.isTrue @@ -297,6 +301,9 @@ export class ParasService extends AbstractService { hash: BlockHash, includeCurrentLeaseHolders: boolean ): Promise { + const { api } = this; + const historicApi = await api.at(hash); + let blockNumber, currentLeaseHolders; if (!includeCurrentLeaseHolders) { const { number } = await this.api.rpc.chain.getHeader(hash); @@ -304,10 +311,10 @@ export class ParasService extends AbstractService { } else { const [{ number }, leaseEntries] = await Promise.all([ this.api.rpc.chain.getHeader(hash), - this.api.query.slots.leases.entriesAt< + historicApi.query.slots.leases.entries< Vec>>, [ParaId] - >(hash), + >(), ]); blockNumber = number.unwrap(); @@ -317,8 +324,8 @@ export class ParasService extends AbstractService { .map(([key, _l]) => key.args[0]); } - const leasePeriod = this.api.consts.slots.leasePeriod as BlockNumber; - const leasePeriodIndex = this.leasePeriodIndexAt(blockNumber); + const leasePeriod = historicApi.consts.slots.leasePeriod as BlockNumber; + const leasePeriodIndex = this.leasePeriodIndexAt(historicApi, blockNumber); const endOfLeasePeriod = leasePeriodIndex.mul(leasePeriod).add(leasePeriod); return { @@ -382,8 +389,8 @@ export class ParasService extends AbstractService { * @param blockHeight current blockheight * @param leasePeriod duration of lease period */ - private leasePeriodIndexAt(now: BN): BN { - const leasePeriod = this.api.consts.slots.leasePeriod as BlockNumber; + private leasePeriodIndexAt(historicApi: ApiDecoration<'promise'>, now: BN): BN { + const leasePeriod = historicApi.consts.slots.leasePeriod as BlockNumber; return now.div(leasePeriod); } From dca40f823387ae31865790f077577fbfc7049e53 Mon Sep 17 00:00:00 2001 From: tarikgul Date: Tue, 26 Oct 2021 19:16:57 -0400 Subject: [PATCH 05/16] add historicApi to auctions-current --- src/services/paras/ParasService.ts | 33 +++++++++++++++++------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/services/paras/ParasService.ts b/src/services/paras/ParasService.ts index b193e588a..17fbee04e 100644 --- a/src/services/paras/ParasService.ts +++ b/src/services/paras/ParasService.ts @@ -201,14 +201,19 @@ export class ParasService extends AbstractService { * @param hash `BlockHash` to make call at */ async auctionsCurrent(hash: BlockHash): Promise { + const { api } = this; + const historicApi = await api.at(hash); + + this.assertQueryModule(historicApi.query.auctions, 'auctions'); + const [auctionInfoOpt, { number }, auctionCounter] = await Promise.all([ - this.api.query.auctions.auctionInfo.at>>(hash), + historicApi.query.auctions.auctionInfo>>(), this.api.rpc.chain.getHeader(hash), - this.api.query.auctions.auctionCounter.at(hash), + historicApi.query.auctions.auctionCounter(), ]); const blockNumber = number.unwrap(); - const endingPeriod = this.api.consts.auctions.endingPeriod as BlockNumber; + const endingPeriod = historicApi.consts.auctions.endingPeriod as BlockNumber; let leasePeriodIndex: IOption, beginEnd: IOption, @@ -217,20 +222,19 @@ export class ParasService extends AbstractService { winning; if (auctionInfoOpt.isSome) { [leasePeriodIndex, beginEnd] = auctionInfoOpt.unwrap(); - const endingOffset = this.endingOffset(blockNumber, beginEnd); + const endingOffset = this.endingOffset(historicApi, blockNumber, beginEnd); + const winningOpt = endingOffset - ? await this.api.query.auctions.winning.at>( - hash, + ? await historicApi.query.auctions.winning>( endingOffset ) - : await this.api.query.auctions.winning.at>( - hash, + : await historicApi.query.auctions.winning>( // when we are not in the ending phase of the auction winning bids are stored at 0 0 ); if (winningOpt.isSome) { - const ranges = this.enumerateLeaseSets(leasePeriodIndex); + const ranges = this.enumerateLeaseSets(historicApi, leasePeriodIndex); // zip the winning bids together with their enumerated `SlotRange` (aka `leaseSet`) winning = winningOpt.unwrap().map((bid, idx) => { @@ -266,7 +270,7 @@ export class ParasService extends AbstractService { } const leasePeriodsPerSlot = - (this.api.consts.auctions.leasePeriodsPerSlot as u32)?.toNumber() || + (historicApi.consts.auctions.leasePeriodsPerSlot as u32)?.toNumber() || LEASE_PERIODS_PER_SLOT_FALLBACK; const leasePeriods = isSome(leasePeriodIndex) ? Array(leasePeriodsPerSlot) @@ -403,7 +407,7 @@ export class ParasService extends AbstractService { * @param now current block number * @param beginEnd block number of the start of the auction's ending period */ - private endingOffset(now: BN, beginEnd: IOption): IOption { + private endingOffset(historicApi: ApiDecoration<'promise'>, now: BN, beginEnd: IOption): IOption { if (isNull(beginEnd)) { return null; } @@ -416,7 +420,7 @@ export class ParasService extends AbstractService { // Once https://github.com/paritytech/polkadot/pull/2848 is merged no longer // need a fallback const sampleLength = - (this.api.consts.auctions.sampleLength as BlockNumber) || + (historicApi.consts.auctions.sampleLength as BlockNumber) || SAMPLE_LENGTH_FALLBACK; return afterEarlyEnd.div(sampleLength); } @@ -451,12 +455,13 @@ export class ParasService extends AbstractService { * So now we have an array, where each index corresponds to the same `SlotRange` that * would be at that index in the `auctions::winning` array. * + * @param historicApi * @param leasePeriodIndex */ - private enumerateLeaseSets(leasePeriodIndex: BN): number[][] { + private enumerateLeaseSets(historicApi: ApiDecoration<'promise'>, leasePeriodIndex: BN): number[][] { const leasePeriodIndexNumber = leasePeriodIndex.toNumber(); const lPPS = - (this.api.consts.auctions.leasePeriodsPerSlot as u32)?.toNumber() || + (historicApi.consts.auctions.leasePeriodsPerSlot as u32)?.toNumber() || LEASE_PERIODS_PER_SLOT_FALLBACK; const ranges: number[][] = []; From c408b4cf1fe532a10a8746b9b0c49d6e5a1f86fc Mon Sep 17 00:00:00 2001 From: tarikgul Date: Tue, 26 Oct 2021 20:28:01 -0400 Subject: [PATCH 06/16] add historicApi to paras --- src/services/paras/ParasService.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/services/paras/ParasService.ts b/src/services/paras/ParasService.ts index 17fbee04e..c0fb8aa6a 100644 --- a/src/services/paras/ParasService.ts +++ b/src/services/paras/ParasService.ts @@ -350,11 +350,14 @@ export class ParasService extends AbstractService { * @returns all the current registered paraIds and their lifecycle status */ async paras(hash: BlockHash): Promise { + const { api } = this; + const historicApi = await api.at(hash); + + this.assertQueryModule(historicApi.query.paras, 'paras'); + const [{ number }, paraLifecycles] = await Promise.all([ this.api.rpc.chain.getHeader(hash), - this.api.query.paras.paraLifecycles.entriesAt( - hash - ), + historicApi.query.paras.paraLifecycles.entries(), ]); const parasPromises = paraLifecycles.map(async ([k, paraLifecycle]) => { @@ -362,8 +365,7 @@ export class ParasService extends AbstractService { let onboardingAs: ParaType | undefined; if (paraLifecycle.isOnboarding) { const paraGenesisArgs = - await this.api.query.paras.paraGenesisArgs.at( - hash, + await historicApi.query.paras.paraGenesisArgs( paraId ); onboardingAs = paraGenesisArgs.parachain.isTrue From 202036bfbaf0e078830b6f80740b4e2d157467fd Mon Sep 17 00:00:00 2001 From: tarikgul Date: Tue, 26 Oct 2021 20:34:01 -0400 Subject: [PATCH 07/16] fix endingOffset bug --- src/services/paras/ParasService.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/services/paras/ParasService.ts b/src/services/paras/ParasService.ts index c0fb8aa6a..8c0431d6b 100644 --- a/src/services/paras/ParasService.ts +++ b/src/services/paras/ParasService.ts @@ -13,6 +13,7 @@ import { WinningData, } from '@polkadot/types/interfaces'; import { ITuple } from '@polkadot/types/types'; +import { BN_ONE } from '@polkadot/util'; import BN from 'bn.js'; import { InternalServerError } from 'http-errors'; @@ -34,8 +35,6 @@ import { AbstractService } from '../AbstractService'; // consts makes its way into `rococo-v1` this can be taken out. const LEASE_PERIODS_PER_SLOT_FALLBACK = 4; -const SAMPLE_LENGTH_FALLBACK = new BN(1); - export class ParasService extends AbstractService { /** * Get crowdloan information for a `paraId`. @@ -222,7 +221,7 @@ export class ParasService extends AbstractService { winning; if (auctionInfoOpt.isSome) { [leasePeriodIndex, beginEnd] = auctionInfoOpt.unwrap(); - const endingOffset = this.endingOffset(historicApi, blockNumber, beginEnd); + const endingOffset = this.endingOffset(blockNumber, beginEnd); const winningOpt = endingOffset ? await historicApi.query.auctions.winning>( @@ -409,7 +408,7 @@ export class ParasService extends AbstractService { * @param now current block number * @param beginEnd block number of the start of the auction's ending period */ - private endingOffset(historicApi: ApiDecoration<'promise'>, now: BN, beginEnd: IOption): IOption { + private endingOffset(now: BN, beginEnd: IOption): IOption { if (isNull(beginEnd)) { return null; } @@ -419,12 +418,7 @@ export class ParasService extends AbstractService { return null; } - // Once https://github.com/paritytech/polkadot/pull/2848 is merged no longer - // need a fallback - const sampleLength = - (historicApi.consts.auctions.sampleLength as BlockNumber) || - SAMPLE_LENGTH_FALLBACK; - return afterEarlyEnd.div(sampleLength); + return now.sub(new BN(beginEnd)).iadd(BN_ONE); } /** From bb569dcf47a8219d0d5b3337ebaa4425387d8133 Mon Sep 17 00:00:00 2001 From: tarikgul Date: Tue, 26 Oct 2021 21:13:16 -0400 Subject: [PATCH 08/16] adjust tests to reflect historicApi --- src/services/paras/ParasService.spec.ts | 79 ++++++++++++++----------- 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/src/services/paras/ParasService.spec.ts b/src/services/paras/ParasService.spec.ts index 10e2f9e8f..57f43b4dc 100644 --- a/src/services/paras/ParasService.spec.ts +++ b/src/services/paras/ParasService.spec.ts @@ -1,7 +1,8 @@ import { ApiPromise } from '@polkadot/api'; +import { ApiDecoration } from '@polkadot/api/types'; import { Option, Tuple, Vec } from '@polkadot/types'; import { AbstractInt } from '@polkadot/types/codec/AbstractInt'; -import { BlockNumber } from '@polkadot/types/interfaces'; +import { BlockNumber, Hash } from '@polkadot/types/interfaces'; import { Codec } from '@polkadot/types/types'; import BN from 'bn.js'; @@ -252,8 +253,7 @@ const auctionsWinningsAt = () => return optionWinnings; }); -const mockApi = { - ...defaultMockApi, +const historicApi = { consts: { auctions: { endingPeriod: new BN(20000), @@ -266,42 +266,49 @@ const mockApi = { }, query: { auctions: { - auctionInfo: { - at: auctionsInfoAt, - }, - auctionCounter: { - at: auctionCounterAt, - }, - winning: { - at: auctionsWinningsAt, - }, + auctionInfo: auctionsInfoAt, + auctionCounter: auctionCounterAt, + winning: auctionsWinningsAt, }, crowdloan: { - funds: { - entriesAt: fundsEntries, - keys: fundsKeys, - at: fundsAt, - }, + funds: fundsAt, }, paras: { - paraLifecycles: { - entriesAt: parasLifecyclesEntriesAt, - at: parasLifecyclesAt, - }, - paraGenesisArgs: { - at: parasGenesisArgsAt, - }, - upcomingParasGenesis: { - at: upcomingParasGenesisAt, - }, + paraLifecycles: parasLifecyclesAt, + paraGenesisArgs: parasGenesisArgsAt, + upcomingParasGenesis: upcomingParasGenesisAt, }, slots: { - leases: { - entriesAt: slotsLeasesEntriesAt, - at: slotsLeasesAt, - }, + leases: slotsLeasesAt, }, }, +} as unknown as ApiDecoration<'promise'>; + +/** + * Assign necessary keys to crowdloan.funds + */ +Object.assign(historicApi.query.crowdloan.funds, { + entries: fundsEntries, + keys: fundsKeys, +}); + +/** + * Assign necessary keys to paras.paraLifecycles + */ +Object.assign(historicApi.query.paras.paraLifecycles, { + entries: parasLifecyclesEntriesAt, +}); + +/** + * Assign necessary keys to slots.leases + */ +Object.assign(historicApi.query.slots.leases, { + entries: slotsLeasesEntriesAt +}); + +const mockApi = { + ...defaultMockApi, + at: (_hash: Hash) => historicApi } as unknown as ApiPromise; const parasService = new ParasService(mockApi); @@ -393,7 +400,7 @@ describe('ParasService', () => { const emptyLeasesAt = () => Promise.resolve().then(() => emptyVectorLeases); - (mockApi.query.slots.leases.at as unknown) = emptyLeasesAt; + (historicApi.query.slots.leases as unknown) = emptyLeasesAt; const expectedResponse = { at: expectedAt, @@ -406,7 +413,7 @@ describe('ParasService', () => { expect(sanitizeNumbers(response)).toMatchObject(expectedResponse); - (mockApi.query.slots.leases.at as unknown) = slotsLeasesAt; + (historicApi.query.slots.leases as unknown) = slotsLeasesAt; }); }); @@ -465,7 +472,7 @@ describe('ParasService', () => { it('Should return the correct data during an ongoing auction', async () => { const leasePeriodIndex = new BN(39); const leaseIndexArray = - parasService['enumerateLeaseSets'](leasePeriodIndex); + parasService['enumerateLeaseSets'](historicApi, leasePeriodIndex); // Remove the first two entries with splice because we have them in the expectedResponse. // `LEASE_PERIODS_PER_SLOT_FALLBACK` is 4 we need 10 slots for winning. const additionalWinningOptions = leaseIndexArray @@ -541,7 +548,7 @@ describe('ParasService', () => { }); it('Should return the correct null values when `auctionInfo` is `None`', async () => { - (mockApi.query.auctions.auctionInfo.at as unknown) = noneAuctionsInfoAt; + (historicApi.query.auctions.auctionInfo as unknown) = noneAuctionsInfoAt; const expectedResponse = { at: expectedAt, @@ -557,7 +564,7 @@ describe('ParasService', () => { expect(sanitizeNumbers(response)).toMatchObject(expectedResponse); - (mockApi.query.auctions.auctionInfo.at as unknown) = auctionsInfoAt; + (historicApi.query.auctions.auctionInfo as unknown) = auctionsInfoAt; }); }); }); From 00225269914fea61a78c0d4dd1979cc3c57edb7e Mon Sep 17 00:00:00 2001 From: tarikgul Date: Tue, 26 Oct 2021 21:15:49 -0400 Subject: [PATCH 09/16] cleanup --- src/services/paras/ParasService.spec.ts | 10 +++++---- src/services/paras/ParasService.ts | 27 ++++++++++++++++--------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/services/paras/ParasService.spec.ts b/src/services/paras/ParasService.spec.ts index 57f43b4dc..b5e694a81 100644 --- a/src/services/paras/ParasService.spec.ts +++ b/src/services/paras/ParasService.spec.ts @@ -303,12 +303,12 @@ Object.assign(historicApi.query.paras.paraLifecycles, { * Assign necessary keys to slots.leases */ Object.assign(historicApi.query.slots.leases, { - entries: slotsLeasesEntriesAt + entries: slotsLeasesEntriesAt, }); const mockApi = { ...defaultMockApi, - at: (_hash: Hash) => historicApi + at: (_hash: Hash) => historicApi, } as unknown as ApiPromise; const parasService = new ParasService(mockApi); @@ -471,8 +471,10 @@ describe('ParasService', () => { describe('ParasService.auctionsCurrent', () => { it('Should return the correct data during an ongoing auction', async () => { const leasePeriodIndex = new BN(39); - const leaseIndexArray = - parasService['enumerateLeaseSets'](historicApi, leasePeriodIndex); + const leaseIndexArray = parasService['enumerateLeaseSets']( + historicApi, + leasePeriodIndex + ); // Remove the first two entries with splice because we have them in the expectedResponse. // `LEASE_PERIODS_PER_SLOT_FALLBACK` is 4 we need 10 slots for winning. const additionalWinningOptions = leaseIndexArray diff --git a/src/services/paras/ParasService.ts b/src/services/paras/ParasService.ts index 8c0431d6b..6a1bcf0d6 100644 --- a/src/services/paras/ParasService.ts +++ b/src/services/paras/ParasService.ts @@ -1,5 +1,5 @@ -import { u32 } from '@polkadot/types'; import { ApiDecoration, QueryableModuleStorage } from '@polkadot/api/types'; +import { u32 } from '@polkadot/types'; import { Option, Vec } from '@polkadot/types/codec'; import { AccountId, @@ -97,7 +97,7 @@ export class ParasService extends AbstractService { const { api } = this; const historicApi = await api.at(hash); - this.assertQueryModule(historicApi.query.crowdloan, 'crowdloan') + this.assertQueryModule(historicApi.query.crowdloan, 'crowdloan'); const [{ number }, funds] = await Promise.all([ api.rpc.chain.getHeader(hash), @@ -137,9 +137,7 @@ export class ParasService extends AbstractService { Vec>> >(paraId), this.api.rpc.chain.getHeader(hash), - historicApi.query.paras.paraLifecycles>( - paraId - ), + historicApi.query.paras.paraLifecycles>(paraId), ]); const blockNumber = number.unwrap(); @@ -150,8 +148,10 @@ export class ParasService extends AbstractService { let leasesFormatted; if (leases.length) { - const currentLeasePeriodIndex = - this.leasePeriodIndexAt(historicApi, blockNumber).toNumber(); + const currentLeasePeriodIndex = this.leasePeriodIndexAt( + historicApi, + blockNumber + ).toNumber(); leasesFormatted = leases.reduce((acc, curLeaseOpt, idx) => { if (curLeaseOpt.isSome) { @@ -212,7 +212,8 @@ export class ParasService extends AbstractService { ]); const blockNumber = number.unwrap(); - const endingPeriod = historicApi.consts.auctions.endingPeriod as BlockNumber; + const endingPeriod = historicApi.consts.auctions + .endingPeriod as BlockNumber; let leasePeriodIndex: IOption, beginEnd: IOption, @@ -394,7 +395,10 @@ export class ParasService extends AbstractService { * @param blockHeight current blockheight * @param leasePeriod duration of lease period */ - private leasePeriodIndexAt(historicApi: ApiDecoration<'promise'>, now: BN): BN { + private leasePeriodIndexAt( + historicApi: ApiDecoration<'promise'>, + now: BN + ): BN { const leasePeriod = historicApi.consts.slots.leasePeriod as BlockNumber; return now.div(leasePeriod); } @@ -454,7 +458,10 @@ export class ParasService extends AbstractService { * @param historicApi * @param leasePeriodIndex */ - private enumerateLeaseSets(historicApi: ApiDecoration<'promise'>, leasePeriodIndex: BN): number[][] { + private enumerateLeaseSets( + historicApi: ApiDecoration<'promise'>, + leasePeriodIndex: BN + ): number[][] { const leasePeriodIndexNumber = leasePeriodIndex.toNumber(); const lPPS = (historicApi.consts.auctions.leasePeriodsPerSlot as u32)?.toNumber() || From 24148e00cf607d01a41261b4da7f97069a8233c1 Mon Sep 17 00:00:00 2001 From: tarikgul Date: Tue, 26 Oct 2021 21:31:17 -0400 Subject: [PATCH 10/16] inline docs --- src/services/paras/ParasService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/paras/ParasService.ts b/src/services/paras/ParasService.ts index 6a1bcf0d6..dc103a34e 100644 --- a/src/services/paras/ParasService.ts +++ b/src/services/paras/ParasService.ts @@ -392,8 +392,8 @@ export class ParasService extends AbstractService { /** * Calculate the current lease period index. * - * @param blockHeight current blockheight - * @param leasePeriod duration of lease period + * @param historicApi + * @param now Current blockHeight */ private leasePeriodIndexAt( historicApi: ApiDecoration<'promise'>, From 18ae042b7a66ccc7ebdedc7f745dbc002b422687 Mon Sep 17 00:00:00 2001 From: tarikgul Date: Tue, 26 Oct 2021 22:57:51 -0400 Subject: [PATCH 11/16] lint --- src/services/paras/ParasService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/paras/ParasService.ts b/src/services/paras/ParasService.ts index dc103a34e..3ba788aa9 100644 --- a/src/services/paras/ParasService.ts +++ b/src/services/paras/ParasService.ts @@ -392,7 +392,7 @@ export class ParasService extends AbstractService { /** * Calculate the current lease period index. * - * @param historicApi + * @param historicApi * @param now Current blockHeight */ private leasePeriodIndexAt( From 5f1109c034ead3ad50ea842b7d097c29cf147fc6 Mon Sep 17 00:00:00 2001 From: Tarik Gul <47201679+TarikGul@users.noreply.github.com> Date: Wed, 27 Oct 2021 08:21:22 -0400 Subject: [PATCH 12/16] Update src/services/paras/ParasService.ts Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com> --- src/services/paras/ParasService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/paras/ParasService.ts b/src/services/paras/ParasService.ts index 3ba788aa9..2f47ea3c0 100644 --- a/src/services/paras/ParasService.ts +++ b/src/services/paras/ParasService.ts @@ -393,7 +393,7 @@ export class ParasService extends AbstractService { * Calculate the current lease period index. * * @param historicApi - * @param now Current blockHeight + * @param now Current block number */ private leasePeriodIndexAt( historicApi: ApiDecoration<'promise'>, From 7415f9fcde0fe4d5953369117483b11c6c374d1a Mon Sep 17 00:00:00 2001 From: tarikgul Date: Tue, 2 Nov 2021 17:50:46 -0400 Subject: [PATCH 13/16] adjust lease_period_index --- src/services/paras/ParasService.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/services/paras/ParasService.ts b/src/services/paras/ParasService.ts index 2f47ea3c0..7b15ac346 100644 --- a/src/services/paras/ParasService.ts +++ b/src/services/paras/ParasService.ts @@ -13,7 +13,7 @@ import { WinningData, } from '@polkadot/types/interfaces'; import { ITuple } from '@polkadot/types/types'; -import { BN_ONE } from '@polkadot/util'; +import { BN_ONE, BN_ZERO } from '@polkadot/util'; import BN from 'bn.js'; import { InternalServerError } from 'http-errors'; @@ -391,6 +391,7 @@ export class ParasService extends AbstractService { /** * Calculate the current lease period index. + * Ref: https://github.com/paritytech/polkadot/pull/3980 * * @param historicApi * @param now Current block number @@ -400,7 +401,10 @@ export class ParasService extends AbstractService { now: BN ): BN { const leasePeriod = historicApi.consts.slots.leasePeriod as BlockNumber; - return now.div(leasePeriod); + const offset = + (historicApi.consts.slots.leaseOffset as BlockNumber) || BN_ZERO; + + return now.sub(offset).div(leasePeriod); } /** From dfa5f0f32bb5ad63c05e0f25110df2b5f453bf77 Mon Sep 17 00:00:00 2001 From: tarikgul Date: Wed, 10 Nov 2021 10:12:35 -0500 Subject: [PATCH 14/16] lease period index edgecase --- src/services/paras/ParasService.ts | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/services/paras/ParasService.ts b/src/services/paras/ParasService.ts index 7b15ac346..143b6087a 100644 --- a/src/services/paras/ParasService.ts +++ b/src/services/paras/ParasService.ts @@ -151,11 +151,13 @@ export class ParasService extends AbstractService { const currentLeasePeriodIndex = this.leasePeriodIndexAt( historicApi, blockNumber - ).toNumber(); + ); leasesFormatted = leases.reduce((acc, curLeaseOpt, idx) => { if (curLeaseOpt.isSome) { - const leasePeriodIndex = currentLeasePeriodIndex + idx; + const leasePeriodIndex = currentLeasePeriodIndex + ? currentLeasePeriodIndex.toNumber() + idx + : 0; const lease = curLeaseOpt.unwrap(); acc.push({ leasePeriodIndex, @@ -330,14 +332,16 @@ export class ParasService extends AbstractService { const leasePeriod = historicApi.consts.slots.leasePeriod as BlockNumber; const leasePeriodIndex = this.leasePeriodIndexAt(historicApi, blockNumber); - const endOfLeasePeriod = leasePeriodIndex.mul(leasePeriod).add(leasePeriod); + const endOfLeasePeriod = leasePeriodIndex + ? leasePeriodIndex.mul(leasePeriod).add(leasePeriod) + : BN_ZERO; return { at: { hash, height: blockNumber.toString(10), }, - leasePeriodIndex, + leasePeriodIndex: leasePeriodIndex ? leasePeriodIndex : BN_ZERO, endOfLeasePeriod, currentLeaseHolders, }; @@ -399,11 +403,16 @@ export class ParasService extends AbstractService { private leasePeriodIndexAt( historicApi: ApiDecoration<'promise'>, now: BN - ): BN { + ): IOption { const leasePeriod = historicApi.consts.slots.leasePeriod as BlockNumber; const offset = (historicApi.consts.slots.leaseOffset as BlockNumber) || BN_ZERO; + // Edge case, see https://github.com/paritytech/polkadot/commit/3668966dc02ac793c799d8c8667e8c396d891734 + if (now.toNumber() - offset.toNumber() < 0) { + return null; + } + return now.sub(offset).div(leasePeriod); } From f632e6aa92ff7b4ffe6daa26849a12d6c5cea31c Mon Sep 17 00:00:00 2001 From: tarikgul Date: Wed, 10 Nov 2021 10:36:05 -0500 Subject: [PATCH 15/16] adjust leasePeriodIndex to be null not BN_ZERO --- src/services/paras/ParasService.ts | 4 ++-- src/types/responses/Paras.ts | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/services/paras/ParasService.ts b/src/services/paras/ParasService.ts index 143b6087a..c666b09f2 100644 --- a/src/services/paras/ParasService.ts +++ b/src/services/paras/ParasService.ts @@ -157,7 +157,7 @@ export class ParasService extends AbstractService { if (curLeaseOpt.isSome) { const leasePeriodIndex = currentLeasePeriodIndex ? currentLeasePeriodIndex.toNumber() + idx - : 0; + : null; const lease = curLeaseOpt.unwrap(); acc.push({ leasePeriodIndex, @@ -334,7 +334,7 @@ export class ParasService extends AbstractService { const leasePeriodIndex = this.leasePeriodIndexAt(historicApi, blockNumber); const endOfLeasePeriod = leasePeriodIndex ? leasePeriodIndex.mul(leasePeriod).add(leasePeriod) - : BN_ZERO; + : null; return { at: { diff --git a/src/types/responses/Paras.ts b/src/types/responses/Paras.ts index 26ba45738..d0a5cc157 100644 --- a/src/types/responses/Paras.ts +++ b/src/types/responses/Paras.ts @@ -50,9 +50,10 @@ export interface ICrowdloans { export interface LeaseFormatted { /** - * Lease period. + * Lease period. The `leasePeriodIndex` can be null when the current block now, + * substracted by the offset is less than zero. */ - leasePeriodIndex: number; + leasePeriodIndex: number | null; /** * Amount held on deposit for the lease period. */ @@ -132,13 +133,15 @@ export interface IAuctionsCurrent { export interface ILeasesCurrent { at: IAt; /** - * The current lease period. + * The current lease period. The `leasePeriodIndex` can be null when the current block now, + * substracted by the offset is less than zero. */ - leasePeriodIndex: BN; + leasePeriodIndex: BN | null; /** - * Last block of the current lease period. + * Last block of the current lease period. The `endOfLeasePeriod` may be null + * when the `leasePeriodIndex` is null. */ - endOfLeasePeriod: BN; + endOfLeasePeriod: BN | null; /** * ParaIds of current lease holders. */ From c51ea900c8813886639ea90e7f65ea570c8c00c3 Mon Sep 17 00:00:00 2001 From: tarikgul Date: Wed, 10 Nov 2021 11:15:42 -0500 Subject: [PATCH 16/16] update docs --- docs/dist/app.bundle.js | 2 +- docs/src/openapi-v1.yaml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/dist/app.bundle.js b/docs/dist/app.bundle.js index d82bf2772..a3e90640e 100644 --- a/docs/dist/app.bundle.js +++ b/docs/dist/app.bundle.js @@ -10695,7 +10695,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var swag /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = {\"openapi\":\"3.0.0\",\"info\":{\"title\":\"Substrate API Sidecar\",\"description\":\"Substrate API Sidecar is a REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.\",\"contact\":{\"url\":\"https://github.com/paritytech/substrate-api-sidecar\"},\"license\":{\"name\":\"GPL-3.0-or-later\",\"url\":\"https://github.com/paritytech/substrate-api-sidecar/blob/master/LICENSE\"},\"version\":\"11.1.2\"},\"tags\":[{\"name\":\"accounts\"},{\"name\":\"blocks\"},{\"name\":\"node\",\"description\":\"node connected to sidecar\"},{\"name\":\"pallets\",\"description\":\"pallets employed in the runtime\"},{\"name\":\"runtime\"},{\"name\":\"transaction\"},{\"name\":\"paras\"},{\"name\":\"trace\"}],\"paths\":{\"/accounts/{accountId}/asset-balances\":{\"get\":{\"tags\":[\"accounts\"],\"summary\":\"Get an array of asset-balances for an account.\",\"description\":\"Returns information about an account's asset-balances. This is specific to the assets pallet for parachains. If no `assets` query parameter is provided, all asset-balances for the given account will be returned.\",\"operationId\":\"getAssetBalances\",\"parameters\":[{\"name\":\"accountId\",\"in\":\"path\",\"description\":\"SS58 address of the account.\",\"required\":true,\"schema\":{\"type\":\"string\",\"format\":\"SS58\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to query asset-balance info for the specified account.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block height (as a positive integer) or hash (as a hex string).\",\"format\":\"unsignedInteger or $hex\"}},{\"name\":\"assets\",\"in\":\"query\",\"description\":\"An array of AssetId's to be queried. If not supplied, defaults to providing all asset balances associated with the `accountId` will be returned. The array query param format follows Express 4.x API. ex:`?assets[]=1&assets[]=2&assets[]=3`.\",\"required\":false,\"schema\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"description\":\"An array of assetId numbers represented as strings\",\"format\":\"Array of unsignedInteger's\"}}],\"responses\":{\"200\":{\"description\":\"successfull operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/AccountAssetsBalances\"}}}}}}},\"/accounts/{accountId}/asset-approvals\":{\"get\":{\"tags\":[\"accounts\"],\"summary\":\"Get an asset approval for an account.\",\"description\":\"Returns information about an account's asset approval transaction. It is required to pass in a delegate and an assetId as query parameters.\",\"operationId\":\"getAssetApprovals\",\"parameters\":[{\"name\":\"accountId\",\"in\":\"path\",\"description\":\"SS58 address of the account.\",\"required\":true,\"schema\":{\"type\":\"string\",\"format\":\"SS58\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to query asset approval info for the specified account.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block height (as a non-negative integer) or hash (as a hex string).\",\"format\":\"unsignedInteger or $hex\"}},{\"name\":\"assetId\",\"in\":\"query\",\"description\":\"The `assetId` associated with the asset-approval.\",\"required\":true,\"schema\":{\"type\":\"string\",\"description\":\"An assetId represented as an unsignedInteger.\",\"format\":\"unsignedInteger\"}},{\"name\":\"delegate\",\"in\":\"query\",\"description\":\"The delegate's `accountId` associated with an asset-approval.\",\"required\":true,\"schema\":{\"type\":\"string\",\"format\":\"SS58\"}}],\"responses\":{\"200\":{\"description\":\"successfull operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/AccountAssetsApproval\"}}}}}}},\"/accounts/{accountId}/balance-info\":{\"get\":{\"tags\":[\"accounts\"],\"summary\":\"Get balance information for an account.\",\"description\":\"Returns information about an account's balance. Replaces `/balance/{address}` from versions < v1.0.0.\",\"operationId\":\"getAccountBalanceInfo\",\"parameters\":[{\"name\":\"accountId\",\"in\":\"path\",\"description\":\"SS58 address of the account.\",\"required\":true,\"schema\":{\"type\":\"string\",\"format\":\"SS58\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to query balance info for the specified account.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block height (as a non-negative integer) or hash (as a hex string).\",\"format\":\"unsignedInteger or $hex\"}},{\"name\":\"token\",\"in\":\"query\",\"description\":\"Token to query the balance of. If not specified it will query the chains native token (e.g. DOT for Polkadot). Note: this is only relevant for chains that support multiple tokens through the ORML tokens pallet.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Token symbol\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/AccountBalanceInfo\"}}}},\"400\":{\"description\":\"invalid blockId supplied for at query param\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}},\"404\":{\"description\":\"account not found\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/accounts/{accountId}/staking-info\":{\"get\":{\"tags\":[\"staking\"],\"summary\":\"Get staking information for a _Stash_ account.\",\"description\":\"Returns information about a _Stash_ account's staking activity. Replaces `/staking/{address}` from versions < v1.0.0.\",\"operationId\":\"getStakingSummaryByAccountId\",\"parameters\":[{\"name\":\"accountId\",\"in\":\"path\",\"description\":\"SS58 address of the account. Must be a _Stash_ account.\",\"required\":true,\"schema\":{\"format\":\"SS58\",\"type\":\"string\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to query the staking info for the specified account.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/AccountStakingInfo\"}}}},\"400\":{\"description\":\"invalid blockId supplied for at query param\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}},\"404\":{\"description\":\"account not found\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/accounts/{accountId}/staking-payouts\":{\"get\":{\"tags\":[\"staking\"],\"summary\":\"Get payout information for a _Stash_ account.\",\"description\":\"Returns payout information for the last specified eras. If specifying both the depth and era query params, this endpoint will return information for (era - depth) through era. (i.e. if depth=5 and era=20 information will be returned for eras 16 through 20). N.B. You cannot query eras less then `current_era - HISTORY_DEPTH`. N.B. The `nominator*` fields correspond to the address being queried, even if it is a validator's _Stash_ address. This is because a validator is technically nominating itself.\",\"operationId\":\"getStakingPayoutsByAccountId\",\"parameters\":[{\"name\":\"accountId\",\"in\":\"path\",\"description\":\"SS58 address of the account. Must be a _Stash_ account.\",\"required\":true,\"schema\":{\"format\":\"SS58\",\"type\":\"string\"}},{\"name\":\"depth\",\"in\":\"query\",\"description\":\"The number of eras to query for payouts of. Must be less than or equal to `HISTORY_DEPTH`. In cases where `era - (depth -1)` is less than 0, the first era queried will be 0.\",\"required\":false,\"schema\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"default\":1}},{\"name\":\"era\",\"in\":\"query\",\"description\":\"The era to query at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"default\":\"`active_era - 1`\"}},{\"name\":\"unclaimedOnly\",\"in\":\"query\",\"description\":\"Only return unclaimed rewards.\",\"required\":false,\"schema\":{\"type\":\"string\",\"format\":\"boolean\",\"default\":true}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/AccountStakingPayouts\"}}}},\"400\":{\"description\":\"invalid blockId supplied for at query param\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}},\"404\":{\"description\":\"account not found\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/accounts/{accountId}/vesting-info\":{\"get\":{\"tags\":[\"accounts\"],\"summary\":\"Get vesting information for an account.\",\"description\":\"Returns the vesting schedule for an account. Replaces `/vesting/{address}` from versions < v1.0.0.\",\"operationId\":\"getVestingSummaryByAccountId\",\"parameters\":[{\"name\":\"accountId\",\"in\":\"path\",\"description\":\"SS58 address of the account.\",\"required\":true,\"schema\":{\"format\":\"SS58\",\"type\":\"string\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to query the vesting info for the specified account.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/AccountVestingInfo\"}}}},\"400\":{\"description\":\"invalid blockId supplied for at query param\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}},\"404\":{\"description\":\"account not found\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/accounts/{accountId}/validate\":{\"get\":{\"tags\":[\"accounts\"],\"summary\":\"Validate a given address.\",\"description\":\"Returns whether the given address is valid ss58 format and the ss58 prefix if the address has one.\",\"operationId\":\"getValidationByAccountId\",\"parameters\":[{\"name\":\"accountId\",\"in\":\"path\",\"description\":\"SS58 or Hex address of the account.\",\"required\":true,\"schema\":{\"format\":\"SS58 or Hex\",\"type\":\"string\"}}],\"responses\":{\"200\":{\"description\":\"successfully retrieved address info\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/AccountValidation\"}}}}}}},\"/blocks/{blockId}\":{\"get\":{\"tags\":[\"blocks\"],\"summary\":\"Get a block by its height or hash.\",\"description\":\"Returns a single block. BlockId can either be a block hash or a block height. Replaces `/block/{number}` from versions < v1.0.0.\",\"operationId\":\"getBlockById\",\"parameters\":[{\"name\":\"blockId\",\"in\":\"path\",\"description\":\"Block identifier, as the block height or block hash.\",\"required\":true,\"schema\":{\"pattern\":\"a-km-zA-HJ-NP-Z1-9{8,64}\",\"type\":\"string\"}},{\"name\":\"eventDocs\",\"in\":\"query\",\"description\":\"When set to `true`, every event will have an extra `docs` property with a string of the events documentation.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false}},{\"name\":\"extrinsicDocs\",\"in\":\"query\",\"description\":\"When set to `true`, every extrinsic will have an extra `docs` property with a string of the extrinsics documentation.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Block\"}}}},\"400\":{\"description\":\"invalid Block identifier supplied\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/blocks/{blockId}/header\":{\"get\":{\"tags\":[\"blocks\"],\"summary\":\"Get a block's header by its height or hash.\",\"description\":\"Returns a single block's header. BlockId can either be a block hash or a block height.\",\"operationId\":\"getBlockHeaderById\",\"parameters\":[{\"name\":\"blockId\",\"in\":\"path\",\"description\":\"Block identifier, as the block height or block hash.\",\"required\":true,\"schema\":{\"pattern\":\"a-km-zA-HJ-NP-Z1-9{8,64}\",\"type\":\"string\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/BlockHeader\"}}}},\"400\":{\"description\":\"invalid Block identifier supplied\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/blocks/{blockId}/extrinsics/{extrinsicIndex}\":{\"get\":{\"tags\":[\"blocks\"],\"summary\":\"Get an extrinsic by its extrinsicIndex and block height or hash. The pair blockId, extrinsicIndex is sometimes referred to as a Timepoint.\",\"description\":\"Returns a single extrinsic.\",\"operationId\":\"getExtrinsicByTimepoint\",\"parameters\":[{\"name\":\"blockId\",\"in\":\"path\",\"description\":\"Block identifier, as the block height or block hash.\",\"required\":true,\"schema\":{\"pattern\":\"a-km-zA-HJ-NP-Z1-9{8,64}\",\"type\":\"string\"}},{\"name\":\"extrinsicIndex\",\"in\":\"path\",\"description\":\"The extrinsic's index within the block's body.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"eventDocs\",\"in\":\"query\",\"description\":\"When set to `true`, every event will have an extra `docs` property with a string of the events documentation.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false}},{\"name\":\"extrinsicDocs\",\"in\":\"query\",\"description\":\"When set to `true`, every extrinsic will have an extra `docs` property with a string of the extrinsics documentation.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ExtrinsicIndex\"}}}},\"400\":{\"description\":\"Requested `extrinsicIndex` does not exist\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/blocks/head\":{\"get\":{\"tags\":[\"blocks\"],\"summary\":\"Get the most recently finalized block.\",\"description\":\"Returns the most recently finalized block. Replaces `/block` from versions < v1.0.0.\",\"operationId\":\"getHeadBlock\",\"parameters\":[{\"name\":\"finalized\",\"in\":\"query\",\"description\":\"Boolean representing whether or not to get the finalized head. If it is not set the value defaults to true. When set to false it will attempt to get the newest known block, which may not be finalized.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":true}},{\"name\":\"eventDocs\",\"in\":\"query\",\"description\":\"When set to `true`, every event will have an extra `docs` property with a string of the events documentation.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false}},{\"name\":\"extrinsicDocs\",\"in\":\"query\",\"description\":\"When set to `true`, every extrinsic will have an extra `docs` property with a string of the extrinsics documentation.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Block\"}}}}}}},\"/blocks/head/header\":{\"get\":{\"tags\":[\"blocks\"],\"summary\":\"Get information about the header of the most recent finalized block.\",\"description\":\"Returns the most recently finalized block's header.\",\"operationId\":\"getLatestBlockHeader\",\"parameters\":[{\"name\":\"finalized\",\"in\":\"query\",\"description\":\"Boolean representing whether or not to get the finalized head. If it is not set the value defaults to true. When set to false it will attempt to get the newest known block, which may not be finalized.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":true}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/BlockHeader\"}}}},\"400\":{\"description\":\"invalid Block identifier supplied\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/node/network\":{\"get\":{\"tags\":[\"node\"],\"summary\":\"Get information about the Substrate node's activity in the peer-to-peer network.\",\"description\":\"Returns network related information of the node.\",\"operationId\":\"getNodeNetworking\",\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/NodeNetwork\"}}}}}}},\"/node/transaction-pool\":{\"get\":{\"tags\":[\"node\"],\"summary\":\"Get pending extrinsics from the Substrate node.\",\"description\":\"Returns the extrinsics that the node knows of that have not been included in a block.\",\"operationId\":\"getNodeTransactionPool\",\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/TransactionPool\"}}}}}}},\"/node/version\":{\"get\":{\"tags\":[\"node\"],\"summary\":\"Get information about the Substrates node's implementation and versioning.\",\"description\":\"Returns versioning information of the node.\",\"operationId\":\"getNodeVersion\",\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/NodeVersion\"}}}}}}},\"/transaction\":{\"post\":{\"tags\":[\"transaction\"],\"summary\":\"Submit a transaction to the node's transaction pool.\",\"description\":\"Accepts a valid signed extrinsic. Replaces `/tx` from versions < v1.0.0.\",\"operationId\":\"submitTransaction\",\"requestBody\":{\"$ref\":\"#/components/requestBodies/Transaction\"},\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/TransactionSuccess\"}}}},\"400\":{\"description\":\"failed to parse or submit transaction\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/TransactionFailure\"}}}}}}},\"/transaction/dry-run\":{\"post\":{\"tags\":[\"transaction\"],\"summary\":\"Dry run an extrinsic.\",\"description\":\"Use the dryrun call to practice submission of a transaction.\",\"operationId\":\"dryrunTransaction\",\"requestBody\":{\"$ref\":\"#/components/requestBodies/Transaction\"},\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/TransactionDryRun\"}}}},\"500\":{\"description\":\"failed to dry-run transaction\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/TransactionFailure\"}}}}}}},\"/transaction/fee-estimate\":{\"post\":{\"tags\":[\"transaction\"],\"summary\":\"Receive a fee estimate for a transaction.\",\"description\":\"Send a serialized transaction and receive back a naive fee estimate. Note: `partialFee` does not include any tips that you may add to increase a transaction's priority. See the reference on `compute_fee`. Replaces `/tx/fee-estimate` from versions < v1.0.0. Substrate Reference: - `RuntimeDispatchInfo`: https://crates.parity.io/pallet_transaction_payment_rpc_runtime_api/struct.RuntimeDispatchInfo.html - `query_info`: https://crates.parity.io/pallet_transaction_payment/struct.Module.html#method.query_info - `compute_fee`: https://crates.parity.io/pallet_transaction_payment/struct.Module.html#method.compute_fee\",\"operationId\":\"feeEstimateTransaction\",\"requestBody\":{\"$ref\":\"#/components/requestBodies/Transaction\"},\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/TransactionFeeEstimate\"}}}},\"500\":{\"description\":\"fee estimation failure\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/TransactionFeeEstimateFailure\"}}}}}}},\"/transaction/material\":{\"get\":{\"tags\":[\"transaction\"],\"summary\":\"Get all the network information needed to construct a transaction offline.\",\"description\":\"Returns the material that is universal to constructing any signed transaction offline. Replaces `/tx/artifacts` from versions < v1.0.0.\",\"operationId\":\"getTransactionMaterial\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve the transaction construction material.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}},{\"name\":\"noMeta\",\"in\":\"query\",\"schema\":{\"type\":\"boolean\",\"description\":\"If true, does not return metadata hex. This is useful when metadata is not needed and response time is a concern. Defaults to false. This is due for deprecation in future releases. Please migrate to using the `metadata` query param.\",\"default\":false}},{\"name\":\"metadata\",\"in\":\"query\",\"schema\":{\"type\":\"string\",\"description\":\"Specifies the format of the metadata to be returned. Accepted values are 'json', and 'scale'. 'json' being the decoded metadata, and 'scale' being the SCALE encoded metadata. When inputted it will override the `noMeta` query parameter.\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/TransactionMaterial\"}}}},\"400\":{\"description\":\"invalid blockId supplied for at query param\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/pallets/assets/{assetId}/asset-info\":{\"get\":{\"tags\":[\"pallets\"],\"summary\":\"Get information and metadata associated with an asset.\",\"description\":\"Returns information associated with an asset which includes the assets `AssetDetails` and `AssetMetadata`.\",\"operationId\":\"getAssetById\",\"parameters\":[{\"name\":\"assetId\",\"in\":\"path\",\"description\":\"The unsignedInteger Id of an asset.\",\"required\":true,\"schema\":{\"type\":\"string\",\"format\":\"unsignedInteger\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve the assetInfo.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/PalletsAssetsInfo\"}}}}}}},\"/pallets/staking/progress\":{\"get\":{\"tags\":[\"staking\",\"pallets\"],\"summary\":\"Get progress on the general Staking pallet system.\",\"description\":\"Returns information on the progress of key components of the staking system and estimates of future points of interest. Replaces `/staking-info` from versions < v1.0.0.\",\"operationId\":\"getStakingProgress\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve a staking progress report.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/StakingProgress\"}}}},\"400\":{\"description\":\"invalid blockId supplied for at query param\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/runtime/metadata\":{\"get\":{\"tags\":[\"runtime\"],\"summary\":\"Get the runtime metadata in decoded, JSON form.\",\"description\":\"Returns the runtime metadata as a JSON object. Substrate Reference: - FRAME Support: https://crates.parity.io/frame_support/metadata/index.html - Knowledge Base: https://substrate.dev/docs/en/knowledgebase/runtime/metadata\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve the metadata at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"description\":\"Response is dependent on the runtime metadata contents.\"}}}}}}},\"/runtime/code\":{\"get\":{\"tags\":[\"runtime\"],\"summary\":\"Get the runtime wasm blob.\",\"description\":\"Returns the runtime Wasm blob in hex format.\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve the runtime wasm blob at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/RuntimeCode\"}}}}}}},\"/runtime/spec\":{\"get\":{\"tags\":[\"runtime\"],\"summary\":\"Get version information of the Substrate runtime.\",\"description\":\"Returns version information related to the runtime.\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve runtime version information at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/RuntimeSpec\"}}}}}}},\"/pallets/{palletId}/storage\":{\"get\":{\"tags\":[\"pallets\"],\"summary\":\"Get a list of storage items for a pallet.\",\"description\":\"Returns a list of storage item metadata for storage items of the specified palletId.\",\"parameters\":[{\"name\":\"palletId\",\"in\":\"path\",\"description\":\"Name or index of the pallet to query the storage of. Note: the pallet name must match what is specified in the runtime metadata.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"adjustMetadataV13\",\"in\":\"query\",\"description\":\"Instruct sidecar to return `StorageEntryType` in the V13 metadata format rather than V14. This is a **temporary** flag to allow existing systems to migrate. It will be deprecated and then removed in the future.\",\"required\":false,\"schema\":{\"type\":\"boolean\"}},{\"name\":\"onlyIds\",\"in\":\"query\",\"description\":\"Only return the names (IDs) of the storage items instead of all of each storage item's metadata.\",\"required\":false,\"schema\":{\"type\":\"boolean\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve a list of the pallet's storage items.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"array\",\"description\":\"Pallet info and Array of storageItemIds.\",\"items\":{\"$ref\":\"#/components/schemas/PalletStorage\"}}}}},\"400\":{\"description\":\"invalid blockId supplied for at query param\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}},\"404\":{\"description\":\"could not find pallet with palletId\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/pallets/{palletId}/storage/{storageItemId}\":{\"get\":{\"tags\":[\"pallets\"],\"summary\":\"Get the value of a storage item.\",\"description\":\"Returns the value stored under the storageItemId. If it is a map, query param key1 is required. If the storage item is double map query params key1 and key2 are required.\",\"parameters\":[{\"name\":\"palletId\",\"in\":\"path\",\"description\":\"Name or index of the pallet to query the storage of. Note: pallet name aligns with pallet name as specified in runtime metadata.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"storageItemId\",\"in\":\"path\",\"description\":\"Id of the storage item to query for.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"adjustMetadataV13\",\"in\":\"query\",\"description\":\"Instruct sidecar to return `StorageEntryType` in the V13 metadata format rather than V14. This is a **temporary** flag to allow existing systems to migrate. It will be deprecated and then removed in the future.\",\"required\":false,\"schema\":{\"type\":\"boolean\"}},{\"name\":\"key1\",\"in\":\"query\",\"description\":\"Key for a map, or first key for a double map. Required for querying a map.\",\"required\":false,\"schema\":{\"type\":\"string\"}},{\"name\":\"key2\",\"in\":\"query\",\"description\":\"Second key for a double map. Required for querying a double map.\",\"required\":false,\"schema\":{\"type\":\"string\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to query the storage item at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}},{\"name\":\"metadata\",\"in\":\"query\",\"description\":\"Include the storage items metadata (including documentation) if set to true.\",\"required\":false,\"schema\":{\"default\":false,\"type\":\"boolean\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/PalletStorageItem\"}}}},\"400\":{\"description\":\"invalid blockId supplied for at query param\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}},\"404\":{\"description\":\"could not find resource with with id\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/experimental/paras\":{\"get\":{\"tags\":[\"paras\"],\"summary\":\"[Experimental - subject to breaking change.] List all registered paras\\n(parathreads & parachains).\\n\",\"description\":\"Returns all registered parachains and parathreads with lifecycle info.\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve paras list at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Paras\"}}}}}}},\"/experimental/paras/leases/current\":{\"get\":{\"tags\":[\"paras\"],\"summary\":\"[Experimental - subject to breaking change.] Get general information about\\nthe current lease period.\\n\",\"description\":\"Returns an overview of the current lease period, including lease holders.\\n\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve current lease period info at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}},{\"name\":\"currentLeaseHolders\",\"in\":\"query\",\"description\":\"Wether or not to include the `currentLeaseHolders` property. Inclusion\\nof the property will likely result in a larger payload and increased\\nresponse time.\\n\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":true}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ParasLeasesCurrent\"}}}}}}},\"/experimental/paras/auctions/current\":{\"get\":{\"tags\":[\"paras\"],\"summary\":\"[Experimental - subject to breaking change.] Get the status of the current\\nauction.\\n\",\"description\":\"Returns an overview of the current of auction. There is only one auction\\nat a time. If there is no auction most fields will be `null`.\\n\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve auction progress at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ParasAuctionsCurrent\"}}}}}}},\"/experimental/paras/crowdloans\":{\"get\":{\"tags\":[\"paras\"],\"summary\":\"[Experimental - subject to breaking change.] List all stored crowdloans.\\n\",\"description\":\"Returns a list of all the crowdloans and their associated paraIds.\\n\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve the list of paraIds that have crowdloans at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ParasCrowdloans\"}}}}}}},\"/experimental/paras/{paraId}/crowdloan-info\":{\"get\":{\"tags\":[\"paras\"],\"summary\":\"[Experimental - subject to breaking change.] Get crowdloan information for a\\n`paraId`.\\n\",\"description\":\"Returns crowdloan's `fundInfo` and the set of `leasePeriods` the crowdloan`\\ncovers.\\n\",\"parameters\":[{\"name\":\"paraId\",\"in\":\"path\",\"description\":\"paraId to query the crowdloan information of.\",\"required\":true,\"schema\":{\"type\":\"number\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve info at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ParasCrowdloanInfo\"}}}}}}},\"/experimental/paras/{paraId}/lease-info\":{\"get\":{\"tags\":[\"paras\"],\"summary\":\"[Experimental - subject to breaking change.] Get current and future leases\\nas well as the lifecycle stage for a given `paraId`.\\n\",\"description\":\"Returns a list of leases that belong to the `paraId` as well as the\\n`paraId`'s current lifecycle stage.\\n\",\"parameters\":[{\"name\":\"paraId\",\"in\":\"path\",\"description\":\"paraId to query the crowdloan information of.\",\"required\":true,\"schema\":{\"type\":\"number\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve para's leases at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ParasLeaseInfo\"}}}}}}},\"/experimental/blocks/head/traces\":{\"get\":{\"tags\":[\"trace\"],\"summary\":\"[Experimental - subject to breaking change.] Get traces for the most\\nrecently finalized block.\\n\",\"description\":\"Returns traces (spans and events) of the most recently finalized block from\\nRPC `state_straceBlock`. Consult the [RPC docs](https://github.com/paritytech/substrate/blob/aba876001651506f85c14baf26e006b36092e1a0/client/rpc-api/src/state/mod.rs#L140)\\nfor conceptual info.\\n\",\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/BlocksTrace\"}}}}}}},\"/experimental/blocks/{blockId}/traces\":{\"get\":{\"tags\":[\"trace\"],\"summary\":\"[Experimental - subject to breaking change.] Get traces for the given `blockId`.\\n\",\"description\":\"Returns traces (spans and events) of the specified block from\\nRPC `state_straceBlock`. Consult the [RPC docs](https://github.com/paritytech/substrate/blob/aba876001651506f85c14baf26e006b36092e1a0/client/rpc-api/src/state/mod.rs#L140) for conceptual info.\\n\",\"parameters\":[{\"name\":\"blockId\",\"in\":\"path\",\"description\":\"Block identifier, as the block height or block hash.\",\"required\":true,\"schema\":{\"pattern\":\"a-km-zA-HJ-NP-Z1-9{8,64}\",\"type\":\"string\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/BlocksTrace\"}}}}}}},\"/experimental/blocks/head/traces/operations\":{\"get\":{\"tags\":[\"trace\"],\"summary\":\"[Experimental - subject to breaking change.] Get the operations from the\\nmost recently finalized block.\\n\",\"description\":\"Returns the operations from the most recently finalized block. Operations\\nrepresent one side of a balance change. For example if Alice transfers\\n100unit to Bob there will be two operations; 1) Alice - 100 2) Bob + 100.\\n\\nGiven account A and A's balance at block k0 (Ak0), if we sum all the\\noperations for A from block k1 through kn against Ak0, we will end up\\nwith A's balance at block kn (Akn). Thus, operations can be used to audit\\nthat balances change as expected.\\n\\nThis is useful for Substrate based chains because the advanced business\\nlogic can make it difficult to ensure auditable balance reconciliation\\nbased purely on events. Instead of using events one can use the\\noperations given from this endpoint.\\n\\nNote - each operation corresponds to a delta of a single field of the\\n`system::AccountData` storage item (i.e `free`, `reserved`, `misc_frozen`\\nand `fee_frozen`).\\nNote - operations are assigned a block execution phase (and extrinsic index\\nfor those in the apply extrinsic phase) based on an \\\"action group\\\". For\\nexample all the operations for 1 extrinsic will be in the same action group.\\nThe action groups can optionally be fetched with the `action` query param\\nfor closer auditing.\\nNote - There are no 0 value operations (e.g. a transfer of 0, or a\\ntransfer to itself)\\n\\nTo learn more about operation and action group creation please consult\\n[this diagram](https://docs.google.com/drawings/d/1vZoJo9jaXlz0LmrdTOgHck9_1LsfuQPRmTr-5g1tOis/edit?usp=sharing)\\n\",\"parameters\":[{\"name\":\"actions\",\"in\":\"query\",\"description\":\"Whether or not to include action groups.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/BlocksTraceOperations\"}}}}}}},\"/experimental/blocks/{blockId}/traces/operations\":{\"get\":{\"tags\":[\"trace\"],\"summary\":\"[Experimental - subject to breaking change.] Get the operations from the\\nspecified block.\\n\",\"description\":\"Returns the operations from the most recently finalized block. Operations\\nrepresent one side of a balance change. For example if Alice transfers\\n100unit to Bob there will be two operations; 1) Alice - 100 2) Bob + 100.\\n\\nGiven account A and A's balance at block k0 (Ak0), if we sum all the\\noperations for A from block k1 through kn against Ak0, we will end up\\nwith A's balance at block kn (Akn). Thus, operations can be used to audit\\nthat balances change as expected.\\n\\nThis is useful for Substrate based chains because the advanced business\\nlogic can make it difficult to ensure auditable balance reconciliation\\nbased purely on events. Instead of using events one can use the\\noperations given from this endpoint.\\n\\nNote - each operation corresponds to a delta of a single field of the\\n`system::AccountData` storage item (i.e `free`, `reserved`, `misc_frozen`\\nand `fee_frozen`).\\nNote - operations are assigned a block execution phase (and extrinsic index\\nfor those in the apply extrinsic phase) based on an \\\"action group\\\". For\\nexample all the operations for 1 extrinsic will be in the same action group.\\nThe action groups can optionally be fetched with the `action` query param\\nfor closer auditing.\\nNote - There are no 0 value operations (e.g. a transfer of 0, or a\\ntransfer to itself)\\n\\nTo learn more about operation and action group creation please consult\\n[this diagram](https://docs.google.com/drawings/d/1vZoJo9jaXlz0LmrdTOgHck9_1LsfuQPRmTr-5g1tOis/edit?usp=sharing)\\n\",\"parameters\":[{\"name\":\"blockId\",\"in\":\"path\",\"description\":\"Block identifier, as the block height or block hash.\",\"required\":true,\"schema\":{\"pattern\":\"a-km-zA-HJ-NP-Z1-9{8,64}\",\"type\":\"string\"}},{\"name\":\"actions\",\"in\":\"query\",\"description\":\"Whether or not to include action groups.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/BlocksTraceOperations\"}}}}}}}},\"components\":{\"schemas\":{\"AccountAssetsApproval\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"amount\":{\"type\":\"string\",\"description\":\"The amount of funds approved for the balance transfer from the owner to some delegated target.\",\"format\":\"unsignedInteger\"},\"deposit\":{\"type\":\"string\",\"description\":\"The amount reserved on the owner's account to hold this item in storage.\",\"format\":\"unsignedInteger\"}}},\"AccountAssetsBalances\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"assets\":{\"type\":\"array\",\"description\":\"An array of queried assets.\",\"items\":{\"$ref\":\"#/components/schemas/AssetsBalance\"}}}},\"AccountBalanceInfo\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"nonce\":{\"type\":\"string\",\"description\":\"Account nonce.\",\"format\":\"unsignedInteger\"},\"tokenSymbol\":{\"type\":\"string\",\"description\":\"Token symbol of the balances displayed in this response.\",\"format\":\"unsignedInteger\"},\"free\":{\"type\":\"string\",\"description\":\"Free balance of the account. Not equivalent to _spendable_ balance. This is the only balance that matters in terms of most operations on tokens.\",\"format\":\"unsignedInteger\"},\"reserved\":{\"type\":\"string\",\"description\":\"Reserved balance of the account.\",\"format\":\"unsignedInteger\"},\"miscFrozen\":{\"type\":\"string\",\"description\":\"The amount that `free` may not drop below when withdrawing for anything except transaction fee payment.\",\"format\":\"unsignedInteger\"},\"feeFrozen\":{\"type\":\"string\",\"description\":\"The amount that `free` may not drop below when withdrawing specifically for transaction fee payment.\",\"format\":\"unsignedInteger\"},\"locks\":{\"type\":\"array\",\"description\":\"Array of locks on a balance. There can be many of these on an account and they \\\"overlap\\\", so the same balance is frozen by multiple locks\",\"items\":{\"$ref\":\"#/components/schemas/BalanceLock\"}}}},\"AccountStakingInfo\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"rewardDestination\":{\"type\":\"string\",\"description\":\"The account to which rewards will be paid. Can be 'Staked' (Stash account, adding to the amount at stake), 'Stash' (Stash address, not adding to the amount at stake), or 'Controller' (Controller address).\",\"format\":\"ss58\",\"enum\":[\"Staked\",\"Stash\",\"Controller\"]},\"controller\":{\"type\":\"string\",\"description\":\"Controller address for the given Stash.\",\"format\":\"ss58\"},\"numSlashingSpans\":{\"type\":\"string\",\"description\":\"Number of slashing spans on Stash account; `null` if provided address is not a Controller.\",\"format\":\"unsignedInteger\"},\"nominations\":{\"$ref\":\"#/components/schemas/Nominations\"},\"stakingLedger\":{\"$ref\":\"#/components/schemas/StakingLedger\"}},\"description\":\"Note: Runtime versions of Kusama less than 1062 will either have `lastReward` in place of `claimedRewards`, or no field at all. This is related to changes in reward distribution. See: [Lazy Payouts](https://github.com/paritytech/substrate/pull/4474), [Simple Payouts](https://github.com/paritytech/substrate/pull/5406)\"},\"AccountStakingPayouts\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"erasPayouts\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"era\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"Era this information is associated with.\"},\"totalEraRewardPoints\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"Total reward points for the era. Equals the sum of reward points for all the validators in the set.\"},\"totalEraPayout\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"Total payout for the era. Validators split the payout based on the portion of `totalEraRewardPoints` they have.\"},\"payouts\":{\"$ref\":\"#/components/schemas/Payouts\"}}}}}},\"AccountValidation\":{\"type\":\"object\",\"properties\":{\"isValid\":{\"type\":\"boolean\",\"description\":\"Whether the given address is valid ss58 formatted.\"},\"ss58Prefix\":{\"type\":\"string\",\"description\":\"SS58 prefix of the given address. If the address is a valid base58 format, but incorrect ss58, a prefix for the given address will still be returned.\",\"format\":\"unsignedInteger\"}}},\"AccountVestingInfo\":{\"type\":\"object\",\"description\":\"Sidecar version's <= v10.0.0 have a`vesting` return value that defaults to an object for when there is no available vesting-info data. It also returns a `VestingInfo` as an object. For Sidecar >=11.0.0, that value will now default as an array when there is no value, and `Vec` is returned when there is.\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"vesting\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/VestingSchedule\"}}}},\"AssetsBalance\":{\"type\":\"object\",\"properties\":{\"assetId\":{\"type\":\"string\",\"description\":\"The identifier of the asset.\",\"format\":\"unsignedInteger\"},\"balance\":{\"type\":\"string\",\"description\":\"The balance of the asset.\",\"format\":\"unsignedInteger\"},\"isFrozen\":{\"type\":\"boolean\",\"description\":\"Whether the asset is frozen for non-admin transfers.\"},\"isSufficient\":{\"type\":\"boolean\",\"description\":\"Whether a non-zero balance of this asset is a deposit of sufficient value to account for the state bloat associated with its balance storage. If set to `true`, then non-zero balances may be stored without a `consumer` reference (and thus an ED in the Balances pallet or whatever else is used to control user-account state growth).\"}}},\"AssetInfo\":{\"type\":\"object\",\"properties\":{\"owner\":{\"type\":\"string\",\"description\":\"Owner of the assets privileges.\",\"format\":\"SS58\"},\"issuer\":{\"type\":\"string\",\"description\":\"The `AccountId` able to mint tokens.\",\"format\":\"SS58\"},\"admin\":{\"type\":\"string\",\"description\":\"The `AccountId` that can thaw tokens, force transfers and burn token from any account.\",\"format\":\"SS58\"},\"freezer\":{\"type\":\"string\",\"description\":\"The `AccountId` that can freeze tokens.\",\"format\":\"SS58\"},\"supply\":{\"type\":\"string\",\"description\":\"The total supply across accounts.\",\"format\":\"unsignedInteger\"},\"deposit\":{\"type\":\"string\",\"description\":\"The balance deposited for this. This pays for the data stored.\",\"format\":\"unsignedInteger\"},\"minBalance\":{\"type\":\"string\",\"description\":\"The ED for virtual accounts.\",\"format\":\"unsignedInteger\"},\"isSufficient\":{\"type\":\"boolean\",\"description\":\"If `true`, then any account with this asset is given a provider reference. Otherwise, it requires a consumer reference.\"},\"accounts\":{\"type\":\"string\",\"description\":\"The total number of accounts.\",\"format\":\"unsignedInteger\"},\"sufficients\":{\"type\":\"string\",\"description\":\"The total number of accounts for which is placed a self-sufficient reference.\"},\"approvals\":{\"type\":\"string\",\"description\":\"The total number of approvals.\",\"format\":\"unsignedInteger\"},\"isFrozen\":{\"type\":\"boolean\",\"description\":\"Whether the asset is frozen for non-admin transfers.\"}}},\"AssetMetadata\":{\"type\":\"object\",\"properties\":{\"deposit\":{\"type\":\"string\",\"description\":\"The balance deposited for this metadata. This pays for the data stored in this struct.\",\"format\":\"unsignedInteger\"},\"name\":{\"type\":\"string\",\"description\":\"The user friendly name of this asset.\",\"format\":\"$hex\"},\"symbol\":{\"type\":\"string\",\"description\":\"The ticker symbol for this asset.\",\"format\":\"$hex\"},\"decimals\":{\"type\":\"string\",\"description\":\"The number of decimals this asset uses to represent one unit.\",\"format\":\"unsignedInteger\"},\"isFrozen\":{\"type\":\"boolean\",\"description\":\"Whether the asset metadata may be changed by a non Force origin.\"}}},\"BalanceLock\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"An identifier for this lock. Only one lock may be in existence for each identifier.\"},\"amount\":{\"type\":\"string\",\"description\":\"The amount below which the free balance may not drop with this lock in effect.\",\"format\":\"unsignedInteger\"},\"reasons\":{\"type\":\"string\",\"description\":\"Reasons for withdrawing balance.\",\"enum\":[\"Fee = 0\",\"Misc = 1\",\"All = 2\"]}}},\"Block\":{\"type\":\"object\",\"properties\":{\"hash\":{\"type\":\"string\",\"description\":\"The block's hash.\",\"format\":\"hex\"},\"number\":{\"type\":\"string\",\"description\":\"The block's height.\",\"format\":\"unsignedInteger\"},\"parentHash\":{\"type\":\"string\",\"description\":\"The hash of the parent block.\",\"format\":\"hex\"},\"stateRoot\":{\"type\":\"string\",\"description\":\"The state root after executing this block.\",\"format\":\"hex\"},\"extrinsicRoot\":{\"type\":\"string\",\"description\":\"The Merkle root of the extrinsics.\",\"format\":\"hex\"},\"authorId\":{\"type\":\"string\",\"description\":\"The account ID of the block author (may be undefined for some chains).\",\"format\":\"ss58\"},\"logs\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/DigestItem\"},\"description\":\"Array of `DigestItem`s associated with the block.\"},\"onInitialize\":{\"$ref\":\"#/components/schemas/BlockInitialize\"},\"extrinsics\":{\"type\":\"array\",\"description\":\"Array of extrinsics (inherents and transactions) within the block.\",\"items\":{\"$ref\":\"#/components/schemas/Extrinsic\"}},\"onFinalize\":{\"$ref\":\"#/components/schemas/BlockFinalize\"},\"finalized\":{\"type\":\"boolean\",\"description\":\"A boolean identifying whether the block is finalized or not. Note: on chains that do not have deterministic finality this field is omitted.\"}},\"description\":\"Note: Block finalization does not correspond to consensus, i.e. whether the block is in the canonical chain. It denotes the finalization of block _construction._\"},\"BlockFinalize\":{\"type\":\"object\",\"properties\":{\"events\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/SanitizedEvent\"}}},\"description\":\"Object with an array of `SanitizedEvent`s that occurred during block construction finalization with the `method` and `data` for each.\"},\"BlockHeader\":{\"type\":\"object\",\"properties\":{\"parentHash\":{\"type\":\"string\",\"description\":\"The hash of the parent block.\",\"format\":\"hex\"},\"number\":{\"type\":\"string\",\"description\":\"The block's height.\",\"format\":\"unsignedInteger\"},\"stateRoot\":{\"type\":\"string\",\"description\":\"The state root after executing this block.\",\"format\":\"hex\"},\"extrinsicRoot\":{\"type\":\"string\",\"description\":\"The Merkle root of the extrinsics.\",\"format\":\"hex\"},\"digest\":{\"type\":\"object\",\"properties\":{\"logs\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/DigestItem\"},\"description\":\"Array of `DigestItem`s associated with the block.\"}}}}},\"BlockIdentifiers\":{\"type\":\"object\",\"properties\":{\"hash\":{\"type\":\"string\",\"description\":\"The block's hash.\",\"format\":\"hex\"},\"height\":{\"type\":\"string\",\"description\":\"The block's height.\",\"format\":\"unsignedInteger\"}},\"description\":\"Block number and hash at which the call was made.\"},\"BlockInitialize\":{\"type\":\"object\",\"properties\":{\"events\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/SanitizedEvent\"}}},\"description\":\"Object with an array of `SanitizedEvent`s that occurred during block initialization with the `method` and `data` for each.\"},\"BlocksTrace\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"blockHash\":{\"type\":\"string\"},\"events\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/TraceEvent\"}},\"parentHash\":{\"type\":\"string\"},\"spans\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/TraceSpan\"}},\"storageKeys\":{\"type\":\"string\",\"description\":\"Hex encoded storage keys used to filter events.\"},\"tracingTargets\":{\"type\":\"string\",\"description\":\"Targets used to filter spans and events.\"}}},\"BlocksTraceOperations\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"operations\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/Operation\"}}}},\"ChainType\":{\"type\":\"object\",\"description\":\"Type of the chain. It will return one of the following enum variants as a key. Live, Development, Local, or Custom. Each variant will have a value as null except when the ChainType is Custom, it will return a string.\",\"properties\":{\"live\":{\"type\":\"string\",\"nullable\":true,\"default\":null},\"development\":{\"type\":\"string\",\"nullable\":true,\"default\":null},\"local\":{\"type\":\"string\",\"nullable\":true,\"default\":null},\"custom\":{\"type\":\"string\"}},\"example\":\"{\\\"live\\\": null}\"},\"DigestItem\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\"},\"index\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"value\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}},\"ElectionStatus\":{\"type\":\"object\",\"properties\":{\"status\":{\"type\":\"object\",\"description\":\"[Deprecated](Works for polkadot runtimes before v0.8.30).\\nEra election status: either `Close: null` or `Open: `. A status of `Close` indicates that the submission window for solutions from off-chain Phragmen is not open. A status of `Open` indicates that the submission window for off-chain Phragmen solutions has been open since BlockNumber. N.B. when the submission window is open, certain extrinsics are not allowed because they would mutate the state that the off-chain Phragmen calculation relies on for calculating results.\"},\"toggleEstimate\":{\"type\":\"string\",\"description\":\"Upper bound estimate of the block height at which the `status` will switch.\",\"format\":\"unsignedInteger\"}},\"description\":\"Information about the off-chain election. Not included in response when `forceEra.isForceNone`.\"},\"Error\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"number\"},\"message\":{\"type\":\"string\"},\"stack\":{\"type\":\"string\"}}},\"ExtrinsicMethod\":{\"type\":\"object\",\"properties\":{\"pallet\":{\"type\":\"string\"},\"methodName\":{\"type\":\"string\"}},\"description\":\"Extrinsic method\"},\"Extrinsic\":{\"type\":\"object\",\"properties\":{\"method\":{\"$ref\":\"#/components/schemas/ExtrinsicMethod\"},\"signature\":{\"$ref\":\"#/components/schemas/Signature\"},\"nonce\":{\"type\":\"string\",\"description\":\"Account nonce, if applicable.\",\"format\":\"unsignedInteger\"},\"args\":{\"type\":\"object\",\"description\":\"Object of arguments keyed by parameter name. Note: if you are expecting an [`OpaqueCall`](https://substrate.dev/rustdocs/v2.0.0/pallet_multisig/type.OpaqueCall.html) and it is not decoded in the response (i.e. it is just a hex string), then Sidecar was not able to decode it and likely that it is not a valid call for the runtime.\"},\"tip\":{\"type\":\"string\",\"description\":\"Any tip added to the transaction.\",\"format\":\"unsignedInteger\"},\"hash\":{\"type\":\"string\",\"description\":\"The transaction's hash.\",\"format\":\"hex\"},\"info\":{\"$ref\":\"#/components/schemas/RuntimeDispatchInfo\"},\"era\":{\"$ref\":\"#/components/schemas/GenericExtrinsicEra\"},\"events\":{\"type\":\"array\",\"description\":\"An array of `SanitizedEvent`s that occurred during extrinsic execution.\",\"items\":{\"$ref\":\"#/components/schemas/SanitizedEvent\"}},\"success\":{\"type\":\"boolean\",\"description\":\"Whether or not the extrinsic succeeded.\"},\"paysFee\":{\"type\":\"boolean\",\"description\":\"Whether the extrinsic requires a fee. Careful! This field relates to whether or not the extrinsic requires a fee if called as a transaction. Block authors could insert the extrinsic as an inherent in the block and not pay a fee. Always check that `paysFee` is `true` and that the extrinsic is signed when reconciling old blocks.\"}}},\"ExtrinsicIndex\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"extrinsic\":{\"$ref\":\"#/components/schemas/Extrinsic\"}},\"description\":\"A single extrinsic at a given block.\"},\"FundInfo\":{\"type\":\"object\",\"properties\":{\"depositor\":{\"type\":\"string\"},\"verifier\":{\"type\":\"string\"},\"deposit\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"raised\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"end\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"cap\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"lastConstribution\":{\"type\":\"string\",\"enum\":[\"preEnding\",\"ending\"]},\"firstPeriod\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"lastPeriod\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"trieIndex\":{\"type\":\"string\",\"format\":\"unsignedInteger\"}}},\"GenericExtrinsicEra\":{\"type\":\"object\",\"description\":\"The return value for era can either be `mortalEra`, or `immortalEra` and is represented as an enum in substrate. `immortalEra` meaning \\nthe transaction is valid forever. `mortalEra` consists of a tuple containing a period and phase.\\nex: `\\\"{\\\"mortalEra\\\": [\\\"64\\\", \\\"11\\\"]}\\\"`. The Period is the period of validity from the block hash found in the signing material. \\nThe Phase is the period that this transaction's lifetime begins (and, importantly, \\nimplies which block hash is included in the signature material).\\n\",\"properties\":{\"mortalEra\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"description\":\"Tuple of a Phase, and Period. Each item in the array will be a string formatted as an integer.\"},\"immortalEra\":{\"type\":\"string\",\"description\":\"Hardcoded constant '0x00'.\",\"format\":\"hex\"}},\"example\":\"{\\\"mortalEra\\\":[\\\"64\\\", \\\"11\\\"]}\"},\"NodeNetwork\":{\"type\":\"object\",\"properties\":{\"nodeRoles\":{\"$ref\":\"#/components/schemas/NodeRole\"},\"numPeers\":{\"type\":\"string\",\"description\":\"Number of peers the node is connected to.\",\"format\":\"unsignedInteger\"},\"isSyncing\":{\"type\":\"boolean\",\"description\":\"Whether or not the node is syncing. `False` indicates that the node is in sync.\"},\"shouldHavePeers\":{\"type\":\"boolean\",\"description\":\"Whether or not the node should be connected to peers. Might be false for local chains or when running without discovery.\"},\"localPeerId\":{\"type\":\"string\",\"description\":\"Local copy of the `PeerId`.\"},\"localListenAddresses\":{\"type\":\"array\",\"description\":\"Multiaddresses that the local node is listening on. The addresses include a trailing `/p2p/` with the local PeerId, and are thus suitable to be passed to `system_addReservedPeer` or as a bootnode address for example.\",\"items\":{\"type\":\"string\"}},\"peersInfo\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/PeerInfo\"}}}},\"NodeRole\":{\"type\":\"string\",\"description\":\"Role of this node. (N.B. Sentry nodes are being deprecated.)\",\"enum\":[\"Full\",\"LightClient\",\"Authority\",\"Sentry\"]},\"NodeVersion\":{\"type\":\"object\",\"properties\":{\"clientVersion\":{\"type\":\"string\",\"description\":\"Node's binary version.\"},\"clientImplName\":{\"type\":\"string\",\"description\":\"Node's implementation name.\"},\"chain\":{\"type\":\"string\",\"description\":\"Node's chain name.\"}},\"description\":\"Version information of the node.\"},\"Nominations\":{\"type\":\"object\",\"properties\":{\"targets\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"description\":\"The targets of the nomination.\"},\"submittedIn\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"The era the nominations were submitted. (Except for initial nominations which are considered submitted at era 0.)\"},\"suppressed\":{\"type\":\"boolean\",\"description\":\"Whether the nominations have been suppressed.\"}}},\"OnboardingAs\":{\"type\":\"string\",\"enum\":[\"parachain\",\"parathread\"],\"description\":\"This property only shows up when `paraLifecycle=onboarding`. It\\ndescribes if a particular para is onboarding as a `parachain` or a\\n`parathread`.\\n\"},\"Operation\":{\"type\":\"object\",\"properties\":{\"phase\":{\"$ref\":\"#/components/schemas/OperationPhase\"},\"parentSpanId\":{\"$ref\":\"#/components/schemas/SpanId\"},\"primarySpanId\":{\"$ref\":\"#/components/schemas/SpanId\"},\"eventIndex\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"Index of the underlying trace event.\"},\"address\":{\"type\":\"string\",\"description\":\"Account this operation affects. Note - this will be an object like\\n`{ id: address }` if the network uses `MultiAddress`\\n\"},\"storage\":{\"type\":\"object\",\"properties\":{\"pallet\":{\"type\":\"string\"},\"item\":{\"type\":\"string\"},\"field1\":{\"type\":\"string\",\"description\":\"A field of the storage item. (i.e `system::Account::get(address).data`)\\n\"},\"field2\":{\"type\":\"string\",\"description\":\"A field of the struct described by field1 (i.e\\n`system::Account::get(address).data.free`)\\n\"}}},\"amount\":{\"$ref\":\"#/components/schemas/OperationAmount\"}}},\"OperationAmount\":{\"type\":\"object\",\"properties\":{\"values\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"currency\":{\"$ref\":\"#/components/schemas/OperationAmountCurrency\"}}},\"OperationAmountCurrency\":{\"type\":\"object\",\"properties\":{\"symbol\":{\"type\":\"string\",\"example\":\"KSM\"}}},\"OperationPhase\":{\"type\":\"object\",\"properties\":{\"variant\":{\"type\":\"string\",\"enum\":[\"onInitialize\",\"initialChecks\",\"applyExtrinsic\",\"onFinalize\",\"finalChecks\"],\"description\":\"Phase of block execution pipeline.\"},\"extrinsicIndex\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"If phase variant is `applyExtrinsic` this will be the index of\\nthe extrinsic. Otherwise this field will not be present.\\n\"}}},\"PalletsAssetsInfo\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"assetInfo\":{\"$ref\":\"#/components/schemas/AssetInfo\"},\"assetMetadata\":{\"$ref\":\"#/components/schemas/AssetMetadata\"}}},\"PalletStorage\":{\"type\":\"object\",\"properties\":{\"pallet\":{\"type\":\"string\",\"description\":\"Name of the pallet.\",\"example\":\"democracy\"},\"palletIndex\":{\"type\":\"string\",\"description\":\"Index of the pallet for looking up storage.\",\"example\":\"15\"},\"items\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/PalletStorageItemMetadata\"},\"description\":\"Array containing metadata for each storage entry of the pallet.\"}}},\"PalletStorageItem\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"pallet\":{\"type\":\"string\",\"description\":\"Name of the pallet.\",\"example\":\"democracy\"},\"palletIndex\":{\"type\":\"string\",\"description\":\"Index of the pallet for looking up storage.\",\"example\":\"15\"},\"storageItem\":{\"type\":\"string\",\"description\":\"Name of the storage item.\",\"example\":\"referendumInfoOf\"},\"key1\":{\"type\":\"string\",\"description\":\"Key1 query param. Will not show up in response unless it was passed as part of the URI.\",\"example\":\"2\"},\"key2\":{\"type\":\"string\",\"description\":\"Key2 query param. Will not show up in response if not defined in URI.\",\"example\":\"\"},\"value\":{\"type\":\"object\",\"description\":\"Value returned by this storage query.\",\"example\":{\"Ongoing\":{\"end\":\"1612800\",\"proposalHash\":\"0x7de70fc8be782076d0b5772be77153d172a5381c72dd56d3385e25f62abf507e\",\"threshold\":\"Supermajorityapproval\",\"delay\":\"403200\",\"tally\":{\"ayes\":\"41925212461400000\",\"nays\":\"214535586500000\",\"turnout\":\"34485320658000000\"}}}},\"metadata\":{\"$ref\":\"#/components/schemas/PalletStorageItemMetadata\"}}},\"PalletStorageItemMetadata\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"example\":\"ReferendumInfoOf\",\"description\":\"The storage item's name (which is the same as the storage item's ID).\"},\"modifier\":{\"type\":\"string\",\"example\":\"Optional\"},\"type\":{\"$ref\":\"#/components/schemas/PalletStorageType\"},\"fallback\":{\"type\":\"string\",\"example\":\"0x00\"},\"docs\":{\"type\":\"string\",\"example\":\" Information concerning any given referendum.\\n\\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control.\"}},\"description\":\"Metadata of a storage item from a FRAME pallet.\"},\"PalletStorageType\":{\"type\":\"object\",\"description\":\"If the query parameter 'adjustMetadataV13' is set to true, all historic blocks that are pre v9110 will have the return type `StorageEntryTypeV13`, and all present and post v9110 blocks will have a return type of `StorageEntryTypeV14`. Please check those types to see potential responses. This will be deprecated and removed in the future, and will only live as `StorageEntryTypeV14`.\"},\"Para\":{\"type\":\"object\",\"properties\":{\"paraId\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"paraLifecycle\":{\"$ref\":\"#/components/schemas/ParaLifecycle\"},\"onboardingAs\":{\"$ref\":\"#/components/schemas/OnboardingAs\"}}},\"Paras\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"paras\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/Para\"}}}},\"ParasAuctionsCurrent\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"beginEnd\":{\"type\":\"string\",\"format\":\"unisgnedInteger or $null\",\"description\":\"Fist block (number) of the auction ending phase. `null` if there is no ongoing\\nauction.\\n\"},\"finishEnd\":{\"type\":\"string\",\"format\":\"unisgnedInteger or $null\",\"description\":\"Last block (number) of the auction ending phase. `null` if there is no ongoing\\nauction.\\n\"},\"phase\":{\"type\":\"string\",\"enum\":[\"startPeriod\",\"endPeriod\",\"vrfDelay\"],\"description\":\"An auction can be in one of 4 phases. Both `startingPeriod` () and `endingPeriod` indicate\\nan ongoing auction, while `vrfDelay` lines up with the `AuctionStatus::VrfDelay` . Finally, a value of `null`\\nindicates there is no ongoing auction. Keep in mind the that the `finishEnd` field is the block number the \\n`endingPeriod` finishes and the `vrfDelay` period begins. The `vrfDelay` period is typically about an \\nepoch long and no crowdloan contributions are accepted. \\n\"},\"auctionIndex\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"The auction number. If there is no current auction this will be the number\\nof the previous auction.\\n\"},\"leasePeriods\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"description\":\"Lease period indexes that may be bid on in this auction. `null` if\\nthere is no ongoing auction.\\n\"},\"winning\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/WinningData\"}}}},\"ParasCrowdloans\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"funds\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"paraId\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"fundInfo\":{\"$ref\":\"#/components/schemas/FundInfo\"}}},\"description\":\"List of paras that have crowdloans.\\n\"}}},\"ParasCrowdloanInfo\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"fundInfo\":{\"$ref\":\"#/components/schemas/FundInfo\"},\"leasePeriods\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"description\":\"Lease periods the crowdloan can bid on.\"}}},\"ParasLeasesCurrent\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"leasePeriodIndex\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"Current lease period index.\"},\"endOfLeasePeriod\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"Last block (number) of the current lease period.\"},\"currentLeaseHolders\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"description\":\"List of `paraId`s that currently hold a lease.\"}}},\"ParasLeaseInfo\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"paraLifecycle\":{\"$ref\":\"#/components/schemas/ParaLifecycle\"},\"onboardingAs\":{\"$ref\":\"#/components/schemas/OnboardingAs\"},\"leases\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"leasePeriodIndex\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"account\":{\"type\":\"string\"},\"deposit\":{\"type\":\"string\",\"format\":\"unsignedInteger\"}}},\"description\":\"List of lease periods for which the `paraId` holds a lease along with\\nthe deposit held and the associated `accountId`.\\n\"}}},\"ParaLifecycle\":{\"type\":\"string\",\"enum\":[\"onboarding\",\"parathread\",\"parachain\",\"upgradingParathread\",\"downgradingParachain\",\"offboardingParathread\",\"offboardingParachain\"],\"description\":\"The possible states of a para, to take into account delayed lifecycle\\nchanges.\\n\"},\"Payouts\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"validatorId\":{\"type\":\"string\",\"description\":\"AccountId of the validator the payout is coming from.\"},\"nominatorStakingPayout\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"Payout for the reward destination associated with the accountId the query was made for.\"},\"claimed\":{\"type\":\"boolean\",\"description\":\"Whether or not the reward has been claimed.\"},\"totalValidatorRewardPoints\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"Number of reward points earned by the validator.\"},\"validatorCommission\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"The percentage of the total payout that the validator takes as commission, expressed as a Perbill.\"},\"totalValidatorExposure\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"The sum of the validator's and its nominators' stake.\"},\"nominatorExposure\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"The amount of stake the nominator has behind the validator.\"}},\"description\":\"Payout for a nominating _Stash_ address and information about the validator they were nominating.\"}},\"PeerInfo\":{\"type\":\"object\",\"properties\":{\"peerId\":{\"type\":\"string\",\"description\":\"Peer ID.\"},\"roles\":{\"type\":\"string\",\"description\":\"Roles the peer is running\"},\"protocolVersion\":{\"type\":\"string\",\"description\":\"Peer's protocol version.\",\"format\":\"unsignedInteger\"},\"bestHash\":{\"type\":\"string\",\"description\":\"Hash of the best block on the peer's canon chain.\",\"format\":\"hex\"},\"bestNumber\":{\"type\":\"string\",\"description\":\"Height of the best block on the peer's canon chain.\",\"format\":\"unsignedInteger\"}}},\"RuntimeCode\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"code\":{\"type\":\"string\",\"format\":\"hex\"}}},\"RuntimeDispatchInfo\":{\"type\":\"object\",\"properties\":{\"weight\":{\"type\":\"string\",\"description\":\"Extrinsic weight.\"},\"class\":{\"type\":\"string\",\"description\":\"Extrinsic class.\",\"enum\":[\"Normal\",\"Operational\",\"Mandatory\"]},\"partialFee\":{\"type\":\"string\",\"description\":\"The _inclusion fee_ of a transaction, i.e. the minimum fee required for a transaction. Includes weight and encoded length fees, but does not have access to any signed extensions, e.g. the `tip`.\",\"format\":\"unsignedInteger\"}},\"description\":\"RuntimeDispatchInfo for the transaction. Includes the `partialFee`.\"},\"RuntimeSpec\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"authoringVersion\":{\"type\":\"string\",\"description\":\"The version of the authorship interface. An authoring node will not attempt to author blocks unless this is equal to its native runtime.\"},\"chainType\":{\"$ref\":\"#/components/schemas/ChainType\"},\"implVersion\":{\"type\":\"string\",\"description\":\"Version of the implementation specification. Non-consensus-breaking optimizations are about the only changes that could be made which would result in only the `impl_version` changing. The `impl_version` is set to 0 when `spec_version` is incremented.\"},\"specName\":{\"type\":\"string\",\"description\":\"Identifies the different Substrate runtimes.\"},\"specVersion\":{\"type\":\"string\",\"description\":\"Version of the runtime specification.\"},\"transactionVersion\":{\"type\":\"string\",\"description\":\"All existing dispatches are fully compatible when this number doesn't change. This number must change when an existing dispatchable (module ID, dispatch ID) is changed, either through an alteration in its user-level semantics, a parameter added/removed/changed, a dispatchable being removed, a module being removed, or a dispatchable/module changing its index.\"},\"properties\":{\"type\":\"object\",\"description\":\"Arbitrary properties defined in the chain spec.\"}},\"description\":\"Version information related to the runtime.\"},\"SanitizedEvent\":{\"type\":\"object\",\"properties\":{\"method\":{\"type\":\"string\"},\"data\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}},\"Signature\":{\"type\":\"object\",\"properties\":{\"signature\":{\"type\":\"string\",\"format\":\"hex\"},\"signer\":{\"type\":\"string\",\"format\":\"ss58\"}},\"description\":\"Object with `signature` and `signer`, or `null` if unsigned.\"},\"SpanId\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"target\":{\"type\":\"string\"},\"id\":{\"type\":\"string\",\"format\":\"unsignedInteger\"}}},\"StakingLedger\":{\"type\":\"object\",\"properties\":{\"stash\":{\"type\":\"string\",\"description\":\"The _Stash_ account whose balance is actually locked and at stake.\",\"format\":\"ss58\"},\"total\":{\"type\":\"string\",\"description\":\"The total amount of the _Stash_'s balance that we are currently accounting for. Simply `active + unlocking`.\",\"format\":\"unsignedInteger\"},\"active\":{\"type\":\"string\",\"description\":\"The total amount of the _Stash_'s balance that will be at stake in any forthcoming eras.\",\"format\":\"unsignedInteger\"},\"unlocking\":{\"type\":\"string\",\"description\":\"Any balance that is becoming free, which may eventually be transferred out of the _Stash_ (assuming it doesn't get slashed first). Represented as an array of objects, each with an `era` at which `value` will be unlocked.\",\"format\":\"unsignedInteger\"},\"claimedRewards\":{\"type\":\"array\",\"description\":\"Array of eras for which the stakers behind a validator have claimed rewards. Only updated for _validators._\",\"items\":{\"type\":\"string\",\"format\":\"unsignedInteger\"}}},\"description\":\"The staking ledger.\"},\"StakingProgress\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"activeEra\":{\"type\":\"string\",\"description\":\"`EraIndex` of the era being rewarded.\\n\",\"format\":\"unsignedInteger\"},\"forceEra\":{\"type\":\"string\",\"description\":\"Current status of era forcing.\",\"enum\":[\"ForceNone\",\"NotForcing\",\"ForceAlways\",\"ForceNew\"]},\"nextActiveEraEstimate\":{\"type\":\"string\",\"description\":\"Upper bound estimate of the block height at which the next active era will start. Not included in response when `forceEra.isForceNone`.\",\"format\":\"unsignedInteger\"},\"nextSessionEstimate\":{\"type\":\"string\",\"description\":\"Upper bound estimate of the block height at which the next session will start.\",\"format\":\"unsignedInteger\"},\"unappliedSlashes\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/UnappliedSlash\"},\"description\":\"Array of upcoming `UnappliedSlash` indexed by era.\"},\"electionStatus\":{\"$ref\":\"#/components/schemas/ElectionStatus\"},\"idealValidatorCount\":{\"type\":\"string\",\"description\":\"Upper bound of validator set size; considered the ideal size. Not included in response when `forceEra.isForceNone`.\",\"format\":\"unsignedInteger\"},\"validatorSet\":{\"type\":\"array\",\"description\":\"Stash account IDs of the validators for the current session. Not included in response when `forceEra.isForceNone`.\",\"items\":{\"type\":\"string\",\"format\":\"ss58\"}}}},\"StorageEntryTypeV13\":{\"type\":\"object\",\"properties\":{\"hasher\":{\"type\":\"string\",\"description\":\"Returns a string deonting the storage hasher.\"},\"key\":{\"type\":\"string\",\"description\":\"Key of the queried pallet storageId.\"},\"value\":{\"type\":\"string\",\"description\":\"Value of the queried pallet storageId.\"},\"linked\":{\"type\":\"boolean\"}}},\"StorageEntryTypeV14\":{\"type\":\"object\",\"properties\":{\"hasher\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"description\":\"Returns a string denoting the storage hasher inside of an array.\"},\"key\":{\"type\":\"string\",\"description\":\"The SiLookupTypeId to identify the type.\"},\"value\":{\"type\":\"string\",\"description\":\"The SiLookupTypeId to identify the type.\"}}},\"TraceEvent\":{\"type\":\"object\",\"properties\":{\"data\":{\"type\":\"object\",\"properties\":{\"stringValues\":{\"$ref\":\"#/components/schemas/TraceEventDataStringValues\"}}},\"parentId\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"target\":{\"type\":\"string\"}}},\"TraceEventDataStringValues\":{\"type\":\"object\",\"properties\":{\"key\":{\"type\":\"string\",\"format\":\"hex\",\"description\":\"The complete storage key for the entry.\"},\"method\":{\"type\":\"string\",\"description\":\"Normally one of Put or Get.\"},\"result\":{\"type\":\"string\",\"format\":\"hex\",\"description\":\"Hex scale encoded storage value.\"}},\"description\":\"Note these exact values will only be present for storage events.\"},\"TraceSpan\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"name\":{\"type\":\"string\"},\"parentId\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"target\":{\"type\":\"string\"},\"wasm\":{\"type\":\"boolean\"}}},\"Transaction\":{\"type\":\"object\",\"properties\":{\"tx\":{\"type\":\"string\",\"format\":\"hex\"}}},\"TransactionDryRun\":{\"type\":\"object\",\"properties\":{\"resultType\":{\"type\":\"string\",\"enum\":[\"DispatchOutcome\",\"TransactionValidityError\"],\"description\":\"Either `DispatchOutcome` if the transaction is valid or `TransactionValidityError` if the result is invalid.\"},\"result\":{\"type\":\"string\",\"enum\":[\"Ok\",\"CannotLookup\",\"NoUnsignedValidator\",\"Custom(u8)\",\"Call\",\"Payment\",\"Future\",\"Stale\",\"BadProof\",\"AncientBirthBlock\",\"ExhaustsResources\",\"BadMandatory\",\"MandatoryDispatch\"],\"description\":\"If there was an error it will be the cause of the error. If the transaction executed correctly it will be `Ok: []`\"},\"validityErrorType\":{\"type\":\"string\",\"enum\":[\"InvalidTransaction\",\"UnknownTransaction\"]}},\"description\":\"References: - `UnknownTransaction`: https://crates.parity.io/sp_runtime/transaction_validity/enum.UnknownTransaction.html - `InvalidTransaction`: https://crates.parity.io/sp_runtime/transaction_validity/enum.InvalidTransaction.html\"},\"TransactionFailedToParse\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"number\"},\"error\":{\"type\":\"string\",\"description\":\"`Failed to parse a tx.`\"},\"transaction\":{\"type\":\"string\",\"format\":\"hex\"},\"cause\":{\"type\":\"string\"},\"stack\":{\"type\":\"string\"}},\"description\":\"Error message when Sidecar fails to parse the transaction.\"},\"TransactionFailedToSubmit\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"number\"},\"error\":{\"type\":\"string\",\"description\":\"Failed to submit transaction.\"},\"transaction\":{\"type\":\"string\",\"format\":\"hex\"},\"cause\":{\"type\":\"string\"},\"stack\":{\"type\":\"string\"}},\"description\":\"Error message when the node rejects the submitted transaction.\"},\"TransactionFailure\":{\"oneOf\":[{\"$ref\":\"#/components/schemas/TransactionFailedToSubmit\"},{\"$ref\":\"#/components/schemas/TransactionFailedToParse\"}]},\"TransactionFeeEstimate\":{\"type\":\"object\",\"properties\":{\"weight\":{\"type\":\"string\",\"description\":\"Extrinsic weight.\"},\"class\":{\"type\":\"string\",\"description\":\"Extrinsic class.\",\"enum\":[\"Normal\",\"Operational\",\"Mandatory\"]},\"partialFee\":{\"type\":\"string\",\"description\":\"Expected inclusion fee for the transaction. Note that the fee rate changes up to 30% in a 24 hour period and this will not be the exact fee.\",\"format\":\"unsignedInteger\"}},\"description\":\"Note: `partialFee` does not include any tips that you may add to increase a transaction's priority. See [compute_fee](https://crates.parity.io/pallet_transaction_payment/struct.Module.html#method.compute_fee).\"},\"TransactionFeeEstimateFailure\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"number\"},\"at\":{\"type\":\"object\",\"properties\":{\"hash\":{\"type\":\"string\"}}},\"error\":{\"type\":\"string\",\"description\":\"Error description.\"},\"transaction\":{\"type\":\"string\",\"format\":\"hex\"},\"block\":{\"type\":\"string\",\"description\":\"Block hash of the block fee estimation was attempted at.\"},\"cause\":{\"type\":\"string\",\"description\":\"Error message from the client.\"},\"stack\":{\"type\":\"string\"}}},\"TransactionMaterial\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"genesisHash\":{\"type\":\"string\",\"description\":\"The hash of the chain's genesis block.\",\"format\":\"blockHash\"},\"chainName\":{\"type\":\"string\",\"description\":\"The chain's name.\"},\"specName\":{\"type\":\"string\",\"description\":\"The chain's spec.\"},\"specVersion\":{\"type\":\"string\",\"description\":\"The spec version. Always increased in a runtime upgrade.\"},\"txVersion\":{\"type\":\"string\",\"description\":\"The transaction version. Common `txVersion` numbers indicate that the transaction encoding format and method indices are the same. Needed for decoding in an offline environment. Adding new transactions does not change `txVersion`.\"},\"metadata\":{\"type\":\"string\",\"description\":\"The chain's metadata. It's default return value is hex, but may be returned in decoded json format.\",\"format\":\"hex\"}},\"description\":\"Note: `chainName`, `specName`, and `specVersion` are used to define a type registry with a set of signed extensions and types. For Polkadot and Kusama, `chainName` is not used in defining this registry, but in other Substrate-based chains that re-launch their network without changing the `specName`, the `chainName` would be needed to create the correct registry. Substrate Reference: - `RuntimeVersion`: https://crates.parity.io/sp_version/struct.RuntimeVersion.html - `SignedExtension`: https://crates.parity.io/sp_runtime/traits/trait.SignedExtension.html - FRAME Support: https://crates.parity.io/frame_support/metadata/index.html\"},\"TransactionPool\":{\"type\":\"object\",\"properties\":{\"pool\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"hash\":{\"type\":\"string\",\"format\":\"hex\",\"description\":\"H256 hash of the extrinsic.\"},\"encodedExtrinsic\":{\"type\":\"string\",\"format\":\"hex\",\"description\":\"Scale encoded extrinsic.\"}}}}}},\"TransactionSuccess\":{\"type\":\"object\",\"properties\":{\"hash\":{\"type\":\"string\",\"description\":\"The hash of the encoded transaction.\"}}},\"UnappliedSlash\":{\"type\":\"object\",\"properties\":{\"validator\":{\"type\":\"string\",\"description\":\"Stash account ID of the offending validator.\",\"format\":\"ss58\"},\"own\":{\"type\":\"string\",\"description\":\"The amount the validator will be slashed.\",\"format\":\"unsignedInteger\"},\"others\":{\"type\":\"array\",\"description\":\"Array of tuples(`[accountId, amount]`) representing all the stashes of other slashed stakers and the amount they will be slashed.\",\"items\":{\"type\":\"string\",\"format\":\"tuple[ss58, unsignedInteger]\"}},\"reporters\":{\"type\":\"array\",\"description\":\"Array of account IDs of the reporters of the offense.\",\"items\":{\"type\":\"string\",\"format\":\"ss58\"}},\"payout\":{\"type\":\"string\",\"description\":\"Amount of bounty payout to reporters.\",\"format\":\"unsignedInteger\"}}},\"VestingSchedule\":{\"type\":\"object\",\"properties\":{\"locked\":{\"type\":\"string\",\"description\":\"Number of tokens locked at start.\",\"format\":\"unsignedInteger\"},\"perBlock\":{\"type\":\"string\",\"description\":\"Number of tokens that gets unlocked every block after `startingBlock`.\",\"format\":\"unsignedInteger\"},\"startingBlock\":{\"type\":\"string\",\"description\":\"Starting block for unlocking (vesting).\",\"format\":\"unsignedInteger\"}},\"description\":\"Vesting schedule for an account.\"},\"WinningData\":{\"type\":\"object\",\"properties\":{\"bid\":{\"type\":\"object\",\"properties\":{\"accountId\":{\"type\":\"string\"},\"paraId\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"amount\":{\"type\":\"string\",\"format\":\"unsignedInteger\"}}},\"leaseSet\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"format\":\"unsignedInteger\"}}},\"description\":\"A currently winning bid and the set of lease periods the bid is for. The\\n`amount` of the bid is per lease period. The `bid` property will be `null`\\nif no bid has been made for the corresponding `leaseSet`.\\n\"}},\"requestBodies\":{\"Transaction\":{\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Transaction\"}}},\"required\":true}}}}\n\n//# sourceURL=webpack:///./src/openapi-v1.yaml?"); +eval("module.exports = {\"openapi\":\"3.0.0\",\"info\":{\"title\":\"Substrate API Sidecar\",\"description\":\"Substrate API Sidecar is a REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.\",\"contact\":{\"url\":\"https://github.com/paritytech/substrate-api-sidecar\"},\"license\":{\"name\":\"GPL-3.0-or-later\",\"url\":\"https://github.com/paritytech/substrate-api-sidecar/blob/master/LICENSE\"},\"version\":\"11.1.2\"},\"tags\":[{\"name\":\"accounts\"},{\"name\":\"blocks\"},{\"name\":\"node\",\"description\":\"node connected to sidecar\"},{\"name\":\"pallets\",\"description\":\"pallets employed in the runtime\"},{\"name\":\"runtime\"},{\"name\":\"transaction\"},{\"name\":\"paras\"},{\"name\":\"trace\"}],\"paths\":{\"/accounts/{accountId}/asset-balances\":{\"get\":{\"tags\":[\"accounts\"],\"summary\":\"Get an array of asset-balances for an account.\",\"description\":\"Returns information about an account's asset-balances. This is specific to the assets pallet for parachains. If no `assets` query parameter is provided, all asset-balances for the given account will be returned.\",\"operationId\":\"getAssetBalances\",\"parameters\":[{\"name\":\"accountId\",\"in\":\"path\",\"description\":\"SS58 address of the account.\",\"required\":true,\"schema\":{\"type\":\"string\",\"format\":\"SS58\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to query asset-balance info for the specified account.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block height (as a positive integer) or hash (as a hex string).\",\"format\":\"unsignedInteger or $hex\"}},{\"name\":\"assets\",\"in\":\"query\",\"description\":\"An array of AssetId's to be queried. If not supplied, defaults to providing all asset balances associated with the `accountId` will be returned. The array query param format follows Express 4.x API. ex:`?assets[]=1&assets[]=2&assets[]=3`.\",\"required\":false,\"schema\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"description\":\"An array of assetId numbers represented as strings\",\"format\":\"Array of unsignedInteger's\"}}],\"responses\":{\"200\":{\"description\":\"successfull operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/AccountAssetsBalances\"}}}}}}},\"/accounts/{accountId}/asset-approvals\":{\"get\":{\"tags\":[\"accounts\"],\"summary\":\"Get an asset approval for an account.\",\"description\":\"Returns information about an account's asset approval transaction. It is required to pass in a delegate and an assetId as query parameters.\",\"operationId\":\"getAssetApprovals\",\"parameters\":[{\"name\":\"accountId\",\"in\":\"path\",\"description\":\"SS58 address of the account.\",\"required\":true,\"schema\":{\"type\":\"string\",\"format\":\"SS58\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to query asset approval info for the specified account.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block height (as a non-negative integer) or hash (as a hex string).\",\"format\":\"unsignedInteger or $hex\"}},{\"name\":\"assetId\",\"in\":\"query\",\"description\":\"The `assetId` associated with the asset-approval.\",\"required\":true,\"schema\":{\"type\":\"string\",\"description\":\"An assetId represented as an unsignedInteger.\",\"format\":\"unsignedInteger\"}},{\"name\":\"delegate\",\"in\":\"query\",\"description\":\"The delegate's `accountId` associated with an asset-approval.\",\"required\":true,\"schema\":{\"type\":\"string\",\"format\":\"SS58\"}}],\"responses\":{\"200\":{\"description\":\"successfull operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/AccountAssetsApproval\"}}}}}}},\"/accounts/{accountId}/balance-info\":{\"get\":{\"tags\":[\"accounts\"],\"summary\":\"Get balance information for an account.\",\"description\":\"Returns information about an account's balance. Replaces `/balance/{address}` from versions < v1.0.0.\",\"operationId\":\"getAccountBalanceInfo\",\"parameters\":[{\"name\":\"accountId\",\"in\":\"path\",\"description\":\"SS58 address of the account.\",\"required\":true,\"schema\":{\"type\":\"string\",\"format\":\"SS58\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to query balance info for the specified account.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block height (as a non-negative integer) or hash (as a hex string).\",\"format\":\"unsignedInteger or $hex\"}},{\"name\":\"token\",\"in\":\"query\",\"description\":\"Token to query the balance of. If not specified it will query the chains native token (e.g. DOT for Polkadot). Note: this is only relevant for chains that support multiple tokens through the ORML tokens pallet.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Token symbol\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/AccountBalanceInfo\"}}}},\"400\":{\"description\":\"invalid blockId supplied for at query param\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}},\"404\":{\"description\":\"account not found\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/accounts/{accountId}/staking-info\":{\"get\":{\"tags\":[\"staking\"],\"summary\":\"Get staking information for a _Stash_ account.\",\"description\":\"Returns information about a _Stash_ account's staking activity. Replaces `/staking/{address}` from versions < v1.0.0.\",\"operationId\":\"getStakingSummaryByAccountId\",\"parameters\":[{\"name\":\"accountId\",\"in\":\"path\",\"description\":\"SS58 address of the account. Must be a _Stash_ account.\",\"required\":true,\"schema\":{\"format\":\"SS58\",\"type\":\"string\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to query the staking info for the specified account.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/AccountStakingInfo\"}}}},\"400\":{\"description\":\"invalid blockId supplied for at query param\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}},\"404\":{\"description\":\"account not found\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/accounts/{accountId}/staking-payouts\":{\"get\":{\"tags\":[\"staking\"],\"summary\":\"Get payout information for a _Stash_ account.\",\"description\":\"Returns payout information for the last specified eras. If specifying both the depth and era query params, this endpoint will return information for (era - depth) through era. (i.e. if depth=5 and era=20 information will be returned for eras 16 through 20). N.B. You cannot query eras less then `current_era - HISTORY_DEPTH`. N.B. The `nominator*` fields correspond to the address being queried, even if it is a validator's _Stash_ address. This is because a validator is technically nominating itself.\",\"operationId\":\"getStakingPayoutsByAccountId\",\"parameters\":[{\"name\":\"accountId\",\"in\":\"path\",\"description\":\"SS58 address of the account. Must be a _Stash_ account.\",\"required\":true,\"schema\":{\"format\":\"SS58\",\"type\":\"string\"}},{\"name\":\"depth\",\"in\":\"query\",\"description\":\"The number of eras to query for payouts of. Must be less than or equal to `HISTORY_DEPTH`. In cases where `era - (depth -1)` is less than 0, the first era queried will be 0.\",\"required\":false,\"schema\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"default\":1}},{\"name\":\"era\",\"in\":\"query\",\"description\":\"The era to query at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"default\":\"`active_era - 1`\"}},{\"name\":\"unclaimedOnly\",\"in\":\"query\",\"description\":\"Only return unclaimed rewards.\",\"required\":false,\"schema\":{\"type\":\"string\",\"format\":\"boolean\",\"default\":true}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/AccountStakingPayouts\"}}}},\"400\":{\"description\":\"invalid blockId supplied for at query param\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}},\"404\":{\"description\":\"account not found\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/accounts/{accountId}/vesting-info\":{\"get\":{\"tags\":[\"accounts\"],\"summary\":\"Get vesting information for an account.\",\"description\":\"Returns the vesting schedule for an account. Replaces `/vesting/{address}` from versions < v1.0.0.\",\"operationId\":\"getVestingSummaryByAccountId\",\"parameters\":[{\"name\":\"accountId\",\"in\":\"path\",\"description\":\"SS58 address of the account.\",\"required\":true,\"schema\":{\"format\":\"SS58\",\"type\":\"string\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to query the vesting info for the specified account.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/AccountVestingInfo\"}}}},\"400\":{\"description\":\"invalid blockId supplied for at query param\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}},\"404\":{\"description\":\"account not found\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/accounts/{accountId}/validate\":{\"get\":{\"tags\":[\"accounts\"],\"summary\":\"Validate a given address.\",\"description\":\"Returns whether the given address is valid ss58 format and the ss58 prefix if the address has one.\",\"operationId\":\"getValidationByAccountId\",\"parameters\":[{\"name\":\"accountId\",\"in\":\"path\",\"description\":\"SS58 or Hex address of the account.\",\"required\":true,\"schema\":{\"format\":\"SS58 or Hex\",\"type\":\"string\"}}],\"responses\":{\"200\":{\"description\":\"successfully retrieved address info\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/AccountValidation\"}}}}}}},\"/blocks/{blockId}\":{\"get\":{\"tags\":[\"blocks\"],\"summary\":\"Get a block by its height or hash.\",\"description\":\"Returns a single block. BlockId can either be a block hash or a block height. Replaces `/block/{number}` from versions < v1.0.0.\",\"operationId\":\"getBlockById\",\"parameters\":[{\"name\":\"blockId\",\"in\":\"path\",\"description\":\"Block identifier, as the block height or block hash.\",\"required\":true,\"schema\":{\"pattern\":\"a-km-zA-HJ-NP-Z1-9{8,64}\",\"type\":\"string\"}},{\"name\":\"eventDocs\",\"in\":\"query\",\"description\":\"When set to `true`, every event will have an extra `docs` property with a string of the events documentation.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false}},{\"name\":\"extrinsicDocs\",\"in\":\"query\",\"description\":\"When set to `true`, every extrinsic will have an extra `docs` property with a string of the extrinsics documentation.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Block\"}}}},\"400\":{\"description\":\"invalid Block identifier supplied\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/blocks/{blockId}/header\":{\"get\":{\"tags\":[\"blocks\"],\"summary\":\"Get a block's header by its height or hash.\",\"description\":\"Returns a single block's header. BlockId can either be a block hash or a block height.\",\"operationId\":\"getBlockHeaderById\",\"parameters\":[{\"name\":\"blockId\",\"in\":\"path\",\"description\":\"Block identifier, as the block height or block hash.\",\"required\":true,\"schema\":{\"pattern\":\"a-km-zA-HJ-NP-Z1-9{8,64}\",\"type\":\"string\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/BlockHeader\"}}}},\"400\":{\"description\":\"invalid Block identifier supplied\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/blocks/{blockId}/extrinsics/{extrinsicIndex}\":{\"get\":{\"tags\":[\"blocks\"],\"summary\":\"Get an extrinsic by its extrinsicIndex and block height or hash. The pair blockId, extrinsicIndex is sometimes referred to as a Timepoint.\",\"description\":\"Returns a single extrinsic.\",\"operationId\":\"getExtrinsicByTimepoint\",\"parameters\":[{\"name\":\"blockId\",\"in\":\"path\",\"description\":\"Block identifier, as the block height or block hash.\",\"required\":true,\"schema\":{\"pattern\":\"a-km-zA-HJ-NP-Z1-9{8,64}\",\"type\":\"string\"}},{\"name\":\"extrinsicIndex\",\"in\":\"path\",\"description\":\"The extrinsic's index within the block's body.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"eventDocs\",\"in\":\"query\",\"description\":\"When set to `true`, every event will have an extra `docs` property with a string of the events documentation.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false}},{\"name\":\"extrinsicDocs\",\"in\":\"query\",\"description\":\"When set to `true`, every extrinsic will have an extra `docs` property with a string of the extrinsics documentation.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ExtrinsicIndex\"}}}},\"400\":{\"description\":\"Requested `extrinsicIndex` does not exist\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/blocks/head\":{\"get\":{\"tags\":[\"blocks\"],\"summary\":\"Get the most recently finalized block.\",\"description\":\"Returns the most recently finalized block. Replaces `/block` from versions < v1.0.0.\",\"operationId\":\"getHeadBlock\",\"parameters\":[{\"name\":\"finalized\",\"in\":\"query\",\"description\":\"Boolean representing whether or not to get the finalized head. If it is not set the value defaults to true. When set to false it will attempt to get the newest known block, which may not be finalized.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":true}},{\"name\":\"eventDocs\",\"in\":\"query\",\"description\":\"When set to `true`, every event will have an extra `docs` property with a string of the events documentation.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false}},{\"name\":\"extrinsicDocs\",\"in\":\"query\",\"description\":\"When set to `true`, every extrinsic will have an extra `docs` property with a string of the extrinsics documentation.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Block\"}}}}}}},\"/blocks/head/header\":{\"get\":{\"tags\":[\"blocks\"],\"summary\":\"Get information about the header of the most recent finalized block.\",\"description\":\"Returns the most recently finalized block's header.\",\"operationId\":\"getLatestBlockHeader\",\"parameters\":[{\"name\":\"finalized\",\"in\":\"query\",\"description\":\"Boolean representing whether or not to get the finalized head. If it is not set the value defaults to true. When set to false it will attempt to get the newest known block, which may not be finalized.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":true}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/BlockHeader\"}}}},\"400\":{\"description\":\"invalid Block identifier supplied\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/node/network\":{\"get\":{\"tags\":[\"node\"],\"summary\":\"Get information about the Substrate node's activity in the peer-to-peer network.\",\"description\":\"Returns network related information of the node.\",\"operationId\":\"getNodeNetworking\",\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/NodeNetwork\"}}}}}}},\"/node/transaction-pool\":{\"get\":{\"tags\":[\"node\"],\"summary\":\"Get pending extrinsics from the Substrate node.\",\"description\":\"Returns the extrinsics that the node knows of that have not been included in a block.\",\"operationId\":\"getNodeTransactionPool\",\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/TransactionPool\"}}}}}}},\"/node/version\":{\"get\":{\"tags\":[\"node\"],\"summary\":\"Get information about the Substrates node's implementation and versioning.\",\"description\":\"Returns versioning information of the node.\",\"operationId\":\"getNodeVersion\",\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/NodeVersion\"}}}}}}},\"/transaction\":{\"post\":{\"tags\":[\"transaction\"],\"summary\":\"Submit a transaction to the node's transaction pool.\",\"description\":\"Accepts a valid signed extrinsic. Replaces `/tx` from versions < v1.0.0.\",\"operationId\":\"submitTransaction\",\"requestBody\":{\"$ref\":\"#/components/requestBodies/Transaction\"},\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/TransactionSuccess\"}}}},\"400\":{\"description\":\"failed to parse or submit transaction\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/TransactionFailure\"}}}}}}},\"/transaction/dry-run\":{\"post\":{\"tags\":[\"transaction\"],\"summary\":\"Dry run an extrinsic.\",\"description\":\"Use the dryrun call to practice submission of a transaction.\",\"operationId\":\"dryrunTransaction\",\"requestBody\":{\"$ref\":\"#/components/requestBodies/Transaction\"},\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/TransactionDryRun\"}}}},\"500\":{\"description\":\"failed to dry-run transaction\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/TransactionFailure\"}}}}}}},\"/transaction/fee-estimate\":{\"post\":{\"tags\":[\"transaction\"],\"summary\":\"Receive a fee estimate for a transaction.\",\"description\":\"Send a serialized transaction and receive back a naive fee estimate. Note: `partialFee` does not include any tips that you may add to increase a transaction's priority. See the reference on `compute_fee`. Replaces `/tx/fee-estimate` from versions < v1.0.0. Substrate Reference: - `RuntimeDispatchInfo`: https://crates.parity.io/pallet_transaction_payment_rpc_runtime_api/struct.RuntimeDispatchInfo.html - `query_info`: https://crates.parity.io/pallet_transaction_payment/struct.Module.html#method.query_info - `compute_fee`: https://crates.parity.io/pallet_transaction_payment/struct.Module.html#method.compute_fee\",\"operationId\":\"feeEstimateTransaction\",\"requestBody\":{\"$ref\":\"#/components/requestBodies/Transaction\"},\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/TransactionFeeEstimate\"}}}},\"500\":{\"description\":\"fee estimation failure\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/TransactionFeeEstimateFailure\"}}}}}}},\"/transaction/material\":{\"get\":{\"tags\":[\"transaction\"],\"summary\":\"Get all the network information needed to construct a transaction offline.\",\"description\":\"Returns the material that is universal to constructing any signed transaction offline. Replaces `/tx/artifacts` from versions < v1.0.0.\",\"operationId\":\"getTransactionMaterial\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve the transaction construction material.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}},{\"name\":\"noMeta\",\"in\":\"query\",\"schema\":{\"type\":\"boolean\",\"description\":\"If true, does not return metadata hex. This is useful when metadata is not needed and response time is a concern. Defaults to false. This is due for deprecation in future releases. Please migrate to using the `metadata` query param.\",\"default\":false}},{\"name\":\"metadata\",\"in\":\"query\",\"schema\":{\"type\":\"string\",\"description\":\"Specifies the format of the metadata to be returned. Accepted values are 'json', and 'scale'. 'json' being the decoded metadata, and 'scale' being the SCALE encoded metadata. When inputted it will override the `noMeta` query parameter.\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/TransactionMaterial\"}}}},\"400\":{\"description\":\"invalid blockId supplied for at query param\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/pallets/assets/{assetId}/asset-info\":{\"get\":{\"tags\":[\"pallets\"],\"summary\":\"Get information and metadata associated with an asset.\",\"description\":\"Returns information associated with an asset which includes the assets `AssetDetails` and `AssetMetadata`.\",\"operationId\":\"getAssetById\",\"parameters\":[{\"name\":\"assetId\",\"in\":\"path\",\"description\":\"The unsignedInteger Id of an asset.\",\"required\":true,\"schema\":{\"type\":\"string\",\"format\":\"unsignedInteger\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve the assetInfo.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/PalletsAssetsInfo\"}}}}}}},\"/pallets/staking/progress\":{\"get\":{\"tags\":[\"staking\",\"pallets\"],\"summary\":\"Get progress on the general Staking pallet system.\",\"description\":\"Returns information on the progress of key components of the staking system and estimates of future points of interest. Replaces `/staking-info` from versions < v1.0.0.\",\"operationId\":\"getStakingProgress\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve a staking progress report.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/StakingProgress\"}}}},\"400\":{\"description\":\"invalid blockId supplied for at query param\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/runtime/metadata\":{\"get\":{\"tags\":[\"runtime\"],\"summary\":\"Get the runtime metadata in decoded, JSON form.\",\"description\":\"Returns the runtime metadata as a JSON object. Substrate Reference: - FRAME Support: https://crates.parity.io/frame_support/metadata/index.html - Knowledge Base: https://substrate.dev/docs/en/knowledgebase/runtime/metadata\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve the metadata at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"description\":\"Response is dependent on the runtime metadata contents.\"}}}}}}},\"/runtime/code\":{\"get\":{\"tags\":[\"runtime\"],\"summary\":\"Get the runtime wasm blob.\",\"description\":\"Returns the runtime Wasm blob in hex format.\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve the runtime wasm blob at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/RuntimeCode\"}}}}}}},\"/runtime/spec\":{\"get\":{\"tags\":[\"runtime\"],\"summary\":\"Get version information of the Substrate runtime.\",\"description\":\"Returns version information related to the runtime.\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve runtime version information at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/RuntimeSpec\"}}}}}}},\"/pallets/{palletId}/storage\":{\"get\":{\"tags\":[\"pallets\"],\"summary\":\"Get a list of storage items for a pallet.\",\"description\":\"Returns a list of storage item metadata for storage items of the specified palletId.\",\"parameters\":[{\"name\":\"palletId\",\"in\":\"path\",\"description\":\"Name or index of the pallet to query the storage of. Note: the pallet name must match what is specified in the runtime metadata.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"adjustMetadataV13\",\"in\":\"query\",\"description\":\"Instruct sidecar to return `StorageEntryType` in the V13 metadata format rather than V14. This is a **temporary** flag to allow existing systems to migrate. It will be deprecated and then removed in the future.\",\"required\":false,\"schema\":{\"type\":\"boolean\"}},{\"name\":\"onlyIds\",\"in\":\"query\",\"description\":\"Only return the names (IDs) of the storage items instead of all of each storage item's metadata.\",\"required\":false,\"schema\":{\"type\":\"boolean\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve a list of the pallet's storage items.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"array\",\"description\":\"Pallet info and Array of storageItemIds.\",\"items\":{\"$ref\":\"#/components/schemas/PalletStorage\"}}}}},\"400\":{\"description\":\"invalid blockId supplied for at query param\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}},\"404\":{\"description\":\"could not find pallet with palletId\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/pallets/{palletId}/storage/{storageItemId}\":{\"get\":{\"tags\":[\"pallets\"],\"summary\":\"Get the value of a storage item.\",\"description\":\"Returns the value stored under the storageItemId. If it is a map, query param key1 is required. If the storage item is double map query params key1 and key2 are required.\",\"parameters\":[{\"name\":\"palletId\",\"in\":\"path\",\"description\":\"Name or index of the pallet to query the storage of. Note: pallet name aligns with pallet name as specified in runtime metadata.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"storageItemId\",\"in\":\"path\",\"description\":\"Id of the storage item to query for.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"adjustMetadataV13\",\"in\":\"query\",\"description\":\"Instruct sidecar to return `StorageEntryType` in the V13 metadata format rather than V14. This is a **temporary** flag to allow existing systems to migrate. It will be deprecated and then removed in the future.\",\"required\":false,\"schema\":{\"type\":\"boolean\"}},{\"name\":\"key1\",\"in\":\"query\",\"description\":\"Key for a map, or first key for a double map. Required for querying a map.\",\"required\":false,\"schema\":{\"type\":\"string\"}},{\"name\":\"key2\",\"in\":\"query\",\"description\":\"Second key for a double map. Required for querying a double map.\",\"required\":false,\"schema\":{\"type\":\"string\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to query the storage item at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}},{\"name\":\"metadata\",\"in\":\"query\",\"description\":\"Include the storage items metadata (including documentation) if set to true.\",\"required\":false,\"schema\":{\"default\":false,\"type\":\"boolean\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/PalletStorageItem\"}}}},\"400\":{\"description\":\"invalid blockId supplied for at query param\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}},\"404\":{\"description\":\"could not find resource with with id\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Error\"}}}}}}},\"/experimental/paras\":{\"get\":{\"tags\":[\"paras\"],\"summary\":\"[Experimental - subject to breaking change.] List all registered paras\\n(parathreads & parachains).\\n\",\"description\":\"Returns all registered parachains and parathreads with lifecycle info.\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve paras list at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Paras\"}}}}}}},\"/experimental/paras/leases/current\":{\"get\":{\"tags\":[\"paras\"],\"summary\":\"[Experimental - subject to breaking change.] Get general information about\\nthe current lease period.\\n\",\"description\":\"Returns an overview of the current lease period, including lease holders.\\n\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve current lease period info at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}},{\"name\":\"currentLeaseHolders\",\"in\":\"query\",\"description\":\"Wether or not to include the `currentLeaseHolders` property. Inclusion\\nof the property will likely result in a larger payload and increased\\nresponse time.\\n\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":true}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ParasLeasesCurrent\"}}}}}}},\"/experimental/paras/auctions/current\":{\"get\":{\"tags\":[\"paras\"],\"summary\":\"[Experimental - subject to breaking change.] Get the status of the current\\nauction.\\n\",\"description\":\"Returns an overview of the current of auction. There is only one auction\\nat a time. If there is no auction most fields will be `null`.\\n\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve auction progress at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ParasAuctionsCurrent\"}}}}}}},\"/experimental/paras/crowdloans\":{\"get\":{\"tags\":[\"paras\"],\"summary\":\"[Experimental - subject to breaking change.] List all stored crowdloans.\\n\",\"description\":\"Returns a list of all the crowdloans and their associated paraIds.\\n\",\"parameters\":[{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve the list of paraIds that have crowdloans at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ParasCrowdloans\"}}}}}}},\"/experimental/paras/{paraId}/crowdloan-info\":{\"get\":{\"tags\":[\"paras\"],\"summary\":\"[Experimental - subject to breaking change.] Get crowdloan information for a\\n`paraId`.\\n\",\"description\":\"Returns crowdloan's `fundInfo` and the set of `leasePeriods` the crowdloan`\\ncovers.\\n\",\"parameters\":[{\"name\":\"paraId\",\"in\":\"path\",\"description\":\"paraId to query the crowdloan information of.\",\"required\":true,\"schema\":{\"type\":\"number\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve info at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ParasCrowdloanInfo\"}}}}}}},\"/experimental/paras/{paraId}/lease-info\":{\"get\":{\"tags\":[\"paras\"],\"summary\":\"[Experimental - subject to breaking change.] Get current and future leases\\nas well as the lifecycle stage for a given `paraId`.\\n\",\"description\":\"Returns a list of leases that belong to the `paraId` as well as the\\n`paraId`'s current lifecycle stage.\\n\",\"parameters\":[{\"name\":\"paraId\",\"in\":\"path\",\"description\":\"paraId to query the crowdloan information of.\",\"required\":true,\"schema\":{\"type\":\"number\"}},{\"name\":\"at\",\"in\":\"query\",\"description\":\"Block at which to retrieve para's leases at.\",\"required\":false,\"schema\":{\"type\":\"string\",\"description\":\"Block identifier, as the block height or block hash.\",\"format\":\"unsignedInteger or $hex\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ParasLeaseInfo\"}}}}}}},\"/experimental/blocks/head/traces\":{\"get\":{\"tags\":[\"trace\"],\"summary\":\"[Experimental - subject to breaking change.] Get traces for the most\\nrecently finalized block.\\n\",\"description\":\"Returns traces (spans and events) of the most recently finalized block from\\nRPC `state_straceBlock`. Consult the [RPC docs](https://github.com/paritytech/substrate/blob/aba876001651506f85c14baf26e006b36092e1a0/client/rpc-api/src/state/mod.rs#L140)\\nfor conceptual info.\\n\",\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/BlocksTrace\"}}}}}}},\"/experimental/blocks/{blockId}/traces\":{\"get\":{\"tags\":[\"trace\"],\"summary\":\"[Experimental - subject to breaking change.] Get traces for the given `blockId`.\\n\",\"description\":\"Returns traces (spans and events) of the specified block from\\nRPC `state_straceBlock`. Consult the [RPC docs](https://github.com/paritytech/substrate/blob/aba876001651506f85c14baf26e006b36092e1a0/client/rpc-api/src/state/mod.rs#L140) for conceptual info.\\n\",\"parameters\":[{\"name\":\"blockId\",\"in\":\"path\",\"description\":\"Block identifier, as the block height or block hash.\",\"required\":true,\"schema\":{\"pattern\":\"a-km-zA-HJ-NP-Z1-9{8,64}\",\"type\":\"string\"}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/BlocksTrace\"}}}}}}},\"/experimental/blocks/head/traces/operations\":{\"get\":{\"tags\":[\"trace\"],\"summary\":\"[Experimental - subject to breaking change.] Get the operations from the\\nmost recently finalized block.\\n\",\"description\":\"Returns the operations from the most recently finalized block. Operations\\nrepresent one side of a balance change. For example if Alice transfers\\n100unit to Bob there will be two operations; 1) Alice - 100 2) Bob + 100.\\n\\nGiven account A and A's balance at block k0 (Ak0), if we sum all the\\noperations for A from block k1 through kn against Ak0, we will end up\\nwith A's balance at block kn (Akn). Thus, operations can be used to audit\\nthat balances change as expected.\\n\\nThis is useful for Substrate based chains because the advanced business\\nlogic can make it difficult to ensure auditable balance reconciliation\\nbased purely on events. Instead of using events one can use the\\noperations given from this endpoint.\\n\\nNote - each operation corresponds to a delta of a single field of the\\n`system::AccountData` storage item (i.e `free`, `reserved`, `misc_frozen`\\nand `fee_frozen`).\\nNote - operations are assigned a block execution phase (and extrinsic index\\nfor those in the apply extrinsic phase) based on an \\\"action group\\\". For\\nexample all the operations for 1 extrinsic will be in the same action group.\\nThe action groups can optionally be fetched with the `action` query param\\nfor closer auditing.\\nNote - There are no 0 value operations (e.g. a transfer of 0, or a\\ntransfer to itself)\\n\\nTo learn more about operation and action group creation please consult\\n[this diagram](https://docs.google.com/drawings/d/1vZoJo9jaXlz0LmrdTOgHck9_1LsfuQPRmTr-5g1tOis/edit?usp=sharing)\\n\",\"parameters\":[{\"name\":\"actions\",\"in\":\"query\",\"description\":\"Whether or not to include action groups.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/BlocksTraceOperations\"}}}}}}},\"/experimental/blocks/{blockId}/traces/operations\":{\"get\":{\"tags\":[\"trace\"],\"summary\":\"[Experimental - subject to breaking change.] Get the operations from the\\nspecified block.\\n\",\"description\":\"Returns the operations from the most recently finalized block. Operations\\nrepresent one side of a balance change. For example if Alice transfers\\n100unit to Bob there will be two operations; 1) Alice - 100 2) Bob + 100.\\n\\nGiven account A and A's balance at block k0 (Ak0), if we sum all the\\noperations for A from block k1 through kn against Ak0, we will end up\\nwith A's balance at block kn (Akn). Thus, operations can be used to audit\\nthat balances change as expected.\\n\\nThis is useful for Substrate based chains because the advanced business\\nlogic can make it difficult to ensure auditable balance reconciliation\\nbased purely on events. Instead of using events one can use the\\noperations given from this endpoint.\\n\\nNote - each operation corresponds to a delta of a single field of the\\n`system::AccountData` storage item (i.e `free`, `reserved`, `misc_frozen`\\nand `fee_frozen`).\\nNote - operations are assigned a block execution phase (and extrinsic index\\nfor those in the apply extrinsic phase) based on an \\\"action group\\\". For\\nexample all the operations for 1 extrinsic will be in the same action group.\\nThe action groups can optionally be fetched with the `action` query param\\nfor closer auditing.\\nNote - There are no 0 value operations (e.g. a transfer of 0, or a\\ntransfer to itself)\\n\\nTo learn more about operation and action group creation please consult\\n[this diagram](https://docs.google.com/drawings/d/1vZoJo9jaXlz0LmrdTOgHck9_1LsfuQPRmTr-5g1tOis/edit?usp=sharing)\\n\",\"parameters\":[{\"name\":\"blockId\",\"in\":\"path\",\"description\":\"Block identifier, as the block height or block hash.\",\"required\":true,\"schema\":{\"pattern\":\"a-km-zA-HJ-NP-Z1-9{8,64}\",\"type\":\"string\"}},{\"name\":\"actions\",\"in\":\"query\",\"description\":\"Whether or not to include action groups.\",\"required\":false,\"schema\":{\"type\":\"boolean\",\"default\":false}}],\"responses\":{\"200\":{\"description\":\"successful operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/BlocksTraceOperations\"}}}}}}}},\"components\":{\"schemas\":{\"AccountAssetsApproval\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"amount\":{\"type\":\"string\",\"description\":\"The amount of funds approved for the balance transfer from the owner to some delegated target.\",\"format\":\"unsignedInteger\"},\"deposit\":{\"type\":\"string\",\"description\":\"The amount reserved on the owner's account to hold this item in storage.\",\"format\":\"unsignedInteger\"}}},\"AccountAssetsBalances\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"assets\":{\"type\":\"array\",\"description\":\"An array of queried assets.\",\"items\":{\"$ref\":\"#/components/schemas/AssetsBalance\"}}}},\"AccountBalanceInfo\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"nonce\":{\"type\":\"string\",\"description\":\"Account nonce.\",\"format\":\"unsignedInteger\"},\"tokenSymbol\":{\"type\":\"string\",\"description\":\"Token symbol of the balances displayed in this response.\",\"format\":\"unsignedInteger\"},\"free\":{\"type\":\"string\",\"description\":\"Free balance of the account. Not equivalent to _spendable_ balance. This is the only balance that matters in terms of most operations on tokens.\",\"format\":\"unsignedInteger\"},\"reserved\":{\"type\":\"string\",\"description\":\"Reserved balance of the account.\",\"format\":\"unsignedInteger\"},\"miscFrozen\":{\"type\":\"string\",\"description\":\"The amount that `free` may not drop below when withdrawing for anything except transaction fee payment.\",\"format\":\"unsignedInteger\"},\"feeFrozen\":{\"type\":\"string\",\"description\":\"The amount that `free` may not drop below when withdrawing specifically for transaction fee payment.\",\"format\":\"unsignedInteger\"},\"locks\":{\"type\":\"array\",\"description\":\"Array of locks on a balance. There can be many of these on an account and they \\\"overlap\\\", so the same balance is frozen by multiple locks\",\"items\":{\"$ref\":\"#/components/schemas/BalanceLock\"}}}},\"AccountStakingInfo\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"rewardDestination\":{\"type\":\"string\",\"description\":\"The account to which rewards will be paid. Can be 'Staked' (Stash account, adding to the amount at stake), 'Stash' (Stash address, not adding to the amount at stake), or 'Controller' (Controller address).\",\"format\":\"ss58\",\"enum\":[\"Staked\",\"Stash\",\"Controller\"]},\"controller\":{\"type\":\"string\",\"description\":\"Controller address for the given Stash.\",\"format\":\"ss58\"},\"numSlashingSpans\":{\"type\":\"string\",\"description\":\"Number of slashing spans on Stash account; `null` if provided address is not a Controller.\",\"format\":\"unsignedInteger\"},\"nominations\":{\"$ref\":\"#/components/schemas/Nominations\"},\"stakingLedger\":{\"$ref\":\"#/components/schemas/StakingLedger\"}},\"description\":\"Note: Runtime versions of Kusama less than 1062 will either have `lastReward` in place of `claimedRewards`, or no field at all. This is related to changes in reward distribution. See: [Lazy Payouts](https://github.com/paritytech/substrate/pull/4474), [Simple Payouts](https://github.com/paritytech/substrate/pull/5406)\"},\"AccountStakingPayouts\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"erasPayouts\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"era\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"Era this information is associated with.\"},\"totalEraRewardPoints\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"Total reward points for the era. Equals the sum of reward points for all the validators in the set.\"},\"totalEraPayout\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"Total payout for the era. Validators split the payout based on the portion of `totalEraRewardPoints` they have.\"},\"payouts\":{\"$ref\":\"#/components/schemas/Payouts\"}}}}}},\"AccountValidation\":{\"type\":\"object\",\"properties\":{\"isValid\":{\"type\":\"boolean\",\"description\":\"Whether the given address is valid ss58 formatted.\"},\"ss58Prefix\":{\"type\":\"string\",\"description\":\"SS58 prefix of the given address. If the address is a valid base58 format, but incorrect ss58, a prefix for the given address will still be returned.\",\"format\":\"unsignedInteger\"}}},\"AccountVestingInfo\":{\"type\":\"object\",\"description\":\"Sidecar version's <= v10.0.0 have a`vesting` return value that defaults to an object for when there is no available vesting-info data. It also returns a `VestingInfo` as an object. For Sidecar >=11.0.0, that value will now default as an array when there is no value, and `Vec` is returned when there is.\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"vesting\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/VestingSchedule\"}}}},\"AssetsBalance\":{\"type\":\"object\",\"properties\":{\"assetId\":{\"type\":\"string\",\"description\":\"The identifier of the asset.\",\"format\":\"unsignedInteger\"},\"balance\":{\"type\":\"string\",\"description\":\"The balance of the asset.\",\"format\":\"unsignedInteger\"},\"isFrozen\":{\"type\":\"boolean\",\"description\":\"Whether the asset is frozen for non-admin transfers.\"},\"isSufficient\":{\"type\":\"boolean\",\"description\":\"Whether a non-zero balance of this asset is a deposit of sufficient value to account for the state bloat associated with its balance storage. If set to `true`, then non-zero balances may be stored without a `consumer` reference (and thus an ED in the Balances pallet or whatever else is used to control user-account state growth).\"}}},\"AssetInfo\":{\"type\":\"object\",\"properties\":{\"owner\":{\"type\":\"string\",\"description\":\"Owner of the assets privileges.\",\"format\":\"SS58\"},\"issuer\":{\"type\":\"string\",\"description\":\"The `AccountId` able to mint tokens.\",\"format\":\"SS58\"},\"admin\":{\"type\":\"string\",\"description\":\"The `AccountId` that can thaw tokens, force transfers and burn token from any account.\",\"format\":\"SS58\"},\"freezer\":{\"type\":\"string\",\"description\":\"The `AccountId` that can freeze tokens.\",\"format\":\"SS58\"},\"supply\":{\"type\":\"string\",\"description\":\"The total supply across accounts.\",\"format\":\"unsignedInteger\"},\"deposit\":{\"type\":\"string\",\"description\":\"The balance deposited for this. This pays for the data stored.\",\"format\":\"unsignedInteger\"},\"minBalance\":{\"type\":\"string\",\"description\":\"The ED for virtual accounts.\",\"format\":\"unsignedInteger\"},\"isSufficient\":{\"type\":\"boolean\",\"description\":\"If `true`, then any account with this asset is given a provider reference. Otherwise, it requires a consumer reference.\"},\"accounts\":{\"type\":\"string\",\"description\":\"The total number of accounts.\",\"format\":\"unsignedInteger\"},\"sufficients\":{\"type\":\"string\",\"description\":\"The total number of accounts for which is placed a self-sufficient reference.\"},\"approvals\":{\"type\":\"string\",\"description\":\"The total number of approvals.\",\"format\":\"unsignedInteger\"},\"isFrozen\":{\"type\":\"boolean\",\"description\":\"Whether the asset is frozen for non-admin transfers.\"}}},\"AssetMetadata\":{\"type\":\"object\",\"properties\":{\"deposit\":{\"type\":\"string\",\"description\":\"The balance deposited for this metadata. This pays for the data stored in this struct.\",\"format\":\"unsignedInteger\"},\"name\":{\"type\":\"string\",\"description\":\"The user friendly name of this asset.\",\"format\":\"$hex\"},\"symbol\":{\"type\":\"string\",\"description\":\"The ticker symbol for this asset.\",\"format\":\"$hex\"},\"decimals\":{\"type\":\"string\",\"description\":\"The number of decimals this asset uses to represent one unit.\",\"format\":\"unsignedInteger\"},\"isFrozen\":{\"type\":\"boolean\",\"description\":\"Whether the asset metadata may be changed by a non Force origin.\"}}},\"BalanceLock\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"An identifier for this lock. Only one lock may be in existence for each identifier.\"},\"amount\":{\"type\":\"string\",\"description\":\"The amount below which the free balance may not drop with this lock in effect.\",\"format\":\"unsignedInteger\"},\"reasons\":{\"type\":\"string\",\"description\":\"Reasons for withdrawing balance.\",\"enum\":[\"Fee = 0\",\"Misc = 1\",\"All = 2\"]}}},\"Block\":{\"type\":\"object\",\"properties\":{\"hash\":{\"type\":\"string\",\"description\":\"The block's hash.\",\"format\":\"hex\"},\"number\":{\"type\":\"string\",\"description\":\"The block's height.\",\"format\":\"unsignedInteger\"},\"parentHash\":{\"type\":\"string\",\"description\":\"The hash of the parent block.\",\"format\":\"hex\"},\"stateRoot\":{\"type\":\"string\",\"description\":\"The state root after executing this block.\",\"format\":\"hex\"},\"extrinsicRoot\":{\"type\":\"string\",\"description\":\"The Merkle root of the extrinsics.\",\"format\":\"hex\"},\"authorId\":{\"type\":\"string\",\"description\":\"The account ID of the block author (may be undefined for some chains).\",\"format\":\"ss58\"},\"logs\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/DigestItem\"},\"description\":\"Array of `DigestItem`s associated with the block.\"},\"onInitialize\":{\"$ref\":\"#/components/schemas/BlockInitialize\"},\"extrinsics\":{\"type\":\"array\",\"description\":\"Array of extrinsics (inherents and transactions) within the block.\",\"items\":{\"$ref\":\"#/components/schemas/Extrinsic\"}},\"onFinalize\":{\"$ref\":\"#/components/schemas/BlockFinalize\"},\"finalized\":{\"type\":\"boolean\",\"description\":\"A boolean identifying whether the block is finalized or not. Note: on chains that do not have deterministic finality this field is omitted.\"}},\"description\":\"Note: Block finalization does not correspond to consensus, i.e. whether the block is in the canonical chain. It denotes the finalization of block _construction._\"},\"BlockFinalize\":{\"type\":\"object\",\"properties\":{\"events\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/SanitizedEvent\"}}},\"description\":\"Object with an array of `SanitizedEvent`s that occurred during block construction finalization with the `method` and `data` for each.\"},\"BlockHeader\":{\"type\":\"object\",\"properties\":{\"parentHash\":{\"type\":\"string\",\"description\":\"The hash of the parent block.\",\"format\":\"hex\"},\"number\":{\"type\":\"string\",\"description\":\"The block's height.\",\"format\":\"unsignedInteger\"},\"stateRoot\":{\"type\":\"string\",\"description\":\"The state root after executing this block.\",\"format\":\"hex\"},\"extrinsicRoot\":{\"type\":\"string\",\"description\":\"The Merkle root of the extrinsics.\",\"format\":\"hex\"},\"digest\":{\"type\":\"object\",\"properties\":{\"logs\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/DigestItem\"},\"description\":\"Array of `DigestItem`s associated with the block.\"}}}}},\"BlockIdentifiers\":{\"type\":\"object\",\"properties\":{\"hash\":{\"type\":\"string\",\"description\":\"The block's hash.\",\"format\":\"hex\"},\"height\":{\"type\":\"string\",\"description\":\"The block's height.\",\"format\":\"unsignedInteger\"}},\"description\":\"Block number and hash at which the call was made.\"},\"BlockInitialize\":{\"type\":\"object\",\"properties\":{\"events\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/SanitizedEvent\"}}},\"description\":\"Object with an array of `SanitizedEvent`s that occurred during block initialization with the `method` and `data` for each.\"},\"BlocksTrace\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"blockHash\":{\"type\":\"string\"},\"events\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/TraceEvent\"}},\"parentHash\":{\"type\":\"string\"},\"spans\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/TraceSpan\"}},\"storageKeys\":{\"type\":\"string\",\"description\":\"Hex encoded storage keys used to filter events.\"},\"tracingTargets\":{\"type\":\"string\",\"description\":\"Targets used to filter spans and events.\"}}},\"BlocksTraceOperations\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"operations\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/Operation\"}}}},\"ChainType\":{\"type\":\"object\",\"description\":\"Type of the chain. It will return one of the following enum variants as a key. Live, Development, Local, or Custom. Each variant will have a value as null except when the ChainType is Custom, it will return a string.\",\"properties\":{\"live\":{\"type\":\"string\",\"nullable\":true,\"default\":null},\"development\":{\"type\":\"string\",\"nullable\":true,\"default\":null},\"local\":{\"type\":\"string\",\"nullable\":true,\"default\":null},\"custom\":{\"type\":\"string\"}},\"example\":\"{\\\"live\\\": null}\"},\"DigestItem\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\"},\"index\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"value\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}},\"ElectionStatus\":{\"type\":\"object\",\"properties\":{\"status\":{\"type\":\"object\",\"description\":\"[Deprecated](Works for polkadot runtimes before v0.8.30).\\nEra election status: either `Close: null` or `Open: `. A status of `Close` indicates that the submission window for solutions from off-chain Phragmen is not open. A status of `Open` indicates that the submission window for off-chain Phragmen solutions has been open since BlockNumber. N.B. when the submission window is open, certain extrinsics are not allowed because they would mutate the state that the off-chain Phragmen calculation relies on for calculating results.\"},\"toggleEstimate\":{\"type\":\"string\",\"description\":\"Upper bound estimate of the block height at which the `status` will switch.\",\"format\":\"unsignedInteger\"}},\"description\":\"Information about the off-chain election. Not included in response when `forceEra.isForceNone`.\"},\"Error\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"number\"},\"message\":{\"type\":\"string\"},\"stack\":{\"type\":\"string\"}}},\"ExtrinsicMethod\":{\"type\":\"object\",\"properties\":{\"pallet\":{\"type\":\"string\"},\"methodName\":{\"type\":\"string\"}},\"description\":\"Extrinsic method\"},\"Extrinsic\":{\"type\":\"object\",\"properties\":{\"method\":{\"$ref\":\"#/components/schemas/ExtrinsicMethod\"},\"signature\":{\"$ref\":\"#/components/schemas/Signature\"},\"nonce\":{\"type\":\"string\",\"description\":\"Account nonce, if applicable.\",\"format\":\"unsignedInteger\"},\"args\":{\"type\":\"object\",\"description\":\"Object of arguments keyed by parameter name. Note: if you are expecting an [`OpaqueCall`](https://substrate.dev/rustdocs/v2.0.0/pallet_multisig/type.OpaqueCall.html) and it is not decoded in the response (i.e. it is just a hex string), then Sidecar was not able to decode it and likely that it is not a valid call for the runtime.\"},\"tip\":{\"type\":\"string\",\"description\":\"Any tip added to the transaction.\",\"format\":\"unsignedInteger\"},\"hash\":{\"type\":\"string\",\"description\":\"The transaction's hash.\",\"format\":\"hex\"},\"info\":{\"$ref\":\"#/components/schemas/RuntimeDispatchInfo\"},\"era\":{\"$ref\":\"#/components/schemas/GenericExtrinsicEra\"},\"events\":{\"type\":\"array\",\"description\":\"An array of `SanitizedEvent`s that occurred during extrinsic execution.\",\"items\":{\"$ref\":\"#/components/schemas/SanitizedEvent\"}},\"success\":{\"type\":\"boolean\",\"description\":\"Whether or not the extrinsic succeeded.\"},\"paysFee\":{\"type\":\"boolean\",\"description\":\"Whether the extrinsic requires a fee. Careful! This field relates to whether or not the extrinsic requires a fee if called as a transaction. Block authors could insert the extrinsic as an inherent in the block and not pay a fee. Always check that `paysFee` is `true` and that the extrinsic is signed when reconciling old blocks.\"}}},\"ExtrinsicIndex\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"extrinsic\":{\"$ref\":\"#/components/schemas/Extrinsic\"}},\"description\":\"A single extrinsic at a given block.\"},\"FundInfo\":{\"type\":\"object\",\"properties\":{\"depositor\":{\"type\":\"string\"},\"verifier\":{\"type\":\"string\"},\"deposit\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"raised\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"end\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"cap\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"lastConstribution\":{\"type\":\"string\",\"enum\":[\"preEnding\",\"ending\"]},\"firstPeriod\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"lastPeriod\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"trieIndex\":{\"type\":\"string\",\"format\":\"unsignedInteger\"}}},\"GenericExtrinsicEra\":{\"type\":\"object\",\"description\":\"The return value for era can either be `mortalEra`, or `immortalEra` and is represented as an enum in substrate. `immortalEra` meaning \\nthe transaction is valid forever. `mortalEra` consists of a tuple containing a period and phase.\\nex: `\\\"{\\\"mortalEra\\\": [\\\"64\\\", \\\"11\\\"]}\\\"`. The Period is the period of validity from the block hash found in the signing material. \\nThe Phase is the period that this transaction's lifetime begins (and, importantly, \\nimplies which block hash is included in the signature material).\\n\",\"properties\":{\"mortalEra\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"description\":\"Tuple of a Phase, and Period. Each item in the array will be a string formatted as an integer.\"},\"immortalEra\":{\"type\":\"string\",\"description\":\"Hardcoded constant '0x00'.\",\"format\":\"hex\"}},\"example\":\"{\\\"mortalEra\\\":[\\\"64\\\", \\\"11\\\"]}\"},\"NodeNetwork\":{\"type\":\"object\",\"properties\":{\"nodeRoles\":{\"$ref\":\"#/components/schemas/NodeRole\"},\"numPeers\":{\"type\":\"string\",\"description\":\"Number of peers the node is connected to.\",\"format\":\"unsignedInteger\"},\"isSyncing\":{\"type\":\"boolean\",\"description\":\"Whether or not the node is syncing. `False` indicates that the node is in sync.\"},\"shouldHavePeers\":{\"type\":\"boolean\",\"description\":\"Whether or not the node should be connected to peers. Might be false for local chains or when running without discovery.\"},\"localPeerId\":{\"type\":\"string\",\"description\":\"Local copy of the `PeerId`.\"},\"localListenAddresses\":{\"type\":\"array\",\"description\":\"Multiaddresses that the local node is listening on. The addresses include a trailing `/p2p/` with the local PeerId, and are thus suitable to be passed to `system_addReservedPeer` or as a bootnode address for example.\",\"items\":{\"type\":\"string\"}},\"peersInfo\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/PeerInfo\"}}}},\"NodeRole\":{\"type\":\"string\",\"description\":\"Role of this node. (N.B. Sentry nodes are being deprecated.)\",\"enum\":[\"Full\",\"LightClient\",\"Authority\",\"Sentry\"]},\"NodeVersion\":{\"type\":\"object\",\"properties\":{\"clientVersion\":{\"type\":\"string\",\"description\":\"Node's binary version.\"},\"clientImplName\":{\"type\":\"string\",\"description\":\"Node's implementation name.\"},\"chain\":{\"type\":\"string\",\"description\":\"Node's chain name.\"}},\"description\":\"Version information of the node.\"},\"Nominations\":{\"type\":\"object\",\"properties\":{\"targets\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"description\":\"The targets of the nomination.\"},\"submittedIn\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"The era the nominations were submitted. (Except for initial nominations which are considered submitted at era 0.)\"},\"suppressed\":{\"type\":\"boolean\",\"description\":\"Whether the nominations have been suppressed.\"}}},\"OnboardingAs\":{\"type\":\"string\",\"enum\":[\"parachain\",\"parathread\"],\"description\":\"This property only shows up when `paraLifecycle=onboarding`. It\\ndescribes if a particular para is onboarding as a `parachain` or a\\n`parathread`.\\n\"},\"Operation\":{\"type\":\"object\",\"properties\":{\"phase\":{\"$ref\":\"#/components/schemas/OperationPhase\"},\"parentSpanId\":{\"$ref\":\"#/components/schemas/SpanId\"},\"primarySpanId\":{\"$ref\":\"#/components/schemas/SpanId\"},\"eventIndex\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"Index of the underlying trace event.\"},\"address\":{\"type\":\"string\",\"description\":\"Account this operation affects. Note - this will be an object like\\n`{ id: address }` if the network uses `MultiAddress`\\n\"},\"storage\":{\"type\":\"object\",\"properties\":{\"pallet\":{\"type\":\"string\"},\"item\":{\"type\":\"string\"},\"field1\":{\"type\":\"string\",\"description\":\"A field of the storage item. (i.e `system::Account::get(address).data`)\\n\"},\"field2\":{\"type\":\"string\",\"description\":\"A field of the struct described by field1 (i.e\\n`system::Account::get(address).data.free`)\\n\"}}},\"amount\":{\"$ref\":\"#/components/schemas/OperationAmount\"}}},\"OperationAmount\":{\"type\":\"object\",\"properties\":{\"values\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"currency\":{\"$ref\":\"#/components/schemas/OperationAmountCurrency\"}}},\"OperationAmountCurrency\":{\"type\":\"object\",\"properties\":{\"symbol\":{\"type\":\"string\",\"example\":\"KSM\"}}},\"OperationPhase\":{\"type\":\"object\",\"properties\":{\"variant\":{\"type\":\"string\",\"enum\":[\"onInitialize\",\"initialChecks\",\"applyExtrinsic\",\"onFinalize\",\"finalChecks\"],\"description\":\"Phase of block execution pipeline.\"},\"extrinsicIndex\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"If phase variant is `applyExtrinsic` this will be the index of\\nthe extrinsic. Otherwise this field will not be present.\\n\"}}},\"PalletsAssetsInfo\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"assetInfo\":{\"$ref\":\"#/components/schemas/AssetInfo\"},\"assetMetadata\":{\"$ref\":\"#/components/schemas/AssetMetadata\"}}},\"PalletStorage\":{\"type\":\"object\",\"properties\":{\"pallet\":{\"type\":\"string\",\"description\":\"Name of the pallet.\",\"example\":\"democracy\"},\"palletIndex\":{\"type\":\"string\",\"description\":\"Index of the pallet for looking up storage.\",\"example\":\"15\"},\"items\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/PalletStorageItemMetadata\"},\"description\":\"Array containing metadata for each storage entry of the pallet.\"}}},\"PalletStorageItem\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"pallet\":{\"type\":\"string\",\"description\":\"Name of the pallet.\",\"example\":\"democracy\"},\"palletIndex\":{\"type\":\"string\",\"description\":\"Index of the pallet for looking up storage.\",\"example\":\"15\"},\"storageItem\":{\"type\":\"string\",\"description\":\"Name of the storage item.\",\"example\":\"referendumInfoOf\"},\"key1\":{\"type\":\"string\",\"description\":\"Key1 query param. Will not show up in response unless it was passed as part of the URI.\",\"example\":\"2\"},\"key2\":{\"type\":\"string\",\"description\":\"Key2 query param. Will not show up in response if not defined in URI.\",\"example\":\"\"},\"value\":{\"type\":\"object\",\"description\":\"Value returned by this storage query.\",\"example\":{\"Ongoing\":{\"end\":\"1612800\",\"proposalHash\":\"0x7de70fc8be782076d0b5772be77153d172a5381c72dd56d3385e25f62abf507e\",\"threshold\":\"Supermajorityapproval\",\"delay\":\"403200\",\"tally\":{\"ayes\":\"41925212461400000\",\"nays\":\"214535586500000\",\"turnout\":\"34485320658000000\"}}}},\"metadata\":{\"$ref\":\"#/components/schemas/PalletStorageItemMetadata\"}}},\"PalletStorageItemMetadata\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"example\":\"ReferendumInfoOf\",\"description\":\"The storage item's name (which is the same as the storage item's ID).\"},\"modifier\":{\"type\":\"string\",\"example\":\"Optional\"},\"type\":{\"$ref\":\"#/components/schemas/PalletStorageType\"},\"fallback\":{\"type\":\"string\",\"example\":\"0x00\"},\"docs\":{\"type\":\"string\",\"example\":\" Information concerning any given referendum.\\n\\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control.\"}},\"description\":\"Metadata of a storage item from a FRAME pallet.\"},\"PalletStorageType\":{\"type\":\"object\",\"description\":\"If the query parameter 'adjustMetadataV13' is set to true, all historic blocks that are pre v9110 will have the return type `StorageEntryTypeV13`, and all present and post v9110 blocks will have a return type of `StorageEntryTypeV14`. Please check those types to see potential responses. This will be deprecated and removed in the future, and will only live as `StorageEntryTypeV14`.\"},\"Para\":{\"type\":\"object\",\"properties\":{\"paraId\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"paraLifecycle\":{\"$ref\":\"#/components/schemas/ParaLifecycle\"},\"onboardingAs\":{\"$ref\":\"#/components/schemas/OnboardingAs\"}}},\"Paras\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"paras\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/Para\"}}}},\"ParasAuctionsCurrent\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"beginEnd\":{\"type\":\"string\",\"format\":\"unisgnedInteger or $null\",\"description\":\"Fist block (number) of the auction ending phase. `null` if there is no ongoing\\nauction.\\n\"},\"finishEnd\":{\"type\":\"string\",\"format\":\"unisgnedInteger or $null\",\"description\":\"Last block (number) of the auction ending phase. `null` if there is no ongoing\\nauction.\\n\"},\"phase\":{\"type\":\"string\",\"enum\":[\"startPeriod\",\"endPeriod\",\"vrfDelay\"],\"description\":\"An auction can be in one of 4 phases. Both `startingPeriod` () and `endingPeriod` indicate\\nan ongoing auction, while `vrfDelay` lines up with the `AuctionStatus::VrfDelay` . Finally, a value of `null`\\nindicates there is no ongoing auction. Keep in mind the that the `finishEnd` field is the block number the \\n`endingPeriod` finishes and the `vrfDelay` period begins. The `vrfDelay` period is typically about an \\nepoch long and no crowdloan contributions are accepted. \\n\"},\"auctionIndex\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"The auction number. If there is no current auction this will be the number\\nof the previous auction.\\n\"},\"leasePeriods\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"description\":\"Lease period indexes that may be bid on in this auction. `null` if\\nthere is no ongoing auction.\\n\"},\"winning\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/WinningData\"}}}},\"ParasCrowdloans\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"funds\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"paraId\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"fundInfo\":{\"$ref\":\"#/components/schemas/FundInfo\"}}},\"description\":\"List of paras that have crowdloans.\\n\"}}},\"ParasCrowdloanInfo\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"fundInfo\":{\"$ref\":\"#/components/schemas/FundInfo\"},\"leasePeriods\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"description\":\"Lease periods the crowdloan can bid on.\"}}},\"ParasLeasesCurrent\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"leasePeriodIndex\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"Current lease period index. This value may be null when the current block now, substracted by the leaseOffset is less then zero.\"},\"endOfLeasePeriod\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"Last block (number) of the current lease period. This value may be null when `leasePeriodIndex` is null.\"},\"currentLeaseHolders\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"description\":\"List of `paraId`s that currently hold a lease.\"}}},\"ParasLeaseInfo\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"paraLifecycle\":{\"$ref\":\"#/components/schemas/ParaLifecycle\"},\"onboardingAs\":{\"$ref\":\"#/components/schemas/OnboardingAs\"},\"leases\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"leasePeriodIndex\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"account\":{\"type\":\"string\"},\"deposit\":{\"type\":\"string\",\"format\":\"unsignedInteger\"}}},\"description\":\"List of lease periods for which the `paraId` holds a lease along with\\nthe deposit held and the associated `accountId`.\\n\"}}},\"ParaLifecycle\":{\"type\":\"string\",\"enum\":[\"onboarding\",\"parathread\",\"parachain\",\"upgradingParathread\",\"downgradingParachain\",\"offboardingParathread\",\"offboardingParachain\"],\"description\":\"The possible states of a para, to take into account delayed lifecycle\\nchanges.\\n\"},\"Payouts\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"validatorId\":{\"type\":\"string\",\"description\":\"AccountId of the validator the payout is coming from.\"},\"nominatorStakingPayout\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"Payout for the reward destination associated with the accountId the query was made for.\"},\"claimed\":{\"type\":\"boolean\",\"description\":\"Whether or not the reward has been claimed.\"},\"totalValidatorRewardPoints\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"Number of reward points earned by the validator.\"},\"validatorCommission\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"The percentage of the total payout that the validator takes as commission, expressed as a Perbill.\"},\"totalValidatorExposure\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"The sum of the validator's and its nominators' stake.\"},\"nominatorExposure\":{\"type\":\"string\",\"format\":\"unsignedInteger\",\"description\":\"The amount of stake the nominator has behind the validator.\"}},\"description\":\"Payout for a nominating _Stash_ address and information about the validator they were nominating.\"}},\"PeerInfo\":{\"type\":\"object\",\"properties\":{\"peerId\":{\"type\":\"string\",\"description\":\"Peer ID.\"},\"roles\":{\"type\":\"string\",\"description\":\"Roles the peer is running\"},\"protocolVersion\":{\"type\":\"string\",\"description\":\"Peer's protocol version.\",\"format\":\"unsignedInteger\"},\"bestHash\":{\"type\":\"string\",\"description\":\"Hash of the best block on the peer's canon chain.\",\"format\":\"hex\"},\"bestNumber\":{\"type\":\"string\",\"description\":\"Height of the best block on the peer's canon chain.\",\"format\":\"unsignedInteger\"}}},\"RuntimeCode\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"code\":{\"type\":\"string\",\"format\":\"hex\"}}},\"RuntimeDispatchInfo\":{\"type\":\"object\",\"properties\":{\"weight\":{\"type\":\"string\",\"description\":\"Extrinsic weight.\"},\"class\":{\"type\":\"string\",\"description\":\"Extrinsic class.\",\"enum\":[\"Normal\",\"Operational\",\"Mandatory\"]},\"partialFee\":{\"type\":\"string\",\"description\":\"The _inclusion fee_ of a transaction, i.e. the minimum fee required for a transaction. Includes weight and encoded length fees, but does not have access to any signed extensions, e.g. the `tip`.\",\"format\":\"unsignedInteger\"}},\"description\":\"RuntimeDispatchInfo for the transaction. Includes the `partialFee`.\"},\"RuntimeSpec\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"authoringVersion\":{\"type\":\"string\",\"description\":\"The version of the authorship interface. An authoring node will not attempt to author blocks unless this is equal to its native runtime.\"},\"chainType\":{\"$ref\":\"#/components/schemas/ChainType\"},\"implVersion\":{\"type\":\"string\",\"description\":\"Version of the implementation specification. Non-consensus-breaking optimizations are about the only changes that could be made which would result in only the `impl_version` changing. The `impl_version` is set to 0 when `spec_version` is incremented.\"},\"specName\":{\"type\":\"string\",\"description\":\"Identifies the different Substrate runtimes.\"},\"specVersion\":{\"type\":\"string\",\"description\":\"Version of the runtime specification.\"},\"transactionVersion\":{\"type\":\"string\",\"description\":\"All existing dispatches are fully compatible when this number doesn't change. This number must change when an existing dispatchable (module ID, dispatch ID) is changed, either through an alteration in its user-level semantics, a parameter added/removed/changed, a dispatchable being removed, a module being removed, or a dispatchable/module changing its index.\"},\"properties\":{\"type\":\"object\",\"description\":\"Arbitrary properties defined in the chain spec.\"}},\"description\":\"Version information related to the runtime.\"},\"SanitizedEvent\":{\"type\":\"object\",\"properties\":{\"method\":{\"type\":\"string\"},\"data\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}},\"Signature\":{\"type\":\"object\",\"properties\":{\"signature\":{\"type\":\"string\",\"format\":\"hex\"},\"signer\":{\"type\":\"string\",\"format\":\"ss58\"}},\"description\":\"Object with `signature` and `signer`, or `null` if unsigned.\"},\"SpanId\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"target\":{\"type\":\"string\"},\"id\":{\"type\":\"string\",\"format\":\"unsignedInteger\"}}},\"StakingLedger\":{\"type\":\"object\",\"properties\":{\"stash\":{\"type\":\"string\",\"description\":\"The _Stash_ account whose balance is actually locked and at stake.\",\"format\":\"ss58\"},\"total\":{\"type\":\"string\",\"description\":\"The total amount of the _Stash_'s balance that we are currently accounting for. Simply `active + unlocking`.\",\"format\":\"unsignedInteger\"},\"active\":{\"type\":\"string\",\"description\":\"The total amount of the _Stash_'s balance that will be at stake in any forthcoming eras.\",\"format\":\"unsignedInteger\"},\"unlocking\":{\"type\":\"string\",\"description\":\"Any balance that is becoming free, which may eventually be transferred out of the _Stash_ (assuming it doesn't get slashed first). Represented as an array of objects, each with an `era` at which `value` will be unlocked.\",\"format\":\"unsignedInteger\"},\"claimedRewards\":{\"type\":\"array\",\"description\":\"Array of eras for which the stakers behind a validator have claimed rewards. Only updated for _validators._\",\"items\":{\"type\":\"string\",\"format\":\"unsignedInteger\"}}},\"description\":\"The staking ledger.\"},\"StakingProgress\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"activeEra\":{\"type\":\"string\",\"description\":\"`EraIndex` of the era being rewarded.\\n\",\"format\":\"unsignedInteger\"},\"forceEra\":{\"type\":\"string\",\"description\":\"Current status of era forcing.\",\"enum\":[\"ForceNone\",\"NotForcing\",\"ForceAlways\",\"ForceNew\"]},\"nextActiveEraEstimate\":{\"type\":\"string\",\"description\":\"Upper bound estimate of the block height at which the next active era will start. Not included in response when `forceEra.isForceNone`.\",\"format\":\"unsignedInteger\"},\"nextSessionEstimate\":{\"type\":\"string\",\"description\":\"Upper bound estimate of the block height at which the next session will start.\",\"format\":\"unsignedInteger\"},\"unappliedSlashes\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/UnappliedSlash\"},\"description\":\"Array of upcoming `UnappliedSlash` indexed by era.\"},\"electionStatus\":{\"$ref\":\"#/components/schemas/ElectionStatus\"},\"idealValidatorCount\":{\"type\":\"string\",\"description\":\"Upper bound of validator set size; considered the ideal size. Not included in response when `forceEra.isForceNone`.\",\"format\":\"unsignedInteger\"},\"validatorSet\":{\"type\":\"array\",\"description\":\"Stash account IDs of the validators for the current session. Not included in response when `forceEra.isForceNone`.\",\"items\":{\"type\":\"string\",\"format\":\"ss58\"}}}},\"StorageEntryTypeV13\":{\"type\":\"object\",\"properties\":{\"hasher\":{\"type\":\"string\",\"description\":\"Returns a string deonting the storage hasher.\"},\"key\":{\"type\":\"string\",\"description\":\"Key of the queried pallet storageId.\"},\"value\":{\"type\":\"string\",\"description\":\"Value of the queried pallet storageId.\"},\"linked\":{\"type\":\"boolean\"}}},\"StorageEntryTypeV14\":{\"type\":\"object\",\"properties\":{\"hasher\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"description\":\"Returns a string denoting the storage hasher inside of an array.\"},\"key\":{\"type\":\"string\",\"description\":\"The SiLookupTypeId to identify the type.\"},\"value\":{\"type\":\"string\",\"description\":\"The SiLookupTypeId to identify the type.\"}}},\"TraceEvent\":{\"type\":\"object\",\"properties\":{\"data\":{\"type\":\"object\",\"properties\":{\"stringValues\":{\"$ref\":\"#/components/schemas/TraceEventDataStringValues\"}}},\"parentId\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"target\":{\"type\":\"string\"}}},\"TraceEventDataStringValues\":{\"type\":\"object\",\"properties\":{\"key\":{\"type\":\"string\",\"format\":\"hex\",\"description\":\"The complete storage key for the entry.\"},\"method\":{\"type\":\"string\",\"description\":\"Normally one of Put or Get.\"},\"result\":{\"type\":\"string\",\"format\":\"hex\",\"description\":\"Hex scale encoded storage value.\"}},\"description\":\"Note these exact values will only be present for storage events.\"},\"TraceSpan\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"name\":{\"type\":\"string\"},\"parentId\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"target\":{\"type\":\"string\"},\"wasm\":{\"type\":\"boolean\"}}},\"Transaction\":{\"type\":\"object\",\"properties\":{\"tx\":{\"type\":\"string\",\"format\":\"hex\"}}},\"TransactionDryRun\":{\"type\":\"object\",\"properties\":{\"resultType\":{\"type\":\"string\",\"enum\":[\"DispatchOutcome\",\"TransactionValidityError\"],\"description\":\"Either `DispatchOutcome` if the transaction is valid or `TransactionValidityError` if the result is invalid.\"},\"result\":{\"type\":\"string\",\"enum\":[\"Ok\",\"CannotLookup\",\"NoUnsignedValidator\",\"Custom(u8)\",\"Call\",\"Payment\",\"Future\",\"Stale\",\"BadProof\",\"AncientBirthBlock\",\"ExhaustsResources\",\"BadMandatory\",\"MandatoryDispatch\"],\"description\":\"If there was an error it will be the cause of the error. If the transaction executed correctly it will be `Ok: []`\"},\"validityErrorType\":{\"type\":\"string\",\"enum\":[\"InvalidTransaction\",\"UnknownTransaction\"]}},\"description\":\"References: - `UnknownTransaction`: https://crates.parity.io/sp_runtime/transaction_validity/enum.UnknownTransaction.html - `InvalidTransaction`: https://crates.parity.io/sp_runtime/transaction_validity/enum.InvalidTransaction.html\"},\"TransactionFailedToParse\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"number\"},\"error\":{\"type\":\"string\",\"description\":\"`Failed to parse a tx.`\"},\"transaction\":{\"type\":\"string\",\"format\":\"hex\"},\"cause\":{\"type\":\"string\"},\"stack\":{\"type\":\"string\"}},\"description\":\"Error message when Sidecar fails to parse the transaction.\"},\"TransactionFailedToSubmit\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"number\"},\"error\":{\"type\":\"string\",\"description\":\"Failed to submit transaction.\"},\"transaction\":{\"type\":\"string\",\"format\":\"hex\"},\"cause\":{\"type\":\"string\"},\"stack\":{\"type\":\"string\"}},\"description\":\"Error message when the node rejects the submitted transaction.\"},\"TransactionFailure\":{\"oneOf\":[{\"$ref\":\"#/components/schemas/TransactionFailedToSubmit\"},{\"$ref\":\"#/components/schemas/TransactionFailedToParse\"}]},\"TransactionFeeEstimate\":{\"type\":\"object\",\"properties\":{\"weight\":{\"type\":\"string\",\"description\":\"Extrinsic weight.\"},\"class\":{\"type\":\"string\",\"description\":\"Extrinsic class.\",\"enum\":[\"Normal\",\"Operational\",\"Mandatory\"]},\"partialFee\":{\"type\":\"string\",\"description\":\"Expected inclusion fee for the transaction. Note that the fee rate changes up to 30% in a 24 hour period and this will not be the exact fee.\",\"format\":\"unsignedInteger\"}},\"description\":\"Note: `partialFee` does not include any tips that you may add to increase a transaction's priority. See [compute_fee](https://crates.parity.io/pallet_transaction_payment/struct.Module.html#method.compute_fee).\"},\"TransactionFeeEstimateFailure\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"number\"},\"at\":{\"type\":\"object\",\"properties\":{\"hash\":{\"type\":\"string\"}}},\"error\":{\"type\":\"string\",\"description\":\"Error description.\"},\"transaction\":{\"type\":\"string\",\"format\":\"hex\"},\"block\":{\"type\":\"string\",\"description\":\"Block hash of the block fee estimation was attempted at.\"},\"cause\":{\"type\":\"string\",\"description\":\"Error message from the client.\"},\"stack\":{\"type\":\"string\"}}},\"TransactionMaterial\":{\"type\":\"object\",\"properties\":{\"at\":{\"$ref\":\"#/components/schemas/BlockIdentifiers\"},\"genesisHash\":{\"type\":\"string\",\"description\":\"The hash of the chain's genesis block.\",\"format\":\"blockHash\"},\"chainName\":{\"type\":\"string\",\"description\":\"The chain's name.\"},\"specName\":{\"type\":\"string\",\"description\":\"The chain's spec.\"},\"specVersion\":{\"type\":\"string\",\"description\":\"The spec version. Always increased in a runtime upgrade.\"},\"txVersion\":{\"type\":\"string\",\"description\":\"The transaction version. Common `txVersion` numbers indicate that the transaction encoding format and method indices are the same. Needed for decoding in an offline environment. Adding new transactions does not change `txVersion`.\"},\"metadata\":{\"type\":\"string\",\"description\":\"The chain's metadata. It's default return value is hex, but may be returned in decoded json format.\",\"format\":\"hex\"}},\"description\":\"Note: `chainName`, `specName`, and `specVersion` are used to define a type registry with a set of signed extensions and types. For Polkadot and Kusama, `chainName` is not used in defining this registry, but in other Substrate-based chains that re-launch their network without changing the `specName`, the `chainName` would be needed to create the correct registry. Substrate Reference: - `RuntimeVersion`: https://crates.parity.io/sp_version/struct.RuntimeVersion.html - `SignedExtension`: https://crates.parity.io/sp_runtime/traits/trait.SignedExtension.html - FRAME Support: https://crates.parity.io/frame_support/metadata/index.html\"},\"TransactionPool\":{\"type\":\"object\",\"properties\":{\"pool\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"hash\":{\"type\":\"string\",\"format\":\"hex\",\"description\":\"H256 hash of the extrinsic.\"},\"encodedExtrinsic\":{\"type\":\"string\",\"format\":\"hex\",\"description\":\"Scale encoded extrinsic.\"}}}}}},\"TransactionSuccess\":{\"type\":\"object\",\"properties\":{\"hash\":{\"type\":\"string\",\"description\":\"The hash of the encoded transaction.\"}}},\"UnappliedSlash\":{\"type\":\"object\",\"properties\":{\"validator\":{\"type\":\"string\",\"description\":\"Stash account ID of the offending validator.\",\"format\":\"ss58\"},\"own\":{\"type\":\"string\",\"description\":\"The amount the validator will be slashed.\",\"format\":\"unsignedInteger\"},\"others\":{\"type\":\"array\",\"description\":\"Array of tuples(`[accountId, amount]`) representing all the stashes of other slashed stakers and the amount they will be slashed.\",\"items\":{\"type\":\"string\",\"format\":\"tuple[ss58, unsignedInteger]\"}},\"reporters\":{\"type\":\"array\",\"description\":\"Array of account IDs of the reporters of the offense.\",\"items\":{\"type\":\"string\",\"format\":\"ss58\"}},\"payout\":{\"type\":\"string\",\"description\":\"Amount of bounty payout to reporters.\",\"format\":\"unsignedInteger\"}}},\"VestingSchedule\":{\"type\":\"object\",\"properties\":{\"locked\":{\"type\":\"string\",\"description\":\"Number of tokens locked at start.\",\"format\":\"unsignedInteger\"},\"perBlock\":{\"type\":\"string\",\"description\":\"Number of tokens that gets unlocked every block after `startingBlock`.\",\"format\":\"unsignedInteger\"},\"startingBlock\":{\"type\":\"string\",\"description\":\"Starting block for unlocking (vesting).\",\"format\":\"unsignedInteger\"}},\"description\":\"Vesting schedule for an account.\"},\"WinningData\":{\"type\":\"object\",\"properties\":{\"bid\":{\"type\":\"object\",\"properties\":{\"accountId\":{\"type\":\"string\"},\"paraId\":{\"type\":\"string\",\"format\":\"unsignedInteger\"},\"amount\":{\"type\":\"string\",\"format\":\"unsignedInteger\"}}},\"leaseSet\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"format\":\"unsignedInteger\"}}},\"description\":\"A currently winning bid and the set of lease periods the bid is for. The\\n`amount` of the bid is per lease period. The `bid` property will be `null`\\nif no bid has been made for the corresponding `leaseSet`.\\n\"}},\"requestBodies\":{\"Transaction\":{\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Transaction\"}}},\"required\":true}}}}\n\n//# sourceURL=webpack:///./src/openapi-v1.yaml?"); /***/ }), diff --git a/docs/src/openapi-v1.yaml b/docs/src/openapi-v1.yaml index 6c81fbb9e..bc2713073 100755 --- a/docs/src/openapi-v1.yaml +++ b/docs/src/openapi-v1.yaml @@ -2218,11 +2218,13 @@ components: leasePeriodIndex: type: string format: unsignedInteger - description: Current lease period index. + description: Current lease period index. This value may be null when the current block now, + substracted by the leaseOffset is less then zero. endOfLeasePeriod: type: string format: unsignedInteger - description: Last block (number) of the current lease period. + description: Last block (number) of the current lease period. This value may be null when + `leasePeriodIndex` is null. currentLeaseHolders: type: array items: