close
Skip to content

Add IdentityClient::from_iota_client and update examples#1765

Merged
UMR1352 merged 14 commits intomainfrom
feat/identity-client-builder
Feb 3, 2026
Merged

Add IdentityClient::from_iota_client and update examples#1765
UMR1352 merged 14 commits intomainfrom
feat/identity-client-builder

Conversation

@UMR1352
Copy link
Copy Markdown
Contributor

@UMR1352 UMR1352 commented Jan 5, 2026

Description of change

READMEs are updated to make sure users DO NOT publish their own version of the IOTA Identity package when working on official IOTA networks such as testnet or devnet.

Rust APIs for IdentityClient istantiation are also changed for the aforementioned issue. Specifically IdentityClient::new has been deprecated in favor of IdentityClient::from_iota_client.

Moreover, IdentityClientReadOnly now has no reason to be used directly by users; IdentityClient<NoSigner> - i.e the type returned by IdentityClient::from_iota_client - has the same purpose. IdentityClient<NoSigner> can be turned into a client with write capabilities through the use of IdentityClient::set_signer.

Links to any relevant issues

Closes #1759

Type of change

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

@UMR1352 UMR1352 requested a review from wulfraem January 5, 2026 14:22
@UMR1352 UMR1352 self-assigned this Jan 5, 2026
@UMR1352 UMR1352 added Documentation Improvements or additions to documentation. Excludes from changelog Wasm Related to Wasm bindings. Becomes part of the Wasm changelog Added A new feature that requires a minor release. Part of "Added" section in changelog Rust Related to the core Rust code. Becomes part of the Rust changelog. labels Jan 5, 2026
@UMR1352 UMR1352 changed the title Add IdentityClientBuilder as the new standard way to create an IdentityClient Add IdentityClient::from_iota_client and update examples Jan 21, 2026
@UMR1352 UMR1352 marked this pull request as ready for review January 21, 2026 14:55
Comment thread identity_iota_core/tests/e2e/common.rs

#[wasm_bindgen(js_name = create)]
pub async fn new(client: WasmIdentityClientReadOnly, signer: WasmTransactionSigner) -> Result<WasmIdentityClient> {
#[allow(deprecated)]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use IdentityClient::from_iota_client instead? ^^

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, IdentityClientReadOnly doesn't expose the actual IOTA client

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, was coming more from the standpoint, that we're deprecating the new function, but keep using it in the tests and WASM bindings.

I would have expected the new function not be used anymore and/or, in case of the WASM bindings, a new function to be added, that will (at some point) replace the current function, which consumes the now deprecated function, so that we could fade it out in the future.

Copy link
Copy Markdown
Contributor Author

@UMR1352 UMR1352 Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did something similar with IdentityClientReadOnly but for the TS full client the same pattern doesn't apply because we can't use the typestate pattern we use in its Rust counterpart. I was thinking of just leaving it as it is for now until we roll out 2.0.

Comment thread identity_iota_core/src/rebased/client/full_client.rs Outdated
@UMR1352 UMR1352 requested a review from wulfraem February 3, 2026 11:45
@UMR1352 UMR1352 merged commit 8118941 into main Feb 3, 2026
12 checks passed
@UMR1352 UMR1352 deleted the feat/identity-client-builder branch February 3, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Added A new feature that requires a minor release. Part of "Added" section in changelog Documentation Improvements or additions to documentation. Excludes from changelog Rust Related to the core Rust code. Becomes part of the Rust changelog. Wasm Related to Wasm bindings. Becomes part of the Wasm changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Doc] Clarify usage of official Identity package deployments in documentation

2 participants