Skip to content

Commit

Permalink
fix: run dart format and analyze
Browse files Browse the repository at this point in the history
  • Loading branch information
parodyBit committed Dec 12, 2023
1 parent a2579f5 commit 6469a6e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 25 deletions.
21 changes: 11 additions & 10 deletions example/stake_transaction_example.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:witnet/node.dart';
// import 'package:witnet/node.dart';
import 'package:witnet/schema.dart';
import 'package:witnet/src/constants.dart';
import 'package:witnet/src/utils/transformations/transformations.dart';
Expand All @@ -16,16 +16,16 @@ void main() async {
Xprv masterNode = Xprv.fromXprv(
"xprv1qpujxsyd4hfu0dtwa524vac84e09mjsgnh5h9crl8wrqg58z5wmsuqqcxlqmar3fjhkprndzkpnp2xlze76g4hu7g7c4r4r2m2e6y8xlvu566tn6");

Xprv withdrawer =
masterNode
/ KEYPATH_PURPOSE
/ KEYPATH_COIN_TYPE
/ KEYPATH_ACCOUNT
/ EXTERNAL_KEYCHAIN
/ 0;

Xprv withdrawer = masterNode /
KEYPATH_PURPOSE /
KEYPATH_COIN_TYPE /
KEYPATH_ACCOUNT /
EXTERNAL_KEYCHAIN /
0;

/// The 20 byte Public Key Hash of the withdrawer
String pkh = bytesToHex(withdrawer.privateKey.publicKey.publicKeyHash);

/// The authorization by the node
KeyedSignature authorization = signHash(pkh, masterNode.privateKey);

Expand All @@ -42,7 +42,8 @@ void main() async {

/// build and sign stake transaction
StakeTransaction stake = StakeTransaction(
body: body, signatures: [signHash(body.transactionId, masterNode.privateKey)]);
body: body,
signatures: [signHash(body.transactionId, masterNode.privateKey)]);

/// The Stake Transaction ID
print(stake.transactionID);
Expand Down
15 changes: 0 additions & 15 deletions lib/src/network/explorer/explorer_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,6 @@ import 'dart:io' show HttpException;
import 'package:witnet/data_structures.dart' show Utxo;
import 'package:witnet/explorer.dart';
import 'package:witnet/schema.dart';
import 'explorer_api.dart'
show
AddressBlocks,
AddressDataRequestsSolved,
AddressDetails,
AddressValueTransfers,
BlockDetails,
Blockchain,
ExplorerException,
Home,
MintInfo,
Network,
PrioritiesEstimate,
Status,
Tapi;

enum ExplorerMode {
production,
Expand Down

0 comments on commit 6469a6e

Please sign in to comment.