Skip to content

Commit

Permalink
Merge pull request #63 from twostack/2.0.0-release-prep
Browse files Browse the repository at this point in the history
Example Pre-image test and exports
  • Loading branch information
stephanfeb authored Aug 17, 2023
2 parents 7073387 + c19654f commit b1bc261
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 326 deletions.
13 changes: 10 additions & 3 deletions lib/dartsv.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
/// More dartdocs go here.
library dartsv;

export 'src/exceptions.dart';
export 'src/coin.dart';
export 'src/address.dart';
export 'src/hdpublickey.dart';
export 'src/hdprivatekey.dart';
Expand All @@ -12,6 +14,7 @@ export 'src/privatekey.dart';
export 'src/publickey.dart';
export 'src/sighash.dart';
export 'src/signature.dart';
export 'src/varint.dart';
export 'src/bip39/bip39.dart';
export 'src/block/block.dart';
export 'src/block/blockheader.dart';
Expand All @@ -22,6 +25,9 @@ export 'src/script/stack.dart';
export 'src/script/script_error.dart';
export 'src/script/script_chunk.dart';
export 'src/script/scriptflags.dart';
export 'src/script/script_pattern.dart';
export 'src/script/stack.dart';
export 'src/script/interpreter.dart';
export 'src/transaction/transaction.dart';
export 'src/transaction/transaction_builder.dart';
export 'src/transaction/script_builder.dart';
Expand All @@ -30,17 +36,18 @@ export 'src/transaction/transaction_signer.dart';
export 'src/transaction/transaction_input.dart';
export 'src/transaction/transaction_output.dart';
export 'src/transaction/transaction_input.dart';
export 'src/encoding/base58check.dart';
export 'src/transaction/locking_script_builder.dart';
export 'src/transaction/unlocking_script_builder.dart';
export 'src/transaction/p2pk_builder.dart';
export 'src/transaction/p2pkh_builder.dart';
export 'src/transaction/p2pkh_data_builder.dart';
export 'src/transaction/p2ms_builder.dart';
export 'src/transaction/p2sh_builder.dart';
export 'src/transaction/default_builder.dart';
export 'src/transaction/unspendable_data_builder.dart';
export 'src/encoding/utils.dart';
export 'src/exceptions.dart';
export 'src/coin.dart';
export 'src/encoding/base58check.dart';
export 'src/crypto/ecies.dart';
export 'src/crypto/hdutils.dart';


32 changes: 0 additions & 32 deletions lib/src/encoding/wifcodec.dart

This file was deleted.

8 changes: 4 additions & 4 deletions lib/src/script/svscript.dart
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ class SVScript {
// toASM. see _chunkToString.
if (token == '0') {
opcodenum = 0;
_chunks.add(ScriptChunk([], 0, opcodenum));
_chunks.add(ScriptChunk(null, 0, opcodenum));
} else if (token == '-1') {
opcodenum = OpCodes.OP_1NEGATE;
_chunks.add(ScriptChunk([], 0, opcodenum));
_chunks.add(ScriptChunk(null, 0, opcodenum));
} else if (opcodenum == null) {
// var buf = Buffer.from(tokens[i], 'hex')
var buf = HEX.decode(tokens[i]);
Expand All @@ -182,7 +182,7 @@ class SVScript {

_chunks.add(ScriptChunk(buf, buf.length, opcodenum!));
} else {
_chunks.add(ScriptChunk([], 0, opcodenum));
_chunks.add(ScriptChunk(null, 0, opcodenum));
}
}

Expand Down Expand Up @@ -617,7 +617,7 @@ class SVScript {
}

if (op != OpCodes.OP_INVALIDOPCODE) {
ScriptChunk chunk = ScriptChunk([], 0, op);
ScriptChunk chunk = ScriptChunk(null, 0, op);
_insertAtPosition(chunk, prepend);
}
}
Expand Down
Loading

0 comments on commit b1bc261

Please sign in to comment.