Struct grin_wallet_config::types::WalletConfig

source ·
pub struct WalletConfig {
Show 13 fields pub chain_type: Option<ChainTypes>, pub api_listen_port: u16, pub owner_api_listen_port: Option<u16>, pub api_secret_path: Option<String>, pub node_api_secret_path: Option<String>, pub check_node_api_http_addr: String, pub owner_api_include_foreign: Option<bool>, pub data_file_dir: String, pub no_commit_cache: Option<bool>, pub tls_certificate_file: Option<String>, pub tls_certificate_key: Option<String>, pub dark_background_color_scheme: Option<bool>, pub accept_fee_base: Option<u64>,
}
Expand description

Command-line wallet configuration

Fields§

§chain_type: Option<ChainTypes>

Chain parameters (default to Mainnet if none at the moment)

§api_listen_port: u16

The port this wallet will run on

§owner_api_listen_port: Option<u16>

The port this wallet’s owner API will run on

§api_secret_path: Option<String>

Location of the secret for basic auth on the Owner API

§node_api_secret_path: Option<String>

Location of the node api secret for basic auth on the Grin API

§check_node_api_http_addr: String

The api address of a running server node against which transaction inputs will be checked during send

§owner_api_include_foreign: Option<bool>

Whether to include foreign API endpoints on the Owner API

§data_file_dir: String

The directory in which wallet files are stored

§no_commit_cache: Option<bool>

If Some(true), don’t cache commits alongside output data speed improvement, but your commits are in the database

§tls_certificate_file: Option<String>

TLS certificate file

§tls_certificate_key: Option<String>

TLS certificate private key file

§dark_background_color_scheme: Option<bool>

Whether to use the black background color scheme for command line if enabled, wallet command output color will be suitable for black background terminal

§accept_fee_base: Option<u64>

Scaling factor from transaction weight to transaction fee should match accept_fee_base parameter in grin-server

Implementations§

source§

impl WalletConfig

source

pub fn api_listen_addr(&self) -> String

API Listen address

source

pub fn default_owner_api_listen_port() -> u16

Default listener port

source

pub fn default_accept_fee_base() -> u64

Default listener port

source

pub fn owner_api_listen_port(&self) -> u16

Use value from config file, defaulting to sensible value if missing.

source

pub fn owner_api_listen_addr(&self) -> String

Owner API listen address

source

pub fn accept_fee_base(&self) -> u64

Accept fee base

Trait Implementations§

source§

impl Clone for WalletConfig

source§

fn clone(&self) -> WalletConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for WalletConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for WalletConfig

source§

fn default() -> WalletConfig

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for WalletConfig

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for WalletConfig

source§

fn eq(&self, other: &WalletConfig) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for WalletConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for WalletConfig

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneAny for T
where T: Any + Clone,

source§

fn clone_any(&self) -> Box<dyn CloneAny>

source§

fn clone_any_send(&self) -> Box<dyn CloneAny + Send>
where T: Send,

source§

fn clone_any_sync(&self) -> Box<dyn CloneAny + Sync>
where T: Sync,

source§

fn clone_any_send_sync(&self) -> Box<dyn CloneAny + Send + Sync>
where T: Send + Sync,

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DebugAny for T
where T: Any + Debug,

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> UnsafeAny for T
where T: Any,