bitpay / bitcore-lib

A pure and powerful JavaScript Bitcoin library
https://bitcore.io/
Other
611 stars 1.03k forks source link

how can I apply signature generated from ledger nano signP2SHtransaction method to transaction? #269

Closed qiluge closed 5 years ago

qiluge commented 5 years ago

I have some confuse when I used transaction.applySignature

let s1 = {
        inputIndex: 0,
        signature: bitcore.crypto.Signature.fromString(signature1[0]),
        sigtype: 1,
        publicKey: bitCorePublicKey1
    };
    txObj.applySignature(s1);
    let s2 = {
        inputIndex: 0,
        signature: bitcore.crypto.Signature.fromString(signature2[0]),
        sigtype: 1,
        publicKey: bitCorePublicKey2
    };
    txObj.applySignature(s2);
    console.log('result is ', txObj.toString('hex'))

there are always failed, for more details, reference to my issue https://github.com/LedgerHQ/ledgerjs/issues/248 in the ledgerjs.

qiluge commented 5 years ago

has been solved