Open Cap Table Protocol Canton SDK - v0.2.224
    Preparing search index...

    Function getCapTableState

    • Query Canton for the current state of a CapTable.

      Uses getActiveContracts filtered by party to efficiently retrieve only the CapTable contract for the specified issuer.

      Note: In the standard deployment model, each issuer party has exactly one active CapTable contract. If multiple CapTable contracts exist for the same party (which would indicate a configuration issue), this function returns the first one found. The system design ensures this is a 1:1 relationship.

      Parameters

      • client: LedgerJsonApiClient

        LedgerJsonApiClient instance

      • issuerPartyId: string

        Party ID of the issuer

      Returns Promise<CapTableState | null>

      CapTableState with all OCF IDs on-chain, or null if no CapTable exists

      const state = await getCapTableState(client, 'issuer::party123');
      if (state) {
      const stakeholderIds = state.entities.get('stakeholder') ?? new Set();
      console.log(`${stakeholderIds.size} stakeholders on-chain`);
      }