Skip to content

Add contextual information in set_spend_tx request and get_spend_tx response  #127

@edouardparis

Description

@edouardparis

In order to introduce complex spend policies more information must be given to participants retrieving the spend.

Usecase

Give information about the output recipient address and make it simpler for watchtowers to derive internal descriptors and check scripts matching.

  1. Change detection (derivation index of the deposit descriptor to check with)
  2. DLC oracle (give the oracle label and contract descriptor and derivation index)
  3. Enterprise information (invoice ids to check amount with the enterprise services)
  4. ...

How to store this information

1. Share a psbt instead of simple bitcoin transaction

pros:

  • A well known format, with the output bip32_derivation fields for usecase 1 and proprietary fields for usecase 2
  • Format is used across signing devices

cons:

  • may be limited for long term usage, lot of unused bytes, psbt may be huge if client and server are not careful to lighten it to only the necessary fields

2. Introduce a new field metadata

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