parse static method

Bip32Path parse(
  1. String path
)

Parses a BIP32 derivation path represented as a string and returns a Bip32Path object.

path is the BIP32 path string to be parsed.

Implementation

static Bip32Path parse(String path) {
  if (path.endsWith("/")) {
    path = path.substring(0, path.length - 1);
  }

  return _parseElements(
      path.split("/").where((elem) => elem.isNotEmpty).toList());
}