2019-02-14 16:40:29 +03:00
|
|
|
// Copyright 2019 The Grin Developers
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
|
|
|
//! Higher level wallet functions which can be used by callers to operate
|
|
|
|
//! on the wallet, as well as helpers to invoke and instantiate wallets
|
|
|
|
//! and listeners
|
|
|
|
|
|
|
|
#![deny(non_upper_case_globals)]
|
|
|
|
#![deny(non_camel_case_types)]
|
|
|
|
#![deny(non_snake_case)]
|
|
|
|
#![deny(unused_mut)]
|
|
|
|
#![warn(missing_docs)]
|
|
|
|
|
2019-09-02 18:03:35 +03:00
|
|
|
use grin_wallet_config as config;
|
2019-03-26 19:02:31 +03:00
|
|
|
use grin_wallet_util::grin_core as core;
|
|
|
|
use grin_wallet_util::grin_keychain as keychain;
|
|
|
|
use grin_wallet_util::grin_util as util;
|
2019-03-29 19:00:02 +03:00
|
|
|
extern crate grin_wallet_impls as impls;
|
2019-03-14 15:06:03 +03:00
|
|
|
extern crate grin_wallet_libwallet as libwallet;
|
2019-02-14 16:40:29 +03:00
|
|
|
|
|
|
|
extern crate failure_derive;
|
2019-08-06 14:50:41 +03:00
|
|
|
#[macro_use]
|
|
|
|
extern crate serde_derive;
|
2019-03-22 15:03:25 +03:00
|
|
|
extern crate serde_json;
|
2019-02-14 16:40:29 +03:00
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate log;
|
|
|
|
|
2019-03-14 15:06:03 +03:00
|
|
|
mod foreign;
|
|
|
|
mod foreign_rpc;
|
Merge milestone/2.1.0 into master (#199)
* version bump for next potential release
* Merge master into milestone/2.1.0 (#182)
* Derive --version output dynamically from cargo package version (#174)
* add --txid to the `wallet txs` command (#176)
* add --txid to the `wallet txs` command
* add test for `wallet txs` command with `--txid` parameter
* Refactor - Split WalletCommAdapter into multiple traits (#180)
* Derive --version output dynamically from cargo package version (#174)
* add server auth argument to http client
* Revert "add server auth argument to http client"
This reverts commit f52a8d2c7cdfb8583af5716ad621eb560811d6ee.
* modify WalletCommAdapter, moving dest argument into fields on implementors,
visiting havok on automated tests, at least one of which is now out of date and failing
* Split WalletCommAdapter into four traits, one for each of its intended behaviors.
* Remove two vestigals
1. args, a stringly typed argument to put_tx
2. NullAdapter, which is no longer used
* Remove unused "params" argument from listen method.
* Re-add previously existing TODO comment
* Fix non-test build
* completely Fix non-test build
* Full Lifecycle API Support (#184)
* refactoring wallet lib traits
* rustfmt
* rustfmt
* add new files
* explicit lifetime specifiers on all wallet traits
* rustfmt
* modify apis to use new walletinst
* rustfmt
* converting controller crate
* rustfmt
* controller crate compiling
* rustfmt
* compilation
* rustfmt
* Remove config from wallet, implement open_wallet, close_wallet in lifecycle provider, remove password + open_with_credentials from WalletBackend + impl
* rustfmt
* full compilation, changing recovery + init to new model
* rustfmt
* wallet initialisation working, init command output and flow identical to v2.0.0 wallet
* rustfmt
* fix listener and owner api startup
* rustfmt
* rustfmt
* move encryption test
* rustfmt
* fix api doctests
* rustfmt
* fix for most tests in controller crate
* rustfmt
* fix for check tests in controller crate
* fix main wallet tests
* rustfmt
* add explicit functions to handle mnemonic recovery, fix CLI recovery workflow
* rustfmt
* update keybase adapter to use new wallet format
* rustfmt
* test fix
* remove debug output
2019-07-29 15:25:03 +03:00
|
|
|
|
2019-03-14 15:06:03 +03:00
|
|
|
mod owner;
|
|
|
|
mod owner_rpc;
|
2019-08-06 14:50:41 +03:00
|
|
|
mod owner_rpc_s;
|
Merge milestone/2.1.0 into master (#199)
* version bump for next potential release
* Merge master into milestone/2.1.0 (#182)
* Derive --version output dynamically from cargo package version (#174)
* add --txid to the `wallet txs` command (#176)
* add --txid to the `wallet txs` command
* add test for `wallet txs` command with `--txid` parameter
* Refactor - Split WalletCommAdapter into multiple traits (#180)
* Derive --version output dynamically from cargo package version (#174)
* add server auth argument to http client
* Revert "add server auth argument to http client"
This reverts commit f52a8d2c7cdfb8583af5716ad621eb560811d6ee.
* modify WalletCommAdapter, moving dest argument into fields on implementors,
visiting havok on automated tests, at least one of which is now out of date and failing
* Split WalletCommAdapter into four traits, one for each of its intended behaviors.
* Remove two vestigals
1. args, a stringly typed argument to put_tx
2. NullAdapter, which is no longer used
* Remove unused "params" argument from listen method.
* Re-add previously existing TODO comment
* Fix non-test build
* completely Fix non-test build
* Full Lifecycle API Support (#184)
* refactoring wallet lib traits
* rustfmt
* rustfmt
* add new files
* explicit lifetime specifiers on all wallet traits
* rustfmt
* modify apis to use new walletinst
* rustfmt
* converting controller crate
* rustfmt
* controller crate compiling
* rustfmt
* compilation
* rustfmt
* Remove config from wallet, implement open_wallet, close_wallet in lifecycle provider, remove password + open_with_credentials from WalletBackend + impl
* rustfmt
* full compilation, changing recovery + init to new model
* rustfmt
* wallet initialisation working, init command output and flow identical to v2.0.0 wallet
* rustfmt
* fix listener and owner api startup
* rustfmt
* rustfmt
* move encryption test
* rustfmt
* fix api doctests
* rustfmt
* fix for most tests in controller crate
* rustfmt
* fix for check tests in controller crate
* fix main wallet tests
* rustfmt
* add explicit functions to handle mnemonic recovery, fix CLI recovery workflow
* rustfmt
* update keybase adapter to use new wallet format
* rustfmt
* test fix
* remove debug output
2019-07-29 15:25:03 +03:00
|
|
|
|
2019-08-19 15:05:21 +03:00
|
|
|
mod types;
|
|
|
|
|
2019-06-27 12:41:05 +03:00
|
|
|
pub use crate::foreign::{Foreign, ForeignCheckMiddleware, ForeignCheckMiddlewareFn};
|
2019-03-14 15:06:03 +03:00
|
|
|
pub use crate::foreign_rpc::ForeignRpc;
|
|
|
|
pub use crate::owner::Owner;
|
|
|
|
pub use crate::owner_rpc::OwnerRpc;
|
2019-08-06 14:50:41 +03:00
|
|
|
pub use crate::owner_rpc_s::OwnerRpcS;
|
2019-03-22 15:03:25 +03:00
|
|
|
|
2019-04-23 13:29:59 +03:00
|
|
|
pub use crate::foreign_rpc::foreign_rpc as foreign_rpc_client;
|
2019-03-26 19:02:31 +03:00
|
|
|
pub use crate::foreign_rpc::run_doctest_foreign;
|
|
|
|
pub use crate::owner_rpc::run_doctest_owner;
|
2019-08-06 14:50:41 +03:00
|
|
|
|
2019-08-19 15:05:21 +03:00
|
|
|
pub use types::{ECDHPubkey, EncryptedRequest, EncryptedResponse, EncryptionErrorResponse, Token};
|