difftreelog
fix separate povinfo RPC
in: master
8 files changed
client/rpc/src/pov_estimate.rsdiffbeforeafterboth122#[rpc(server)]122#[rpc(server)]123#[async_trait]123#[async_trait]124pub trait PovEstimateApi<BlockHash> {124pub trait PovEstimateApi<BlockHash> {125 #[method(name = "unique_estimateExtrinsicPoV")]125 #[method(name = "povinfo_estimateExtrinsicPoV")]126 fn estimate_extrinsic_pov(126 fn estimate_extrinsic_pov(127 &self,127 &self,128 encoded_xts: Vec<Bytes>,128 encoded_xts: Vec<Bytes>,tests/src/interfaces/augment-api-rpc.tsdiffbeforeafterboth436 **/436 **/437 queryInfo: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<RuntimeDispatchInfoV1>>;437 queryInfo: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<RuntimeDispatchInfoV1>>;438 };438 };439 povinfo: {440 /**441 * Estimate PoV size of encoded signed extrinsics442 **/443 estimateExtrinsicPoV: AugmentedRpc<(encodedXt: Vec<Bytes> | (Bytes | string | Uint8Array)[], at?: Hash | string | Uint8Array) => Observable<UpPovEstimateRpcPovInfo>>;444 };439 rmrk: {445 rmrk: {440 /**446 /**441 * Get tokens owned by an account in a collection447 * Get tokens owned by an account in a collection725 * Get effective collection limits731 * Get effective collection limits726 **/732 **/727 effectiveCollectionLimits: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsCollectionLimits>>>;733 effectiveCollectionLimits: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsCollectionLimits>>>;728 /**729 * Estimate PoV size of an encoded extrinsic730 **/731 estimateExtrinsicPoV: AugmentedRpc<(encodedXt: Vec<Bytes> | (Bytes | string | Uint8Array)[], at?: Hash | string | Uint8Array) => Observable<UpPovEstimateRpcPovInfo>>;732 /**734 /**733 * Get the last token ID created in a collection735 * Get the last token ID created in a collection734 **/736 **/tests/src/interfaces/definitions.tsdiffbeforeafterboth17export {default as unique} from './unique/definitions';17export {default as unique} from './unique/definitions';18export {default as appPromotion} from './appPromotion/definitions';18export {default as appPromotion} from './appPromotion/definitions';19export {default as rmrk} from './rmrk/definitions';19export {default as rmrk} from './rmrk/definitions';20export {default as povinfo} from './povinfo/definitions';20export {default as default} from './default/definitions';21export {default as default} from './default/definitions';22tests/src/interfaces/povinfo/definitions.tsdiffbeforeafterbothno changes
tests/src/interfaces/povinfo/index.tsdiffbeforeafterbothno changes
tests/src/interfaces/povinfo/types.tsdiffbeforeafterbothno changes
tests/src/interfaces/types.tsdiffbeforeafterboth4export * from './unique/types';4export * from './unique/types';5export * from './appPromotion/types';5export * from './appPromotion/types';6export * from './rmrk/types';6export * from './rmrk/types';7export * from './povinfo/types';7export * from './default/types';8export * from './default/types';89tests/src/util/playgrounds/unique.dev.tsdiffbeforeafterboth99 rpc: {99 rpc: {100 unique: defs.unique.rpc,100 unique: defs.unique.rpc,101 appPromotion: defs.appPromotion.rpc,101 appPromotion: defs.appPromotion.rpc,102 povinfo: defs.povinfo.rpc,102 rmrk: defs.rmrk.rpc,103 rmrk: defs.rmrk.rpc,103 eth: {104 eth: {104 feeHistory: {105 feeHistory: {324 }325 }325326326 async calculatePoVInfo(txs: any[]): Promise<IPovInfo> {327 async calculatePoVInfo(txs: any[]): Promise<IPovInfo> {327 const rawPovInfo = await this.helper.callRpc('api.rpc.unique.estimateExtrinsicPoV', [txs]);328 const rawPovInfo = await this.helper.callRpc('api.rpc.povinfo.estimateExtrinsicPoV', [txs]);328329329 const kvJson: {[key: string]: string} = {};330 const kvJson: {[key: string]: string} = {};330331342 ],343 ],343 );344 );345346 if (!chainql.stdout) {347 throw Error('unable to get an output from the `chainql`');348 }344349345 return {350 return {346 proofSize: rawPovInfo.proofSize.toNumber(),351 proofSize: rawPovInfo.proofSize.toNumber(),