identity.rs
identity.rs copied to clipboard
[Task] Refactor `IotaIdentityClient` interface
Description
Refactor the IotaIdentityClient
trait/interface to:
pub trait IotaIdentityClient {
/// Returns the NetworkInfo of the connected IOTA node.
async fn get_network_info(&self) -> Result<NetworkInfo>;
/// Resolve an Alias identifier, returning its latest [`OutputId`] and [`AliasOutput`].
async fn get_alias_output(&self, alias_id: AliasId) -> Result<(OutputId, AliasOutput)>;
}
Motivation
The interface currently has three specialized methods for individual parts of the larger network info object. We can simplify this for implementations of the interface.
Resources
Link to any resources relevant for the task such as issues, PRs, reference implementations, or specifications.
To-do list
Create a task-specific to-do list. Please link PRs that match the TODO list item behind the item after it has been submitted.
- [ ] Refactor the Rust trait
- [ ] Refactor the TS interface
Change checklist
Add an x
to the boxes that are relevant to your changes, and delete any items that are not.
- [ ] The feature or fix is implemented in Rust and across all bindings whereas possible.
- [ ] The feature or fix has sufficient testing coverage
- [ ] All tests and examples build and run locally as expected
- [ ] Every piece of code has been document according to the documentation guidelines.
- [ ] If conceptual documentation (mdbook) and examples highlighting the feature exist, they are properly updated.
- [ ] If the feature is not currently documented, a documentation task Issue has been opened to address this.