Skip to content

thanhnp95/chainsig-dcr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build wasm file

GOOS=js GOARCH=wasm go build -o dcr.wasm .

Then you can use the generated dcr.wasm file and wasm_exec.js file to copy and use. wasm_exec.js is located at: $(go env GOROOT)/misc/wasm/wasm_exec.js

Supported functions

The following functions can be extracted and used from the wasm file::

  • deriveAddress(pubKeyHex string, network string) return (address string)
  • buildUnsignedTx(inputs []Array, outputs []Array, lockTime number, expiry number, network string) return (unsignedTxHex string, hashesToSign []string)
  • getPkScript(address string, network string) return (scriptVersion number, scriptPubKey string)
  • applySignatures(unsignedTxHex string, signatures []string, pubKeyHex string) return (signedTxHex string)

About

Define functions to build wasm files to support Decred in chainsig.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages