@@ -2667,6 +2667,44 @@ paths:
26672667 application/json :
26682668 schema :
26692669 $ref : ' #/components/schemas/Error'
2670+ /transaction/metadata-blob :
2671+ post :
2672+ tags :
2673+ - transaction
2674+ summary : Get the metadata blob for offline signers.
2675+ description : >-
2676+ Returns the minimal metadata ("metadata blob" or "proof") needed by offline
2677+ signers to decode a transaction's signing payload, along with the metadata
2678+ hash for the CheckMetadataHash signed extension per RFC-0078.
2679+
2680+
2681+ The metadata blob contains type definitions needed to decode the specific
2682+ transaction, Merkle proofs verifying these types are part of the full metadata,
2683+ and extra chain info (specVersion, specName, base58Prefix, decimals, tokenSymbol).
2684+
2685+
2686+ Offline signers can use this to decode the transaction to display what the user
2687+ is signing and verify the metadata subset matches the on-chain metadata via
2688+ Merkle proofs.
2689+
2690+
2691+ Reference: RFC-0078 https://polkadot-fellows.github.io/RFCs/approved/0078-merkleized-metadata.html
2692+ operationId : getTransactionMetadataBlob
2693+ requestBody :
2694+ $ref : ' #/components/requestBodies/TransactionMetadataBlob'
2695+ responses :
2696+ " 200 " :
2697+ description : successful operation
2698+ content :
2699+ application/json :
2700+ schema :
2701+ $ref : ' #/components/schemas/TransactionMetadataBlob'
2702+ " 400 " :
2703+ description : invalid request body or metadata V15 not available
2704+ content :
2705+ application/json :
2706+ schema :
2707+ $ref : ' #/components/schemas/Error'
26702708 /pallets/assets/{assetId}/asset-info :
26712709 get :
26722710 tags :
@@ -8406,6 +8444,74 @@ components:
84068444 - `RuntimeVersion`: https://crates.parity.io/sp_version/struct.RuntimeVersion.html
84078445 - `SignedExtension`: https://crates.parity.io/sp_runtime/traits/trait.SignedExtension.html
84088446 - FRAME Support: https://crates.parity.io/frame_support/metadata/index.html
8447+ MetadataBlobBody :
8448+ type : object
8449+ properties :
8450+ tx :
8451+ type : string
8452+ format : hex
8453+ description : Full encoded extrinsic as a hex string.
8454+ txAdditionalSigned :
8455+ type : string
8456+ format : hex
8457+ description : Optional additional signed data for the extrinsic. Used together with `tx`.
8458+ callData :
8459+ type : string
8460+ format : hex
8461+ description : Call data as hex string. Use this alongside includedInExtrinsic
8462+ and includedInSignedData instead of `tx`.
8463+ includedInExtrinsic :
8464+ type : string
8465+ format : hex
8466+ description : Signed extension data included in the extrinsic. Required when using callData.
8467+ includedInSignedData :
8468+ type : string
8469+ format : hex
8470+ description : Signed extension data included in the signature. Required when using callData.
8471+ at :
8472+ type : string
8473+ description : Block hash or number to query at. Defaults to finalized head.
8474+ format : unsignedInteger or $hex
8475+ description : >-
8476+ Request body for generating the metadata blob. You must provide either:
8477+ (1) `tx` (full extrinsic) with optional `txAdditionalSigned`, or
8478+ (2) `callData` with `includedInExtrinsic` and `includedInSignedData`.
8479+ TransactionMetadataBlob :
8480+ type : object
8481+ properties :
8482+ at :
8483+ $ref : ' #/components/schemas/BlockIdentifiers'
8484+ metadataHash :
8485+ type : string
8486+ format : hex
8487+ description : The 32-byte metadata hash (hex-encoded) that should be used with
8488+ the CheckMetadataHash signed extension.
8489+ metadataBlob :
8490+ type : string
8491+ format : hex
8492+ description : The metadata blob (hex-encoded) containing the minimal metadata
8493+ required for offline signers to decode the transaction. This is a SCALE-encoded
8494+ Proof structure per RFC-0078.
8495+ specVersion :
8496+ type : number
8497+ description : The chain's spec version.
8498+ specName :
8499+ type : string
8500+ description : The chain's spec name.
8501+ base58Prefix :
8502+ type : number
8503+ description : The chain's SS58 address prefix.
8504+ decimals :
8505+ type : number
8506+ description : Number of decimals for the chain's native token.
8507+ tokenSymbol :
8508+ type : string
8509+ description : Symbol for the chain's native token.
8510+ description : >-
8511+ Response containing the metadata blob for offline signers. The metadataBlob
8512+ contains type definitions needed to decode the specific transaction, Merkle
8513+ proofs verifying these types are part of the full metadata, and extra chain
8514+ info.
84098515 TransactionPool :
84108516 type : object
84118517 properties :
@@ -8533,6 +8639,12 @@ components:
85338639 schema :
85348640 $ref : ' #/components/schemas/DryRunBody'
85358641 required : true
8642+ TransactionMetadataBlob :
8643+ content :
8644+ application/json :
8645+ schema :
8646+ $ref : ' #/components/schemas/MetadataBlobBody'
8647+ required : true
85368648 ContractMetadata :
85378649 content :
85388650 application/json :
0 commit comments