Skip to content

Commit dde6ba5

Browse files
authored
Merge pull request #50 from stevenroose/export-contracthashwq
Fix and export ContractHash
2 parents 98e0c4b + f4fd713 commit dde6ba5

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/confidential.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer};
2222

2323
use std::{io, fmt};
2424

25-
use bitcoin::hashes::sha256d;
26-
2725
use encode::{self, Encodable, Decodable};
2826
use issuance::AssetId;
2927

src/issuance.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use std::io;
1818
use std::str::FromStr;
1919

2020
use bitcoin::util::hash::BitcoinHash;
21-
use bitcoin::hashes::{self, hex, sha256, sha256d, Hash};
21+
use bitcoin::hashes::{self, hex, sha256, Hash};
2222

2323
use encode::{self, Encodable, Decodable};
2424
use fast_merkle_root::fast_merkle_root;
@@ -37,7 +37,7 @@ const TWO32: [u8; 32] = [
3737
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3838
];
3939

40-
hash_newtype!(ContractHash, sha256d::Hash, 32, doc="The hash of an asset contract.", true);
40+
hash_newtype!(ContractHash, sha256::Hash, 32, doc="The hash of an asset contract.", true);
4141

4242
/// An issued asset ID.
4343
#[derive(Copy, Clone, PartialEq, Eq, Default, PartialOrd, Ord, Hash)]

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ pub use block::{BlockHeader, Block};
5151
pub use block::ExtData as BlockExtData;
5252
pub use ::bitcoin::consensus::encode::VarInt;
5353
pub use fast_merkle_root::fast_merkle_root;
54-
pub use issuance::AssetId;
54+
pub use issuance::{AssetId, ContractHash};
5555

0 commit comments

Comments
 (0)