# ton3-core

> TON low-level API tools

Latest version **1.0.1** (published 2023-02-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install ton3-core
pnpm add ton3-core
yarn add ton3-core
bun add ton3-core
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2023-02-06 |
| First published | 2022-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 310.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Tonkite |
| Maintainers | tjifyodor |
| Keywords | ton, boc, cell, blockchain |

## Links

- npm: https://www.npmjs.com/package/ton3-core
- Repository: https://github.com/tonkite/ton3-core
- Homepage: https://github.com/tonkite/ton3-core#readme
- Issues: https://github.com/tonkite/ton3-core/issues
- npm.io page: https://npm.io/package/ton3-core

## Dependencies (3)

- [tweetnacl](https://npm.io/package/tweetnacl.md) 1.0.3
- [decimal.js](https://npm.io/package/decimal.js.md) 10.3.1
- [@noble/hashes](https://npm.io/package/@noble/hashes.md) 1.1.2

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2023-02-06
- 1.0.0 — 2023-02-06
- 0.0.21 — 2022-12-31
- 0.0.20 — 2022-12-20
- 0.0.19 — 2022-11-03
- 0.0.18 — 2022-10-22
- 0.0.17 — 2022-09-02
- 0.0.16 — 2022-08-19
- 0.0.15 — 2022-08-04
- 0.0.14 — 2022-07-27
- 0.0.13 — 2022-06-20
- 0.0.12 — 2022-05-23
- 0.0.11 — 2022-05-01
- 0.0.10 — 2022-05-01
- 0.0.9 — 2022-04-23
- … 8 more at https://npm.io/package/ton3-core/versions

## README

## 💎 ton3-core

[![npm](https://img.shields.io/npm/v/ton3-core)](https://www.npmjs.com/package/ton3-core) 
![GitHub top language](https://img.shields.io/github/languages/top/tonkite/ton3-core) 
[![TON](https://img.shields.io/badge/based%20on-The%20Open%20Network-blue)](https://ton.org/)

ton3-core is a [TON blockchain](https://ton.org) low-level API implementation.\
Visit [documentation](./docs/) to see API reference.

## How to install
```
npm i ton3-core
```

## Primitive example
```typescript
import { BOC, Builder } from 'ton3-core'

const text = 'Hello, World!'
const cell = new Builder()
    .storeString(text)
    .cell()

// Serialize BOC to Uint8Array
const serialized = BOC.toBytes([ cell ])
// Deserialize BOC from Uint8Array and get first root cell
const [ deserialized ] = BOC.from(serialized)
const result = deserialized.slice().loadString()

console.log(text === result) // true
```

## Features
- Bag of Cells (BOC) (de)serialization
- Cell
- Builder
- Slice
- Hashmap (de)serialization
- HashmapE (de)serialization
- Coins (TON, NANOTON, JETTON, etc.)
- Address
- Contracts

## Donations
You can support library author by sending any amount of TON to address below
```
UQCcJpog-XAzY7tK6uqCd6QrEBlgocPXdXgIG3ev1Dxg5dl2
```

## License

MIT License

---
_Source: https://npm.io/package/ton3-core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
