StackmateNetwork / stackmate-core

light-weight bitcoin wallet tools for mobile devices.
MIT License
9 stars 2 forks source link

Update build_tx to support policy path specification. #6

Closed i5hi closed 2 years ago

i5hi commented 2 years ago

Timelocked custodian specifically requires specifying policy path in the transaction build stage.

Keep the requirement generic and as expected by BDK.

Create a generalized input of policy_id and policy_path as a stringified JSON. Structured PolicyPath will be as follows.

PolicyPath{ id: String, path: Vec }

It will impl a conversion to a BTreeMap as required by BDK.

impl PolicyPath{ to_btree_map(&self)->BTreeMap<String,Vec{} }