This allows such tool to encounter the correct de/serializer by applying the ones for the providers of the program that owns a particular account.
The fitting account provider can be determined by comparing account size (if the account is fixed size) or just attempting to deserialize an account until it succeeds.
FIXES: #67
Details
accounts index file imports all account classes and re-exports them as
accountProviders
since the main generated index file has export * from './accounts'
they are exported as part of the module SDK
Summary
Tools like amman depend on deserializing accounts in order to show their data on the terminal or a UI.
Therefore solita now exports
accountProviders
similar to the below (example from mpl_token_metadata):The tool in question can then import/combine them as follow:
This allows such tool to encounter the correct de/serializer by applying the ones for the providers of the program that owns a particular account. The fitting account provider can be determined by comparing account size (if the account is fixed size) or just attempting to deserialize an account until it succeeds.
FIXES: #67
Details
accountProviders
export * from './accounts'
they are exported as part of the module SDK