-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(sdk): improve npm documentation (#4205)
* feat(sdk): add a bit of context to readmes of TS SDK * feat(sdk): remove the migration part in the readme of the kiosk * docs: update node version to 20 * docs: update node version to 20 * docs(sdk): improve the kiosk readme by adding instalation script * docs(sdk): improve titles * fix(sdk): improve Note text in all sdk readmes * fix(sdk): improve Note text and Setup section in the readme * fix(sdk): modify on by in * fix(sdk): improve ts code in kiosk readme * fix(sdk): dprint format * docs(sdk): improve the text of the readmes * fix: update node version in package.json of the wallet-dashboard * fix: update Network type
- Loading branch information
Showing
14 changed files
with
72 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,41 @@ | ||
# Kiosk SDK | ||
|
||
`@iota/kiosk` is part of the **IOTA Rebased SDK**, designed specifically for interacting with the IOTA Rebased protocol. | ||
|
||
> **Note**: This package is currently supported **only in Testnet and Devnet**, it is **not yet supported in Mainnet**. | ||
This Kiosk SDK library provides different utilities to interact/create/manage a | ||
[Kiosk](https://github.com/iotaledger/iota/tree/main/kiosk). | ||
[Kiosk](https://github.com/iotaledger/iota/tree/develop/kiosk). | ||
|
||
[You can read the documentation and see examples by clicking here.](https://docs.iota.org/references/ts-sdk/kiosk) | ||
|
||
[If you are migrating from `0.6.x`, you can follow these instructions](https://docs.iota.org/references/ts-sdk/kiosk/from-v1) | ||
## Install | ||
|
||
To use the Kiosk SDK in your project, run the following command in your project root: | ||
|
||
```sh npm2yarn | ||
npm i @iota/kiosk @iota/iota-sdk | ||
``` | ||
|
||
To use the Kiosk SDK, you must create a [KioskClient](https://docs.iota.org/references/ts-sdk/kiosk/kiosk-client/introduction) instance. | ||
|
||
## Setup | ||
|
||
You can follow this example to create a KioskClient. | ||
|
||
```typescript | ||
import { KioskClient } from '@iota/kiosk'; | ||
import { getFullnodeUrl, IotaClient, Network } 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(Network.Testnet) }); | ||
|
||
// Now we can use it to create a kiosk Client. | ||
const kioskClient = new KioskClient({ | ||
client, | ||
network: Network.Testnet, | ||
}); | ||
``` | ||
|
||
You can read the KioskClient documentation to query kiosk data [here](https://docs.iota.org/references/ts-sdk/kiosk/kiosk-client/querying). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters