mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-17 07:11:36 +02:00
Add check_version function to Foreign API (#87)
* move api deser types into separate types mod * rustfmt * missing types file * make all exports from libwallet more explicit * rustfmt * add version check function to foreign api * rustfmt * change check_version return value to result, for consistency
This commit is contained in:
@@ -17,8 +17,7 @@ use std::fs::File;
|
||||
use std::io::{Read, Write};
|
||||
|
||||
use crate::config::WalletConfig;
|
||||
use crate::libwallet::slate::Slate;
|
||||
use crate::libwallet::Error;
|
||||
use crate::libwallet::{Error, Slate};
|
||||
use crate::WalletCommAdapter;
|
||||
use std::collections::HashMap;
|
||||
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
|
||||
/// HTTP Wallet 'plugin' implementation
|
||||
use crate::api;
|
||||
use crate::libwallet::slate::Slate;
|
||||
use crate::libwallet::slate_versions::{v0, v1};
|
||||
use crate::libwallet::{Error, ErrorKind};
|
||||
use crate::libwallet::{Error, ErrorKind, Slate};
|
||||
use crate::WalletCommAdapter;
|
||||
use config::WalletConfig;
|
||||
use failure::ResultExt;
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
|
||||
use crate::config::WalletConfig;
|
||||
use crate::libwallet::api_impl::foreign;
|
||||
use crate::libwallet::slate::Slate;
|
||||
use crate::libwallet::{Error, ErrorKind};
|
||||
use crate::libwallet::{Error, ErrorKind, Slate};
|
||||
use crate::{instantiate_wallet, HTTPNodeClient, WalletCommAdapter};
|
||||
use failure::ResultExt;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -23,8 +23,7 @@ pub use self::keybase::KeybaseWalletCommAdapter;
|
||||
pub use self::null::NullWalletCommAdapter;
|
||||
|
||||
use crate::config::WalletConfig;
|
||||
use crate::libwallet::slate::Slate;
|
||||
use crate::libwallet::Error;
|
||||
use crate::libwallet::{Error, Slate};
|
||||
use std::collections::HashMap;
|
||||
|
||||
/// Encapsulate wallet to wallet communication functions
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
|
||||
use crate::config::WalletConfig;
|
||||
/// Null Output 'plugin' implementation
|
||||
use crate::libwallet::slate::Slate;
|
||||
use crate::libwallet::Error;
|
||||
use crate::libwallet::{Error, Slate};
|
||||
use crate::WalletCommAdapter;
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ pub use crate::seed::{EncryptedWalletSeed, WalletSeed, SEED_FILE};
|
||||
use crate::util::Mutex;
|
||||
use std::sync::Arc;
|
||||
|
||||
use libwallet::types::{NodeClient, WalletBackend, WalletInst};
|
||||
use libwallet::{NodeClient, WalletBackend, WalletInst};
|
||||
|
||||
/// Helper to create an instance of the LMDB wallet
|
||||
pub fn instantiate_wallet(
|
||||
|
||||
@@ -30,9 +30,11 @@ use crate::store::{self, option_to_not_found, to_key, to_key_u64};
|
||||
|
||||
use crate::core::core::Transaction;
|
||||
use crate::core::{global, ser};
|
||||
use crate::libwallet::types::*;
|
||||
use crate::libwallet::{check_repair, restore};
|
||||
use crate::libwallet::{Error, ErrorKind};
|
||||
use crate::libwallet::{
|
||||
AcctPathMapping, Context, Error, ErrorKind, NodeClient, OutputData, TxLogEntry, WalletBackend,
|
||||
WalletOutputBatch,
|
||||
};
|
||||
use crate::util;
|
||||
use crate::util::secp::constants::SECRET_KEY_SIZE;
|
||||
use crate::util::ZeroingString;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
use futures::{stream, Stream};
|
||||
|
||||
use crate::libwallet::types::*;
|
||||
use crate::libwallet::{NodeClient, TxWrapper};
|
||||
use std::collections::HashMap;
|
||||
use tokio::runtime::Runtime;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ use crate::core::{consensus, global, pow};
|
||||
use crate::keychain;
|
||||
use crate::libwallet;
|
||||
use crate::libwallet::api_impl::{foreign, owner};
|
||||
use crate::libwallet::types::{
|
||||
use crate::libwallet::{
|
||||
BlockFees, CbData, InitTxArgs, NodeClient, WalletBackend, WalletInfo, WalletInst,
|
||||
};
|
||||
use crate::lmdb_wallet::LMDBBackend;
|
||||
|
||||
@@ -26,8 +26,7 @@ use crate::core::global::{set_mining_mode, ChainTypes};
|
||||
use crate::core::{pow, ser};
|
||||
use crate::keychain::Keychain;
|
||||
use crate::libwallet::api_impl::foreign;
|
||||
use crate::libwallet::slate::Slate;
|
||||
use crate::libwallet::types::*;
|
||||
use crate::libwallet::{NodeClient, Slate, TxWrapper, WalletInst};
|
||||
use crate::util;
|
||||
use crate::util::secp::pedersen;
|
||||
use crate::util::secp::pedersen::Commitment;
|
||||
|
||||
Reference in New Issue
Block a user