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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
pub const URL: &str = "https://api.devnet.solana.com";
pub const TOKEN_MINT: &str = "FoGCYXscFoDvvaSHdRvPQcRUB9347SazD4Bt7F5MLSE3";

/// # Endpoint: /transaction_item
/// To get a single transaction from the history and display data related to that transaction
/// 
/// Example Request:
/// ```
/// {
///     transaction_id: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"
/// }
/// ```
/// 
/// Example Response:
/// ```
/// {
///     to: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
///     from: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
///     amount: 0.0,
///     network_fee: 0.0,
/// }
/// ```
pub mod transact_item;

/// # Endpoint: /signature
/// To get a history of signatures
/// 
/// Example Request:
/// ```
/// {
///     account_key: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
///     quantity: 1
/// }
/// ```
/// 
/// Example Response:
/// ```
/// {
///     signature: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
///     slot: 0,
///     err: null,
///     memo: null
///     blockTime: 0,
///     confirmationStatus: "finalized"
/// }
/// ```
pub mod signature;

/// # Endpoint: /balance
/// To get a balance of abion token
/// 
/// Example Request:
/// ```
/// {
///     account_key: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"
/// }
/// ```
/// 
/// Example Response:
/// ```
/// {
///     account_key: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
///     balance: 0,
/// }
/// ```
pub mod balance;

/// # Endpoint: /transfer
/// To transfer tokens
/// 
/// Example Request:
/// ```
/// {
///     to: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
///     from: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
///     amount: 0.000000000,
///     keypair: []
/// }
/// ```
/// 
/// Example Response:
/// ```
/// {
///     to: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
///     from: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
///     amount: 0.000000000,
///     transaction_id: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"
/// }
/// ```
pub mod transfer;

/// # Endpoint: /account
/// To create a Abion token account
/// 
/// Example Request:
/// ```
/// {
///     account_key: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
///     keypair: []
/// }
/// ```
/// 
/// Example Response:
/// ```
/// {
///     account_key: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
///     token_account: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
///     transaction_id: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"
/// }
/// ```
pub mod account;

/// # Endpoint: /summon
/// To charge a fee to controllers upon receipt of some task
/// 
/// Example Request:
/// ```
/// {
///     to: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
///     from: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
///     amount: 0.000000000,
///     keypair: []
/// }
/// ```
/// 
/// Example Response:
/// ```
/// {
///     to: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
///     from: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
///     amount: 0.000000000,
///     transaction_id: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"
/// }
/// ```
pub mod summon;

/// # Endpoint: /get_user_info
/// To get user infos
/// 
/// Example Request:
/// ```
/// {
///     account_key: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
/// }
/// ```
/// 
/// Example Response:
/// ```
/// {
///     account_key: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx",
///     network_balance: 0,
///     token_account: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx" || null,
/// }
/// ```
pub mod user_info;