Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,7 @@ jobs:
run: dart test ./test

- name: Run tests web
run: dart test -p chrome ./test

run: dart test -p chrome ./test --timeout=20m

- name: Run tests web wasm
run: dart test -p chrome ./test -c dart2wasm --timeout=20m
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
## 6.5.0

- Fix transaction parsing in Mempool API.

## 6.4.0

- Update dependencies.
- Improved security: Private key operations now use blinded ecmult for safer public key generation.
- All signing methods now use constant-time operations with blinded ecmult to securely generate signatures.



## 6.3.0

- Update dependencies.
- Add estimate transaction size for psbt
- Add more script validation in psbt

## 6.2.0

- Update dependencies.
- Support PSBT for BCH
- Support for BIP-173
- Support for BCH schnorr signing

## 6.1.0

- Fix der signature validation.
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ We have integrated three APIs—Mempool, BlockCypher, and Electrum—into the pl
final publicKey = privateKey.getPublic();

// Sign an input using the private key.
final signSegwitV0OrLagacy = privateKey.signInput();
final signSegwitV0OrLagacy = privateKey.signECDSA();

// Sign a Taproot transaction using the private key.
final signSegwitV1TapprotTransaction = privateKey.signTapRoot();
final signSegwitV1TapprotTransaction = privateKey.signBip340();

// Convert the private key to a WIF (Wallet Import Format) encoded string.
// The boolean argument specifies whether to use the compressed format.
Expand Down Expand Up @@ -432,9 +432,9 @@ In the [example](https://github.com/mrtnetwork/bitcoin_base/tree/main/example/li
final transaction =
builder.buildTransaction((trDigest, utxo, publicKey, sighash) {
if (utxo.utxo.isP2tr()) {
return privateKey.signTapRoot(trDigest, sighash: sighash);
return privateKey.signBip340(trDigest, sighash: sighash);
}
return privateKey.signInput(trDigest, sigHash: sighash);
return privateKey.signECDSA(trDigest, sighash: sighash);
});

/// get tx id
Expand Down Expand Up @@ -569,7 +569,7 @@ In the [example](https://github.com/mrtnetwork/bitcoin_base/tree/main/example/li
);
final transaaction =
bchTransaction.buildTransaction((trDigest, utxo, publicKey, sighash) {
return privateKey.signInput(trDigest, sigHash: sighash);
return privateKey.signECDSA(trDigest, sighash: sighash);
});

/// transaction ID
Expand Down Expand Up @@ -645,7 +645,7 @@ In the [example](https://github.com/mrtnetwork/bitcoin_base/tree/main/example/li
extFlags: 0,
);

// sign transaction using `signTapRoot` method of thransaction
// sign transaction using `signBip340` method of thransaction
final signedTx = sign(txDigit, utxo[i].public().toHex(), SIGHASH_ALL);

// add witness for current index
Expand Down
81 changes: 27 additions & 54 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,56 +1,29 @@
include: package:lints/recommended.yaml
# include: package:flutter_lints/flutter.yaml
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
# Uncomment the following section to specify additional rules.
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# - always_declare_return_types
# - annotate_overrides
# - avoid_init_to_null
# - avoid_null_checks_in_equality_operators
# - avoid_relative_lib_imports
# - avoid_return_types_on_setters
# - avoid_shadowing_type_parameters
# - avoid_single_cascade_in_expression_statements
# - avoid_types_as_parameter_names
# - await_only_futures
# - camel_case_extensions
# - curly_braces_in_flow_control_structures
# - empty_catches
# - empty_constructor_bodies
# - library_names
# - library_prefixes
# - no_duplicate_case_values
# - null_closures
# - omit_local_variable_types
# - prefer_adjacent_string_concatenation
# - prefer_collection_literals
# - prefer_conditional_assignment
# - prefer_contains
# - prefer_equal_for_default_values
# - prefer_final_fields
# - prefer_for_elements_to_map_fromIterable
# - prefer_generic_function_type_aliases
# - prefer_if_null_operators
# - prefer_inlined_adds
# - prefer_is_empty
# - prefer_is_not_empty
# - prefer_iterable_whereType
# - prefer_single_quotes
# - prefer_spread_collections
# - recursive_getters
# - slash_for_doc_comments
# - sort_child_properties_last
# - type_init_formals
# - unawaited_futures
# - unnecessary_brace_in_string_interps
# - unnecessary_const
# - unnecessary_getters_setters
# - unnecessary_new
# - unnecessary_null_in_if_null_operators
# - unnecessary_this
# - unrelated_type_equality_checks
# - use_function_type_syntax_for_parameters
# - use_rethrow_when_possible
# - valid_regexps
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options

Loading