Network check upon spot price request

This commit is contained in:
Daniel Karzel 2021-05-11 22:22:59 +10:00
parent 02974811ad
commit af60d3bb54
No known key found for this signature in database
GPG key ID: 30C3FC2E438ADB6E
15 changed files with 245 additions and 76 deletions

View file

@ -37,6 +37,17 @@ use serde::{Deserialize, Serialize};
use sha2::Sha256;
use std::str::FromStr;
#[derive(Serialize, Deserialize)]
#[serde(remote = "Network")]
#[allow(non_camel_case_types)]
pub enum network {
#[serde(rename = "Mainnet")]
Bitcoin,
Testnet,
Signet,
Regtest,
}
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq)]
pub struct SecretKey {
inner: Scalar,