signify-ts 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -47
- package/dist/buffer-polyfill.d.ts +1 -0
- package/dist/exports.d.ts +40 -0
- package/dist/index.d.ts +4 -3
- package/dist/keri/app/aiding.d.ts +138 -0
- package/dist/keri/app/clienting.d.ts +182 -0
- package/dist/keri/app/contacting.d.ts +93 -0
- package/dist/keri/app/controller.d.ts +49 -0
- package/dist/keri/app/coring.d.ts +121 -0
- package/dist/keri/app/credentialing.d.ts +239 -0
- package/dist/keri/app/escrowing.d.ts +19 -0
- package/dist/keri/app/exchanging.d.ts +60 -0
- package/dist/keri/app/grouping.d.ts +44 -0
- package/dist/keri/app/habery.d.ts +48 -47
- package/dist/keri/app/notifying.d.ts +34 -0
- package/dist/keri/core/authing.d.ts +10 -9
- package/dist/keri/core/bexter.d.ts +7 -0
- package/dist/keri/core/cigar.d.ts +8 -8
- package/dist/keri/core/cipher.d.ts +5 -5
- package/dist/keri/core/core.d.ts +59 -53
- package/dist/keri/core/counter.d.ts +43 -43
- package/dist/keri/core/decrypter.d.ts +10 -10
- package/dist/keri/core/diger.d.ts +21 -21
- package/dist/keri/core/encrypter.d.ts +9 -9
- package/dist/keri/core/eventing.d.ts +54 -21
- package/dist/keri/core/httping.d.ts +44 -34
- package/dist/keri/core/indexer.d.ts +98 -88
- package/dist/keri/core/keeping.d.ts +103 -1
- package/dist/keri/core/kering.d.ts +5 -5
- package/dist/keri/core/manager.d.ts +174 -172
- package/dist/keri/core/matter.d.ts +116 -69
- package/dist/keri/core/number.d.ts +7 -6
- package/dist/keri/core/pather.d.ts +7 -0
- package/dist/keri/core/prefixer.d.ts +15 -15
- package/dist/keri/core/saider.d.ts +23 -23
- package/dist/keri/core/salter.d.ts +23 -23
- package/dist/keri/core/seqner.d.ts +15 -0
- package/dist/keri/core/serder.d.ts +31 -23
- package/dist/keri/core/siger.d.ts +18 -18
- package/dist/keri/core/signer.d.ts +34 -34
- package/dist/keri/core/tholder.d.ts +29 -14
- package/dist/keri/core/utils.d.ts +20 -15
- package/dist/keri/core/vdring.d.ts +16 -0
- package/dist/keri/core/verfer.d.ts +13 -12
- package/dist/keri/end/ending.d.ts +13 -13
- package/dist/math.d.ts +1 -0
- package/dist/ready.d.ts +1 -0
- package/dist/signify-ts.cjs +7835 -0
- package/dist/signify-ts.cjs.development.js +6369 -256
- package/dist/signify-ts.cjs.development.js.map +1 -1
- package/dist/signify-ts.cjs.map +7 -0
- package/dist/signify-ts.cjs.production.min.js +1 -1
- package/dist/signify-ts.cjs.production.min.js.map +1 -1
- package/dist/signify-ts.esm.js +6205 -229
- package/dist/signify-ts.esm.js.map +1 -1
- package/dist/signify-ts.mjs +7811 -0
- package/dist/signify-ts.mjs.map +7 -0
- package/package.json +49 -49
- package/src/buffer-polyfill.ts +5 -0
- package/src/exports.ts +44 -0
- package/src/index.ts +4 -5
- package/src/keri/app/aiding.ts +493 -0
- package/src/keri/app/clienting.ts +492 -0
- package/src/keri/app/contacting.ts +188 -0
- package/src/keri/app/controller.ts +372 -0
- package/src/keri/app/coring.ts +225 -0
- package/src/keri/app/credentialing.ts +820 -0
- package/src/keri/app/escrowing.ts +34 -0
- package/src/keri/app/exchanging.ts +220 -0
- package/src/keri/app/grouping.ts +90 -0
- package/src/keri/app/habery.ts +118 -85
- package/src/keri/app/notifying.ts +69 -0
- package/src/keri/core/authing.ts +73 -85
- package/src/keri/core/bexter.ts +138 -0
- package/src/keri/core/cigar.ts +10 -11
- package/src/keri/core/cipher.ts +23 -14
- package/src/keri/core/core.ts +223 -81
- package/src/keri/core/counter.ts +182 -116
- package/src/keri/core/decrypter.ts +48 -34
- package/src/keri/core/diger.ts +23 -22
- package/src/keri/core/encrypter.ts +37 -27
- package/src/keri/core/eventing.ts +468 -106
- package/src/keri/core/httping.ts +151 -105
- package/src/keri/core/indexer.ts +313 -211
- package/src/keri/core/keeping.ts +679 -3
- package/src/keri/core/kering.ts +4 -6
- package/src/keri/core/manager.ts +660 -499
- package/src/keri/core/matter.ts +382 -148
- package/src/keri/core/number.ts +56 -11
- package/src/keri/core/pather.ts +98 -0
- package/src/keri/core/prefixer.ts +122 -101
- package/src/keri/core/saider.ts +104 -76
- package/src/keri/core/salter.ts +71 -40
- package/src/keri/core/seqner.ts +46 -0
- package/src/keri/core/serder.ts +102 -38
- package/src/keri/core/siger.ts +19 -18
- package/src/keri/core/signer.ts +73 -53
- package/src/keri/core/tholder.ts +196 -30
- package/src/keri/core/utils.ts +121 -50
- package/src/keri/core/vdring.ts +94 -0
- package/src/keri/core/verfer.ts +22 -9
- package/src/keri/end/ending.ts +111 -101
- package/src/math.ts +3 -0
- package/src/ready.ts +5 -0
- package/dist/keri/app/accountant.d.ts +0 -10
- package/dist/keri/app/apping.d.ts +0 -1
- package/dist/keri/app/client.d.ts +0 -7
- package/dist/keri/app/signify.d.ts +0 -6
- package/src/keri/app/accountant.ts +0 -35
- package/src/keri/app/apping.ts +0 -12
- package/src/keri/app/client.ts +0 -30
- package/src/keri/app/signify.ts +0 -12
- package/src/keri/app/tsconfig.json +0 -100
- package/src/keri/core/tsconfig.json +0 -100
- package/src/keri/end/tsconfig.json +0 -100
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { SignifyClient } from './clienting';
|
|
2
|
+
export declare function randomPasscode(): string;
|
|
3
|
+
export declare function randomNonce(): string;
|
|
4
|
+
export declare class Oobis {
|
|
5
|
+
client: SignifyClient;
|
|
6
|
+
/**
|
|
7
|
+
* Oobis
|
|
8
|
+
* @param {SignifyClient} client
|
|
9
|
+
*/
|
|
10
|
+
constructor(client: SignifyClient);
|
|
11
|
+
/**
|
|
12
|
+
* Get the OOBI(s) for a managed indentifier for a given role
|
|
13
|
+
* @param {string} name Name or alias of the identifier
|
|
14
|
+
* @param {string} role Authorized role
|
|
15
|
+
* @returns {Promise<any>} A promise to the OOBI(s)
|
|
16
|
+
*/
|
|
17
|
+
get(name: string, role?: string): Promise<any>;
|
|
18
|
+
/**
|
|
19
|
+
* Resolve an OOBI
|
|
20
|
+
* @async
|
|
21
|
+
* @param {string} oobi The OOBI to be resolver
|
|
22
|
+
* @param {string} [alias] Optional name or alias to link the OOBI resolution to a contact
|
|
23
|
+
* @returns {Promise<any>} A promise to the long-running operation
|
|
24
|
+
*/
|
|
25
|
+
resolve(oobi: string, alias?: string): Promise<any>;
|
|
26
|
+
}
|
|
27
|
+
export interface Operation<T = unknown> {
|
|
28
|
+
name: string;
|
|
29
|
+
metadata?: {
|
|
30
|
+
depends?: Operation;
|
|
31
|
+
[property: string]: any;
|
|
32
|
+
};
|
|
33
|
+
done?: boolean;
|
|
34
|
+
error?: any;
|
|
35
|
+
response?: T;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Operations
|
|
39
|
+
* @remarks
|
|
40
|
+
* Operations represent the status and result of long running tasks performed by KERIA agent
|
|
41
|
+
*/
|
|
42
|
+
export declare class Operations {
|
|
43
|
+
client: SignifyClient;
|
|
44
|
+
/**
|
|
45
|
+
* Operations
|
|
46
|
+
* @param {SignifyClient} client
|
|
47
|
+
*/
|
|
48
|
+
constructor(client: SignifyClient);
|
|
49
|
+
/**
|
|
50
|
+
* Get operation status
|
|
51
|
+
* @async
|
|
52
|
+
* @param {string} name Name of the operation
|
|
53
|
+
* @returns {Promise<Operation>} A promise to the status of the operation
|
|
54
|
+
*/
|
|
55
|
+
get<T = unknown>(name: string): Promise<Operation<T>>;
|
|
56
|
+
/**
|
|
57
|
+
* List operations
|
|
58
|
+
* @async
|
|
59
|
+
* @param {string} type Select operations by type
|
|
60
|
+
* @returns {Promise<Operation[]>} A list of operations
|
|
61
|
+
*/
|
|
62
|
+
list(type?: string): Promise<Operation<any>[]>;
|
|
63
|
+
/**
|
|
64
|
+
* Delete operation
|
|
65
|
+
* @async
|
|
66
|
+
* @param {string} name Name of the operation
|
|
67
|
+
*/
|
|
68
|
+
delete(name: string): Promise<void>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* KeyEvents
|
|
72
|
+
*/
|
|
73
|
+
export declare class KeyEvents {
|
|
74
|
+
client: SignifyClient;
|
|
75
|
+
/**
|
|
76
|
+
* KeyEvents
|
|
77
|
+
* @param {SignifyClient} client
|
|
78
|
+
*/
|
|
79
|
+
constructor(client: SignifyClient);
|
|
80
|
+
/**
|
|
81
|
+
* Retrieve key events for an identifier
|
|
82
|
+
* @async
|
|
83
|
+
* @param {string} pre Identifier prefix
|
|
84
|
+
* @returns {Promise<any>} A promise to the key events
|
|
85
|
+
*/
|
|
86
|
+
get(pre: string): Promise<any>;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* KeyStates
|
|
90
|
+
*/
|
|
91
|
+
export declare class KeyStates {
|
|
92
|
+
client: SignifyClient;
|
|
93
|
+
/**
|
|
94
|
+
* KeyStates
|
|
95
|
+
* @param {SignifyClient} client
|
|
96
|
+
*/
|
|
97
|
+
constructor(client: SignifyClient);
|
|
98
|
+
/**
|
|
99
|
+
* Retriene the key state for an identifier
|
|
100
|
+
* @async
|
|
101
|
+
* @param {string} pre Identifier prefix
|
|
102
|
+
* @returns {Promise<any>} A promise to the key states
|
|
103
|
+
*/
|
|
104
|
+
get(pre: string): Promise<any>;
|
|
105
|
+
/**
|
|
106
|
+
* Retrieve the key state for a list of identifiers
|
|
107
|
+
* @async
|
|
108
|
+
* @param {Array<string>} pres List of identifier prefixes
|
|
109
|
+
* @returns {Promise<any>} A promise to the key states
|
|
110
|
+
*/
|
|
111
|
+
list(pres: string[]): Promise<any>;
|
|
112
|
+
/**
|
|
113
|
+
* Query the key state of an identifier for a given sequence number or anchor
|
|
114
|
+
* @async
|
|
115
|
+
* @param {string} pre Identifier prefix
|
|
116
|
+
* @param {number} [sn] Optional sequence number
|
|
117
|
+
* @param {any} [anchor] Optional anchor
|
|
118
|
+
* @returns {Promise<any>} A promise to the long-running operation
|
|
119
|
+
*/
|
|
120
|
+
query(pre: string, sn?: string, anchor?: any): Promise<any>;
|
|
121
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { SignifyClient } from './clienting';
|
|
2
|
+
import { Dict } from '../core/core';
|
|
3
|
+
import { Serder } from '../core/serder';
|
|
4
|
+
import { Operation } from './coring';
|
|
5
|
+
/** Types of credentials */
|
|
6
|
+
export declare class CredentialTypes {
|
|
7
|
+
static issued: string;
|
|
8
|
+
static received: string;
|
|
9
|
+
}
|
|
10
|
+
/** Credential filter parameters */
|
|
11
|
+
export interface CredentialFilter {
|
|
12
|
+
filter?: object;
|
|
13
|
+
sort?: object[];
|
|
14
|
+
skip?: number;
|
|
15
|
+
limit?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface IssueCredentialArgs {
|
|
18
|
+
/**
|
|
19
|
+
* Name of the issuer identifier
|
|
20
|
+
*/
|
|
21
|
+
issuerName: string;
|
|
22
|
+
/**
|
|
23
|
+
* QB64 AID of credential registry
|
|
24
|
+
*/
|
|
25
|
+
registryId: string;
|
|
26
|
+
/**
|
|
27
|
+
* SAID Of the schema
|
|
28
|
+
*/
|
|
29
|
+
schemaId: string;
|
|
30
|
+
/**
|
|
31
|
+
* Prefix of recipient identifier
|
|
32
|
+
*/
|
|
33
|
+
recipient?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Credential data
|
|
36
|
+
*/
|
|
37
|
+
data?: Record<string, unknown>;
|
|
38
|
+
/**
|
|
39
|
+
* Credential rules
|
|
40
|
+
*/
|
|
41
|
+
rules?: string | Record<string, unknown>;
|
|
42
|
+
/**
|
|
43
|
+
* Credential sources
|
|
44
|
+
*/
|
|
45
|
+
source?: Record<string, unknown>;
|
|
46
|
+
/**
|
|
47
|
+
* Datetime to set for the credential
|
|
48
|
+
*/
|
|
49
|
+
datetime?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Flag to issue a credential with privacy preserving features
|
|
52
|
+
*/
|
|
53
|
+
privacy?: boolean;
|
|
54
|
+
}
|
|
55
|
+
export interface IssueCredentialResult {
|
|
56
|
+
acdc: Serder;
|
|
57
|
+
anc: Serder;
|
|
58
|
+
iss: Serder;
|
|
59
|
+
op: Operation;
|
|
60
|
+
}
|
|
61
|
+
export interface IpexGrantArgs {
|
|
62
|
+
/**
|
|
63
|
+
* Alias for the IPEX sender AID
|
|
64
|
+
*/
|
|
65
|
+
senderName: string;
|
|
66
|
+
/**
|
|
67
|
+
* Prefix of the IPEX recipient AID
|
|
68
|
+
*/
|
|
69
|
+
recipient: string;
|
|
70
|
+
/**
|
|
71
|
+
* Message to send
|
|
72
|
+
*/
|
|
73
|
+
message?: string;
|
|
74
|
+
/**
|
|
75
|
+
* qb64 SAID of agree message this grant is responding to
|
|
76
|
+
*/
|
|
77
|
+
agree?: string;
|
|
78
|
+
datetime?: string;
|
|
79
|
+
acdc: Serder;
|
|
80
|
+
acdcAttachment?: string;
|
|
81
|
+
iss: Serder;
|
|
82
|
+
issAttachment?: string;
|
|
83
|
+
anc: Serder;
|
|
84
|
+
ancAttachment?: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Credentials
|
|
88
|
+
*/
|
|
89
|
+
export declare class Credentials {
|
|
90
|
+
client: SignifyClient;
|
|
91
|
+
/**
|
|
92
|
+
* Credentials
|
|
93
|
+
* @param {SignifyClient} client
|
|
94
|
+
*/
|
|
95
|
+
constructor(client: SignifyClient);
|
|
96
|
+
/**
|
|
97
|
+
* List credentials
|
|
98
|
+
* @async
|
|
99
|
+
* @param {CredentialFilter} [kargs] Optional parameters to filter the credentials
|
|
100
|
+
* @returns {Promise<any>} A promise to the list of credentials
|
|
101
|
+
*/
|
|
102
|
+
list(kargs?: CredentialFilter): Promise<any>;
|
|
103
|
+
/**
|
|
104
|
+
* Get a credential
|
|
105
|
+
* @async
|
|
106
|
+
* @param {string} said - SAID of the credential
|
|
107
|
+
* @param {boolean} [includeCESR=false] - Optional flag export the credential in CESR format
|
|
108
|
+
* @returns {Promise<any>} A promise to the credential
|
|
109
|
+
*/
|
|
110
|
+
get(said: string, includeCESR?: boolean): Promise<any>;
|
|
111
|
+
/**
|
|
112
|
+
* Issue a credential
|
|
113
|
+
*/
|
|
114
|
+
issue(args: IssueCredentialArgs): Promise<IssueCredentialResult>;
|
|
115
|
+
/**
|
|
116
|
+
* Revoke credential
|
|
117
|
+
* @async
|
|
118
|
+
* @param {string} name Name or alias of the identifier
|
|
119
|
+
* @param {string} said SAID of the credential
|
|
120
|
+
* @returns {Promise<any>} A promise to the long-running operation
|
|
121
|
+
*/
|
|
122
|
+
revoke(name: string, said: string): Promise<any>;
|
|
123
|
+
/**
|
|
124
|
+
* Present a credential
|
|
125
|
+
* @async
|
|
126
|
+
* @param {string} name Name or alias of the identifier
|
|
127
|
+
* @param {string} said SAID of the credential
|
|
128
|
+
* @param {string} recipient Identifier prefix of the receiver of the presentation
|
|
129
|
+
* @param {boolean} [include=true] Flag to indicate whether to stream credential alongside presentation exchange message
|
|
130
|
+
* @returns {Promise<string>} A promise to the long-running operation
|
|
131
|
+
*/
|
|
132
|
+
present(name: string, said: string, recipient: string, include?: boolean): Promise<string>;
|
|
133
|
+
/**
|
|
134
|
+
* Request a presentation of a credential
|
|
135
|
+
* @async
|
|
136
|
+
* @param {string} name Name or alias of the identifier
|
|
137
|
+
* @param {string} recipient Identifier prefix of the receiver of the presentation
|
|
138
|
+
* @param {string} schema SAID of the schema
|
|
139
|
+
* @param {string} [issuer] Optional prefix of the issuer of the credential
|
|
140
|
+
* @returns {Promise<string>} A promise to the long-running operation
|
|
141
|
+
*/
|
|
142
|
+
request(name: string, recipient: string, schema: string, issuer?: string): Promise<string>;
|
|
143
|
+
}
|
|
144
|
+
export interface CreateRegistryArgs {
|
|
145
|
+
name: string;
|
|
146
|
+
registryName: string;
|
|
147
|
+
toad?: string | number | undefined;
|
|
148
|
+
noBackers?: boolean;
|
|
149
|
+
baks?: string[];
|
|
150
|
+
nonce?: string;
|
|
151
|
+
}
|
|
152
|
+
export declare class RegistryResult {
|
|
153
|
+
private readonly _regser;
|
|
154
|
+
private readonly _serder;
|
|
155
|
+
private readonly _sigs;
|
|
156
|
+
private readonly promise;
|
|
157
|
+
constructor(regser: Serder, serder: Serder, sigs: any[], promise: Promise<Response>);
|
|
158
|
+
get regser(): any;
|
|
159
|
+
get serder(): Serder;
|
|
160
|
+
get sigs(): string[];
|
|
161
|
+
op(): Promise<any>;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Registries
|
|
165
|
+
*/
|
|
166
|
+
export declare class Registries {
|
|
167
|
+
client: SignifyClient;
|
|
168
|
+
/**
|
|
169
|
+
* Registries
|
|
170
|
+
* @param {SignifyClient} client
|
|
171
|
+
*/
|
|
172
|
+
constructor(client: SignifyClient);
|
|
173
|
+
/**
|
|
174
|
+
* List registries
|
|
175
|
+
* @async
|
|
176
|
+
* @param {string} name Name or alias of the identifier
|
|
177
|
+
* @returns {Promise<any>} A promise to the list of registries
|
|
178
|
+
*/
|
|
179
|
+
list(name: string): Promise<any>;
|
|
180
|
+
/**
|
|
181
|
+
* Create a registry
|
|
182
|
+
* @async
|
|
183
|
+
* @param {CreateRegistryArgs}
|
|
184
|
+
* @returns {Promise<[any, Serder, any[], object]> } A promise to the long-running operation
|
|
185
|
+
*/
|
|
186
|
+
create({ name, registryName, noBackers, toad, baks, nonce, }: CreateRegistryArgs): Promise<RegistryResult>;
|
|
187
|
+
createFromEvents(hab: Dict<any>, name: string, registryName: string, vcp: Dict<any>, ixn: Dict<any>, sigs: any[]): Promise<Response>;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Schemas
|
|
191
|
+
*/
|
|
192
|
+
export declare class Schemas {
|
|
193
|
+
client: SignifyClient;
|
|
194
|
+
/**
|
|
195
|
+
* Schemas
|
|
196
|
+
* @param {SignifyClient} client
|
|
197
|
+
*/
|
|
198
|
+
constructor(client: SignifyClient);
|
|
199
|
+
/**
|
|
200
|
+
* Get a schema
|
|
201
|
+
* @async
|
|
202
|
+
* @param {string} said SAID of the schema
|
|
203
|
+
* @returns {Promise<any>} A promise to the schema
|
|
204
|
+
*/
|
|
205
|
+
get(said: string): Promise<any>;
|
|
206
|
+
/**
|
|
207
|
+
* List schemas
|
|
208
|
+
* @async
|
|
209
|
+
* @returns {Promise<any>} A promise to the list of schemas
|
|
210
|
+
*/
|
|
211
|
+
list(): Promise<any>;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Ipex
|
|
215
|
+
*/
|
|
216
|
+
export declare class Ipex {
|
|
217
|
+
client: SignifyClient;
|
|
218
|
+
/**
|
|
219
|
+
* Schemas
|
|
220
|
+
* @param {SignifyClient} client
|
|
221
|
+
*/
|
|
222
|
+
constructor(client: SignifyClient);
|
|
223
|
+
/**
|
|
224
|
+
* Create an IPEX grant EXN message
|
|
225
|
+
*/
|
|
226
|
+
grant(args: IpexGrantArgs): Promise<[Serder, string[], string]>;
|
|
227
|
+
submitGrant(name: string, exn: Serder, sigs: string[], atc: string, recp: string[]): Promise<any>;
|
|
228
|
+
/**
|
|
229
|
+
* Create an IPEX admit EXN message
|
|
230
|
+
* @async
|
|
231
|
+
* @param {string} name Name or alias of the identifier
|
|
232
|
+
* @param {string} message accompany human readable description of the credential being admitted
|
|
233
|
+
* @param {string} grant qb64 SAID of grant message this admit is responding to
|
|
234
|
+
* @param {string} datetime Optional datetime to set for the credential
|
|
235
|
+
* @returns {Promise<[Serder, string[], string]>} A promise to the long-running operation
|
|
236
|
+
*/
|
|
237
|
+
admit(name: string, message: string, grant: string, datetime?: string): Promise<[Serder, string[], string]>;
|
|
238
|
+
submitAdmit(name: string, exn: Serder, sigs: string[], atc: string, recp: string[]): Promise<any>;
|
|
239
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SignifyClient } from './clienting';
|
|
2
|
+
/**
|
|
3
|
+
* Escrows
|
|
4
|
+
*/
|
|
5
|
+
export declare class Escrows {
|
|
6
|
+
client: SignifyClient;
|
|
7
|
+
/**
|
|
8
|
+
* Escrows
|
|
9
|
+
* @param {SignifyClient} client
|
|
10
|
+
*/
|
|
11
|
+
constructor(client: SignifyClient);
|
|
12
|
+
/**
|
|
13
|
+
* List replay messages
|
|
14
|
+
* @async
|
|
15
|
+
* @param {string} [route] Optional route in the replay message
|
|
16
|
+
* @returns {Promise<any>} A promise to the list of replay messages
|
|
17
|
+
*/
|
|
18
|
+
listReply(route?: string): Promise<any>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { SignifyClient } from './clienting';
|
|
2
|
+
import { Dict } from '../core/core';
|
|
3
|
+
import { Serder } from '../core/serder';
|
|
4
|
+
/**
|
|
5
|
+
* Exchanges
|
|
6
|
+
*/
|
|
7
|
+
export declare class Exchanges {
|
|
8
|
+
client: SignifyClient;
|
|
9
|
+
/**
|
|
10
|
+
* Exchanges
|
|
11
|
+
* @param {SignifyClient} client
|
|
12
|
+
*/
|
|
13
|
+
constructor(client: SignifyClient);
|
|
14
|
+
/**
|
|
15
|
+
* Create exn message
|
|
16
|
+
* @async
|
|
17
|
+
* @returns {Promise<any>} A promise to the list of replay messages
|
|
18
|
+
* @param sender
|
|
19
|
+
* @param route
|
|
20
|
+
* @param payload
|
|
21
|
+
* @param embeds
|
|
22
|
+
* @param recipient
|
|
23
|
+
* @param datetime
|
|
24
|
+
* @param dig
|
|
25
|
+
*/
|
|
26
|
+
createExchangeMessage(sender: Dict<any>, route: string, payload: Dict<any>, embeds: Dict<any>, recipient?: string, datetime?: string, dig?: string): Promise<[Serder, string[], string]>;
|
|
27
|
+
/**
|
|
28
|
+
* Send exn messages to list of recipients
|
|
29
|
+
* @async
|
|
30
|
+
* @returns {Promise<any>} A promise to the list of replay messages
|
|
31
|
+
* @param name
|
|
32
|
+
* @param topic
|
|
33
|
+
* @param sender
|
|
34
|
+
* @param route
|
|
35
|
+
* @param payload
|
|
36
|
+
* @param embeds
|
|
37
|
+
* @param recipients
|
|
38
|
+
*/
|
|
39
|
+
send(name: string, topic: string, sender: Dict<any>, route: string, payload: Dict<any>, embeds: Dict<any>, recipients: string[]): Promise<any>;
|
|
40
|
+
/**
|
|
41
|
+
* Send exn messaget to list of recipients
|
|
42
|
+
* @async
|
|
43
|
+
* @returns {Promise<any>} A promise to the list of replay messages
|
|
44
|
+
* @param name
|
|
45
|
+
* @param topic
|
|
46
|
+
* @param exn
|
|
47
|
+
* @param sigs
|
|
48
|
+
* @param atc
|
|
49
|
+
* @param recipients
|
|
50
|
+
*/
|
|
51
|
+
sendFromEvents(name: string, topic: string, exn: Serder, sigs: string[], atc: string, recipients: string[]): Promise<any>;
|
|
52
|
+
/**
|
|
53
|
+
* Get exn message by said
|
|
54
|
+
* @async
|
|
55
|
+
* @returns A promise to the exn message
|
|
56
|
+
* @param said The said of the exn message
|
|
57
|
+
*/
|
|
58
|
+
get(said: string): Promise<any>;
|
|
59
|
+
}
|
|
60
|
+
export declare function exchange(route: string, payload: Dict<any>, sender: string, recipient?: string, date?: string, dig?: string, modifiers?: Dict<any>, embeds?: Dict<any>): [Serder, Uint8Array];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { SignifyClient } from './clienting';
|
|
2
|
+
import { Dict } from '../core/core';
|
|
3
|
+
/**
|
|
4
|
+
* Groups
|
|
5
|
+
*/
|
|
6
|
+
export declare class Groups {
|
|
7
|
+
client: SignifyClient;
|
|
8
|
+
/**
|
|
9
|
+
* Groups
|
|
10
|
+
* @param {SignifyClient} client
|
|
11
|
+
*/
|
|
12
|
+
constructor(client: SignifyClient);
|
|
13
|
+
/**
|
|
14
|
+
* Get group request messages
|
|
15
|
+
* @async
|
|
16
|
+
* @param {string} [said] SAID of exn message to load
|
|
17
|
+
* @returns {Promise<any>} A promise to the list of replay messages
|
|
18
|
+
*/
|
|
19
|
+
getRequest(said: string): Promise<any>;
|
|
20
|
+
/**
|
|
21
|
+
* Send multisig exn request messages to other group members
|
|
22
|
+
* @async
|
|
23
|
+
* @param {string} [name] human readable name of group AID
|
|
24
|
+
* @param {Dict<any>} [exn] exn message to send to other members
|
|
25
|
+
* @param {string[]} [sigs] signature of the participant over the exn
|
|
26
|
+
* @param {string} [atc] additional attachments from embedded events in exn
|
|
27
|
+
* @returns {Promise<any>} A promise to the list of replay messages
|
|
28
|
+
*/
|
|
29
|
+
sendRequest(name: string, exn: Dict<any>, sigs: string[], atc: string): Promise<any>;
|
|
30
|
+
/**
|
|
31
|
+
* Join multisig group using rotation event.
|
|
32
|
+
* This can be used by participants being asked to contribute keys to a rotation event to join an existing group.
|
|
33
|
+
* @async
|
|
34
|
+
* @param {string} [name] human readable name of group AID
|
|
35
|
+
* @param {any} [rot] rotation event
|
|
36
|
+
* @param {any} [sigs] signatures
|
|
37
|
+
* @param {string} [gid] prefix
|
|
38
|
+
* @param {string[]} [smids] array of particpants
|
|
39
|
+
* @param {string[]} [rmids] array of particpants
|
|
40
|
+
* @returns {Promise<any>} A promise to the list of replay messages
|
|
41
|
+
*/
|
|
42
|
+
join(name: string, rot: any, sigs: any, //string[],
|
|
43
|
+
gid: string, smids: string[], rmids: string[]): Promise<any>;
|
|
44
|
+
}
|
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
import { Manager } from
|
|
2
|
-
import { Serder } from
|
|
3
|
-
export declare class TraitCodex {
|
|
4
|
-
EstOnly: string;
|
|
5
|
-
DoNotDelegate: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export
|
|
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
|
-
private readonly
|
|
40
|
-
private readonly
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
get
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
1
|
+
import { Manager } from '../core/manager';
|
|
2
|
+
import { Serder } from '../core/serder';
|
|
3
|
+
export declare class TraitCodex {
|
|
4
|
+
EstOnly: string;
|
|
5
|
+
DoNotDelegate: string;
|
|
6
|
+
NoBackers: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const TraitDex: TraitCodex;
|
|
9
|
+
export interface HaberyArgs {
|
|
10
|
+
name: string;
|
|
11
|
+
passcode?: string;
|
|
12
|
+
seed?: string | undefined;
|
|
13
|
+
aeid?: string | undefined;
|
|
14
|
+
pidx?: number | undefined;
|
|
15
|
+
salt?: string | undefined;
|
|
16
|
+
tier?: string | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface MakeHabArgs {
|
|
19
|
+
code?: string;
|
|
20
|
+
transferable?: boolean;
|
|
21
|
+
isith?: string;
|
|
22
|
+
icount?: number;
|
|
23
|
+
nsith?: string;
|
|
24
|
+
ncount?: number;
|
|
25
|
+
toad?: string | number;
|
|
26
|
+
wits?: Array<string>;
|
|
27
|
+
delpre?: string;
|
|
28
|
+
estOnly?: boolean;
|
|
29
|
+
DnD?: boolean;
|
|
30
|
+
data?: any;
|
|
31
|
+
}
|
|
32
|
+
export declare class Hab {
|
|
33
|
+
name: string;
|
|
34
|
+
serder: Serder;
|
|
35
|
+
constructor(name: string, icp: Serder);
|
|
36
|
+
get pre(): string;
|
|
37
|
+
}
|
|
38
|
+
export declare class Habery {
|
|
39
|
+
private readonly _name;
|
|
40
|
+
private readonly _mgr;
|
|
41
|
+
private readonly _habs;
|
|
42
|
+
constructor({ name, passcode, seed, aeid, pidx, salt }: HaberyArgs);
|
|
43
|
+
get mgr(): Manager;
|
|
44
|
+
get habs(): Array<Hab>;
|
|
45
|
+
habByName(name: string): Hab | undefined;
|
|
46
|
+
makeHab(name: string, { code, transferable, isith, icount, nsith, ncount, toad, wits, delpre, estOnly, DnD, data, }: MakeHabArgs): Hab;
|
|
47
|
+
get name(): string;
|
|
48
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SignifyClient } from './clienting';
|
|
2
|
+
/**
|
|
3
|
+
* Notifications
|
|
4
|
+
*/
|
|
5
|
+
export declare class Notifications {
|
|
6
|
+
client: SignifyClient;
|
|
7
|
+
/**
|
|
8
|
+
* Notifications
|
|
9
|
+
* @param {SignifyClient} client
|
|
10
|
+
*/
|
|
11
|
+
constructor(client: SignifyClient);
|
|
12
|
+
/**
|
|
13
|
+
* List notifications
|
|
14
|
+
* @async
|
|
15
|
+
* @param {number} [start=0] Start index of list of notifications, defaults to 0
|
|
16
|
+
* @param {number} [end=24] End index of list of notifications, defaults to 24
|
|
17
|
+
* @returns {Promise<any>} A promise to the list of notifications
|
|
18
|
+
*/
|
|
19
|
+
list(start?: number, end?: number): Promise<any>;
|
|
20
|
+
/**
|
|
21
|
+
* Mark a notification as read
|
|
22
|
+
* @async
|
|
23
|
+
* @param {string} said SAID of the notification
|
|
24
|
+
* @returns {Promise<string>} A promise to the result of the marking
|
|
25
|
+
*/
|
|
26
|
+
mark(said: string): Promise<string>;
|
|
27
|
+
/**
|
|
28
|
+
* Delete a notification
|
|
29
|
+
* @async
|
|
30
|
+
* @param {string} said SAID of the notification
|
|
31
|
+
* @returns {Promise<any>} A promise to the result of the deletion
|
|
32
|
+
*/
|
|
33
|
+
delete(said: string): Promise<void>;
|
|
34
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Signer } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
private
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { Signer } from './signer';
|
|
2
|
+
import { Verfer } from './verfer';
|
|
3
|
+
export declare class Authenticater {
|
|
4
|
+
static DefaultFields: string[];
|
|
5
|
+
private _verfer;
|
|
6
|
+
private readonly _csig;
|
|
7
|
+
constructor(csig: Signer, verfer: Verfer);
|
|
8
|
+
verify(headers: Headers, method: string, path: string): boolean;
|
|
9
|
+
sign(headers: Headers, method: string, path: string, fields?: Array<string>): Headers;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Matter, MatterArgs } from './matter';
|
|
2
|
+
export declare const Reb64: RegExp;
|
|
3
|
+
export declare class Bexter extends Matter {
|
|
4
|
+
constructor({ raw, code, qb64b, qb64, qb2 }: MatterArgs, bext?: string);
|
|
5
|
+
static _rawify(bext: string): Uint8Array;
|
|
6
|
+
get bext(): string;
|
|
7
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Verfer } from
|
|
2
|
-
import { Matter, MatterArgs } from
|
|
3
|
-
export declare class Cigar extends Matter {
|
|
4
|
-
private _verfer;
|
|
5
|
-
constructor({ raw, code, qb64, qb64b, qb2 }: MatterArgs, verfer?: Verfer);
|
|
6
|
-
get verfer(): Verfer | undefined;
|
|
7
|
-
set verfer(verfer: Verfer | undefined);
|
|
8
|
-
}
|
|
1
|
+
import { Verfer } from './verfer';
|
|
2
|
+
import { Matter, MatterArgs } from './matter';
|
|
3
|
+
export declare class Cigar extends Matter {
|
|
4
|
+
private _verfer;
|
|
5
|
+
constructor({ raw, code, qb64, qb64b, qb2 }: MatterArgs, verfer?: Verfer);
|
|
6
|
+
get verfer(): Verfer | undefined;
|
|
7
|
+
set verfer(verfer: Verfer | undefined);
|
|
8
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Matter, MatterArgs } from
|
|
2
|
-
export declare class Cipher extends Matter {
|
|
3
|
-
constructor({ raw, code, qb64, qb64b, qb2 }: MatterArgs);
|
|
4
|
-
decrypt(prikey?: Uint8Array | undefined, seed?: Uint8Array | undefined): any;
|
|
5
|
-
}
|
|
1
|
+
import { Matter, MatterArgs } from './matter';
|
|
2
|
+
export declare class Cipher extends Matter {
|
|
3
|
+
constructor({ raw, code, qb64, qb64b, qb2 }: MatterArgs);
|
|
4
|
+
decrypt(prikey?: Uint8Array | undefined, seed?: Uint8Array | undefined): any;
|
|
5
|
+
}
|