Skip to content

Latest commit

 

History

History
118 lines (106 loc) · 3.43 KB

fip-0025.md

File metadata and controls

118 lines (106 loc) · 3.43 KB
fip title status type author created updated
25
Return bundle transaction count in get_fio_names
Final
Functionality
Pawel Mastalerz <[email protected]>
2021-01-19
2021-06-15

Abstract

This FIP modifies get_fio_names to return remaining bundled transaction count.

Modified getters:

Contract Action Endpoint Description
get_fio_names Modified to add remaining bundled transaction count.
get_fio_addresses Modified to add remaining bundled transaction count.

Motivation

It is currently difficult to obtain remaining bundled transaction count for a FIO Address. It can be fetched using get_table_rows, but it requires converting the FIO Address to a hash which is the last 16 bytes of a sha1 hash (of the string), as big-endian hex.

Specification

Modifications to existing API calls

Modified to add remaining bundled transaction count.

Request

Unchanged

Example
{
	"fio_public_key": "FIO8PRe4WRZJj5mkem6qVGKyvNFgPsNnjNN6kPhh6EaCpzCVin5Jj"
}
Processing

Unchanged

Exception handling

Unchanged

Response
Group Parameter Format Definition
fio_domains fio_domain String FIO Domain.
fio_domains expiration String Date when domain expires.
fio_domains is_public Int 0 - domain is not public; 1 - domain is public.
fio_addresses fio_address String FIO Address.
fio_addresses expiration String Date when address expires.
fio_addresses remaining_bundled_tx Int Count of remaining bundled transactions.
Example
{
  "fio_domains": [
    {
      "fio_domain": "alice",
      "expiration": "2020-09-11T18:30:56",
      "is_public": 0
    }
  ],
  "fio_addresses": [
    {
      "fio_address": "purse@alice",
      "expiration": "2020-09-11T18:30:56",
      "remaining_bundled_tx": 98
    }
  ]
}

Modified to add remaining bundled transaction count.

Request

Unchanged

Example
{
	"fio_public_key": "FIO8PRe4WRZJj5mkem6qVGKyvNFgPsNnjNN6kPhh6EaCpzCVin5Jj"
}
Processing

Unchanged

Exception handling

Unchanged

Response
Group Parameter Format Definition
fio_addresses fio_address String FIO Address.
fio_addresses expiration String Date when address expires.
fio_addresses remaining_bundled_tx Int Count of remaining bundled transactions.
Example
{
  "fio_addresses": [
    {
      "fio_address": "purse@alice",
      "expiration": "2020-09-11T18:30:56",
      "remaining_bundled_tx": 98
    }
  ]
}

Rationale

Modification to existing getter is deemed to be the best approach.

Implementation

fioprotocol/fio#247

Release information

The get_fio_names and get_fio_addresses API endpoints were modified to return bundle count in fio v3.0.0.

Backwards Compatibility

/get_fio_names is the only existing API method being modified, but only a new response element is added, so wallets currently implementing this call should not be affected.

Future considerations

None

Discussion link

https://fioprotocol.atlassian.net/browse/WP-302