forked from openwallet-foundation/credo-ts
-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Add Hedera module #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
AlexanderShenshin
merged 94 commits into
feature/add-hedera-package
from
feature/hedera-anoncreds
Sep 10, 2025
Merged
Changes from all commits
Commits
Show all changes
94 commits
Select commit
Hold shift + click to select a range
1896392
Added HederaCredo module
KononovAndrey e862050
Added DID registry
KononovAndrey 42db196
Debug and fix Did registrar/resolver
KononovAndrey 2499b0e
Fix revocation status list issues for CredoTS
KononovAndrey 568d41d
Use the new @hiero-did-sdk-js/*
KononovAndrey 0f4dd6c
Biome fixes
KononovAndrey b26903e
Implement HederaLedgerService methods the new hiero-did-sdk using
KononovAndrey 9de97b9
Restore changes
KononovAndrey 4112913
Fix issues
KononovAndrey 8b5c168
Added signature on createDid
KononovAndrey 8170da8
Implemented updateDid method
KononovAndrey da8b785
Working with KMS keys
KononovAndrey 7808b61
Inject KMS to the ledger service
KononovAndrey ebe79c0
Implemented DidRegstrar.Update API
KononovAndrey 428f8f3
Use HCS module with changes awaiter
KononovAndrey 1569e87
Clear code
KononovAndrey 8e6f173
Update lib versions
KononovAndrey 549b1fd
Use updated libraries
KononovAndrey 7e5b714
Up used libraries versions
KononovAndrey 2bfc1f9
Fix PR notes
KononovAndrey 2cd3297
Fix PR notes
KononovAndrey a471f61
Misc. cleanup
AlexanderShenshin cf2851f
* Switched usage of @hiero-did-sdk-js to libraries from NPM repository
KononovAndrey 64d33d1
Switch to NPM + unit-tests
KononovAndrey ecc14ac
Merge remote-tracking branch 'origin/feature/hedera-anoncreds' into f…
KononovAndrey ef9a570
Switch to NPM + unit-tests
KononovAndrey 89cd44e
Merge remote-tracking branch 'origin/main' into feature/hedera-anoncreds
KononovAndrey 01871d5
Switch to NPM + unit-tests
KononovAndrey d63f690
Switch to NPM + unit-tests
KononovAndrey a454825
- fix: Switch to NPM + unit-tests
KononovAndrey a7365c4
Merge remote-tracking branch 'origin/feature/hedera-anoncreds' into f…
KononovAndrey 42c35d3
- fix: add hedera anoncreds registry support to the demo
KononovAndrey 3241794
Fix the github action for hedera e2e tests support
KononovAndrey 787779f
Restart github actions
KononovAndrey f2ea20a
Restart github actions
KononovAndrey 6cbe8b5
Set timeout directly to Hedera e2e tests
KononovAndrey 7a32c1e
Use secrets for HEDERA_OPERATOR_*** env variables
KononovAndrey 14fdd35
Update readme
KononovAndrey 1a0c1f2
Set test timeout for all tests over setup.ts
KononovAndrey 07b57fb
Fix PR review notes
KononovAndrey b5ffa40
Fix PR review notes
KononovAndrey 10e5aad
Fix PR review notes
KononovAndrey 11c2e13
Fix PR review notes
KononovAndrey 0549b7b
Sign topic, files, messages with issuerKey
KononovAndrey 0b742fe
Up used libraries
KononovAndrey 4f69da1
Up used libraries
KononovAndrey 36c2e9f
Lint
KononovAndrey fc527ad
Added HederaCredo module
KononovAndrey e3e043e
Added DID registry
KononovAndrey ce2f229
Debug and fix Did registrar/resolver
KononovAndrey ee22724
Fix revocation status list issues for CredoTS
KononovAndrey 1de8cc5
Use the new @hiero-did-sdk-js/*
KononovAndrey fb32a3e
Biome fixes
KononovAndrey bef1d1c
Implement HederaLedgerService methods the new hiero-did-sdk using
KononovAndrey d444408
Restore changes
KononovAndrey 5e721b8
Fix issues
KononovAndrey 5dfd681
Added signature on createDid
KononovAndrey 1dc9aad
Implemented updateDid method
KononovAndrey 7d8040e
Working with KMS keys
KononovAndrey 1989c9a
Inject KMS to the ledger service
KononovAndrey d6275c5
Implemented DidRegstrar.Update API
KononovAndrey 0d258b9
Use HCS module with changes awaiter
KononovAndrey 2bdf61a
Clear code
KononovAndrey b275886
Update lib versions
KononovAndrey 2aa5444
Use updated libraries
KononovAndrey 450e5b5
Up used libraries versions
KononovAndrey 37b60b2
Fix PR notes
KononovAndrey e44d0e1
Fix PR notes
KononovAndrey 6e06dd9
Misc. cleanup
AlexanderShenshin 6eb5ae5
Switch to NPM + unit-tests
KononovAndrey 5abb182
Switch to NPM + unit-tests
KononovAndrey cf42473
Switch to NPM + unit-tests
KononovAndrey 3334842
- fix: Switch to NPM + unit-tests
KononovAndrey e5f9528
- fix: add hedera anoncreds registry support to the demo
KononovAndrey 10a7fa1
Fix the github action for hedera e2e tests support
KononovAndrey d78d6bc
Restart github actions
KononovAndrey ebc3591
Restart github actions
KononovAndrey 96e34bd
Set timeout directly to Hedera e2e tests
KononovAndrey c6b344c
Use secrets for HEDERA_OPERATOR_*** env variables
KononovAndrey eff5d30
Update readme
KononovAndrey 05b79d6
Set test timeout for all tests over setup.ts
KononovAndrey 92cc31e
Fix PR review notes
KononovAndrey 3edbec9
Fix PR review notes
KononovAndrey c78e8b0
Fix PR review notes
KononovAndrey 66a5663
Fix PR review notes
KononovAndrey 9c42d21
Sign topic, files, messages with issuerKey
KononovAndrey 532fdd7
Up used libraries
KononovAndrey bd7175d
Up used libraries
KononovAndrey 8a07861
Lint
KononovAndrey f2e95d6
Merge remote-tracking branch 'origin/feature/hedera-anoncreds' into f…
KononovAndrey e6fdd9e
Merge branch 'main' into feature/hedera-anoncreds
AlexanderShenshin bda2582
Misc cleanup before OWF contribution + update tests
AlexanderShenshin ffbb5b4
Update Hiero DID SDK JS dependency + lint/style fixes
AlexanderShenshin 74d9104
Clean up
AlexanderShenshin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Changelog | ||
|
|
||
| ## 0.5.13 | ||
|
|
||
| ### Patch Changes | ||
|
|
||
| - Added Hedera module | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| <p align="center"> | ||
| <br /> | ||
| <img | ||
| alt="Credo Logo" | ||
| src="https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png" | ||
| height="250px" | ||
| /> | ||
| </p> | ||
| <h1 align="center"><b>Credo Hedera Module</b></h1> | ||
| <p align="center"> | ||
| <a | ||
| href="https://raw.githubusercontent.com/openwallet-foundation/credo-ts/main/LICENSE" | ||
| ><img | ||
| alt="License" | ||
| src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" | ||
| /></a> | ||
| <a href="https://www.typescriptlang.org/" | ||
| ><img | ||
| alt="typescript" | ||
| src="https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg" | ||
| /></a> | ||
| <a href="https://www.npmjs.com/package/@credo-ts/hedera" | ||
| ><img | ||
| alt="@credo-ts/hedera version" | ||
| src="https://img.shields.io/npm/v/@credo-ts/hedera" | ||
| /></a> | ||
|
|
||
| </p> | ||
| <br /> | ||
|
|
||
| Credo hedera provides integration of the Hedera network into Credo. See the [Hedera Setup](https://credo.js.org/guides/getting-started/set-up/hedera) for installation instructions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import type { Config } from '@jest/types' | ||
|
|
||
| import base from '../../jest.config.base' | ||
|
|
||
| import packageJson from './package.json' | ||
|
|
||
| const config: Config.InitialOptions = { | ||
| ...base, | ||
| displayName: packageJson.name, | ||
| setupFilesAfterEnv: ['./tests/setup.ts'], | ||
| coveragePathIgnorePatterns: ['../tests'], | ||
| } | ||
|
|
||
| export default config | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| { | ||
| "name": "@credo-ts/hedera", | ||
| "main": "src/index", | ||
| "types": "src/index", | ||
| "version": "0.5.13", | ||
| "files": ["build"], | ||
| "license": "Apache-2.0", | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/hedera", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/openwallet-foundation/credo-ts", | ||
| "directory": "packages/hedera" | ||
| }, | ||
| "scripts": { | ||
| "build": "pnpm run clean && pnpm run compile", | ||
| "clean": "rimraf ./build", | ||
| "compile": "tsc -p tsconfig.build.json", | ||
| "prepublishOnly": "pnpm run build", | ||
| "test": "jest", | ||
| "test:coverage": "jest --coverage", | ||
| "style:check": "biome check --unsafe", | ||
| "style:fix": "biome check --write --unsafe" | ||
| }, | ||
| "dependencies": { | ||
| "@credo-ts/anoncreds": "workspace:*", | ||
| "@credo-ts/core": "workspace:*", | ||
| "@hashgraph/sdk": "^2.72.0", | ||
| "@hiero-did-sdk/anoncreds": "^0.1.3", | ||
| "@hiero-did-sdk/client": "^0.1.3", | ||
| "@hiero-did-sdk/core": "^0.1.3", | ||
| "@hiero-did-sdk/hcs": "^0.1.3", | ||
| "@hiero-did-sdk/publisher-internal": "^0.1.3", | ||
| "@hiero-did-sdk/registrar": "^0.1.3", | ||
| "@hiero-did-sdk/resolver": "^0.1.3" | ||
| }, | ||
| "devDependencies": { | ||
| "@credo-ts/node": "workspace:*", | ||
| "@hyperledger/anoncreds-nodejs": "^0.3.1", | ||
| "rimraf": "^4.4.0", | ||
| "zstd-napi": "^0.0.10" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import { DependencyManager, Module } from '@credo-ts/core' | ||
|
|
||
| import { AgentConfig, Buffer } from '@credo-ts/core' | ||
|
|
||
| import { HederaModuleConfig, HederaModuleConfigOptions } from './HederaModuleConfig' | ||
| import { HederaLedgerService } from './ledger/HederaLedgerService' | ||
|
|
||
| export class HederaModule implements Module { | ||
| public readonly config: HederaModuleConfig | ||
|
|
||
| public constructor(config: HederaModuleConfigOptions) { | ||
| this.config = new HederaModuleConfig(config) | ||
| } | ||
|
|
||
| public register(dependencyManager: DependencyManager) { | ||
| // Warn about experimental module | ||
| dependencyManager | ||
| .resolve(AgentConfig) | ||
| .logger.warn( | ||
| "The '@credo-ts/hedera' module is experimental and could have unexpected breaking changes. When using this module, make sure to use strict versions for all @credo-ts packages." | ||
| ) | ||
|
|
||
| // Register config | ||
| dependencyManager.registerInstance(HederaModuleConfig, this.config) | ||
| dependencyManager.registerSingleton(HederaLedgerService) | ||
|
|
||
| // Hedera module needs Buffer to be available globally | ||
| // If it is not available yet, we overwrite it with the | ||
| // Buffer implementation from Credo | ||
| global.Buffer = global.Buffer || Buffer | ||
AlexanderShenshin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import { HederaAnoncredsRegistryConfiguration } from '@hiero-did-sdk/anoncreds' | ||
|
|
||
| export interface HederaModuleConfigOptions extends HederaAnoncredsRegistryConfiguration {} | ||
|
|
||
| export class HederaModuleConfig { | ||
| public readonly options: HederaModuleConfigOptions | ||
|
|
||
| public constructor(options: HederaModuleConfigOptions) { | ||
| this.options = options | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.