ton3-core
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

💎 ton3-core

npm GitHub top language TON

ton3-core is a TON blockchain low-level API implementation.
Visit documentation to see API reference.

How to install

npm i ton3-core

Primitive example

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

Readme

Keywords

Package Sidebar

Install

npm i ton3-core

Weekly Downloads

136

Version

1.0.1

License

MIT

Unpacked Size

318 kB

Total Files

87

Last publish

Collaborators

  • tjifyodor