@dapplets/dapplet-extension
Version:
The Bridge to the Augmented Web.
38 lines (37 loc) • 1.53 kB
TypeScript
import ModuleInfo from '../models/moduleInfo';
import VersionInfo from '../models/versionInfo';
import { Registry, RegistryConfig } from './registry';
export declare class NearRegistry implements Registry {
isAvailable: boolean;
error: string;
blockchain: string;
url: string;
isDev: boolean;
private _nearAccount;
private _contract;
private _moduleInfoCache;
constructor({ url, isDev, nearAccount }: RegistryConfig);
getModuleInfo(contextIds: string[], users: string[]): Promise<{
[contextId: string]: ModuleInfo[];
}>;
getModuleInfoByName(name: string): Promise<ModuleInfo>;
getVersionNumbers(name: string, branch: string): Promise<string[]>;
getVersionInfo(name: string, branch: string, version: string): Promise<VersionInfo>;
getAllDevModules(): Promise<{
module: ModuleInfo;
versions: VersionInfo[];
}[]>;
addModule(module: ModuleInfo, version: VersionInfo): Promise<void>;
getOwnership(name: string): Promise<any>;
transferOwnership(moduleName: string, newAccount: string): Promise<void>;
getContextIds(): Promise<string[]>;
addContextId(moduleName: string, contextId: string): Promise<void>;
removeContextId(moduleName: string, contextId: string): Promise<void>;
getAdmins(): Promise<string[]>;
addAdmin(): Promise<void>;
removeAdmin(): Promise<void>;
editModuleInfo(): Promise<void>;
getModuleNftUrl(): Promise<string>;
private _toNearStorageRef;
private _fromNearStorageRef;
}