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