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 setup ocp.context.setFeaturedAppRight(featuredAppRightDetails); // Later, retrieve cached values when needed const batch = ocp.OpenCapTable.capTable.update({ capTableContractId, featuredAppRightContractDetails: ocp.context.requireFeaturedAppRight(), actAs: [issuerParty], }); Copy
const ocp = new OcpClient({ network: 'localnet' }); // Set context once after initial setup ocp.context.setFeaturedAppRight(featuredAppRightDetails); // Later, retrieve cached values when needed const batch = ocp.OpenCapTable.capTable.update({ capTableContractId, featuredAppRightContractDetails: ocp.context.requireFeaturedAppRight(), actAs: [issuerParty], });
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