-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating oapp types in ua-utils. Updating oapp sdk in ua-utils-evm
- Loading branch information
1 parent
59be4c5
commit 09ebe6a
Showing
4 changed files
with
222 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,34 @@ | ||
import type { EndpointId } from '@layerzerolabs/lz-definitions' | ||
import type { IEndpoint } from '@layerzerolabs/protocol-utils' | ||
import type { Address, Bytes32, Factory, OmniGraph, OmniTransaction, IOmniSDK, OmniPoint } from '@layerzerolabs/utils' | ||
import type { IEndpoint, Timeout } from '@layerzerolabs/protocol-utils' | ||
import type { Address, Factory, IOmniSDK, OmniGraph, OmniPoint, OmniTransaction } from '@layerzerolabs/utils' | ||
import type { Bytes32 } from '@layerzerolabs/utils' | ||
import type { Uln302ExecutorConfig, Uln302UlnConfig } from '@layerzerolabs/protocol-utils' | ||
|
||
export interface IOApp extends IOmniSDK { | ||
getEndpointSDK(): Promise<IEndpoint> | ||
getPeer(eid: EndpointId): Promise<Bytes32 | undefined> | ||
hasPeer(eid: EndpointId, address: Bytes32 | Address | null | undefined): Promise<boolean> | ||
setPeer(eid: EndpointId, peer: Bytes32 | Address | null | undefined): Promise<OmniTransaction> | ||
callEndpoint(callData: string): Promise<OmniTransaction> | ||
} | ||
|
||
export type OAppOmniGraph = OmniGraph<unknown, unknown> | ||
export interface ReceiveLibraryConfig { | ||
receiveLibrary: string | ||
gracePeriod: number | ||
} | ||
export interface OAppEdgeConfig { | ||
sendLibrary?: string | ||
receiveLibraryConfig?: ReceiveLibraryConfig | ||
receiveLibraryTimeoutConfig?: Timeout | ||
sendConfig?: { | ||
executorConfig: Uln302ExecutorConfig | ||
ulnConfig: Uln302UlnConfig | ||
} | ||
receiveConfig?: { | ||
ulnConfig: Uln302UlnConfig | ||
} | ||
} | ||
|
||
export type OAppOmniGraph = OmniGraph<unknown, OAppEdgeConfig> | ||
|
||
export type OAppFactory<TOApp extends IOApp = IOApp, TOmniPoint = OmniPoint> = Factory<[TOmniPoint], TOApp> |