Skip to content

Commit

Permalink
chore: Add IOApp SDK interface
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista committed Nov 28, 2023
1 parent 294db03 commit 4d5b06a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/ua-utils/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './oapp'
export * from './omnigraph'
1 change: 1 addition & 0 deletions packages/ua-utils/src/oapp/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './types'
7 changes: 7 additions & 0 deletions packages/ua-utils/src/oapp/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { Address, OmniTransaction } from '@/omnigraph/types'
import type { EndpointId } from '@layerzerolabs/lz-definitions'

export interface IOApp {
peers(eid: EndpointId): Promise<string | undefined>
setPeer(eid: EndpointId, peer: Address): Promise<OmniTransaction>
}
6 changes: 6 additions & 0 deletions packages/ua-utils/src/omnigraph/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,9 @@ export interface OmniGraph<TNodeConfig = unknown, TEdgeConfig = unknown> {
contracts: OmniNode<TNodeConfig>[]
connections: OmniEdge<TEdgeConfig>[]
}

export interface OmniTransaction {
point: OmniPoint

data: string
}

0 comments on commit 4d5b06a

Please sign in to comment.