Skip to content

Upgrade Credo from 0.5.19 to 0.6.2#43

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/upgrade-credo-to-0-6-2
Draft

Upgrade Credo from 0.5.19 to 0.6.2#43
Copilot wants to merge 2 commits intomainfrom
copilot/upgrade-credo-to-0-6-2

Conversation

Copy link
Contributor

Copilot AI commented Mar 2, 2026

Upgrades all Credo-related dependencies to 0.6.2 and adapts to breaking API changes in the 0.6.x release line. Also moves from askar-nodejs 0.4.3 (native ffi-napi bindings) to 0.6.0 (koffi-based), resolving Node 24 compilation failures.

Dependency changes (backend/package.json)

  • @credo-ts/core, @credo-ts/node, @credo-ts/askar: 0.5.19 → 0.6.2
  • @openwallet-foundation/askar-nodejs: 0.4.3 → 0.6.0
  • Added @openwallet-foundation/askar-shared: 0.6.0 override to unify the two copies npm would otherwise install (credo-ts/askar peers ^0.4.3, askar-nodejs bundles 0.6.0)

Agent initialization (credoAgent.ts)

Wallet configuration moved from InitConfig.walletConfig into AskarModule.store:

// Before (0.5.x)
new Agent({
  config: { label: '...', walletConfig: { id, key, keyDerivationMethod: KeyDerivationMethod.Argon2IInt, storage } },
  modules: { askar: new AskarModule({ ariesAskar: askar }) },
});

// After (0.6.x)
new Agent({
  dependencies: agentDependencies,
  modules: {
    askar: new AskarModule({
      askar,
      store: { id, key, keyDerivationMethod: 'kdf:argon2i:int', database },
    }),
  },
});
  • KeyType.P256createKey: { type: { kty: 'EC', crv: 'P-256' } } (new KMS API)
  • AskarWalletPostgresStorageConfigAskarPostgresStorageConfig
  • InitConfig, KeyDerivationMethod, WalletStorageConfig imports removed (no longer exported)

SD-JWT VC issuance (employeeCredentialService.ts)

  • Default headerType changed from vc+sd-jwt to dc+sd-jwt in 0.6.2 — explicitly set headerType: 'vc+sd-jwt' for backward compatibility
  • Payload typed as { vct: string } & Record<string, unknown> to satisfy new SdJwtVcPayload constraint

Tests

No test changes required — all 25 existing tests pass as-is since mocks align with the unchanged agent.sdJwtVc.sign() surface.

Original prompt

This section details on the original issue you should resolve

<issue_title>Upgrade Credo from 0.5.19 to 0.6.2 (dependency, API, and storage changes)</issue_title>
<issue_description>## Overview
Upgrade all Credo-related dependencies from version 0.5.19 to 0.6.2. This includes updating @credo-ts/core, @credo-ts/node, @credo-ts/askar, and @openwallet-foundation/askar-nodejs. The upgrade involves breaking changes that may affect agent initialization, storage, APIs, and the SD-JWT VC flow. Follow the official Credo migration guide and release notes for 0.6.x.

Link this issue to the relevant project board for end-to-end visibility.

Definition of Ready (DoR)

  • Clear understanding of breaking changes in Credo 0.6.x
  • Update Assistant reviewed for all migration steps
  • All referenced code locations identified (see below)
  • All project stakeholders notified of potential breaking changes
  • Current system and storage are backed up

Tasks

  • Update backend/package.json dependencies:
    • @credo-ts/core: 0.6.2
    • @credo-ts/node: 0.6.2
    • @credo-ts/askar: 0.6.2
    • @openwallet-foundation/askar-nodejs: latest compatible version
  • Re-run npm install / npm update
  • Update all imports and usage in backend/src/agent/credoAgent.ts to reflect API changes
    • e.g., Agent initialization, storage configuration, any changed or removed APIs
    • File reference: backend/src/agent/credoAgent.ts
  • Update issuance flow in backend/src/services/employeeCredentialService.ts for SD-JWT VC as needed
    • File reference: backend/src/services/employeeCredentialService.ts
  • Update/fix tests and mocks if APIs or interfaces have changed
    • Directory reference: backend/src/__tests__/
  • If storage (wallet) migration is required (see migration guide), apply accordingly
  • Update documentation as needed for environment or configuration changes
  • Regenerate package-lock.json

Definition of Done (DoD)

  • All package references updated to Credo 0.6.2
  • All breaking API, storage, or config changes resolved and tested
  • Existing credential issuing and verification flows work as before (manual or automated test)
  • npm run build and npm test both succeed with 0.6.2
  • All tests pass or are updated for 0.6.x
  • No deprecated modules (e.g. Indy SDK) referenced
  • Documentation is up to date

Code references


Created by Paula (bots branch instructions) to fulfill [AC-0013].</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Update @credo-ts/core, @credo-ts/node, @credo-ts/askar to 0.6.2
- Update @openwallet-foundation/askar-nodejs to 0.6.0
- Migrate Agent init: wallet config moved from InitConfig to AskarModule.store
- Replace KeyDerivationMethod enum with string literal 'kdf:argon2i:int'
- Replace KeyType.P256 with new KMS createKey API { kty: 'EC', crv: 'P-256' }
- Replace AskarWalletPostgresStorageConfig with AskarPostgresStorageConfig
- Replace ariesAskar with askar in AskarModule constructor
- Explicitly set headerType: 'vc+sd-jwt' in SD-JWT VC signing (default changed to dc+sd-jwt)
- Type SD-JWT payload as { vct: string } & Record<string, unknown>
- Add @openwallet-foundation/askar-shared override to resolve type conflicts
- Regenerate package-lock.json

Co-authored-by: samuelmr <2461240+samuelmr@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade Credo from 0.5.19 to 0.6.2 Upgrade Credo from 0.5.19 to 0.6.2 Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade Credo from 0.5.19 to 0.6.2 (dependency, API, and storage changes)

2 participants