jton-contracts

0.10.0 • Public • Published

jTON contracts

cover Free TON contracts in jTON classes.

Content table

Requirements

requirements

Installation

yarn

yarn add jton-contracts

npm

npm i jton-contracts

Contracts

Example

import {GiverV2, GiverV2SeKeys} from 'jton-contracts/dist/tonlabs/GiverV2'
import {TonClient} from '@tonclient/core'
import {libNode} from '@tonclient/lib-node'
import {createClient} from 'jton/src/utils/index'

async function run(): Promise<void> {
  TonClient.useBinaryLibrary(libNode)
  const client: TonClient = new TonClient({
    network: {
      server_address: 'http://localhost:8080'
    }
  })
  const giverV2: GiverV2 = new GiverV2(client, GiverV2SeKeys)
  await giverV2.sendTransaction({
    dest: '0:0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff',
    value: 1_000_000_000
  })
}
run().then().catch(e => console.log(e))

TODO

  • Automate checking and downloading the latest versions of contracts from other repositories
  • Automate contract wrapping
  • Tests
  • Docs

Package Sidebar

Install

npm i jton-contracts

Weekly Downloads

1

Version

0.10.0

License

GPL-3.0-only

Unpacked Size

661 kB

Total Files

345

Last publish

Collaborators

  • kokkekpek