I’m using the Javascript SDK. How can I verify that a signed transaction was signed by a given address? I guess this is a UInt8Array
. Running it through TextDecoder leaves me with some text but a bunch of ‘unknown’ bytes as well:
// result of `signTransaction()` from MyAlgoConnect lib:
{"0":130,"1":163,"2":115,"3":105,"4":103,"5":196,"6":64, ...}
// now trying to decode
new TextDecoder('utf-8').decode(bytes)
// returns: ��sig�@ՂK��d�aK�ۯ_s�?�4~I...
I found verifyBytes
in the SDK, but I don’t know how to extract the signature from the resulting UInt8Array
, or what the bytes
should be that I’m verifying (I’m assuming the initial raw transaction object that I sent to the wallet for signing?).
Any help would be greatly appreciated!