rippled
Loading...
Searching...
No Matches
attester.h
1//------------------------------------------------------------------------------
2/*
3 This file is part of rippled: https://github.com/ripple/rippled
4 Copyright (c) 2022 Ripple Labs Inc.
5
6 Permission to use, copy, modify, and/or distribute this software for any
7 purpose with or without fee is hereby granted, provided that the above
8 copyright notice and this permission notice appear in all copies.
9
10 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17*/
18//==============================================================================
19
20#ifndef RIPPLE_TEST_JTX_ATTESTER_H_INCLUDED
21#define RIPPLE_TEST_JTX_ATTESTER_H_INCLUDED
22
23#include <xrpl/basics/Buffer.h>
24#include <xrpl/protocol/AccountID.h>
25
26#include <cstdint>
27#include <optional>
28
29namespace ripple {
30
31class PublicKey;
32class SecretKey;
33class STXChainBridge;
34class STAmount;
35
36namespace test {
37namespace jtx {
38
39Buffer
41 PublicKey const& pk,
42 SecretKey const& sk,
43 STXChainBridge const& bridge,
44 AccountID const& sendingAccount,
45 STAmount const& sendingAmount,
46 AccountID const& rewardAccount,
47 bool wasLockingChainSend,
48 std::uint64_t claimID,
49 std::optional<AccountID> const& dst);
50
51Buffer
53 PublicKey const& pk,
54 SecretKey const& sk,
55 STXChainBridge const& bridge,
56 AccountID const& sendingAccount,
57 STAmount const& sendingAmount,
58 STAmount const& rewardAmount,
59 AccountID const& rewardAccount,
60 bool wasLockingChainSend,
61 std::uint64_t createCount,
62 AccountID const& dst);
63} // namespace jtx
64} // namespace test
65} // namespace ripple
66
67#endif
Json::Value bridge(Account const &lockingChainDoor, Issue const &lockingChainIssue, Account const &issuingChainDoor, Issue const &issuingChainIssue)
Buffer sign_claim_attestation(PublicKey const &pk, SecretKey const &sk, STXChainBridge const &bridge, AccountID const &sendingAccount, STAmount const &sendingAmount, AccountID const &rewardAccount, bool wasLockingChainSend, std::uint64_t claimID, std::optional< AccountID > const &dst)
Definition attester.cpp:32
Buffer sign_create_account_attestation(PublicKey const &pk, SecretKey const &sk, STXChainBridge const &bridge, AccountID const &sendingAccount, STAmount const &sendingAmount, STAmount const &rewardAmount, AccountID const &rewardAccount, bool wasLockingChainSend, std::uint64_t createCount, AccountID const &dst)
Definition attester.cpp:55
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:25
base_uint< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
Definition AccountID.h:48