Ai
1 Star 0 Fork 0

XYCode/orbit-db-types

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Store.d.ts 1.67 KB
一键复制 编辑 原始数据 按行查看 历史
rigwild 提交于 2020-03-21 20:52 +08:00 . Fix store typings
declare module "orbit-db-store" {
import IPFS = require("ipfs");
import { Identity } from "orbit-db-identity-provider";
import { EventEmitter } from 'events';
import * as elliptic from "elliptic";
export default class Store {
/**
* The identity is used to sign the database entries.
*/
readonly identity: Identity;
address: { root: string, path: string };
/**
* Contains all entries of this Store
*/
all: any[];
type: string;
/**
* Returns an instance of `elliptic.ec.KeyPair`.
* The keypair is used to sign the database entries.
* The key can also be accessed from the OrbitDB instance: `orbitdb.key.getPublic('hex')`.
*/
key: elliptic.ec.KeyPair;
replicationStatus: IReplicationStatus;
events: EventEmitter;
/**
* Apparently not meant for outside usage
* @param ipfs
* @param identity
* @param address
* @param options
*/
protected constructor (ipfs: IPFS, identity: Identity, address: string, options: IStoreOptions);
close(): Promise<void>;
drop(): Promise<void>;
setIdentity(identity: Identity): void;
/**
* Load the locally persisted database state to memory.
* @param amount Amount of entries loaded into memory
* @returns a `Promise` that resolves once complete
*/
load(amount?: number): Promise<void>;
protected _addOperation(data: any, options: { onProgressCallback?: (entry: any) => any, pin?: boolean }): Promise<string>;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/XYCode-XYC/orbit-db-types.git
git@gitee.com:XYCode-XYC/orbit-db-types.git
XYCode-XYC
orbit-db-types
orbit-db-types
main

搜索帮助