def run(): key = SigningKey.from_string(get_key_from_wif(settings['wif']), SECP256k1, sha256) rs = compileASM(REDEEM_SCRIPT) txs = parsetxsfile(settings['file']) for tx in txs: tx.signatures = sign_detached(tx.tx, key, rs) print(",".join(tx.signatures))
def run(): txs = parsetxsfile(settings['txs']) sigs = readSigs() for i in range(0, len(txs)): tx = txs[i].tx for j in range(0, len(tx.txs_in)): tx.txs_in[j].sigs = [sigs[0][i][j], sigs[1][i][j]] rs = compileASM(REDEEM_SCRIPT) for tx in txs: print(build_tx(tx.tx, rs).as_hex())