@interop/ed25519-signature 6.0.1 → 7.0.1
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/CHANGELOG.md +47 -0
- package/README.md +57 -24
- package/dist/core/createSigner.d.ts +8 -11
- package/dist/core/createSigner.d.ts.map +1 -1
- package/dist/core/createSigner.js +4 -3
- package/dist/core/createSigner.js.map +1 -1
- package/dist/core/createVerifier.d.ts +3 -8
- package/dist/core/createVerifier.d.ts.map +1 -1
- package/dist/core/createVerifier.js +4 -4
- package/dist/core/createVerifier.js.map +1 -1
- package/dist/core/sha256-browser.d.ts.map +1 -1
- package/dist/core/sha256-browser.js.map +1 -1
- package/dist/core/sha256.d.ts.map +1 -1
- package/dist/core/sha256.js.map +1 -1
- package/dist/ed25519-signature-2020/cryptosuite.d.ts +2 -2
- package/dist/ed25519-signature-2020/cryptosuite.d.ts.map +1 -1
- package/dist/ed25519-signature-2020/cryptosuite.js +3 -3
- package/dist/ed25519-signature-2020/cryptosuite.js.map +1 -1
- package/dist/ed25519-signature-2020/index.d.ts +5 -7
- package/dist/ed25519-signature-2020/index.d.ts.map +1 -1
- package/dist/ed25519-signature-2020/index.js +8 -4
- package/dist/ed25519-signature-2020/index.js.map +1 -1
- package/dist/eddsa-jcs-2022/createVerifyData.d.ts.map +1 -1
- package/dist/eddsa-jcs-2022/createVerifyData.js.map +1 -1
- package/dist/eddsa-jcs-2022/index.d.ts +3 -3
- package/dist/eddsa-jcs-2022/index.d.ts.map +1 -1
- package/dist/eddsa-jcs-2022/index.js.map +1 -1
- package/dist/eddsa-rdfc-2022/index.d.ts +2 -8
- package/dist/eddsa-rdfc-2022/index.d.ts.map +1 -1
- package/dist/eddsa-rdfc-2022/index.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +9 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,38 @@
|
|
|
1
1
|
# @interop/ed25519-signature Changelog
|
|
2
2
|
|
|
3
|
+
## 7.0.1 - 2026-06-02
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- (Types only) Bump `@interop/jsonld-signatures` to `^11.6.7` and
|
|
8
|
+
`@interop/data-integrity-proof` to `^3.2.1`, which align their exported
|
|
9
|
+
TypeScript definitions with the shared `@interop/data-integrity-core` types.
|
|
10
|
+
The test document loader now types its return value with `IDocumentLoader`
|
|
11
|
+
(from `@interop/data-integrity-core/loader`) in place of the removed
|
|
12
|
+
`DocumentLoader` export from `@interop/jsonld-signatures`. No runtime or
|
|
13
|
+
published API change.
|
|
14
|
+
|
|
15
|
+
## 7.0.0 - 2026-06-01
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **BREAKING:** Swap dependencies onto the renamed, now-typed Interop forks:
|
|
20
|
+
`@digitalbazaar/data-integrity` to `@interop/data-integrity-proof@^3.1.0`
|
|
21
|
+
(`DataIntegrityProof`, `Cryptosuite`), and `@digitalcredentials/ssi` to
|
|
22
|
+
`@interop/data-integrity-core@^6.1.0` (`ISigner`, `IVerifier`,
|
|
23
|
+
`IVerificationMethod`, `IProofDescription`). Require
|
|
24
|
+
`@interop/ed25519-verification-key@^7.0.0`.
|
|
25
|
+
- Because `@interop/data-integrity-proof` ships its own types, the
|
|
26
|
+
`@digitalbazaar/data-integrity` ambient declaration is removed from
|
|
27
|
+
`src/vendor.d.ts`; the local `ProofLike` / `CryptosuiteLike` types are
|
|
28
|
+
replaced by upstream `IProofDescription` / `Cryptosuite`. The name-less
|
|
29
|
+
`Ed25519Signature2020` cryptosuite types without a cast now that
|
|
30
|
+
`Cryptosuite.name` is optional upstream.
|
|
31
|
+
|
|
3
32
|
## 6.0.0-6.0.1 - 2026-05-27
|
|
33
|
+
|
|
4
34
|
### Changed
|
|
35
|
+
|
|
5
36
|
- **BREAKING: Renamed** from `@digitalbazaar/ed25519-signature-2020` to
|
|
6
37
|
`@interop/ed25519-signature` (rename-in-place; preserves git history and the
|
|
7
38
|
committed spec test vectors).
|
|
@@ -26,6 +57,7 @@
|
|
|
26
57
|
point and `@interop/jsonld` for RDFC-1.0 canonicalization.
|
|
27
58
|
|
|
28
59
|
### Added
|
|
60
|
+
|
|
29
61
|
- `eddsa-rdfc-2022` cryptosuite (DataIntegrityProof, RDFC-1.0).
|
|
30
62
|
- `eddsa-jcs-2022` sign/verify cryptosuite factories (DataIntegrityProof, JCS /
|
|
31
63
|
RFC 8785), including the spec context-prefix ordering check.
|
|
@@ -35,6 +67,7 @@
|
|
|
35
67
|
disambiguated by `matchProof`).
|
|
36
68
|
|
|
37
69
|
### Fixed
|
|
70
|
+
|
|
38
71
|
- `eddsa-jcs-2022` verify: the context-prefix check now compares `@context`
|
|
39
72
|
entries by value, not reference, so a VC carrying an inline `@context` object
|
|
40
73
|
verifies after a JSON round-trip (the realistic transport path). The previous
|
|
@@ -44,14 +77,17 @@
|
|
|
44
77
|
## 5.4.0 - 2024-08-01
|
|
45
78
|
|
|
46
79
|
### Changed
|
|
80
|
+
|
|
47
81
|
- Use `jsonld-signature@11.3` to get `RDFC-1.0` implementation.
|
|
48
82
|
|
|
49
83
|
## 5.3.0 - 2024-06-15
|
|
50
84
|
|
|
51
85
|
### Added
|
|
86
|
+
|
|
52
87
|
- Add support for `Multikey` verification methods.
|
|
53
88
|
|
|
54
89
|
### Changed
|
|
90
|
+
|
|
55
91
|
- Loosen restrictions on verification methods that do not have
|
|
56
92
|
contexts, allowing processing of well-known types in those cases.
|
|
57
93
|
- Allow `publiKeyJwk` to be used to express key material.
|
|
@@ -59,12 +95,14 @@
|
|
|
59
95
|
## 5.2.0 - 2023-02-13
|
|
60
96
|
|
|
61
97
|
### Removed
|
|
98
|
+
|
|
62
99
|
- Remove unused `expansionMap` from `matchProof()` as it was removed
|
|
63
100
|
from `jsonld-signatures@11` which is required since version `5.0`.
|
|
64
101
|
|
|
65
102
|
## 5.1.0 - 2023-02-07
|
|
66
103
|
|
|
67
104
|
### Added
|
|
105
|
+
|
|
68
106
|
- Allow custom `canonizeOptions` to be passed in the construction of
|
|
69
107
|
a suite as a stop-gap until hard requirements for canonize options
|
|
70
108
|
are either set or advised to be certain values by a W3C working group.
|
|
@@ -72,17 +110,20 @@
|
|
|
72
110
|
## 5.0.0 - 2022-08-23
|
|
73
111
|
|
|
74
112
|
### Changed
|
|
113
|
+
|
|
75
114
|
- **BREAKING**: Use `jsonld-signatures@11` to get better safe mode
|
|
76
115
|
protections when canonizing.
|
|
77
116
|
|
|
78
117
|
## 4.0.1 - 2022-06-06
|
|
79
118
|
|
|
80
119
|
### Changed
|
|
120
|
+
|
|
81
121
|
- Update to jsonld-signatures@10.
|
|
82
122
|
|
|
83
123
|
## 4.0.0 - 2022-06-06
|
|
84
124
|
|
|
85
125
|
### Changed
|
|
126
|
+
|
|
86
127
|
- **BREAKING**: Convert to module (ESM).
|
|
87
128
|
- **BREAKING**: Require Node.js >=14.
|
|
88
129
|
- Update dependencies.
|
|
@@ -98,16 +139,19 @@
|
|
|
98
139
|
## 2.2.0 - 2021-05-26
|
|
99
140
|
|
|
100
141
|
### Added
|
|
142
|
+
|
|
101
143
|
- It is now possible to verify `Ed25519Signature2020` proofs using using
|
|
102
144
|
2018 keys.
|
|
103
145
|
|
|
104
146
|
### Changed
|
|
147
|
+
|
|
105
148
|
- Replace `@transmute/jsonld-document-loader` with
|
|
106
149
|
`@digitalbazaar/security-document-loader` in test.
|
|
107
150
|
|
|
108
151
|
## 2.1.0 - 2021-04-09
|
|
109
152
|
|
|
110
153
|
### Added
|
|
154
|
+
|
|
111
155
|
- Export the suite's context (and related objects such as context url,
|
|
112
156
|
documentLoader, etc), and also set them as a property of the suite class.
|
|
113
157
|
- Set the `contextUrl` property on suite instance, to support context
|
|
@@ -117,11 +161,13 @@
|
|
|
117
161
|
## 2.0.1 - 2021-04-09
|
|
118
162
|
|
|
119
163
|
### Changed
|
|
164
|
+
|
|
120
165
|
- Use `ed25519-verification-key-2020@2.1.1`. Signer now has an "id" property.
|
|
121
166
|
|
|
122
167
|
## 2.0.0 - 2021-04-06
|
|
123
168
|
|
|
124
169
|
### Changed
|
|
170
|
+
|
|
125
171
|
- **BREAKING**: Update to use `jsonld-signatures` v9.0 (removes
|
|
126
172
|
`verificationMethod` suite constructor param, makes key and signer validation
|
|
127
173
|
stricter).
|
|
@@ -130,4 +176,5 @@
|
|
|
130
176
|
## 1.0.0 - 2021-03-19
|
|
131
177
|
|
|
132
178
|
### Added
|
|
179
|
+
|
|
133
180
|
- Initial files.
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ One package providing all three Ed25519 Verifiable Credential proof flavors,
|
|
|
11
11
|
unified on the `DataIntegrityProof` container model:
|
|
12
12
|
|
|
13
13
|
| Suite | `proof.type` | `proof.cryptosuite` | Canonicalization |
|
|
14
|
-
|
|
14
|
+
| ---------------------- | ---------------------- | ------------------- | ---------------- |
|
|
15
15
|
| `Ed25519Signature2020` | `Ed25519Signature2020` | (absent) | RDFC-1.0 |
|
|
16
16
|
| `eddsa-rdfc-2022` | `DataIntegrityProof` | `eddsa-rdfc-2022` | RDFC-1.0 |
|
|
17
17
|
| `eddsa-jcs-2022` | `DataIntegrityProof` | `eddsa-jcs-2022` | JCS (RFC 8785) |
|
|
@@ -83,7 +83,11 @@ A convenience root barrel re-exports everything (plus `createSigner` /
|
|
|
83
83
|
`createVerifier`) for when bundle size is not a concern:
|
|
84
84
|
|
|
85
85
|
```js
|
|
86
|
-
import {
|
|
86
|
+
import {
|
|
87
|
+
Ed25519Signature2020,
|
|
88
|
+
eddsaRdfc2022,
|
|
89
|
+
createSigner
|
|
90
|
+
} from '@interop/ed25519-signature'
|
|
87
91
|
```
|
|
88
92
|
|
|
89
93
|
## Usage
|
|
@@ -94,7 +98,9 @@ The examples share this setup:
|
|
|
94
98
|
import jsigs from '@interop/jsonld-signatures'
|
|
95
99
|
import { Ed25519VerificationKey } from '@interop/ed25519-verification-key'
|
|
96
100
|
|
|
97
|
-
const {
|
|
101
|
+
const {
|
|
102
|
+
purposes: { AssertionProofPurpose }
|
|
103
|
+
} = jsigs
|
|
98
104
|
|
|
99
105
|
const controller = 'https://example.edu/issuers/565049'
|
|
100
106
|
const keyPair = await Ed25519VerificationKey.from({
|
|
@@ -121,21 +127,30 @@ import { Ed25519Signature2020 } from '@interop/ed25519-signature/ed25519-signatu
|
|
|
121
127
|
const credential = {
|
|
122
128
|
'@context': [
|
|
123
129
|
'https://www.w3.org/2018/credentials/v1',
|
|
124
|
-
{
|
|
130
|
+
{
|
|
131
|
+
AlumniCredential: 'https://schema.org#AlumniCredential',
|
|
132
|
+
alumniOf: 'https://schema.org#alumniOf'
|
|
133
|
+
},
|
|
125
134
|
'https://w3id.org/security/suites/ed25519-2020/v1'
|
|
126
135
|
],
|
|
127
136
|
id: 'http://example.edu/credentials/1872',
|
|
128
137
|
type: ['VerifiableCredential', 'AlumniCredential'],
|
|
129
138
|
issuer: controller,
|
|
130
139
|
issuanceDate: '2010-01-01T19:23:24Z',
|
|
131
|
-
credentialSubject: {
|
|
140
|
+
credentialSubject: {
|
|
141
|
+
id: 'https://example.edu/students/alice',
|
|
142
|
+
alumniOf: 'Example University'
|
|
143
|
+
}
|
|
132
144
|
}
|
|
133
145
|
|
|
134
|
-
const signed = await jsigs.sign(
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
146
|
+
const signed = await jsigs.sign(
|
|
147
|
+
{ ...credential },
|
|
148
|
+
{
|
|
149
|
+
suite: new Ed25519Signature2020({ signer: keyPair.signer() }),
|
|
150
|
+
purpose: new AssertionProofPurpose(),
|
|
151
|
+
documentLoader
|
|
152
|
+
}
|
|
153
|
+
)
|
|
139
154
|
// signed.proof.type === 'Ed25519Signature2020' (no `cryptosuite` field)
|
|
140
155
|
|
|
141
156
|
const result = await jsigs.verify(signed, {
|
|
@@ -153,16 +168,22 @@ side, wrap the key with `createSigner` (see
|
|
|
153
168
|
[below](#the-createsigner-requirement)).
|
|
154
169
|
|
|
155
170
|
```js
|
|
156
|
-
import { DataIntegrityProof } from '@
|
|
171
|
+
import { DataIntegrityProof } from '@interop/data-integrity-proof'
|
|
157
172
|
import { eddsaRdfc2022 } from '@interop/ed25519-signature/eddsa-rdfc-2022'
|
|
158
173
|
import { createSigner } from '@interop/ed25519-signature'
|
|
159
174
|
|
|
160
175
|
// The VC @context must include 'https://w3id.org/security/data-integrity/v2'.
|
|
161
|
-
const signed = await jsigs.sign(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
176
|
+
const signed = await jsigs.sign(
|
|
177
|
+
{ ...diCredential },
|
|
178
|
+
{
|
|
179
|
+
suite: new DataIntegrityProof({
|
|
180
|
+
cryptosuite: eddsaRdfc2022,
|
|
181
|
+
signer: createSigner(keyPair)
|
|
182
|
+
}),
|
|
183
|
+
purpose: new AssertionProofPurpose(),
|
|
184
|
+
documentLoader
|
|
185
|
+
}
|
|
186
|
+
)
|
|
166
187
|
// signed.proof.type === 'DataIntegrityProof', signed.proof.cryptosuite === 'eddsa-rdfc-2022'
|
|
167
188
|
|
|
168
189
|
const result = await jsigs.verify(signed, {
|
|
@@ -178,15 +199,24 @@ Split sign / verify factories (not a single object). The sign cryptosuite's
|
|
|
178
199
|
`createVerifier` throws, as a sign-only guard.
|
|
179
200
|
|
|
180
201
|
```js
|
|
181
|
-
import { DataIntegrityProof } from '@
|
|
182
|
-
import {
|
|
202
|
+
import { DataIntegrityProof } from '@interop/data-integrity-proof'
|
|
203
|
+
import {
|
|
204
|
+
createSignCryptosuite,
|
|
205
|
+
createVerifyCryptosuite
|
|
206
|
+
} from '@interop/ed25519-signature/eddsa-jcs-2022'
|
|
183
207
|
import { createSigner } from '@interop/ed25519-signature'
|
|
184
208
|
|
|
185
|
-
const signed = await jsigs.sign(
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
209
|
+
const signed = await jsigs.sign(
|
|
210
|
+
{ ...diCredential },
|
|
211
|
+
{
|
|
212
|
+
suite: new DataIntegrityProof({
|
|
213
|
+
cryptosuite: createSignCryptosuite(),
|
|
214
|
+
signer: createSigner(keyPair)
|
|
215
|
+
}),
|
|
216
|
+
purpose: new AssertionProofPurpose(),
|
|
217
|
+
documentLoader
|
|
218
|
+
}
|
|
219
|
+
)
|
|
190
220
|
// signed.proof.cryptosuite === 'eddsa-jcs-2022'
|
|
191
221
|
|
|
192
222
|
const result = await jsigs.verify(signed, {
|
|
@@ -237,7 +267,10 @@ In the Digital Bazaar ecosystem the key library supplies that property;
|
|
|
237
267
|
|
|
238
268
|
```js
|
|
239
269
|
import { createSigner } from '@interop/ed25519-signature'
|
|
240
|
-
new DataIntegrityProof({
|
|
270
|
+
new DataIntegrityProof({
|
|
271
|
+
cryptosuite: eddsaRdfc2022,
|
|
272
|
+
signer: createSigner(keyPair)
|
|
273
|
+
})
|
|
241
274
|
```
|
|
242
275
|
|
|
243
276
|
The `Ed25519Signature2020` class does this for you, so there you can pass
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
type SignerSource = Omit<SignerLike, 'algorithm'> & {
|
|
3
|
-
algorithm?: string;
|
|
4
|
-
};
|
|
1
|
+
import type { ISigner } from '@interop/data-integrity-core';
|
|
5
2
|
/**
|
|
6
3
|
* Produces a signer that carries `algorithm`, which `DataIntegrityProof`
|
|
7
4
|
* requires (it asserts `signer.algorithm === requiredAlgorithm` at
|
|
8
|
-
* construction). `@interop/ed25519-verification-key`
|
|
9
|
-
* `algorithm
|
|
10
|
-
*
|
|
5
|
+
* construction). `@interop/ed25519-verification-key` >= 6.2.0 already sets
|
|
6
|
+
* `algorithm` on the returned signer, so this is a no-op in the normal case.
|
|
7
|
+
* Kept as a safety net for `ISigner` sources whose `algorithm` is optional:
|
|
8
|
+
* idempotent -- an `algorithm` already present is preserved.
|
|
11
9
|
*/
|
|
12
10
|
export declare function createSigner(keyPair: {
|
|
13
|
-
signer():
|
|
14
|
-
}):
|
|
15
|
-
export declare function ensureSignerAlgorithm(signer:
|
|
16
|
-
export {};
|
|
11
|
+
signer(): ISigner;
|
|
12
|
+
}): ISigner;
|
|
13
|
+
export declare function ensureSignerAlgorithm(signer: ISigner): ISigner;
|
|
17
14
|
//# sourceMappingURL=createSigner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSigner.d.ts","sourceRoot":"","sources":["../../src/core/createSigner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"createSigner.d.ts","sourceRoot":"","sources":["../../src/core/createSigner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAG3D;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE;IAAE,MAAM,IAAI,OAAO,CAAA;CAAE,GAAG,OAAO,CAEpE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAE9D"}
|
|
@@ -2,9 +2,10 @@ import { requiredAlgorithm } from './requiredAlgorithm.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Produces a signer that carries `algorithm`, which `DataIntegrityProof`
|
|
4
4
|
* requires (it asserts `signer.algorithm === requiredAlgorithm` at
|
|
5
|
-
* construction). `@interop/ed25519-verification-key`
|
|
6
|
-
* `algorithm
|
|
7
|
-
*
|
|
5
|
+
* construction). `@interop/ed25519-verification-key` >= 6.2.0 already sets
|
|
6
|
+
* `algorithm` on the returned signer, so this is a no-op in the normal case.
|
|
7
|
+
* Kept as a safety net for `ISigner` sources whose `algorithm` is optional:
|
|
8
|
+
* idempotent -- an `algorithm` already present is preserved.
|
|
8
9
|
*/
|
|
9
10
|
export function createSigner(keyPair) {
|
|
10
11
|
return ensureSignerAlgorithm(keyPair.signer());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSigner.js","sourceRoot":"","sources":["../../src/core/createSigner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"createSigner.js","sourceRoot":"","sources":["../../src/core/createSigner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,OAA8B;IACzD,OAAO,qBAAqB,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;AAChD,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,MAAe;IACnD,OAAO,EAAE,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,iBAAiB,EAAE,CAAA;AACxE,CAAC"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
+
import type { IVerifier, IVerificationMethod } from '@interop/data-integrity-core';
|
|
1
2
|
export declare function createVerifier({ verificationMethod }: {
|
|
2
|
-
verificationMethod:
|
|
3
|
-
}): Promise<
|
|
4
|
-
verify(opts: {
|
|
5
|
-
data: Uint8Array;
|
|
6
|
-
signature: Uint8Array;
|
|
7
|
-
}): Promise<boolean>;
|
|
8
|
-
algorithm: string;
|
|
9
|
-
}>;
|
|
3
|
+
verificationMethod: IVerificationMethod;
|
|
4
|
+
}): Promise<IVerifier>;
|
|
10
5
|
//# sourceMappingURL=createVerifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createVerifier.d.ts","sourceRoot":"","sources":["../../src/core/createVerifier.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createVerifier.d.ts","sourceRoot":"","sources":["../../src/core/createVerifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,mBAAmB,EACpB,MAAM,8BAA8B,CAAA;AAIrC,wBAAsB,cAAc,CAAC,EACnC,kBAAkB,EACnB,EAAE;IACD,kBAAkB,EAAE,mBAAmB,CAAA;CACxC,GAAG,OAAO,CAAC,SAAS,CAAC,CAUrB"}
|
|
@@ -5,10 +5,10 @@ export async function createVerifier({ verificationMethod }) {
|
|
|
5
5
|
// Ed25519VerificationKey2018, or JsonWebKey2020
|
|
6
6
|
const key = await Ed25519VerificationKey.from(verificationMethod);
|
|
7
7
|
const verifier = key.verifier();
|
|
8
|
-
// DataIntegrityProof checks verifier.algorithm against requiredAlgorithm
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
8
|
+
// DataIntegrityProof checks verifier.algorithm against requiredAlgorithm.
|
|
9
|
+
// `@interop/ed25519-verification-key` >= 6.2.0 already sets `algorithm`, so
|
|
10
|
+
// this is a no-op in the normal case; kept as an idempotent safety net for
|
|
11
|
+
// IVerifier sources whose `algorithm` is optional.
|
|
12
12
|
return { ...verifier, algorithm: verifier.algorithm ?? requiredAlgorithm };
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=createVerifier.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createVerifier.js","sourceRoot":"","sources":["../../src/core/createVerifier.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createVerifier.js","sourceRoot":"","sources":["../../src/core/createVerifier.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAA;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,EACnC,kBAAkB,EAGnB;IACC,sEAAsE;IACtE,gDAAgD;IAChD,MAAM,GAAG,GAAG,MAAM,sBAAsB,CAAC,IAAI,CAAC,kBAAyB,CAAC,CAAA;IACxE,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAA;IAC/B,0EAA0E;IAC1E,4EAA4E;IAC5E,2EAA2E;IAC3E,mDAAmD;IACnD,OAAO,EAAE,GAAG,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,SAAS,IAAI,iBAAiB,EAAE,CAAA;AAC5E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sha256-browser.d.ts","sourceRoot":"","sources":["../../src/core/sha256-browser.ts"],"names":[],"mappings":"AAAA,wBAAsB,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"sha256-browser.d.ts","sourceRoot":"","sources":["../../src/core/sha256-browser.ts"],"names":[],"mappings":"AAAA,wBAAsB,MAAM,CAAC,EAC3B,MAAM,EACP,EAAE;IACD,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,OAAO,CAAC,UAAU,CAAC,CAGtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sha256-browser.js","sourceRoot":"","sources":["../../src/core/sha256-browser.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"sha256-browser.js","sourceRoot":"","sources":["../../src/core/sha256-browser.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,EAC3B,MAAM,EAGP;IACC,MAAM,KAAK,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC9C,OAAO,IAAI,UAAU,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAA;AACrE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sha256.d.ts","sourceRoot":"","sources":["../../src/core/sha256.ts"],"names":[],"mappings":"AAEA,wBAAsB,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"sha256.d.ts","sourceRoot":"","sources":["../../src/core/sha256.ts"],"names":[],"mappings":"AAEA,wBAAsB,MAAM,CAAC,EAC3B,MAAM,EACP,EAAE;IACD,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,OAAO,CAAC,UAAU,CAAC,CAEtB"}
|
package/dist/core/sha256.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sha256.js","sourceRoot":"","sources":["../../src/core/sha256.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"sha256.js","sourceRoot":"","sources":["../../src/core/sha256.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,EAC3B,MAAM,EAGP;IACC,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC,CAAA;AAC5E,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const ed25519Sig2020Cryptosuite:
|
|
1
|
+
import type { Cryptosuite } from '@interop/data-integrity-proof';
|
|
2
|
+
export declare const ed25519Sig2020Cryptosuite: Cryptosuite;
|
|
3
3
|
//# sourceMappingURL=cryptosuite.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cryptosuite.d.ts","sourceRoot":"","sources":["../../src/ed25519-signature-2020/cryptosuite.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"cryptosuite.d.ts","sourceRoot":"","sources":["../../src/ed25519-signature-2020/cryptosuite.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAKhE,eAAO,MAAM,yBAAyB,EAAE,WAIvC,CAAA"}
|
|
@@ -3,10 +3,10 @@ import { createVerifier } from '../core/createVerifier.js';
|
|
|
3
3
|
import { requiredAlgorithm } from '../core/requiredAlgorithm.js';
|
|
4
4
|
// Internal cryptosuite for Ed25519Signature2020 -- deliberately no `name`
|
|
5
5
|
// so this.cryptosuite stays undefined on the proof (2020 proofs carry no
|
|
6
|
-
// cryptosuite field).
|
|
6
|
+
// cryptosuite field). `Cryptosuite.name` is optional, so no cast is needed.
|
|
7
7
|
export const ed25519Sig2020Cryptosuite = {
|
|
8
|
-
canonize
|
|
9
|
-
createVerifier
|
|
8
|
+
canonize,
|
|
9
|
+
createVerifier,
|
|
10
10
|
requiredAlgorithm
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=cryptosuite.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cryptosuite.js","sourceRoot":"","sources":["../../src/ed25519-signature-2020/cryptosuite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAGhE,0EAA0E;AAC1E,yEAAyE;AACzE,
|
|
1
|
+
{"version":3,"file":"cryptosuite.js","sourceRoot":"","sources":["../../src/ed25519-signature-2020/cryptosuite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAGhE,0EAA0E;AAC1E,yEAAyE;AACzE,4EAA4E;AAC5E,MAAM,CAAC,MAAM,yBAAyB,GAAgB;IACpD,QAAQ;IACR,cAAc;IACd,iBAAiB;CAClB,CAAA"}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import { DataIntegrityProof } from '@
|
|
2
|
-
import type {
|
|
1
|
+
import { DataIntegrityProof } from '@interop/data-integrity-proof';
|
|
2
|
+
import type { ISigner, IProofDescription } from '@interop/data-integrity-core';
|
|
3
3
|
import suiteContext2020 from 'ed25519-signature-2020-context';
|
|
4
4
|
export declare class Ed25519Signature2020 extends DataIntegrityProof {
|
|
5
5
|
static CONTEXT_URL: string;
|
|
6
6
|
static CONTEXT: unknown;
|
|
7
7
|
constructor({ signer, date }?: {
|
|
8
|
-
signer?:
|
|
9
|
-
algorithm?: string;
|
|
10
|
-
};
|
|
8
|
+
signer?: ISigner;
|
|
11
9
|
date?: string | Date | number | null;
|
|
12
10
|
});
|
|
13
11
|
updateProof({ proof }: {
|
|
14
|
-
proof:
|
|
12
|
+
proof: IProofDescription;
|
|
15
13
|
[key: string]: unknown;
|
|
16
|
-
}): Promise<
|
|
14
|
+
}): Promise<IProofDescription>;
|
|
17
15
|
}
|
|
18
16
|
export { suiteContext2020 as suiteContext };
|
|
19
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ed25519-signature-2020/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ed25519-signature-2020/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAG9E,OAAO,gBAAgB,MAAM,gCAAgC,CAAA;AAI7D,qBAAa,oBAAqB,SAAQ,kBAAkB;IAC1D,MAAM,CAAC,WAAW,SAAoB;IACtC,MAAM,CAAC,OAAO,UAAmD;gBAErD,EACV,MAAM,EACN,IAAI,EACL,GAAE;QACD,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;KAChC;IAoBS,WAAW,CAAC,EACzB,KAAK,EACN,EAAE;QACD,KAAK,EAAE,iBAAiB,CAAA;QACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KACvB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAI/B;AAED,OAAO,EAAE,gBAAgB,IAAI,YAAY,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataIntegrityProof } from '@
|
|
1
|
+
import { DataIntegrityProof } from '@interop/data-integrity-proof';
|
|
2
2
|
import { ed25519Sig2020Cryptosuite } from './cryptosuite.js';
|
|
3
3
|
import { ensureSignerAlgorithm } from '../core/createSigner.js';
|
|
4
4
|
import suiteContext2020 from 'ed25519-signature-2020-context';
|
|
@@ -9,12 +9,16 @@ export class Ed25519Signature2020 extends DataIntegrityProof {
|
|
|
9
9
|
constructor({ signer, date } = {}) {
|
|
10
10
|
// Cryptosuite has no `name`, so this.cryptosuite stays undefined --
|
|
11
11
|
// matching the absent cryptosuite field on legacy 2020 proofs.
|
|
12
|
-
// DataIntegrityProof validates signer.algorithm; ensure it is set
|
|
13
|
-
//
|
|
12
|
+
// DataIntegrityProof validates signer.algorithm; ensure it is set for
|
|
13
|
+
// ISigner sources that leave `algorithm` unset.
|
|
14
14
|
const wrappedSigner = signer
|
|
15
15
|
? ensureSignerAlgorithm(signer)
|
|
16
16
|
: undefined;
|
|
17
|
-
super({
|
|
17
|
+
super({
|
|
18
|
+
signer: wrappedSigner,
|
|
19
|
+
date,
|
|
20
|
+
cryptosuite: ed25519Sig2020Cryptosuite
|
|
21
|
+
});
|
|
18
22
|
this.type = 'Ed25519Signature2020';
|
|
19
23
|
this.contextUrl = SUITE_CONTEXT_URL;
|
|
20
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ed25519-signature-2020/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAElE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EAAE,qBA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,CAAC,CAAA;QACF,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAA;QAClC,IAAI,CAAC,UAAU,GAAG,iBAAiB,CAAA;IACrC,CAAC;IAED,2EAA2E;IAC3E,wEAAwE;IACxE,+BAA+B;IACtB,KAAK,CAAC,WAAW,CAAC,EACzB,KAAK,EAIN;QACC,OAAO,KAAK,CAAC,WAAW,CAAA;QACxB,OAAO,KAAK,CAAA;IACd,CAAC;;AAGH,OAAO,EAAE,gBAAgB,IAAI,YAAY,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createVerifyData.d.ts","sourceRoot":"","sources":["../../src/eddsa-jcs-2022/createVerifyData.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createVerifyData.d.ts","sourceRoot":"","sources":["../../src/eddsa-jcs-2022/createVerifyData.ts"],"names":[],"mappings":"AAsEA,MAAM,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,UAAU,CAAC,CAAA;AAEvE,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,GAAG,QAAQ,GACtB,kBAAkB,CA0BpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createVerifyData.js","sourceRoot":"","sources":["../../src/eddsa-jcs-2022/createVerifyData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAG1C,MAAM,IAAI,GAAG,gBAAgB,CAAA;AAE7B,SAAS,MAAM,CAAC,EAAc,EAAE,EAAc;IAC5C,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA;IACjD,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;IACd,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,CAAA;IACtB,OAAO,GAAG,CA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C,CAAC;QAED,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YAC7C,aAAa,CAAC,KAAK,EAAE,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CACtE,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CACxB;YACD,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;SACpE,CAAC,CAAA;QAEF,OAAO,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IACnC,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { canonize } from './canonize.js';
|
|
2
2
|
import { createVerifier } from '../core/createVerifier.js';
|
|
3
3
|
import { type CreateVerifyDataFn } from './createVerifyData.js';
|
|
4
|
-
import type {
|
|
5
|
-
export interface JcsSignCryptosuite extends
|
|
4
|
+
import type { Cryptosuite } from '@interop/data-integrity-proof';
|
|
5
|
+
export interface JcsSignCryptosuite extends Cryptosuite {
|
|
6
6
|
name: string;
|
|
7
7
|
canonize: typeof canonize;
|
|
8
8
|
requiredAlgorithm: string;
|
|
9
9
|
createVerifier: () => never;
|
|
10
10
|
createVerifyData: CreateVerifyDataFn;
|
|
11
11
|
}
|
|
12
|
-
export interface JcsVerifyCryptosuite extends
|
|
12
|
+
export interface JcsVerifyCryptosuite extends Cryptosuite {
|
|
13
13
|
name: string;
|
|
14
14
|
canonize: typeof canonize;
|
|
15
15
|
requiredAlgorithm: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eddsa-jcs-2022/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE1D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eddsa-jcs-2022/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE1D,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAWhE,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,QAAQ,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,cAAc,EAAE,MAAM,KAAK,CAAA;IAC3B,gBAAgB,EAAE,kBAAkB,CAAA;CACrC;AAED,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACvD,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,QAAQ,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,cAAc,EAAE,OAAO,cAAc,CAAA;IACrC,gBAAgB,EAAE,kBAAkB,CAAA;CACrC;AAED,wBAAgB,qBAAqB,IAAI,kBAAkB,CAQ1D;AAED,wBAAgB,uBAAuB,IAAI,oBAAoB,CAQ9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eddsa-jcs-2022/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eddsa-jcs-2022/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EACL,kBAAkB,EAEnB,MAAM,uBAAuB,CAAA;AAG9B,MAAM,IAAI,GAAG,gBAAgB,CAAA;AAE7B,SAAS,mBAAmB;IAC1B,MAAM,IAAI,KAAK,CACb,kDAAkD;QAChD,iDAAiD,CACpD,CAAA;AACH,CAAC;AAkBD,MAAM,UAAU,qBAAqB;IACnC,OAAO;QACL,IAAI,EAAE,IAAI;QACV,QAAQ;QACR,iBAAiB;QACjB,cAAc,EAAE,mBAAmB;QACnC,gBAAgB,EAAE,kBAAkB,CAAC,MAAM,CAAC;KAC7C,CAAA;AACH,CAAC;AAED,MAAM,UAAU,uBAAuB;IACrC,OAAO;QACL,IAAI,EAAE,IAAI;QACV,QAAQ;QACR,iBAAiB;QACjB,cAAc;QACd,gBAAgB,EAAE,kBAAkB,CAAC,QAAQ,CAAC;KAC/C,CAAA;AACH,CAAC"}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare const eddsaRdfc2022: {
|
|
4
|
-
canonize: typeof canonize;
|
|
5
|
-
createVerifier: typeof createVerifier;
|
|
6
|
-
name: string;
|
|
7
|
-
requiredAlgorithm: string;
|
|
8
|
-
};
|
|
1
|
+
import type { Cryptosuite } from '@interop/data-integrity-proof';
|
|
2
|
+
export declare const eddsaRdfc2022: Cryptosuite;
|
|
9
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eddsa-rdfc-2022/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eddsa-rdfc-2022/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAEhE,eAAO,MAAM,aAAa,EAAE,WAK3B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eddsa-rdfc-2022/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eddsa-rdfc-2022/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAGhE,MAAM,CAAC,MAAM,aAAa,GAAgB;IACxC,QAAQ;IACR,cAAc;IACd,IAAI,EAAE,iBAAiB;IACvB,iBAAiB;CAClB,CAAA"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,YAAY,EACb,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,YAAY,EACb,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interop/ed25519-signature",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "Ed25519 Linked Data / Data Integrity signature suites (Ed25519Signature2020, eddsa-rdfc-2022, eddsa-jcs-2022) in TypeScript.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"clear": "rimraf dist/*",
|
|
39
39
|
"dev": "vite",
|
|
40
40
|
"fix": "eslint --fix src test && pnpm run format",
|
|
41
|
-
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
41
|
+
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"*.md\"",
|
|
42
42
|
"lint": "eslint src test",
|
|
43
43
|
"typecheck": "tsc -p tsconfig.dev.json --noEmit",
|
|
44
44
|
"prepare": "pnpm run build",
|
|
45
45
|
"rebuild": "pnpm run clear && pnpm run build",
|
|
46
|
-
"test": "pnpm run lint && pnpm run
|
|
46
|
+
"test": "pnpm run fix && pnpm run lint && pnpm run test-node && pnpm run test-browser",
|
|
47
47
|
"test-browser": "playwright test",
|
|
48
48
|
"test-node": "vitest run",
|
|
49
49
|
"test-coverage": "vitest run --coverage"
|
|
@@ -55,15 +55,16 @@
|
|
|
55
55
|
},
|
|
56
56
|
"license": "BSD-3-Clause",
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@
|
|
59
|
-
"@interop/
|
|
58
|
+
"@interop/data-integrity-core": "^6.1.0",
|
|
59
|
+
"@interop/data-integrity-proof": "^3.2.1",
|
|
60
|
+
"@interop/ed25519-verification-key": "^7.0.1",
|
|
60
61
|
"@interop/jsonld": "^9.0.2",
|
|
61
62
|
"canonicalize": "^2.0.0",
|
|
62
63
|
"ed25519-signature-2020-context": "^1.1.0",
|
|
63
64
|
"rdf-canonize": "^5.0.0"
|
|
64
65
|
},
|
|
65
66
|
"peerDependencies": {
|
|
66
|
-
"@interop/jsonld-signatures": "^11.6.
|
|
67
|
+
"@interop/jsonld-signatures": "^11.6.7"
|
|
67
68
|
},
|
|
68
69
|
"peerDependenciesMeta": {
|
|
69
70
|
"@interop/jsonld-signatures": {
|
|
@@ -71,9 +72,9 @@
|
|
|
71
72
|
}
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
74
|
-
"@interop/security-document-loader": "^9.
|
|
75
|
+
"@interop/security-document-loader": "^9.2.1",
|
|
75
76
|
"@eslint/js": "^10.0.1",
|
|
76
|
-
"@interop/jsonld-signatures": "^11.6.
|
|
77
|
+
"@interop/jsonld-signatures": "^11.6.7",
|
|
77
78
|
"@playwright/test": "^1.60.0",
|
|
78
79
|
"@types/node": "^25.9.1",
|
|
79
80
|
"@vitest/coverage-v8": "^4.1.7",
|