import { AppOrAddress , StepDescribed } from '../../types' ; import App from '../../entities/App' ; type ForwardingPathDescriptionTreeEntry = AppOrAddress | [ AppOrAddress , ForwardingPathDescriptionTreeEntry [ ] ] ; type ForwardingPathDescriptionTree = ForwardingPathDescriptionTreeEntry [ ] ; export default class ForwardingPathDescription { #installedApps : App [ ] ; readonly describedSteps : StepDescribed [ ] ; constructor ( describedSteps , installedApps ) { this . #installedApps = installedApps ; this . describedSteps = describedSteps ; } tree ( ) { const docoratedStep = this . describedSteps . map ( async ( step ) => { const app = this . #installedApps . find ( ( app ) => app . address === step . to ) ; if ( app ) { return { ... step , app , } ; } } ) ; return [ ] ; } toString ( ) { return this . tree ( ) . toString ( ) ; } reduce ( callback ) { } } export { describePath , describeTransaction } from './describe' ; export { decodeForwardingPath } from './decode' ;