tornado-nova/src/index.ts

15 lines
373 B
TypeScript
Raw Normal View History

2020-04-09 11:04:06 +02:00
import BigNumber from "bignumber.js"
2020-04-10 11:58:17 +02:00
import { Utxo } from './Utxo'
const { bigInt } = require('snarkjs')
const crypto = require('crypto')
const rbigint = (nbytes = 31) => bigInt.leBuff2int(crypto.randomBytes(nbytes))
2020-04-09 11:04:06 +02:00
async function main() {
2020-04-10 11:58:17 +02:00
const zeroUtxo = new Utxo(bigInt(0), rbigint(), rbigint())
console.log('zeroUtxo publicKey', zeroUtxo.publicKey())
2020-04-09 11:04:06 +02:00
}
main()