From fca75cceecef481cd209290f31c776e5ab2db25c Mon Sep 17 00:00:00 2001 From: despiegk Date: Tue, 13 May 2025 07:05:19 +0300 Subject: [PATCH] ... --- src/rhai/vault.rs | 6 +++--- src/vault/README.md | 2 +- src/vault/ethereum/README.md | 2 +- src/vault/ethereum/provider.rs | 2 +- src/vault/ethereum/storage.rs | 8 ++++---- src/vault/keypair/README.md | 8 ++++---- src/vault/kvs/README.md | 2 +- src/vault/kvs/indexed_db_store.rs | 2 +- src/vault/kvs/key_space.rs | 4 ++-- src/vault/kvs/slate_store.rs | 2 +- src/vault/symmetric/README.md | 2 +- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/rhai/vault.rs b/src/rhai/vault.rs index 6fc1b63..77da943 100644 --- a/src/rhai/vault.rs +++ b/src/rhai/vault.rs @@ -10,9 +10,9 @@ use ethers::types::{Address, U256}; use std::str::FromStr; use cfg_if::cfg_if; -use crate::hero_vault::{keypair, symmetric, ethereum, kvs}; -use crate::hero_vault::kvs::{KVStore, DefaultStore}; -use crate::hero_vault::ethereum::prepare_function_arguments; +use crate::vault::{keypair, symmetric, ethereum, kvs}; +use crate::vault::kvs::{KVStore, DefaultStore}; +use crate::vault::ethereum::prepare_function_arguments; // Global Tokio runtime for blocking async operations static RUNTIME: Lazy> = Lazy::new(|| { diff --git a/src/vault/README.md b/src/vault/README.md index 28a3f1b..13c0719 100644 --- a/src/vault/README.md +++ b/src/vault/README.md @@ -157,4 +157,4 @@ The module supports multiple Ethereum networks, including: ## Examples -For examples of how to use the Hero Vault module, see the `examples/hero_vault` directory. +For examples of how to use the Hero Vault module, see the `examples/vault` directory. diff --git a/src/vault/ethereum/README.md b/src/vault/ethereum/README.md index 6fa05c4..1d7c9dc 100644 --- a/src/vault/ethereum/README.md +++ b/src/vault/ethereum/README.md @@ -189,7 +189,7 @@ The module uses the `CryptoError` type for handling errors that can occur during ## Examples -For examples of how to use the Ethereum module, see the `examples/hero_vault` directory, particularly: +For examples of how to use the Ethereum module, see the `examples/vault` directory, particularly: - `contract_example.rhai` - Demonstrates loading a contract ABI and interacting with smart contracts - `agung_simple_transfer.rhai` - Shows how to perform a simple ETH transfer on the Agung network diff --git a/src/vault/ethereum/provider.rs b/src/vault/ethereum/provider.rs index 5581fac..5d3a04c 100644 --- a/src/vault/ethereum/provider.rs +++ b/src/vault/ethereum/provider.rs @@ -2,7 +2,7 @@ use ethers::prelude::*; -use crate::hero_vault::error::CryptoError; +use crate::vault::error::CryptoError; use super::networks; /// Creates a provider for a specific network. diff --git a/src/vault/ethereum/storage.rs b/src/vault/ethereum/storage.rs index 9f2a8d3..e90f6e8 100644 --- a/src/vault/ethereum/storage.rs +++ b/src/vault/ethereum/storage.rs @@ -9,8 +9,8 @@ use tokio::runtime::Runtime; use ethers::types::Address; use std::str::FromStr; -use crate::hero_vault::error::CryptoError; -use crate::hero_vault::kvs::{self, KVStore, DefaultStore}; +use crate::vault::error::CryptoError; +use crate::vault::kvs::{self, KVStore, DefaultStore}; use super::wallet::EthereumWallet; use super::networks; @@ -190,7 +190,7 @@ fn load_wallets() -> Vec { /// Creates an Ethereum wallet from the currently selected keypair. pub fn create_ethereum_wallet() -> Result { // Get the currently selected keypair - let keypair = crate::hero_vault::keypair::get_selected_keypair()?; + let keypair = crate::vault::keypair::get_selected_keypair()?; // Create an Ethereum wallet from the keypair let wallet = EthereumWallet::from_keypair(&keypair)?; @@ -206,7 +206,7 @@ pub fn create_ethereum_wallet() -> Result { /// Creates an Ethereum wallet from a name and the currently selected keypair. pub fn create_ethereum_wallet_from_name(name: &str) -> Result { // Get the currently selected keypair - let keypair = crate::hero_vault::keypair::get_selected_keypair()?; + let keypair = crate::vault::keypair::get_selected_keypair()?; // Create an Ethereum wallet from the name and keypair let wallet = EthereumWallet::from_name_and_keypair(name, &keypair)?; diff --git a/src/vault/keypair/README.md b/src/vault/keypair/README.md index 4cfb15d..7a44fde 100644 --- a/src/vault/keypair/README.md +++ b/src/vault/keypair/README.md @@ -220,14 +220,14 @@ To include the Hero Vault Keypair module in your Rust project, add the following ```toml [dependencies] -hero_vault = "0.1.0" # Replace with the actual version +vault = "0.1.0" # Replace with the actual version ``` Then, you can import and use the module in your Rust code: ```rust -use hero_vault::vault::keypair::{KeySpace, KeyPair}; -use hero_vault::vault::error::CryptoError; +use vault::vault::keypair::{KeySpace, KeyPair}; +use vault::vault::error::CryptoError; ``` ## Testing @@ -263,7 +263,7 @@ The module uses the `CryptoError` type for handling errors that can occur during ## Examples -For examples of how to use the Keypair module, see the `examples/hero_vault` directory, particularly: +For examples of how to use the Keypair module, see the `examples/vault` directory, particularly: - `example.rhai` - Basic example demonstrating key management and signing - `advanced_example.rhai` - Advanced example with error handling diff --git a/src/vault/kvs/README.md b/src/vault/kvs/README.md index 431a24c..6ffd360 100644 --- a/src/vault/kvs/README.md +++ b/src/vault/kvs/README.md @@ -143,7 +143,7 @@ The module uses the `CryptoError` type for handling errors that can occur during ## Examples -For examples of how to use the KVS module, see the `examples/hero_vault` directory. While there may not be specific examples for the KVS module, the general pattern of usage is similar to the key space management examples. +For examples of how to use the KVS module, see the `examples/vault` directory. While there may not be specific examples for the KVS module, the general pattern of usage is similar to the key space management examples. A basic usage example: diff --git a/src/vault/kvs/indexed_db_store.rs b/src/vault/kvs/indexed_db_store.rs index f8250dd..dcb905e 100644 --- a/src/vault/kvs/indexed_db_store.rs +++ b/src/vault/kvs/indexed_db_store.rs @@ -1,6 +1,6 @@ //! IndexedDB-backed key-value store implementation for WebAssembly. -use crate::hero_vault::kvs::error::{KvsError, Result}; +use crate::vault::kvs::error::{KvsError, Result}; use serde::{de::DeserializeOwned, Serialize}; use std::sync::{Arc, Mutex}; use cfg_if::cfg_if; diff --git a/src/vault/kvs/key_space.rs b/src/vault/kvs/key_space.rs index a3e678e..f7176e3 100644 --- a/src/vault/kvs/key_space.rs +++ b/src/vault/kvs/key_space.rs @@ -1,7 +1,7 @@ //! Key space management functionality for KVStore -use crate::hero_vault::kvs::{KVStore, Result}; -use crate::hero_vault::{keypair, symmetric}; +use crate::vault::kvs::{KVStore, Result}; +use crate::vault::{keypair, symmetric}; use std::path::PathBuf; const KEY_SPACE_STORE_NAME: &str = "key-spaces"; diff --git a/src/vault/kvs/slate_store.rs b/src/vault/kvs/slate_store.rs index 5779128..8e1edad 100644 --- a/src/vault/kvs/slate_store.rs +++ b/src/vault/kvs/slate_store.rs @@ -1,6 +1,6 @@ //! SlateDB-backed key-value store implementation. -use crate::hero_vault::kvs::error::{KvsError, Result}; +use crate::vault::kvs::error::{KvsError, Result}; use std::path::PathBuf; use std::sync::{Arc, Mutex}; use serde::{de::DeserializeOwned, Serialize}; diff --git a/src/vault/symmetric/README.md b/src/vault/symmetric/README.md index 18359ec..246e3a2 100644 --- a/src/vault/symmetric/README.md +++ b/src/vault/symmetric/README.md @@ -92,7 +92,7 @@ The module uses the `CryptoError` type for handling errors that can occur during ## Examples -For examples of how to use the Symmetric Encryption module, see the `examples/hero_vault` directory, particularly: +For examples of how to use the Symmetric Encryption module, see the `examples/vault` directory, particularly: - `example.rhai` - Basic example demonstrating symmetric encryption - `advanced_example.rhai` - Advanced example with error handling