UNPKG

@junobuild/admin

Version:

A library for interfacing with admin features of Juno

58 lines (57 loc) 2.81 kB
import type { Principal } from '@icp-sdk/core/principal'; import type { SatelliteDid, SatelliteParameters } from '@junobuild/ic-client/actor'; /** * Lists the controllers of a satellite. * * @param {Object} params - The parameters for listing the controllers. * @param {SatelliteParameters} params.satellite - The satellite parameters. * @param {boolean} [params.deprecatedNoScope] - Whether to list deprecated no-scope controllers. * @returns {Promise<[Principal, Controller][]>} A promise that resolves to a list of controllers. */ export declare const listSatelliteControllers: ({ deprecatedNoScope, ...params }: { satellite: SatelliteParameters; deprecatedNoScope?: boolean; }) => Promise<[Principal, SatelliteDid.AccessKey][]>; /** * Sets the controllers of a satellite. * * Note: This only add controllers for the satellite's in-memory list, which is used for * guards and access control within the satellite's features. * * @param {Object} params - The parameters for setting the controllers. * @param {SatelliteParameters} params.satellite - The satellite parameters. * @param {SetControllersArgs} params.args - The arguments for setting the controllers. * @returns {Promise<[Principal, Controller][]>} A promise that resolves to a list of controllers. */ export declare const setSatelliteControllers: (params: { satellite: SatelliteParameters; args: SatelliteDid.SetControllersArgs; }) => Promise<[Principal, SatelliteDid.AccessKey][]>; /** * Delete selected controllers from a satellite. * * Note: This only removes controllers from the satellite's in-memory list, which is used for * guards and access control within the satellite's features. * * @param {Object} params - The parameters for setting the controllers. * @param {SatelliteParameters} params.satellite - The satellite parameters. * @param {SetControllersArgs} params.args - The arguments for setting the controllers. * @returns {Promise<[Principal, Controller][]>} A promise that resolves to a list of controllers. */ export declare const deleteSatelliteControllers: (params: { satellite: SatelliteParameters; args: SatelliteDid.DeleteControllersArgs; }) => Promise<[Principal, SatelliteDid.AccessKey][]>; /** * Delete the calling controller from the satellite. * * Note: This only removes the controller from the satellite's in-memory list, which is used for * guards and access control within the satellite's features. * * @param {Object} params - The parameters for deleting the controller. * @param {SatelliteParameters} params.satellite - The satellite parameters. * @returns {Promise<void>} A promise that resolves when the controller is deleted. */ export declare const deleteSatelliteControllerSelf: (params: { satellite: SatelliteParameters; }) => Promise<void>;