# findPathToChainForAsset · FT4 TypeScript client · Chromia Docs (concept)

> findPathToChainForAsset(
    connection: Connection ,
    asset: Asset ,
    blockchainRid: BufferId,
    maxPathLength?: number,
): Promise<Buffer<ArrayBu

Source: https://docs.chromia.com/pages/ft4-ts-client/functions/crosschain.findPathToChainForAsset/

Function

# findPathToChainForAsset

* ```signature
  findPathToChainForAsset(
      connection: Connection,
      asset: Asset,
      blockchainRid: BufferId,
      maxPathLength?: number,
  ): Promise<Buffer<ArrayBufferLike>[]>
  ```

  Computes the path, that is a list of intermediate chains, to a specific chain from a source chain.

  #### Parameters

  + connection: [Connection](https://docs.chromia.com/pages/ft4-ts-client/interfaces/ft-session.Connection/)

    connection which will be used to derive the source chain.
  + asset: [Asset](https://docs.chromia.com/pages/ft4-ts-client/types/asset.Asset/)

    the asset to find the path for
  + blockchainRid: BufferId

    the target blockchain rid
  + maxPathLength: number = 100

    optional parameter to specify a maximum length of the resulting path. If the computed path is longer than this value, an error will be thrown. Default value is 100.

  #### Returns Promise<Buffer<ArrayBufferLike>[]>

  a list of blockchain rids which represents the path from the source to the target for the specified asset.

[View this page on docs.chromia.com](https://docs.chromia.com/pages/ft4-ts-client/functions/crosschain.findPathToChainForAsset.html)Generated API reference, mirrored from the live docs
