Skip to content

Commit

Permalink
Separated an SDK crate out of the shared crate.
Browse files Browse the repository at this point in the history
  • Loading branch information
murisi committed Oct 12, 2023
1 parent 615ebc8 commit 17c3e6c
Show file tree
Hide file tree
Showing 78 changed files with 2,003 additions and 1,672 deletions.
51 changes: 51 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ members = [
"macros",
"vp_prelude",
"encoding_spec",
"sdk",
]

# wasm packages have to be built separately
Expand Down
3 changes: 2 additions & 1 deletion apps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ mainnet = [
"namada/mainnet",
]
dev = ["namada/dev"]
std = ["ed25519-consensus/std", "rand/std", "rand_core/std", "namada/std"]
std = ["ed25519-consensus/std", "rand/std", "rand_core/std", "namada/std", "namada_sdk/std"]
# for integration tests and test utilies
testing = ["dev"]

Expand All @@ -67,6 +67,7 @@ abciplus = [

[dependencies]
namada = {path = "../shared", features = ["ferveo-tpke", "masp-tx-gen", "multicore", "http-client"]}
namada_sdk = {path = "../sdk", default-features = false, features = ["wasm-runtime", "masp-tx-gen"]}
ark-serialize.workspace = true
ark-std.workspace = true
arse-merkle-tree = { workspace = true, features = ["blake2b"] }
Expand Down
2 changes: 1 addition & 1 deletion apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2517,7 +2517,6 @@ pub mod args {
use std::str::FromStr;

use namada::ibc::core::ics24_host::identifier::{ChannelId, PortId};
pub use namada::sdk::args::*;
use namada::types::address::Address;
use namada::types::chain::{ChainId, ChainIdPrefix};
use namada::types::dec::Dec;
Expand All @@ -2530,6 +2529,7 @@ pub mod args {
use namada::types::token;
use namada::types::token::NATIVE_MAX_DECIMAL_PLACES;
use namada::types::transaction::GasLimit;
pub use namada_sdk::args::*;

use super::context::*;
use super::utils::*;
Expand Down
4 changes: 2 additions & 2 deletions apps/src/lib/cli/api.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use namada::sdk::queries::Client;
use namada::sdk::rpc::wait_until_node_is_synched;
use namada::tendermint_rpc::HttpClient;
use namada::types::control_flow::Halt;
use namada::types::io::Io;
use namada_sdk::queries::Client;
use namada_sdk::rpc::wait_until_node_is_synched;
use tendermint_config::net::Address as TendermintAddress;

use crate::client::utils;
Expand Down
5 changes: 2 additions & 3 deletions apps/src/lib/cli/client.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use color_eyre::eyre::{eyre, Report, Result};
use namada::ledger::{Namada, NamadaImpl};
use namada::sdk::signing;
use namada::sdk::tx::dump_tx;
use namada::types::control_flow::ProceedOrElse;
use namada::types::io::Io;
use namada_sdk::tx::dump_tx;
use namada_sdk::{signing, Namada, NamadaImpl};

use crate::cli;
use crate::cli::api::{CliApi, CliClient};
Expand Down
8 changes: 4 additions & 4 deletions apps/src/lib/cli/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ use std::path::{Path, PathBuf};
use std::str::FromStr;

use color_eyre::eyre::Result;
use namada::ledger::{Namada, NamadaImpl};
use namada::sdk::masp::fs::FsShieldedUtils;
use namada::sdk::masp::ShieldedContext;
use namada::sdk::wallet::Wallet;
use namada::types::address::{Address, InternalAddress};
use namada::types::chain::ChainId;
use namada::types::ethereum_events::EthAddress;
use namada::types::io::Io;
use namada::types::key::*;
use namada::types::masp::*;
use namada_sdk::masp::fs::FsShieldedUtils;
use namada_sdk::masp::ShieldedContext;
use namada_sdk::wallet::Wallet;
use namada_sdk::{Namada, NamadaImpl};

use super::args;
#[cfg(any(test, feature = "dev"))]
Expand Down
2 changes: 1 addition & 1 deletion apps/src/lib/cli/relayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use std::sync::Arc;

use color_eyre::eyre::{eyre, Report, Result};
use namada::eth_bridge::ethers::providers::{Http, Provider};
use namada::ledger::eth_bridge::{bridge_pool, validator_set};
use namada::types::control_flow::ProceedOrElse;
use namada::types::io::Io;
use namada_sdk::eth_bridge::{bridge_pool, validator_set};

use crate::cli;
use crate::cli::api::{CliApi, CliClient};
Expand Down
12 changes: 6 additions & 6 deletions apps/src/lib/cli/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ use borsh::BorshSerialize;
use color_eyre::eyre::Result;
use itertools::sorted;
use masp_primitives::zip32::ExtendedFullViewingKey;
use namada::sdk::masp::find_valid_diversifier;
use namada::sdk::wallet::{
DecryptionError, FindKeyError, GenRestoreKeyError, Wallet, WalletIo,
WalletStorage,
};
use namada::types::io::Io;
use namada::types::key::*;
use namada::types::masp::{MaspValue, PaymentAddress};
use namada::{display, display_line, edisplay_line};
use namada_sdk::masp::find_valid_diversifier;
use namada_sdk::wallet::{
DecryptionError, FindKeyError, GenRestoreKeyError, Wallet, WalletIo,
WalletStorage,
};
use namada_sdk::{display, display_line, edisplay_line};
use rand::RngCore;
use rand_core::OsRng;

Expand Down
Loading

0 comments on commit 17c3e6c

Please sign in to comment.