Hey I have some call data which is similar to this.
I am signing it using schnorrkel libaray function function. as secret.sign_simple(&[], msg)
where secret
is a Keypair and msg
is in bytes.
Then I create a multisignature using
let sig_slice: &[u8] = &sig_bytes;
let sig = Signature::try_from(sig_slice).unwrap();
let multisig = MultiSignature::Sr25519(sig);
where &sig_bytes
in bytes returned by signing and if I add that signature to make a extrinsic bytes e.g. here
I get error Transaction has a bad signature.
And if I send the same extrinsic using subxt and pass the signer as PairSigner<SubstrateConfig, sr25519::Pair>
it works fine. But I can't use this pair sign function when signing a msg because of nature of architecture. I have to use an independent lib something more generic.
How can I solve this error?