Class: Path

wallet~Path(optionsnullable)

Path

Constructor

new Path(optionsnullable)

Create a path.

Parameters:
Name Type Attributes Description
options Object <nullable>
Properties:
Name Type Description
name String

Account name.

account Number

Account index.

branch Number

Branch index.

index Number

Address index.

Source:

Members

(static) types :Number

Path types.

Type:
  • Number
Properties:
Name Type Description
HD Number
KEY Number
ADDRESS Number
Default Value:
  • {"HD":0,"KEY":1,"ADDRESS":2}
Source:

(static) typesByVal :Number

Path types.

Type:
  • Number
Default Value:
  • ["HD","KEY","ADDRESS"]
Source:

Methods

(static) fromAddress(account, address) → {Path}

Instantiate path from address.

Parameters:
Name Type Description
account Account
address Address
Source:
Returns:
Type
Path

(static) fromOptions(options) → {Path}

Instantiate path from options object.

Parameters:
Name Type Description
options Object
Source:
Returns:
Type
Path

(static) fromRaw(data) → {Path}

Instantiate path from serialized data.

Parameters:
Name Type Description
data Buffer
Source:
Returns:
Type
Path

clone() → {Path}

Clone the path object.

Source:
Returns:
Type
Path

(private) fromAddress(account, address)

Inject properties from address.

Parameters:
Name Type Description
account Account
address Address
Source:

(private) fromOptions(options) → {Path}

Instantiate path from options object.

Parameters:
Name Type Description
options Object
Source:
Returns:
Type
Path

(private) fromRaw(data)

Inject properties from serialized data.

Parameters:
Name Type Description
data Buffer
Source:

getSize() → {Number}

Calculate serialization size.

Source:
Returns:
Type
Number

inspectSymbol() → {String}

Inspect the path.

Source:
Returns:
Type
String

toAddress() → {Address}

Convert path object to an address (currently unused).

Source:
Returns:
Type
Address

toJSON() → {Object}

Convert path to a json-friendly object.

Source:
Returns:
Type
Object

toPath() → {String}

Convert path object to string derivation path.

Source:
Returns:
Type
String

toRaw() → {Buffer}

Serialize path.

Source:
Returns:
Type
Buffer