rippled
Loading...
Searching...
No Matches
vault.h
1//------------------------------------------------------------------------------
2/*
3 This file is part of rippled: https://github.com/ripple/rippled
4 Copyright (c) 2024 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_VAULT_H_INCLUDED
21#define RIPPLE_TEST_JTX_VAULT_H_INCLUDED
22
23#include <test/jtx/Account.h>
24#include <test/jtx/amount.h>
25
26#include <xrpl/basics/base_uint.h>
27#include <xrpl/json/json_value.h>
28#include <xrpl/protocol/Asset.h>
29#include <xrpl/protocol/Keylet.h>
30
31#include <optional>
32#include <tuple>
33
34namespace ripple {
35namespace test {
36namespace jtx {
37
38class Env;
39
40struct Vault
41{
43
50
53 create(CreateArgs const& args);
54
55 struct SetArgs
56 {
59 };
60
62 set(SetArgs const& args);
63
69
71 del(DeleteArgs const& args);
72
79
81 deposit(DepositArgs const& args);
82
89
91 withdraw(WithdrawArgs const& args);
92
100
102 clawback(ClawbackArgs const& args);
103};
104
105} // namespace jtx
106} // namespace test
107} // namespace ripple
108
109#endif
Represents a JSON value.
Definition json_value.h:149
Immutable cryptographic account descriptor.
Definition Account.h:39
A transaction testing environment.
Definition Env.h:121
Match set account flags.
Definition flags.h:128
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:25
std::optional< STAmount > amount
Definition vault.h:98
Json::Value set(SetArgs const &args)
Definition vault.cpp:48
std::tuple< Json::Value, Keylet > create(CreateArgs const &args)
Return a VaultCreate transaction and the Vault's expected keylet.
Definition vault.cpp:34
Json::Value withdraw(WithdrawArgs const &args)
Definition vault.cpp:79
Json::Value del(DeleteArgs const &args)
Definition vault.cpp:58
Json::Value clawback(ClawbackArgs const &args)
Definition vault.cpp:90
Json::Value deposit(DepositArgs const &args)
Definition vault.cpp:68