Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/labraburn/node-tonlib
NodeJS wrapper for tonlibjson
https://github.com/labraburn/node-tonlib
nodejs ton tonlib tonlibjson
Last synced: about 2 months ago
JSON representation
NodeJS wrapper for tonlibjson
- Host: GitHub
- URL: https://github.com/labraburn/node-tonlib
- Owner: labraburn
- License: mit
- Archived: true
- Created: 2022-08-25T19:00:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-27T00:36:33.000Z (over 2 years ago)
- Last Synced: 2024-10-11T12:33:39.638Z (2 months ago)
- Topics: nodejs, ton, tonlib, tonlibjson
- Language: C++
- Homepage:
- Size: 7.43 MB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ton - labraburn/node-tonlib - C++ addon for Node.js to work with tonlibjson. (🧑💻 Get Coding / Libraries)
README
# node-tonlib
NodeJS wrapper for [tonlibjson](https://github.com/ton-blockchain/ton/tree/master/tonlib/tonlib) written as c++ addon.
- Binaries can be located here - [pytonlib](https://github.com/toncenter/pytonlib/tree/main/pytonlib/distlib)
- Works on `Ubuntu 20.04`, `macOS Mojave`## Installation
```
npm install node-tonlib
```## Usage
```ts
import tonlib from "node-tonlib";
import fetch from "node-fetch";const configuration: tonlib.Configuration = await (
await fetch("https://ton.org/global-config.json")
).text();const client = new tonlib.Client({
configuration: configuration,
keystorePath: `${__dirname}/keystore`,
network: "mainnet",
});await this.client
.send({
"@type": "raw.getAccountState",
account_address: {
account_address: "EQCd3ASamrfErTV4K6iG5r0o3O_hl7K_9SghU0oELKF-sxDn",
},
})
.then((res) => {
console.log(res);
});
```