/** * Developer revenue-share enrollment state — ADR-317, Phase 0. * * Stores an opaque enrollment token issued by the funnel.ruv.io backend * after the user completes browser-side KYC + Stripe Connect. The client * never introspects the token; it just includes it in attribution events * so the backend can credit the correct payout account. * * Consent for the `rev-share-payout` domain is a PRECONDITION for * enrollment (see ADR-317 §1). Consent alone does not mean earning — * an enrollment token is also required, and KYC can fail after consent * is granted for reasons outside the user's control. Callers should * check both when deciding whether to enrich attribution. */ import type { PayoutEnrollment, PayoutEnrollmentPolicyVersion } from './types.js'; /** Bump when the payout policy changes materially (e.g., 50/50 → other split). */ export declare const PAYOUT_POLICY_VERSION: PayoutEnrollmentPolicyVersion; export declare function getEnrollment(): PayoutEnrollment | null; /** * Whether attribution events should be enriched with the user's enrollment * token. True only when BOTH consent is granted AND a verified token exists — * either alone means "not yet earning." */ export declare function isEarningEligible(): boolean; /** Opaque token safe to include in attribution events. Null when not eligible. */ export declare function getAttributionToken(): string | null; /** * Record a successful enrollment (called by the CLI subcommand after the * browser-side flow returns via device-code callback). Never called from * hot paths — this is a rare, user-initiated write. */ export declare function recordEnrollment(rec: Omit): PayoutEnrollment; /** * Delete local enrollment state. Called by `ruflo funnel unenroll`. The * server-side revoke is separate — this only removes the local token so * subsequent attribution events stop being enriched. Idempotent — deleting * a missing enrollment is a no-op success. */ export declare function deleteEnrollment(): boolean; //# sourceMappingURL=payout.d.ts.map