You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/README.md
+67-5Lines changed: 67 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,46 +15,108 @@ Additionally, there is an E2E demo for recently added Hedera AnonCreds support.
15
15
16
16
The following examples are available in this directory:
17
17
18
-
### resolveDID
18
+
### Resolver package
19
+
20
+
#### resolveDID
19
21
20
22
-**[`resolveDID-as-cbor.ts`](./resolveDID-as-cbor.ts)**: Demonstrates how to resolve a DID and retrieve its corresponding DID Document in CBOR format.
21
23
-**[`resolveDID-as-json-ld.ts`](./resolveDID-as-json-ld.ts)**: Demonstrates how to resolve a DID and retrieve its corresponding DID Document in JSON-LD format.
22
24
-**[`resolveDID-as-json.ts`](./resolveDID-as-json.ts)**: Demonstrates how to resolve a DID and retrieve its corresponding DID Document in JSON format.
23
25
-**[`resolveDID-with-full-metadata.ts`](./resolveDID-with-full-metadata.ts)**: Demonstrates how to resolve a DID and retrieve its corresponding DID Document with full DID Resolution metadata.
24
26
-**[`resolveDID-with-topic-reader.ts`](./resolveDID-with-topic-reader.ts)**: Demonstrates how to resolve a DID using a custom topic reader.
27
+
-**[`resolveDID-with-hcs-topic-reader.ts`](./resolveDID-with-topic-reader.ts)**: Demonstrates how to resolve a DID using a HCS Topic Reader from resolver package.
25
28
-**[`resolveDID-with-rest-api-topic-reader.ts`](./resolveDID-with-rest-api-topic-reader.ts)**: Demonstrates how to resolve a DID using a Hedera REST API Topic Reader from resolver package.
26
29
-**[`resolveDID-with-verifier.ts`](./resolveDID-with-verifier.ts)**: Demonstrates how to resolve a DID using a custom verifier.
27
30
28
-
### dereferenceDID
31
+
####dereferenceDID
29
32
30
33
-**[`dereferenceDID-fragment.ts`](./dereferenceDID-fragment.ts)**: Demonstrates how to dereference a fragment from a DID document.
31
34
-**[`dereferenceDID-service-endpoint.ts`](./dereferenceDID-service-endpoint.ts)**: Demonstrates how to dereference a service endpoint from a DID document.
32
35
-**[`dereferenceDID-with-full-metadata.ts`](./dereferenceDID-with-full-metadata.ts)**: Demonstrates how to dereference a DID fragment with full DID Resolution metadata.
33
36
-**[`dereferenceDID-with-topic-reader.ts`](./dereferenceDID-with-topic-reader.ts)**: Demonstrates how to dereference a DID fragment using a custom topic reader.
34
37
--**[`dereferenceDID-with-verifier.ts`](./dereferenceDID-with-verifier.ts)**: Demonstrates how to dereference a DID fragment using a custom verifier.
35
38
36
-
### createDID
39
+
### Registrar package
40
+
41
+
#### createDID
37
42
38
43
-**[`createDID-with-client-options.ts`](./createDID-with-client-options.ts)**: Demonstrates how to create a DID with custom `client-options`.
39
44
-**[`createDID-with-a-client.ts`](./createDID-with-a-client.ts)**: Shows how to create a DID using a pre-configured Hedera `client` instance.
40
45
-**[`createDID-with-a-custom-controller.ts`](./createDID-with-a-custom-controller.ts)**: Demonstrates how to create a DID with a custom `controller`.
41
46
-**[`createDID-with-a-topic-specific-did.ts`](./createDID-with-a-topic-specific-did.ts)**: Shows how to create a DID associated with a specific Hedera topic ID.
42
47
-**[`createDID-using-client-secret-mode.ts`](./createDID-using-client-secret-mode.ts)**: Shows how to create a DID in a Client Managed Secret Mode.
43
48
44
-
### updateDID
49
+
####updateDID
45
50
46
51
-**[`updateDID-with-client-options.ts`](./updateDID-with-client-options.ts)**: Demonstrates how to update a DID with custom `client-options`.
47
52
-**[`updateDID-with-a-client.ts`](./updateDID-with-a-client.ts)**: Shows how to update a DID using a pre-configured Hedera `client` instance.
48
53
-**[`updateDID-with-multiple-properties.ts`](./updateDID-with-multiple-properties.ts)**: Demonstrates how to update multiple properties of a DID document simultaneously.
49
54
-**[`updateDID-with-DID-update-builder.ts`](./updateDID-with-DID-update-builder.ts)**: Demonstrates how to use the `DIDUpdateBuilder` class to construct and execute DID update operations.
50
55
-**[`updateDID-using-client-secret-mode.ts`](./updateDID-using-client-secret-mode.ts)**: Demonstrates how to update a DID in a Client Managed Secret Mode.
51
56
52
-
### deactivateDID
57
+
####deactivateDID
53
58
54
59
-**[`deactivateDID-with-client-options.ts`](./deactivateDID-with-client-options.ts)**: Demonstrates how to deactivate a DID with custom `client-options`.
55
60
-**[`deactivateDID-with-a-client.ts`](./deactivateDID-with-a-client.ts)**: Shows how to deactivate a DID using a pre-configured Hedera `client` instance.
56
61
-**[`deactivateDID-using-client-secret-mode.ts`](./deactivateDID-using-client-secret-mode.ts)**: Demonstrates how to deactivate a DID in a Client Managed Secret Mode.
57
62
63
+
64
+
### HCS package
65
+
66
+
#### hcsService
67
+
68
+
-**[`hedara-hcs-service-comprehensive-example.ts`](./hedara-hcs-service-comprehensive-example.ts)**: Comprehensive example demonstrating creation, update, info retrieval of HCS topic, message submission and retrieval, file submission and resolution using `HederaHcsService`.
69
+
70
+
#### HcsTopicService
71
+
72
+
-**[`hcs-topic-service-create-topic.ts`](./hcs-topic-service-create-topic.ts)**: Demonstrates how to create a new Hedera Consensus Service (HCS) topic using `HcsTopicService.createTopic`.
73
+
-**[`hcs-topic-service-update-topic.ts`](./hcs-topic-service-update-topic.ts)**: Demonstrates how to update an existing HCS topic using `HcsTopicService.updateTopic`.
74
+
-**[`hcs-topic-service-delete-topic.ts`](./hcs-topic-service-delete-topic.ts)**: Demonstrates how to delete an HCS topic using `HcsTopicService.deleteTopic`.
75
+
-**[`hcs-topic-service-get-topic-info.ts`](./hcs-topic-service-get-topic-info.ts)**: Demonstrates how to retrieve information about an HCS topic using `HcsTopicService.getTopicInfo`.
76
+
77
+
#### hcsMessageService
78
+
79
+
-**[`hcs-message-service-submit-message.ts`](./hcs-message-service-submit-message.ts)**: Demonstrates how to submit a message to a Hedera Consensus Service (HCS) topic using `HcsMessageService.submitMessage`.
80
+
-**[`hcs-message-service-get-topic-messages.ts`](./hcs-message-service-get-topic-messages.ts)**: Demonstrates how to retrieve messages from an HCS topic using `HcsMessageService.getTopicMessages`.
81
+
82
+
#### hcsFileService
83
+
84
+
-**[`hcs-file-service-submit-file.ts`](./hcs-file-service-submit-file.ts)**: Demonstrates how to submit a file to Hedera Consensus Service (HCS) using `HcsFileService.submitFile`.
85
+
-**[`hcs-file-service-resolve-file.ts`](./hcs-file-service-resolve-file.ts)**: Demonstrates how to resolve and retrieve a file from HCS using `HcsFileService.resolveFile`.
86
+
87
+
### HederaAnoncredsRegistry package
88
+
89
+
-**[`anoncreds-register-schema.ts`](./anoncreds-register-schema.ts)**: Demonstrates how to register a schema using `HederaAnoncredsRegistry.registerSchema`.
90
+
-**[`anoncreds-get-schema.ts`](./anoncreds-get-schema.ts)**: Demonstrates how to retrieve a registered schema using `HederaAnoncredsRegistry.getSchema`.
91
+
-**[`anoncreds-register-credential-definition.ts`](./anoncreds-register-credential-definition.ts)**: Demonstrates how to register a credential definition with `HederaAnoncredsRegistry.registerCredentialDefinition`.
92
+
-**[`anoncreds-get-credential-definition.ts`](./anoncreds-get-credential-definition.ts)**: Demonstrates how to obtain a credential definition using `HederaAnoncredsRegistry.getCredentialDefinition`.
93
+
-**[`anoncreds-register-revocation-registry.ts`](./anoncreds-register-revocation-registry.ts)**: Demonstrates how to register a revocation registry definition via `HederaAnoncredsRegistry.registerRevocationRegistryDefinition`.
94
+
-**[`anoncreds-get-revocation-registry.ts`](./anoncreds-get-revocation-registry.ts)**: Demonstrates how to fetch a revocation registry definition using `HederaAnoncredsRegistry.getRevocationRegistryDefinition`.
95
+
-**[`anoncreds-register-revocation-status-list.ts`](./anoncreds-register-revocation-status-list.ts)**: Demonstrates how to register a revocation status list using `HederaAnoncredsRegistry.registerRevocationStatusList`.
96
+
-**[`anoncreds-get-revocation-status-list.ts`](./anoncreds-get-revocation-status-list.ts)**: Demonstrates how to get a revocation status list with `HederaAnoncredsRegistry.getRevocationStatusList`.
97
+
98
+
### HederaClientService package
99
+
100
+
-**[`get-client.ts`](./get-client.ts)**: Demonstrates how to create a Hedera client instance for a specific network using `HederaClientService.getClient`.
101
+
-**[`with-client-operation.ts`](./with-client-operation.ts)**: Demonstrates usage of `HederaClientService.withClient` to safely perform operations with automatic client lifecycle management.
102
+
103
+
### LRUMemoryCache package
104
+
105
+
-**[`cache-set-get.ts`](./cache-set-get.ts)**: Demonstrates how to set, get, and remove cache entries using `LRUMemoryCache`.
106
+
-**[`cache-expiry-cleanup.ts`](./cache-expiry-cleanup.ts)**: Demonstrates how to use expiration for cache entries and clean up expired items.
107
+
-**[`cache-clear-getall.ts`](./cache-clear-getall.ts)**: Demonstrates how to clear the cache and retrieve all current cache entries.
108
+
109
+
### Crypto package
110
+
111
+
-**[`crypto-sha256-string.ts`](./crypto-sha256-string.ts)**: Demonstrates how to compute the SHA-256 hash of a string using the `Crypto.sha256` method.
112
+
-**[`crypto-sha256-uint8array.ts`](./crypto-sha256-uint8array.ts)**: Demonstrates how to compute the SHA-256 hash of a Uint8Array using the `Crypto.sha256` method.
113
+
114
+
### Zstd package
115
+
116
+
-**[`zstd-compress.ts`](./zstd-compress.ts)**: Demonstrates how to compress a Uint8Array using the `Zstd.compress` static method.
117
+
-**[`zstd-decompress.ts`](./zstd-decompress.ts)**: Demonstrates how to decompress a Uint8Array using the `Zstd.decompress` static method.
0 commit comments