Skip to content
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

Restructure to handle multiple VcDataModels #424

Open
nitro-neal opened this issue Feb 22, 2024 · 0 comments
Open

Restructure to handle multiple VcDataModels #424

nitro-neal opened this issue Feb 22, 2024 · 0 comments
Assignees
Labels
package: credentials @web5/credentials package w3c-vc-dm-2.0 W3C Verifiable Credential Data Model 2.0

Comments

@nitro-neal
Copy link
Contributor

nitro-neal commented Feb 22, 2024

Restructure to handle VcDataModels

class W3CVerifiableCredentialV1 {
    static create() {
        // Implementation for creating a V1 verifiable credential
    }

    signJwt() {
        // Implementation for signing a JWT for a V1 verifiable credential
    }

    static verify() {
        // Implementation for verifying a V1 verifiable credential
    }
}

class W3CVerifiableCredentialV2 {
    static create() {
        // Implementation for creating a V2 verifiable credential
    }

    signJwt() {
        // Implementation for signing a JWT for a V2 verifiable credential
    }

    // Only 2.0 supports sdJwt
    signSdJwt() {
        // Implementation for signing a sdJwt for a V2 verifiable credential
    }

    static verify() {
        // Implementation for verifying a V2 verifiable credential
    }
}

// Type alias 'VerifiableCredential' referring to 'W3CVerifiableCredentialV2'
type VerifiableCredential = W3CVerifiableCredentialV2;
@nitro-neal nitro-neal added the w3c-vc-dm-2.0 W3C Verifiable Credential Data Model 2.0 label Feb 22, 2024
@nitro-neal nitro-neal self-assigned this Feb 22, 2024
@frankhinek frankhinek added the package: credentials @web5/credentials package label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: credentials @web5/credentials package w3c-vc-dm-2.0 W3C Verifiable Credential Data Model 2.0
Projects
Status: No status
Development

No branches or pull requests

2 participants