You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@web5/agent Adding DwnServerInfo to RPC Clients (#489)
- Added a `DwnServerInfo` HTTP client to get info from the `dwn-server`'s `/info` endpoint
```
export type ServerInfo = {
/** the maximum file size the user can request to store */
maxFileSize: number,
/**
* an array of strings representing the server's registration requirements.
*
* ie. ['proof-of-work-sha256-v0', 'terms-of-service']
* */
registrationRequirements: string[],
/** whether web socket support is enabled on this server */
webSocketSupport: boolean,
}
```
This is helpful for retrieving registration requirements and whether the server supports sockets.
It uses a `TTLCache` memory cache as the currently implemented and default, however additional caches can be easily added if necessary.
0 commit comments