sCrypt-Inc / scryptTS-docs

https://docs.scrypt.io
11 stars 7 forks source link

inline ASM doc #138

Closed xhliu closed 5 months ago

xhliu commented 1 year ago

using an example such as p2pkh https://scryptworkspace.slack.com/archives/CLSHPUZC3/p1683724043601359

msinkec commented 1 year ago

https://github.com/sCrypt-Inc/scryptTS-docs/pull/153/commits/569521af56202b90b4efa8feecc5684209fedf15

xhliu commented 1 year ago
  1. Use p2pkh as an example, simpler
  2. merge apply_asm_optim.sh & replaceFuncBodyAsm.js -> apply_asm.ts: no need for two files. Put apply_asm.ts in the project when it is created using CLI.
  3. make sure this works: https://scryptdoc.readthedocs.io/en/latest/asm.html#assembly-variable
  4. Put asm into a single json, not separate .asm files.
{
       "P2PKH" : {
          "unlock": "OP_3 OP_PICK 11 OP_PICK OP_MUL 12 OP_PICK OP_4"
       }
}
msinkec commented 1 year ago

https://github.com/sCrypt-Inc/scryptTS-docs/pull/165