Set to version 2 by default

This commit is contained in:
junderw 2019-07-04 12:03:48 +09:00
parent 2b8e8001bc
commit b28c96d228
No known key found for this signature in database
GPG key ID: B256185D3A971908
4 changed files with 6 additions and 4 deletions
ts_src

View file

@ -19,6 +19,7 @@ export class Psbt extends PsbtBase {
private opts: PsbtOpts;
constructor(opts: PsbtOptsOptional = {}) {
super();
this.setVersion(2);
this.opts = Object.assign({}, DEFAULT_OPTS, opts);
// // TODO: figure out a way to use a Transaction Object instead of a Buffer
// // TODO: Caching, since .toBuffer() calls every time we get is lame.