dependency change for neptuneprivacy

This commit is contained in:
Pham Minh 2025-11-27 13:59:19 +07:00
parent 8f900fd70a
commit 257330cc1b
22 changed files with 126 additions and 126 deletions

112
Cargo.lock generated
View File

@ -1927,9 +1927,47 @@ dependencies = [
] ]
[[package]] [[package]]
name = "neptune-cash" name = "neptune-explorer"
version = "0.4.0" version = "0.1.0"
source = "git+https://github.com/Neptune-Crypto/neptune-core.git?rev=71f471a526a13ddd41ab4400e1a873471d03ede6#71f471a526a13ddd41ab4400e1a873471d03ede6" dependencies = [
"anyhow",
"arbitrary",
"arc-swap",
"axum 0.7.9",
"blake3",
"boilerplate",
"chrono",
"clap",
"derive_more",
"env_logger",
"futures",
"html-escaper",
"indexmap 2.12.0",
"lettre",
"log",
"neptune-privacy",
"proptest",
"proptest-arbitrary-interop",
"rand 0.9.2",
"readonly",
"regex",
"reqwest",
"serde",
"serde_json",
"tarpc",
"test-strategy",
"thiserror 1.0.69",
"tokio",
"tower-http 0.5.2",
"tracing",
"tracing-subscriber",
"url",
]
[[package]]
name = "neptune-privacy"
version = "0.1.0"
source = "git+https://git.softly.com/Softly/tuna?rev=602667d9ee1c1fbcd7739c78e8816062f2645a5f#602667d9ee1c1fbcd7739c78e8816062f2645a5f"
dependencies = [ dependencies = [
"aead", "aead",
"aes-gcm", "aes-gcm",
@ -1953,7 +1991,6 @@ dependencies = [
"itertools 0.11.0", "itertools 0.11.0",
"leveldb-sys", "leveldb-sys",
"memmap2", "memmap2",
"neptune-rpc-macros",
"num-bigint", "num-bigint",
"num-rational", "num-rational",
"num-traits", "num-traits",
@ -1985,57 +2022,10 @@ dependencies = [
"tracing", "tracing",
"tracing-subscriber", "tracing-subscriber",
"tracing-test", "tracing-test",
"xnt-rpc-macros",
"zeroize", "zeroize",
] ]
[[package]]
name = "neptune-explorer"
version = "0.1.0"
dependencies = [
"anyhow",
"arbitrary",
"arc-swap",
"axum 0.7.9",
"blake3",
"boilerplate",
"chrono",
"clap",
"derive_more",
"env_logger",
"futures",
"html-escaper",
"indexmap 2.12.0",
"lettre",
"log",
"neptune-cash",
"proptest",
"proptest-arbitrary-interop",
"rand 0.9.2",
"readonly",
"regex",
"reqwest",
"serde",
"serde_json",
"tarpc",
"test-strategy",
"thiserror 1.0.69",
"tokio",
"tower-http 0.5.2",
"tracing",
"tracing-subscriber",
"url",
]
[[package]]
name = "neptune-rpc-macros"
version = "0.4.0"
source = "git+https://github.com/Neptune-Crypto/neptune-core.git?rev=71f471a526a13ddd41ab4400e1a873471d03ede6#71f471a526a13ddd41ab4400e1a873471d03ede6"
dependencies = [
"convert_case",
"quote",
"syn 2.0.108",
]
[[package]] [[package]]
name = "new_mime_guess" name = "new_mime_guess"
version = "4.0.4" version = "4.0.4"
@ -3017,9 +3007,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_tuple" name = "serde_tuple"
version = "1.1.2" version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52569c5296679bd28e2457f067f97d270077df67da0340647da5412c8eac8d9e" checksum = "6af196b9c06f0aa5555ab980c01a2527b0f67517da8d68b1731b9d4764846a6f"
dependencies = [ dependencies = [
"serde", "serde",
"serde_tuple_macros", "serde_tuple_macros",
@ -3027,9 +3017,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_tuple_macros" name = "serde_tuple_macros"
version = "1.1.2" version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f46c707781471741d5f2670edb36476479b26e94cf43efe21ca3c220b97ef2e" checksum = "ec3a1e7d2eadec84deabd46ae061bf480a91a6bce74d25dad375bd656f2e19d8"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -4539,6 +4529,16 @@ version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb"
[[package]]
name = "xnt-rpc-macros"
version = "0.1.0"
source = "git+https://git.softly.com/Softly/tuna?rev=602667d9ee1c1fbcd7739c78e8816062f2645a5f#602667d9ee1c1fbcd7739c78e8816062f2645a5f"
dependencies = [
"convert_case",
"quote",
"syn 2.0.108",
]
[[package]] [[package]]
name = "yoke" name = "yoke"
version = "0.8.0" version = "0.8.0"

View File

@ -24,7 +24,7 @@ tokio = { version = "1.48.0", features = ["full", "tracing"] }
tracing = "0.1" tracing = "0.1"
tracing-subscriber = "0.3" tracing-subscriber = "0.3"
neptune-cash = "0.4.0" neptune-privacy = "0.1.0"
tarpc = { version = "^0.34", features = [ tarpc = { version = "^0.34", features = [
"tokio1", "tokio1",
"serde-transport", "serde-transport",
@ -64,7 +64,7 @@ arbitrary = "1.4.2"
proptest-arbitrary-interop = "0.1.0" proptest-arbitrary-interop = "0.1.0"
[patch.crates-io] [patch.crates-io]
neptune-cash = { git = "https://github.com/Neptune-Crypto/neptune-core.git", rev = "71f471a526a13ddd41ab4400e1a873471d03ede6" } neptune-privacy = { git = "https://git.softly.com/Softly/tuna", rev = "602667d9ee1c1fbcd7739c78e8816062f2645a5f" }
[features] [features]
mock = ["dep:blake3", "dep:rand"] mock = ["dep:blake3", "dep:rand"]

View File

@ -19,7 +19,7 @@ sudo apt install pkg-config libssl-dev
Then Then
``` ```
git clone https://github.com/Neptune-Crypto/neptune-explorer.git git clone https://github.com/neptuneprivacy/neptune-explorer.git
cd neptune-explorer cd neptune-explorer
cargo install --locked --path . cargo install --locked --path .
``` ```
@ -30,7 +30,7 @@ not tested or supported. Please let us know if you get it work. patches accep
## Running ## Running
1. install [neptune-core](https://github.com/Neptune-Crypto/neptune-core) and start it, or otherwise find a running neptune-core instance. 1. install [xnt-core](https://github.com/neptuneprivacy/xnt-core) and start it, or otherwise find a running xnt-core instance.
2. start neptune-explorer 2. start neptune-explorer
``` ```

View File

@ -8,11 +8,11 @@ use axum::response::Html;
use axum::response::Response; use axum::response::Response;
use html_escaper::Escape; use html_escaper::Escape;
use html_escaper::Trusted; use html_escaper::Trusted;
use neptune_cash::api::export::BlockHeight; use neptune_privacy::api::export::BlockHeight;
use neptune_cash::prelude::tasm_lib::prelude::Digest; use neptune_privacy::prelude::tasm_lib::prelude::Digest;
use neptune_cash::prelude::triton_vm::prelude::BFieldCodec; use neptune_privacy::prelude::triton_vm::prelude::BFieldCodec;
use neptune_cash::prelude::twenty_first::tip5::Tip5; use neptune_privacy::prelude::twenty_first::tip5::Tip5;
use neptune_cash::util_types::mutator_set::addition_record::AdditionRecord; use neptune_privacy::util_types::mutator_set::addition_record::AdditionRecord;
use tarpc::context; use tarpc::context;
use crate::html::component::header::HeaderHtml; use crate::html::component::header::HeaderHtml;

View File

@ -7,7 +7,7 @@ use axum::response::Html;
use axum::response::Response; use axum::response::Response;
use html_escaper::Escape; use html_escaper::Escape;
use html_escaper::Trusted; use html_escaper::Trusted;
use neptune_cash::protocol::consensus::block::block_info::BlockInfo; use neptune_privacy::protocol::consensus::block::block_info::BlockInfo;
use tarpc::context; use tarpc::context;
use crate::html::component::header::HeaderHtml; use crate::html::component::header::HeaderHtml;

View File

@ -4,7 +4,7 @@ use axum::extract::State;
use axum::response::Html; use axum::response::Html;
use axum::response::Response; use axum::response::Response;
use html_escaper::Escape; use html_escaper::Escape;
use neptune_cash::api::export::BlockHeight; use neptune_privacy::api::export::BlockHeight;
use tarpc::context; use tarpc::context;
use crate::html::page::not_found::not_found_html_response; use crate::html::page::not_found::not_found_html_response;

View File

@ -7,8 +7,8 @@ use axum::response::Html;
use axum::response::Response; use axum::response::Response;
use html_escaper::Escape; use html_escaper::Escape;
use html_escaper::Trusted; use html_escaper::Trusted;
use neptune_cash::api::export::Tip5; use neptune_privacy::api::export::Tip5;
use neptune_cash::prelude::tasm_lib::prelude::Digest; use neptune_privacy::prelude::tasm_lib::prelude::Digest;
use tarpc::context; use tarpc::context;
use crate::html::component::header::HeaderHtml; use crate::html::component::header::HeaderHtml;

View File

@ -2,7 +2,7 @@ use axum::http::StatusCode;
use axum::response::Html; use axum::response::Html;
use axum::response::IntoResponse; use axum::response::IntoResponse;
use axum::response::Response; use axum::response::Response;
use neptune_cash::application::rpc::server::error::RpcError; use neptune_privacy::application::rpc::server::error::RpcError;
use tarpc::client::RpcError as TarpcError; use tarpc::client::RpcError as TarpcError;
// note: http StatusCodes are defined at: // note: http StatusCodes are defined at:

View File

@ -1,10 +1,10 @@
use std::fmt::Display; use std::fmt::Display;
use std::str::FromStr; use std::str::FromStr;
use neptune_cash::api::export::BlockHeight; use neptune_privacy::api::export::BlockHeight;
use neptune_cash::prelude::tasm_lib::prelude::Digest; use neptune_privacy::prelude::tasm_lib::prelude::Digest;
use neptune_cash::protocol::consensus::block::block_selector::BlockSelector; use neptune_privacy::protocol::consensus::block::block_selector::BlockSelector;
use neptune_cash::protocol::consensus::block::block_selector::BlockSelectorLiteral; use neptune_privacy::protocol::consensus::block::block_selector::BlockSelectorLiteral;
use serde::de::Error; use serde::de::Error;
use serde::Deserialize; use serde::Deserialize;
use serde::Deserializer; use serde::Deserializer;
@ -35,13 +35,13 @@ pub enum AnnouncementSelectorParseError {
#[error("error parsing index for announcement in block {0}: {1}")] #[error("error parsing index for announcement in block {0}: {1}")]
HeightIndex(BlockHeight, std::num::ParseIntError), HeightIndex(BlockHeight, std::num::ParseIntError),
#[error("error parsing digest: {0}")] #[error("error parsing digest: {0}")]
BlockDigest(neptune_cash::prelude::twenty_first::error::TryFromHexDigestError), BlockDigest(neptune_privacy::prelude::twenty_first::error::TryFromHexDigestError),
#[error("error parsing index for announcement in block {0}: {1}")] #[error("error parsing index for announcement in block {0}: {1}")]
DigestIndex(Digest, std::num::ParseIntError), DigestIndex(Digest, std::num::ParseIntError),
#[error("error parsing block-height-or-digest: {0} / {1}")] #[error("error parsing block-height-or-digest: {0} / {1}")]
HeightNorDigest( HeightNorDigest(
std::num::ParseIntError, std::num::ParseIntError,
neptune_cash::prelude::twenty_first::error::TryFromHexDigestError, neptune_privacy::prelude::twenty_first::error::TryFromHexDigestError,
), ),
#[error("error parsing index for block-height-or-digest {0}: {1}")] #[error("error parsing index for block-height-or-digest {0}: {1}")]
HeightOrDigestIndex(BlockSelector, std::num::ParseIntError), HeightOrDigestIndex(BlockSelector, std::num::ParseIntError),

View File

@ -1,6 +1,6 @@
use neptune_cash::api::export::Announcement; use neptune_privacy::api::export::Announcement;
use neptune_cash::api::export::TransparentTransactionInfo; use neptune_privacy::api::export::TransparentTransactionInfo;
use neptune_cash::prelude::triton_vm::prelude::BFieldElement; use neptune_privacy::prelude::triton_vm::prelude::BFieldElement;
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub enum AnnouncementType { pub enum AnnouncementType {

View File

@ -3,10 +3,10 @@ use std::sync::Arc;
use anyhow::Context; use anyhow::Context;
use arc_swap::ArcSwap; use arc_swap::ArcSwap;
use clap::Parser; use clap::Parser;
use neptune_cash::api::export::Network; use neptune_privacy::api::export::Network;
use neptune_cash::application::rpc::auth; use neptune_privacy::application::rpc::auth;
use neptune_cash::prelude::twenty_first::tip5::Digest; use neptune_privacy::prelude::twenty_first::tip5::Digest;
use neptune_cash::protocol::consensus::block::block_selector::{ use neptune_privacy::protocol::consensus::block::block_selector::{
BlockSelector, BlockSelectorLiteral, BlockSelector, BlockSelectorLiteral,
}; };
use tokio::sync::Mutex; use tokio::sync::Mutex;

View File

@ -1,11 +1,11 @@
use std::num::ParseIntError; use std::num::ParseIntError;
use std::str::FromStr; use std::str::FromStr;
use neptune_cash::api::export::BlockHeight; use neptune_privacy::api::export::BlockHeight;
use neptune_cash::api::export::Digest; use neptune_privacy::api::export::Digest;
use neptune_cash::prelude::triton_vm::prelude::BFieldElement; use neptune_privacy::prelude::triton_vm::prelude::BFieldElement;
use neptune_cash::protocol::consensus::block::block_selector::BlockSelector; use neptune_privacy::protocol::consensus::block::block_selector::BlockSelector;
use neptune_cash::protocol::consensus::block::block_selector::BlockSelectorParseError; use neptune_privacy::protocol::consensus::block::block_selector::BlockSelectorParseError;
use serde::de::Error; use serde::de::Error;
use serde::Deserialize; use serde::Deserialize;
use serde::Deserializer; use serde::Deserializer;

View File

@ -1,9 +1,9 @@
use std::str::FromStr; use std::str::FromStr;
use neptune_cash::api::export::BlockHeight; use neptune_privacy::api::export::BlockHeight;
use neptune_cash::prelude::tasm_lib::prelude::Digest; use neptune_privacy::prelude::tasm_lib::prelude::Digest;
use neptune_cash::protocol::consensus::block::block_selector::BlockSelector; use neptune_privacy::protocol::consensus::block::block_selector::BlockSelector;
use neptune_cash::protocol::consensus::block::block_selector::BlockSelectorParseError; use neptune_privacy::protocol::consensus::block::block_selector::BlockSelectorParseError;
use serde::Deserialize; use serde::Deserialize;
use serde::Serialize; use serde::Serialize;

View File

@ -1,8 +1,8 @@
use neptune_cash::api::export::AdditionRecord; use neptune_privacy::api::export::AdditionRecord;
use neptune_cash::api::export::Digest; use neptune_privacy::api::export::Digest;
use neptune_cash::api::export::TransparentInput; use neptune_privacy::api::export::TransparentInput;
use neptune_cash::api::export::Utxo; use neptune_privacy::api::export::Utxo;
use neptune_cash::api::export::UtxoTriple; use neptune_privacy::api::export::UtxoTriple;
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct TransparentUtxoTuple { pub struct TransparentUtxoTuple {

View File

@ -7,18 +7,18 @@ use chrono::DateTime;
use chrono::TimeDelta; use chrono::TimeDelta;
use chrono::Utc; use chrono::Utc;
use clap::Parser; use clap::Parser;
use neptune_cash::api::export::Announcement; use neptune_privacy::api::export::Announcement;
use neptune_cash::api::export::Network; use neptune_privacy::api::export::Network;
use neptune_cash::application::config::data_directory::DataDirectory; use neptune_privacy::application::config::data_directory::DataDirectory;
use neptune_cash::application::rpc::auth; use neptune_privacy::application::rpc::auth;
use neptune_cash::application::rpc::server::error::RpcError; use neptune_privacy::application::rpc::server::error::RpcError;
use neptune_cash::application::rpc::server::RPCClient; use neptune_privacy::application::rpc::server::RPCClient;
use neptune_cash::application::rpc::server::RpcResult; use neptune_privacy::application::rpc::server::RpcResult;
use neptune_cash::prelude::tasm_lib::prelude::Digest; use neptune_privacy::prelude::tasm_lib::prelude::Digest;
use neptune_cash::protocol::consensus::block::block_height::BlockHeight; use neptune_privacy::protocol::consensus::block::block_height::BlockHeight;
use neptune_cash::protocol::consensus::block::block_info::BlockInfo; use neptune_privacy::protocol::consensus::block::block_info::BlockInfo;
use neptune_cash::protocol::consensus::block::block_selector::BlockSelector; use neptune_privacy::protocol::consensus::block::block_selector::BlockSelector;
use neptune_cash::util_types::mutator_set::addition_record::AdditionRecord; use neptune_privacy::util_types::mutator_set::addition_record::AdditionRecord;
use tarpc::client; use tarpc::client;
use tarpc::context; use tarpc::context;
use tarpc::tokio_serde::formats::Json as RpcJson; use tarpc::tokio_serde::formats::Json as RpcJson;
@ -146,8 +146,8 @@ impl AuthenticatedClient {
#[cfg(feature = "mock")] #[cfg(feature = "mock")]
if std::env::var(MOCK_KEY).is_ok() { if std::env::var(MOCK_KEY).is_ok() {
use blake3::Hasher; use blake3::Hasher;
use neptune_cash::api::export::TransparentTransactionInfo; use neptune_privacy::api::export::TransparentTransactionInfo;
use neptune_cash::prelude::triton_vm::prelude::BFieldElement; use neptune_privacy::prelude::triton_vm::prelude::BFieldElement;
use rand::rngs::StdRng; use rand::rngs::StdRng;
use rand::Rng; use rand::Rng;
use rand::SeedableRng; use rand::SeedableRng;

View File

@ -4,7 +4,7 @@ use axum::extract::Path;
use axum::extract::State; use axum::extract::State;
use axum::response::IntoResponse; use axum::response::IntoResponse;
use axum::response::Json; use axum::response::Json;
use neptune_cash::prelude::twenty_first::tip5::Digest; use neptune_privacy::prelude::twenty_first::tip5::Digest;
use tarpc::context; use tarpc::context;
use crate::http_util::not_found_err; use crate::http_util::not_found_err;

View File

@ -4,7 +4,7 @@ use axum::extract::Path;
use axum::extract::State; use axum::extract::State;
use axum::response::Json; use axum::response::Json;
use axum::response::Response; use axum::response::Response;
use neptune_cash::protocol::consensus::block::block_info::BlockInfo; use neptune_privacy::protocol::consensus::block::block_info::BlockInfo;
use tarpc::context; use tarpc::context;
use crate::http_util::not_found_err; use crate::http_util::not_found_err;

View File

@ -4,9 +4,9 @@ use axum::extract::Path;
use axum::extract::State; use axum::extract::State;
use axum::response::IntoResponse; use axum::response::IntoResponse;
use axum::response::Json; use axum::response::Json;
use neptune_cash::application::rpc::server::error::RpcError; use neptune_privacy::application::rpc::server::error::RpcError;
use neptune_cash::application::rpc::server::proof_of_work_puzzle::ProofOfWorkPuzzle; use neptune_privacy::application::rpc::server::proof_of_work_puzzle::ProofOfWorkPuzzle;
use neptune_cash::state::wallet::address::generation_address::GenerationReceivingAddress; use neptune_privacy::state::wallet::address::generation_address::GenerationReceivingAddress;
use tarpc::context; use tarpc::context;
use crate::http_util::not_found_err; use crate::http_util::not_found_err;

View File

@ -3,8 +3,8 @@ use std::sync::Arc;
use axum::extract::State; use axum::extract::State;
use axum::response::Json; use axum::response::Json;
use axum::response::Response; use axum::response::Response;
use neptune_cash::prelude::twenty_first::tip5::Digest; use neptune_privacy::prelude::twenty_first::tip5::Digest;
use neptune_cash::protocol::consensus::block::block_header::BlockPow; use neptune_privacy::protocol::consensus::block::block_header::BlockPow;
use serde::Deserialize; use serde::Deserialize;
use serde::Serialize; use serde::Serialize;
use tarpc::context; use tarpc::context;

View File

@ -4,7 +4,7 @@ use axum::extract::Path;
use axum::extract::State; use axum::extract::State;
use axum::response::IntoResponse; use axum::response::IntoResponse;
use axum::response::Json; use axum::response::Json;
use neptune_cash::prelude::twenty_first::tip5::Digest; use neptune_privacy::prelude::twenty_first::tip5::Digest;
use tarpc::context; use tarpc::context;
use crate::http_util::not_found_err; use crate::http_util::not_found_err;

View File

@ -1,9 +1,9 @@
use neptune_cash::api::export::BlockHeight; use neptune_privacy::api::export::BlockHeight;
use neptune_cash::api::export::NativeCurrencyAmount; use neptune_privacy::api::export::NativeCurrencyAmount;
use neptune_cash::protocol::consensus::block::block_height::BLOCKS_PER_GENERATION; use neptune_privacy::protocol::consensus::block::block_height::BLOCKS_PER_GENERATION;
use neptune_cash::protocol::consensus::block::block_height::NUM_BLOCKS_SKIPPED_BECAUSE_REBOOT; use neptune_privacy::protocol::consensus::block::block_height::NUM_BLOCKS_SKIPPED_BECAUSE_REBOOT;
use neptune_cash::protocol::consensus::block::Block; use neptune_privacy::protocol::consensus::block::Block;
use neptune_cash::protocol::consensus::block::PREMINE_MAX_SIZE; use neptune_privacy::protocol::consensus::block::PREMINE_MAX_SIZE;
/// Return the pair (liquid supply, total supply) /// Return the pair (liquid supply, total supply)
/// ///

View File

@ -148,7 +148,7 @@
</main> </main>
<footer class="container" style="margin-top: 2em; font-size: 0.9em; text-align: center;"> <footer class="container" style="margin-top: 2em; font-size: 0.9em; text-align: center;">
<a href="https://github.com/Neptune-Crypto/neptune-explorer" target="_blank">Source code</a> <a href="https://github.com/neptuneprivacy/neptune-explorer" target="_blank">Source code</a>
</footer> </footer>
</body> </body>