Hive coding #12b
Hivejs: how to get incoming delegations
by hive_coding
HTML
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/@hiveio/hive-js/dist/hive.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
</head>
<body>
<div class="row">
<div class="col-xs-8 offset-sm-1">
<div class="row">
<div class="col-sm-6"> Username: <input type="text" id="username"><button id="show">Load incomming Delegations</button></div>
</div>
<h2>Ausgabe/Output:</h2>
<div id="log2"></div>
<div id="log"></div>
</div>
</div>
<script>
//Nicht nutzen, da zu viele Aufrufe nötig.
//not recommended. Too many calls are necessary.
var ChainTypes = {};
ChainTypes.reserved_spaces = {
relative_protocol_ids: 0,
protocol_ids: 1,
implementation_ids: 2
};
ChainTypes.operations= {
vote: 0,
comment: 1,
transfer: 2,
transfer_to_vesting: 3,
withdraw_vesting: 4,
limit_order_create: 5,
limit_order_cancel: 6,
feed_publish: 7,
convert: 8,
account_create: 9,
account_update: 10,
witness_update: 11,
account_witness_vote: 12,
account_witness_proxy: 13,
pow: 14,
custom: 15,
report_over_production: 16,
delete_comment: 17,
custom_json: 18,
comment_options: 19,
set_withdraw_vesting_route: 20,
limit_order_create2: 21,
claim_account: 22,
create_claimed_account: 23,
request_account_recovery: 24,
recover_account: 25,
change_recovery_account: 26,
escrow_transfer: 27,
escrow_dispute: 28,
...