chia_sdk_driver/primitives/vault/
vault_info.rs1use chia_protocol::Bytes32;
2use clvm_utils::TreeHash;
3
4use crate::SingletonInfo;
5
6#[derive(Debug, Clone, Copy, PartialEq, Eq)]
7pub struct VaultInfo {
8 pub launcher_id: Bytes32,
9 pub custody_hash: TreeHash,
10}
11
12impl VaultInfo {
13 pub fn new(launcher_id: Bytes32, custody_hash: TreeHash) -> Self {
14 Self {
15 launcher_id,
16 custody_hash,
17 }
18 }
19}
20
21impl SingletonInfo for VaultInfo {
22 fn launcher_id(&self) -> Bytes32 {
23 self.launcher_id
24 }
25
26 fn inner_puzzle_hash(&self) -> TreeHash {
27 self.custody_hash
28 }
29}