在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:iotaledger/iota.js开源软件地址:https://github.com/iotaledger/iota.js开源编程语言:TypeScript 80.2%开源软件介绍:iota.js
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. Prerequisitesnpm install @iota/iota.js Exampleconst { 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)); PackagesFor more details on the main package see @iota/iota.js. Other packages within the framework are.
ExamplesPlease find other examples in the ./packages/iota/examples folder.
Supporting the projectIf the iota.js has been useful to you and you feel like contributing, consider submitting a bug report, feature request or a pull request. See our contributing guidelines for more information. Joining the discussionIf 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. LicenseThe separate packages all contain their own licenses. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论