@baobui is on PowPing!

PowPing is a place where you can earn Bitcoin simply by socializing, for FREE.
Never tried Bitcoin? It's OK! Just come, socialize, and earn Bitcoin.
Check out baobui's activities

Bitcoin Script

visit channel home
Total Economy: 0.02 USD
Hi guys, Do you know a setup that can run a simple "hello world" Bitcoin Script? Thanks,
venezia tipped:
0.01 USD
1 year ago
It's so cool to see more and more people interested in Bitcoin Script! I test the opcodes in this way: 1. clone the bsv js repo: https://github.com/scrypt-sv/bsv 2. add these line below in `index.js` 3. run `node index.js` ``` let c = 'OP_2 OP_2 OP_ADD OP_EQUAL' let s = bsv.Script.fromASM(c); let i = bsv.Script.Interpreter(); i.flags = bsv.Script.Interpreter.SCRIPT_ENABLE_MAGNETIC_OPCODES | bsv.Script.Interpreter.SCRIPT_ENABLE_MONOLITH_OPCODES; i.script = s; i.evaluate(); console.log(i); ```
light replied:
Hrmm, I get a dependency error for the bn package... Error: Cannot find module 'bn.js' ... at Object.<anonymous> (/tmp/bsv/lib/crypto/bn.js:3:10) $ file lib/crypto/bn.js lib/crypto/bn.js: ASCII text Could this be a Mac thing? I'm using Node v14.8.0
venezia replied:
Did you run `npm install` ?
light replied:
Aha, that worked. One of these days I'm going to have to sit down and learn more about NodeJS... I'm more familiar with Perl, Python, Bash and IAC tools.
venezia tipped:
0.02 USD
1 year ago
venezia replied:
Great! I forgot that step, it's my mistake 😅 You can also use your favorite language to create cool things about Bitcoin.