Skip to content

On-chain RGB Swap PSBTs #292

@cryptoquick

Description

@cryptoquick

A swap PSBT will set a price for the buyer input and include the RGB21 transfer output. This then can be provided to the buyer to be paid with one of their sats inputs.

  • create_swap_psbt - Create Swap PSBT
    • Seller specifies recipients in the format, Vec<(Address, i64)>>
    • These are then totaled
    • A new dust output is added to the the seller_uda_address, so they can transfer again
    • A transaction fee is also added
    • Returns struct including: total, psbt, and seal.
  • pay_swap_psbt - Pays the Swap PSBT

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions