From 750ef68847d63046e96db43d1645d3ab6d41b230 Mon Sep 17 00:00:00 2001 From: marc2332 Date: Wed, 27 Nov 2024 10:23:36 +0100 Subject: [PATCH] use Network enum --- docs/content/references/ts-sdk/kiosk/advanced-examples.mdx | 4 ++-- .../references/ts-sdk/kiosk/kiosk-client/introduction.mdx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/content/references/ts-sdk/kiosk/advanced-examples.mdx b/docs/content/references/ts-sdk/kiosk/advanced-examples.mdx index b0e3fef6c06..1948d65c4f1 100644 --- a/docs/content/references/ts-sdk/kiosk/advanced-examples.mdx +++ b/docs/content/references/ts-sdk/kiosk/advanced-examples.mdx @@ -12,9 +12,9 @@ const otherType = `${packageId}::other_module::OtherStruct<${packageId}::other_c // initialize a kioskClient. const kioskClient = new KioskClient({ client: new IotaClient({ - url: getFullnodeUrl('testnet'), + url: getFullnodeUrl(Network.Testnet), }), - network: 'testnet', + network: Network.Testnet, }); ``` diff --git a/docs/content/references/ts-sdk/kiosk/kiosk-client/introduction.mdx b/docs/content/references/ts-sdk/kiosk/kiosk-client/introduction.mdx index 0e6e68fa800..86cfc76c1ac 100644 --- a/docs/content/references/ts-sdk/kiosk/kiosk-client/introduction.mdx +++ b/docs/content/references/ts-sdk/kiosk/kiosk-client/introduction.mdx @@ -10,17 +10,17 @@ Kiosk Client is the base for all Kiosk SDK functionality. You can follow the example to create a `KioskClient`. View next section for usage in custom networks. ```typescript -import { KioskClient } from '@iota/kiosk'; +import { KioskClient, Network } from '@iota/kiosk'; import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; // We need a IOTA Client. You can re-use the IotaClient of your project // (it's not recommended to create a new one). -const client = new IotaClient({ url: getFullnodeUrl('testnet') }); +const client = new IotaClient({ url: getFullnodeUrl(Network.Testnet) }); // Now we can use it to create a kiosk Client. const kioskClient = new KioskClient({ client, - network: 'testnet', + network: Network.Testnet, }); ```