Skip to content

Reference

issuerAuthorization.authorize — OCP Factory AuthorizeIssuer

ocp.OpenCapTable.issuerAuthorization.authorize exercises Fairmint.OpenCapTable.OcpFactory.AuthorizeIssuer to mint an IssuerAuthorization contract keyed to issuer party IDs.

authorizeIssuer walks the Canton JSON API ledger, targeting the OCP Factory (AuthorizeIssuer choice). You provide the issuer party to whitelist; optionally override factory templateId/contractId for staging overlays. Canton responses must expose a CreatedTreeEvent for IssuerAuthorization—otherwise OcpContractError (RESULT_NOT_FOUND) halts enrichment.

Returned payload extends DisclosedContract (issuerAuthorizationContractId, blobs, synchronizerId, Canton transactionTree) enabling downstream issuer.buildCreate.


Import and receiver

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

const auth = await ocp.OpenCapTable.issuerAuthorization.authorize({
  issuer: toPartyId('issuer::staging'),
});

console.log(auth.contractId); // issuerAuthorizationContractId usable for disclosures
console.log(auth.updateId);

Parameters

FieldRequirementNotes
issuerRequired Canton party (string)Recipient you plan to CreateCapTable.
factoryContractId / factoryTemplateIdOptional pairMust accompany each other — otherwise OcpValidationError. Omit to default from factoryContractIdData keyed by client.getNetwork() (staging vs prod overlays). Unsupported network ⇒ OcpValidationError (INVALID_FORMAT).

Returns

Promise<AuthorizeIssuerResult> — DisclosedContract (issuerAuthorizationContractId + createdEventBlob) plus Canton transactionTree. Use contractId / createdEventBlob / templateId** for **IssuerAuthorization** disclosures powering **issuer.buildCreate`.

Throws OcpContractError if IssuerAuthorization creation event missing (AuthorizeIssuer success but ledger introspection mismatched expectations).


Auth & Canton requirements

Submission uses Canton credentials attached to OcpClient.ledger; ensure factory admins authorize AuthorizeIssuer.



Source