UNPKG

lightningdevkit

Version:
54 lines (53 loc) 2 kB
import { APIError } from '../structs/APIError.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; import { CommonBase } from './CommonBase.mjs'; /** * When the payment path failure took place and extra details about it. [`PathFailure::OnPath`] may * contain a [`NetworkUpdate`] that needs to be applied to the [`NetworkGraph`]. * * [`NetworkUpdate`]: crate::routing::gossip::NetworkUpdate * [`NetworkGraph`]: crate::routing::gossip::NetworkGraph */ export declare class PathFailure extends CommonBase { protected constructor(_dummy: null, ptr: bigint); clone_ptr(): bigint; /** * Creates a copy of the PathFailure */ clone(): PathFailure; /** * Utility method to constructs a new InitialSend-variant PathFailure */ static constructor_initial_send(err: APIError): PathFailure; /** * Utility method to constructs a new OnPath-variant PathFailure */ static constructor_on_path(network_update: Option_NetworkUpdateZ): PathFailure; /** * Checks if two PathFailures contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. */ eq(b: PathFailure): boolean; /** * Serialize the PathFailure object into a byte array which can be read by PathFailure_read */ write(): Uint8Array; } /** A PathFailure of type InitialSend */ export declare class PathFailure_InitialSend extends PathFailure { /** * The error surfaced from initial send. */ err: APIError; } /** A PathFailure of type OnPath */ export declare class PathFailure_OnPath extends PathFailure { /** * If present, this [`NetworkUpdate`] should be applied to the [`NetworkGraph`] so that routing * decisions can take into account the update. * * [`NetworkUpdate`]: crate::routing::gossip::NetworkUpdate * [`NetworkGraph`]: crate::routing::gossip::NetworkGraph */ network_update: Option_NetworkUpdateZ; }