-
Notifications
You must be signed in to change notification settings - Fork 67
Description
In #182, I raised a related point that the /v1/keys endpoint should ideally return ALL keyset fields required for active wallet operations.
This allows a consumer to call just ONE endpoint and get data needed for active wallet ops - fees, expiry, keys etc etc
That way, the /v1/keysets endpoint can just be called when non-operational, historic or inactive keyset metadata is required.
@callebtc made the comment:
Nevertheless: wallets should hit
/keysetsfor metadata, and/keysfor the actual keys.
I agree in principle - if there was a lot of incidental metadata - but in the v1 API, both are practically identical:
/v1/keysets
{
"id": <hex_str>,
"unit": <str>,
"active": <bool>,
"input_fee_ppk": <int|null>,
"final_expiry": <int|null>
}
/v1/keys
{
"id": <keyset_id_hex_str>,
"unit": <currency_unit_str>,
"final_expiry": <unix_timestamp_int|null>
"keys": {
<amount_int>: <public_key_str>,
...
}
}active is implied in /v1/keys - as only active keysets are returned.
Which means the only "missing" metadata is input_fee_ppk, which is vital to wallet operations.
It seems sub-optimal to make a consumer lookup two endpoints just to get the keyset fee, which is as as vital to wallet ops as final_expiry.