-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce7a923
commit 8334cdd
Showing
12 changed files
with
803 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
include: package:flutter_lints/flutter.yaml | ||
include: package:lints/recommended.yaml | ||
|
||
# Additional information about this file can be found at | ||
# https://dart.dev/guides/language/analysis-options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
void main() {} | ||
/// "wss://bitcoin.aranguren.org:50004" | ||
void main() async {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export 'methods.dart'; | ||
export 'params.dart'; | ||
export 'service.dart'; | ||
export 'exception.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,51 @@ | ||
import 'package:blockchain_utils/blockchain_utils.dart'; | ||
// import 'package:blockchain_utils/blockchain_utils.dart'; | ||
|
||
/// Exception class representing errors encountered during RPC (Remote Procedure Call) requests. | ||
class ElectrumRPCException implements BlockchainUtilsException { | ||
/// Constructs an instance of [ElectrumRPCException] with the provided details. | ||
const ElectrumRPCException( | ||
{required this.message, | ||
required this.code, | ||
required this.data, | ||
required this.request}); | ||
// /// Exception class representing errors encountered during RPC (Remote Procedure Call) requests. | ||
// class ElectrumRPCException implements BlockchainUtilsException { | ||
// /// Constructs an instance of [ElectrumRPCException] with the provided details. | ||
// const ElectrumRPCException( | ||
// {required this.message, | ||
// required this.code, | ||
// required this.data, | ||
// required this.request}); | ||
|
||
/// The error code associated with the error. | ||
final int code; | ||
// /// The error code associated with the error. | ||
// final int code; | ||
|
||
/// A human-readable error message describing the issue. | ||
@override | ||
final String message; | ||
// /// A human-readable error message describing the issue. | ||
// @override | ||
// final String message; | ||
|
||
/// Additional data providing more context about the error (nullable). | ||
final dynamic data; | ||
// /// Additional data providing more context about the error (nullable). | ||
// final dynamic data; | ||
|
||
/// The original request that triggered the error. | ||
final Map<String, dynamic> request; | ||
// /// The original request that triggered the error. | ||
// final Map<String, dynamic> request; | ||
|
||
@override | ||
String toString() { | ||
return 'RPC Error: Received code $code with message "$message".'; | ||
} | ||
// @override | ||
// String toString() { | ||
// return 'RPC Error: Received code $code with message "$message".'; | ||
// } | ||
|
||
/// Converts the exception details to a JSON-formatted representation. | ||
Map<String, dynamic> toJson() { | ||
final error = {"message": message, "code": code}; | ||
if (data != null) { | ||
error["data"] = data; | ||
} | ||
final toJson = { | ||
"jsonrpc": "2.0", | ||
"error": error, | ||
}; | ||
if (request.isNotEmpty) { | ||
if (request.containsKey("id")) { | ||
toJson["id"] = request["id"]; | ||
} | ||
if (request.containsKey("params") && request.containsKey("method")) { | ||
toJson["params"] = request["params"]; | ||
toJson["method"] = request["method"]; | ||
} | ||
} | ||
return toJson; | ||
} | ||
} | ||
// /// Converts the exception details to a JSON-formatted representation. | ||
// Map<String, dynamic> toJson() { | ||
// final error = {"message": message, "code": code}; | ||
// if (data != null) { | ||
// error["data"] = data; | ||
// } | ||
// final toJson = { | ||
// "jsonrpc": "2.0", | ||
// "error": error, | ||
// }; | ||
// if (request.isNotEmpty) { | ||
// if (request.containsKey("id")) { | ||
// toJson["id"] = request["id"]; | ||
// } | ||
// if (request.containsKey("params") && request.containsKey("method")) { | ||
// toJson["params"] = request["params"]; | ||
// toJson["method"] = request["method"]; | ||
// } | ||
// } | ||
// return toJson; | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: bitcoin_base | ||
description: A versatile library for Bitcoin, Dogecoin, Litecoin, Dash, BSV, and BCH. Supports P2PKH, P2SH, P2WPKH, P2WSH, P2TR, with advanced creation, signing, and spending capabilities. | ||
version: 4.0.0 | ||
version: 4.1.0 | ||
homepage: "https://github.com/mrtnetwork/bitcoin_base" | ||
repository: "https://github.com/mrtnetwork/bitcoin_base" | ||
Author: [email protected] | ||
|
@@ -16,13 +16,12 @@ environment: | |
|
||
|
||
dependencies: | ||
blockchain_utils: ^1.6.0 | ||
blockchain_utils: ^2.0.1 | ||
|
||
|
||
dev_dependencies: | ||
test: ^1.24.6 | ||
flutter_lints: ^2.0.0 | ||
lints: ^2.1.1 | ||
test: ^1.25.2 | ||
lints: ^3.0.0 | ||
|
||
|
||
# For information on the generic Dart part of this file, see the | ||
|
Oops, something went wrong.