Skip to content

Build invoice group all-or-nothing release #33

Description

@Kingsman-99

Label: complexity: high
Points: 200

Description

Some workflows require multiple invoices to all be fully funded before any of them release — for example a multi-party deal where all parties must commit before funds move. This issue adds create_invoice_group() linking invoices so none can release until all are fully funded.

Technical Context

Involves lib.rs. Add persistent key ("group", group_id) storing Vec<u64> of invoice IDs. Add create_invoice_group(env, invoice_ids: Vec<u64>) -> u64. In release(), if invoice belongs to a group, check all group members are fully funded before releasing any.

Acceptance Criteria

  • create_invoice_group() links multiple invoice IDs
  • release() on a group member panics if any other member is not fully funded
  • All group members release successfully once all are funded
  • Non-grouped invoices behave identically to current implementation
  • Test creates group of 2 invoices, funds both, verifies both release
  • All existing cargo tests pass
  • cargo clippy passes with zero warnings

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highComplex feature requiring deep knowledge - 200 pts

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions