@orangecheck/me-client 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,3 +1,5 @@
1
+ import { E as EventSubtype, B as BillableEvent, I as IntegratorPriceConfig, S as SessionPolicy, a as Session, T as TelemetryEvent, b as SignInOptions, P as PaymentAuthorizeOptions, c as PaymentResult, V as ValidationResult, f as fromTemplate, g as getArchetypeTemplate, A as ArchetypeTemplate, F as Federation } from './integrator-m712Srxt.mjs';
2
+ export { d as ALL_EVENT_SUBTYPES, e as ARCHETYPE_TEMPLATES, h as AttestTier, C as ClassASubtype, i as ClassBSubtype, j as ClassCSubtype, k as ComputedFees, l as EVENT_SUBTYPES, m as EventClass, n as EventSubtypeMetadata, o as FederationStatus, p as IntegratorArchetype, q as IntegratorEventConfig, M as MIN_INTEGRATOR_PRICE_SATS, r as PLATFORM_FEE_POLICY, s as SigningMethod, t as SiteFeeShape, W as WebhookHeaders, u as WebhookPayload, v as computeFees, w as subtypesForClass, x as validateIntegratorConfig } from './integrator-m712Srxt.mjs';
1
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
4
  import * as React from 'react';
3
5
 
@@ -75,155 +77,6 @@ declare const webhook: {
75
77
  fetchJwks: typeof fetchJwksForce;
76
78
  };
77
79
 
78
- declare const PLATFORM_FEE_POLICY: {
79
- readonly pct: 0.2;
80
- readonly min_floor_sats: 1;
81
- readonly ratified: "2026-04-30";
82
- };
83
- declare const MIN_INTEGRATOR_PRICE_SATS = 5;
84
- type EventClass = 'A' | 'B' | 'C';
85
- type ClassASubtype = 'account_creation' | 'account_recovery' | 'attest_bond_increased' | 'payment_method_connected' | 'agent_delegation_issued' | 'recovery_method_updated';
86
- type ClassBSubtype = 'payment_authorization' | 'scoped_action_authorization' | 'attest_verification_at_gate' | 'stamp_signing' | 'pledge_resolution';
87
- type ClassCSubtype = 'session_creation';
88
- type EventSubtype = ClassASubtype | ClassBSubtype | ClassCSubtype;
89
- type AttestTier = 'anonymous' | 'bonded';
90
- type SiteFeeShape = {
91
- kind: 'fixed_sats';
92
- sats: number;
93
- } | {
94
- kind: 'percent_of_amount';
95
- pct: number;
96
- };
97
- interface IntegratorEventConfig {
98
- enabled: boolean;
99
- site_pays: SiteFeeShape;
100
- user_share_pct: number;
101
- }
102
- interface IntegratorPriceConfig {
103
- project_key: string;
104
- display_name: string;
105
- domain: string;
106
- updated_at: string;
107
- events: Partial<Record<EventSubtype, IntegratorEventConfig>>;
108
- }
109
- interface ComputedFees {
110
- gross_fee_sats: number;
111
- platform_fee_sats: number;
112
- user_earned_sats: number;
113
- site_rebate_sats: number;
114
- }
115
- declare function computeFees(cfg: IntegratorEventConfig, payment_amount_sats?: number): ComputedFees;
116
- interface ValidationResult {
117
- ok: boolean;
118
- errors: {
119
- subtype?: EventSubtype;
120
- message: string;
121
- }[];
122
- }
123
- declare function validateIntegratorConfig(cfg: IntegratorPriceConfig): ValidationResult;
124
- interface BillableEvent {
125
- id: string;
126
- occurred_at: string;
127
- class: EventClass;
128
- subtype: EventSubtype;
129
- site: {
130
- domain: string;
131
- display_name: string;
132
- };
133
- gross_fee_sats: number;
134
- platform_fee_sats: number;
135
- user_earned_sats: number;
136
- site_rebate_sats: number;
137
- verify_url: string;
138
- is_agent?: boolean;
139
- }
140
- interface WebhookPayload extends BillableEvent {
141
- kind: 'oc-billable-event';
142
- sub: string;
143
- scopes?: Partial<Record<'bitcoin_address' | 'email' | 'attest_tier' | 'display_name' | 'cross_integrator_event_count' | 'cross_integrator_human_event_count' | 'trust_attestation_count' | 'trust_attestations_bundle', string>>;
144
- }
145
- interface WebhookHeaders {
146
- 'OC-Signature': string;
147
- 'OC-Key-Id': string;
148
- 'OC-Envelope-Id': string;
149
- 'OC-Subtype': EventSubtype;
150
- 'OC-Class': EventClass;
151
- 'OC-Delivery-Attempt': string;
152
- }
153
- interface SessionPolicy {
154
- duration_seconds: number;
155
- refresh: 'sliding' | 'rolling' | 'none';
156
- sensitive_actions?: 're-auth' | 'none';
157
- }
158
- interface Session {
159
- id: string;
160
- identity: string;
161
- opens_at: string;
162
- expires_at: string;
163
- policy: SessionPolicy;
164
- scope: string[];
165
- }
166
- interface SignInOptions {
167
- scope: string[];
168
- sessionPolicy?: Partial<SessionPolicy>;
169
- returnTo?: string;
170
- }
171
- interface PaymentAuthorizeOptions {
172
- identity: string;
173
- amount_sats?: number;
174
- usd_cents?: number;
175
- description: string;
176
- external_ref?: string;
177
- }
178
- interface PaymentResult {
179
- id: string;
180
- status: 'authorized' | 'failed' | 'cancelled';
181
- sats_charged?: number;
182
- user_envelope_id?: string;
183
- verify_url?: string;
184
- }
185
- interface TelemetryEvent {
186
- code: 'session.intra_signin' | 'session.token_refresh' | 'session.navigation' | 'auth.signin_failed' | 'auth.signin_cancelled' | 'auth.signin_rejected' | 'verify.passive_check';
187
- timestamp: string;
188
- session_id?: string;
189
- }
190
- type FederationStatus = 'recruiting' | 'forming' | 'binding' | 'live';
191
- interface Federation {
192
- slug: string;
193
- name: string;
194
- status: FederationStatus;
195
- threshold: string;
196
- target_guardian_count: number;
197
- invite: string | null;
198
- charter_hash: string | null;
199
- last_attestation_at: string | null;
200
- geography_hint: string;
201
- geography_requirements?: string;
202
- charter_status?: string;
203
- ceremony_window?: string;
204
- why_this_one?: string;
205
- apply_cta?: string;
206
- apply_href?: string;
207
- }
208
- type SigningMethod = 'fedimint_threshold' | 'fedimint_client' | 'bip322';
209
-
210
- type IntegratorArchetype = 'saas-paywall' | 'marketplace' | 'content-platform' | 'gaming' | 'agent-only';
211
- interface ProjectIdentity {
212
- project_key: string;
213
- domain: string;
214
- display_name: string;
215
- }
216
- interface ArchetypeTemplate {
217
- id: IntegratorArchetype;
218
- label: string;
219
- summary: string;
220
- examples: readonly string[];
221
- events: Partial<Record<EventSubtype, IntegratorEventConfig>>;
222
- }
223
- declare const ARCHETYPE_TEMPLATES: readonly ArchetypeTemplate[];
224
- declare function fromTemplate(useCase: IntegratorArchetype, identity: ProjectIdentity): IntegratorPriceConfig;
225
- declare function getArchetypeTemplate(id: IntegratorArchetype): ArchetypeTemplate;
226
-
227
80
  interface FireEventOptions {
228
81
  project_key: string;
229
82
  subtype: EventSubtype;
@@ -354,19 +207,6 @@ interface WithRateLimitRetryOptions {
354
207
  }
355
208
  declare function withRateLimitRetry<T>(fn: () => Promise<T>, opts?: WithRateLimitRetryOptions): Promise<T>;
356
209
 
357
- interface EventSubtypeMetadata {
358
- id: EventSubtype;
359
- class: EventClass;
360
- label: string;
361
- fires_when: string;
362
- example: string;
363
- common_use_cases: readonly string[];
364
- typical_price_hint: string;
365
- }
366
- declare const EVENT_SUBTYPES: Record<EventSubtype, EventSubtypeMetadata>;
367
- declare function subtypesForClass(cls: EventClass): EventSubtypeMetadata[];
368
- declare const ALL_EVENT_SUBTYPES: readonly EventSubtypeMetadata[];
369
-
370
210
  declare const oc: {
371
211
  session: {
372
212
  create: (opts: SignInOptions) => Promise<Session>;
@@ -407,4 +247,4 @@ declare const oc: {
407
247
  };
408
248
  };
409
249
 
410
- export { ALL_EVENT_SUBTYPES, ARCHETYPE_TEMPLATES, type ArchetypeTemplate, type AttestTier, type BillableEvent, type ClassASubtype, type ClassBSubtype, type ClassCSubtype, type ComputedFees, EVENT_SUBTYPES, type EventClass, type EventSubtype, type EventSubtypeMetadata, type FamilyScopesOptions, type FamilyScopesResult, type FamilyVerb, type Federation, type FederationStatus, type FireEventOptions, type GrantedOptions, type GrantedResult, type IntegratorArchetype, type IntegratorEventConfig, type IntegratorPriceConfig, MIN_INTEGRATOR_PRICE_SATS, MeClientError, type OcPublicJwk, OcSignInButton, type OcSignInButtonProps, PLATFORM_FEE_POLICY, type PaymentAuthorizeOptions, type PaymentResult, type RequestOptions, type Scope, type Session, type SessionPolicy, type SignInOptions, type SigningMethod, type SiteFeeShape, type TelemetryEvent, type TrustAttestationCount, type ValidationResult, type VerifyEventResult, type VerifyOptions, type VerifyResult, type WebhookHeaders, type WebhookPayload, type WithRateLimitRetryOptions, clearBearerToken, computeFees, config, fromTemplate as configFromTemplate, event, family, federations, getArchetypeTemplate, getBearerToken, getOrigin, oc, onTelemetry, parseTrustAttestationCount, payment, scope, session, setBearerToken, setOrigin, subtypesForClass, validateIntegratorConfig, webhook, withRateLimitRetry };
250
+ export { ArchetypeTemplate, BillableEvent, EventSubtype, type FamilyScopesOptions, type FamilyScopesResult, type FamilyVerb, Federation, type FireEventOptions, type GrantedOptions, type GrantedResult, IntegratorPriceConfig, MeClientError, type OcPublicJwk, OcSignInButton, type OcSignInButtonProps, PaymentAuthorizeOptions, PaymentResult, type RequestOptions, type Scope, Session, SessionPolicy, SignInOptions, TelemetryEvent, type TrustAttestationCount, ValidationResult, type VerifyEventResult, type VerifyOptions, type VerifyResult, type WithRateLimitRetryOptions, clearBearerToken, config, fromTemplate as configFromTemplate, event, family, federations, getArchetypeTemplate, getBearerToken, getOrigin, oc, onTelemetry, parseTrustAttestationCount, payment, scope, session, setBearerToken, setOrigin, webhook, withRateLimitRetry };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { E as EventSubtype, B as BillableEvent, I as IntegratorPriceConfig, S as SessionPolicy, a as Session, T as TelemetryEvent, b as SignInOptions, P as PaymentAuthorizeOptions, c as PaymentResult, V as ValidationResult, f as fromTemplate, g as getArchetypeTemplate, A as ArchetypeTemplate, F as Federation } from './integrator-m712Srxt.js';
2
+ export { d as ALL_EVENT_SUBTYPES, e as ARCHETYPE_TEMPLATES, h as AttestTier, C as ClassASubtype, i as ClassBSubtype, j as ClassCSubtype, k as ComputedFees, l as EVENT_SUBTYPES, m as EventClass, n as EventSubtypeMetadata, o as FederationStatus, p as IntegratorArchetype, q as IntegratorEventConfig, M as MIN_INTEGRATOR_PRICE_SATS, r as PLATFORM_FEE_POLICY, s as SigningMethod, t as SiteFeeShape, W as WebhookHeaders, u as WebhookPayload, v as computeFees, w as subtypesForClass, x as validateIntegratorConfig } from './integrator-m712Srxt.js';
1
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
4
  import * as React from 'react';
3
5
 
@@ -75,155 +77,6 @@ declare const webhook: {
75
77
  fetchJwks: typeof fetchJwksForce;
76
78
  };
77
79
 
78
- declare const PLATFORM_FEE_POLICY: {
79
- readonly pct: 0.2;
80
- readonly min_floor_sats: 1;
81
- readonly ratified: "2026-04-30";
82
- };
83
- declare const MIN_INTEGRATOR_PRICE_SATS = 5;
84
- type EventClass = 'A' | 'B' | 'C';
85
- type ClassASubtype = 'account_creation' | 'account_recovery' | 'attest_bond_increased' | 'payment_method_connected' | 'agent_delegation_issued' | 'recovery_method_updated';
86
- type ClassBSubtype = 'payment_authorization' | 'scoped_action_authorization' | 'attest_verification_at_gate' | 'stamp_signing' | 'pledge_resolution';
87
- type ClassCSubtype = 'session_creation';
88
- type EventSubtype = ClassASubtype | ClassBSubtype | ClassCSubtype;
89
- type AttestTier = 'anonymous' | 'bonded';
90
- type SiteFeeShape = {
91
- kind: 'fixed_sats';
92
- sats: number;
93
- } | {
94
- kind: 'percent_of_amount';
95
- pct: number;
96
- };
97
- interface IntegratorEventConfig {
98
- enabled: boolean;
99
- site_pays: SiteFeeShape;
100
- user_share_pct: number;
101
- }
102
- interface IntegratorPriceConfig {
103
- project_key: string;
104
- display_name: string;
105
- domain: string;
106
- updated_at: string;
107
- events: Partial<Record<EventSubtype, IntegratorEventConfig>>;
108
- }
109
- interface ComputedFees {
110
- gross_fee_sats: number;
111
- platform_fee_sats: number;
112
- user_earned_sats: number;
113
- site_rebate_sats: number;
114
- }
115
- declare function computeFees(cfg: IntegratorEventConfig, payment_amount_sats?: number): ComputedFees;
116
- interface ValidationResult {
117
- ok: boolean;
118
- errors: {
119
- subtype?: EventSubtype;
120
- message: string;
121
- }[];
122
- }
123
- declare function validateIntegratorConfig(cfg: IntegratorPriceConfig): ValidationResult;
124
- interface BillableEvent {
125
- id: string;
126
- occurred_at: string;
127
- class: EventClass;
128
- subtype: EventSubtype;
129
- site: {
130
- domain: string;
131
- display_name: string;
132
- };
133
- gross_fee_sats: number;
134
- platform_fee_sats: number;
135
- user_earned_sats: number;
136
- site_rebate_sats: number;
137
- verify_url: string;
138
- is_agent?: boolean;
139
- }
140
- interface WebhookPayload extends BillableEvent {
141
- kind: 'oc-billable-event';
142
- sub: string;
143
- scopes?: Partial<Record<'bitcoin_address' | 'email' | 'attest_tier' | 'display_name' | 'cross_integrator_event_count' | 'cross_integrator_human_event_count' | 'trust_attestation_count' | 'trust_attestations_bundle', string>>;
144
- }
145
- interface WebhookHeaders {
146
- 'OC-Signature': string;
147
- 'OC-Key-Id': string;
148
- 'OC-Envelope-Id': string;
149
- 'OC-Subtype': EventSubtype;
150
- 'OC-Class': EventClass;
151
- 'OC-Delivery-Attempt': string;
152
- }
153
- interface SessionPolicy {
154
- duration_seconds: number;
155
- refresh: 'sliding' | 'rolling' | 'none';
156
- sensitive_actions?: 're-auth' | 'none';
157
- }
158
- interface Session {
159
- id: string;
160
- identity: string;
161
- opens_at: string;
162
- expires_at: string;
163
- policy: SessionPolicy;
164
- scope: string[];
165
- }
166
- interface SignInOptions {
167
- scope: string[];
168
- sessionPolicy?: Partial<SessionPolicy>;
169
- returnTo?: string;
170
- }
171
- interface PaymentAuthorizeOptions {
172
- identity: string;
173
- amount_sats?: number;
174
- usd_cents?: number;
175
- description: string;
176
- external_ref?: string;
177
- }
178
- interface PaymentResult {
179
- id: string;
180
- status: 'authorized' | 'failed' | 'cancelled';
181
- sats_charged?: number;
182
- user_envelope_id?: string;
183
- verify_url?: string;
184
- }
185
- interface TelemetryEvent {
186
- code: 'session.intra_signin' | 'session.token_refresh' | 'session.navigation' | 'auth.signin_failed' | 'auth.signin_cancelled' | 'auth.signin_rejected' | 'verify.passive_check';
187
- timestamp: string;
188
- session_id?: string;
189
- }
190
- type FederationStatus = 'recruiting' | 'forming' | 'binding' | 'live';
191
- interface Federation {
192
- slug: string;
193
- name: string;
194
- status: FederationStatus;
195
- threshold: string;
196
- target_guardian_count: number;
197
- invite: string | null;
198
- charter_hash: string | null;
199
- last_attestation_at: string | null;
200
- geography_hint: string;
201
- geography_requirements?: string;
202
- charter_status?: string;
203
- ceremony_window?: string;
204
- why_this_one?: string;
205
- apply_cta?: string;
206
- apply_href?: string;
207
- }
208
- type SigningMethod = 'fedimint_threshold' | 'fedimint_client' | 'bip322';
209
-
210
- type IntegratorArchetype = 'saas-paywall' | 'marketplace' | 'content-platform' | 'gaming' | 'agent-only';
211
- interface ProjectIdentity {
212
- project_key: string;
213
- domain: string;
214
- display_name: string;
215
- }
216
- interface ArchetypeTemplate {
217
- id: IntegratorArchetype;
218
- label: string;
219
- summary: string;
220
- examples: readonly string[];
221
- events: Partial<Record<EventSubtype, IntegratorEventConfig>>;
222
- }
223
- declare const ARCHETYPE_TEMPLATES: readonly ArchetypeTemplate[];
224
- declare function fromTemplate(useCase: IntegratorArchetype, identity: ProjectIdentity): IntegratorPriceConfig;
225
- declare function getArchetypeTemplate(id: IntegratorArchetype): ArchetypeTemplate;
226
-
227
80
  interface FireEventOptions {
228
81
  project_key: string;
229
82
  subtype: EventSubtype;
@@ -354,19 +207,6 @@ interface WithRateLimitRetryOptions {
354
207
  }
355
208
  declare function withRateLimitRetry<T>(fn: () => Promise<T>, opts?: WithRateLimitRetryOptions): Promise<T>;
356
209
 
357
- interface EventSubtypeMetadata {
358
- id: EventSubtype;
359
- class: EventClass;
360
- label: string;
361
- fires_when: string;
362
- example: string;
363
- common_use_cases: readonly string[];
364
- typical_price_hint: string;
365
- }
366
- declare const EVENT_SUBTYPES: Record<EventSubtype, EventSubtypeMetadata>;
367
- declare function subtypesForClass(cls: EventClass): EventSubtypeMetadata[];
368
- declare const ALL_EVENT_SUBTYPES: readonly EventSubtypeMetadata[];
369
-
370
210
  declare const oc: {
371
211
  session: {
372
212
  create: (opts: SignInOptions) => Promise<Session>;
@@ -407,4 +247,4 @@ declare const oc: {
407
247
  };
408
248
  };
409
249
 
410
- export { ALL_EVENT_SUBTYPES, ARCHETYPE_TEMPLATES, type ArchetypeTemplate, type AttestTier, type BillableEvent, type ClassASubtype, type ClassBSubtype, type ClassCSubtype, type ComputedFees, EVENT_SUBTYPES, type EventClass, type EventSubtype, type EventSubtypeMetadata, type FamilyScopesOptions, type FamilyScopesResult, type FamilyVerb, type Federation, type FederationStatus, type FireEventOptions, type GrantedOptions, type GrantedResult, type IntegratorArchetype, type IntegratorEventConfig, type IntegratorPriceConfig, MIN_INTEGRATOR_PRICE_SATS, MeClientError, type OcPublicJwk, OcSignInButton, type OcSignInButtonProps, PLATFORM_FEE_POLICY, type PaymentAuthorizeOptions, type PaymentResult, type RequestOptions, type Scope, type Session, type SessionPolicy, type SignInOptions, type SigningMethod, type SiteFeeShape, type TelemetryEvent, type TrustAttestationCount, type ValidationResult, type VerifyEventResult, type VerifyOptions, type VerifyResult, type WebhookHeaders, type WebhookPayload, type WithRateLimitRetryOptions, clearBearerToken, computeFees, config, fromTemplate as configFromTemplate, event, family, federations, getArchetypeTemplate, getBearerToken, getOrigin, oc, onTelemetry, parseTrustAttestationCount, payment, scope, session, setBearerToken, setOrigin, subtypesForClass, validateIntegratorConfig, webhook, withRateLimitRetry };
250
+ export { ArchetypeTemplate, BillableEvent, EventSubtype, type FamilyScopesOptions, type FamilyScopesResult, type FamilyVerb, Federation, type FireEventOptions, type GrantedOptions, type GrantedResult, IntegratorPriceConfig, MeClientError, type OcPublicJwk, OcSignInButton, type OcSignInButtonProps, PaymentAuthorizeOptions, PaymentResult, type RequestOptions, type Scope, Session, SessionPolicy, SignInOptions, TelemetryEvent, type TrustAttestationCount, ValidationResult, type VerifyEventResult, type VerifyOptions, type VerifyResult, type WithRateLimitRetryOptions, clearBearerToken, config, fromTemplate as configFromTemplate, event, family, federations, getArchetypeTemplate, getBearerToken, getOrigin, oc, onTelemetry, parseTrustAttestationCount, payment, scope, session, setBearerToken, setOrigin, webhook, withRateLimitRetry };
@@ -0,0 +1,163 @@
1
+ declare const PLATFORM_FEE_POLICY: {
2
+ readonly pct: 0.2;
3
+ readonly min_floor_sats: 1;
4
+ readonly ratified: "2026-04-30";
5
+ };
6
+ declare const MIN_INTEGRATOR_PRICE_SATS = 5;
7
+ type EventClass = 'A' | 'B' | 'C';
8
+ type ClassASubtype = 'account_creation' | 'account_recovery' | 'attest_bond_increased' | 'payment_method_connected' | 'agent_delegation_issued' | 'recovery_method_updated';
9
+ type ClassBSubtype = 'payment_authorization' | 'scoped_action_authorization' | 'attest_verification_at_gate' | 'stamp_signing' | 'pledge_resolution';
10
+ type ClassCSubtype = 'session_creation';
11
+ type EventSubtype = ClassASubtype | ClassBSubtype | ClassCSubtype;
12
+ type AttestTier = 'anonymous' | 'bonded';
13
+ type SiteFeeShape = {
14
+ kind: 'fixed_sats';
15
+ sats: number;
16
+ } | {
17
+ kind: 'percent_of_amount';
18
+ pct: number;
19
+ };
20
+ interface IntegratorEventConfig {
21
+ enabled: boolean;
22
+ site_pays: SiteFeeShape;
23
+ user_share_pct: number;
24
+ }
25
+ interface IntegratorPriceConfig {
26
+ project_key: string;
27
+ display_name: string;
28
+ domain: string;
29
+ updated_at: string;
30
+ events: Partial<Record<EventSubtype, IntegratorEventConfig>>;
31
+ }
32
+ interface ComputedFees {
33
+ gross_fee_sats: number;
34
+ platform_fee_sats: number;
35
+ user_earned_sats: number;
36
+ site_rebate_sats: number;
37
+ }
38
+ declare function computeFees(cfg: IntegratorEventConfig, payment_amount_sats?: number): ComputedFees;
39
+ interface ValidationResult {
40
+ ok: boolean;
41
+ errors: {
42
+ subtype?: EventSubtype;
43
+ message: string;
44
+ }[];
45
+ }
46
+ declare function validateIntegratorConfig(cfg: IntegratorPriceConfig): ValidationResult;
47
+ interface BillableEvent {
48
+ id: string;
49
+ occurred_at: string;
50
+ class: EventClass;
51
+ subtype: EventSubtype;
52
+ site: {
53
+ domain: string;
54
+ display_name: string;
55
+ };
56
+ gross_fee_sats: number;
57
+ platform_fee_sats: number;
58
+ user_earned_sats: number;
59
+ site_rebate_sats: number;
60
+ verify_url: string;
61
+ is_agent?: boolean;
62
+ }
63
+ interface WebhookPayload extends BillableEvent {
64
+ kind: 'oc-billable-event';
65
+ sub: string;
66
+ scopes?: Partial<Record<'bitcoin_address' | 'email' | 'attest_tier' | 'display_name' | 'cross_integrator_event_count' | 'cross_integrator_human_event_count' | 'trust_attestation_count' | 'trust_attestations_bundle', string>>;
67
+ }
68
+ interface WebhookHeaders {
69
+ 'OC-Signature': string;
70
+ 'OC-Key-Id': string;
71
+ 'OC-Envelope-Id': string;
72
+ 'OC-Subtype': EventSubtype;
73
+ 'OC-Class': EventClass;
74
+ 'OC-Delivery-Attempt': string;
75
+ }
76
+ interface SessionPolicy {
77
+ duration_seconds: number;
78
+ refresh: 'sliding' | 'rolling' | 'none';
79
+ sensitive_actions?: 're-auth' | 'none';
80
+ }
81
+ interface Session {
82
+ id: string;
83
+ identity: string;
84
+ opens_at: string;
85
+ expires_at: string;
86
+ policy: SessionPolicy;
87
+ scope: string[];
88
+ }
89
+ interface SignInOptions {
90
+ scope: string[];
91
+ sessionPolicy?: Partial<SessionPolicy>;
92
+ returnTo?: string;
93
+ }
94
+ interface PaymentAuthorizeOptions {
95
+ identity: string;
96
+ amount_sats?: number;
97
+ usd_cents?: number;
98
+ description: string;
99
+ external_ref?: string;
100
+ }
101
+ interface PaymentResult {
102
+ id: string;
103
+ status: 'authorized' | 'failed' | 'cancelled';
104
+ sats_charged?: number;
105
+ user_envelope_id?: string;
106
+ verify_url?: string;
107
+ }
108
+ interface TelemetryEvent {
109
+ code: 'session.intra_signin' | 'session.token_refresh' | 'session.navigation' | 'auth.signin_failed' | 'auth.signin_cancelled' | 'auth.signin_rejected' | 'verify.passive_check';
110
+ timestamp: string;
111
+ session_id?: string;
112
+ }
113
+ type FederationStatus = 'recruiting' | 'forming' | 'binding' | 'live';
114
+ interface Federation {
115
+ slug: string;
116
+ name: string;
117
+ status: FederationStatus;
118
+ threshold: string;
119
+ target_guardian_count: number;
120
+ invite: string | null;
121
+ charter_hash: string | null;
122
+ last_attestation_at: string | null;
123
+ geography_hint: string;
124
+ geography_requirements?: string;
125
+ charter_status?: string;
126
+ ceremony_window?: string;
127
+ why_this_one?: string;
128
+ apply_cta?: string;
129
+ apply_href?: string;
130
+ }
131
+ type SigningMethod = 'fedimint_threshold' | 'fedimint_client' | 'bip322';
132
+
133
+ type IntegratorArchetype = 'saas-paywall' | 'marketplace' | 'content-platform' | 'gaming' | 'agent-only';
134
+ interface ProjectIdentity {
135
+ project_key: string;
136
+ domain: string;
137
+ display_name: string;
138
+ }
139
+ interface ArchetypeTemplate {
140
+ id: IntegratorArchetype;
141
+ label: string;
142
+ summary: string;
143
+ examples: readonly string[];
144
+ events: Partial<Record<EventSubtype, IntegratorEventConfig>>;
145
+ }
146
+ declare const ARCHETYPE_TEMPLATES: readonly ArchetypeTemplate[];
147
+ declare function fromTemplate(useCase: IntegratorArchetype, identity: ProjectIdentity): IntegratorPriceConfig;
148
+ declare function getArchetypeTemplate(id: IntegratorArchetype): ArchetypeTemplate;
149
+
150
+ interface EventSubtypeMetadata {
151
+ id: EventSubtype;
152
+ class: EventClass;
153
+ label: string;
154
+ fires_when: string;
155
+ example: string;
156
+ common_use_cases: readonly string[];
157
+ typical_price_hint: string;
158
+ }
159
+ declare const EVENT_SUBTYPES: Record<EventSubtype, EventSubtypeMetadata>;
160
+ declare function subtypesForClass(cls: EventClass): EventSubtypeMetadata[];
161
+ declare const ALL_EVENT_SUBTYPES: readonly EventSubtypeMetadata[];
162
+
163
+ export { type ArchetypeTemplate as A, type BillableEvent as B, type ClassASubtype as C, type EventSubtype as E, type Federation as F, type IntegratorPriceConfig as I, MIN_INTEGRATOR_PRICE_SATS as M, type PaymentAuthorizeOptions as P, type SessionPolicy as S, type TelemetryEvent as T, type ValidationResult as V, type WebhookHeaders as W, type Session as a, type SignInOptions as b, type PaymentResult as c, ALL_EVENT_SUBTYPES as d, ARCHETYPE_TEMPLATES as e, fromTemplate as f, getArchetypeTemplate as g, type AttestTier as h, type ClassBSubtype as i, type ClassCSubtype as j, type ComputedFees as k, EVENT_SUBTYPES as l, type EventClass as m, type EventSubtypeMetadata as n, type FederationStatus as o, type IntegratorArchetype as p, type IntegratorEventConfig as q, PLATFORM_FEE_POLICY as r, type SigningMethod as s, type SiteFeeShape as t, type WebhookPayload as u, computeFees as v, subtypesForClass as w, validateIntegratorConfig as x };