In preparation for adding a relative lock time type move the `locktime`
module to a new module called `absolute`. Use qualified path for
locktime types (e.g. `absolute::PackedLockTime`) to improve readability.
We just moved the `address` module out of `util` which is currently
ignored by `rustfmt`.
Run `rustfmt`, no other changes other than those made by the tool.
The identifier 'util' does not convey any information. We have a whole
bunch of modules inside the `util` module.
As part of work to reduce the amount of arbitrary things in the `util`
module move the `address` module to the crate root level.
Add a `LockTime` type to hold the nLockTime `u32` value. Use it in
`Transaction` for `lock_time` instead of a `u32`. Make it public so this
new type can be used by rust-miniscript and other downstream projects.
Add a `PackedLockTime` type that wraps a raw `u32` and derives `Ord`,
this type is for wrapping a consensus lock time value for nesting in
types that would like to derive `Ord`.
We recently merged a PR that enables the formatter on the `examples/`
directory, at the same time we merged `examples/ecdsa-psbt.rs` but CI
had already run so the formatter was not run.
Run `cargo +nightly fmt` to format the `examples/` directory.
Add an example PSBT workflow. The workflow we simulate is that of a
setup using a watch-only online wallet (contains only public keys) and a
cold-storage wallet (contains the private keys).
We create and update a PSBT using the watch-only wallet then pass the
PSBT to the cold-storage wallet to sign.
Co-authored-by: Dan Gould <d@ngould.dev>