substrate_stellar_sdk/
error.rs1use base64::DecodeError;
2use hex::FromHexError;
3
4#[cfg(feature = "offchain")]
5use crate::horizon::FetchError;
6
7use sp_std::vec::Vec;
8
9#[derive(Debug, Clone, PartialEq)]
10pub enum StellarSdkError {
11 InvalidBase32Character {
12 at_position: usize,
13 },
14
15 InvalidStellarKeyEncoding,
17
18 InvalidStellarKeyEncodingLength,
20
21 InvalidStellarKeyEncodingVersion {
23 expected_version: char,
24 found_version: char,
25 },
26
27 InvalidStellarKeyChecksum {
29 expected: u16,
30 found: u16,
31 },
32
33 InvalidSignatureLength {
35 found_length: usize,
36 expected_length: usize,
37 },
38 PublicKeyCantVerify,
40
41 InvalidBase64Encoding(DecodeError),
43
44 TooManySignatures,
46
47 AssetCodeTooLong,
48
49 InvalidAssetCodeCharacter,
50
51 ExceedsMaximumLength {
52 requested_length: usize,
53 allowed_length: i32,
54 },
55
56 InvalidHexEncoding(FromHexError),
57
58 InvalidHashConversion,
59
60 NotApproximableAsFraction,
61
62 InvalidPrice,
63
64 InvalidTrustLineLimit,
65
66 InvalidAuthorizeFlag,
67
68 InvalidAmountString,
69
70 AmountOverflow,
71
72 AmountNegative,
73
74 AmountNonPositive,
75
76 InvalidBinaryLength {
77 found_length: usize,
78 expected_length: usize,
79 },
80
81 InvalidBalanceId,
82
83 EmptyClaimants,
84
85 InvalidSignerWeight,
86
87 CantWrapFeeBumpTransaction,
88
89 #[cfg(feature = "offchain")]
90 FetchError(FetchError),
91
92 DecodeError(Vec<u8>), }