WIP: sign message
This commit is contained in:
parent
82bfa7d855
commit
05325b2d92
8 changed files with 202 additions and 348 deletions
|
|
@ -104,11 +104,11 @@ describe('TxProposal', function() {
|
|||
});
|
||||
|
||||
});
|
||||
describe('#fromObj', function() {
|
||||
describe('#fromUntrustedObj', function() {
|
||||
it('should fail to create from wrong object', function() {
|
||||
var b = new FakeBuilder();
|
||||
(function() {
|
||||
var txp = TxProposal.fromObj({
|
||||
var txp = TxProposal.fromUntrustedObj({
|
||||
creator: 1,
|
||||
createdTs: 1,
|
||||
builderObj: b.toObj(),
|
||||
|
|
@ -131,7 +131,7 @@ describe('TxProposal', function() {
|
|||
inputChainPaths: ['m/1'],
|
||||
};
|
||||
(function() {
|
||||
txp = TxProposal.fromObj(o, {
|
||||
txp = TxProposal.fromUntrustedObj(o, {
|
||||
pepe: 100
|
||||
});
|
||||
}).should.throw('Invalid tx proposal: no ins');
|
||||
|
|
@ -143,6 +143,9 @@ describe('TxProposal', function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
describe('#fromObj', function() {
|
||||
|
||||
});
|
||||
|
||||
|
||||
describe('#setSent', function() {
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ function FakeBuilder() {
|
|||
this.test = 1;
|
||||
this.tx = new Tx();
|
||||
this.signhash = 1;
|
||||
this.version =1;
|
||||
this.inputMap = [{
|
||||
address: '2NDJbzwzsmRgD2o5HHXPhuq5g6tkKTjYkd6',
|
||||
scriptPubKey: new Script(new Buffer('a914dc0623476aefb049066b09b0147a022e6eb8429187', 'hex')),
|
||||
|
|
@ -48,7 +49,6 @@ function FakeBuilder() {
|
|||
address: '2NDJbzwzsmRgD2o5HHXPhuq5g6tkKTjYkd6',
|
||||
amountSatStr: '123',
|
||||
}]),
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue