Skip to content

Commit

Permalink
feat: update endpoints not used by myWitWallet to use new explorer api
Browse files Browse the repository at this point in the history
  • Loading branch information
gabaldon committed Mar 25, 2024
1 parent 9e8a0ff commit bb22403
Show file tree
Hide file tree
Showing 5 changed files with 668 additions and 103 deletions.
12 changes: 5 additions & 7 deletions example/explorer_example.dart
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import 'package:witnet/explorer.dart';

String explorerUrl = 'witscan.xyz';
String explorerUrl = 'witnet.network';
ExplorerClient explorer =
ExplorerClient(url: explorerUrl, mode: ExplorerMode.production);
void main() async {
try {
dynamic status = await explorer.address(
tab: "value_transfers",
value: "wit174la8pevl74hczcpfepgmt036zkmjen4hu8zzs",
page: 1,
pageSize: 1);
print("Status: ${status}");
String address = 'wit174la8pevl74hczcpfepgmt036zkmjen4hu8zzs';
dynamic valueTransfers = await explorer.address(
tab: "value_transfers", value: address, page: 1, pageSize: 1);
print("List of Vtts from address ${address}: ${valueTransfers}");
} on ExplorerException catch (e) {
print(e.message);
}
Expand Down
52 changes: 33 additions & 19 deletions lib/explorer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,46 @@ export 'src/crypto/address.dart' show Address;

export 'src/network/explorer/explorer_api.dart'
show
AddressBlocks,
AddressDataRequestsSolved,
AddressDetails,
AddressInfo,
AddressLabel,
AddressMintInfo,
AddressMints,
AddressValueTransferInfo,
AddressValueTransfers,
BlockDetails,
BlockInfo,
Blockchain,
BurnRate,
DrComposition,
DrHistory,
DrLieRate,
DrSolver,
ExplorerException,
HashInfo,
Home,
InputMerged,
InputUtxo,
Mempool,
MempoolTransactionType,
Miner,
MintInfo,
NetworkStats,
NodePool,
PrioritiesEstimate,
PriorityEstimate,
Rollback,
StatisticsParams,
Status,
SupplyInfo,
SupplyParams,
TallyTxn,
Tapi,
TapiInfo,
Blockchain,
AddressDetails,
AddressDataRequestsSolved,
InputUtxo,
AddressValueTransfers,
AddressBlocks,
BlockInfo,
BlockDetails,
MintInfo,
HashInfo,
TallyTxn,
ValueTransferInfo,
TransactionStatus,
TransactionType,
TransactionUtxo,
InputMerged,
AddressValueTransferInfo,
TxStatusLabel,
TransactionType,
TransactionStatus,
PrioritiesEstimate,
PriorityEstimate,
Mempool;
ValueTransferInfo;
Loading

0 comments on commit bb22403

Please sign in to comment.