Skip to content

Commit

Permalink
Merge branch 'develop' into fix-wasm-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
Thoralf-M authored Apr 15, 2024
2 parents 5ac886b + 8dd0d73 commit f14f7ce
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions bindings/nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,17 @@ calling [`Client.getInfo()`](https://wiki.iota.org/shimmer/iota-sdk/references/n
and then print the node's information.

```javascript
const { Client, initLogger } = require('@iota/sdk');
import { Client } from '@iota/sdk';

// In this example we will get information about the node
async function run() {
initLogger();

const client = new Client({
nodes: ['https://api.testnet.shimmer.network'],
localPow: true,
});

try {
const nodeInfo = await client.getInfo();
console.log('Node info: ', nodeInfo);
const nodeInfo = (await client.getInfo()).nodeInfo;
console.log(nodeInfo);
} catch (error) {
console.error('Error: ', error);
}
Expand Down

0 comments on commit f14f7ce

Please sign in to comment.