Skip to content

client: Move types to version specific module #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 12, 2025

Conversation

tcharding
Copy link
Member

@tcharding tcharding commented May 11, 2025

Currently we have a bit of confusion around types that are defined and used by the various client version modules.

  • Some currently don't change e.g., Input
  • Some are due to change in v29 e.g., TemplateRequest
  • Some change already e.g. AddressType

And to make matters worse, I did 'custom' re-exports in node which is very confusing when one is reading code in client.

Put all client defined types in the version module they first appear in and re-export them as we do for types from types. Then use the type naked (without qualifying the path).

@tcharding
Copy link
Member Author

I noticed this confusion while reviewing #151. I take all responsibility for it, both AddressType and the new code introduced in #151.

@tcharding tcharding force-pushed the 05-11-client-types branch 5 times, most recently from 00143f6 to 9266a31 Compare May 11, 2025 00:41
@tcharding
Copy link
Member Author

I'll come back after the weekend.

@tcharding tcharding force-pushed the 05-11-client-types branch from 9266a31 to e1bfe30 Compare May 12, 2025 00:16
Currently we have a bit of confusion around types that are defined and
used by the various client version modules.

- Some currently don't change e.g., `Input`
- Some are due to change in v29 e.g., `TemplateRequest`
- Some change already e.g. `AddressVersion`

And to make matters worse, I did 'custom' re-exports in `node` which is
very confusing when one is reading code in `client`.

Put all `client` defined types in the version module they first appear
in and re-export them as we do for types from `types`. Then use the type
naked (without qualifying the path).
@tcharding tcharding force-pushed the 05-11-client-types branch from e1bfe30 to 1c8f746 Compare May 12, 2025 00:33
@tcharding tcharding merged commit 3ebec0f into rust-bitcoin:master May 12, 2025
28 checks passed
@tcharding tcharding deleted the 05-11-client-types branch May 15, 2025 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant