-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move Coin, CoinState and RespondToPhUpdates into chia-protocol
- Loading branch information
Showing
17 changed files
with
106 additions
and
84 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
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
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,24 @@ | ||
use crate::chia_error; | ||
use crate::coin::Coin; | ||
use crate::streamable::Streamable; | ||
use chia_streamable_macro::Streamable; | ||
|
||
#[cfg(feature = "py-bindings")] | ||
use crate::from_json_dict::FromJsonDict; | ||
#[cfg(feature = "py-bindings")] | ||
use crate::to_json_dict::ToJsonDict; | ||
#[cfg(feature = "py-bindings")] | ||
use chia_py_streamable_macro::PyStreamable; | ||
#[cfg(feature = "py-bindings")] | ||
use pyo3::prelude::*; | ||
|
||
#[cfg_attr(feature = "py-bindings", pyclass, derive(PyStreamable))] | ||
#[derive(Streamable, Hash, Debug, Clone, Eq, PartialEq)] | ||
pub struct CoinState { | ||
#[cfg_attr(features = "py-bindings", pyo3(get))] | ||
coin: Coin, | ||
#[cfg_attr(features = "py-bindings", pyo3(get))] | ||
spent_height: Option<u32>, | ||
#[cfg_attr(features = "py-bindings", pyo3(get))] | ||
created_height: Option<u32>, | ||
} |
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,3 +1,10 @@ | ||
pub mod bytes; | ||
pub mod chia_error; | ||
pub mod coin; | ||
pub mod coin_state; | ||
#[cfg(feature = "py-bindings")] | ||
pub mod from_json_dict; | ||
pub mod respond_to_ph_updates; | ||
pub mod streamable; | ||
#[cfg(feature = "py-bindings")] | ||
pub mod to_json_dict; |
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,25 @@ | ||
use crate::bytes::Bytes32; | ||
use crate::chia_error; | ||
use crate::coin_state::CoinState; | ||
use crate::streamable::Streamable; | ||
use chia_streamable_macro::Streamable; | ||
|
||
#[cfg(feature = "py-bindings")] | ||
use crate::from_json_dict::FromJsonDict; | ||
#[cfg(feature = "py-bindings")] | ||
use crate::to_json_dict::ToJsonDict; | ||
#[cfg(feature = "py-bindings")] | ||
use chia_py_streamable_macro::PyStreamable; | ||
#[cfg(feature = "py-bindings")] | ||
use pyo3::prelude::*; | ||
|
||
#[cfg_attr(feature = "py-bindings", pyclass(unsendable), derive(PyStreamable))] | ||
#[derive(Streamable, Hash, Debug, Clone, Eq, PartialEq)] | ||
pub struct RespondToPhUpdates { | ||
#[cfg_attr(features = "py-bindings", pyo3(get))] | ||
puzzle_hashes: Vec<Bytes32>, | ||
#[cfg_attr(features = "py-bindings", pyo3(get))] | ||
min_height: u32, | ||
#[cfg_attr(features = "py-bindings", pyo3(get))] | ||
coin_states: Vec<CoinState>, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "chia_py_streamable_macro" | ||
version = "0.1.0" | ||
edition = "2021" | ||
license = "Apache-2.0" | ||
description = "Derive macro to create python bindings for Chia types" | ||
authors = ["Arvid Norberg <[email protected]>"] | ||
homepage = "https://github.com/Chia-Network/chia_rs/chia_py_streamable_macro/" | ||
repository = "https://github.com/Chia-Network/chia_rs/chia_py_streamable_macro/" | ||
|
||
[lib] | ||
proc-macro = true | ||
|
||
[dependencies] | ||
syn = "1.0.86" | ||
quote = "1.0.15" |
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
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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