-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(daemon): getMinerWork RPC method
- Loading branch information
1 parent
08bfaa5
commit 637adb2
Showing
10 changed files
with
582 additions
and
1 deletion.
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
21 changes: 21 additions & 0 deletions
21
lib/src/data_transfer_objects/get_miner_work/get_miner_work_params.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// ignore_for_file: invalid_annotation_target | ||
|
||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
|
||
part 'get_miner_work_params.freezed.dart'; | ||
|
||
part 'get_miner_work_params.g.dart'; | ||
|
||
/// @nodoc | ||
@freezed | ||
class GetMinerWorkParams with _$GetMinerWorkParams { | ||
/// @nodoc | ||
const factory GetMinerWorkParams({ | ||
@JsonKey(name: 'template') required String template, | ||
@JsonKey(name: 'address') required String address, | ||
}) = _GetMinerWorkParams; | ||
|
||
/// @nodoc | ||
factory GetMinerWorkParams.fromJson(Map<String, dynamic> json) => | ||
_$GetMinerWorkParamsFromJson(json); | ||
} |
197 changes: 197 additions & 0 deletions
197
lib/src/data_transfer_objects/get_miner_work/get_miner_work_params.freezed.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
lib/src/data_transfer_objects/get_miner_work/get_miner_work_params.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
lib/src/data_transfer_objects/get_miner_work/get_miner_work_result.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// ignore_for_file: invalid_annotation_target | ||
|
||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
|
||
part 'get_miner_work_result.freezed.dart'; | ||
|
||
part 'get_miner_work_result.g.dart'; | ||
|
||
/// @nodoc | ||
@freezed | ||
class GetMinerWorkResult with _$GetMinerWorkResult { | ||
/// @nodoc | ||
const factory GetMinerWorkResult({ | ||
@JsonKey(name: 'algorithm') required String algorithm, | ||
@JsonKey(name: 'miner_work') required String minerWork, | ||
@JsonKey(name: 'height') required int height, | ||
@JsonKey(name: 'difficulty') required int difficulty, | ||
@JsonKey(name: 'topoheight') required int topoheight, | ||
}) = _GetMinerWorkResult; | ||
|
||
/// @nodoc | ||
factory GetMinerWorkResult.fromJson(Map<String, dynamic> json) => | ||
_$GetMinerWorkResultFromJson(json); | ||
} |
Oops, something went wrong.