cosmjs
cosmjs copied to clipboard
signDirect return signed value, I need to get "chainId" field.
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
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.