ergo_lib_wasm/
parameters.rs1use ergo_lib::chain::parameters;
4use wasm_bindgen::prelude::*;
5extern crate derive_more;
6use derive_more::{From, Into};
7
8#[wasm_bindgen]
10#[derive(PartialEq, Debug, Clone, Eq, From, Into)]
11pub struct Parameters(pub(crate) parameters::Parameters);
12
13#[wasm_bindgen]
14impl Parameters {
15 pub fn default_parameters() -> Parameters {
17 parameters::Parameters::default().into()
18 }
19 pub fn block_version(&self) -> i32 {
21 self.0.block_version()
22 }
23 pub fn storage_fee_factor(&self) -> i32 {
25 self.0.storage_fee_factor()
26 }
27 pub fn min_value_per_byte(&self) -> i32 {
29 self.0.min_value_per_byte()
30 }
31 pub fn max_block_size(&self) -> i32 {
33 self.0.max_block_size()
34 }
35 pub fn max_block_cost(&self) -> i32 {
37 self.0.max_block_cost()
38 }
39 pub fn token_access_cost(&self) -> i32 {
41 self.0.token_access_cost()
42 }
43 pub fn input_cost(&self) -> i32 {
45 self.0.input_cost()
46 }
47 pub fn data_input_cost(&self) -> i32 {
49 self.0.data_input_cost()
50 }
51 pub fn output_cost(&self) -> i32 {
53 self.0.output_cost()
54 }
55}