AddressIndex class

Annotations
  • @freezed

Constructors

AddressIndex()
Return a new address after incrementing the current descriptor index.
const
factory
AddressIndex.lastUnused()
Return the address for the current descriptor index if it has not been used in a received transaction. Otherwise return a new address as with AddressIndex.New. Use with caution, if the wallet has not yet detected an address has been used it could return an already used address. This function is primarily meant for situations where the caller is untrusted; for example when deriving donation addresses on-demand for a public web page.
const
factory
AddressIndex.peek({required int index})
Return the address for a specific descriptor index. Does not change the current descriptor index used by AddressIndex and AddressIndex.LastUsed. Use with caution, if an index is given that is less than the current descriptor index then the returned address may have already been used.
const
factory
AddressIndex.reset({required int index})
Return the address for a specific descriptor index and reset the current descriptor index used by AddressIndex and AddressIndex.LastUsed to this value. Use with caution, if an index is given that is less than the current descriptor index then the returned address and subsequent addresses returned by calls to AddressIndex and AddressIndex.LastUsed may have already been used. Also if the index is reset to a value earlier than the Blockchain stopGap (default is 20) then a larger stopGap should be used to monitor for all possibly used addresses.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(AddressIndex_New value), {required TResult lastUnused(AddressIndex_LastUnused value), required TResult peek(AddressIndex_Peek value), required TResult reset(AddressIndex_Reset value)}) → TResult
inherited
mapOrNull<TResult extends Object?>(TResult? $default(AddressIndex_New value)?, {TResult? lastUnused(AddressIndex_LastUnused value)?, TResult? peek(AddressIndex_Peek value)?, TResult? reset(AddressIndex_Reset value)?}) → TResult?
inherited
maybeMap<TResult extends Object?>(TResult $default(AddressIndex_New value)?, {TResult lastUnused(AddressIndex_LastUnused value)?, TResult peek(AddressIndex_Peek value)?, TResult reset(AddressIndex_Reset value)?, required TResult orElse()}) → TResult
inherited
maybeWhen<TResult extends Object?>(TResult $default()?, {TResult lastUnused()?, TResult peek(int index)?, TResult reset(int index)?, required TResult orElse()}) → TResult
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(), {required TResult lastUnused(), required TResult peek(int index), required TResult reset(int index)}) → TResult
inherited
whenOrNull<TResult extends Object?>(TResult? $default()?, {TResult? lastUnused()?, TResult? peek(int index)?, TResult? reset(int index)?}) → TResult?
inherited

Operators

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