Skip to content

Exposing Rust-only RGB PSBT primitives through UniFFI #77

@Arshia-r-m

Description

@Arshia-r-m

Hi

We are considering exposing a small safe wrapper around the current Rust-only RGB PSBT primitives through UniFFI, using only binding-friendly types: PSBT strings, asset ID strings, simple DTOs, and consignment file paths.

The wrapper would avoid exposing raw internals like Fascia, RgbTransfer, BuilderSeal, raw color_psbt, or raw consume_fascia.

We’d appreciate your feedback on the system design:

  1. Should these primitives be exposed through UniFFI at all, or kept Rust-only?
  2. Is a higher-level safe wrapper the right approach, instead of exposing raw RGB types?
  3. Should consignments remain file-path based at the binding boundary?
  4. Should static blinding be required explicitly in the binding API?
  5. What invariants should the binding layer validate before calling the Rust primitives?
  6. Is there a better API shape you would recommend for non-Rust consumers?

The final goal for this is to have an onchain rgb swap with PSBT approach, looking forward to your response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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