Skip to content

Commit

Permalink
use tabs for Node.js and Web
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-tortora committed Dec 12, 2023
1 parent 6265826 commit aa25346
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions docs/build/iota-sdk/1.0/docs/getting-started/wasm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@ A bundler such as [webpack](https://webpack.js.org/) or [rollup](https://rollupj

### Client

#### Node.js

After you [installed the library](#install-the-iota-sdk), you can create a `Client` instance and interface with it.

The following example creates a [`Client`](https://wiki.iota.org/shimmer/iota-sdk/references/nodejs/classes/Client/)
Expand All @@ -164,23 +162,26 @@ the [Shimmer Testnet](https://api.testnet.shimmer.network), and retrieves the no
calling [`Client.getInfo()`](https://wiki.iota.org/shimmer/iota-sdk/references/nodejs/classes/Client/#getinfo),
and then print the node's information.

<Tabs groupId="usage" queryString>
<TabItem value="Node.js" label="Node.js">
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/wasm/README.md#L127-L145
```

</div>

#### Web

</TabItem>
<TabItem value="Web" label="Web">
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/wasm/README.md#L151-L168
```

</div>
</TabItem>
</Tabs>

### Wallet

Expand All @@ -194,26 +195,28 @@ by calling
the [`Wallet.createAccount(data)`](https://wiki.iota.org/iota-sdk/references/nodejs/classes/Wallet/#createaccount)
function.

#### Node.js


<Tabs groupId="usage" queryString>
<TabItem value="Node.js" label="Node.js">
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/wasm/README.md#L184-L208
```

</div>

#### Web

</div>
</TabItem>
<TabItem value="Web" label="Web">
<div className={'hide-code-block-extras'}>

```typescript reference
https://github.com/iotaledger/iota-sdk/blob/develop/bindings/wasm/README.md#L214-L239
```

</div>
</TabItem>
</Tabs>

## What's Next?

Expand Down

0 comments on commit aa25346

Please sign in to comment.