Skip to content
This repository was archived by the owner on Oct 28, 2026. It is now read-only.

Remove bitcoin for secp256k1 - #156

Closed
rustaceanrob wants to merge 1 commit into
rust-bitcoin:mainfrom
rustaceanrob:9-5-rm-serde
Closed

rustaceanrob wants to merge 1 commit into
rust-bitcoin:mainfrom
rustaceanrob:9-5-rm-serde

Conversation

@rustaceanrob

Copy link
Copy Markdown
Member

To help with type safety a bit, I have public callsites use an impl Borrow<[u8; 4]>, which the p2p::Magic type implements. This way one can pass magic variables directly. In the handshake this just gets dereferenced anyway, but it still feels more ergonomic than forcing a to_bytes on the caller IMO.

I keep the secp256k1 the same, but maybe it can be bumped. I forget if there are problems when attempting to build conflicting versions or not.

To help with type safety a bit, I have public callsites use an `impl
Borrow<[u8; 4]>`, which the `p2p::Magic` type implements. This way one
can pass magic variables directly. In the handshake this just gets
dereferenced anyway, but it still feels more ergonomic than forcing a
`to_bytes` on the caller IMO.

I keep the `secp256k1` the same, but maybe it can be bumped. I forget if
there are problems when attempting to build conflicting versions or not.
@nyonson

nyonson commented Sep 5, 2025

Copy link
Copy Markdown
Collaborator

Dope, looks clean to me. I think the failures are legit, as far as we might just have to tweak the docs if its too annoying to get bitcoin in the namespace for them.

@rustaceanrob

Copy link
Copy Markdown
Member Author

Going to clean it up next week, but in the meantime, any idea of what the no_std error is?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants