Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

labraburn/ton3-core

 
 

Repository files navigation

💎 ton3-core

npm GitHub top language TON

ton3-core is a core package of ton3 inspired by tonweb to work with TON blockchain.
Visit documentation to see API reference.

⚠️ Work in progress, API can (and most likely will) be changed! This is not production ready version yet.

How to install

npm i ton3-core

Simple usage

import { BOC, Builder, Mnemonic } from 'ton3-core'

const mnemonic = new Mnemonic()

console.log(mnemonic.words) // prints mnemonic phrase
console.log(mnemonic.keys.private) // prints private key
console.log(mnemonic.keys.public) // prints public key

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

const boc = BOC.toBytesStandard(cell)
const result = BOC.fromStandard(boc)
    .parse()
    .loadString()

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

Features and status

Feature Status
Ordinary BOC (de)serialization
Builder, Cell, Slice
Hashmap (dictionary) (de)serialization
Mnemonic/keypair with bip39 + ed25519
Coins (class for Toncoin, Nanocoin e.t.c.)
Address (class for TON address)
Message layouts (such as MessageX e.t.c.)
Old "tonweb" style mnemonic support
~100% tests coverage
Pre-release code review

License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%