signify-ts 0.3.0-rc1 → 0.3.0-rc2
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 +62 -14
- package/dist/exports.d.ts +40 -40
- package/dist/exports.js +40 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -0
- package/dist/keri/app/aiding.d.ts +6 -6
- package/{src/keri/app/aiding.ts → dist/keri/app/aiding.js} +74 -234
- package/dist/keri/app/clienting.d.ts +35 -15
- package/{src/keri/app/clienting.ts → dist/keri/app/clienting.js} +121 -207
- package/dist/keri/app/contacting.d.ts +2 -2
- package/{src/keri/app/contacting.ts → dist/keri/app/contacting.js} +12 -64
- package/dist/keri/app/controller.d.ts +49 -6
- package/{src/keri/app/controller.ts → dist/keri/app/controller.js} +79 -185
- package/dist/keri/app/coring.d.ts +5 -7
- package/{src/keri/app/coring.ts → dist/keri/app/coring.js} +29 -96
- package/dist/keri/app/credentialing.d.ts +27 -43
- package/dist/keri/app/credentialing.js +540 -0
- package/dist/keri/app/delegating.d.ts +2 -2
- package/{src/keri/app/delegating.ts → dist/keri/app/delegating.js} +5 -14
- package/dist/keri/app/escrowing.d.ts +1 -1
- package/{src/keri/app/escrowing.ts → dist/keri/app/escrowing.js} +2 -8
- package/dist/keri/app/exchanging.d.ts +4 -4
- package/{src/keri/app/exchanging.ts → dist/keri/app/exchanging.js} +29 -109
- package/dist/keri/app/grouping.d.ts +2 -2
- package/{src/keri/app/grouping.ts → dist/keri/app/grouping.js} +6 -25
- package/dist/keri/app/habery.d.ts +2 -2
- package/dist/keri/app/habery.js +117 -0
- package/dist/keri/app/notifying.d.ts +1 -1
- package/{src/keri/app/notifying.ts → dist/keri/app/notifying.js} +5 -15
- package/dist/keri/core/authing.d.ts +2 -2
- package/{src/keri/core/authing.ts → dist/keri/core/authing.js} +23 -46
- package/dist/keri/core/base64.d.ts +2 -4
- package/dist/keri/core/base64.js +16 -0
- package/dist/keri/core/bexter.d.ts +1 -1
- package/{src/keri/core/bexter.ts → dist/keri/core/bexter.js} +17 -32
- package/dist/keri/core/cigar.d.ts +2 -2
- package/dist/keri/core/cigar.js +13 -0
- package/dist/keri/core/cipher.d.ts +1 -1
- package/{src/keri/core/cipher.ts → dist/keri/core/cipher.js} +10 -19
- package/dist/keri/core/core.d.ts +115 -9
- package/dist/keri/core/core.js +385 -0
- package/dist/keri/core/counter.d.ts +2 -2
- package/dist/keri/core/counter.js +221 -0
- package/dist/keri/core/decrypter.d.ts +4 -4
- package/{src/keri/core/decrypter.ts → dist/keri/core/decrypter.js} +23 -40
- package/dist/keri/core/diger.d.ts +3 -3
- package/{src/keri/core/diger.ts → dist/keri/core/diger.js} +18 -33
- package/dist/keri/core/encrypter.d.ts +2 -2
- package/{src/keri/core/encrypter.ts → dist/keri/core/encrypter.js} +18 -38
- package/dist/keri/core/eventing.d.ts +4 -4
- package/{src/keri/core/eventing.ts → dist/keri/core/eventing.js} +130 -317
- package/dist/keri/core/httping.d.ts +9 -4
- package/{src/keri/core/httping.ts → dist/keri/core/httping.js} +34 -102
- package/dist/keri/core/indexer.d.ts +1 -1
- package/dist/keri/core/indexer.js +407 -0
- package/dist/keri/core/keeping.d.ts +61 -28
- package/dist/keri/core/keeping.js +365 -0
- package/{src/keri/core/kering.ts → dist/keri/core/kering.js} +1 -3
- package/dist/keri/core/keyState.d.ts +85 -0
- package/dist/keri/core/keyState.js +1 -0
- package/dist/keri/core/manager.d.ts +147 -12
- package/dist/keri/core/manager.js +880 -0
- package/dist/keri/core/matter.d.ts +1 -1
- package/dist/keri/core/matter.js +460 -0
- package/dist/keri/core/number.d.ts +1 -1
- package/{src/keri/core/number.ts → dist/keri/core/number.js} +20 -29
- package/dist/keri/core/pather.d.ts +2 -2
- package/{src/keri/core/pather.ts → dist/keri/core/pather.js} +12 -27
- package/dist/keri/core/prefixer.d.ts +10 -10
- package/{src/keri/core/prefixer.ts → dist/keri/core/prefixer.js} +71 -122
- package/dist/keri/core/saider.d.ts +2 -13
- package/dist/keri/core/saider.js +107 -0
- package/dist/keri/core/salter.d.ts +45 -3
- package/dist/keri/core/salter.js +117 -0
- package/dist/keri/core/seqner.d.ts +1 -1
- package/{src/keri/core/seqner.ts → dist/keri/core/seqner.js} +20 -21
- package/dist/keri/core/serder.d.ts +25 -12
- package/dist/keri/core/serder.js +133 -0
- package/dist/keri/core/siger.d.ts +2 -2
- package/{src/keri/core/siger.ts → dist/keri/core/siger.js} +4 -14
- package/dist/keri/core/signer.d.ts +4 -4
- package/dist/keri/core/signer.js +84 -0
- package/{src/keri/core/tholder.ts → dist/keri/core/tholder.js} +65 -89
- package/dist/keri/core/utils.d.ts +1 -1
- package/{src/keri/core/utils.ts → dist/keri/core/utils.js} +30 -60
- package/dist/keri/core/vdring.d.ts +2 -2
- package/dist/keri/core/vdring.js +61 -0
- package/dist/keri/core/verfer.d.ts +2 -6
- package/dist/keri/core/verfer.js +37 -0
- package/dist/keri/end/ending.d.ts +2 -2
- package/dist/keri/end/ending.js +136 -0
- package/{src/ready.ts → dist/ready.js} +1 -2
- package/dist/types/keria-api-schema.d.ts +304 -0
- package/dist/types/keria-api-schema.js +2 -0
- package/package.json +28 -48
- package/dist/keri/core/state.d.ts +0 -62
- package/dist/signify-ts.cjs +0 -7980
- package/dist/signify-ts.cjs.map +0 -7
- package/dist/signify-ts.mjs +0 -7956
- package/dist/signify-ts.mjs.map +0 -7
- package/src/exports.ts +0 -44
- package/src/index.ts +0 -3
- package/src/keri/app/credentialing.ts +0 -1005
- package/src/keri/app/habery.ts +0 -185
- package/src/keri/core/base64.ts +0 -28
- package/src/keri/core/cigar.ts +0 -18
- package/src/keri/core/core.ts +0 -328
- package/src/keri/core/counter.ts +0 -273
- package/src/keri/core/indexer.ts +0 -509
- package/src/keri/core/keeping.ts +0 -722
- package/src/keri/core/manager.ts +0 -1183
- package/src/keri/core/matter.ts +0 -521
- package/src/keri/core/saider.ts +0 -186
- package/src/keri/core/salter.ts +0 -120
- package/src/keri/core/serder.ts +0 -163
- package/src/keri/core/signer.ts +0 -133
- package/src/keri/core/state.ts +0 -69
- package/src/keri/core/vdring.ts +0 -94
- package/src/keri/core/verfer.ts +0 -47
- package/src/keri/end/ending.ts +0 -167
package/README.md
CHANGED
|
@@ -30,22 +30,36 @@ encoded strings for the initial implementation. Support for binary CESR can be a
|
|
|
30
30
|
|
|
31
31
|
The code is built using Typescript and running code locally requires a Mac or Linux OS.
|
|
32
32
|
|
|
33
|
-
-
|
|
33
|
+
- Install [Node.js](https://nodejs.org)
|
|
34
34
|
|
|
35
|
-
-
|
|
35
|
+
- Install dependencies:
|
|
36
36
|
```bash
|
|
37
37
|
npm install
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
Typescript source files needs to be transpiled before running scripts or integration tests
|
|
41
41
|
|
|
42
|
-
-
|
|
42
|
+
- Generate types:
|
|
43
|
+
|
|
44
|
+
To generate TypeScript types from KERIA OpenAPI docs dynamically
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
npm run generate:types
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
We can specify KERIA spec url by this command:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
SPEC_URL=http://localhost:3902/spec.yaml npm run generate:types
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
- Build:
|
|
43
57
|
|
|
44
58
|
```bash
|
|
45
59
|
npm run build
|
|
46
60
|
```
|
|
47
61
|
|
|
48
|
-
-
|
|
62
|
+
- ready() must be called before library is useable. Example minimum viable client code.
|
|
49
63
|
|
|
50
64
|
```javascript
|
|
51
65
|
import { randomPasscode, ready, SignifyClient, Tier } from 'signify-ts';
|
|
@@ -81,7 +95,7 @@ The integration tests depends on a local instance of KERIA, vLEI-Server and Witn
|
|
|
81
95
|
docker compose up --wait
|
|
82
96
|
```
|
|
83
97
|
|
|
84
|
-
If successful, it should print
|
|
98
|
+
If successful, it should print something like this:
|
|
85
99
|
|
|
86
100
|
```bash
|
|
87
101
|
$ docker compose up --wait
|
|
@@ -108,28 +122,22 @@ docker compose pull
|
|
|
108
122
|
docker compose up --wait
|
|
109
123
|
```
|
|
110
124
|
|
|
111
|
-
**Important!** The integration tests runs on the build output in `dist/` directory. Make sure to run build before running the integration tests.
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
npm run build
|
|
115
|
-
```
|
|
116
|
-
|
|
117
125
|
Use the npm script "test:integration" to run all integration tests in sequence:
|
|
118
126
|
|
|
119
127
|
```bash
|
|
120
128
|
npm run test:integration
|
|
121
129
|
```
|
|
122
130
|
|
|
123
|
-
|
|
131
|
+
To execute a specific integration test, you can use:
|
|
124
132
|
|
|
125
133
|
```bash
|
|
126
|
-
|
|
134
|
+
npm run test:integration -- test-integration/credentials.test.ts
|
|
127
135
|
```
|
|
128
136
|
|
|
129
137
|
It is also possible to run the tests using local instances of vLEI, Keria, and witness network. Set the environment variable `TEST_ENVIRONMENT` to `local`, e.g:
|
|
130
138
|
|
|
131
139
|
```
|
|
132
|
-
TEST_ENVIRONMENT=local
|
|
140
|
+
TEST_ENVIRONMENT=local npm run test:integration test-integration/credentials.test.ts
|
|
133
141
|
```
|
|
134
142
|
|
|
135
143
|
This changes the discovery urls to use `localhost` instead of the hostnames inside the docker network.
|
|
@@ -141,3 +149,43 @@ Account Creation Workflow
|
|
|
141
149
|

|
|
142
150
|
|
|
143
151
|

|
|
152
|
+
|
|
153
|
+
# Publishing
|
|
154
|
+
|
|
155
|
+
This package is published on npm: https://www.npmjs.com/package/signify-ts.
|
|
156
|
+
|
|
157
|
+
If you need to publish a version under your own scope, you can use the [publish script](./publish.sh). This enables you to create development packages. For example:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
NPM_PACKAGE_SCOPE=@myorg DRY_RUN=1 ./publish.sh
|
|
161
|
+
npm notice Tarball Details
|
|
162
|
+
npm notice name: @myorg/signify-ts
|
|
163
|
+
npm notice version: 0.3.0-rc1-dev.8fa9919
|
|
164
|
+
npm notice filename: myorg-signify-ts-0.3.0-rc1-dev.8fa9919.tgz
|
|
165
|
+
npm notice package size: 81.0 kB
|
|
166
|
+
npm notice unpacked size: 370.0 kB
|
|
167
|
+
npm notice shasum: 8c160bc99d9ec552e6c478c20922cae3388a8ace
|
|
168
|
+
npm notice integrity: sha512-WRuD5PKFN3WBl[...]xVieCIS0UpVeg==
|
|
169
|
+
npm notice total files: 96
|
|
170
|
+
npm notice
|
|
171
|
+
npm notice Publishing to https://registry.npmjs.org/ with tag dev and default access (dry-run)
|
|
172
|
+
+ @myorg/signify-ts@0.3.0-rc1-dev.8fa9919
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Set the `NPM_PUBLISH_TAG` to `latest` to skip the commit hash suffix in the version:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
NPM_PUBLISH_TAG=latest NPM_PACKAGE_SCOPE=@myorg DRY_RUN=1 ./publish.sh
|
|
179
|
+
npm notice Tarball Details
|
|
180
|
+
npm notice name: @myorg/signify-ts
|
|
181
|
+
npm notice version: 0.3.0-rc1
|
|
182
|
+
npm notice filename: myorg-signify-ts-0.3.0-rc1.tgz
|
|
183
|
+
npm notice package size: 80.9 kB
|
|
184
|
+
npm notice unpacked size: 370.0 kB
|
|
185
|
+
npm notice shasum: 8c9e4edcf19802e8acaf5996a36061a9c335b1c4
|
|
186
|
+
npm notice integrity: sha512-V1y2W3zs4Ccsn[...]vKY3WWgalcuBQ==
|
|
187
|
+
npm notice total files: 96
|
|
188
|
+
npm notice
|
|
189
|
+
npm notice Publishing to https://registry.npmjs.org/ with tag latest and default access (dry-run)
|
|
190
|
+
+ @myorg/signify-ts@0.3.0-rc1
|
|
191
|
+
```
|
package/dist/exports.d.ts
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
export * from './ready';
|
|
2
|
-
export * from './keri/app/habery';
|
|
3
|
-
export * from './keri/app/controller';
|
|
4
|
-
export * from './keri/app/aiding';
|
|
5
|
-
export * from './keri/app/clienting';
|
|
6
|
-
export * from './keri/app/contacting';
|
|
7
|
-
export * from './keri/app/coring';
|
|
8
|
-
export * from './keri/app/credentialing';
|
|
9
|
-
export * from './keri/app/escrowing';
|
|
10
|
-
export * from './keri/app/exchanging';
|
|
11
|
-
export * from './keri/app/grouping';
|
|
12
|
-
export * from './keri/app/notifying';
|
|
13
|
-
export * from './keri/core/authing';
|
|
14
|
-
export * from './keri/core/cigar';
|
|
15
|
-
export * from './keri/core/cipher';
|
|
16
|
-
export * from './keri/core/core';
|
|
17
|
-
export * from './keri/core/counter';
|
|
18
|
-
export * from './keri/core/decrypter';
|
|
19
|
-
export * from './keri/core/diger';
|
|
20
|
-
export * from './keri/core/encrypter';
|
|
21
|
-
export * from './keri/core/eventing';
|
|
22
|
-
export * from './keri/core/httping';
|
|
23
|
-
export * from './keri/core/indexer';
|
|
24
|
-
export * from './keri/core/keeping';
|
|
25
|
-
export * from './keri/core/kering';
|
|
26
|
-
export * from './keri/core/manager';
|
|
27
|
-
export * from './keri/core/matter';
|
|
28
|
-
export * from './keri/core/number';
|
|
29
|
-
export * from './keri/core/prefixer';
|
|
30
|
-
export * from './keri/core/saider';
|
|
31
|
-
export * from './keri/core/salter';
|
|
32
|
-
export * from './keri/core/seqner';
|
|
33
|
-
export * from './keri/core/serder';
|
|
34
|
-
export * from './keri/core/siger';
|
|
35
|
-
export * from './keri/core/signer';
|
|
36
|
-
export * from './keri/core/tholder';
|
|
37
|
-
export * from './keri/core/utils';
|
|
38
|
-
export * from './keri/core/verfer';
|
|
39
|
-
export * from './keri/core/
|
|
40
|
-
export * from './keri/end/ending';
|
|
1
|
+
export * from './ready.ts';
|
|
2
|
+
export * from './keri/app/habery.ts';
|
|
3
|
+
export * from './keri/app/controller.ts';
|
|
4
|
+
export * from './keri/app/aiding.ts';
|
|
5
|
+
export * from './keri/app/clienting.ts';
|
|
6
|
+
export * from './keri/app/contacting.ts';
|
|
7
|
+
export * from './keri/app/coring.ts';
|
|
8
|
+
export * from './keri/app/credentialing.ts';
|
|
9
|
+
export * from './keri/app/escrowing.ts';
|
|
10
|
+
export * from './keri/app/exchanging.ts';
|
|
11
|
+
export * from './keri/app/grouping.ts';
|
|
12
|
+
export * from './keri/app/notifying.ts';
|
|
13
|
+
export * from './keri/core/authing.ts';
|
|
14
|
+
export * from './keri/core/cigar.ts';
|
|
15
|
+
export * from './keri/core/cipher.ts';
|
|
16
|
+
export * from './keri/core/core.ts';
|
|
17
|
+
export * from './keri/core/counter.ts';
|
|
18
|
+
export * from './keri/core/decrypter.ts';
|
|
19
|
+
export * from './keri/core/diger.ts';
|
|
20
|
+
export * from './keri/core/encrypter.ts';
|
|
21
|
+
export * from './keri/core/eventing.ts';
|
|
22
|
+
export * from './keri/core/httping.ts';
|
|
23
|
+
export * from './keri/core/indexer.ts';
|
|
24
|
+
export * from './keri/core/keeping.ts';
|
|
25
|
+
export * from './keri/core/kering.ts';
|
|
26
|
+
export * from './keri/core/manager.ts';
|
|
27
|
+
export * from './keri/core/matter.ts';
|
|
28
|
+
export * from './keri/core/number.ts';
|
|
29
|
+
export * from './keri/core/prefixer.ts';
|
|
30
|
+
export * from './keri/core/saider.ts';
|
|
31
|
+
export * from './keri/core/salter.ts';
|
|
32
|
+
export * from './keri/core/seqner.ts';
|
|
33
|
+
export * from './keri/core/serder.ts';
|
|
34
|
+
export * from './keri/core/siger.ts';
|
|
35
|
+
export * from './keri/core/signer.ts';
|
|
36
|
+
export * from './keri/core/tholder.ts';
|
|
37
|
+
export * from './keri/core/utils.ts';
|
|
38
|
+
export * from './keri/core/verfer.ts';
|
|
39
|
+
export * from './keri/core/keyState.ts';
|
|
40
|
+
export * from './keri/end/ending.ts';
|
package/dist/exports.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export * from "./ready.js";
|
|
2
|
+
export * from "./keri/app/habery.js";
|
|
3
|
+
export * from "./keri/app/controller.js";
|
|
4
|
+
export * from "./keri/app/aiding.js";
|
|
5
|
+
export * from "./keri/app/clienting.js";
|
|
6
|
+
export * from "./keri/app/contacting.js";
|
|
7
|
+
export * from "./keri/app/coring.js";
|
|
8
|
+
export * from "./keri/app/credentialing.js";
|
|
9
|
+
export * from "./keri/app/escrowing.js";
|
|
10
|
+
export * from "./keri/app/exchanging.js";
|
|
11
|
+
export * from "./keri/app/grouping.js";
|
|
12
|
+
export * from "./keri/app/notifying.js";
|
|
13
|
+
export * from "./keri/core/authing.js";
|
|
14
|
+
export * from "./keri/core/cigar.js";
|
|
15
|
+
export * from "./keri/core/cipher.js";
|
|
16
|
+
export * from "./keri/core/core.js";
|
|
17
|
+
export * from "./keri/core/counter.js";
|
|
18
|
+
export * from "./keri/core/decrypter.js";
|
|
19
|
+
export * from "./keri/core/diger.js";
|
|
20
|
+
export * from "./keri/core/encrypter.js";
|
|
21
|
+
export * from "./keri/core/eventing.js";
|
|
22
|
+
export * from "./keri/core/httping.js";
|
|
23
|
+
export * from "./keri/core/indexer.js";
|
|
24
|
+
export * from "./keri/core/keeping.js";
|
|
25
|
+
export * from "./keri/core/kering.js";
|
|
26
|
+
export * from "./keri/core/manager.js";
|
|
27
|
+
export * from "./keri/core/matter.js";
|
|
28
|
+
export * from "./keri/core/number.js";
|
|
29
|
+
export * from "./keri/core/prefixer.js";
|
|
30
|
+
export * from "./keri/core/saider.js";
|
|
31
|
+
export * from "./keri/core/salter.js";
|
|
32
|
+
export * from "./keri/core/seqner.js";
|
|
33
|
+
export * from "./keri/core/serder.js";
|
|
34
|
+
export * from "./keri/core/siger.js";
|
|
35
|
+
export * from "./keri/core/signer.js";
|
|
36
|
+
export * from "./keri/core/tholder.js";
|
|
37
|
+
export * from "./keri/core/utils.js";
|
|
38
|
+
export * from "./keri/core/verfer.js";
|
|
39
|
+
export * from "./keri/core/keyState.js";
|
|
40
|
+
export * from "./keri/end/ending.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import * as exp from './exports';
|
|
2
|
-
export * from './exports';
|
|
1
|
+
import * as exp from './exports.ts';
|
|
2
|
+
export * from './exports.ts';
|
|
3
3
|
export default exp;
|
package/dist/index.js
ADDED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Tier } from '../core/salter';
|
|
2
|
-
import { Algos } from '../core/manager';
|
|
3
|
-
import { Serder } from '../core/serder';
|
|
4
|
-
import {
|
|
5
|
-
import { HabState } from '../core/
|
|
1
|
+
import { Tier } from '../core/salter.ts';
|
|
2
|
+
import { Algos } from '../core/manager.ts';
|
|
3
|
+
import { Serder } from '../core/serder.ts';
|
|
4
|
+
import { IdentifierManagerFactory } from '../core/keeping.ts';
|
|
5
|
+
import { HabState } from '../core/keyState.ts';
|
|
6
6
|
/** Arguments required to create an identfier */
|
|
7
7
|
export interface CreateIdentiferArgs {
|
|
8
8
|
transferable?: boolean;
|
|
@@ -50,7 +50,7 @@ export interface RotateIdentifierArgs {
|
|
|
50
50
|
export interface IdentifierDeps {
|
|
51
51
|
fetch(pathname: string, method: string, body: unknown, headers?: Headers): Promise<Response>;
|
|
52
52
|
pidx: number;
|
|
53
|
-
manager:
|
|
53
|
+
manager: IdentifierManagerFactory | null;
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* Updatable information for a managed identifier
|