Update monero-rpc to v0.3.2
This commit is contained in:
parent
a653b48547
commit
83193beabd
3 changed files with 27 additions and 11 deletions
26
Cargo.lock
generated
26
Cargo.lock
generated
|
@ -907,7 +907,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8"
|
||||
dependencies = [
|
||||
"crunchy",
|
||||
"fixed-hash",
|
||||
"fixed-hash 0.7.0",
|
||||
"impl-rlp",
|
||||
"impl-serde",
|
||||
"tiny-keccak",
|
||||
|
@ -920,7 +920,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf"
|
||||
dependencies = [
|
||||
"ethbloom",
|
||||
"fixed-hash",
|
||||
"fixed-hash 0.7.0",
|
||||
"impl-rlp",
|
||||
"impl-serde",
|
||||
"primitive-types",
|
||||
|
@ -961,6 +961,18 @@ dependencies = [
|
|||
"static_assertions",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fixed-hash"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"rand 0.8.4",
|
||||
"rustc-hex",
|
||||
"static_assertions",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "flate2"
|
||||
version = "1.0.20"
|
||||
|
@ -1782,7 +1794,7 @@ checksum = "8afa5d322a573d345588c3255aaf3316b6a13f3b94f8e776c5ffcde237ec481d"
|
|||
dependencies = [
|
||||
"base58-monero",
|
||||
"curve25519-dalek",
|
||||
"fixed-hash",
|
||||
"fixed-hash 0.7.0",
|
||||
"hex",
|
||||
"hex-literal",
|
||||
"sealed",
|
||||
|
@ -1794,13 +1806,13 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "monero-rpc"
|
||||
version = "0.2.0"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "66a7d67be6fc453829e6e0913f239741b0520a40ff6c7e8300f35444a163d257"
|
||||
checksum = "e016b5ed7dbf76e123516b22f35653a95d8c4b784d2ce2113395863dfd9f482f"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
"fixed-hash",
|
||||
"fixed-hash 0.8.0",
|
||||
"hex",
|
||||
"http",
|
||||
"jsonrpc-core",
|
||||
|
@ -2337,7 +2349,7 @@ version = "0.10.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373"
|
||||
dependencies = [
|
||||
"fixed-hash",
|
||||
"fixed-hash 0.7.0",
|
||||
"impl-codec",
|
||||
"impl-rlp",
|
||||
"impl-serde",
|
||||
|
|
|
@ -47,7 +47,7 @@ blake2 = "0.10.4"
|
|||
mime_guess = "2.0.3"
|
||||
mime-sniffer = "0.1.2"
|
||||
# Used to query Monero node
|
||||
monero-rpc = "0.2.0"
|
||||
monero-rpc = "0.3.2"
|
||||
# Used to determine the number of CPUs on the system
|
||||
num_cpus = "1.13.0"
|
||||
# Used for working with regular expressions
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use monero_rpc::{
|
||||
HashString,
|
||||
RpcClient,
|
||||
RpcClientBuilder,
|
||||
SubaddressBalanceData,
|
||||
SweepAllArgs,
|
||||
TransferPriority,
|
||||
|
@ -42,7 +42,9 @@ pub async fn create_monero_wallet(
|
|||
name: String,
|
||||
password: Option<String>,
|
||||
) -> Result<(), MoneroError> {
|
||||
let wallet_client = RpcClient::new(config.wallet_url.clone()).wallet();
|
||||
let wallet_client = RpcClientBuilder::new()
|
||||
.build(config.wallet_url.clone())?
|
||||
.wallet();
|
||||
let language = "English".to_string();
|
||||
wallet_client.create_wallet(name, password, language).await?;
|
||||
Ok(())
|
||||
|
@ -52,7 +54,9 @@ pub async fn create_monero_wallet(
|
|||
pub async fn open_monero_wallet(
|
||||
config: &MoneroConfig,
|
||||
) -> Result<WalletClient, MoneroError> {
|
||||
let wallet_client = RpcClient::new(config.wallet_url.clone()).wallet();
|
||||
let wallet_client = RpcClientBuilder::new()
|
||||
.build(config.wallet_url.clone())?
|
||||
.wallet();
|
||||
if let Some(ref wallet_name) = config.wallet_name {
|
||||
wallet_client.open_wallet(
|
||||
wallet_name.clone(),
|
||||
|
|
Loading…
Reference in a new issue