textiot
Version:
A framework for building web and native (IoT) Dapps on the IPFS network
31 lines (30 loc) • 880 B
TypeScript
import { API } from '../core/api';
import { Versions, Summary } from '../models';
/**
* Utils is an API module for various Textile node utilities
*
* @extends API
*/
export default class Utils extends API {
/**
* Get the current node's API, and application versions
* @returns Version of Cafe API and node binary release
*/
version(): Promise<Versions>;
/**
* Get a summary of all local node data
* @returns Summary of node activity
*/
summary(): Promise<Summary>;
/**
* Pings another peer on the network, returning wherther they are online or offline.
* @param id The peer id
* @returns Whether the peer is online
*/
ping(id: string): Promise<string>;
/**
* Check whether the underlying node's API is online
* @returns Whether the API is online
*/
online(): Promise<boolean>;
}