Skip to content

refactor: renames SilentPaymentAddress - #155

Open
Sosthene00 wants to merge 2 commits into
masterfrom
refactor/rename_sp_code
Open

refactor: renames SilentPaymentAddress#155
Sosthene00 wants to merge 2 commits into
masterfrom
refactor/rename_sp_code

Conversation

@Sosthene00

Copy link
Copy Markdown
Collaborator

SilentPaymentAddress -> SilentPaymentKeyMaterial SilentPaymentAddressDisplay -> SilentPaymentCode

Comment thread silentpayments/src/utils/common.rs Outdated
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
pub struct SilentPaymentAddressDisplay {
sp_address: SilentPaymentAddress,
pub struct SilentPaymentKeyCode {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be SilentPaymentCode?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah sorry I messed the grep up. But actually on closer inspection it was worse than that, a lot of places were still refering to address, either in variable names, methods etc. Docs was unconsistent. Some places now were returning or expecting KeyMaterial while Code would have made more sense, or the contrary. I tried to make everything consistent again.

`SilentPaymentAddress` -> `SilentPaymentKeyMaterial`
`SilentPaymentAddressDisplay` -> `SilentPaymentCode`
Rename receive/change APIs, errors, and local names from address/display
to code and key material. Drop redundant conversion methods in favor of
`From`, and match `SilentPaymentCode::new` argument order to key material.
@Sosthene00
Sosthene00 force-pushed the refactor/rename_sp_code branch from bd6b018 to 7a0873f Compare August 20, 2026 11:28
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.

2 participants