Hi All, I did not find any example/template TEAL that uses ed25519verify to verify signature inside a smart contract. Please provide an example if you have one.
ed25519verify
Opcode: 0x04
Pops: … stack , {byte A}, {byte B}, {byte C}
Pushes: uint64
for (data A, signature B, pubkey C) verify the signature of (“ProgData” || program_hash || data) against the pubkey => {0 or 1}
Cost : 1900
The 32 byte public key is the last element on the stack, preceeded by the 64 byte signature at the second-to-last element on the stack, preceeded by the data which was signed at the third-to-last element on the stack.
What is the meaning of “for (data A, signature B, pubkey C) verify the signature of (“ProgData” || program_hash || data) against the pubkey => {0 or 1}” What is ProgData here? Can you give a full, working example?