Skip to content

Moving bunch of stuff from my payjoin crate here #630

@Kixunil

Description

@Kixunil

I'm working on a PayJoin (BIP78) crate (not released yet) and I was thinking of migrating some stuff from there over here. But first I'd like to ask whether/which things you find worthy moving.

Stuff that seems to be interesting to me:

  • BIP21 parsing and serializing
  • Extension trait for weight calculation on TxIn, TxOut etc, so that one may for instance predict how much transaction fee will change (would use inherent methods here)
  • Weight data type - newtype around u64 for transaction weight, returned by weight-computing functions
  • FeeRate newtype over u64, returned by Amount / Weight
  • Function for computing fee paid by PSBT (needs UTXO information of course)
  • Function for computing the size of finalized PSBT
  • Helper type replacing (&bitcoin::Txin, &bitcoin::util::psbt::Input) with a method for getting previous TxOut and possibly other helpers

Questionable stuff:

  • IntputType - enum of possible input types (P2PK, P2PKH, P2SH, P2SH-P2W*, P2W*, P2TR), may interact nicely with WitnessVersion type #617
  • OutputType - analogous to InputType

There's also some stuff I'd like to be helped with if someone is interested:

  • writing PSBT finalizer - is someone here experienced to do it?
  • reviewing my code :)
  • if someone here enjoys writing tests I'd be happy to let you write them

If approved, I'd submit the changes in separate PRs.

I'm also willing to move the whole crate to this organization under the condition that I will have commit access for at least a few months during initial development (may have WIP disclaimer).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions