Skip to content

Commit 8b6fc64

Browse files
Silddbaranov34Dmitrii Korchagin
authored
Support get libraries with proof (#11)
* added auto-sync * rm sync script * support get-libraries-with-proof --------- Co-authored-by: dbaranov34 <[email protected]> Co-authored-by: Dmitrii Korchagin <[email protected]>
1 parent a539d7d commit 8b6fc64

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

liteapi/src/tl/request.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,15 @@ pub struct GetLibraries {
262262
pub library_list: Vec<Int256>,
263263
}
264264

265+
#[derive(TlRead, TlWrite, Derivative)]
266+
#[derivative(Debug, Clone, PartialEq)]
267+
pub struct GetLibrariesWithProof {
268+
pub id: BlockIdExt,
269+
#[tl(flags)]
270+
pub mode: (),
271+
pub library_list: Vec<Int256>,
272+
}
273+
265274
#[derive(TlRead, TlWrite, Derivative)]
266275
#[derivative(Debug, Clone, PartialEq)]
267276
#[tl(boxed)]
@@ -349,4 +358,8 @@ pub enum Request {
349358
/// liteServer.getLibraries library_list:(vector int256) = liteServer.LibraryResult;
350359
#[tl(id = 0xd122b662)]
351360
GetLibraries(GetLibraries),
361+
362+
/// liteServer.getLibrariesWithProof id:tonNode.blockIdExt mode:# library_list:(vector int256) = liteServer.LibraryResultWithProof;
363+
#[tl(id = 0xd97693bd)]
364+
GetLibrariesWithProof(GetLibrariesWithProof),
352365
}

liteapi/src/tl/response.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,17 @@ pub struct LibraryResult {
264264
pub result: Vec<LibraryEntry>,
265265
}
266266

267+
#[derive(TlRead, TlWrite, Derivative)]
268+
#[derivative(Debug, Clone, PartialEq)]
269+
pub struct LibraryResultWithProof {
270+
pub id: BlockIdExt,
271+
#[tl(flags)]
272+
pub mode: (),
273+
pub result: Vec<LibraryEntry>,
274+
pub state_proof: Vec<u8>,
275+
pub data_proof: Vec<u8>,
276+
}
277+
267278
#[derive(TlRead, TlWrite, Derivative)]
268279
#[derivative(Debug, Clone, PartialEq)]
269280
pub struct Error {
@@ -356,6 +367,10 @@ pub enum Response {
356367
#[tl(id = 0x117ab96b)]
357368
LibraryResult(LibraryResult),
358369

370+
/// liteServer.libraryResult result:(vector liteServer.libraryEntry) = liteServer.LibraryResult;
371+
#[tl(id = 0x10a927bf)]
372+
LibraryResultWithProof(LibraryResultWithProof),
373+
359374
/// liteServer.error code:int message:string = liteServer.Error;
360375
#[tl(id = 0xbba9e148)]
361376
Error(Error),

0 commit comments

Comments
 (0)