toString method

  1. @override
String toString()
override

override toString for return absolute path

Implementation

@override
String toString() {
  var pathStr = isAbsolute ? "${Bip32PathConst.masterChar}/" : "";
  for (final elem in elems) {
    if (!elem.isHardened) {
      pathStr += "${elem.toInt()}/";
    } else {
      pathStr += "${Bip32KeyIndex.unhardenIndex(elem.toInt())}'/";
    }
  }
  return pathStr.substring(0, pathStr.length - 1);
}