@@ -21,10 +21,10 @@ pub enum Command {
2121 command : OptionCommand ,
2222 } ,
2323
24- /// Swap lifecycle (create, take, cancel, withdraw)
25- Swap {
24+ /// Option Offer lifecycle (create, take, cancel, withdraw)
25+ OptionOffer {
2626 #[ command( subcommand) ]
27- command : SwapCommand ,
27+ command : OptionOfferCommand ,
2828 } ,
2929
3030 /// Fetch options/swaps from NOSTR, sync to coin-store, display
@@ -242,23 +242,32 @@ pub enum OptionCommand {
242242 } ,
243243}
244244
245- /// Swap lifecycle commands
245+ /// Option Offer lifecycle commands
246246#[ derive( Debug , Subcommand ) ]
247- pub enum SwapCommand {
248- /// Create a swap offer (offer Grantor Token for premium )
247+ pub enum OptionOfferCommand {
248+ /// Create an option offer (deposit collateral + premium for settlement )
249249 Create {
250- /// Grantor token outpoint (interactive selection if not provided)
250+ /// Collateral asset ID to deposit (interactive selection if not provided)
251251 #[ arg( long) ]
252- grantor_token : Option < OutPoint > ,
253- /// Premium asset ID (defaults to native LBTC)
252+ collateral_asset : Option < AssetId > ,
253+ /// Amount of collateral to deposit (prompted if not provided)
254+ #[ arg( long) ]
255+ collateral_amount : Option < u64 > ,
256+ /// Premium asset ID (interactive selection if not provided, excludes contract tokens)
254257 #[ arg( long) ]
255258 premium_asset : Option < AssetId > ,
256- /// Premium amount
259+ /// Total premium amount to deposit (used to calculate `premium_per_collateral`)
260+ #[ arg( long) ]
261+ premium_amount : Option < u64 > ,
262+ /// Settlement asset ID (interactive selection if not provided, excludes contract tokens)
257263 #[ arg( long) ]
258- premium_amount : u64 ,
259- /// Expiry time (defaults to same as option )
264+ settlement_asset : Option < AssetId > ,
265+ /// Total settlement amount expected (used to calculate `collateral_per_contract` )
260266 #[ arg( long) ]
261- expiry : Option < String > ,
267+ settlement_amount : Option < u64 > ,
268+ /// Expiry time as Unix timestamp or duration (e.g., +30d)
269+ #[ arg( long) ]
270+ expiry : String ,
262271 /// Fee amount in satoshis (auto-estimated if not specified)
263272 #[ arg( long) ]
264273 fee : Option < u64 > ,
@@ -267,11 +276,11 @@ pub enum SwapCommand {
267276 broadcast : bool ,
268277 } ,
269278
270- /// Take a swap offer (atomic swap: premium for Grantor Token )
279+ /// Take an option offer (pay settlement to receive collateral + premium )
271280 Take {
272- /// Swap event ID from NOSTR (interactive selection if not provided)
281+ /// Offer event ID from NOSTR (interactive selection if not provided)
273282 #[ arg( long) ]
274- swap_event : Option < String > ,
283+ offer_event : Option < String > ,
275284 /// Fee amount in satoshis (auto-estimated if not specified)
276285 #[ arg( long) ]
277286 fee : Option < u64 > ,
@@ -280,11 +289,11 @@ pub enum SwapCommand {
280289 broadcast : bool ,
281290 } ,
282291
283- /// Cancel a swap offer after expiry (reclaim collateral if no one took it )
292+ /// Cancel an option offer after expiry (reclaim collateral + premium )
284293 Cancel {
285- /// Swap event ID from NOSTR (interactive selection if not provided)
294+ /// Offer event ID from NOSTR (interactive selection if not provided)
286295 #[ arg( long) ]
287- swap_event : Option < String > ,
296+ offer_event : Option < String > ,
288297 /// Fee amount in satoshis (auto-estimated if not specified)
289298 #[ arg( long) ]
290299 fee : Option < u64 > ,
@@ -293,11 +302,11 @@ pub enum SwapCommand {
293302 broadcast : bool ,
294303 } ,
295304
296- /// Withdraw settlement after swap was taken (claim your payment)
305+ /// Withdraw settlement after offer was taken (claim your payment)
297306 Withdraw {
298- /// Swap event ID from NOSTR (interactive selection if not provided)
307+ /// Offer event ID from NOSTR (interactive selection if not provided)
299308 #[ arg( long) ]
300- swap_event : Option < String > ,
309+ offer_event : Option < String > ,
301310 /// Fee amount in satoshis (auto-estimated if not specified)
302311 #[ arg( long) ]
303312 fee : Option < u64 > ,
0 commit comments