Open scarmuega opened 1 year ago
for reference: https://github.com/txpipe/pallas/pull/250
Totally fine if the above is thrown away btw. But perhaps a good reference for whoever picks this up.
These may be covered by your list of examples, I'm tired and can't go through it lol. But, below is two examples of really common transaction types that we build at Sundae:
Most tx builders use a "available inputs + change address" abstraction, for balancing the transaction; the first case above becomes a lot easier if you can have multiple labeled sources / change addresses; so you can specify "here's all the inputs from the Server, and all change should go back to X; and here's all the inputs from the User, and all change should go back to Y;" and then allow the user to explicitly transfer funds between these two pools.
@Quantumplation nice feedback!
maybe create an abstraction representing a party
which holds it's own UTxO set + change address. We could then support high-level operations such as transfer(from: party_a, to: party_b, assets)
with all the balancing taken care of.
Is that what you had in mind?
Yep, exactly! bonus points if you can extend that to include scripts, datums, etc.
I also had another thought: another common pattern is "I want to fit as many of these things as possible into the transaction", either processing escrows, or splitting assets into UTXOs with a specific size, etc; most transaction builders have good UX around grabbing as many inputs as we need, but no great experiences around the outputs.
Problem:
Proposal:
pallas-tx-builder
providing an ergonomic and idiomatic library for crafting transactions.pallas-primitives
crate.Examples of some high-level functions that the lib could / should provide:
The above list is just a preliminary reference, final feature is not limited to just those functions.
The following are things that should NOT be part of the library: