Interface OrchestratorBase

Basic functions that is used by all different Orchestrator types

interface OrchestratorBase {
    createIccfProofOperation: ((targetChainRid, hopIndex) => Promise<Operation>);
    eventEmitter: EventEmitter<OrchestratorEvents>;
    offTransferHop: ((listener) => void);
    offTransferInit: ((listener) => void);
    offTransferSigned: ((listener) => void);
    onTransferHop: ((listener) => void);
    onTransferInit: ((listener) => void);
    onTransferSigned: ((listener) => void);
    performCompleteTransfer: ((tx, opIndex) => Promise<void>);
    state: OrchestratorState;
    walkPath: (() => Promise<void>);
}

Properties

createIccfProofOperation: ((targetChainRid, hopIndex) => Promise<Operation>)

Creates a proof that the latest transaction hop was applied to the target chain

Type declaration

    • (targetChainRid, hopIndex): Promise<Operation>
    • Parameters

      • targetChainRid: Buffer

        the rid of the blockchain that is to validate the proof

      • hopIndex: number

        the index at which the operation to create the proof for can be found

      Returns Promise<Operation>

Returns

the proof operation

offTransferHop: ((listener) => void)

De-registers a listener that was previously registered for receiving events when a transfer hop is successfully completed

Type declaration

    • (listener): void
    • Parameters

      Returns void

offTransferInit: ((listener) => void)

De-registers a listener that was previously registered for receiving events when init transfer has been successfully submitted

Type declaration

    • (listener): void
    • Parameters

      • listener: Listener<[TransactionReceipt]>

        the listener to remove

      Returns void

offTransferSigned: ((listener) => void)

De-registers a listener that was previously registered for receiving events when transfer were signed

Type declaration

    • (listener): void
    • Parameters

      • listener: Listener<[Buffer]>

        the listener to remove

      Returns void

onTransferHop: ((listener) => void)

Registers a listener that gets invoked when a transfer hop is successfully completed

Type declaration

    • (listener): void
    • Parameters

      Returns void

onTransferInit: ((listener) => void)

Registers a listener that gets invoked when init transfer has been successfully submitted

Type declaration

    • (listener): void
    • Parameters

      • listener: Listener<[TransactionReceipt]>

        the listener to register

      Returns void

onTransferSigned: ((listener) => void)

Registers a listener that gets invoked when the transaction is signed

Type declaration

    • (listener): void
    • Parameters

      • listener: Listener<[Buffer]>

        the listener to register

      Returns void

performCompleteTransfer: ((tx, opIndex) => Promise<void>)

Completes a crosschain transfer by applying the transaction on the target chain

Type declaration

    • (tx, opIndex): Promise<void>
    • Parameters

      • tx: RawGtx

        the transaction to apply on the target chain

      • opIndex: number

        the index at which the transfer operation to apply is located in the transaction

      Returns Promise<void>

walkPath: (() => Promise<void>)

Applies a crosschain transaction to each intermediary chain between initial and target chain

Type declaration

    • (): Promise<void>
    • Returns Promise<void>