Skip to content

Commit

Permalink
Use rs-stellar-xdr for serialization/deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
tluijken authored and Thomas Luijken committed Nov 27, 2023
1 parent cc7b018 commit bee9b52
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ pub mod ledgers;
/// The models module, here the Request and Response traits are defined
pub mod models;
pub mod xdr;

/// The asset type
/// Native - The native asset
/// Issued - An issued asset
Expand Down
1 change: 1 addition & 0 deletions src/xdr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ mod tests {
let encoded: &[u8] = "AAAAAGPZj1Nu5o0bJ7W4nyOvUxG3Vpok+vFAOtC1K2M7B76ZuZRHr9UdXKbTKiclfOjy72YZFJUkJPVcKT5htvorm1QAAAAAZImGNAAAAAAAAAABAAAAAKgkzRi8nXUGTSmaW1uspDvDqi8yaTgVPYwvm7XLbfAzAAAAQLuRQK8ocAjytwfQelkpwZQa5+jReIO0pbr/9BbUbIffRxQN4Z76J3qDIn5lSJpn0OkYL8ZLPGP0W/S1vlTj5w/fP2GYBKkv20BXGS3EPddI6neK3FK8SYzoBSTAFLgRGXNSJ+05hGEpEjdoewhEaqLJsJbgyYpGLa3aVp8F3SSEAAAAAg3gtrOnZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkBfXhAAAAAGQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=".as_bytes();

let decoded = stellar_xdr::LedgerHeader::from_xdr_base64(encoded).unwrap();
println!("Decoded: {:?}", decoded);

assert_eq!(decoded.ledger_version, 0);
assert_eq!(
Expand Down

0 comments on commit bee9b52

Please sign in to comment.