mirror of
https://github.com/serai-dex/serai.git
synced 2024-12-23 20:19:24 +00:00
13 lines
340 B
Rust
13 lines
340 B
Rust
use serde_json::json;
|
|
|
|
use monero_serai::rpc::{EmptyResponse, RpcError, Rpc};
|
|
|
|
pub async fn mine_block(rpc: &Rpc, address: String) -> Result<EmptyResponse, RpcError> {
|
|
rpc.rpc_call("json_rpc", Some(json!({
|
|
"method": "generateblocks",
|
|
"params": {
|
|
"wallet_address": address,
|
|
"amount_of_blocks": 10
|
|
},
|
|
}))).await
|
|
}
|