Skip to content

Commit 53cf12c

Browse files
authored
rework p2p connection (#2078)
* rework p2p connection
1 parent 4811854 commit 53cf12c

4 files changed

Lines changed: 612 additions & 584 deletions

File tree

src/@types/Provider.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import { type Multiaddr } from '@multiformats/multiaddr'
2+
import { Signer } from 'ethers'
3+
import type { PeerId } from '@libp2p/interface'
14
import type { AccessList } from './AccessList.js'
25
export interface ProviderFees {
36
providerFeeAddress: string
@@ -44,6 +47,12 @@ export interface ServiceEndpoint {
4447
urlPath: string
4548
}
4649

50+
export interface NodeP2P {
51+
nodeId: string
52+
multiaddress?: Multiaddr[]
53+
}
54+
export type OceanNode = string | NodeP2P | PeerId
55+
4756
export interface NodeStatusProvider {
4857
chainId: string
4958
network: string
@@ -155,3 +164,11 @@ export interface NodeLogEntry {
155164
message: string
156165
meta?: Record<string, any>
157166
}
167+
168+
export interface CompleteSignature {
169+
consumerAddress: string
170+
nonce: string
171+
signature: string
172+
}
173+
174+
export type SignerOrAuthTokenOrSignature = string | Signer | CompleteSignature

0 commit comments

Comments
 (0)