Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,8 @@ pub mod async_api {
Ok(wallet::broadcast_spend_bundle(peer, spend_bundle).await?)
}

/// Utility function to validate that a coin is a $DIG CAT coin. Returns an instantiated Cat
/// utility for the coin if it's a valid $DIG CAT
pub async fn prove_dig_cat_coin(
peer: &Peer,
coin: &Coin,
Expand Down
5 changes: 5 additions & 0 deletions src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ pub fn send_xch(
Ok(ctx.take())
}

/// Uses the specified $DIG to create a collateral coin for the provided DIG store ID (launcher ID)
pub fn create_dig_collateral_coin(
dig_cats: Vec<Cat>,
collateral_amount: u64,
Expand Down Expand Up @@ -362,6 +363,8 @@ pub fn create_server_coin(
})
}

/// Spends the specified $DIG collateral coin to de-collateralize the store and return spendable
/// $DIG to the wallet that created the collateral coin.
pub fn spend_dig_collateral_coin(
synthetic_key: PublicKey,
fee_coins: Vec<Coin>,
Expand Down Expand Up @@ -1339,6 +1342,8 @@ pub async fn look_up_possible_launchers(
})
}

/// Utility function to validate that a coin is a $DIG CAT coin. Returns an instantiated Cat
/// utility for the coin if it's a valid $DIG CAT
pub async fn prove_dig_cat_coin(
peer: &Peer,
coin: &Coin,
Expand Down