So, once we've got the svm_tx_sigdata_range we need to expose it in the SDK.
In practice we'll probably end up having two functions: svm_sigdata_offset and svm_sigdata_len
(the rest of this issue description assumes that).
Here is an example of how it could look like:
let sigdata: &'static [u8] = Host::sigdata();
The steps to implement this PR:
Add to the Host trait under sdk-host the following:
Note that the declaration should match the ones used when implementing the host functions at #437
So if we ended up supporting only a single host function returning (u32, u32) then the svm-host-ffi should match that.
Depends on: #441
So, once we've got the
svm_tx_sigdata_range
we need to expose it in the SDK. In practice we'll probably end up having two functions:svm_sigdata_offset
andsvm_sigdata_len
(the rest of this issue description assumes that).Here is an example of how it could look like:
The steps to implement this PR:
Host
trait undersdk-host
the following:This is very similar to the currently existing
calldata
method:https://github.com/spacemeshos/svm/blob/6edb73de199fafce0953f82af061ca1090ff911c/crates/sdk-host/src/lib.rs#L13
Extend the
MockHost
under thesvm-host-mock
crate to have bothset_raw_sigdata
(very similar to theset_raw_calldata
).Extend the
svm-host-ffi
crate to have:Note that the declaration should match the ones used when implementing the host functions at #437 So if we ended up supporting only a single host function returning
(u32, u32)
then thesvm-host-ffi
should match that.