After thoroughly going through the official documentation, I stumbled upon a page discussing how to transfer using polkadot-js
const transfer = api.tx.balances.transfer(BOB, 12345);
const hash = await transfer.signAndSend(alice);
I am curious if it's possible to divide the signAndSend
method into two separate actions performed on different machines. For instance, computing the signature in a client-side browser environment.
const transfer = api.tx.balances.transfer(BOB, 12345);
const signature = await transfer.signAsync(alice);
and then sending the actual transfer transaction from the server side.
const mockSigner = createMockSigner(signature); // The signature is generated from the client-side and transmitted to the server via HTTP
const transfer = api.tx.balances.transfer(BOB, 12345);
const res = transfer.send({signer: mockSigner});
The provided example doesn't seem to function as intended, but my query revolves around the possibility of splitting the sign and send process between different machines.