There are a couple ways you could work with that. If you have the extrinsic hash and the block number than you could something like this:
const exampleBlockNumber = 7200920
const blockHash = await api.rpc.chain.getBlockHash(exampleBlockNumber);
const signedBlock = await api.rpc.chain.getBlock(blockHash);
const extrinsicHash = "0xeb8f2a5af4a82a237e7e270ed6bd51ce82bb9253802259fd0fdb24212fe65260"
signedBlock.block.extrinsics.forEach(async (ex, index) => {
if (extrinsicHash === ex.hash.toHex()) {
console.log(index, ex.toHuman());
const { method: { args, method, section } } = ex;
console.log(`${section}.${method}(${args.map((a) => a.toString()).join(', ')})`);
}
});
For this specific example you would get this output:
1 {
isSigned: true,
method: {
args: { dest: [Object], value: '39.5536 DOT' },
method: 'transfer',
section: 'balances'
},
era: { MortalEra: { period: '64', phase: '18' } },
nonce: '0',
signature: '0x56344710ae648a1da40e2c1a1159c73fdbd7d522af01f1fd330fb6bedc4db615ca983d69fcf7cdf7376ab59fd4c492a711cc64bba48d6ae23762d95176071a0c',
signer: { Id: '13a9ccJQrJZdLsdisnL31uuApQmNfGd3d3fmGdqLPiBiW8jP' },
tip: '0'
}
balances.transfer(13Hwdzi6jkXtBWTSU5de5gC93hDog23pdqd59SPZ7s9zXVNL, 395536044985)