import { getScope } from '../config/scopes'; // Membership constants, shared by the build-time enumerator and the browser client. // // Kept in their own module rather than in members.ts so the client bundle does not also ship // the seed DID list. /** The commons DID that member records point at via their `community` field. * * A DID, never a handle: it is portable and we hold its rotation keys, so it survives the * community moving domains. All three sites (.nl/.be/.eu) share this one backlink target. */ export const COMMUNITY_DID = 'did:plc:rldh4m4qtswi7tq4rp23r27q'; /** The membership record type. * * `eu.atcommons.member`, on a domain the project owns outright — NOT `nl.atproto.member`, whose * authority derived from the borrowed atproto.nl. NSIDs get written into other people's * repositories as `$type` and stay there forever; a website can be moved in a day, a namespace * cannot. Schema published at * at://did:plc:aqrkn66k2alnwxfrhstp3unq/com.atproto.lexicon.schema/eu.atcommons.member * * The legacy `nl.atproto.member` collection is deliberately NOT enumerated anywhere: only two * records were ever written and both holders were told directly, so there is no migration path * to maintain. */ export const MEMBER_COLLECTION = 'eu.atcommons.member'; /** Countries a join from this build asserts, ISO 3166-1 alpha-2 lowercase. * * Comes from the build's scope. Empty on `.eu`, which must NOT auto-join — an aggregate view has * no country of its own, so it asks instead of guessing. Callers must treat empty as * "do not write a record", never as "write an empty array": `countries` has minLength 1. */ export const SITE_COUNTRIES: readonly string[] = getScope( import.meta.env.PUBLIC_SITE_SCOPE, ).joinCountries; /** Whether this build may write a member record at all. False on the aggregate. */ export const CAN_AUTO_JOIN = SITE_COUNTRIES.length > 0;