From 13f737b92e16d81a8f3d1a2568b1bd9f2c72ffd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thoralf=20M=C3=BCller?= Date: Mon, 8 Jan 2024 10:21:55 +0100 Subject: [PATCH] Remove test example --- bindings/nodejs/examples/client/core-api.ts | 59 --------------------- 1 file changed, 59 deletions(-) delete mode 100644 bindings/nodejs/examples/client/core-api.ts diff --git a/bindings/nodejs/examples/client/core-api.ts b/bindings/nodejs/examples/client/core-api.ts deleted file mode 100644 index 66e8ce7764..0000000000 --- a/bindings/nodejs/examples/client/core-api.ts +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2023 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -import { Client, initLogger } from '@iota/sdk'; - -// Run with command: -// yarn run-example ./client/core-api.ts - -// In this example we will send some core API requests -async function run() { - initLogger(); - - const client = await Client.create({ - nodes: ['http://localhost:8050'], - }); - - try { - const nodeInfo = (await client.getInfo()).nodeInfo; - console.log(nodeInfo); - - console.log( - await client.getUtxoChanges( - '0xa2d90c226abbefec86a12aecf4c3e04c062fa1799458bd6af5f2d1a5a89e107c09000000', - ), - ); - console.log(await client.getUtxoChangesByIndex(10)); - console.log( - await client.getCommitment( - '0xa2d90c226abbefec86a12aecf4c3e04c062fa1799458bd6af5f2d1a5a89e107c09000000', - ), - ); - console.log(await client.getCommitmentByIndex(10)); - console.log( - await client.getAccountCongestion( - '0x907c02e9302e0f0571f10f885594e56d8c54ff0708ab7a39bc1b74d396b93b12', - ), - ); - console.log( - await client.getRewards( - '0x4d8d062f5dbf65ff65be52c57c2b64a83324a3f4df143273f280e75cb4a56438050000000100', - ), - ); - console.log( - await client.getValidator( - '0x907c02e9302e0f0571f10f885594e56d8c54ff0708ab7a39bc1b74d396b93b12', - ), - ); - console.log(await client.getValidators()); - console.log( - await client.getTransactionMetadata( - '0x1afdc211c167ec58529b85a3dc848370d789bd6df16cc7d37d97021d5a37cc3917000000', - ), - ); - } catch (error) { - console.error('Error: ', error); - } -} - -void run().then(() => process.exit());