Skip to content

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

Open
kev1n-peters wants to merge 1 commit into
mainfrom
sig-verify-opt-param
Open

solana-core: export secp256k1, add optional guardianSetData param#742
kev1n-peters wants to merge 1 commit into
mainfrom
sig-verify-opt-param

Conversation

@kev1n-peters

Copy link
Copy Markdown
Collaborator

No description provided.

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

export const [guardianKeys, guardianNames] =

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.

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

@nonergodic

nonergodic commented Dec 10, 2024

Copy link
Copy Markdown
Contributor

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