This repository has been archived by the owner on Sep 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af4fe0c
commit 4cd4836
Showing
4 changed files
with
310 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use beacon_api_client::{ApiResponse, ConsensusVersion, VersionedApiResponse}; | ||
use ethereum_consensus::bellatrix::mainnet::BlindedBeaconBlock; | ||
use serde_json; | ||
|
||
fn main() { | ||
let block: ApiResponse<BlindedBeaconBlock> = ApiResponse { | ||
data: BlindedBeaconBlock::default(), | ||
}; | ||
let block_repr = serde_json::to_string(&block).unwrap(); | ||
println!("{block_repr}"); | ||
|
||
let block_with_version: VersionedApiResponse<BlindedBeaconBlock> = VersionedApiResponse { | ||
version: ConsensusVersion::Bellatrix, | ||
data: BlindedBeaconBlock::default(), | ||
}; | ||
let block_with_version_repr = serde_json::to_string(&block_with_version).unwrap(); | ||
println!("{block_with_version_repr}"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
mod api_client; | ||
mod serde; | ||
mod types; | ||
|
||
pub use api_client::*; | ||
pub use types::*; |
Oops, something went wrong.