o1-labs / o1js

TypeScript framework for zk-SNARKs and zkApps
https://docs.minaprotocol.com/en/zkapps/how-to-write-a-zkapp
Apache License 2.0
475 stars 105 forks source link

Remove the `string` argument from mina-signer's `signTransaction` #1623

Open mitschabaude opened 2 months ago

mitschabaude commented 2 months ago

This is extremely easy to misuse by passing in a stringified transaction. Also, it's misleading, because with the string argument it will just do signMessage() which is not a function intended for signing transactions.

Another idea, maybe we should remove signMessage() altogether or replace it with a signFields()-compatible signing algorithm?