Skip to content
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

Use hex-encoded or string representation for user-facing identifiers #14

Open
G8XSU opened this issue Oct 14, 2024 · 2 comments
Open

Use hex-encoded or string representation for user-facing identifiers #14

G8XSU opened this issue Oct 14, 2024 · 2 comments

Comments

@G8XSU
Copy link
Contributor

G8XSU commented Oct 14, 2024

If an identifier needs to be handled, referred to, read, or logged, it should be hex-encoded or in its string representation.

Byte arrays provide a poor user experience in these cases, making tasks like debugging and logging unnecessarily difficult.

While byte arrays are acceptable for machine-handled data (e.g., encrypted bytes, secrets, or protobufs), user-facing data, such as payment-id, channel-id, user-channel-id, and payment-hash, should be more readable.

This applies to both API input and output to reduce friction in interactions with the API.

While someone could easily do this themselves and we can keep on having byte arrays in apis, but it would be nice if clients could log/see responses directly.

@G8XSU G8XSU mentioned this issue Oct 14, 2024
13 tasks
@G8XSU
Copy link
Contributor Author

G8XSU commented Oct 21, 2024

Consider implementing to_lower_hex() in ldk for ChannelId, PaymentId, OfferId.

@G8XSU
Copy link
Contributor Author

G8XSU commented Oct 21, 2024

Consider implementing to_lower_hex() in ldk for ChannelId, PaymentId, OfferId.

Created: lightningdevkit/rust-lightning#3377

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

No branches or pull requests

1 participant