Get up and running quickly with Atomic Toolkit’s simple installation and setup process.
npm install atomic-toolkit
import AtomicToolkit from 'atomic-toolkit';
const key = JSON.parse(readFileSync('wallet.json').toString()); const toolkit = new AtomicToolkit({ key: key, });
import Irys from '@irys/sdk'; const irys = new Irys({ url: 'https://node2.irys.xyz', token: 'matic', key: 'your-private-key', }); await irys.ready(); const toolkit = new AtomicToolkit({ irys: irys, });
const toolkit = new AtomicToolkitWeb({}); // Simple Text File const file = new File(['hello world'], 'hello.txt', { type: 'text/plain', }); const res = await toolkit.assets.createAtomicAsset(file, { initialState: { ticker: 'HELLO', name: 'Hello World', balances: { '9WQ7xH2LOuqfAccjGquck8eaKARg1vMhRJaOo3LJL14': 1, }, claimable: [], }, discoverability: { title: 'Hello World', description: 'Hello World', type: 'text', }, }); console.log(res.contractTxId); console.log(res?.srcTxId); // F4YEvnMmcFFBtF0Qe4Hycl_6Ocgr-fBCoCdIuJSYUI8 // Of9pi--Gj7hCTawhgxOwbuWnFI1h24TTgO5pw8ENJNQ
Was this page helpful?