UNPKG

textiot

Version:

A framework for building web and native (IoT) Dapps on the IPFS network

33 lines (32 loc) 1.31 kB
import { API } from '../core/api'; /** * Config is an API module for controling peer node configuration variables * * It works much like 'git config'. The configuration values are stored in a config file * inside your Textile repository. Getting config values will report the currently active * config settings. This may differ from the values specifed when setting values. * * @extends API */ export default class Config extends API { /** * Report the currently active config settings * * The reported settings may differ from the values specifed when setting/patching values. * * @param path Config settings path (e.g., Addresses.API). Omit for full config file. * @returns A JSON representation of the current config setting at the given path */ get(path?: string): Promise<string | object>; /** * Replace or update config settings * * See https://tools.ietf.org/html/rfc6902 for details on RFC6902 JSON patch format. * Be sure to restart the daemon for changes to take effect. * * @param path Config settings path (e.g., Addresses.API). * @param value JSON config settings (can be any valid JSON type) * @returns Whether the operation was successfull */ set(path: string, value: any): Promise<boolean>; }