Outputs in Payment Protocol


I’m trying to make Payment Details like it says here: http://bitcore.io/guide/module/payment-protocol/index.html

How do I create ‘outputs’?

I tried making an array with one Output:

var output = new bitcore.Transaction.Output({
	'script': bitcore.Script(new bitcore.Address(address)),
	'satoshis': satoshis

but that doesn’t work.

Nevermind, that was the wrong Output.
This works:

var output = new PaymentProtocol.Output();
output.set('amount', satoshis);
output.set('script', bitcore.Script(new bitcore.Address(address)).toBuffer());


Glad you were able to sort it out :slight_smile: