signify-ts 0.2.0 → 0.3.0-dev.e31e78d

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.
Files changed (129) hide show
  1. package/README.md +104 -34
  2. package/dist/exports.d.ts +40 -40
  3. package/dist/exports.js +40 -0
  4. package/dist/index.d.ts +2 -3
  5. package/dist/index.js +3 -8
  6. package/dist/keri/app/aiding.d.ts +54 -18
  7. package/{src/keri/app/aiding.ts → dist/keri/app/aiding.js} +130 -236
  8. package/dist/keri/app/clienting.d.ts +59 -22
  9. package/{src/keri/app/clienting.ts → dist/keri/app/clienting.js} +146 -235
  10. package/dist/keri/app/contacting.d.ts +30 -23
  11. package/{src/keri/app/contacting.ts → dist/keri/app/contacting.js} +26 -63
  12. package/dist/keri/app/controller.d.ts +49 -6
  13. package/{src/keri/app/controller.ts → dist/keri/app/controller.js} +80 -186
  14. package/dist/keri/app/coring.d.ts +134 -25
  15. package/{src/keri/app/coring.ts → dist/keri/app/coring.js} +83 -56
  16. package/dist/keri/app/credentialing.d.ts +191 -67
  17. package/dist/keri/app/credentialing.js +540 -0
  18. package/dist/keri/app/delegating.d.ts +18 -0
  19. package/dist/keri/app/delegating.js +24 -0
  20. package/dist/keri/app/escrowing.d.ts +5 -3
  21. package/{src/keri/app/escrowing.ts → dist/keri/app/escrowing.js} +3 -9
  22. package/dist/keri/app/exchanging.d.ts +243 -11
  23. package/dist/keri/app/exchanging.js +242 -0
  24. package/dist/keri/app/grouping.d.ts +11 -9
  25. package/{src/keri/app/grouping.ts → dist/keri/app/grouping.js} +10 -29
  26. package/dist/keri/app/habery.d.ts +2 -2
  27. package/dist/keri/app/habery.js +117 -0
  28. package/dist/keri/app/notifying.d.ts +2 -2
  29. package/{src/keri/app/notifying.ts → dist/keri/app/notifying.js} +7 -17
  30. package/dist/keri/core/authing.d.ts +2 -2
  31. package/{src/keri/core/authing.ts → dist/keri/core/authing.js} +26 -42
  32. package/dist/keri/core/base64.d.ts +2 -0
  33. package/dist/keri/core/base64.js +16 -0
  34. package/dist/keri/core/bexter.d.ts +1 -1
  35. package/{src/keri/core/bexter.ts → dist/keri/core/bexter.js} +18 -32
  36. package/dist/keri/core/cigar.d.ts +2 -2
  37. package/dist/keri/core/cigar.js +13 -0
  38. package/dist/keri/core/cipher.d.ts +1 -1
  39. package/{src/keri/core/cipher.ts → dist/keri/core/cipher.js} +10 -19
  40. package/dist/keri/core/core.d.ts +117 -9
  41. package/dist/keri/core/core.js +385 -0
  42. package/dist/keri/core/counter.d.ts +2 -2
  43. package/dist/keri/core/counter.js +221 -0
  44. package/dist/keri/core/decrypter.d.ts +4 -4
  45. package/{src/keri/core/decrypter.ts → dist/keri/core/decrypter.js} +23 -40
  46. package/dist/keri/core/diger.d.ts +3 -3
  47. package/{src/keri/core/diger.ts → dist/keri/core/diger.js} +18 -33
  48. package/dist/keri/core/encrypter.d.ts +2 -2
  49. package/{src/keri/core/encrypter.ts → dist/keri/core/encrypter.js} +18 -38
  50. package/dist/keri/core/eventing.d.ts +6 -6
  51. package/dist/keri/core/eventing.js +383 -0
  52. package/dist/keri/core/httping.d.ts +11 -4
  53. package/{src/keri/core/httping.ts → dist/keri/core/httping.js} +36 -101
  54. package/dist/keri/core/indexer.d.ts +1 -1
  55. package/dist/keri/core/indexer.js +407 -0
  56. package/dist/keri/core/keeping.d.ts +113 -46
  57. package/dist/keri/core/keeping.js +347 -0
  58. package/{src/keri/core/kering.ts → dist/keri/core/kering.js} +1 -3
  59. package/dist/keri/core/keyState.d.ts +98 -0
  60. package/dist/keri/core/manager.d.ts +147 -12
  61. package/dist/keri/core/manager.js +880 -0
  62. package/dist/keri/core/matter.d.ts +1 -1
  63. package/dist/keri/core/matter.js +460 -0
  64. package/dist/keri/core/number.d.ts +2 -2
  65. package/{src/keri/core/number.ts → dist/keri/core/number.js} +26 -32
  66. package/dist/keri/core/pather.d.ts +2 -2
  67. package/{src/keri/core/pather.ts → dist/keri/core/pather.js} +12 -27
  68. package/dist/keri/core/prefixer.d.ts +10 -10
  69. package/dist/keri/core/prefixer.js +182 -0
  70. package/dist/keri/core/saider.d.ts +2 -12
  71. package/dist/keri/core/saider.js +107 -0
  72. package/dist/keri/core/salter.d.ts +44 -9
  73. package/dist/keri/core/salter.js +110 -0
  74. package/dist/keri/core/seqner.d.ts +1 -1
  75. package/{src/keri/core/seqner.ts → dist/keri/core/seqner.js} +20 -21
  76. package/dist/keri/core/serder.d.ts +25 -12
  77. package/dist/keri/core/serder.js +133 -0
  78. package/dist/keri/core/siger.d.ts +2 -2
  79. package/{src/keri/core/siger.ts → dist/keri/core/siger.js} +4 -14
  80. package/dist/keri/core/signer.d.ts +4 -4
  81. package/dist/keri/core/signer.js +84 -0
  82. package/{src/keri/core/tholder.ts → dist/keri/core/tholder.js} +69 -94
  83. package/dist/keri/core/utils.d.ts +1 -1
  84. package/{src/keri/core/utils.ts → dist/keri/core/utils.js} +30 -60
  85. package/dist/keri/core/vdring.d.ts +2 -2
  86. package/dist/keri/core/vdring.js +61 -0
  87. package/dist/keri/core/verfer.d.ts +2 -6
  88. package/dist/keri/core/verfer.js +37 -0
  89. package/dist/keri/end/ending.d.ts +10 -8
  90. package/dist/keri/end/ending.js +136 -0
  91. package/{src/ready.ts → dist/ready.js} +1 -2
  92. package/dist/types/keria-api-schema.d.ts +1158 -0
  93. package/dist/types/keria-api-schema.js +34 -0
  94. package/package.json +53 -52
  95. package/dist/math.d.ts +0 -1
  96. package/dist/signify-ts.cjs +0 -7835
  97. package/dist/signify-ts.cjs.development.js +0 -9501
  98. package/dist/signify-ts.cjs.development.js.map +0 -1
  99. package/dist/signify-ts.cjs.map +0 -7
  100. package/dist/signify-ts.cjs.production.min.js +0 -2
  101. package/dist/signify-ts.cjs.production.min.js.map +0 -1
  102. package/dist/signify-ts.esm.js +0 -9345
  103. package/dist/signify-ts.esm.js.map +0 -1
  104. package/dist/signify-ts.mjs +0 -7811
  105. package/dist/signify-ts.mjs.map +0 -7
  106. package/src/buffer-polyfill.ts +0 -5
  107. package/src/exports.ts +0 -44
  108. package/src/index.ts +0 -4
  109. package/src/keri/app/credentialing.ts +0 -820
  110. package/src/keri/app/exchanging.ts +0 -220
  111. package/src/keri/app/habery.ts +0 -185
  112. package/src/keri/core/cigar.ts +0 -18
  113. package/src/keri/core/core.ts +0 -326
  114. package/src/keri/core/counter.ts +0 -273
  115. package/src/keri/core/eventing.ts +0 -581
  116. package/src/keri/core/indexer.ts +0 -509
  117. package/src/keri/core/keeping.ts +0 -684
  118. package/src/keri/core/manager.ts +0 -1183
  119. package/src/keri/core/matter.ts +0 -521
  120. package/src/keri/core/prefixer.ts +0 -233
  121. package/src/keri/core/saider.ts +0 -186
  122. package/src/keri/core/salter.ts +0 -120
  123. package/src/keri/core/serder.ts +0 -163
  124. package/src/keri/core/signer.ts +0 -133
  125. package/src/keri/core/vdring.ts +0 -94
  126. package/src/keri/core/verfer.ts +0 -47
  127. package/src/keri/end/ending.ts +0 -170
  128. package/src/math.ts +0 -3
  129. /package/dist/{buffer-polyfill.d.ts → keri/core/keyState.js} +0 -0
@@ -1,15 +1,18 @@
1
- import { Agent, Controller } from './controller';
2
- import { Tier } from '../core/salter';
3
- import { Authenticater } from '../core/authing';
4
- import { ExternalModule, KeyManager } from '../core/keeping';
5
- import { Identifier } from './aiding';
6
- import { Contacts, Challenges } from './contacting';
7
- import { Oobis, Operations, KeyEvents, KeyStates } from './coring';
8
- import { Credentials, Ipex, Registries, Schemas } from './credentialing';
9
- import { Notifications } from './notifying';
10
- import { Escrows } from './escrowing';
11
- import { Groups } from './grouping';
12
- import { Exchanges } from './exchanging';
1
+ import { components } from '../../types/keria-api-schema.ts';
2
+ import { Authenticater } from '../core/authing.ts';
3
+ import { ExternalModule, IdentifierManagerFactory } from '../core/keeping.ts';
4
+ import { Tier } from '../core/salter.ts';
5
+ import { Identifier } from './aiding.ts';
6
+ import { Contacts, Challenges } from './contacting.ts';
7
+ import { Agent, Controller } from './controller.ts';
8
+ import { Oobis, Operations, KeyEvents, KeyStates, Config } from './coring.ts';
9
+ import { Credentials, Ipex, Registries, Schemas } from './credentialing.ts';
10
+ import { Delegations } from './delegating.ts';
11
+ import { Escrows } from './escrowing.ts';
12
+ import { Exchanges } from './exchanging.ts';
13
+ import { Groups } from './grouping.ts';
14
+ import { Notifications } from './notifying.ts';
15
+ export type AgentResourceResult = components['schemas']['AgentResourceResult'];
13
16
  declare class State {
14
17
  agent: any | null;
15
18
  controller: any | null;
@@ -17,7 +20,10 @@ declare class State {
17
20
  pidx: number;
18
21
  constructor();
19
22
  }
20
- /** SignifyClient */
23
+ /**
24
+ * An in-memory key manager that can connect to a KERIA Agent and use it to
25
+ * receive messages and act as a proxy for multi-signature operations and delegation operations.
26
+ */
21
27
  export declare class SignifyClient {
22
28
  controller: Controller;
23
29
  url: string;
@@ -25,10 +31,27 @@ export declare class SignifyClient {
25
31
  pidx: number;
26
32
  agent: Agent | null;
27
33
  authn: Authenticater | null;
28
- manager: KeyManager | null;
34
+ manager: IdentifierManagerFactory | null;
29
35
  tier: Tier;
30
36
  bootUrl: string;
31
37
  exteralModules: ExternalModule[];
38
+ private _identifiers;
39
+ private _operations;
40
+ private _keyEvents;
41
+ private _keyStates;
42
+ private _oobis;
43
+ private _config;
44
+ private _delegations;
45
+ private _exchanges;
46
+ private _groups;
47
+ private _escrows;
48
+ private _credentials;
49
+ private _registries;
50
+ private _ipex;
51
+ private _notifications;
52
+ private _contacts;
53
+ private _challenges;
54
+ private _schemas;
32
55
  /**
33
56
  * SignifyClient constructor
34
57
  * @param {string} url KERIA admin interface URL
@@ -66,16 +89,20 @@ export declare class SignifyClient {
66
89
  */
67
90
  fetch(path: string, method: string, data: any, extraHeaders?: Headers): Promise<Response>;
68
91
  /**
69
- * Fetch a resource from from an external URL with headers signed by an AID
92
+ * Create a Signed Request to fetch a resource from an external URL with headers signed by an AID
70
93
  * @async
71
- * @param {string} url URL of the resource
72
- * @param {string} path Path to the resource
73
- * @param {string} method HTTP method
74
- * @param {any} data Data to be sent in the body of the resource
75
94
  * @param {string} aidName Name or alias of the AID to be used for signing
76
- * @returns {Promise<Response>} A promise to the result of the fetch
77
- */
78
- signedFetch(url: string, path: string, method: string, data: any, aidName: string): Promise<Response>;
95
+ * @param {string} url URL of the requested resource
96
+ * @param {RequestInit} req Request options should include:
97
+ * - method: HTTP method
98
+ * - data Data to be sent in the body of the resource.
99
+ * If the data is a CESR JSON string then you should also set contentType to 'application/json+cesr'
100
+ * If the data is a FormData object then you should not set the contentType and the browser will set it to 'multipart/form-data'
101
+ * If the data is an object then you should use JSON.stringify to convert it to a string and set the contentType to 'application/json'
102
+ * - contentType Content type of the request.
103
+ * @returns {Promise<Request>} A promise to the created Request
104
+ */
105
+ createSignedRequest(aidName: string, url: string, req: RequestInit): Promise<Request>;
79
106
  /**
80
107
  * Approve the delegation of the client AID to the KERIA agent
81
108
  * @async
@@ -178,5 +205,15 @@ export declare class SignifyClient {
178
205
  * @returns {Exchanges}
179
206
  */
180
207
  exchanges(): Exchanges;
208
+ /**
209
+ * Get delegations resource
210
+ * @returns {Delegations}
211
+ */
212
+ delegations(): Delegations;
213
+ /**
214
+ * Get agent config resource
215
+ * @returns {Config}
216
+ */
217
+ config(): Config;
181
218
  }
182
219
  export {};