Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iotaledger/iota.js
IOTA JavaScript
https://github.com/iotaledger/iota.js
iota iota-javascript-library iota-library
Last synced: 9 days ago
JSON representation
IOTA JavaScript
- Host: GitHub
- URL: https://github.com/iotaledger/iota.js
- Owner: iotaledger
- Archived: true
- Created: 2016-09-10T08:49:13.000Z (about 8 years ago)
- Default Branch: dev
- Last Pushed: 2023-11-17T03:49:07.000Z (12 months ago)
- Last Synced: 2024-10-22T19:26:06.395Z (21 days ago)
- Topics: iota, iota-javascript-library, iota-library
- Language: TypeScript
- Homepage:
- Size: 31.3 MB
- Stars: 963
- Watchers: 81
- Forks: 287
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
- Support: .github/SUPPORT.md
Awesome Lists containing this project
- awesome-iota - iota.lib.js - IOTA Javascript Library (Developers / Official by the IOTA Foundation)
README
# iota.js
> This library is functionally complete, but it is recommended to use [iota.rs](https://github.com/iotaledger/iota.rs). The rust library will be more heavily maintained and is more performant.
Mono-repo containing client and supporting packages for the IOTA chrysalis network, implemented in TypeScript to strongly type the objects sent and received from the API.
Runs in both NodeJS and Browser environments.
## Prerequisites
```shell
npm install @iota/iota.js
```## Example
```js
const { SingleNodeClient } = require("@iota/iota.js");async function run() {
const client = new SingleNodeClient("https://chrysalis-nodes.iota.org");const info = await client.info();
console.log("Node Info");
console.log("\tName:", info.name);
console.log("\tVersion:", info.version);
console.log("\tIs Healthy:", info.isHealthy);
console.log("\tNetwork Id:", info.networkId);
console.log("\tLatest Milestone Index:", info.latestMilestoneIndex);
console.log("\tConfirmed Milestone Index:", info.confirmedMilestoneIndex);
console.log("\tPruning Index:", info.pruningIndex);
console.log("\tFeatures:", info.features);
console.log("\tMin PoW Score:", info.minPoWScore);
}run()
.then(() => console.log("Done"))
.catch((err) => console.error(err));
```## Packages
For more details on the main package see [@iota/iota.js](./packages/iota/README.md).
Other packages within the framework are.
* [@iota/util.js](./packages/util/README.md) - Utility classes and methods.
* [@iota/crypto.js](./packages/crypto/README.md) - Cryptographic implementations.
* [@iota/mqtt.js](./packages/mqtt/README.md) - MQTT Client.
* [@iota/pow-neon.js](./packages/pow-neon/README.md) - PoW as a multi-threaded Neon Rust binding.
* [@iota/pow-node.js](./packages/mqtt/README.md) - PoW as a multi-threaded node module.
* [@iota/pow-wasm.js](./packages/pow-wasm/README.md) - PoW as a multi-threaded WASM module.## Examples
Please find other examples in the [./packages/iota/examples](./packages/iota/examples) folder.
* Simple - Performs basic API operations.
* Address - Demonstrates address generation from a Bip39 mnemonic seed using raw and Bip32 path methods.
* Transaction - Demonstrates how to send a transaction and call some of the other higher level functions.
* Data - Storing and retrieving data on the tangle.
* Browser - Demonstrates direct inclusion and use of the library in an html page.
* Peers - Demonstrates peer management.
* Pow - Demonstrates using one of the other PoW packages.## Supporting the project
If the iota.js has been useful to you and you feel like contributing, consider submitting a [bug report](https://github.com/iotaledger/iota.js/issues/new), [feature request](https://github.com/iotaledger/iota.js/issues/new) or a [pull request](https://github.com/iotaledger/iota.js/pulls/).
See our [contributing guidelines](.github/CONTRIBUTING.md) for more information.
## Joining the discussion
If you want to get involved in the community, need help with getting set up, have any issues or just want to discuss IOTA, feel free to join our [Discord](https://discord.iota.org/).
## License
The separate packages all contain their own licenses.