Skip to content

Commit

Permalink
Add GetConfigParams, GetConfigAll, ConfigInfo modes
Browse files Browse the repository at this point in the history
  • Loading branch information
hacker-volodya committed Jun 21, 2024
1 parent 452ac44 commit 8a93445
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
34 changes: 32 additions & 2 deletions liteapi/src/tl/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,46 @@ pub struct GetBlockProof {
#[derive(TlRead, TlWrite, Derivative)]
#[derivative(Debug, Clone, PartialEq)]
pub struct GetConfigAll {
pub mode: i32,
#[tl(flags)]
pub mode: (),
pub id: BlockIdExt,
#[tl(flags_bit = "mode.0")]
pub with_state_root: Option<()>,
#[tl(flags_bit = "mode.1")]
pub with_libraries: Option<()>,
#[tl(flags_bit = "mode.2")]
pub with_state_extra_root: Option<()>,
#[tl(flags_bit = "mode.3")]
pub with_shard_hashes: Option<()>,
#[tl(flags_bit = "mode.6")]
pub with_accounts_root: Option<()>,
#[tl(flags_bit = "mode.7")]
pub with_prev_blocks: Option<()>,
#[tl(flags_bit = "mode.15")]
pub extract_from_key_block: Option<()>,
}

#[derive(TlRead, TlWrite, Derivative)]
#[derivative(Debug, Clone, PartialEq)]
pub struct GetConfigParams {
pub mode: i32,
#[tl(flags)]
pub mode: (),
pub id: BlockIdExt,
pub param_list: Vec<i32>,
#[tl(flags_bit = "mode.0")]
pub with_state_root: Option<()>,
#[tl(flags_bit = "mode.1")]
pub with_libraries: Option<()>,
#[tl(flags_bit = "mode.2")]
pub with_state_extra_root: Option<()>,
#[tl(flags_bit = "mode.3")]
pub with_shard_hashes: Option<()>,
#[tl(flags_bit = "mode.6")]
pub with_accounts_root: Option<()>,
#[tl(flags_bit = "mode.7")]
pub with_prev_blocks: Option<()>,
#[tl(flags_bit = "mode.15")]
pub extract_from_key_block: Option<()>,
}

#[derive(TlRead, TlWrite, Derivative)]
Expand Down
14 changes: 14 additions & 0 deletions liteapi/src/tl/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,20 @@ pub struct ConfigInfo {
pub id: BlockIdExt,
pub state_proof: Vec<u8>,
pub config_proof: Vec<u8>,
#[tl(flags_bit = "mode.0")]
pub with_state_root: Option<()>,
#[tl(flags_bit = "mode.1")]
pub with_libraries: Option<()>,
#[tl(flags_bit = "mode.2")]
pub with_state_extra_root: Option<()>,
#[tl(flags_bit = "mode.3")]
pub with_shard_hashes: Option<()>,
#[tl(flags_bit = "mode.6")]
pub with_accounts_root: Option<()>,
#[tl(flags_bit = "mode.7")]
pub with_prev_blocks: Option<()>,
#[tl(flags_bit = "mode.15")]
pub extract_from_key_block: Option<()>,
}

#[derive(TlRead, TlWrite, Derivative)]
Expand Down

0 comments on commit 8a93445

Please sign in to comment.