IRIS Hub v0.15.1 API Compatibility Note

Important changes

Removed Key Management

In this version, the REST API (LCD) removes Key Management related features, namely:

  • Remove the ability to create, query, and delete Keys (/keys)
  • Remove the ability to sign txs (/tx/sign)

All POST methods except /tx/broadcast are only used to generate unsigned transactions and will not be broadcast. Users need to sign the transaction offline and then broadcast it using /tx/broadcast.

Take the send transaction as an example

  1. Call POST /bank/accounts/{address}/send to build an unsigned transaction

    curl -X POST "http://localhost:1317/bank/accounts/faa1r93p0tpdlxgpac744rghvj9kqntvd54lc3msk2/send" -d "{\"base_tx\":{\"chain_id\":\"irishub\",\"gas\":\"50000\",\"fee\":\"0.3iris\",\"memo\":\"memo\"},\"recipient\":\"faa1r93p0tpdlxgpac744rghvj9kqntvd54lc3msk2\",\"amount\":\"1iris\"}" > unsigned.json
    
  2. Sign (can be implemented using iriscli, irisnet-crypto, iks), Take iriscli as an example:

    iriscli tx sign unsigned.json --name=<key_name> --chain-id=irishub > signed.json
    
  3. Call POST /tx/broadcast to broadcast the signed transaction.

Added multi-asset support

GET /bank/accounts/{address} has added multi-asset support, and there will probably be multiple assets in the “coins” array.

So, if you used to get the balance of iris by coins[0], it is strongly recommended to modify it in time.

Removed GET /distribution/community-tax

Removed GET /gov/params/{module}

Other changes

  • Added the memo_regexp field (regular expression check) for GET /bank/accounts/{address}
  • Added timestamp field for GET /txs and GET /txs/{hash}
  • Added Asset APIs
  • Added Random APIs
  • Added Params APIs
  • Added GET /bank/token-stats/{id}
  • Added POST /bank/accounts/{address}/set-memo-regexp
3 Likes