{% extends "devhelp/components/devhelp_tab.jinja" %}
{% block title %}address-data{% endblock %}
{% set tab = 'html' %}
{% block content %}

<h1>address-label</h1>

{% include "includes/address-label.html" %}


<code class="html"><textarea rows="40" cols="90" style="height: 200px">
<address-label 
    data-address="lq1qq259d9ahc6apt9fcgjx4fmfl5lsfr2vkzrvyy2uuukhrreulzs7xxsyv70jzt0h7rv2s7dwsll8ln2ypf4qujur5m94edx6jv" 
    data-label="Address #0" 
    data-wallet="myliquidhot">
</address-label>
</textarea>    
</code>

<p>
Address-label changes the label of an address. 
wallet-alias and address need to be defined in order to get a valid response. 
Don't set an data-label attribute because otherwise the initial label doesn't get fetched (bug?!).

It's using Ajax-call to:
<ul>
    <li>
        <code>{{ url_for('wallets_endpoint_api.get_label', wallet_alias='WALLET_ALIAS') }}</code>
    </li>
    <li>
        <code>{{ url_for('wallets_endpoint_api.set_label', wallet_alias='WALLET_ALIAS') }}</code>
    </li>
</ul>
You set the most important params here:
</p>


{% include "devhelp/includes/set-wallet.html" %}
<br>
{% include "devhelp/includes/set-address.html" %}


<address-label 
    id="someid"
    data-address="{{ wallet.get_address(2) }}" 
    
    data-wallet="{{wallet.alias}}">
</address-label>

{% endblock %}


