@twin.org/immutable-proof-service 0.0.1-next.5 → 0.0.1-next.6
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/dist/cjs/index.cjs +4 -1
- package/dist/esm/index.mjs +4 -1
- package/docs/changelog.md +1 -1
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -557,7 +557,6 @@ class ImmutableProofService {
|
|
|
557
557
|
// As we are adding the proof to the data we update its context
|
|
558
558
|
immutableProof["@context"] = [
|
|
559
559
|
immutableProofModels.ImmutableProofTypes.ContextRoot,
|
|
560
|
-
immutableStorageModels.ImmutableStorageTypes.ContextRoot,
|
|
561
560
|
standardsW3cDid.DidContexts.ContextVCDataIntegrity
|
|
562
561
|
];
|
|
563
562
|
immutableProof.proof = await this._identityConnector.createProof(proofEntity.nodeIdentity, `${proofEntity.nodeIdentity}#${this._assertionMethodId}`, hashData);
|
|
@@ -603,6 +602,10 @@ class ImmutableProofService {
|
|
|
603
602
|
if (core.Is.uint8Array(immutableResult.data)) {
|
|
604
603
|
proofModel = core.ObjectHelper.fromBytes(immutableResult.data);
|
|
605
604
|
proofModel.immutableReceipt = immutableResult.receipt;
|
|
605
|
+
// As we are adding the receipt to the data we update its context
|
|
606
|
+
if (core.Is.array(proofModel["@context"])) {
|
|
607
|
+
proofModel["@context"].push(immutableStorageModels.ImmutableStorageTypes.ContextRoot);
|
|
608
|
+
}
|
|
606
609
|
if (core.Is.object(proofModel.proof) && core.Is.object(proofObject)) {
|
|
607
610
|
if (proofModel.proof.cryptosuite !== standardsW3cDid.DidCryptoSuites.EdDSAJcs2022) {
|
|
608
611
|
failure = immutableProofModels.ImmutableProofFailure.CryptoSuiteMismatch;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -555,7 +555,6 @@ class ImmutableProofService {
|
|
|
555
555
|
// As we are adding the proof to the data we update its context
|
|
556
556
|
immutableProof["@context"] = [
|
|
557
557
|
ImmutableProofTypes.ContextRoot,
|
|
558
|
-
ImmutableStorageTypes.ContextRoot,
|
|
559
558
|
DidContexts.ContextVCDataIntegrity
|
|
560
559
|
];
|
|
561
560
|
immutableProof.proof = await this._identityConnector.createProof(proofEntity.nodeIdentity, `${proofEntity.nodeIdentity}#${this._assertionMethodId}`, hashData);
|
|
@@ -601,6 +600,10 @@ class ImmutableProofService {
|
|
|
601
600
|
if (Is.uint8Array(immutableResult.data)) {
|
|
602
601
|
proofModel = ObjectHelper.fromBytes(immutableResult.data);
|
|
603
602
|
proofModel.immutableReceipt = immutableResult.receipt;
|
|
603
|
+
// As we are adding the receipt to the data we update its context
|
|
604
|
+
if (Is.array(proofModel["@context"])) {
|
|
605
|
+
proofModel["@context"].push(ImmutableStorageTypes.ContextRoot);
|
|
606
|
+
}
|
|
604
607
|
if (Is.object(proofModel.proof) && Is.object(proofObject)) {
|
|
605
608
|
if (proofModel.proof.cryptosuite !== DidCryptoSuites.EdDSAJcs2022) {
|
|
606
609
|
failure = ImmutableProofFailure.CryptoSuiteMismatch;
|
package/docs/changelog.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/immutable-proof-service",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.6",
|
|
4
4
|
"description": "Immutable proof contract implementation and REST endpoint definitions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@twin.org/entity": "next",
|
|
23
23
|
"@twin.org/entity-storage-models": "next",
|
|
24
24
|
"@twin.org/identity-models": "next",
|
|
25
|
-
"@twin.org/immutable-proof-models": "0.0.1-next.
|
|
25
|
+
"@twin.org/immutable-proof-models": "0.0.1-next.6",
|
|
26
26
|
"@twin.org/immutable-storage-models": "next",
|
|
27
27
|
"@twin.org/nameof": "next",
|
|
28
28
|
"@twin.org/standards-w3c-did": "next",
|