Skip to content

Commit

Permalink
refactor: add dynamic interface for hooks (#13)
Browse files Browse the repository at this point in the history
* feat: add credentials and proofs modules with dedicated functions

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>

* chore: upgrade aries-framework packages to 0.4.2

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>

* refactor: remove isWalletImportable method

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>

* fix: provider import in proof module

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>

* fix: add agent param in all the methods

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>

* feat: add basic message and notifications module

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>

* docs: add all modules usage

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>

* refactor: imports of all modules

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>

* docs: add link to readme

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>

* fix: doc link

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>

* refactor: add dynamic interface for hooks

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>

---------

Signed-off-by: Sai Ranjit Tummalapalli <sairanjit.tummalapalli@ayanworks.com>
  • Loading branch information
sairanjit authored Oct 17, 2023
1 parent 99a79ba commit 1e78829
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions packages/ssi/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ import {
JsonLdCredentialFormatService,
ProofsModule,
V2ProofProtocol,
ConnectionsModule
ConnectionsModule,
Agent
} from '@aries-framework/core'
import {
GetCredentialsForRequestReturn,
Expand Down Expand Up @@ -124,7 +125,8 @@ export {
JsonLdCredentialFormatService,
ProofsModule,
V2ProofProtocol,
ConnectionsModule
ConnectionsModule,
Agent
}
// Anoncreds
export {
Expand Down
5 changes: 3 additions & 2 deletions packages/ssi/src/providers/AgentProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import type { Agent } from '@aries-framework/core'
import type { AgentModulesInput } from '@aries-framework/core/build/agent/AgentModules'

import AgentProvider, { useAgent } from '@aries-framework/react-hooks'

const useAdeyaAgent: () => {
const useAdeyaAgent: <AgentModules extends AgentModulesInput = AgentModulesInput>() => {
loading: boolean
agent: Agent
agent: Agent<AgentModules>
} = useAgent

export { useAdeyaAgent, AgentProvider as AdeyaAgentProvider }

0 comments on commit 1e78829

Please sign in to comment.