Context for OCP operations that can be cached and reused.
Store commonly used contract details to avoid passing them repeatedly.
const ocp = new OcpClient({ network: 'localnet' });// Set context once after initial setupocp.context.setFeaturedAppRight(featuredAppRightDetails);// Later, retrieve cached values when neededconst batch = ocp.OpenCapTable.capTable.update({ capTableContractId: ocp.context.requireCapTableContractId(), featuredAppRightContractDetails: ocp.context.requireFeaturedAppRight(), actAs: [ocp.context.requireIssuerParty()],}); Copy
const ocp = new OcpClient({ network: 'localnet' });// Set context once after initial setupocp.context.setFeaturedAppRight(featuredAppRightDetails);// Later, retrieve cached values when neededconst batch = ocp.OpenCapTable.capTable.update({ capTableContractId: ocp.context.requireCapTableContractId(), featuredAppRightContractDetails: ocp.context.requireFeaturedAppRight(), actAs: [ocp.context.requireIssuerParty()],});
The cached cap table contract ID
The cached FeaturedAppRight disclosed contract details
The cached issuer party ID
Context for OCP operations that can be cached and reused.
Store commonly used contract details to avoid passing them repeatedly.
Example