another small announcement regarding @AppliedLang and digest on @octra, we've added a clear example program with a bunch of useful tools that devs might need:
ed25519 signature verification
sha-256 digest
keccak 256 digest
exec context tx hash access
also, for your reference, we've deployed the program to: https://t.co/C5S0MEfATj
to easily understand what's going on, the mainnet txs used for verification are:
deploy: 2735573866c6c70d60feb287b8c72008bee83cd75d49955731a6b3956b8cb6eb
hash_sha256("Hello Octra!"): 2f276b5863613040667b0db125a39eaf4a324d6d521e5fc896dc0e0360c0832d
hash_keccak256("Hello Octra!"): bc7618b75be04b86d18d3dd32396d42644121a51794fdf12c23050f0176d4a92
capture_tx_hash(): 4aef624d0390af03c19dc72e9dceef3f5239f42af4d7b45fa5f1a509f78a2121
demo(pk, "attest me", sig): d9bda9241e67314a3678fbecfd17806925b9d5b772ba6c25834dc5bc05e64f33
which brings us to, onchain state confirms:
get_last_message() -> "attest me"
get_last_sha256() -> 4048e509f5f59453978c706376197218f25533fab79cd38c6ed660d7dc90cfe8
get_last_keccak256() -> 93b2bc7959b9b1b2caf9271d747c1a0d2b52497a5d0b7f6b128d0accd695b677
get_last_tx_hash() -> d9bda9241e67314a3678fbecfd17806925b9d5b772ba6c25834dc5bc05e64f33
get_last_sig_ok() -> true
btw, if anyone is interested (have seen questions arising), then @AppliedLang supports groth16 bn254 verif natively, here is an example of a program specially deployed for this, you can look at it as a ref -
oct3rzJZucw9BsS7LRWBNoKRoaBsXAhhSK4LmfRvg45ppSs
the verification key consists of g1/22 points (alpha g1, beta g2, gamma g2, delta g2, ic[] - G 1), you can use snarkjs for proof gen