mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-21 14:20:56 +00:00
feat: Hook up deposit_preauth_id host function
This commit is contained in:
@@ -546,6 +546,25 @@ HostContext::delegateKeylet(
|
||||
});
|
||||
}
|
||||
|
||||
std::int32_t
|
||||
HostContext::depositPreauthKeylet(
|
||||
rust::Slice<std::uint8_t const> account,
|
||||
rust::Slice<std::uint8_t const> authorize,
|
||||
rust::Slice<std::uint8_t> out) const noexcept
|
||||
{
|
||||
return guarded(hostFunctions_.getJournal(), kHostInternal, [&] {
|
||||
if (account.size() != AccountID::size() || authorize.size() != AccountID::size())
|
||||
return hfErrorToInt(HostFunctionError::InvalidParams);
|
||||
|
||||
auto const value = hostFunctions_.depositPreauthKeylet(
|
||||
AccountID::fromVoid(account.data()), AccountID::fromVoid(authorize.data()));
|
||||
if (!value)
|
||||
return hfErrorToInt(value.error());
|
||||
|
||||
return answer(out, value->data(), value->size());
|
||||
});
|
||||
}
|
||||
|
||||
std::int32_t
|
||||
HostContext::sha512Half(rust::Slice<std::uint8_t const> data, rust::Slice<std::uint8_t> out)
|
||||
const noexcept
|
||||
|
||||
Reference in New Issue
Block a user