- 
                Notifications
    You must be signed in to change notification settings 
- Fork 11
spike: tree shakeable algorand client #437
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
base: main
Are you sure you want to change the base?
Conversation
| this._assetManager = assetManager | ||
| this._appManager = appManager | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're able to completely remove the dependency on the asset and app manager
| import type { AppDeployer } from './app-deployer' | ||
| import type { AppManager } from './app-manager' | ||
| import type { AssetManager } from './asset-manager' | ||
| import type { AlgoSdkClients, ClientManager } from './client-manager' | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove remove the dependency on all of the managers from the AlgorandClient
| clientManager?: Partial<InterfaceOf<ClientManager>> | ||
| accountManager?: Partial<InterfaceOf<AccountManager>> | ||
| appManager?: Partial<InterfaceOf<AppManager>> | ||
| assetManager?: Partial<InterfaceOf<AssetManager>> | ||
| appDeployer?: Partial<InterfaceOf<AppDeployer>> | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial interfaces of the managers are passed in to AlgorandClient ctor
| return this | ||
| } | ||
|  | ||
| /** | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The static methods would live in a new "Builder" class. This would be the main difference as far as users are concerned. AlgorandClient.localnet() would become something along the lines of new AlgorandClientBuilder().localnet().
Small spike to demonstrate my idea for making AlgorandClient more tree-shakeable