addSLPIndex(addressData, slpUtxoData) {
    // console.log(`addressData: ${JSON.stringify(addressData, null, 2)}`)
    // console.log(`slpUtxoData: ${JSON.stringify(slpUtxoData, null, 2)}`)

    try {
      // Loop through each SLP UTXO
      for (let i = 0; i < slpUtxoData.length; i++) {
        const slpUtxo = slpUtxoData[i]

        // Loop through the array of address data
        for (let j = 0; j < addressData.length; j++) {
          const bchAddr = addressData[j]

          // If the cash addresses match, record the HD index in the SLP UTXO.
          if (bchAddr.address === slpUtxo.cashAddr) slpUtxo.hdIndex = j
        }
      }

      return slpUtxoData
    } catch (err) {
      console.log(`Error in update-balances.js/addSLPIndex()`)
      throw err
    }
  }
// information is needed when spending the SLP UTXO.
information is needed when spending the SLP UTXO.
information is needed when spending the SLP UTXO .
addSLPIndex(addressData, slpUtxoData) {
    try {
      for (let i = 0; i < slpUtxoData.length; i++) {
        const slpUtxo = slpUtxoData[i]
        for (let j = 0; j < addressData.length; j++) {
          const bchAddr = addressData[j]
          if (bchAddr.address === slpUtxo.cashAddr) slpUtxo.hdIndex = j
        }
      }
      return slpUtxoData
    } catch (err) {
      console.log(`Error in update-balances.js/addSLPIndex()`)
      throw err
    }
  }
addSLPIndex ( addressData , slpUtxoData ) { try { for ( let i = 0 ; i < slpUtxoData . length ; i ++ ) { const slpUtxo = slpUtxoData [ i ] for ( let j = 0 ; j < addressData . length ; j ++ ) { const bchAddr = addressData [ j ] if ( bchAddr . address === slpUtxo . cashAddr ) slpUtxo . hdIndex = j } } return slpUtxoData } catch ( err ) { console . log ( ` ` ) throw err } }
information is needed when spending the SLP UTXO.
information is needed when spending the SLP UTXO .
// console.log(`addressData: ${JSON.stringify(addressData, null, 2)}`) // console.log(`slpUtxoData: ${JSON.stringify(slpUtxoData, null, 2)}`) // Loop through each SLP UTXO // Loop through the array of address data // If the cash addresses match, record the HD index in the SLP UTXO.