-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathindex.d.ts
71 lines (66 loc) · 1.89 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Type definitions for YouBase 0.1.10
// Project: YouBase
// Definitions by: Justin Laue <https://github.com/fp-x>
declare namespace YouBase {
export class Wallet {
constructor(custodian: Custodian, mnemonic?: string, config?: Object);
custodian: Custodian;
mnemonic: string;
coin: string;
config: Object;
seed: string;
rootkey: string;
hdkey: string;
privateExtendedKey: string;
profiles: Collection;
static generateMnemonic(): string;
}
export class Collection {
constructor(custodian: Custodian, model: string, key: string, hardened?: boolean)
definition(): any; // Promise
insert(definition, data, autosave?): any; // Promise
all(refresh, pluck?): any; // Promise
at(index): Document;
sync(): any; // Promise
}
export class Document {
constructor(custodian: Custodian, key: string);
fetch(): any; // Promise
link(key, data): any; // Promise
definition(definition?: Definition): any; // Promise
validate(): any; // Promise
data(data, alg?: string): any; // Promise
encrypt(data, alg?: string): any; // Promise
decrypt(): any; // Promise
validate(): any; // Promise
meta(): any; // Promise
summary(): any; // Promise
details(): any; // Promise
save(): any; // Promise
}
export class Definition {
constructor(custodian: Custodian, definition: Definition);
child(key): any; // Promise
children(): any; // Promise
get(key): any; // Promise
bundle(definition: Definition): any; // Promise
schema(schema): any; // Promise
}
export class Custodian {
constructor(config?: Object);
config: Object;
store: any; // storageEngine
data: any; // Datastore
document: any; // Documentstore
}
}
declare class YouBase {
constructor(custodian?: string);
wallet: YouBase.Wallet;
document: YouBase.Document;
definition: YouBase.Definition;
collection: YouBase.Collection;
custodian: YouBase.Custodian;
}
export = YouBase;
export as namespace YouBase;