Open YaronWittenstein opened 2 years ago
Depends on #449
See also: SVM Transactions Signatures
Writing this Template should be very similar to the one at #449. The Template Storage will consist of 3 Public Keys that will be given upon the ctor.
Template Storage
ctor
As a reminder on this stage, the Immutable Storage has not been implemented yet (should be part of Simple Coin Integration #4).
Immutable Storage
Simple Coin Integration #4
The verify method will expect the parties involved in the Signatures as parameters.
verify
Signatures
It should look in high-level like this:
#[verify] fn verify(a: u8, b: u8) -> bool { if a == b { return false; } verify_sig(a, read_sig(0)) && verify_sig(b, read_sig(1)) } fn verify_sig(id: u8, sig: Blob64) -> bool { let pub_key = Storage::get_pub_key(id); Host::tx_verify(sig, pub_key) } fn read_sig(index: u8) -> Blob64 { let sigdata = Host::SigData(); // decode the `index` signature // the exact decoding depends on the ABI of `sigdata` }
Depends on #449
See also: SVM Transactions Signatures
Writing this Template should be very similar to the one at #449. The
Template Storage
will consist of 3 Public Keys that will be given upon thector
.As a reminder on this stage, the
Immutable Storage
has not been implemented yet (should be part ofSimple Coin Integration #4
).The
verify
method will expect the parties involved in theSignatures
as parameters.It should look in high-level like this: