Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/wasm32-identity-client' int…
Browse files Browse the repository at this point in the history
…o chore/remove-stardust
  • Loading branch information
wulfraem committed Feb 21, 2025
2 parents a32b3b0 + fe9c5cc commit 0c68fd1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export async function createIdentity(): Promise<void> {
.createIdentity(unpublished)
.finish()
.execute(identityClient);
did = IotaDID.fromAliasId(identity.id(), identityClient.network());
did = identity.didDocument().id();
} else {
console.log("Publishing document to identity");
const { output: published } = await identityClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0

import {
IotaDID,
JwkMemStore,
JwsAlgorithm,
MethodRelationship,
Expand All @@ -28,7 +27,7 @@ export async function updateIdentity() {
.createIdentity(unpublished)
.finish()
.execute(identityClient);
const did = IotaDID.fromAliasId(identity.id(), identityClient.network());
const did = identity.didDocument().id();

// Resolve the latest state of the document.
// Technically this is equivalent to the document above.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
CoreDocument,
DIDJwk,
IdentityClientReadOnly,
IotaDID,
IotaDocument,
IToCoreDocument,
Resolver,
Expand All @@ -30,7 +29,7 @@ export async function resolveIdentity() {
.createIdentity(unpublished)
.finish()
.execute(identityClient);
const did = IotaDID.fromAliasId(identity.id(), identityClient.network());
const did = identity.didDocument().id();

// Resolve the associated identity and extract the DID document from it.
const resolved = await identityClient.resolveDid(did);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2020-2023 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import { IotaDID } from "@iota/identity-wasm/node";
import { IotaClient } from "@iota/iota-sdk/client";
import { createDocumentForNetwork, getFundedClient, getMemstorage, NETWORK_URL, TEST_GAS_BUDGET } from "../util";

Expand All @@ -19,7 +18,7 @@ export async function deactivateIdentity() {
.createIdentity(unpublished)
.finish()
.execute(identityClient);
const did = IotaDID.fromAliasId(identity.id(), identityClient.network());
const did = identity.didDocument().id();

// Resolve the latest state of the document.
// Technically this is equivalent to the document above.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CoreDocument, IotaDID, IotaDocument, Resolver } from "@iota/identity-wasm/node";
import { CoreDocument, IotaDocument, Resolver } from "@iota/identity-wasm/node";
import { IotaClient } from "@iota/iota-sdk/client";
import { createDocumentForNetwork, getFundedClient, getMemstorage, NETWORK_URL } from "../util";

Expand Down Expand Up @@ -40,7 +40,7 @@ export async function customResolution() {
.createIdentity(unpublished)
.finish()
.execute(identityClient);
const did = IotaDID.fromAliasId(identity.id(), identityClient.network());
const did = identity.didDocument().id();

// Construct a Resolver capable of resolving the did:key and iota methods.
let handlerMap: Map<string, (did: string) => Promise<IotaDocument | KeyDocument>> = new Map();
Expand Down

0 comments on commit 0c68fd1

Please sign in to comment.