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

solana-core: export secp256k1, add optional guardianSetData param #742

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kev1n-peters
Copy link
Collaborator

No description provided.

]]
] as const satisfies MapLevels<[Network, string, string]>;

export const [guardianKeys, guardianNames] =
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure if we should keep these and create them using just the latest guardian set

@nonergodic
Copy link
Collaborator

nonergodic commented Dec 10, 2024

I think the real answer here is adding a typedMap implementation that is similar to constMap, but instead of using literal types, it should use the widened types. It could have exactly the same functionality as constMap only that its () operator throws when a lookup fails, while .get returns the widened type or undefined.

But that's ofc a bit larger of an undertaking.

Edit: There's also the issue that since constMap does all the type conversions, it figures out automagically whether a given mapping is bijective and hence uniquely invertible (like e.g. chain ids) or whether it isn't (like chain <> platform mapping) and can hence infer whether it needs to map to an array or not.

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