@twin.org/immutable-proof-service 0.0.1-next.3 → 0.0.1-next.30

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.
@@ -27,7 +27,7 @@ export declare class ImmutableProof {
27
27
  */
28
28
  proofObjectHash: string;
29
29
  /**
30
- * The immutable storage id.
30
+ * The verifiable storage id.
31
31
  */
32
- immutableStorageId?: string;
32
+ verifiableStorageId?: string;
33
33
  }
@@ -1,6 +1,6 @@
1
1
  import { type IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
- import { type IImmutableProofVerification, type IImmutableProof, type IImmutableProofComponent } from "@twin.org/immutable-proof-models";
3
- import type { IImmutableProofServiceConfig } from "./models/IImmutableProofServiceConfig";
2
+ import { type IImmutableProof, type IImmutableProofComponent, type IImmutableProofVerification } from "@twin.org/immutable-proof-models";
3
+ import type { IImmutableProofServiceConstructorOptions } from "./models/IImmutableProofServiceConstructorOptions";
4
4
  /**
5
5
  * Class for performing immutable proof operations.
6
6
  */
@@ -16,48 +16,36 @@ export declare class ImmutableProofService implements IImmutableProofComponent {
16
16
  /**
17
17
  * Create a new instance of ImmutableProofService.
18
18
  * @param options The dependencies for the immutable proof connector.
19
- * @param options.config The configuration for the connector.
20
- * @param options.vaultConnectorType The vault connector type, defaults to "vault".
21
- * @param options.immutableProofEntityStorageType The entity storage for proofs, defaults to "immutable-proof".
22
- * @param options.immutableStorageType The immutable storage, defaults to "immutable-storage".
23
- * @param options.identityConnectorType The identity connector type, defaults to "identity".
24
19
  */
25
- constructor(options?: {
26
- vaultConnectorType?: string;
27
- immutableProofEntityStorageType?: string;
28
- immutableStorageType?: string;
29
- config?: IImmutableProofServiceConfig;
30
- identityConnectorType?: string;
31
- });
20
+ constructor(options?: IImmutableProofServiceConstructorOptions);
32
21
  /**
33
- * Create a new authentication proof.
34
- * @param proofObject The object for the proof as JSON-LD.
22
+ * Create a new proof.
23
+ * @param document The document to create the proof for.
35
24
  * @param userIdentity The identity to create the immutable proof operation with.
36
25
  * @param nodeIdentity The node identity to use for vault operations.
37
- * @returns The id of the new authentication proof.
26
+ * @returns The id of the new proof.
38
27
  */
39
- create(proofObject: IJsonLdNodeObject, userIdentity?: string, nodeIdentity?: string): Promise<string>;
28
+ create(document: IJsonLdNodeObject, userIdentity?: string, nodeIdentity?: string): Promise<string>;
40
29
  /**
41
- * Get an authentication proof.
30
+ * Get a proof.
42
31
  * @param id The id of the proof to get.
43
32
  * @returns The proof.
44
33
  * @throws NotFoundError if the proof is not found.
45
34
  */
46
35
  get(id: string): Promise<IImmutableProof>;
47
36
  /**
48
- * Verify an authentication proof.
37
+ * Verify a proof.
49
38
  * @param id The id of the proof to verify.
50
- * @param proofObject The object to verify as JSON-LD.
51
39
  * @returns The result of the verification and any failures.
52
40
  * @throws NotFoundError if the proof is not found.
53
41
  */
54
- verify(id: string, proofObject: IJsonLdNodeObject): Promise<IImmutableProofVerification>;
42
+ verify(id: string): Promise<IImmutableProofVerification>;
55
43
  /**
56
- * Remove the immutable storage for the proof.
44
+ * Remove the verifiable storage for the proof.
57
45
  * @param id The id of the proof to remove the storage from.
58
46
  * @param nodeIdentity The node identity to use for vault operations.
59
47
  * @returns Nothing.
60
48
  * @throws NotFoundError if the proof is not found.
61
49
  */
62
- removeImmutable(id: string, nodeIdentity?: string): Promise<void>;
50
+ removeVerifiable(id: string, nodeIdentity?: string): Promise<void>;
63
51
  }
@@ -1,6 +1,7 @@
1
+ export * from "./entities/immutableProof";
1
2
  export * from "./immutableProofRoutes";
2
3
  export * from "./immutableProofService";
3
- export * from "./entities/immutableProof";
4
4
  export * from "./models/IImmutableProofServiceConfig";
5
+ export * from "./models/IImmutableProofServiceConstructorOptions";
5
6
  export * from "./restEntryPoints";
6
7
  export * from "./schema";
@@ -3,13 +3,8 @@
3
3
  */
4
4
  export interface IImmutableProofServiceConfig {
5
5
  /**
6
- * The assertion method id to use for the stream.
7
- * @default immutable-proof
6
+ * The verification method id to use for the proof.
7
+ * @default immutable-proof-assertion
8
8
  */
9
- assertionMethodId?: string;
10
- /**
11
- * The key to use in the proof config.
12
- * @default immutable-proof
13
- */
14
- proofConfigKeyId?: string;
9
+ verificationMethodId?: string;
15
10
  }
@@ -0,0 +1,34 @@
1
+ import type { IImmutableProofServiceConfig } from "./IImmutableProofServiceConfig";
2
+ /**
3
+ * Options for the immutable proof service constructor.
4
+ */
5
+ export interface IImmutableProofServiceConstructorOptions {
6
+ /**
7
+ * The entity storage for proofs.
8
+ * @default immutable-proof
9
+ */
10
+ immutableProofEntityStorageType?: string;
11
+ /**
12
+ * The verifiable storage.
13
+ * @default verifiable-storage
14
+ */
15
+ verifiableStorageType?: string;
16
+ /**
17
+ * The identity connector type.
18
+ * @default identity
19
+ */
20
+ identityConnectorType?: string;
21
+ /**
22
+ * The background task connector type.
23
+ * @default background-task
24
+ */
25
+ backgroundTaskConnectorType?: string;
26
+ /**
27
+ * The event bus component type, defaults to no event bus.
28
+ */
29
+ eventBusComponentType?: string;
30
+ /**
31
+ * The configuration for the connector.
32
+ */
33
+ config?: IImmutableProofServiceConfig;
34
+ }
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/immutable-proof-service - Changelog
2
2
 
3
- ## v0.0.1-next.3
3
+ ## v0.0.1-next.30
4
4
 
5
5
  - Initial Release