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
//! The xpring-rs Library
//!
//! xpring-rs is a Rust client-side library that:
//!
//! - Performs some offline calculations around XRP Ledger wallet generation/derivation
//! - Provides an easy interface to interact with the XRP Ledger.
//!
//! # Features
//!
//! xpring-rs provides the following features:
//!
//! - Wallet generation and derivation (Seed-based or HD Wallet-based)
//! - Address validation
//! - Account balance retrieval
//! - Sending XRP Payments
use anyhow::Error;

// Private modules
#[macro_use]
mod javascript;
mod config;
mod util;
mod xpring;
mod x {
    tonic::include_proto!("org.xrpl.rpc.v1");
    pub mod prelude {
        pub use super::{
            currency_amount, get_transaction_response, payment::Path as xPath,
            transaction::TransactionData, xrp_ledger_api_service_client::XrpLedgerApiServiceClient,
            Account, AccountAddress, AccountRoot, Amount, CurrencyAmount, Destination,
            GetAccountInfoRequest, GetFeeRequest, GetFeeResponse, GetTransactionRequest,
            GetTransactionResponse, LastLedgerSequence, LedgerRange, Memo, Payment, Sequence,
            Signer, SigningPublicKey, SubmitTransactionRequest, Transaction, TransactionResult,
            XrpDropsAmount,
        };
    }
}
mod i {
    tonic::include_proto!("org.interledger.stream.proto");
    pub mod prelude {
        pub use super::{
            ilp_over_http_service_client::IlpOverHttpServiceClient, SendPaymentRequest,
            SendPaymentResponse, balance_service_client::BalanceServiceClient, GetBalanceRequest, GetBalanceResponse
        };
    }
}

// Public modules
pub mod address;
pub mod transaction;
pub mod wallet;
pub mod xrplclient;
pub mod ilpclient;

pub use crate::xpring::{Xrpl, Ilp};