AddressChain enum

Which chain of the wallet's HD tree an address is on.

  • receive (m/0/i): addresses the key holder issues to be paid — invoices, the root address.
  • change (m/1/i): change outputs of the wallet's own transactions.
  • delegated (m/2/i): addresses issued from the wallet's extended public key by a party that holds no private key — a service that keeps an xpub wallet for an offline payee and answers invoice requests on its behalf (spv-understanding.md, "Payment modes"). The payee's own wallet never issues on this chain; it records a delegated address when the service hands a payment to it over, and signs for it like any other. Keeping the two issuers on separate chains is what stops them handing out the same address.

index is the BIP32 child number of the chain, and so part of every key path; never reorder the values.

Inheritance
Available extensions

Values

receive → const AddressChain
change → const AddressChain
delegated → const AddressChain

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromIndex(int index) → AddressChain
The chain with BIP32 child number index.
fromRecord({Object? chain, Object? isChange}) → AddressChain
The chain a record stores: chain when it has one, else the change/receive flag every record written before the delegated chain existed carries (isChange). Absent both, the receive chain, as every journal written before the chain was recorded at all.

Constants

values → const List<AddressChain>
A constant List of the values in this enum, in order of their declaration.