Skip to content

Reference

Stakeholder relationship change — get

Load OCF CE_STAKEHOLDER_RELATIONSHIP from Canton by contract id via ocp.OpenCapTable.stakeholderRelationshipChangeEvent.get.

This page documents the read path for Stakeholder relationship change as exposed on OcpClient under OpenCapTable.stakeholderRelationshipChangeEvent. Use it to hydrate dashboards, reconciliation jobs, or tests from the canonical on-chain OCF record.

Import and receiver

  • Import: OcpClient, toContractId from @open-captable-protocol/canton.
  • Receiver: ocp.OpenCapTable.stakeholderRelationshipChangeEvent.get.

Minimal example

import { OcpClient, toContractId } from '@open-captable-protocol/canton';

const result = await ocp.OpenCapTable.stakeholderRelationshipChangeEvent.get({
  contractId: toContractId('STAKEHOLDERRELATIONSHIPCHANGEEVENT_CONTRACT_ID'),
  readAs: optionalObserverParties,
});

const { data, contractId } = result;
// data.object_type === 'CE_STAKEHOLDER_RELATIONSHIP';

Parameters

  • contractId (required) — Canton contract identifier for this transaction or stakeholder event.
  • readAs (optional) — Additional parties whose ledger visibility should be merged for resolution when the ledger client defaults are not enough.

Returns

A ContractResult with data (OCF payload including object_type: 'CE_STAKEHOLDER_RELATIONSHIP') and contractId echoing the queried handle.

Errors

Malformed payloads or mismatched templates surface as OcpParseError, OcpContractError, or OcpValidationError from the underlying reader (singleContractRead / ledger). Missing contracts follow the Canton client’s not-found semantics (often surfaced as ledger errors).

Auth and disclosure

Reads use the ledger client passed into OcpClient (JWT / connection auth). No write authorization is exercised. Disclosure for stakeholders may still require careful readAs on multi-party windows.

Source (SDK)