Skip to content

Commit

Permalink
Use default import from sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippGackstatter committed Aug 2, 2023
1 parent 1220dcb commit 6c7ca17
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bindings/wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ new CopyWebPlugin({
### Web Usage

```typescript
import * as sdk from "@iota/sdk-wasm/web";
import init, { Client } from "@iota/sdk-wasm/web";
import * as identity from "@iota/identity-wasm/web";

// The endpoint of the IOTA node to use.
Expand All @@ -241,7 +241,7 @@ const EXAMPLE_JWK = new identity.Jwk({
/** Demonstrate how to create a DID Document. */
async function createDocument() {
// Create a new client with the given network endpoint.
const iotaClient = new sdk.Client({
const iotaClient = new Client({
primaryNode: API_ENDPOINT,
localPow: true,
});
Expand Down Expand Up @@ -280,8 +280,7 @@ async function createDocument() {
console.log(`Created document `, JSON.stringify(document.toJSON(), null, 2));
}

sdk
.init()
init()
.then(() => identity.init())
.then(() => {
await createDocument();
Expand All @@ -290,7 +289,7 @@ sdk
// or

(async () => {
await sdk.init();
await init();
await identity.init();

await createDocument();
Expand Down

0 comments on commit 6c7ca17

Please sign in to comment.