Check or Re-Sync your UTXO state

An essential part of managing a wallet is UTXO state management. The Relysia infrastructure is a native peer to peer system that continuously keeps track of its own UTXOs. Since we support classic addresses and transactions from external parties, we automatically run transaction listeners to always keep wallets in sync with the blockchain.

var parameters = { serviceId: 'optional',
    walletID: 'optional',

const response = await relysia.wallet.v1.metrics(parameters);

Get the latest wallet UTXO state.


UTXOs are the base unit of transactions in the Bitcoin network. The metrics endpoint first updates the last UTXO state, and then shows a detailed output of each UTXO in the wallet.





  "statusCode": 200,
  "data": {
    "status": "success",
    "msg": "operation completed successfully !",
    "data": {
      "balance": 248542,
      "userUtxos": [
          "height": 757221,
          "tx_pos": 0,
          "tx_hash": "39c1cbaee9cb45600fb07240f394c1f69erd456d81df8c5f5f132661426b32d8",
          "value": 100,
          "script": "76a914ec83f1fb2c52dbd7d2b4c70cf95150560d611b9088ac",
          "path": "m/44'/0'/0'/0/0",
          "address": "1NZaXzJHBLTqeBXn45AvkoPCkbwatizeCW"

You can force refresh the UTXO state by calling the metrics function

When refreshing the UTXO state less than 15 seconds after last transaction was submitted, it is likely that miners (such as TAAL) haven't indexed the current state. A force refresh would thus sync an out of date UTXO and it is therefore not advisable to regularly force refresh the UTXO state.

Last updated