Skip to content

Commit

Permalink
Merge pull request #10 from Rigidity/0.5.0
Browse files Browse the repository at this point in the history
Update to 0.5.0
  • Loading branch information
Rigidity authored Feb 5, 2024
2 parents 2a2ef2e + 4b0145c commit cf3b7ed
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 67 deletions.
114 changes: 67 additions & 47 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chia-wallet-sdk"
version = "0.4.0"
version = "0.5.0"
edition = "2021"
license = "Apache-2.0"
description = "An unofficial SDK for building Chia wallets."
Expand All @@ -13,13 +13,13 @@ tokio = { version = "1.33.0", features = ["macros"] }
indexmap = "2.1.0"
sha2 = "0.9.9"
thiserror = "1.0.50"
clvmr = "0.4.0"
chia-protocol = "0.4.0"
chia-wallet = "0.4.0"
chia-bls = "0.4.0"
chia-client = "0.4.0"
clvm-traits = "0.3.3"
clvm-utils = "0.4.0"
clvmr = "0.5.0"
chia-protocol = "0.5.1"
chia-wallet = "0.5.1"
chia-bls = "0.5.1"
chia-client = "0.5.1"
clvm-traits = "0.5.1"
clvm-utils = "0.5.1"
chia-ssl = "0.2.14"
native-tls = "0.2.11"
tokio-tungstenite = { version = "0.21.0", features = ["native-tls"] }
Expand Down
7 changes: 4 additions & 3 deletions src/condition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ pub enum CreateCoin {
Memos {
puzzle_hash: Bytes32,
amount: u64,
memos: Vec<Bytes32>,
memos: Vec<Bytes>,
},
}

Expand Down Expand Up @@ -210,7 +210,8 @@ where
mod tests {
use std::fmt::Debug;

use clvmr::{allocator::NodePtr, serde::node_to_bytes, Allocator, FromNodePtr, ToNodePtr};
use clvm_traits::{FromNodePtr, ToNodePtr};
use clvmr::{allocator::NodePtr, serde::node_to_bytes, Allocator};
use hex_literal::hex;

use super::*;
Expand All @@ -234,7 +235,7 @@ mod tests {
Condition::<NodePtr>::CreateCoin(CreateCoin::Memos {
puzzle_hash: Bytes32::from([0; 32]),
amount: 0,
memos: vec![Bytes32::from([1; 32])],
memos: vec![Bytes::from([1; 32].to_vec())],
}),
&hex!(
"
Expand Down
6 changes: 3 additions & 3 deletions src/spends/cat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ use chia_wallet::{
standard::{standard_puzzle_hash, StandardArgs, StandardSolution},
LineageProof,
};
use clvm_traits::{clvm_quote, ToClvmError};
use clvm_traits::{clvm_quote, FromNodePtr, ToClvmError, ToNodePtr};
use clvm_utils::{curry_tree_hash, tree_hash, tree_hash_atom, CurriedProgram};
use clvmr::{allocator::NodePtr, Allocator, FromNodePtr, ToNodePtr};
use clvmr::{allocator::NodePtr, Allocator};

use crate::{
utils::request_puzzle_args, CatCondition, Condition, CreateCoin, DerivationStore, RunTail,
Expand Down Expand Up @@ -166,7 +166,7 @@ pub async fn spend_cat_coins(
// Lineage proof.
let parent = parents
.iter()
.find(|coin_state| coin_state.coin.coin_id() == coin.parent_coin_info)
.find(|coin_state| coin_state.coin.coin_id() == coin.parent_coin_info.to_bytes())
.cloned()
.unwrap();

Expand Down
4 changes: 2 additions & 2 deletions src/spends/standard.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use chia_bls::PublicKey;
use chia_protocol::{Coin, CoinSpend, Program};
use chia_wallet::standard::{StandardArgs, StandardSolution};
use clvm_traits::{clvm_quote, ToClvmError};
use clvm_traits::{clvm_quote, FromNodePtr, ToClvmError, ToNodePtr};
use clvm_utils::CurriedProgram;
use clvmr::{allocator::NodePtr, Allocator, FromNodePtr, ToNodePtr};
use clvmr::{allocator::NodePtr, Allocator};

use crate::{Condition, DerivationStore};

Expand Down
Loading

0 comments on commit cf3b7ed

Please sign in to comment.