Synopsis
This libary provides basic functions for creating and validating tx's
Installation
npm install dfinity-tx
Usage
const DfinityTx = require('dfinity-tx')
const crypto = require('crypto')
const tx = new DfinityTx({
version: 0,
to: new Uint8Array(20),
caps: 4,
ticks: 1000,
ticksPrice: 0,
nonce: 0,
data: new Uint8Array([])
})
tx.ticks
tx.nonce = 1
const secretKey = crypto.randomBytes(32)
const signedTx = await tx.sign(sk)
const tx2 = DfinityTx.deserialize(signedTx)
tx2.publicKey
API
./docs/
Specification
./docs/
License
(C) 2017 DFINITY STIFTUNG
All code and designs are open sourced under GPL V3.