Skip to content

Use Address from Solana SDK #118

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

Draft
wants to merge 3 commits into
base: febo/sdk-program-error
Choose a base branch
from

Conversation

febo
Copy link
Collaborator

@febo febo commented Apr 1, 2025

Problem

A Pubkey is currently being represented as a lightweight alias over a [u8; 32] array. This is different from the Pubkey type on Solana SDK, which makes it confusing to write code that supports both pubkey "types".

Solution

Use the new Address type from Solana SDK instead. An Address is also defined as an alias over [u8; 32], so the breaking change is limited to the import of the type. The SDK provides helpers methods to convert to/from an Address for the SDK's Pubkey.

@febo febo added the breaking PR contains breaking changes label Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking PR contains breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant