-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(indy-sdk): add indy-sdk package (#1200)
Co-authored-by: Karim Stekelenburg <[email protected]> Signed-off-by: Timo Glastra <[email protected]>
- Loading branch information
1 parent
da7abde
commit 9933b35
Showing
83 changed files
with
5,940 additions
and
557 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 was deleted.
Oops, something went wrong.
47 changes: 0 additions & 47 deletions
47
packages/anoncreds/src/services/AnonCredsRegistryOptions.ts
This file was deleted.
Oops, something went wrong.
This file contains 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 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
48 changes: 48 additions & 0 deletions
48
packages/anoncreds/src/services/registry/AnonCredsRegistry.ts
This file contains 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,48 @@ | ||
import type { | ||
GetCredentialDefinitionReturn, | ||
RegisterCredentialDefinitionOptions, | ||
RegisterCredentialDefinitionReturn, | ||
} from './CredentialDefinitionOptions' | ||
import type { GetRevocationListReturn } from './RevocationListOptions' | ||
import type { GetRevocationRegistryDefinitionReturn } from './RevocationRegistryDefinitionOptions' | ||
import type { GetSchemaReturn, RegisterSchemaOptions, RegisterSchemaReturn } from './SchemaOptions' | ||
import type { AgentContext } from '@aries-framework/core' | ||
|
||
// This service can be registered multiple times in a single AFJ instance. | ||
export interface AnonCredsRegistry { | ||
getSchema(agentContext: AgentContext, schemaId: string): Promise<GetSchemaReturn> | ||
registerSchema(agentContext: AgentContext, options: RegisterSchemaOptions): Promise<RegisterSchemaReturn> | ||
|
||
getCredentialDefinition( | ||
agentContext: AgentContext, | ||
credentialDefinitionId: string | ||
): Promise<GetCredentialDefinitionReturn> | ||
registerCredentialDefinition( | ||
agentContext: AgentContext, | ||
options: RegisterCredentialDefinitionOptions | ||
): Promise<RegisterCredentialDefinitionReturn> | ||
|
||
getRevocationRegistryDefinition( | ||
agentContext: AgentContext, | ||
revocationRegistryDefinitionId: string | ||
): Promise<GetRevocationRegistryDefinitionReturn> | ||
|
||
// TODO: issuance of revocable credentials | ||
// registerRevocationRegistryDefinition( | ||
// agentContext: AgentContext, | ||
// options: RegisterRevocationRegistryDefinitionOptions | ||
// ): Promise<RegisterRevocationRegistryDefinitionReturn> | ||
|
||
// TODO: The name of this data model is still tbd. | ||
getRevocationList( | ||
agentContext: AgentContext, | ||
revocationRegistryId: string, | ||
timestamp: number | ||
): Promise<GetRevocationListReturn> | ||
|
||
// TODO: issuance of revocable credentials | ||
// registerRevocationList( | ||
// agentContext: AgentContext, | ||
// options: RegisterRevocationListOptions | ||
// ): Promise<RegisterRevocationListReturn> | ||
} |
45 changes: 45 additions & 0 deletions
45
packages/anoncreds/src/services/registry/CredentialDefinitionOptions.ts
This file contains 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 @@ | ||
import type { AnonCredsCredentialDefinition } from '../../models/registry' | ||
import type { | ||
AnonCredsResolutionMetadata, | ||
Extensible, | ||
AnonCredsOperationStateFailed, | ||
AnonCredsOperationStateFinished, | ||
AnonCredsOperationState, | ||
} from './base' | ||
|
||
export interface GetCredentialDefinitionReturn { | ||
credentialDefinition: AnonCredsCredentialDefinition | null | ||
credentialDefinitionId: string | ||
resolutionMetadata: AnonCredsResolutionMetadata | ||
credentialDefinitionMetadata: Extensible | ||
} | ||
|
||
export interface RegisterCredentialDefinitionOptions { | ||
credentialDefinition: AnonCredsCredentialDefinition | ||
options: Extensible | ||
} | ||
|
||
export interface RegisterCredentialDefinitionReturnStateFailed extends AnonCredsOperationStateFailed { | ||
credentialDefinition: AnonCredsCredentialDefinition | ||
credentialDefinitionId?: string | ||
} | ||
|
||
export interface RegisterCredentialDefinitionReturnStateFinished extends AnonCredsOperationStateFinished { | ||
credentialDefinition: AnonCredsCredentialDefinition | ||
credentialDefinitionId?: string | ||
} | ||
|
||
export interface RegisterCredentialDefinitionReturnState extends AnonCredsOperationState { | ||
credentialDefinition: AnonCredsCredentialDefinition | ||
credentialDefinitionId?: string | ||
} | ||
|
||
export interface RegisterCredentialDefinitionReturn { | ||
jobId?: string | ||
credentialDefinitionState: | ||
| RegisterCredentialDefinitionReturnState | ||
| RegisterCredentialDefinitionReturnStateFinished | ||
| RegisterCredentialDefinitionReturnStateFailed | ||
credentialDefinitionMetadata: Extensible | ||
registrationMetadata: AnonCredsResolutionMetadata | ||
} |
Oops, something went wrong.