Skip to content

Anchorage EA: Replace clientReferenceId with packageId as primary identifier#4680

Merged
mohamed-mehany merged 3 commits intomainfrom
anchorage-update-endpoint
Feb 27, 2026
Merged

Anchorage EA: Replace clientReferenceId with packageId as primary identifier#4680
mohamed-mehany merged 3 commits intomainfrom
anchorage-update-endpoint

Conversation

@mohamed-mehany
Copy link
Collaborator

@mohamed-mehany mohamed-mehany commented Feb 27, 2026

Closes OPDATA-6182

Description

Replace clientReferenceId with packageId as the required identifier for the Anchorage collateral management packages endpoint. packageId is the immutable primary key for packages, whereas clientReferenceId can change and break feeds. This change is required for the Kamino Lend / Pantera SOL POR deployment (OPDATA-6038).
This is a breaking change for the packages endpoint input parameters. All existing feeds using this endpoint are dead or not yet released, so there is no production impact.

Background

Driven by OPDATA-6038 (Kamino Lend / Pantera SOL POR deployment) and OPDATA-6182 (EA config update). The Anchorage API returns packageId on each package object, but the EA was only using clientReferenceId for filtering. Per product team guidance, clientReferenceId is unreliable as it can change, so packageId is now the sole required identifier.

Changes

  • Replace clientReferenceId input parameter with packageId (required) in the packages endpoint
  • Add packageId field to the PackageResponse interface in the transport layer
  • Update client-side filtering logic to match packages by packageId instead of clientReferenceId
  • Update integration test fixtures with packageId field and test requests to use packageId
  • Regenerate test snapshots

Steps to Test

  1. Set env vars
  2. Start the adapter locally
  3. Send a request to the packages endpoint:
    {
      "endpoint": "packages",
      "packageId": "1c1dd6b2899660900088",
      "assetType": "SOL"
    }
  4. Verify the response returns the correct SOL quantity for the Kamino/Pantera package

Quality Assurance

  • If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant infra-k8s configuration file.
  • If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant adapter-secrets configuration file.
  • If a new adapter was made, or a new endpoint was added, update the test-payload.json file with relevant requests.
  • The branch naming follows git flow (feature/x, chore/x, release/x, hotfix/x, fix/x) or is created from Jira.
  • This is related to a maximum of one Jira story or GitHub issue.
  • Types are safe (avoid TypeScript/TSLint features like any and disable, instead use more specific types).
  • All code changes have 100% unit and integration test coverage. If testing is not applicable or too difficult to justify doing, the reasoning should be documented explicitly in the PR.

@changeset-bot
Copy link

changeset-bot bot commented Feb 27, 2026

🦋 Changeset detected

Latest commit: 3a69b15

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@chainlink/anchorage-adapter Major
@chainlink/multi-address-list-adapter Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mohamed-mehany mohamed-mehany marked this pull request as ready for review February 27, 2026 13:25
@mohamed-mehany mohamed-mehany merged commit a977625 into main Feb 27, 2026
15 of 16 checks passed
@mohamed-mehany mohamed-mehany deleted the anchorage-update-endpoint branch February 27, 2026 14:34
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.

2 participants