Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const script = this.app.env.bitcoin.script.compile([
- hashOpcode,
- Buffer.from(secretHash, "hex"),
- this.app.env.bitcoin.opcodes.OP_EQUALVERIFY,
- Buffer.from(recipientPublicKey, "hex"),
- this.app.env.bitcoin.opcodes.OP_EQUAL,
- this.app.env.bitcoin.opcodes.OP_IF,
- Buffer.from(recipientPublicKey, "hex"),
- this.app.env.bitcoin.opcodes.OP_CHECKSIG
- ])
- Buffer.from(recipientPublicKey, "hex"),
- this.app.env.bitcoin.opcodes.OP_EQUAL,
- this.app.env.bitcoin.opcodes.OP_AND,
- Buffer.from(exchangePublicKey, "hex"),
- this.app.env.bitcoin.opcodes.OP_EQUAL,
- this.app.env.bitcoin.opcodes.OP_IF,
- Buffer.from(recipientPublicKey, "hex"),
- this.app.env.bitcoin.opcodes.OP_CHECKMULTISIG,
- this.app.env.bitcoin.opcodes.OP_AND,
- Buffer.from(exchangePublicKey, "hex"),
- this.app.env.bitcoin.opcodes.OP_CHECKMULTISIG,
- this.app.env.bitcoin.opcodes.OP_ELSE,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement