This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { bsv } from 'scrypt-ts' | |
async function main() { | |
const msg = 'I am Satoshi' | |
const hBuff = bsv.crypto.Hash.sha256(Buffer.from(msg)) | |
const h = bsv.crypto.BN.fromBuffer(hBuff) | |
const G = bsv.crypto.Point.getG() | |
const n = bsv.crypto.Point.getN() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
compute x % y given: q_lo = floor(x/y)&0x7fff, q_hi = floor(x/y)>>15, x_lo = x&0x7fff, x_hi = x>>15, y_lo = y&0x7ff, y_hi = y>>15 | |
<q_hi> | |
<q_lo> | |
<x_hi> | |
<x_lo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
They are NOT in order of importance and/or quality, so you should give a look to all of them. | |
(continuously updated) | |
It is likely that there will be 10 different token protocols this year (2018) | |
"Currently", even those now reported here, they are still in full development. | |
Wormhole (based on Omni) | |
- Website: http://wormhole.cash - you can change the language on upper right | |
- Spec: http://wormhole.cash/whcwhitepaper.pdf (in Chinese language) | |
- Spec ENG part 1: https://www.yours.org/content/bch-smart-contract-is-coming----wormhole-protocol-proposed-by-bitmain-1debc785b3f8 |