ton3-core is a TON blockchain low-level API implementation.
Visit documentation to see API reference.
npm i ton3-core
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
- Bag of Cells (BOC) (de)serialization
- Cell
- Builder
- Slice
- Hashmap (de)serialization
- HashmapE (de)serialization
- Coins (TON, NANOTON, JETTON, etc.)
- Address
- Contracts
You can support library author by sending any amount of TON to address below
EQDwxdFSZfY-wI0Udq-YQjVgTYJmyACIhNczwQuAWhf0dkUH
MIT License