@orangecheck/me-client 0.30.1 → 0.32.1
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/README.md +1 -1
- package/dist/index.d.mts +4 -16
- package/dist/index.d.ts +4 -16
- package/dist/index.js +56 -149
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +57 -129
- package/dist/index.mjs.map +1 -1
- package/dist/{integrator-BVzzkZ6l.d.mts → integrator-VvKGegqS.d.mts} +1 -1
- package/dist/{integrator-BVzzkZ6l.d.ts → integrator-VvKGegqS.d.ts} +1 -1
- package/dist/integrator.d.mts +1 -1
- package/dist/integrator.d.ts +1 -1
- package/dist/integrator.js +56 -56
- package/dist/integrator.js.map +1 -1
- package/dist/integrator.mjs +56 -56
- package/dist/integrator.mjs.map +1 -1
- package/dist/server.d.mts +14 -2
- package/dist/server.d.ts +14 -2
- package/dist/server.js +16 -0
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +16 -0
- package/dist/server.mjs.map +1 -1
- package/package.json +3 -12
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
> Hand-written prose below is the high-level overview; the docs site is the source of truth for every export, type, and signature.
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
Client for [me.ochk.io](https://me.ochk.io). Popup sign-in for any site, framework-agnostic server-side verification, session lifecycle hooks, payment authorization, webhook signature verification, the canonical billable-event taxonomy as TypeScript types. Sign people in with `signInWithOc()` from `/popup
|
|
7
|
+
Client for [me.ochk.io](https://me.ochk.io). Popup sign-in for any site, framework-agnostic server-side verification, session lifecycle hooks, payment authorization, webhook signature verification, the canonical billable-event taxonomy as TypeScript types. Sign people in with `signInWithOc()` from `/popup`. No React needed.
|
|
8
8
|
|
|
9
9
|
> Sign-in is free. Paying your users is optional: always, in promos you schedule, or never.
|
|
10
10
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { v as verifyActivityAttestation, r as refreshEnvelopeJwks } from './identity-1VYMOhzV.mjs';
|
|
2
2
|
export { A as ActivityAttestation, a as ActivityAttestationBundle, b as ActivityVerifyCheck, c as ActivityVerifyResult, V as VerifyActivityOptions, i as identity } from './identity-1VYMOhzV.mjs';
|
|
3
|
-
import { B as BillableEvent, E as EventKey, I as IntegratorPriceConfig,
|
|
4
|
-
export {
|
|
5
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
-
import * as React from 'react';
|
|
3
|
+
import { B as BillableEvent, E as EventKey, I as IntegratorPriceConfig, T as TelemetryEvent, S as SignInOptions, a as Session, P as PaymentAuthorizeOptions, b as PaymentResult, V as ValidationResult, f as fromTemplate, g as getArchetypeTemplate, A as ArchetypeTemplate, F as Federation } from './integrator-VvKGegqS.mjs';
|
|
4
|
+
export { c as ALL_EVENT_SUBTYPES, d as ARCHETYPE_TEMPLATES, e as AgentClassOverride, h as AttestTier, C as ClassASubtype, i as ClassBSubtype, j as ClassCSubtype, k as ComputedFees, D as DropCadence, l as DropClosedWebhookPayload, m as DropResponseBlock, n as DropScheduleSummary, o as EVENT_SUBTYPES, p as EventClass, q as EventSubtype, r as EventSubtypeMetadata, s as FederationStatus, t as IntegratorArchetype, u as IntegratorEventConfig, M as MAX_DROP_WINDOW_DAYS, v as MIN_INTEGRATOR_PRICE_SATS, w as PLATFORM_FEE_POLICY, x as SessionPolicy, y as SigningMethod, z as SiteFeeShape, G as SystemWebhookPayload, W as WebhookHeaders, H as WebhookPayload, J as computeFees, K as subtypesForClass, L as validateIntegratorConfig } from './integrator-VvKGegqS.mjs';
|
|
7
5
|
|
|
8
6
|
type Scope = 'bitcoin_address' | 'email' | 'attest_tier' | 'display_name' | 'cross_integrator_event_count' | 'cross_integrator_human_event_count' | 'trust_attestation_count';
|
|
9
7
|
interface TrustAttestationCount {
|
|
@@ -72,7 +70,7 @@ interface VerifyOptions {
|
|
|
72
70
|
jwk?: OcPublicJwk;
|
|
73
71
|
jwksCacheTtlMs?: number;
|
|
74
72
|
}
|
|
75
|
-
declare function verify$1(rawBody: string | Uint8Array, sigHex: string, kid: string, options?: VerifyOptions): Promise<VerifyResult>;
|
|
73
|
+
declare function verify$1(rawBody: string | Uint8Array, sigHex: string | null | undefined, kid: string | null | undefined, options?: VerifyOptions): Promise<VerifyResult>;
|
|
76
74
|
declare function fetchJwksForce(issuer?: string): Promise<void>;
|
|
77
75
|
declare const webhook: {
|
|
78
76
|
verify: typeof verify$1;
|
|
@@ -185,16 +183,6 @@ declare const event: {
|
|
|
185
183
|
verify: typeof verify;
|
|
186
184
|
};
|
|
187
185
|
|
|
188
|
-
interface OcSignInButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onError'> {
|
|
189
|
-
scope: string[];
|
|
190
|
-
sessionPolicy?: Partial<SessionPolicy>;
|
|
191
|
-
returnTo?: string;
|
|
192
|
-
onSignin?: (session: Session) => void;
|
|
193
|
-
onSignInError?: (error: Error) => void;
|
|
194
|
-
label?: string;
|
|
195
|
-
}
|
|
196
|
-
declare function OcSignInButton({ scope, sessionPolicy, returnTo, onSignin, onSignInError, label, children, onClick, style, ...rest }: OcSignInButtonProps): react_jsx_runtime.JSX.Element;
|
|
197
|
-
|
|
198
186
|
declare function onTelemetry(listener: (e: TelemetryEvent) => void): () => void;
|
|
199
187
|
declare function create(opts: SignInOptions): Promise<Session>;
|
|
200
188
|
declare function refresh(sessionId: string): Promise<Session>;
|
|
@@ -297,4 +285,4 @@ declare const oc: {
|
|
|
297
285
|
};
|
|
298
286
|
};
|
|
299
287
|
|
|
300
|
-
export { ArchetypeTemplate, type BatchEventResult, BillableEvent, EventKey, type FamilyScopesOptions, type FamilyScopesResult, type FamilyVerb, Federation, type FireBatchResponse, type FireEventOptions, type FireEventResult, type GrantedOptions, type GrantedResult, IntegratorPriceConfig, MeClientError, type OcPublicJwk,
|
|
288
|
+
export { ArchetypeTemplate, type BatchEventResult, BillableEvent, EventKey, type FamilyScopesOptions, type FamilyScopesResult, type FamilyVerb, Federation, type FireBatchResponse, type FireEventOptions, type FireEventResult, type GrantedOptions, type GrantedResult, IntegratorPriceConfig, MeClientError, type OcPublicJwk, type PayPeriod, type PayingState, PaymentAuthorizeOptions, PaymentResult, type RequestOptions, type Scope, Session, 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, payingAt, payment, refreshEnvelopeJwks, scope, session, setBearerToken, setOrigin, verifyActivityAttestation, webhook, withRateLimitRetry };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { v as verifyActivityAttestation, r as refreshEnvelopeJwks } from './identity-1VYMOhzV.js';
|
|
2
2
|
export { A as ActivityAttestation, a as ActivityAttestationBundle, b as ActivityVerifyCheck, c as ActivityVerifyResult, V as VerifyActivityOptions, i as identity } from './identity-1VYMOhzV.js';
|
|
3
|
-
import { B as BillableEvent, E as EventKey, I as IntegratorPriceConfig,
|
|
4
|
-
export {
|
|
5
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
-
import * as React from 'react';
|
|
3
|
+
import { B as BillableEvent, E as EventKey, I as IntegratorPriceConfig, T as TelemetryEvent, S as SignInOptions, a as Session, P as PaymentAuthorizeOptions, b as PaymentResult, V as ValidationResult, f as fromTemplate, g as getArchetypeTemplate, A as ArchetypeTemplate, F as Federation } from './integrator-VvKGegqS.js';
|
|
4
|
+
export { c as ALL_EVENT_SUBTYPES, d as ARCHETYPE_TEMPLATES, e as AgentClassOverride, h as AttestTier, C as ClassASubtype, i as ClassBSubtype, j as ClassCSubtype, k as ComputedFees, D as DropCadence, l as DropClosedWebhookPayload, m as DropResponseBlock, n as DropScheduleSummary, o as EVENT_SUBTYPES, p as EventClass, q as EventSubtype, r as EventSubtypeMetadata, s as FederationStatus, t as IntegratorArchetype, u as IntegratorEventConfig, M as MAX_DROP_WINDOW_DAYS, v as MIN_INTEGRATOR_PRICE_SATS, w as PLATFORM_FEE_POLICY, x as SessionPolicy, y as SigningMethod, z as SiteFeeShape, G as SystemWebhookPayload, W as WebhookHeaders, H as WebhookPayload, J as computeFees, K as subtypesForClass, L as validateIntegratorConfig } from './integrator-VvKGegqS.js';
|
|
7
5
|
|
|
8
6
|
type Scope = 'bitcoin_address' | 'email' | 'attest_tier' | 'display_name' | 'cross_integrator_event_count' | 'cross_integrator_human_event_count' | 'trust_attestation_count';
|
|
9
7
|
interface TrustAttestationCount {
|
|
@@ -72,7 +70,7 @@ interface VerifyOptions {
|
|
|
72
70
|
jwk?: OcPublicJwk;
|
|
73
71
|
jwksCacheTtlMs?: number;
|
|
74
72
|
}
|
|
75
|
-
declare function verify$1(rawBody: string | Uint8Array, sigHex: string, kid: string, options?: VerifyOptions): Promise<VerifyResult>;
|
|
73
|
+
declare function verify$1(rawBody: string | Uint8Array, sigHex: string | null | undefined, kid: string | null | undefined, options?: VerifyOptions): Promise<VerifyResult>;
|
|
76
74
|
declare function fetchJwksForce(issuer?: string): Promise<void>;
|
|
77
75
|
declare const webhook: {
|
|
78
76
|
verify: typeof verify$1;
|
|
@@ -185,16 +183,6 @@ declare const event: {
|
|
|
185
183
|
verify: typeof verify;
|
|
186
184
|
};
|
|
187
185
|
|
|
188
|
-
interface OcSignInButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onError'> {
|
|
189
|
-
scope: string[];
|
|
190
|
-
sessionPolicy?: Partial<SessionPolicy>;
|
|
191
|
-
returnTo?: string;
|
|
192
|
-
onSignin?: (session: Session) => void;
|
|
193
|
-
onSignInError?: (error: Error) => void;
|
|
194
|
-
label?: string;
|
|
195
|
-
}
|
|
196
|
-
declare function OcSignInButton({ scope, sessionPolicy, returnTo, onSignin, onSignInError, label, children, onClick, style, ...rest }: OcSignInButtonProps): react_jsx_runtime.JSX.Element;
|
|
197
|
-
|
|
198
186
|
declare function onTelemetry(listener: (e: TelemetryEvent) => void): () => void;
|
|
199
187
|
declare function create(opts: SignInOptions): Promise<Session>;
|
|
200
188
|
declare function refresh(sessionId: string): Promise<Session>;
|
|
@@ -297,4 +285,4 @@ declare const oc: {
|
|
|
297
285
|
};
|
|
298
286
|
};
|
|
299
287
|
|
|
300
|
-
export { ArchetypeTemplate, type BatchEventResult, BillableEvent, EventKey, type FamilyScopesOptions, type FamilyScopesResult, type FamilyVerb, Federation, type FireBatchResponse, type FireEventOptions, type FireEventResult, type GrantedOptions, type GrantedResult, IntegratorPriceConfig, MeClientError, type OcPublicJwk,
|
|
288
|
+
export { ArchetypeTemplate, type BatchEventResult, BillableEvent, EventKey, type FamilyScopesOptions, type FamilyScopesResult, type FamilyVerb, Federation, type FireBatchResponse, type FireEventOptions, type FireEventResult, type GrantedOptions, type GrantedResult, IntegratorPriceConfig, MeClientError, type OcPublicJwk, type PayPeriod, type PayingState, PaymentAuthorizeOptions, PaymentResult, type RequestOptions, type Scope, Session, 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, payingAt, payment, refreshEnvelopeJwks, scope, session, setBearerToken, setOrigin, verifyActivityAttestation, webhook, withRateLimitRetry };
|
package/dist/index.js
CHANGED
|
@@ -1,28 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
|
|
6
|
-
function _interopNamespace(e) {
|
|
7
|
-
if (e && e.__esModule) return e;
|
|
8
|
-
var n = Object.create(null);
|
|
9
|
-
if (e) {
|
|
10
|
-
Object.keys(e).forEach(function (k) {
|
|
11
|
-
if (k !== 'default') {
|
|
12
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () { return e[k]; }
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
n.default = e;
|
|
21
|
-
return Object.freeze(n);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
25
|
-
|
|
26
3
|
var __defProp = Object.defineProperty;
|
|
27
4
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
28
5
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -179,75 +156,6 @@ async function invalidate(sessionId) {
|
|
|
179
156
|
});
|
|
180
157
|
}
|
|
181
158
|
var session = { create, refresh, invalidate };
|
|
182
|
-
function OcSignInButton({
|
|
183
|
-
scope: scope2,
|
|
184
|
-
sessionPolicy,
|
|
185
|
-
returnTo,
|
|
186
|
-
onSignin,
|
|
187
|
-
onSignInError,
|
|
188
|
-
label = "sign in with oc",
|
|
189
|
-
children,
|
|
190
|
-
onClick,
|
|
191
|
-
style,
|
|
192
|
-
...rest
|
|
193
|
-
}) {
|
|
194
|
-
const [pending, setPending] = React__namespace.useState(false);
|
|
195
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
196
|
-
"button",
|
|
197
|
-
{
|
|
198
|
-
type: "button",
|
|
199
|
-
onClick: async (event2) => {
|
|
200
|
-
onClick?.(event2);
|
|
201
|
-
if (event2.defaultPrevented) return;
|
|
202
|
-
setPending(true);
|
|
203
|
-
try {
|
|
204
|
-
const result = await session.create({ scope: scope2, sessionPolicy, returnTo });
|
|
205
|
-
onSignin?.(result);
|
|
206
|
-
} catch (err) {
|
|
207
|
-
onSignInError?.(err instanceof Error ? err : new Error(String(err)));
|
|
208
|
-
} finally {
|
|
209
|
-
setPending(false);
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
style: {
|
|
213
|
-
display: "inline-flex",
|
|
214
|
-
alignItems: "center",
|
|
215
|
-
gap: 8,
|
|
216
|
-
padding: "10px 16px",
|
|
217
|
-
fontSize: 13,
|
|
218
|
-
fontWeight: 600,
|
|
219
|
-
fontFamily: 'ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace',
|
|
220
|
-
letterSpacing: "0.18em",
|
|
221
|
-
textTransform: "uppercase",
|
|
222
|
-
background: "#f97316",
|
|
223
|
-
color: "#0b0909",
|
|
224
|
-
border: "1px solid #f97316",
|
|
225
|
-
borderRadius: 4,
|
|
226
|
-
cursor: pending ? "progress" : "pointer",
|
|
227
|
-
opacity: pending ? 0.7 : 1,
|
|
228
|
-
...style ?? {}
|
|
229
|
-
},
|
|
230
|
-
disabled: pending || rest.disabled,
|
|
231
|
-
"data-oc-signin": true,
|
|
232
|
-
...rest,
|
|
233
|
-
children: [
|
|
234
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
235
|
-
"span",
|
|
236
|
-
{
|
|
237
|
-
"aria-hidden": true,
|
|
238
|
-
style: {
|
|
239
|
-
display: "inline-block",
|
|
240
|
-
width: 12,
|
|
241
|
-
height: 12,
|
|
242
|
-
background: "#0b0909"
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
),
|
|
246
|
-
children ?? (pending ? "opening\u2026" : label)
|
|
247
|
-
]
|
|
248
|
-
}
|
|
249
|
-
);
|
|
250
|
-
}
|
|
251
159
|
|
|
252
160
|
// src/payment.ts
|
|
253
161
|
async function authorize(opts) {
|
|
@@ -547,143 +455,143 @@ var ARCHETYPE_TEMPLATES = [
|
|
|
547
455
|
{
|
|
548
456
|
id: "saas-paywall",
|
|
549
457
|
label: "SaaS \xB7 paywall",
|
|
550
|
-
summary: "
|
|
551
|
-
examples: ["
|
|
458
|
+
summary: "A subscription product: people sign up, sign in and sometimes pay for more. Pays them for signing up and coming back.",
|
|
459
|
+
examples: ["notes app", "project tracker", "design editor"],
|
|
552
460
|
events: {
|
|
553
461
|
account_creation: {
|
|
554
462
|
enabled: true,
|
|
555
|
-
site_pays: FIXED(
|
|
556
|
-
user_share_pct: 0.
|
|
463
|
+
site_pays: FIXED(1056),
|
|
464
|
+
user_share_pct: 0.8
|
|
557
465
|
},
|
|
558
466
|
session_creation: {
|
|
559
467
|
enabled: true,
|
|
560
|
-
site_pays: FIXED(
|
|
561
|
-
user_share_pct: 0.
|
|
468
|
+
site_pays: FIXED(45),
|
|
469
|
+
user_share_pct: 0.8
|
|
562
470
|
},
|
|
563
471
|
payment_authorization: {
|
|
564
472
|
enabled: true,
|
|
565
|
-
site_pays: PCT(
|
|
566
|
-
user_share_pct: 0.
|
|
473
|
+
site_pays: PCT(609375e-8),
|
|
474
|
+
user_share_pct: 0.8
|
|
567
475
|
},
|
|
568
476
|
payment_method_connected: {
|
|
569
477
|
enabled: true,
|
|
570
|
-
site_pays: FIXED(
|
|
571
|
-
user_share_pct: 0.
|
|
478
|
+
site_pays: FIXED(260),
|
|
479
|
+
user_share_pct: 0.8
|
|
572
480
|
}
|
|
573
481
|
}
|
|
574
482
|
},
|
|
575
483
|
{
|
|
576
484
|
id: "marketplace",
|
|
577
485
|
label: "marketplace",
|
|
578
|
-
summary: "
|
|
579
|
-
examples: ["
|
|
486
|
+
summary: "Buyers and sellers trade. Pays on payments, listings and new payment methods.",
|
|
487
|
+
examples: ["checkout", "handmade-goods market", "ride-hailing"],
|
|
580
488
|
events: {
|
|
581
489
|
account_creation: {
|
|
582
490
|
enabled: true,
|
|
583
|
-
site_pays: FIXED(
|
|
584
|
-
user_share_pct: 0.
|
|
491
|
+
site_pays: FIXED(1056),
|
|
492
|
+
user_share_pct: 0.8
|
|
585
493
|
},
|
|
586
494
|
session_creation: {
|
|
587
495
|
enabled: true,
|
|
588
|
-
site_pays: FIXED(
|
|
589
|
-
user_share_pct: 0.
|
|
496
|
+
site_pays: FIXED(45),
|
|
497
|
+
user_share_pct: 0.8
|
|
590
498
|
},
|
|
591
499
|
payment_authorization: {
|
|
592
500
|
enabled: true,
|
|
593
|
-
site_pays: PCT(
|
|
594
|
-
user_share_pct: 0.
|
|
501
|
+
site_pays: PCT(609375e-8),
|
|
502
|
+
user_share_pct: 0.8
|
|
595
503
|
},
|
|
596
504
|
scoped_action_authorization: {
|
|
597
505
|
enabled: true,
|
|
598
|
-
site_pays: FIXED(
|
|
599
|
-
user_share_pct: 0.
|
|
506
|
+
site_pays: FIXED(81),
|
|
507
|
+
user_share_pct: 0.8
|
|
600
508
|
},
|
|
601
509
|
payment_method_connected: {
|
|
602
510
|
enabled: true,
|
|
603
|
-
site_pays: FIXED(
|
|
604
|
-
user_share_pct: 0.
|
|
511
|
+
site_pays: FIXED(260),
|
|
512
|
+
user_share_pct: 0.8
|
|
605
513
|
},
|
|
606
514
|
attest_verification_at_gate: {
|
|
607
515
|
enabled: true,
|
|
608
|
-
site_pays: FIXED(
|
|
609
|
-
user_share_pct: 0.
|
|
516
|
+
site_pays: FIXED(227),
|
|
517
|
+
user_share_pct: 0.8
|
|
610
518
|
}
|
|
611
519
|
}
|
|
612
520
|
},
|
|
613
521
|
{
|
|
614
522
|
id: "content-platform",
|
|
615
523
|
label: "content platform",
|
|
616
|
-
summary: "
|
|
617
|
-
examples: ["
|
|
524
|
+
summary: "Posts, reviews, votes and comments. Pays for each meaningful action, and for signed reviews.",
|
|
525
|
+
examples: ["forum", "video host", "newsletter"],
|
|
618
526
|
events: {
|
|
619
527
|
account_creation: {
|
|
620
528
|
enabled: true,
|
|
621
|
-
site_pays: FIXED(
|
|
622
|
-
user_share_pct: 0.
|
|
529
|
+
site_pays: FIXED(1137),
|
|
530
|
+
user_share_pct: 0.8
|
|
623
531
|
},
|
|
624
532
|
session_creation: {
|
|
625
533
|
enabled: true,
|
|
626
|
-
site_pays: FIXED(
|
|
627
|
-
user_share_pct: 0.
|
|
534
|
+
site_pays: FIXED(49),
|
|
535
|
+
user_share_pct: 0.8
|
|
628
536
|
},
|
|
629
537
|
scoped_action_authorization: {
|
|
630
538
|
enabled: true,
|
|
631
|
-
site_pays: FIXED(
|
|
632
|
-
user_share_pct: 0.
|
|
539
|
+
site_pays: FIXED(87),
|
|
540
|
+
user_share_pct: 0.8
|
|
633
541
|
},
|
|
634
542
|
stamp_signing: {
|
|
635
543
|
enabled: true,
|
|
636
|
-
site_pays: FIXED(
|
|
637
|
-
user_share_pct: 0.
|
|
544
|
+
site_pays: FIXED(49),
|
|
545
|
+
user_share_pct: 0.8
|
|
638
546
|
}
|
|
639
547
|
}
|
|
640
548
|
},
|
|
641
549
|
{
|
|
642
550
|
id: "gaming",
|
|
643
551
|
label: "gaming",
|
|
644
|
-
summary: "
|
|
552
|
+
summary: "A game where actions carry value. Pays for playing, paying and settled pledges.",
|
|
645
553
|
examples: [
|
|
646
554
|
"on-chain prediction markets",
|
|
647
555
|
"skill-staking tournaments",
|
|
648
|
-
"
|
|
556
|
+
"multiplayer games"
|
|
649
557
|
],
|
|
650
558
|
events: {
|
|
651
559
|
account_creation: {
|
|
652
560
|
enabled: true,
|
|
653
|
-
site_pays: FIXED(
|
|
654
|
-
user_share_pct: 0.
|
|
561
|
+
site_pays: FIXED(1137),
|
|
562
|
+
user_share_pct: 0.8
|
|
655
563
|
},
|
|
656
564
|
session_creation: {
|
|
657
565
|
enabled: true,
|
|
658
|
-
site_pays: FIXED(
|
|
659
|
-
user_share_pct: 0.
|
|
566
|
+
site_pays: FIXED(49),
|
|
567
|
+
user_share_pct: 0.8
|
|
660
568
|
},
|
|
661
569
|
scoped_action_authorization: {
|
|
662
570
|
enabled: true,
|
|
663
|
-
site_pays: FIXED(
|
|
664
|
-
user_share_pct: 0.
|
|
571
|
+
site_pays: FIXED(87),
|
|
572
|
+
user_share_pct: 0.8
|
|
665
573
|
},
|
|
666
574
|
payment_authorization: {
|
|
667
575
|
enabled: true,
|
|
668
|
-
site_pays: PCT(
|
|
669
|
-
user_share_pct: 0.
|
|
576
|
+
site_pays: PCT(4375e-6),
|
|
577
|
+
user_share_pct: 0.8
|
|
670
578
|
},
|
|
671
579
|
pledge_resolution: {
|
|
672
580
|
enabled: true,
|
|
673
|
-
site_pays: PCT(
|
|
674
|
-
user_share_pct: 0.
|
|
581
|
+
site_pays: PCT(875e-5),
|
|
582
|
+
user_share_pct: 0.8
|
|
675
583
|
},
|
|
676
584
|
attest_verification_at_gate: {
|
|
677
585
|
enabled: true,
|
|
678
|
-
site_pays: FIXED(
|
|
679
|
-
user_share_pct: 0.
|
|
586
|
+
site_pays: FIXED(245),
|
|
587
|
+
user_share_pct: 0.8
|
|
680
588
|
}
|
|
681
589
|
}
|
|
682
590
|
},
|
|
683
591
|
{
|
|
684
592
|
id: "agent-only",
|
|
685
593
|
label: "agent-only",
|
|
686
|
-
summary: "AI
|
|
594
|
+
summary: "AI agents act for people under a delegation. Sessions are off; delegations and the actions they allow carry the activity.",
|
|
687
595
|
examples: [
|
|
688
596
|
"AI assistant calling APIs on user behalf",
|
|
689
597
|
"autonomous trading bot",
|
|
@@ -692,18 +600,18 @@ var ARCHETYPE_TEMPLATES = [
|
|
|
692
600
|
events: {
|
|
693
601
|
account_creation: {
|
|
694
602
|
enabled: true,
|
|
695
|
-
site_pays: FIXED(
|
|
696
|
-
user_share_pct: 0.
|
|
603
|
+
site_pays: FIXED(1056),
|
|
604
|
+
user_share_pct: 0.8
|
|
697
605
|
},
|
|
698
606
|
agent_delegation_issued: {
|
|
699
607
|
enabled: true,
|
|
700
|
-
site_pays: FIXED(
|
|
701
|
-
user_share_pct: 0.
|
|
608
|
+
site_pays: FIXED(260),
|
|
609
|
+
user_share_pct: 0.8
|
|
702
610
|
},
|
|
703
611
|
scoped_action_authorization: {
|
|
704
612
|
enabled: true,
|
|
705
|
-
site_pays: FIXED(
|
|
706
|
-
user_share_pct: 0.
|
|
613
|
+
site_pays: FIXED(81),
|
|
614
|
+
user_share_pct: 0.8
|
|
707
615
|
}
|
|
708
616
|
}
|
|
709
617
|
}
|
|
@@ -728,7 +636,7 @@ var ALL_SUBTYPES = [
|
|
|
728
636
|
var DEFAULT_DISABLED = {
|
|
729
637
|
enabled: false,
|
|
730
638
|
site_pays: { kind: "fixed_sats", sats: 100 },
|
|
731
|
-
user_share_pct: 0.
|
|
639
|
+
user_share_pct: 0.8
|
|
732
640
|
};
|
|
733
641
|
function fromTemplate(useCase, identity2) {
|
|
734
642
|
const template = ARCHETYPES_BY_ID[useCase];
|
|
@@ -1585,7 +1493,6 @@ exports.EVENT_SUBTYPES = EVENT_SUBTYPES;
|
|
|
1585
1493
|
exports.MAX_DROP_WINDOW_DAYS = MAX_DROP_WINDOW_DAYS;
|
|
1586
1494
|
exports.MIN_INTEGRATOR_PRICE_SATS = MIN_INTEGRATOR_PRICE_SATS;
|
|
1587
1495
|
exports.MeClientError = MeClientError;
|
|
1588
|
-
exports.OcSignInButton = OcSignInButton;
|
|
1589
1496
|
exports.PLATFORM_FEE_POLICY = PLATFORM_FEE_POLICY;
|
|
1590
1497
|
exports.clearBearerToken = clearBearerToken;
|
|
1591
1498
|
exports.computeFees = computeFees;
|