await cryptoWaitReady();
const json = JSON.parse(xxx);
const keyring = new Keyring({ ss58Format: 42 });
const pair = keyring.addFromPair(decoded, json.meta, 'sr25519');
// const pair = keyring.addFromUri('//Alice', null, 'sr25519');
const sig = pair.sign(..);
Everything works well if I use //Alice
to sign. But if I use json key to sign then I got this error.
If I remove the await cryptoWaitReady();
I'll get The WASM interface has not been initialized.
.