import { Address } from '@aragon/connect-types' ; import { providers as ethersProviders } from 'ethers' ; import { calculateTransactionPath } from './calculatePath' ; import App from '../../entities/App' ; import ForwardingPath from '../../entities/ForwardingPath' ; param { string } destination param { string } methodSignature param { Array < * > } params param { string } finalForwarder return { Promise < Array < Object > > } export async function getForwardingPath ( sender , destinationApp , methodSignature , params , installedApps , provider , finalForwarder ? ) { const { path , transactions } = await calculateTransactionPath ( sender , destinationApp , methodSignature , params , installedApps , provider , finalForwarder ) ; return new ForwardingPath ( { destination : destinationApp , path , transactions , } , installedApps , provider ) ; }