textiot
Version:
A framework for building web and native (IoT) Dapps on the IPFS network
37 lines (36 loc) • 1.17 kB
TypeScript
import { API } from '../core/api';
import { ApiOptions, Contact } from '../models';
/**
* Account is an API module for managing a node account
*
* @extends API
*/
export default class Account extends API {
private snapshots;
constructor(opts?: ApiOptions);
/**
* Retrieve the local node account address
*
* @returns The current node account's address
*/
address(): Promise<string>;
/**
* Retrieve the local node account seed
*
* @returns The current node account's seed
*/
seed(): Promise<string>;
/**
* Retrieve the local node account's own contact info
*
* @returns The current node account's contact info
*/
contact(): Promise<Contact>;
/**
* Syncs the local node account with all thread snapshots found on the network
*
* @param apply Whether to apply the discovered thread snapshots as they are found (default false)
* @param wait Stops searching after 'wait' seconds have elapsed (max 30 default 2)
*/
sync(apply?: boolean, wait?: number): Promise<import("web-streams-polyfill").ReadableStream<import("../models").QueryResult>>;
}