Skip to content

Commit

Permalink
feat: getAccounts RPC method
Browse files Browse the repository at this point in the history
  • Loading branch information
Ez3kiel-dev committed Oct 1, 2023
1 parent 3be57ae commit f5ff9c3
Show file tree
Hide file tree
Showing 16 changed files with 517 additions and 18 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.7.0

- feat: getAccounts RPC method.

## 0.6.0

Daemon API upgrade :
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Software Development Kit in Dart for XELIS Blockchain.
## Features

JSON-RPC Client to interact with daemon API:

- Call JSON-RPC methods.
- Subscribe and listen to events.

Expand Down Expand Up @@ -38,7 +39,7 @@ Future<void> main() async {
// You can also use the repository to listen to events.
// There are 5 different types of events,
// There are 7 different types of events,
// you can add callbacks depending on the event.
daemonRepository
..onNewBlock((block) {
Expand Down
2 changes: 2 additions & 0 deletions lib/src/data_transfer_objects/dtos.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export 'block/block.dart';
export 'block_ordered_event/block_ordered_event.dart';
export 'get_accounts/get_accounts_params.dart';
export 'get_accounts/get_accounts_result.dart';
export 'get_balance/balance.dart';
export 'get_balance_at_topoheight/get_balance_at_topoheight_params.dart';
export 'get_block_at_topoheight/get_block_at_topoheight_params.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import 'package:freezed_annotation/freezed_annotation.dart';

part 'get_accounts_params.freezed.dart';

part 'get_accounts_params.g.dart';

/// @nodoc
@freezed
class GetAccountsParams with _$GetAccountsParams {
/// @nodoc
const factory GetAccountsParams({
/// @nodoc
@JsonKey(name: 'skip') int? skip,

/// @nodoc
@JsonKey(name: 'maximum') int? maximum,

/// @nodoc
@JsonKey(name: 'minimum_topoheight') int? minTopoHeight,

/// @nodoc
@JsonKey(name: 'maximum_topoheight') int? maxTopoHeight,
}) = _GetAccountsParams;

/// @nodoc
factory GetAccountsParams.fromJson(Map<String, dynamic> json) =>
_$GetAccountsParamsFromJson(json);
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import 'package:freezed_annotation/freezed_annotation.dart';

part 'get_accounts_result.freezed.dart';

/// @nodoc
@freezed
class GetAccountsResult with _$GetAccountsResult {
/// @nodoc
const factory GetAccountsResult({
/// @nodoc
required List<String> publicKeys,
}) = _GetAccountsResult;
}
Loading

0 comments on commit f5ff9c3

Please sign in to comment.