From 322636949f1394c3519416a138149915bf867b4e Mon Sep 17 00:00:00 2001 From: William Wills Date: Sun, 2 Nov 2025 12:17:37 -0500 Subject: [PATCH 1/2] chore: doc comments --- src/lib.rs | 4 +++- src/wallet.rs | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 77d7fbf..a972284 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -629,7 +629,9 @@ pub mod async_api { ) -> Result { 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, diff --git a/src/wallet.rs b/src/wallet.rs index 3c6e29d..f2a3570 100644 --- a/src/wallet.rs +++ b/src/wallet.rs @@ -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, collateral_amount: u64, @@ -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, @@ -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, From d22858e008089a014111151ba97d38e3f7c7b0fc Mon Sep 17 00:00:00 2001 From: William Wills Date: Sun, 2 Nov 2025 12:17:37 -0500 Subject: [PATCH 2/2] chore: doc comments --- src/lib.rs | 2 ++ src/wallet.rs | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 77d7fbf..487a5b9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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, diff --git a/src/wallet.rs b/src/wallet.rs index 3c6e29d..f2a3570 100644 --- a/src/wallet.rs +++ b/src/wallet.rs @@ -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, collateral_amount: u64, @@ -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, @@ -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,