cosmjs icon indicating copy to clipboard operation
cosmjs copied to clipboard

signDirect return signed value, I need to get "chainId" field.

Open luis360 opened this issue 2 years ago • 1 comments

signingcosmwasmclient.ts signDirect const { signature, signed } = await this.signer.signDirect(signerAddress, signDoc); return TxRaw.fromPartial({ bodyBytes: signed.bodyBytes, authInfoBytes: signed.authInfoBytes, signatures: [fromBase64(signature.signature)], });

Is it possible to return signed? I need to get the "chainId" field. I need to deserialize the signed parameters, which is a very important risk control strategy

luis360 avatar Nov 01 '23 14:11 luis360

The chain ID value is not exposed here. You'd need your own clone of signDirect to be able to access the value.

However, what's the use case for this? The chain would reject a transaction with the wrong chain ID anyways.

webmaster128 avatar Nov 07 '23 11:11 webmaster128