From e0e25a3985422cf41b7356c04efdc5ea2dbd8211 Mon Sep 17 00:00:00 2001 From: 0xh3rman <119309671+0xh3rman@users.noreply.github.com> Date: Fri, 19 Jan 2024 10:22:29 +0800 Subject: [PATCH] short naming crate --- Cargo.lock | 20 +++++++++---------- Cargo.toml | 2 +- blockchain/Cargo.toml | 2 +- blockchain/src/ton/client.rs | 2 +- name_resolver/Cargo.toml | 2 +- name_resolver/src/ton.rs | 4 ++-- {ns_address_codec => naming}/Cargo.toml | 2 +- {ns_address_codec => naming}/README.md | 2 +- {ns_address_codec => naming}/src/codec/mod.rs | 0 {ns_address_codec => naming}/src/ens/mod.rs | 0 {ns_address_codec => naming}/src/lib.rs | 0 {ns_address_codec => naming}/src/ton/mod.rs | 0 12 files changed, 18 insertions(+), 18 deletions(-) rename {ns_address_codec => naming}/Cargo.toml (85%) rename {ns_address_codec => naming}/README.md (90%) rename {ns_address_codec => naming}/src/codec/mod.rs (100%) rename {ns_address_codec => naming}/src/ens/mod.rs (100%) rename {ns_address_codec => naming}/src/lib.rs (100%) rename {ns_address_codec => naming}/src/ton/mod.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 84c1bb53..63750c25 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -534,7 +534,7 @@ dependencies = [ "futures", "hex", "jsonrpsee", - "ns_address_codec", + "naming", "num-bigint", "num-traits", "primitives", @@ -2088,7 +2088,7 @@ dependencies = [ "base64 0.21.7", "hex", "jsonrpsee", - "ns_address_codec", + "naming", "primitives", "reqwest", "serde", @@ -2096,6 +2096,14 @@ dependencies = [ "tokio-test", ] +[[package]] +name = "naming" +version = "1.0.0" +dependencies = [ + "hex", + "ton_smart_contract_address", +] + [[package]] name = "native-tls" version = "0.2.11" @@ -2124,14 +2132,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "ns_address_codec" -version = "1.0.0" -dependencies = [ - "hex", - "ton_smart_contract_address", -] - [[package]] name = "nu-ansi-term" version = "0.46.0" diff --git a/Cargo.toml b/Cargo.toml index 6b7db1aa..5fa7d1b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ members = [ "fiat", "name_resolver", "api_connector", - "ns_address_codec", + "naming", "parser", "setup", "settings", diff --git a/blockchain/Cargo.toml b/blockchain/Cargo.toml index 4d4039b0..f83517aa 100644 --- a/blockchain/Cargo.toml +++ b/blockchain/Cargo.toml @@ -9,7 +9,7 @@ serde = { workspace = true } serde_json = { workspace = true } async-trait = { workspace = true } primitives = { path = "../primitives" } -ns_address_codec = { path = "../ns_address_codec" } +naming = { path = "../naming" } chrono = { workspace = true } hex = { workspace = true } num-bigint = { workspace = true } diff --git a/blockchain/src/ton/client.rs b/blockchain/src/ton/client.rs index a57a016d..0a0d7617 100644 --- a/blockchain/src/ton/client.rs +++ b/blockchain/src/ton/client.rs @@ -3,7 +3,7 @@ use std::error::Error; use crate::ChainProvider; use async_trait::async_trait; use chrono::Utc; -use ns_address_codec::{codec::Codec, ton::TonCodec}; +use naming::{codec::Codec, ton::TonCodec}; use primitives::{chain::Chain, TransactionState, TransactionType}; use reqwest_middleware::ClientWithMiddleware; diff --git a/name_resolver/Cargo.toml b/name_resolver/Cargo.toml index 832ec3b3..3e20c2d0 100644 --- a/name_resolver/Cargo.toml +++ b/name_resolver/Cargo.toml @@ -9,7 +9,7 @@ serde_json = { workspace = true } reqwest = { workspace = true } async-trait = { workspace = true } primitives = { path = "../primitives" } -ns_address_codec = { path = "../ns_address_codec" } +naming = { path = "../naming" } base64 = { workspace = true } jsonrpsee = { workspace = true } hex = { workspace = true } diff --git a/name_resolver/src/ton.rs b/name_resolver/src/ton.rs index 5a94c4bc..7353cca8 100644 --- a/name_resolver/src/ton.rs +++ b/name_resolver/src/ton.rs @@ -1,7 +1,7 @@ use crate::client::NameClient; use async_trait::async_trait; -use ns_address_codec::codec::Codec; -use ns_address_codec::ton; +use naming::codec::Codec; +use naming::ton; use primitives::{ chain::Chain, name::{NameProvider, NameRecord}, diff --git a/ns_address_codec/Cargo.toml b/naming/Cargo.toml similarity index 85% rename from ns_address_codec/Cargo.toml rename to naming/Cargo.toml index ff7820e5..52d12276 100644 --- a/ns_address_codec/Cargo.toml +++ b/naming/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "ns_address_codec" +name = "naming" version = { workspace = true } edition = { workspace = true } diff --git a/ns_address_codec/README.md b/naming/README.md similarity index 90% rename from ns_address_codec/README.md rename to naming/README.md index 2eddd02b..ba85cd2b 100644 --- a/ns_address_codec/README.md +++ b/naming/README.md @@ -1,4 +1,4 @@ -## ns_address_code +## naming Address/Account codec library mainly for Naming Services in Rust diff --git a/ns_address_codec/src/codec/mod.rs b/naming/src/codec/mod.rs similarity index 100% rename from ns_address_codec/src/codec/mod.rs rename to naming/src/codec/mod.rs diff --git a/ns_address_codec/src/ens/mod.rs b/naming/src/ens/mod.rs similarity index 100% rename from ns_address_codec/src/ens/mod.rs rename to naming/src/ens/mod.rs diff --git a/ns_address_codec/src/lib.rs b/naming/src/lib.rs similarity index 100% rename from ns_address_codec/src/lib.rs rename to naming/src/lib.rs diff --git a/ns_address_codec/src/ton/mod.rs b/naming/src/ton/mod.rs similarity index 100% rename from ns_address_codec/src/ton/mod.rs rename to naming/src/ton/mod.rs