Docs
chromia.com

Function

findPathToChainForAsset

  • 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

      connection which will be used to derive the source chain.

    • 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.