Skip to content

Commit 8a93445

Browse files
Add GetConfigParams, GetConfigAll, ConfigInfo modes
1 parent 452ac44 commit 8a93445

File tree

2 files changed

+46
-2
lines changed

2 files changed

+46
-2
lines changed

liteapi/src/tl/request.rs

+32-2
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,46 @@ pub struct GetBlockProof {
169169
#[derive(TlRead, TlWrite, Derivative)]
170170
#[derivative(Debug, Clone, PartialEq)]
171171
pub struct GetConfigAll {
172-
pub mode: i32,
172+
#[tl(flags)]
173+
pub mode: (),
173174
pub id: BlockIdExt,
175+
#[tl(flags_bit = "mode.0")]
176+
pub with_state_root: Option<()>,
177+
#[tl(flags_bit = "mode.1")]
178+
pub with_libraries: Option<()>,
179+
#[tl(flags_bit = "mode.2")]
180+
pub with_state_extra_root: Option<()>,
181+
#[tl(flags_bit = "mode.3")]
182+
pub with_shard_hashes: Option<()>,
183+
#[tl(flags_bit = "mode.6")]
184+
pub with_accounts_root: Option<()>,
185+
#[tl(flags_bit = "mode.7")]
186+
pub with_prev_blocks: Option<()>,
187+
#[tl(flags_bit = "mode.15")]
188+
pub extract_from_key_block: Option<()>,
174189
}
175190

176191
#[derive(TlRead, TlWrite, Derivative)]
177192
#[derivative(Debug, Clone, PartialEq)]
178193
pub struct GetConfigParams {
179-
pub mode: i32,
194+
#[tl(flags)]
195+
pub mode: (),
180196
pub id: BlockIdExt,
181197
pub param_list: Vec<i32>,
198+
#[tl(flags_bit = "mode.0")]
199+
pub with_state_root: Option<()>,
200+
#[tl(flags_bit = "mode.1")]
201+
pub with_libraries: Option<()>,
202+
#[tl(flags_bit = "mode.2")]
203+
pub with_state_extra_root: Option<()>,
204+
#[tl(flags_bit = "mode.3")]
205+
pub with_shard_hashes: Option<()>,
206+
#[tl(flags_bit = "mode.6")]
207+
pub with_accounts_root: Option<()>,
208+
#[tl(flags_bit = "mode.7")]
209+
pub with_prev_blocks: Option<()>,
210+
#[tl(flags_bit = "mode.15")]
211+
pub extract_from_key_block: Option<()>,
182212
}
183213

184214
#[derive(TlRead, TlWrite, Derivative)]

liteapi/src/tl/response.rs

+14
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,20 @@ pub struct ConfigInfo {
189189
pub id: BlockIdExt,
190190
pub state_proof: Vec<u8>,
191191
pub config_proof: Vec<u8>,
192+
#[tl(flags_bit = "mode.0")]
193+
pub with_state_root: Option<()>,
194+
#[tl(flags_bit = "mode.1")]
195+
pub with_libraries: Option<()>,
196+
#[tl(flags_bit = "mode.2")]
197+
pub with_state_extra_root: Option<()>,
198+
#[tl(flags_bit = "mode.3")]
199+
pub with_shard_hashes: Option<()>,
200+
#[tl(flags_bit = "mode.6")]
201+
pub with_accounts_root: Option<()>,
202+
#[tl(flags_bit = "mode.7")]
203+
pub with_prev_blocks: Option<()>,
204+
#[tl(flags_bit = "mode.15")]
205+
pub extract_from_key_block: Option<()>,
192206
}
193207

194208
#[derive(TlRead, TlWrite, Derivative)]

0 commit comments

Comments
 (0)