Skip to content
A JS Library for Tezos
JavaScript TypeScript
Branch: master
Clone or download
AndrewKishino Merge pull request #54 from AndrewKishino/dev
Add verify for all curves, Update dependencies
Latest commit 30742da Feb 7, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist Generate 24 word mnemonic, Fix simulateOperation Jan 27, 2020
docs Add verify for all curves, Update dependencies Jan 8, 2020
lib
src Generate 24 word mnemonic, Fix simulateOperation Jan 27, 2020
tests
.documentation.yml
.eslintignore 0.5.4 Sep 23, 2019
.eslintrc
.gitignore Include lib Sep 23, 2019
.prettierignore Add support for PsBabyM1 protocol, Added prettier config Oct 15, 2019
.prettierrc Add support for PsBabyM1 protocol, Added prettier config Oct 15, 2019
.travis.yml * Fix Proto 005 parameter forging Sep 21, 2019
LICENSE Initial commit May 10, 2018
README.md Include lib Sep 23, 2019
index.js Add verify for all curves, Update dependencies Jan 8, 2020
package-lock.json Generate 24 word mnemonic, Fix simulateOperation Jan 27, 2020
package.json Generate 24 word mnemonic, Fix simulateOperation Jan 27, 2020
tsconfig.json
webpack.node.config.js
webpack.web.config.js

README.md

Sotez - A JS Library for Tezos

npm Build Status

Getting Started

npm install sotez
// Import library or individual modules
import Sotez, { utility, forge, crypto, ledger } from 'sotez';

// Or using require
const Sotez = require('sotez').default;
const { utility, forge, crypto, ledger } = require('sotez');
const sotez = new Sotez('http://127.0.0.1:8732');

const example = async () => {
  // A secret key or a ledger must be imported to sign transactions
  // await sotez.importLedger();
  await sotez.importKey('...');

  // A simple transfer operation
  const { hash } = await sotez.transfer({
    to: 'tz1RvhdZ5pcjD19vCCK9PgZpnmErTba3dsBs',
    amount: '1000000',
  });

  console.log(`Injected Operation Hash: ${hash}`);

  // Await confirmation of included operation
  const block = await sotez.awaitOperation(hash);
  console.log(`Operation found in block ${block}`);
};

sotez.query('/chains/main/blocks/head')
  .then(response => console.log(response));

crypto.generateMnemonic()
  .then(mnemonic => console.log(mnemonic));

Documentation

Documentation can be found HERE.

Development

npm install
npm run build

Compiled files will be located in the lib folder. Distribution files will be located in the dist/node and dist/web folders.

License

MIT

Credits

Credits to Stephen Andrews and EZTZ.

You can’t perform that action at this time.