Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Implement transaction builder #40

Open
evanlinjin opened this issue Oct 9, 2022 · 2 comments
Open

Implement transaction builder #40

evanlinjin opened this issue Oct 9, 2022 · 2 comments

Comments

@evanlinjin
Copy link
Collaborator

evanlinjin commented Oct 9, 2022

Refer to meeting notes: https://hackmd.io/@evanlinjin/bdk_minutes_20221005

@LLFourn
Copy link
Owner

LLFourn commented Nov 25, 2022

Expanding on this. Let's try and create a new txbuilder that is split up into stages:

  1. Coin control. Grouping inputs together that must be spent together and inputs that cannot be spent together.
  • We can achieve cannot be spent together by the user just running the process several times with each group that can be spent together.
  • For must be spent together perhaps group them somehow. Each item is something like (Vec<(Plan, TxOut, Outpoint)>.
  1. Coin selection.
    Inputs:
  • groups of inputs from above
  • change policy (how to decide when we're adding change)
  • spending plan for drain output (so we know the weight of drain spend).
    output:
  • A subset of inputs that satisfies some parameters.
  • whether change was added
  1. psbt creation. Maps the candidates chosen by coin selection to their plans and uses the plan to create the PSBT input. Maps the drain output from the coin selection (if any) to the drain plan and populates the PSBT with that.

then you sign it!

This depends on #66 and #46

@rajarshimaitra rajarshimaitra removed their assignment Nov 28, 2022
@rajarshimaitra
Copy link
Collaborator

Removed myself as assigned as I won't be able to focus on this currently.. Will reassign myself if no takers..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

3 participants