payments: rename p2data to embed

This commit is contained in:
Daniel Cousens 2018-07-11 17:27:44 +10:00
parent 44c13665c8
commit de90fea0ac
6 changed files with 63 additions and 63 deletions

View file

@ -44,14 +44,14 @@
},
"details": [
{
"description": "p2data",
"description": "embed",
"data": [
"a3b147dbe4a85579fc4b5a1811e76620560e07267e62b9a0d6858f9127735cadd82f67e06c24dbc4"
],
"output": "OP_RETURN a3b147dbe4a85579fc4b5a1811e76620560e07267e62b9a0d6858f9127735cadd82f67e06c24dbc4"
},
{
"description": "p2data",
"description": "embed",
"data": [
"a3b147dbe4a85579fc4b5a1811e76620560e0726",
"7e62b9a0d6858f9127735cadd82f67e06c24dbc4"

View file

@ -91,9 +91,9 @@ describe('bitcoinjs-lib (transactions)', function () {
const txb = new bitcoin.TransactionBuilder(regtest)
const data = Buffer.from('bitcoinjs-lib', 'utf8')
const p2data = bitcoin.payments.p2data({ data: [data] })
const embed = bitcoin.payments.embed({ data: [data] })
txb.addInput(unspent.txId, unspent.vout)
txb.addOutput(p2data.output, 1000)
txb.addOutput(embed.output, 1000)
txb.addOutput(regtestUtils.RANDOM_ADDRESS, 1e5)
txb.sign(0, keyPair)

View file

@ -3,7 +3,7 @@
const assert = require('assert')
const u = require('./payments.utils')
;['p2data', 'p2ms', 'p2pk', 'p2pkh', 'p2sh', 'p2wpkh', 'p2wsh'].forEach(function (p) {
;['embed', 'p2ms', 'p2pk', 'p2pkh', 'p2sh', 'p2wpkh', 'p2wsh'].forEach(function (p) {
describe(p, function () {
const fn = require('../src/payments/' + p)
const fixtures = require('./fixtures/' + p)