Skip to content

sicarius97/tetanus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tetanus

Blockchain interaction library (specifically for Hive) with wasm bindings for javascript. Tetanus is available as an npm package that you can use natively and will soon also be available as a crate for rust. Currently, canonical signatures and wif represented keys that can be generated with this library are also compatible with various other Hive/Eos libraries such as dhive, hivejs, eosio-ecc, and more!

Why this library?

I created this library due to the lack of there being a javascript library for hive that met all of the below criteria:

  • Smaller than 500kb unpacked
  • Tree shakeable when packing with things like Webpack
  • Fast
  • Well typed
  • Well tested
  • Well documented

Does this library satisfy all of that criteria?

Almost!

Here's what it does satisfy so far:

  • Smaller than 500kb unpacked (currently around 160kb)
  • Tree shakeable
  • Fast
  • Well typed (better than can be natively done in typescript)
  • Well tested (unit tests for 90% of the codebase and wasm integration tests for major functions)
  • Well Documented (almost! great in code "jsdoc" style docs but doc site will be coming)

Install and use

Install tetanus:

npm install tetanus

Use tetanus:

import { PrivateKey } from 'tetanus'

// generates a private key
let privateKey = PrivateKey.from_login('test', 'test', 'owner');

// generates a base58 encoded wif string (standard for hive) of the private key
let wif = privateKey.to_string()

// generates a signature string
let signature = privateKey.sign("test").to_string()

About

Blockchain interaction library (specifically hive) with wasm bindings for javascript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages