What return type should I use in subxt to be able to parse the result from author_pendingExtrinsics
?
I have implemented a wrapper call and returning a vector of OpaqueExtrinsic
:
async fn author_pending_extrinsics(&self) -> Result<Vec<OpaqueExtrinsic>, subxt::Error> {
self.rpc.request("author_pendingExtrinsics", rpc_params![]).await;
}
This is okay, but I need to get the signer and the nonce from the results. It should be possible as polkadot-js there is a type called Extrinsic
with all the information I need.
Running the call in the polkadot-js web ui returns:
3: author.pendingExtrinsics: Vec<Extrinsic>
[
{
isSigned: true
method: {
args: {
dest: {
Id: 4hNgHEdC6EZYHPFJrxFt19m3zBMbTb6ZErSbo9idCpX6n2zU
}
value: 9,500,000,000,000
}
method: transfer
section: balances
}
era: {
ImmortalEra: 0x00
}
nonce: 1
signature: 0xbe779752c8893fc895cbca17b2b47b8fcde7627f1dd93d022354ba13d777f361befebc9f0862c5821c995ff1145d543114ea55fa89120d85b16815775f67658e
signer: {
Id: 4hNohKFDvDG8qf5SHPjhg3dhGFe4uRp136tm8eHNQ72xSYXB
}
tip: 0
}
]
I have searched in the auto generated docs for my project(cargo doc --open
) but could not find any suitable existing or auto generated type.