1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
use xdr_rs_serialize::error::Error as XdrError;
pub type Result<T> = std::result::Result<T, Error>;
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("invalid str key")]
InvalidStrKey,
#[error("invalid str key version byte")]
InvalidStrKeyVersionByte,
#[error("invalid str key checksum")]
InvalidStrKeyChecksum,
#[error("invalid seed")]
InvalidSeed,
#[error("invalid asset code")]
InvalidAssetCode,
#[error("invalid data value")]
InvalidDataValue,
#[error("invalid signature")]
InvalidSignature,
#[error("invalid signature hint")]
InvalidSignatureHint,
#[error("memo text too long")]
InvalidMemoText,
#[error("memo hash too long")]
InvalidMemoHash,
#[error("memo return hash too long")]
InvalidMemoReturn,
#[error("invalid stroops amount")]
InvalidStroopsAmount,
#[error("stroops amount is negative")]
NegativeStroops,
#[error("invalid amount scale")]
InvalidAmountScale,
#[error("parse price error")]
ParsePriceError,
#[error("invalid network id")]
InvalidNetworkId,
#[error("invalid public key")]
InvalidPublicKey,
#[error("invalid pre auth tx")]
InvalidPreAuthTx,
#[error("invalid hash(x)")]
InvalidHashX,
#[error("invalid time bounds")]
InvalidTimeBounds,
#[error("error parsing amount")]
ParseAmountError(#[from] rust_decimal::Error),
#[error("error building operation")]
InvalidOperation(String),
#[error("transaction has too many operations")]
TooManyOperations,
#[error("transaction has no operations")]
MissingOperations,
#[error("transaction fee too low")]
TransactionFeeTooLow,
#[error("home domain too long")]
HomeDomainTooLong,
#[error("invalid account flags")]
InvalidAccountFlags,
#[error("invalid trust line flags")]
InvalidTrustLineFlags,
#[error("transaction fee overflow")]
TransactionFeeOverflow,
#[error("xdr serialization error")]
XdrError(XdrError),
#[error("base64 decode error")]
Base64DecodeError(#[from] base64::DecodeError),
#[error("sodium init failed")]
SodiumInitFailed,
}