As the title asks, how do we abstract the raw payload of a transaction created with Polkadot JS?
// set up a tx, e.g. join a nomination pool
const tx = api.tx.nominationPools.join(bond, poolId);
// get raw payload data to sign elsewhere
// tx.???
I guess it should return something similar to the createSigningPayload
mentioned in this wiki (very outdated): https://wiki.polkadot.network/docs/build-transaction-construction
so far...
Doing the following creates a bare-bones extrinsic with empty block hash / genesis, and has incomplete data compared to a payload submitted on JS Apps:
const extrinsicPayload = api.registry.createType('ExtrinsicPayload', tx, {
version: tx.version,
});
I've determined that each payload property needs to be injected into the above example. I will update to a working example shortly.