walt-id / waltid-walletkit

Toolkit for SSI and NFT/SBT wallets
https://docs.walt.id
Apache License 2.0
31 stars 25 forks source link

Missing mandatory parameters in swagger #135

Closed oriana13 closed 1 year ago

oriana13 commented 1 year ago

Hello waltid team! I am looking to have a signed participant vc returned by the wallet. I understand it's the /api/wallet/issuance/start route that can do this. Only I don't know what parameter to give it to make it work... can you help me please? @mikeplotean @severinstampler

severinstampler commented 1 year ago

Hi @oriana13 The api endpoint you're referring to, is used by the web wallet to trigger an issuance flow with an external issuer, following the OIDC for credential issuance protocol. If you want to directly issue a signed credential, you could look into the issuer api of the walletkit. You find a documentation of it here: https://docs.walt.id/v/web-wallet/getting-started/rest-apis/credential-issuance Let me know if this helps, or if I misunderstood your use case. Thanks. Best regards.

waltkb commented 1 year ago

Indeed, to issue a credential you call the Wallet Kit with:

POST /issuer-api/{tenantId}/credentials/issuance/request?isPreAuthorized=true&walletId=$walletId, e.g. POST /issuer-api/default/credentials/issuance/request?isPreAuthorized=true&walletId=waltid (or &walletId=walt.id, depends on version)

Body:

{
    "credentials": [
        {
        "credentialData": {
            "my data": "..."
        },
        "type": "string"
        }
    ]
}

e.g.:

{
    "credentials": [
        {
        "credentialData": {
            "credentialSubject": {
                "currentAddress":["1 Boulevard de la Liberté, 59800 Lille"],"dateOfBirth":"1993-04-08","familyName":"DOE","firstName":"Jane","gender":"FEMALE","id":"did:ebsi:2AEMAqXWKYMu1JHPAgGcga4dxu7ThgfgN95VyJBJGZbSJUtp","nameAndFamilyNameAtBirth":"Jane DOE","personalIdentifier":"0904008084H","placeOfBirth":"LILLE, FRANCE"}
        },
        "type": "VerifiableId"
        }
    ]
}