textiot
Version:
A framework for building web and native (IoT) Dapps on the IPFS network
39 lines (38 loc) • 1.09 kB
TypeScript
import { IContact, IContactList, IThreadList, IContactQuery, IQueryOptions } from './model';
/**
* Add a new Contact after fetching the Contact information.
*/
export declare function add(contact: IContact): Promise<void>;
/**
* Get Contact information by address.
*/
export declare function get(address: string): Promise<IContact>;
/**
* List all known Contacts.
*/
export declare function list(): Promise<IContactList>;
/**
* Remove a Contact by their address.
*/
export declare function remove(address: string): Promise<void>;
/**
* List all Threads in common with a Contact.
* ```typescript
* Textile.contacts.threads(address);
* ```
*/
export declare function threads(address: string): Promise<IThreadList>;
/**
* Search for Contacts over network.
* ```typescript
* Textile.contacts.search(query, options);
* ```
*/
export declare function search(query: IContactQuery, options: IQueryOptions): Promise<string>;
/**
* Cancel an ongoing contact search.
* ```typescript
* Textile.contacts.cancelSearch();
* ```
*/
export declare function cancelSearch(): Promise<void>;