@@ -181,14 +181,13 @@ export declare class Blobs {
181181 * It is a single item which can be easily serialized and deserialized.
182182 */
183183export declare class BlobTicket {
184- /** The provider to get a file from. */
185- readonly nodeAddr : NodeAddr
186184 /** The format of the blob. */
187185 readonly format : BlobFormat
188186 /** The hash to retrieve. */
189187 readonly hash : string
190188 constructor ( nodeAddr : NodeAddr , hash : string , format : BlobFormat )
191189 static fromString ( str : string ) : BlobTicket
190+ get nodeAddr ( ) : NodeAddr
192191 /** Checks if the two tickets are equal */
193192 isEqual ( other : BlobTicket ) : boolean
194193 toString ( ) : string
@@ -219,12 +218,11 @@ export declare class Collection {
219218export declare class Connecting {
220219 connect ( ) : Promise < Connection >
221220 alpn ( ) : Promise < Buffer >
222- localIp ( ) : Promise < string | null >
223- remoteAddress ( ) : Promise < string >
224221}
225222
226223export declare class Connection {
227- getRemoteNodeId ( ) : PublicKey
224+ alpn ( ) : Buffer | null
225+ remoteNodeId ( ) : PublicKey
228226 openUni ( ) : Promise < SendStream >
229227 acceptUni ( ) : Promise < RecvStream >
230228 openBi ( ) : Promise < BiStream >
@@ -234,11 +232,8 @@ export declare class Connection {
234232 closeReason ( ) : string | null
235233 close ( errorCode : bigint , reason : Uint8Array ) : void
236234 sendDatagram ( data : Uint8Array ) : void
237- sendDatagramWait ( data : Uint8Array ) : Promise < void >
238235 maxDatagramSize ( ) : bigint | null
239236 datagramSendBufferSpace ( ) : bigint
240- remoteAddress ( ) : string
241- localIp ( ) : string | null
242237 rtt ( ) : bigint
243238 stableId ( ) : bigint
244239 setMaxConcurrentUniStream ( count : bigint ) : void
@@ -330,10 +325,9 @@ export declare class DocTicket {
330325 readonly capability : string
331326 /** The capabillity kind */
332327 readonly capabilityKind : CapabilityKind
333- /** A list of nodes to contact. */
334- readonly nodes : Array < NodeAddr >
335328 static fromString ( str : string ) : DocTicket
336329 toString ( ) : string
330+ get nodes ( ) : Array < NodeAddr >
337331}
338332
339333/** Download policy to decide which content blobs shall be downloaded. */
@@ -1365,7 +1359,7 @@ export declare const enum Origin {
13651359export declare function pathToKey ( path : string , prefix ?: string | undefined | null , root ?: string | undefined | null ) : Array < number >
13661360
13671361export interface ProtocolHandler {
1368- accept : ( ( err : Error | null , arg : Connecting ) => void )
1362+ accept : ( ( err : Error | null , arg : Connection ) => void )
13691363 shutdown ?: ( ( err : Error | null , ) => void )
13701364}
13711365
@@ -1456,9 +1450,6 @@ export declare const enum SortDirection {
14561450 Desc = 'Desc'
14571451}
14581452
1459- /** Initialize the global metrics collection. */
1460- export declare function startMetricsCollection ( ) : void
1461-
14621453/** Outcome of a sync operation */
14631454export interface SyncEvent {
14641455 /** Peer we synced with */
0 commit comments