This page documents the read path for Warrant exercise as exposed on OcpClient under OpenCapTable.warrantExercise. Use it to hydrate dashboards, reconciliation jobs, or tests from the canonical on-chain OCF record.
Import and receiver
- Import:
OcpClient,toContractIdfrom@open-captable-protocol/canton. - Receiver:
ocp.OpenCapTable.warrantExercise.get.
Minimal example
import { OcpClient, toContractId } from '@open-captable-protocol/canton';
const result = await ocp.OpenCapTable.warrantExercise.get({
contractId: toContractId('WARRANTEXERCISE_CONTRACT_ID'),
readAs: optionalObserverParties,
});
const { data, contractId } = result;
// data.object_type === 'TX_WARRANT_EXERCISE';
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: 'TX_WARRANT_EXERCISE') 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.