@twin.org/immutable-proof-models 0.0.1-next.26 → 0.0.1-next.27
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 +18 -8
- package/dist/esm/index.mjs +18 -9
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/IImmutableProof.d.ts +3 -2
- package/dist/types/models/IImmutableProofVerification.d.ts +2 -1
- package/dist/types/models/immutableProofContexts.d.ts +17 -0
- package/dist/types/models/immutableProofTypes.d.ts +0 -8
- package/docs/changelog.md +1 -1
- package/docs/reference/index.md +2 -0
- package/docs/reference/type-aliases/ImmutableProofContexts.md +5 -0
- package/docs/reference/variables/ImmutableProofContexts.md +19 -0
- package/docs/reference/variables/ImmutableProofTypes.md +0 -12
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -9,14 +9,6 @@ var dataCore = require('@twin.org/data-core');
|
|
|
9
9
|
*/
|
|
10
10
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
11
11
|
const ImmutableProofTypes = {
|
|
12
|
-
/**
|
|
13
|
-
* The context root for the immutable proof types.
|
|
14
|
-
*/
|
|
15
|
-
ContextRoot: "https://schema.twindev.org/immutable-proof/",
|
|
16
|
-
/**
|
|
17
|
-
* The context root for the common types.
|
|
18
|
-
*/
|
|
19
|
-
ContextRootCommon: "https://schema.twindev.org/common/",
|
|
20
12
|
/**
|
|
21
13
|
* Represents Immutable Proof.
|
|
22
14
|
*/
|
|
@@ -117,6 +109,23 @@ class ImmutableProofDataTypes {
|
|
|
117
109
|
}
|
|
118
110
|
}
|
|
119
111
|
|
|
112
|
+
// Copyright 2024 IOTA Stiftung.
|
|
113
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
114
|
+
/**
|
|
115
|
+
* The contexts of immutable proof data.
|
|
116
|
+
*/
|
|
117
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
118
|
+
const ImmutableProofContexts = {
|
|
119
|
+
/**
|
|
120
|
+
* The context root for the immutable proof types.
|
|
121
|
+
*/
|
|
122
|
+
ContextRoot: "https://schema.twindev.org/immutable-proof/",
|
|
123
|
+
/**
|
|
124
|
+
* The context root for the common types.
|
|
125
|
+
*/
|
|
126
|
+
ContextRootCommon: "https://schema.twindev.org/common/"
|
|
127
|
+
};
|
|
128
|
+
|
|
120
129
|
// Copyright 2024 IOTA Stiftung.
|
|
121
130
|
// SPDX-License-Identifier: Apache-2.0.
|
|
122
131
|
/**
|
|
@@ -159,6 +168,7 @@ const ImmutableProofTopics = {
|
|
|
159
168
|
ProofCreated: "immutable-proof:proof-created"
|
|
160
169
|
};
|
|
161
170
|
|
|
171
|
+
exports.ImmutableProofContexts = ImmutableProofContexts;
|
|
162
172
|
exports.ImmutableProofDataTypes = ImmutableProofDataTypes;
|
|
163
173
|
exports.ImmutableProofFailure = ImmutableProofFailure;
|
|
164
174
|
exports.ImmutableProofTopics = ImmutableProofTopics;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -7,14 +7,6 @@ import { DataTypeHandlerFactory } from '@twin.org/data-core';
|
|
|
7
7
|
*/
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9
9
|
const ImmutableProofTypes = {
|
|
10
|
-
/**
|
|
11
|
-
* The context root for the immutable proof types.
|
|
12
|
-
*/
|
|
13
|
-
ContextRoot: "https://schema.twindev.org/immutable-proof/",
|
|
14
|
-
/**
|
|
15
|
-
* The context root for the common types.
|
|
16
|
-
*/
|
|
17
|
-
ContextRootCommon: "https://schema.twindev.org/common/",
|
|
18
10
|
/**
|
|
19
11
|
* Represents Immutable Proof.
|
|
20
12
|
*/
|
|
@@ -115,6 +107,23 @@ class ImmutableProofDataTypes {
|
|
|
115
107
|
}
|
|
116
108
|
}
|
|
117
109
|
|
|
110
|
+
// Copyright 2024 IOTA Stiftung.
|
|
111
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
112
|
+
/**
|
|
113
|
+
* The contexts of immutable proof data.
|
|
114
|
+
*/
|
|
115
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
116
|
+
const ImmutableProofContexts = {
|
|
117
|
+
/**
|
|
118
|
+
* The context root for the immutable proof types.
|
|
119
|
+
*/
|
|
120
|
+
ContextRoot: "https://schema.twindev.org/immutable-proof/",
|
|
121
|
+
/**
|
|
122
|
+
* The context root for the common types.
|
|
123
|
+
*/
|
|
124
|
+
ContextRootCommon: "https://schema.twindev.org/common/"
|
|
125
|
+
};
|
|
126
|
+
|
|
118
127
|
// Copyright 2024 IOTA Stiftung.
|
|
119
128
|
// SPDX-License-Identifier: Apache-2.0.
|
|
120
129
|
/**
|
|
@@ -157,4 +166,4 @@ const ImmutableProofTopics = {
|
|
|
157
166
|
ProofCreated: "immutable-proof:proof-created"
|
|
158
167
|
};
|
|
159
168
|
|
|
160
|
-
export { ImmutableProofDataTypes, ImmutableProofFailure, ImmutableProofTopics, ImmutableProofTypes };
|
|
169
|
+
export { ImmutableProofContexts, ImmutableProofDataTypes, ImmutableProofFailure, ImmutableProofTopics, ImmutableProofTypes };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from "./models/eventBus/IImmutableProofEventBusProofCreated";
|
|
|
8
8
|
export * from "./models/IImmutableProof";
|
|
9
9
|
export * from "./models/IImmutableProofComponent";
|
|
10
10
|
export * from "./models/IImmutableProofVerification";
|
|
11
|
+
export * from "./models/immutableProofContexts";
|
|
11
12
|
export * from "./models/immutableProofFailure";
|
|
12
13
|
export * from "./models/immutableProofTopics";
|
|
13
14
|
export * from "./models/immutableProofTypes";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
2
|
import type { IDataIntegrityProof } from "@twin.org/standards-w3c-did";
|
|
3
|
+
import type { ImmutableProofContexts } from "./immutableProofContexts";
|
|
3
4
|
import type { ImmutableProofTypes } from "./immutableProofTypes";
|
|
4
5
|
/**
|
|
5
6
|
* Interface describing an immutable proof state.
|
|
@@ -9,8 +10,8 @@ export interface IImmutableProof {
|
|
|
9
10
|
* JSON-LD Context.
|
|
10
11
|
*/
|
|
11
12
|
"@context": [
|
|
12
|
-
typeof
|
|
13
|
-
typeof
|
|
13
|
+
typeof ImmutableProofContexts.ContextRoot,
|
|
14
|
+
typeof ImmutableProofContexts.ContextRootCommon,
|
|
14
15
|
...IJsonLdContextDefinitionElement[]
|
|
15
16
|
];
|
|
16
17
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ImmutableProofContexts } from "./immutableProofContexts";
|
|
1
2
|
import type { ImmutableProofFailure } from "./immutableProofFailure";
|
|
2
3
|
import type { ImmutableProofTypes } from "./immutableProofTypes";
|
|
3
4
|
/**
|
|
@@ -7,7 +8,7 @@ export interface IImmutableProofVerification {
|
|
|
7
8
|
/**
|
|
8
9
|
* JSON-LD Context.
|
|
9
10
|
*/
|
|
10
|
-
"@context": typeof
|
|
11
|
+
"@context": typeof ImmutableProofContexts.ContextRoot;
|
|
11
12
|
/**
|
|
12
13
|
* JSON-LD Type.
|
|
13
14
|
*/
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The contexts of immutable proof data.
|
|
3
|
+
*/
|
|
4
|
+
export declare const ImmutableProofContexts: {
|
|
5
|
+
/**
|
|
6
|
+
* The context root for the immutable proof types.
|
|
7
|
+
*/
|
|
8
|
+
readonly ContextRoot: "https://schema.twindev.org/immutable-proof/";
|
|
9
|
+
/**
|
|
10
|
+
* The context root for the common types.
|
|
11
|
+
*/
|
|
12
|
+
readonly ContextRootCommon: "https://schema.twindev.org/common/";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The contexts of immutable proof data.
|
|
16
|
+
*/
|
|
17
|
+
export type ImmutableProofContexts = (typeof ImmutableProofContexts)[keyof typeof ImmutableProofContexts];
|
|
@@ -2,14 +2,6 @@
|
|
|
2
2
|
* The types of immutable proof data.
|
|
3
3
|
*/
|
|
4
4
|
export declare const ImmutableProofTypes: {
|
|
5
|
-
/**
|
|
6
|
-
* The context root for the immutable proof types.
|
|
7
|
-
*/
|
|
8
|
-
readonly ContextRoot: "https://schema.twindev.org/immutable-proof/";
|
|
9
|
-
/**
|
|
10
|
-
* The context root for the common types.
|
|
11
|
-
*/
|
|
12
|
-
readonly ContextRootCommon: "https://schema.twindev.org/common/";
|
|
13
5
|
/**
|
|
14
6
|
* Represents Immutable Proof.
|
|
15
7
|
*/
|
package/docs/changelog.md
CHANGED
package/docs/reference/index.md
CHANGED
|
@@ -18,12 +18,14 @@
|
|
|
18
18
|
|
|
19
19
|
## Type Aliases
|
|
20
20
|
|
|
21
|
+
- [ImmutableProofContexts](type-aliases/ImmutableProofContexts.md)
|
|
21
22
|
- [ImmutableProofFailure](type-aliases/ImmutableProofFailure.md)
|
|
22
23
|
- [ImmutableProofTopics](type-aliases/ImmutableProofTopics.md)
|
|
23
24
|
- [ImmutableProofTypes](type-aliases/ImmutableProofTypes.md)
|
|
24
25
|
|
|
25
26
|
## Variables
|
|
26
27
|
|
|
28
|
+
- [ImmutableProofContexts](variables/ImmutableProofContexts.md)
|
|
27
29
|
- [ImmutableProofFailure](variables/ImmutableProofFailure.md)
|
|
28
30
|
- [ImmutableProofTopics](variables/ImmutableProofTopics.md)
|
|
29
31
|
- [ImmutableProofTypes](variables/ImmutableProofTypes.md)
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Type Alias: ImmutableProofContexts
|
|
2
|
+
|
|
3
|
+
> **ImmutableProofContexts**: *typeof* [`ImmutableProofContexts`](../variables/ImmutableProofContexts.md)\[keyof *typeof* [`ImmutableProofContexts`](../variables/ImmutableProofContexts.md)\]
|
|
4
|
+
|
|
5
|
+
The contexts of immutable proof data.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Variable: ImmutableProofContexts
|
|
2
|
+
|
|
3
|
+
> `const` **ImmutableProofContexts**: `object`
|
|
4
|
+
|
|
5
|
+
The contexts of immutable proof data.
|
|
6
|
+
|
|
7
|
+
## Type declaration
|
|
8
|
+
|
|
9
|
+
### ContextRoot
|
|
10
|
+
|
|
11
|
+
> `readonly` **ContextRoot**: `"https://schema.twindev.org/immutable-proof/"` = `"https://schema.twindev.org/immutable-proof/"`
|
|
12
|
+
|
|
13
|
+
The context root for the immutable proof types.
|
|
14
|
+
|
|
15
|
+
### ContextRootCommon
|
|
16
|
+
|
|
17
|
+
> `readonly` **ContextRootCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
|
|
18
|
+
|
|
19
|
+
The context root for the common types.
|
|
@@ -6,18 +6,6 @@ The types of immutable proof data.
|
|
|
6
6
|
|
|
7
7
|
## Type declaration
|
|
8
8
|
|
|
9
|
-
### ContextRoot
|
|
10
|
-
|
|
11
|
-
> `readonly` **ContextRoot**: `"https://schema.twindev.org/immutable-proof/"` = `"https://schema.twindev.org/immutable-proof/"`
|
|
12
|
-
|
|
13
|
-
The context root for the immutable proof types.
|
|
14
|
-
|
|
15
|
-
### ContextRootCommon
|
|
16
|
-
|
|
17
|
-
> `readonly` **ContextRootCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
|
|
18
|
-
|
|
19
|
-
The context root for the common types.
|
|
20
|
-
|
|
21
9
|
### ImmutableProof
|
|
22
10
|
|
|
23
11
|
> `readonly` **ImmutableProof**: `"ImmutableProof"` = `"ImmutableProof"`
|
package/package.json
CHANGED