Skip to content

Commit

Permalink
use Network enum
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Nov 27, 2024
1 parent f5be9b2 commit 750ef68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/content/references/ts-sdk/kiosk/advanced-examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
```

Expand Down

0 comments on commit 750ef68

Please sign in to comment.