Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
+ /* hashAlgo */ 1
+ hash.byteLength
+ /* hashCount */ 1
+ /* timeout */ 4;
const buffer = new Nimiq.SerialBuffer(bufferSize);
sender.serialize(buffer);
recipient.serialize(buffer);
buffer.writeUint8(hashAlgo);
buffer.write(hash);
buffer.writeUint8(hashCount);
buffer.writeUint32(timeout);
recipient = Nimiq.Address.CONTRACT_CREATION;
const recipientType = Nimiq.Account.Type.HTLC;
const flags = Nimiq.Transaction.Flag.CONTRACT_CREATION;
return new Nimiq.ExtendedTransaction(sender, Nimiq.Account.Type.BASIC, recipient, recipientType,
value, 0, $.blockchain.height + 1, flags, buffer);
}const bufferSize = sender.serializedSize
+ recipient.serializedSize
+ /* hashAlgo */ 1
+ hash.byteLength
+ /* hashCount */ 1
+ /* timeout */ 4;
const buffer = new Nimiq.SerialBuffer(bufferSize);
sender.serialize(buffer);
recipient.serialize(buffer);
buffer.writeUint8(hashAlgo);
buffer.write(hash);
buffer.writeUint8(hashCount);
buffer.writeUint32(timeout);
recipient = Nimiq.Address.CONTRACT_CREATION;
const recipientType = Nimiq.Account.Type.HTLC;
const flags = Nimiq.Transaction.Flag.CONTRACT_CREATION;
return new Nimiq.ExtendedTransaction(sender, Nimiq.Account.Type.BASIC, recipient, recipientType,
value, 0, $.blockchain.height + 1, flags, buffer);
}