A need has arisen to integrate chains that do not support CosmJS as such the way that the AndromedaClient class interacts with these chains must be through a different SDK. This also includes the generation of wallets, primarily for the CLI.
Implementation
The API used to interact with a chain has been abstracted away from CosmJS in to a ChainClient interface that exposes methods that resemble those exposed by CosmJS. Using this chains can be integrated in to the AndromedaClient class by implementing these functions and then created when connecting to a particular chain. The following clients were added:
CosmClient
InjectiveClient
TerraClient
Each of these implements their own SDK, terra.js for TerraClient, @injectivelabs/sdk-ts for InjectiveClient and then cosmjs for CosmClient (what was used previously.
Each of these clients has primarily unique implementations of each method. The clients are abstracted to the AndromedaClient and created dynamically dependent on the chain being used so that a developer/user will be unaware. They are exposed so if the user wishes to use them directly they may.
Testing
Each client and method combination was tested using the CLI on chain.
Motivation
A need has arisen to integrate chains that do not support CosmJS as such the way that the
AndromedaClient
class interacts with these chains must be through a different SDK. This also includes the generation of wallets, primarily for the CLI.Implementation
The API used to interact with a chain has been abstracted away from CosmJS in to a
ChainClient
interface that exposes methods that resemble those exposed by CosmJS. Using this chains can be integrated in to theAndromedaClient
class by implementing these functions and then created when connecting to a particular chain. The following clients were added:CosmClient
InjectiveClient
TerraClient
Each of these implements their own SDK,
terra.js
forTerraClient
,@injectivelabs/sdk-ts
forInjectiveClient
and thencosmjs
forCosmClient
(what was used previously.Each of these clients has primarily unique implementations of each method. The clients are abstracted to the
AndromedaClient
and created dynamically dependent on the chain being used so that a developer/user will be unaware. They are exposed so if the user wishes to use them directly they may.Testing
Each client and method combination was tested using the CLI on chain.
Notes
N/A
Future work
N/A