The Oracle tutorial (https://docs.minaprotocol.com/zkapps/tutorials/oracle) shows an example on how to verify a pre-created signature. And I found an example on how to sign messages (#1161103584428032080 message), but I can't get those two to play nicely with each other
Is there an example on how to sign any message and verify it immediately?
Here's some of the stuff I've tried so far:
let strData1 = 'a'; //'[1, 787]';
const fieldStr = BigInt(CircuitString.fromString(strData1).hash());
const signature = client.signFields([fieldStr], privateKey);
// let verified = client.verifyFields({
// data: BigInt(CircuitString.fromString(strData1).hash()),
// signature: signature.signature,
// publicKey: publicKey,
// });
let verified = Signature.fromBase58(signature.signature).verify(
PublicKey.fromBase58(publicKey),
['a']
);