Just some ideas, TODO mostly.
This commit is contained in:
parent
4644e9d2eb
commit
354d67a31a
2 changed files with 24 additions and 0 deletions
12
src/psbt.js
12
src/psbt.js
|
@ -6,9 +6,21 @@ const payments = require('./payments');
|
||||||
const bscript = require('./script');
|
const bscript = require('./script');
|
||||||
const transaction_1 = require('./transaction');
|
const transaction_1 = require('./transaction');
|
||||||
class Psbt extends bip174_1.Psbt {
|
class Psbt extends bip174_1.Psbt {
|
||||||
|
// protected __TX: Transaction;
|
||||||
constructor(network) {
|
constructor(network) {
|
||||||
super();
|
super();
|
||||||
this.network = network;
|
this.network = network;
|
||||||
|
// // 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.
|
||||||
|
// this.__TX = Transaction.fromBuffer(this.globalMap.unsignedTx!);
|
||||||
|
// delete this.globalMap.unsignedTx;
|
||||||
|
// Object.defineProperty(this.globalMap, 'unsignedTx', {
|
||||||
|
// enumerable: true,
|
||||||
|
// writable: false,
|
||||||
|
// get(): Buffer {
|
||||||
|
// return this.__TX.toBuffer();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
canFinalize(inputIndex) {
|
canFinalize(inputIndex) {
|
||||||
const input = utils_1.checkForInput(this.inputs, inputIndex);
|
const input = utils_1.checkForInput(this.inputs, inputIndex);
|
||||||
|
|
|
@ -9,8 +9,20 @@ import * as bscript from './script';
|
||||||
import { Transaction } from './transaction';
|
import { Transaction } from './transaction';
|
||||||
|
|
||||||
export class Psbt extends PsbtBase {
|
export class Psbt extends PsbtBase {
|
||||||
|
// protected __TX: Transaction;
|
||||||
constructor(public network?: Network) {
|
constructor(public network?: Network) {
|
||||||
super();
|
super();
|
||||||
|
// // 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.
|
||||||
|
// this.__TX = Transaction.fromBuffer(this.globalMap.unsignedTx!);
|
||||||
|
// delete this.globalMap.unsignedTx;
|
||||||
|
// Object.defineProperty(this.globalMap, 'unsignedTx', {
|
||||||
|
// enumerable: true,
|
||||||
|
// writable: false,
|
||||||
|
// get(): Buffer {
|
||||||
|
// return this.__TX.toBuffer();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
canFinalize(inputIndex: number): boolean {
|
canFinalize(inputIndex: number): boolean {
|
||||||
|
|
Loading…
Add table
Reference in a new issue