-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
signFields does not work with Fields from o1js #1
Comments
type SignMessageArgs = {
message: Field[];
};
const signContent: SignMessageArgs = {
message: CircuitString.fromString(newMessage).toFields(),
};
const signResult= await window.mina?.signFields({
message: [signContent.message.toString()],
}); My attempt at merging o1js Fields with BigInt failed so far |
We currently support We will add support for toFields().toString() in the next version type SignedFieldsData = {
data: (string | number)[] | string;
publicKey: string;
signature: string;
}; You can first use the following solution let signContent = CircuitString.fromString(newMessage).toFields();
let realSignContent = signContent.toString().split(",").map(Number);
const signResult: SignedData | ProviderError = await (window as any)?.mina
?.signFields({
message: realSignContent,
})
.catch((err: any) => err); |
thank you so much for providing code, any chance there is a solution for verifying the data on the backend |
It doesn't matter, I'm happy to do this. |
https://docs.aurowallet.com/general/reference/api-reference/methods/mina_signfields
takes Fields like [1,2,3]
But this is not the way o1js interprets Fields
The text was updated successfully, but these errors were encountered: