@capxul/sdk 1.2.2 → 2.0.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.
@@ -1,5 +1,5 @@
1
- import { A as CurrencyCode, B as RunId, C as AnonymousDistinctId, D as BlockNumber, E as AuthUserId, F as Money, G as TxHash, H as SmartAccount, I as OrgId, J as CapxulError, L as Profile, M as DurationMs, N as Email, O as ChainId, P as EpochMs, Q as FailureMode, R as PublishableKey, S as AllowedOrigin, T as AuthSession, U as SubAccount, V as SessionToken, W as SubAccountId, X as CapxulErrorDetails, Y as CapxulErrorCode, Z as Failure, b as AccountId, d as CapxulResult, f as Profile$1, g as AuthCachePort, j as DocumentHash, k as CountryCode, m as SmartAccount$1, n as CapxulSigner, o as AccountProviderSource, p as Session$1, s as AccountRequirement, v as CachedJwt, w as AppId, x as Address, y as Account$1, z as RoleKey } from "./signer-CJT0pPiO.mjs";
2
- import { Hex } from "viem";
1
+ import { $ as CapxulErrorDetails, A as CountryCode, B as PermissionAssignmentId, C as AllowedOrigin, D as AuthUserId, E as AuthSession, F as EpochMs, G as SessionToken, H as Profile, I as Money, J as WeiAmount, K as SmartAccount, L as MovementId, M as DocumentHash, N as DurationMs, O as BlockNumber, P as Email, Q as CapxulErrorCode, R as OrgId, S as AllowanceKey, T as AppId, U as PublishableKey, V as PermissionId, W as RoleKey, Z as CapxulError, d as CapxulResult, et as Failure, f as Profile$1, g as AuthCachePort, j as CurrencyCode, k as ChainId, m as SmartAccount$1, n as CapxulSigner, o as AccountProviderSource, p as Session$1, q as TxHash, s as AccountRequirement, tt as FailureMode, v as CachedJwt, w as AnonymousDistinctId, x as Address$1, y as Account$1, z as PaymentCommandId } from "./signer-ZijoFiUs.mjs";
2
+ import { Address, Hex } from "viem";
3
3
  import { Context, Effect, Layer, Schema, Scope, Tracer } from "effect";
4
4
  import { FunctionReference } from "convex/server";
5
5
 
@@ -224,6 +224,10 @@ type Destination$1 = {
224
224
  */
225
225
  declare const destination: (state: IdentityState) => Destination$1 | null;
226
226
  //#endregion
227
+ //#region ../config/src/capxul-payments-v2.d.ts
228
+ /** Immutable CapxulPaymentsV2 deployment on Base Sepolia. */
229
+ declare const CAPXUL_PAYMENTS_V2_ADDRESS: Address;
230
+ //#endregion
227
231
  //#region src/ports/auth-client.d.ts
228
232
  type AuthClientOperationOptions = {
229
233
  readonly signal?: AbortSignal;
@@ -307,7 +311,7 @@ interface TelemetryPort {
307
311
  }
308
312
  //#endregion
309
313
  //#region ../observability/src/index.d.ts
310
- declare const TELEMETRY_EVENT_NAMES: readonly ["auth_otp_requested", "auth_otp_delivered", "auth_otp_expired", "auth_verified", "auth_failed", "auth_signed_out", "onboarding_intent_selected", "onboarding_profile_submitted", "onboarding_organization_submitted", "onboarding_dashboard_reached", "provisioning_safe_created", "provisioning_safe_confirmed", "bootstrap_resolved", "bootstrap_failed", "member_activation_started", "member_activation_ready", "member_activation_failed", "organization_creation_started", "organization_creation_ready", "organization_creation_failed", "account_balance_read", "account_balance_failed", "faucet_requested", "faucet_confirmed", "faucet_failed", "subaccount_created", "subaccount_renamed", "subaccount_deleted", "subaccount_op_failed", "transfer_requested", "transfer_backend_received", "transfer_confirmed", "transfer_failed", "org_create_started", "org_safe_created", "org_safe_confirmed", "org_roles_seeded", "org_created", "org_create_failed", "org_invite_sent", "org_invite_accepted", "org_role_granted", "org_member_active", "org_member_removed", "org_invite_expired", "org_role_grant_failed", "payment_requested", "payment_resolved", "payment_document_attached", "payment_submitted", "payment_settled", "payment_claimed", "payment_cancelled", "payment_redirected", "payment_failed", "stream_created", "stream_claimed", "stream_cancelled", "stream_completed", "stream_failed", "withdrawal_requested", "withdrawal_submitted", "withdrawal_settled", "withdrawal_failed"];
314
+ declare const TELEMETRY_EVENT_NAMES: readonly ["auth_otp_requested", "auth_otp_delivered", "auth_otp_expired", "auth_verified", "auth_failed", "auth_signed_out", "onboarding_intent_selected", "onboarding_profile_submitted", "onboarding_organization_submitted", "onboarding_dashboard_reached", "provisioning_safe_created", "provisioning_safe_confirmed", "bootstrap_resolved", "bootstrap_failed", "member_activation_started", "member_activation_ready", "member_activation_failed", "organization_creation_started", "organization_creation_ready", "organization_creation_failed", "account_balance_read", "account_balance_failed", "faucet_requested", "faucet_confirmed", "faucet_failed", "org_create_started", "org_safe_created", "org_safe_confirmed", "org_roles_seeded", "org_created", "org_create_failed", "org_invite_sent", "org_invite_accepted", "org_invite_expired", "payment_initiated", "payment_settled", "payment_failed", "deposit_initiated", "deposit_settled", "permission_mirror_verification", "movement_scan_window", "movement_scan_checkpoint", "movement_scan_incident"];
311
315
  type TelemetryEventName = (typeof TELEMETRY_EVENT_NAMES)[number];
312
316
  type TelemetryProps = Record<string, unknown>;
313
317
  type TelemetryEvent = {
@@ -341,6 +345,278 @@ interface TelemetryGroupInput {
341
345
  readonly properties?: TelemetryProps;
342
346
  }
343
347
  //#endregion
348
+ //#region ../wire/src/bootstrap.d.ts
349
+ declare const EngineeringTelemetryBootstrapPolicy: Schema.Struct<{
350
+ readonly host: Schema.refine<string, Schema.String>;
351
+ readonly projectToken: Schema.refine<string, Schema.String>;
352
+ readonly capxulEnv: Schema.Union<readonly [Schema.Literal<"development">, Schema.Literal<"e2e">, Schema.Literal<"staging">, Schema.Literal<"production">]>;
353
+ }>;
354
+ type EngineeringTelemetryBootstrapPolicyV1 = Schema.Schema.Type<typeof EngineeringTelemetryBootstrapPolicy>;
355
+ //#endregion
356
+ //#region ../wire/src/status.d.ts
357
+ /** The closed L2 Payment status authority. */
358
+ declare const L2_PAYMENT_STATUSES: readonly ["pending", "settling", "scheduled", "streaming", "pending_claim", "settled", "cancelled", "failed"];
359
+ type L2PaymentStatus = (typeof L2_PAYMENT_STATUSES)[number];
360
+ /** What a payment is FOR. Pairs with `PAYMENT_DOCUMENT_KINDS`. */
361
+ declare const PAYMENT_TYPES: readonly ["unspecified", "invoice", "payroll", "reimbursement"];
362
+ type PaymentType$1 = (typeof PAYMENT_TYPES)[number];
363
+ /** Attachable document kinds; each maps to exactly one `PaymentType`. */
364
+ declare const PAYMENT_DOCUMENT_KINDS: readonly ["memo", "invoice", "payslip", "receipt", "withdrawal"];
365
+ type PaymentDocumentKind$1 = (typeof PAYMENT_DOCUMENT_KINDS)[number];
366
+ /** Lifecycle of a payment REQUEST as its issuer sees it. */
367
+ declare const REQUEST_STATUSES: readonly ["draft", "sent", "viewed", "pending_settlement", "paid", "declined", "cancelled", "expired"];
368
+ type RequestStatus = (typeof REQUEST_STATUSES)[number];
369
+ /** The same request as its RECIPIENT sees it, in the approval inbox. */
370
+ declare const INBOX_STATUSES: readonly ["open", "approved", "declined", "paid", "cancelled", "expired"];
371
+ type InboxStatus = (typeof INBOX_STATUSES)[number];
372
+ //#endregion
373
+ //#region ../wire/src/financial-ops.d.ts
374
+ declare const AttachablePaymentDocumentEnvelope: Schema.Union<readonly [Schema.Struct<{
375
+ readonly protocol: Schema.Literal<"capxul.payment-document">;
376
+ readonly version: Schema.Literal<1>;
377
+ readonly domain: Schema.Struct<{
378
+ readonly name: Schema.Literal<"CapxulPayments">;
379
+ readonly version: Schema.Literal<"1">;
380
+ readonly chainId: Schema.Codec<ChainId, number, never, never>;
381
+ readonly verifyingContract: Schema.Literal<"0xe740ea65521edc9bef0ea75d30b5334711db99f4">;
382
+ }>;
383
+ readonly primaryType: Schema.Literal<"Memo">;
384
+ readonly message: Schema.Struct<{
385
+ readonly kind: Schema.Literal<0>;
386
+ readonly reference: Schema.String;
387
+ readonly note: Schema.String;
388
+ readonly issuedAt: Schema.Number;
389
+ }>;
390
+ }>, Schema.Struct<{
391
+ readonly protocol: Schema.Literal<"capxul.payment-document">;
392
+ readonly version: Schema.Literal<1>;
393
+ readonly domain: Schema.Struct<{
394
+ readonly name: Schema.Literal<"CapxulPayments">;
395
+ readonly version: Schema.Literal<"1">;
396
+ readonly chainId: Schema.Codec<ChainId, number, never, never>;
397
+ readonly verifyingContract: Schema.Literal<"0xe740ea65521edc9bef0ea75d30b5334711db99f4">;
398
+ }>;
399
+ readonly primaryType: Schema.Literal<"Invoice">;
400
+ readonly message: Schema.Struct<{
401
+ readonly kind: Schema.Literal<1>;
402
+ readonly invoiceNumber: Schema.String;
403
+ readonly payerRef: Schema.String;
404
+ readonly payeeRef: Schema.String;
405
+ readonly amount: Schema.String;
406
+ readonly currency: Schema.Codec<CurrencyCode, string, never, never>;
407
+ readonly decimals: Schema.Number;
408
+ readonly issuedAt: Schema.Number;
409
+ readonly dueAt: Schema.Number;
410
+ readonly lineItemsHash: Schema.Codec<DocumentHash, string, never, never>;
411
+ }>;
412
+ }>, Schema.Struct<{
413
+ readonly protocol: Schema.Literal<"capxul.payment-document">;
414
+ readonly version: Schema.Literal<1>;
415
+ readonly domain: Schema.Struct<{
416
+ readonly name: Schema.Literal<"CapxulPayments">;
417
+ readonly version: Schema.Literal<"1">;
418
+ readonly chainId: Schema.Codec<ChainId, number, never, never>;
419
+ readonly verifyingContract: Schema.Literal<"0xe740ea65521edc9bef0ea75d30b5334711db99f4">;
420
+ }>;
421
+ readonly primaryType: Schema.Literal<"Payslip">;
422
+ readonly message: Schema.Struct<{
423
+ readonly kind: Schema.Literal<2>;
424
+ readonly employerRef: Schema.String;
425
+ readonly employeeRef: Schema.String;
426
+ readonly period: Schema.String;
427
+ readonly gross: Schema.String;
428
+ readonly net: Schema.String;
429
+ readonly currency: Schema.Codec<CurrencyCode, string, never, never>;
430
+ readonly decimals: Schema.Number;
431
+ readonly issuedAt: Schema.Number;
432
+ }>;
433
+ }>, Schema.Struct<{
434
+ readonly protocol: Schema.Literal<"capxul.payment-document">;
435
+ readonly version: Schema.Literal<1>;
436
+ readonly domain: Schema.Struct<{
437
+ readonly name: Schema.Literal<"CapxulPayments">;
438
+ readonly version: Schema.Literal<"1">;
439
+ readonly chainId: Schema.Codec<ChainId, number, never, never>;
440
+ readonly verifyingContract: Schema.Literal<"0xe740ea65521edc9bef0ea75d30b5334711db99f4">;
441
+ }>;
442
+ readonly primaryType: Schema.Literal<"Receipt">;
443
+ readonly message: Schema.Struct<{
444
+ readonly kind: Schema.Literal<3>;
445
+ readonly reference: Schema.String;
446
+ readonly amount: Schema.String;
447
+ readonly currency: Schema.Codec<CurrencyCode, string, never, never>;
448
+ readonly decimals: Schema.Number;
449
+ readonly paidAt: Schema.Number;
450
+ readonly note: Schema.String;
451
+ }>;
452
+ }>]>;
453
+ /**
454
+ * #592 invoice line item. `quantity` is a positive integer; `unitMinor` is the
455
+ * per-unit price in integer minor units. The list is canonically hashed by
456
+ * `hashLineItems` (payment-document-hash.ts) into the Invoice `lineItemsHash`,
457
+ * and Σ(quantity × unitMinor) MUST equal the invoice `amount`. The hash binds
458
+ * the documentHash to the exact items; the sum-check makes the items add up to
459
+ * the amount due. See the financial-operations contract in `packages/wire/CONTEXT.md`.
460
+ */
461
+ declare const LineItem: Schema.Struct<{
462
+ readonly description: Schema.String;
463
+ readonly quantity: Schema.Number;
464
+ readonly unitMinor: Schema.String;
465
+ }>;
466
+ type AttachablePaymentDocumentEnvelopeV1 = Schema.Schema.Type<typeof AttachablePaymentDocumentEnvelope>;
467
+ type LineItemV1 = Schema.Schema.Type<typeof LineItem>;
468
+ //#endregion
469
+ //#region ../wire/src/l2-money.d.ts
470
+ declare const MovementAnnotationSchema: Schema.Struct<{
471
+ readonly movementId: Schema.Codec<MovementId, string, never, never>;
472
+ readonly actor: Schema.Union<readonly [Schema.Struct<{
473
+ readonly kind: Schema.Literal<"account">;
474
+ readonly accountId: Schema.refine<string, Schema.String>;
475
+ }>, Schema.Struct<{
476
+ readonly kind: Schema.Literal<"organization">;
477
+ readonly orgId: Schema.refine<string, Schema.String>;
478
+ }>]>;
479
+ readonly counterpartyLabel: Schema.optional<Schema.String>;
480
+ readonly accountingCategory: Schema.optional<Schema.String>;
481
+ readonly memo: Schema.optional<Schema.String>;
482
+ readonly lastEditor: Schema.Union<readonly [Schema.Struct<{
483
+ readonly kind: Schema.Literal<"account">;
484
+ readonly accountId: Schema.refine<string, Schema.String>;
485
+ }>, Schema.Struct<{
486
+ readonly kind: Schema.Literal<"organization">;
487
+ readonly orgId: Schema.refine<string, Schema.String>;
488
+ }>]>;
489
+ readonly updatedAt: Schema.refine<number, Schema.Number>;
490
+ }>;
491
+ type MovementAnnotation = Schema.Schema.Type<typeof MovementAnnotationSchema>;
492
+ declare const PermissionSchema: Schema.Struct<{
493
+ readonly permissionId: Schema.Codec<PermissionId, string, never, never>;
494
+ readonly orgId: Schema.refine<string, Schema.String>;
495
+ readonly type: Schema.Literals<readonly ["budget", "managePeople"]>;
496
+ readonly state: Schema.Literals<readonly ["pending", "active", "suspended", "revoked", "superseded", "quarantined"]>;
497
+ readonly revision: Schema.refine<number, Schema.Number>;
498
+ readonly roleKey: Schema.Codec<RoleKey, string, never, never>;
499
+ readonly tokenAddress: Schema.optional<Schema.Codec<Address$1, string, never, never>>;
500
+ readonly limitRaw: Schema.optional<Schema.Codec<WeiAmount, string, never, never>>;
501
+ readonly allowanceKey: Schema.optional<Schema.Codec<AllowanceKey, string, never, never>>;
502
+ }>;
503
+ type Permission = Schema.Schema.Type<typeof PermissionSchema>;
504
+ declare const PermissionAssignmentSchema: Schema.Struct<{
505
+ readonly permissionAssignmentId: Schema.Codec<PermissionAssignmentId, string, never, never>;
506
+ readonly permissionId: Schema.Codec<PermissionId, string, never, never>;
507
+ readonly actor: Schema.Union<readonly [Schema.Struct<{
508
+ readonly kind: Schema.Literal<"account">;
509
+ readonly accountId: Schema.refine<string, Schema.String>;
510
+ }>, Schema.Struct<{
511
+ readonly kind: Schema.Literal<"organization">;
512
+ readonly orgId: Schema.refine<string, Schema.String>;
513
+ }>]>;
514
+ readonly state: Schema.Literals<readonly ["pending", "active", "suspended", "revoked", "superseded", "quarantined"]>;
515
+ }>;
516
+ type PermissionAssignment = Schema.Schema.Type<typeof PermissionAssignmentSchema>;
517
+ declare const CurrentHoldingsSchema: Schema.Struct<{
518
+ readonly actor: Schema.Union<readonly [Schema.Struct<{
519
+ readonly kind: Schema.Literal<"account">;
520
+ readonly accountId: Schema.refine<string, Schema.String>;
521
+ }>, Schema.Struct<{
522
+ readonly kind: Schema.Literal<"organization">;
523
+ readonly orgId: Schema.refine<string, Schema.String>;
524
+ }>]>;
525
+ readonly chainId: Schema.Codec<ChainId, number, never, never>;
526
+ readonly observedAt: Schema.refine<number, Schema.Number>;
527
+ readonly stale: Schema.Boolean;
528
+ readonly rows: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
529
+ readonly assetKind: Schema.Literal<"native">;
530
+ readonly symbol: Schema.optional<Schema.String>;
531
+ readonly decimals: Schema.optional<Schema.refine<number, Schema.Number>>;
532
+ readonly rawBalance: Schema.Codec<WeiAmount, string, never, never>;
533
+ }>, Schema.Struct<{
534
+ readonly assetKind: Schema.Literal<"erc20">;
535
+ readonly tokenAddress: Schema.Codec<Address$1, string, never, never>;
536
+ readonly symbol: Schema.optional<Schema.String>;
537
+ readonly decimals: Schema.optional<Schema.refine<number, Schema.Number>>;
538
+ readonly rawBalance: Schema.Codec<WeiAmount, string, never, never>;
539
+ }>]>>;
540
+ }>;
541
+ type CurrentHoldings = Schema.Schema.Type<typeof CurrentHoldingsSchema>;
542
+ declare const PaymentCommandLineageSchema: Schema.Union<readonly [Schema.Struct<{
543
+ readonly kind: Schema.Literal<"payroll">;
544
+ readonly runId: Schema.refine<string, Schema.String>;
545
+ }>, Schema.Struct<{
546
+ readonly kind: Schema.Literal<"payment_request">;
547
+ readonly requestId: Schema.refine<string, Schema.String>;
548
+ }>]>;
549
+ type PaymentCommandLineage = Schema.Schema.Type<typeof PaymentCommandLineageSchema>;
550
+ declare const PermissionIntentSchema: Schema.Union<readonly [Schema.Struct<{
551
+ readonly type: Schema.Literal<"budget">;
552
+ readonly limit: Schema.Struct<{
553
+ readonly currency: Schema.Codec<CurrencyCode, string, never, never>;
554
+ readonly value: Schema.String;
555
+ readonly decimals: Schema.Number;
556
+ }>;
557
+ }>, Schema.Struct<{
558
+ readonly type: Schema.Literal<"managePeople">;
559
+ }>]>;
560
+ type PermissionIntent = Schema.Schema.Type<typeof PermissionIntentSchema>;
561
+ declare const SubmittedPermissionExecutionSchema: Schema.Struct<{
562
+ readonly status: Schema.Literal<"submitted">;
563
+ readonly executionId: Schema.refine<string, Schema.String>;
564
+ readonly commandId: Schema.Codec<PaymentCommandId, string, never, never>;
565
+ readonly userOpHash: Schema.Codec<string, string, never, never>;
566
+ readonly value: Schema.Union<readonly [Schema.Struct<{
567
+ readonly permissionId: Schema.Codec<PermissionId, string, never, never>;
568
+ readonly orgId: Schema.refine<string, Schema.String>;
569
+ readonly type: Schema.Literals<readonly ["budget", "managePeople"]>;
570
+ readonly state: Schema.Literals<readonly ["pending", "active", "suspended", "revoked", "superseded", "quarantined"]>;
571
+ readonly revision: Schema.refine<number, Schema.Number>;
572
+ readonly roleKey: Schema.Codec<RoleKey, string, never, never>;
573
+ readonly tokenAddress: Schema.optional<Schema.Codec<Address$1, string, never, never>>;
574
+ readonly limitRaw: Schema.optional<Schema.Codec<WeiAmount, string, never, never>>;
575
+ readonly allowanceKey: Schema.optional<Schema.Codec<AllowanceKey, string, never, never>>;
576
+ }>, Schema.Struct<{
577
+ readonly permissionAssignmentId: Schema.Codec<PermissionAssignmentId, string, never, never>;
578
+ readonly permissionId: Schema.Codec<PermissionId, string, never, never>;
579
+ readonly actor: Schema.Union<readonly [Schema.Struct<{
580
+ readonly kind: Schema.Literal<"account">;
581
+ readonly accountId: Schema.refine<string, Schema.String>;
582
+ }>, Schema.Struct<{
583
+ readonly kind: Schema.Literal<"organization">;
584
+ readonly orgId: Schema.refine<string, Schema.String>;
585
+ }>]>;
586
+ readonly state: Schema.Literals<readonly ["pending", "active", "suspended", "revoked", "superseded", "quarantined"]>;
587
+ }>, Schema.$Array<Schema.Struct<{
588
+ readonly permissionId: Schema.Codec<PermissionId, string, never, never>;
589
+ readonly orgId: Schema.refine<string, Schema.String>;
590
+ readonly type: Schema.Literals<readonly ["budget", "managePeople"]>;
591
+ readonly state: Schema.Literals<readonly ["pending", "active", "suspended", "revoked", "superseded", "quarantined"]>;
592
+ readonly revision: Schema.refine<number, Schema.Number>;
593
+ readonly roleKey: Schema.Codec<RoleKey, string, never, never>;
594
+ readonly tokenAddress: Schema.optional<Schema.Codec<Address$1, string, never, never>>;
595
+ readonly limitRaw: Schema.optional<Schema.Codec<WeiAmount, string, never, never>>;
596
+ readonly allowanceKey: Schema.optional<Schema.Codec<AllowanceKey, string, never, never>>;
597
+ }>>]>;
598
+ }>;
599
+ type SubmittedPermissionExecution = Schema.Schema.Type<typeof SubmittedPermissionExecutionSchema>;
600
+ //#endregion
601
+ //#region ../wire/src/observation-context.d.ts
602
+ /**
603
+ * Bounded, non-authoritative observation metadata carried by selected SDK
604
+ * calls. Actor identity is deliberately absent: the backend derives it from
605
+ * the authenticated session and verifies organization/application hints.
606
+ */
607
+ interface WireObservationContext {
608
+ readonly application?: string;
609
+ readonly applicationId?: string;
610
+ readonly release?: string;
611
+ readonly sessionId?: string;
612
+ readonly organizationId?: string;
613
+ readonly journeyId?: string;
614
+ readonly correlationId?: string;
615
+ readonly anonymousId?: string;
616
+ /** W3C trace carrier for the explicit Convex action hop; never product identity. */
617
+ readonly traceparent?: string;
618
+ }
619
+ //#endregion
344
620
  //#region src/ports/bootstrap.d.ts
345
621
  type BootstrapInput = {
346
622
  readonly publishableKey: PublishableKey;
@@ -367,6 +643,7 @@ type BootstrapResolution = {
367
643
  readonly siteBaseUrl: string;
368
644
  readonly openfortPublishableKey: string;
369
645
  readonly shieldPublishableKey: string;
646
+ readonly engineeringTelemetry?: EngineeringTelemetryBootstrapPolicyV1;
370
647
  };
371
648
  type BootstrapErrorKind = "notAuthenticated" | "network" | "provider" | "malformedBody" | "invalidInput" | "rateLimited";
372
649
  declare const BootstrapError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
@@ -472,7 +749,7 @@ type CompleteOnboardingIdentityInput = {
472
749
  readonly email: Email;
473
750
  readonly displayName: string;
474
751
  readonly country: CountryCode;
475
- readonly withdrawalAddress?: Address; /** #1062: optional globally-unique handle — store-when-present, backend-normalized. */
752
+ readonly withdrawalAddress?: Address$1; /** #1062: optional globally-unique handle — store-when-present, backend-normalized. */
476
753
  readonly username?: string;
477
754
  };
478
755
  declare const IdentityError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
@@ -535,15 +812,16 @@ type SafeDeploymentConfig = {
535
812
  */
536
813
  type SafeDeploymentEvidence = {
537
814
  readonly chainId: ChainId;
538
- readonly signerAddress: Address;
539
- readonly safeAddress: Address;
815
+ readonly signerAddress: Address$1;
816
+ readonly safeAddress: Address$1;
540
817
  readonly txHash?: TxHash;
541
818
  readonly userOpHash?: TxHash;
542
819
  readonly blockNumber?: BlockNumber;
543
820
  };
544
821
  type ProvisionInput = {
545
822
  readonly authUserId: AuthUserId;
546
- readonly chainId: ChainId;
823
+ readonly chainId: ChainId; /** Verified session email. The backend reads the same value from BetterAuth. */
824
+ readonly email: Email;
547
825
  };
548
826
  /**
549
827
  * Input to `SmartAccountPort.confirmDeployment` (#161 · γ-B).
@@ -562,14 +840,8 @@ type ProvisionInput = {
562
840
  type ConfirmDeploymentInput = {
563
841
  readonly authUserId: AuthUserId;
564
842
  readonly chainId: ChainId;
565
- readonly safeAddress: Address;
843
+ readonly safeAddress: Address$1;
566
844
  readonly evidence: SafeDeploymentEvidence;
567
- /**
568
- * Optional live-E2E correlation id. This does not prove deployment; the
569
- * backend still re-verifies chain evidence and only mirrors this branded
570
- * id onto telemetry for PostHog run joins.
571
- */
572
- readonly telemetryRunId?: RunId;
573
845
  };
574
846
  /**
575
847
  * Input to `SmartAccountPort.claim` (PRD #462). The authenticated session
@@ -580,8 +852,7 @@ type ConfirmDeploymentInput = {
580
852
  type ClaimInput = {
581
853
  readonly authUserId: AuthUserId;
582
854
  readonly chainId: ChainId;
583
- readonly signerAddress: Address;
584
- readonly telemetryRunId?: RunId;
855
+ readonly signerAddress: Address$1;
585
856
  };
586
857
  declare const SmartAccountError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
587
858
  readonly _tag: "SmartAccountError";
@@ -595,7 +866,7 @@ declare class SmartAccountError extends SmartAccountError_base<{
595
866
  }> {}
596
867
  interface SmartAccountPort {
597
868
  loadByAuthUserId(authUserId: AuthUserId): Effect.Effect<SmartAccount | null, SmartAccountError, never>;
598
- loadBySmartAccountAddress(address: Address): Effect.Effect<SmartAccount | null, SmartAccountError, never>;
869
+ loadBySmartAccountAddress(address: Address$1): Effect.Effect<SmartAccount | null, SmartAccountError, never>;
599
870
  provision(input: ProvisionInput): Effect.Effect<SmartAccount, SmartAccountError, never>;
600
871
  /**
601
872
  * Persist on-chain Safe-deployment evidence. The backend re-verifies
@@ -647,71 +918,9 @@ interface AccountReadPort {
647
918
  fundFromFaucet(input: FundFromFaucetInput): Effect.Effect<FundFromFaucetResult, AccountReadError, never>;
648
919
  }
649
920
  //#endregion
650
- //#region src/ports/sub-account.d.ts
651
- declare const SubAccountError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
652
- readonly _tag: "SubAccountError";
653
- } & Readonly<A>;
654
- declare class SubAccountError extends SubAccountError_base<{
655
- readonly operation: string;
656
- readonly publicCode: CapxulErrorCode;
657
- readonly publicError: CapxulError;
658
- readonly cause: unknown;
659
- readonly details?: CapxulErrorDetails;
660
- }> {}
661
- type CreateSubAccountInput = {
662
- readonly accountId: AccountId;
663
- readonly name: string;
664
- };
665
- type SubAccountIdInput = {
666
- readonly subAccountId: SubAccountId;
667
- };
668
- type RenameSubAccountInput = {
669
- readonly subAccountId: SubAccountId;
670
- readonly name: string;
671
- };
672
- /**
673
- * A `transfer` endpoint is either the Account's MAIN balance (the remainder
674
- * left over after every sub-account is funded — never a stored row) or a
675
- * specific sub-account, addressed by its `SubAccountId` (canon
676
- * `account-balance-model.md` §5, §12).
677
- */
678
- type TransferEndpoint = "main" | SubAccountId;
679
- /**
680
- * Move money between two of the SAME Account's balances (canon §12). The
681
- * backend resolves the Account from auth (v1 = one Account per user), so the
682
- * input carries no `accountId` — only the from/to endpoints and the `Money`
683
- * amount. One verb covers money in (`main → sub`), money out (`sub → main`),
684
- * and `sub → sub`.
685
- */
686
- type TransferInput = {
687
- readonly from: TransferEndpoint;
688
- readonly to: TransferEndpoint;
689
- readonly amount: Money;
690
- };
691
- /**
692
- * Result of a `transfer`: the recomputed `available` (`balanceOf − Σ`), plus
693
- * the updated source/destination sub-account rows. An endpoint that is `"main"`
694
- * has no stored row, so its slot is `null`.
695
- */
696
- type TransferResult = {
697
- readonly available: Money;
698
- readonly from: SubAccount | null;
699
- readonly to: SubAccount | null;
700
- };
701
- interface SubAccountPort {
702
- create(input: CreateSubAccountInput): Effect.Effect<SubAccount, SubAccountError, never>;
703
- get(input: SubAccountIdInput): Effect.Effect<SubAccount | null, SubAccountError, never>;
704
- list(input: {
705
- readonly accountId: AccountId;
706
- }): Effect.Effect<readonly SubAccount[], SubAccountError, never>;
707
- rename(input: RenameSubAccountInput): Effect.Effect<SubAccount, SubAccountError, never>;
708
- delete(input: SubAccountIdInput): Effect.Effect<void, SubAccountError, never>;
709
- transfer(input: TransferInput): Effect.Effect<TransferResult, SubAccountError, never>;
710
- }
711
- //#endregion
712
921
  //#region src/flows/types.d.ts
713
922
  /**
714
- * The full 10-port bundle that `assembleCapxulClient` (slice 5) consumes.
923
+ * The full port bundle that `assembleCapxulClient` consumes.
715
924
  * (Was 13 before #1145 / DEMOLITION §D4 deleted the credentials, env and
716
925
  * transport ports — built by `production.ts`, read by nobody.)
717
926
  *
@@ -725,7 +934,6 @@ interface FlowPorts {
725
934
  readonly identity: IdentityPort;
726
935
  readonly smartAccount: SmartAccountPort;
727
936
  readonly accountRead: AccountReadPort;
728
- readonly subAccount: SubAccountPort;
729
937
  readonly bootstrap: BootstrapPort;
730
938
  readonly clock: ClockPort;
731
939
  readonly telemetry: TelemetryPort;
@@ -733,29 +941,10 @@ interface FlowPorts {
733
941
  }
734
942
  /** Legacy method input retained by the imperative auth surface. */
735
943
  interface ExternalSigner {
736
- readonly address: Address;
944
+ readonly address: Address$1;
737
945
  readonly signedProof: string;
738
946
  }
739
947
  //#endregion
740
- //#region ../wire/src/observation-context.d.ts
741
- /**
742
- * Bounded, non-authoritative observation metadata carried by selected SDK
743
- * calls. Actor identity is deliberately absent: the backend derives it from
744
- * the authenticated session and verifies organization/application hints.
745
- */
746
- interface WireObservationContext {
747
- readonly application?: string;
748
- readonly applicationId?: string;
749
- readonly release?: string;
750
- readonly sessionId?: string;
751
- readonly organizationId?: string;
752
- readonly journeyId?: string;
753
- readonly correlationId?: string;
754
- readonly anonymousId?: string;
755
- /** W3C trace carrier for the explicit Convex action hop; never product identity. */
756
- readonly traceparent?: string;
757
- }
758
- //#endregion
759
948
  //#region src/surface/org-lifecycle.d.ts
760
949
  type OrgSetupStep = "preparingFounderAccount" | "awaitingFounderAuthorization" | "submittingBootstrap" | "confirmingBootstrap";
761
950
  /** Leak-safe readiness for exactly one Organization. */
@@ -867,308 +1056,54 @@ interface SmartAccountMethods {
867
1056
  interface IdentityMethods {
868
1057
  loadCurrent(options?: {
869
1058
  readonly signal?: AbortSignal;
870
- }): Promise<CapxulResult<Profile$1 | null>>;
871
- /**
872
- * #1062: availability probe for the username the user is typing. Returns the
873
- * canonical stored form so the UI can echo it.
874
- */
875
- usernameAvailable(username: string, options?: {
876
- readonly signal?: AbortSignal;
877
- }): Promise<CapxulResult<{
878
- readonly available: boolean;
879
- readonly normalized: string;
880
- }>>;
881
- }
882
- //#endregion
883
- //#region src/surface/account-lifecycle.d.ts
884
- type ProvisioningFailureStep = "wallet" | "identity" | "provision" | "deploy";
885
- type ProvisioningPhase = {
886
- readonly status: "idle";
887
- } | {
888
- readonly status: "wallet";
889
- } | {
890
- readonly status: "identity";
891
- } | {
892
- readonly status: "provision";
893
- } | {
894
- readonly status: "deploy";
895
- } | {
896
- readonly status: "ready";
897
- } | {
898
- readonly status: "failed";
899
- readonly at: ProvisioningFailureStep;
900
- readonly error: CapxulError;
901
- };
902
- type AccountSetupStep = "connecting" | "confirmingIdentity" | "registering" | "activating";
903
- type AccountLifecycle = {
904
- readonly status: "loading";
905
- } | {
906
- readonly status: "settingUp";
907
- readonly step: AccountSetupStep;
908
- } | {
909
- readonly status: "ready";
910
- readonly accountId: string;
911
- readonly canTransact: boolean;
912
- } | {
913
- readonly status: "failed";
914
- readonly at: AccountSetupStep;
915
- readonly error: CapxulError;
916
- };
917
- declare function isSettingUpLifecycle(lifecycle: AccountLifecycle): boolean;
918
- //#endregion
919
- //#region ../wire/src/status.d.ts
920
- /** Payment lifecycle states carried on the wire (ADR-0018 P1). */
921
- declare const PAYMENT_STATUSES: readonly ["pending", "submitted", "pending_claim", "scheduled", "streaming", "settled", "cancelled", "redirected", "expired", "failed"];
922
- type PaymentStatus$1 = (typeof PAYMENT_STATUSES)[number];
923
- /** What a payment is FOR. Pairs with `PAYMENT_DOCUMENT_KINDS`. */
924
- declare const PAYMENT_TYPES: readonly ["unspecified", "invoice", "payroll", "reimbursement"];
925
- type PaymentType$1 = (typeof PAYMENT_TYPES)[number];
926
- /** Attachable document kinds; each maps to exactly one `PaymentType`. */
927
- declare const PAYMENT_DOCUMENT_KINDS: readonly ["memo", "invoice", "payslip", "receipt", "withdrawal"];
928
- type PaymentDocumentKind$1 = (typeof PAYMENT_DOCUMENT_KINDS)[number];
929
- /** Lifecycle of a payment REQUEST as its issuer sees it. */
930
- declare const REQUEST_STATUSES: readonly ["draft", "sent", "viewed", "pending_settlement", "paid", "declined", "cancelled", "expired"];
931
- type RequestStatus = (typeof REQUEST_STATUSES)[number];
932
- /** The same request as its RECIPIENT sees it, in the approval inbox. */
933
- declare const INBOX_STATUSES: readonly ["open", "approved", "declined", "paid", "cancelled", "expired"];
934
- type InboxStatus = (typeof INBOX_STATUSES)[number];
935
- //#endregion
936
- //#region ../wire/src/financial-ops.d.ts
937
- declare const AttachablePaymentDocumentEnvelope: Schema.Union<readonly [Schema.Struct<{
938
- readonly protocol: Schema.Literal<"capxul.payment-document">;
939
- readonly version: Schema.Literal<1>;
940
- readonly domain: Schema.Struct<{
941
- readonly name: Schema.Literal<"CapxulPayments">;
942
- readonly version: Schema.Literal<"1">;
943
- readonly chainId: Schema.Codec<ChainId, number, never, never>;
944
- readonly verifyingContract: Schema.Literal<"0xe740ea65521edc9bef0ea75d30b5334711db99f4">;
945
- }>;
946
- readonly primaryType: Schema.Literal<"Memo">;
947
- readonly message: Schema.Struct<{
948
- readonly kind: Schema.Literal<0>;
949
- readonly reference: Schema.String;
950
- readonly note: Schema.String;
951
- readonly issuedAt: Schema.Number;
952
- }>;
953
- }>, Schema.Struct<{
954
- readonly protocol: Schema.Literal<"capxul.payment-document">;
955
- readonly version: Schema.Literal<1>;
956
- readonly domain: Schema.Struct<{
957
- readonly name: Schema.Literal<"CapxulPayments">;
958
- readonly version: Schema.Literal<"1">;
959
- readonly chainId: Schema.Codec<ChainId, number, never, never>;
960
- readonly verifyingContract: Schema.Literal<"0xe740ea65521edc9bef0ea75d30b5334711db99f4">;
961
- }>;
962
- readonly primaryType: Schema.Literal<"Invoice">;
963
- readonly message: Schema.Struct<{
964
- readonly kind: Schema.Literal<1>;
965
- readonly invoiceNumber: Schema.String;
966
- readonly payerRef: Schema.String;
967
- readonly payeeRef: Schema.String;
968
- readonly amount: Schema.String;
969
- readonly currency: Schema.Codec<CurrencyCode, string, never, never>;
970
- readonly decimals: Schema.Number;
971
- readonly issuedAt: Schema.Number;
972
- readonly dueAt: Schema.Number;
973
- readonly lineItemsHash: Schema.Codec<DocumentHash, string, never, never>;
974
- }>;
975
- }>, Schema.Struct<{
976
- readonly protocol: Schema.Literal<"capxul.payment-document">;
977
- readonly version: Schema.Literal<1>;
978
- readonly domain: Schema.Struct<{
979
- readonly name: Schema.Literal<"CapxulPayments">;
980
- readonly version: Schema.Literal<"1">;
981
- readonly chainId: Schema.Codec<ChainId, number, never, never>;
982
- readonly verifyingContract: Schema.Literal<"0xe740ea65521edc9bef0ea75d30b5334711db99f4">;
983
- }>;
984
- readonly primaryType: Schema.Literal<"Payslip">;
985
- readonly message: Schema.Struct<{
986
- readonly kind: Schema.Literal<2>;
987
- readonly employerRef: Schema.String;
988
- readonly employeeRef: Schema.String;
989
- readonly period: Schema.String;
990
- readonly gross: Schema.String;
991
- readonly net: Schema.String;
992
- readonly currency: Schema.Codec<CurrencyCode, string, never, never>;
993
- readonly decimals: Schema.Number;
994
- readonly issuedAt: Schema.Number;
995
- }>;
996
- }>, Schema.Struct<{
997
- readonly protocol: Schema.Literal<"capxul.payment-document">;
998
- readonly version: Schema.Literal<1>;
999
- readonly domain: Schema.Struct<{
1000
- readonly name: Schema.Literal<"CapxulPayments">;
1001
- readonly version: Schema.Literal<"1">;
1002
- readonly chainId: Schema.Codec<ChainId, number, never, never>;
1003
- readonly verifyingContract: Schema.Literal<"0xe740ea65521edc9bef0ea75d30b5334711db99f4">;
1004
- }>;
1005
- readonly primaryType: Schema.Literal<"Receipt">;
1006
- readonly message: Schema.Struct<{
1007
- readonly kind: Schema.Literal<3>;
1008
- readonly reference: Schema.String;
1009
- readonly amount: Schema.String;
1010
- readonly currency: Schema.Codec<CurrencyCode, string, never, never>;
1011
- readonly decimals: Schema.Number;
1012
- readonly paidAt: Schema.Number;
1013
- readonly note: Schema.String;
1014
- }>;
1015
- }>]>;
1016
- declare const WithdrawalDocumentEnvelope: Schema.Struct<{
1017
- readonly protocol: Schema.Literal<"capxul.payment-document">;
1018
- readonly version: Schema.Literal<1>;
1019
- readonly domain: Schema.Struct<{
1020
- readonly name: Schema.Literal<"CapxulPayments">;
1021
- readonly version: Schema.Literal<"1">;
1022
- readonly chainId: Schema.Codec<ChainId, number, never, never>;
1023
- readonly verifyingContract: Schema.Literal<"0xe740ea65521edc9bef0ea75d30b5334711db99f4">;
1024
- }>;
1025
- readonly primaryType: Schema.Literal<"Withdrawal">;
1026
- readonly message: Schema.Struct<{
1027
- readonly kind: Schema.Literal<4>;
1028
- readonly reference: Schema.String;
1029
- readonly amount: Schema.String;
1030
- readonly currency: Schema.Codec<CurrencyCode, string, never, never>;
1031
- readonly decimals: Schema.Number;
1032
- readonly destChain: Schema.Codec<ChainId, number, never, never>;
1033
- readonly destAddress: Schema.String;
1034
- readonly settledAt: Schema.Number;
1035
- readonly provider: Schema.String;
1036
- readonly note: Schema.String;
1037
- }>;
1038
- }>;
1039
- declare const PaymentDocumentEnvelope: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
1040
- readonly protocol: Schema.Literal<"capxul.payment-document">;
1041
- readonly version: Schema.Literal<1>;
1042
- readonly domain: Schema.Struct<{
1043
- readonly name: Schema.Literal<"CapxulPayments">;
1044
- readonly version: Schema.Literal<"1">;
1045
- readonly chainId: Schema.Codec<ChainId, number, never, never>;
1046
- readonly verifyingContract: Schema.Literal<"0xe740ea65521edc9bef0ea75d30b5334711db99f4">;
1047
- }>;
1048
- readonly primaryType: Schema.Literal<"Memo">;
1049
- readonly message: Schema.Struct<{
1050
- readonly kind: Schema.Literal<0>;
1051
- readonly reference: Schema.String;
1052
- readonly note: Schema.String;
1053
- readonly issuedAt: Schema.Number;
1054
- }>;
1055
- }>, Schema.Struct<{
1056
- readonly protocol: Schema.Literal<"capxul.payment-document">;
1057
- readonly version: Schema.Literal<1>;
1058
- readonly domain: Schema.Struct<{
1059
- readonly name: Schema.Literal<"CapxulPayments">;
1060
- readonly version: Schema.Literal<"1">;
1061
- readonly chainId: Schema.Codec<ChainId, number, never, never>;
1062
- readonly verifyingContract: Schema.Literal<"0xe740ea65521edc9bef0ea75d30b5334711db99f4">;
1063
- }>;
1064
- readonly primaryType: Schema.Literal<"Invoice">;
1065
- readonly message: Schema.Struct<{
1066
- readonly kind: Schema.Literal<1>;
1067
- readonly invoiceNumber: Schema.String;
1068
- readonly payerRef: Schema.String;
1069
- readonly payeeRef: Schema.String;
1070
- readonly amount: Schema.String;
1071
- readonly currency: Schema.Codec<CurrencyCode, string, never, never>;
1072
- readonly decimals: Schema.Number;
1073
- readonly issuedAt: Schema.Number;
1074
- readonly dueAt: Schema.Number;
1075
- readonly lineItemsHash: Schema.Codec<DocumentHash, string, never, never>;
1076
- }>;
1077
- }>, Schema.Struct<{
1078
- readonly protocol: Schema.Literal<"capxul.payment-document">;
1079
- readonly version: Schema.Literal<1>;
1080
- readonly domain: Schema.Struct<{
1081
- readonly name: Schema.Literal<"CapxulPayments">;
1082
- readonly version: Schema.Literal<"1">;
1083
- readonly chainId: Schema.Codec<ChainId, number, never, never>;
1084
- readonly verifyingContract: Schema.Literal<"0xe740ea65521edc9bef0ea75d30b5334711db99f4">;
1085
- }>;
1086
- readonly primaryType: Schema.Literal<"Payslip">;
1087
- readonly message: Schema.Struct<{
1088
- readonly kind: Schema.Literal<2>;
1089
- readonly employerRef: Schema.String;
1090
- readonly employeeRef: Schema.String;
1091
- readonly period: Schema.String;
1092
- readonly gross: Schema.String;
1093
- readonly net: Schema.String;
1094
- readonly currency: Schema.Codec<CurrencyCode, string, never, never>;
1095
- readonly decimals: Schema.Number;
1096
- readonly issuedAt: Schema.Number;
1097
- }>;
1098
- }>, Schema.Struct<{
1099
- readonly protocol: Schema.Literal<"capxul.payment-document">;
1100
- readonly version: Schema.Literal<1>;
1101
- readonly domain: Schema.Struct<{
1102
- readonly name: Schema.Literal<"CapxulPayments">;
1103
- readonly version: Schema.Literal<"1">;
1104
- readonly chainId: Schema.Codec<ChainId, number, never, never>;
1105
- readonly verifyingContract: Schema.Literal<"0xe740ea65521edc9bef0ea75d30b5334711db99f4">;
1106
- }>;
1107
- readonly primaryType: Schema.Literal<"Receipt">;
1108
- readonly message: Schema.Struct<{
1109
- readonly kind: Schema.Literal<3>;
1110
- readonly reference: Schema.String;
1111
- readonly amount: Schema.String;
1112
- readonly currency: Schema.Codec<CurrencyCode, string, never, never>;
1113
- readonly decimals: Schema.Number;
1114
- readonly paidAt: Schema.Number;
1115
- readonly note: Schema.String;
1116
- }>;
1117
- }>]>, Schema.Struct<{
1118
- readonly protocol: Schema.Literal<"capxul.payment-document">;
1119
- readonly version: Schema.Literal<1>;
1120
- readonly domain: Schema.Struct<{
1121
- readonly name: Schema.Literal<"CapxulPayments">;
1122
- readonly version: Schema.Literal<"1">;
1123
- readonly chainId: Schema.Codec<ChainId, number, never, never>;
1124
- readonly verifyingContract: Schema.Literal<"0xe740ea65521edc9bef0ea75d30b5334711db99f4">;
1125
- }>;
1126
- readonly primaryType: Schema.Literal<"Withdrawal">;
1127
- readonly message: Schema.Struct<{
1128
- readonly kind: Schema.Literal<4>;
1129
- readonly reference: Schema.String;
1130
- readonly amount: Schema.String;
1131
- readonly currency: Schema.Codec<CurrencyCode, string, never, never>;
1132
- readonly decimals: Schema.Number;
1133
- readonly destChain: Schema.Codec<ChainId, number, never, never>;
1134
- readonly destAddress: Schema.String;
1135
- readonly settledAt: Schema.Number;
1136
- readonly provider: Schema.String;
1137
- readonly note: Schema.String;
1138
- }>;
1139
- }>]>;
1140
- /**
1141
- * #592 invoice line item. `quantity` is a positive integer; `unitMinor` is the
1142
- * per-unit price in integer minor units. The list is canonically hashed by
1143
- * `hashLineItems` (payment-document-hash.ts) into the Invoice `lineItemsHash`,
1144
- * and Σ(quantity × unitMinor) MUST equal the invoice `amount`. The hash binds
1145
- * the documentHash to the exact items; the sum-check makes the items add up to
1146
- * the amount due. See the financial-operations contract in `packages/wire/CONTEXT.md`.
1147
- */
1148
- declare const LineItem: Schema.Struct<{
1149
- readonly description: Schema.String;
1150
- readonly quantity: Schema.Number;
1151
- readonly unitMinor: Schema.String;
1152
- }>;
1153
- type AttachablePaymentDocumentEnvelopeV1 = Schema.Schema.Type<typeof AttachablePaymentDocumentEnvelope>;
1154
- type PaymentDocumentEnvelopeV1 = Schema.Schema.Type<typeof PaymentDocumentEnvelope>;
1155
- type WithdrawalDocumentEnvelopeV1 = Schema.Schema.Type<typeof WithdrawalDocumentEnvelope>;
1156
- type LineItemV1 = Schema.Schema.Type<typeof LineItem>;
1059
+ }): Promise<CapxulResult<Profile$1 | null>>;
1060
+ /**
1061
+ * #1062: availability probe for the username the user is typing. Returns the
1062
+ * canonical stored form so the UI can echo it.
1063
+ */
1064
+ usernameAvailable(username: string, options?: {
1065
+ readonly signal?: AbortSignal;
1066
+ }): Promise<CapxulResult<{
1067
+ readonly available: boolean;
1068
+ readonly normalized: string;
1069
+ }>>;
1070
+ }
1157
1071
  //#endregion
1158
- //#region ../wire/src/leak-safety.d.ts
1159
- declare const OnchainEvidenceBrand: unique symbol;
1160
- /**
1161
- * The branded `{ userOpHash, txHash }` pair. On-chain settlement evidence is
1162
- * INTERNAL — it flows on the server-internal channel only, never onto a wire
1163
- * Payment or any MCP tool output. The brand makes "this is internal evidence"
1164
- * a type, so a loose pair can't be passed where a wire field is expected.
1165
- */
1166
- type OnchainEvidence = {
1167
- readonly userOpHash: string;
1168
- readonly txHash: string;
1169
- } & {
1170
- readonly [OnchainEvidenceBrand]: "OnchainEvidence";
1072
+ //#region src/surface/account-lifecycle.d.ts
1073
+ type ProvisioningFailureStep = "wallet" | "identity" | "provision" | "deploy";
1074
+ type ProvisioningPhase = {
1075
+ readonly status: "idle";
1076
+ } | {
1077
+ readonly status: "wallet";
1078
+ } | {
1079
+ readonly status: "identity";
1080
+ } | {
1081
+ readonly status: "provision";
1082
+ } | {
1083
+ readonly status: "deploy";
1084
+ } | {
1085
+ readonly status: "ready";
1086
+ } | {
1087
+ readonly status: "failed";
1088
+ readonly at: ProvisioningFailureStep;
1089
+ readonly error: CapxulError;
1090
+ };
1091
+ type AccountSetupStep = "connecting" | "confirmingIdentity" | "registering" | "activating";
1092
+ type AccountLifecycle = {
1093
+ readonly status: "loading";
1094
+ } | {
1095
+ readonly status: "settingUp";
1096
+ readonly step: AccountSetupStep;
1097
+ } | {
1098
+ readonly status: "ready";
1099
+ readonly accountId: string;
1100
+ readonly canTransact: boolean;
1101
+ } | {
1102
+ readonly status: "failed";
1103
+ readonly at: AccountSetupStep;
1104
+ readonly error: CapxulError;
1171
1105
  };
1106
+ declare function isSettingUpLifecycle(lifecycle: AccountLifecycle): boolean;
1172
1107
  //#endregion
1173
1108
  //#region src/surface/money.d.ts
1174
1109
  type ActorReference = {
@@ -1291,7 +1226,7 @@ interface PaymentMoney {
1291
1226
  readonly value: string;
1292
1227
  readonly decimals: number;
1293
1228
  }
1294
- type PaymentStatus = PaymentStatus$1;
1229
+ type PaymentStatus = L2PaymentStatus;
1295
1230
  type PaymentType = PaymentType$1;
1296
1231
  type PaymentDocumentKind = PaymentDocumentKind$1;
1297
1232
  interface PaymentDocumentRef {
@@ -1330,6 +1265,8 @@ interface Payment {
1330
1265
  readonly updatedAt: number;
1331
1266
  }
1332
1267
  interface PaymentsPayInput {
1268
+ /** Stable idempotency key for caller retries. Omit only for a one-shot payment. */
1269
+ readonly requestKey?: string;
1333
1270
  readonly actor?: ActorReference;
1334
1271
  readonly to: TargetReference;
1335
1272
  readonly amount: PaymentMoney;
@@ -1357,28 +1294,6 @@ interface PaymentsPayInput {
1357
1294
  */
1358
1295
  readonly lineItems?: readonly LineItemV1[];
1359
1296
  }
1360
- /**
1361
- * B3 withdraw / cash-out input. Stripe-shaped: `to` is the EXTERNAL 0x wallet
1362
- * (the ONE place the SDK accepts a raw address — the pay lane never does),
1363
- * `amount` is a Money, `document` is the REQUIRED kind:4 Withdrawal envelope
1364
- * (carries the audit-visible destAddress). No chain / Safe / token / hash
1365
- * custody substrate on the input. Returns a leak-safe `Payment` whose recipient
1366
- * label is the redacted address — never the full 0x.
1367
- */
1368
- interface PaymentsWithdrawInput {
1369
- readonly to: string;
1370
- readonly amount: PaymentMoney;
1371
- readonly document: WithdrawalDocumentEnvelopeV1;
1372
- }
1373
- /**
1374
- * Payout via a saved destination. The caller selects the destination by opaque
1375
- * id and never re-enters a raw wallet address on this path.
1376
- */
1377
- interface PaymentsPayoutInput {
1378
- readonly actor?: ActorReference;
1379
- readonly destinationId: string;
1380
- readonly amount: PaymentMoney;
1381
- }
1382
1297
  type DestinationKind = "bank_account" | "mobile_money" | "external_account";
1383
1298
  type DestinationRail = {
1384
1299
  readonly kind: "bank";
@@ -1469,31 +1384,98 @@ interface ActivityListParams {
1469
1384
  readonly actor?: ActorReference;
1470
1385
  readonly cursor?: string;
1471
1386
  readonly limit?: number;
1472
- readonly paymentType?: PaymentType;
1473
- readonly timing?: PaymentTiming["kind"];
1474
1387
  }
1475
- interface ActivityItem {
1388
+ type ActivityReference = {
1389
+ readonly kind: "payment";
1390
+ readonly id: string;
1391
+ } | {
1392
+ readonly kind: "movement";
1393
+ readonly id: string;
1394
+ };
1395
+ type ActivityItem = {
1396
+ readonly kind: "payment";
1476
1397
  readonly id: string;
1477
- readonly actor: ActorReference;
1478
- readonly kind: "payment" | "payout" | "withdrawal" | "deposit" | "claim";
1479
- readonly direction: "in" | "out" | "internal";
1398
+ readonly ledgerKind: "Payment" | "Payout" | "Deposit";
1480
1399
  readonly status: PaymentStatus;
1481
1400
  readonly amount: PaymentMoney;
1482
- readonly title: string;
1483
- readonly subtitle: string | null;
1484
- readonly target: TargetReference | null;
1485
- readonly paymentId: string | null;
1486
1401
  readonly createdAt: number;
1487
1402
  readonly updatedAt: number;
1488
- }
1403
+ } | {
1404
+ readonly kind: "movement";
1405
+ readonly id: string;
1406
+ readonly classification: "movement_only_outflow";
1407
+ readonly createdAt: number;
1408
+ readonly updatedAt: number;
1409
+ };
1489
1410
  interface ActivityPage {
1490
1411
  readonly items: readonly ActivityItem[];
1491
- readonly nextCursor: string | null;
1412
+ readonly cursor: string | null;
1413
+ readonly checkpoint: number;
1414
+ }
1415
+ interface PaymentActivityEvidence {
1416
+ readonly chainId: 84532;
1417
+ readonly contractAddress: string;
1418
+ readonly tokenAddress: string;
1419
+ readonly transactionHash: string;
1420
+ readonly blockNumber: number;
1421
+ readonly blockHash: string;
1422
+ readonly finality: "finalized";
1423
+ readonly paymentEventLogIndex: number | null;
1424
+ readonly transferLogIndex: number;
1425
+ readonly settlementId: string | null;
1426
+ readonly source: string;
1427
+ readonly destination: string;
1428
+ readonly rawAmount: string;
1429
+ readonly link: {
1430
+ readonly paymentId: string;
1431
+ readonly movementId: string | null;
1432
+ readonly transactionHash: string;
1433
+ };
1434
+ }
1435
+ interface MovementActivityEvidence {
1436
+ readonly chainId: number;
1437
+ readonly contractAddress: string;
1438
+ readonly tokenAddress: string;
1439
+ readonly transactionHash: string;
1440
+ readonly blockNumber: number;
1441
+ readonly blockHash: string;
1442
+ readonly canonicalState: "finalized";
1443
+ readonly transferLogIndex: number;
1444
+ readonly source: string;
1445
+ readonly destination: string;
1446
+ readonly rawAmount: string;
1447
+ readonly link: {
1448
+ readonly movementId: string;
1449
+ readonly depositPaymentId: string | null;
1450
+ };
1451
+ }
1452
+ type ActivityDetail = {
1453
+ readonly kind: "payment";
1454
+ readonly payment: Payment;
1455
+ readonly evidence: PaymentActivityEvidence;
1456
+ } | {
1457
+ readonly kind: "movement";
1458
+ readonly movementId: string;
1459
+ readonly annotation: MovementAnnotation | null;
1460
+ readonly evidence: MovementActivityEvidence;
1461
+ };
1462
+ interface ActivityAnnotationInput {
1463
+ readonly actor?: ActorReference;
1464
+ readonly movementId: string;
1465
+ readonly counterpartyLabel?: string;
1466
+ readonly accountingCategory?: string;
1467
+ readonly memo?: string;
1492
1468
  }
1493
1469
  interface ActivityMethods {
1494
1470
  list(params?: ActivityListParams, options?: {
1495
1471
  readonly signal?: AbortSignal;
1496
1472
  }): Promise<CapxulResult<ActivityPage>>;
1473
+ get(reference: ActivityReference, options?: {
1474
+ readonly signal?: AbortSignal;
1475
+ }): Promise<CapxulResult<ActivityDetail | null>>;
1476
+ annotate(input: ActivityAnnotationInput, options?: {
1477
+ readonly signal?: AbortSignal;
1478
+ }): Promise<CapxulResult<MovementAnnotation>>;
1497
1479
  }
1498
1480
  interface OfframpQuoteInput {
1499
1481
  readonly actor?: ActorReference;
@@ -1522,75 +1504,6 @@ interface OfframpMethods {
1522
1504
  readonly signal?: AbortSignal;
1523
1505
  }): Promise<CapxulResult<OfframpStatus>>;
1524
1506
  }
1525
- interface PaymentSettlementInput {
1526
- readonly paymentId: string;
1527
- readonly evidence: OnchainEvidence;
1528
- }
1529
- /**
1530
- * Host-execution callback recording the on-chain escrow of a commitment
1531
- * (G3 · #546): `createCommitment` returned `onchainCommitmentId`, escrowing
1532
- * the total. `onchainCommitmentId` + the userOp/tx hashes are internal evidence,
1533
- * never on the wire (internal channel only).
1534
- */
1535
- interface CommitmentCreatedInput {
1536
- readonly paymentId: string;
1537
- readonly onchainCommitmentId: string;
1538
- readonly evidence: OnchainEvidence;
1539
- }
1540
- /** Host-execution callback recording a recipient-side `claim` (G3 · #546). */
1541
- interface CommitmentClaimInput {
1542
- readonly paymentId: string;
1543
- readonly evidence: OnchainEvidence;
1544
- }
1545
- /**
1546
- * Host-execution callback recording a creator-side `cancel` (G3 · #546):
1547
- * on-chain the unvested remainder returns to the creator; vested-unclaimed
1548
- * stays the recipient's. An optional credit-note document is appended.
1549
- */
1550
- interface CommitmentCancelInput {
1551
- readonly paymentId: string;
1552
- readonly evidence: OnchainEvidence;
1553
- readonly document?: PaymentDocumentEnvelopeV1;
1554
- }
1555
- /**
1556
- * Host-execution callback recording a pre-claim `redirect` to a new validated
1557
- * recipient (G3 · #546). `to` is a validated recipient (handle/email/payee id),
1558
- * never a raw address.
1559
- */
1560
- interface CommitmentRedirectInput {
1561
- readonly paymentId: string;
1562
- readonly to: Ref$1;
1563
- readonly evidence: OnchainEvidence;
1564
- readonly document?: PaymentDocumentEnvelopeV1;
1565
- }
1566
- /**
1567
- * Host-execution callback recording a settled ORG spend/payroll on the ONE
1568
- * `payments` ledger (D3 · #565). An org spend is a KIND of Payment — it lands a
1569
- * real `payments` row with `source:"org"` + `orgId` (no parallel `orgSpends`
1570
- * table, no synthetic client-side fabrication). The signer-side host calls this
1571
- * AFTER the on-chain Roles-modifier spend settles; `evidence` carries the
1572
- * internal userOp/tx hashes (never wire fields). `recipient` is the validated
1573
- * recipient ref label; `recipientSafeAddress` is internal evidence on the row.
1574
- */
1575
- interface OrgPaymentRecordInput {
1576
- readonly orgId: string;
1577
- readonly recipientLabel: string;
1578
- readonly recipientKind?: "handle" | "email" | "payee" | "capxulUserId" | "me" | "org";
1579
- readonly recipientRef?: string;
1580
- readonly recipientPayeeId?: string;
1581
- readonly recipientSafeAddress: string;
1582
- readonly amount: PaymentMoney;
1583
- readonly paymentType: PaymentType;
1584
- readonly document?: PaymentDocumentEnvelopeV1;
1585
- /** The org Safe the spend debited — bound as the `from` of the settlement transfer. */
1586
- readonly orgSafeAddress: string;
1587
- /**
1588
- * 0-based occurrence among batch runs with the same (recipient, amount), so
1589
- * each run binds to + de-dupes on its own on-chain `Transfer` (D3 · #565).
1590
- */
1591
- readonly occurrenceIndex: number;
1592
- readonly evidence: OnchainEvidence;
1593
- }
1594
1507
  interface PaymentDocumentVerification {
1595
1508
  readonly documentHash: string;
1596
1509
  readonly ok: boolean;
@@ -1609,73 +1522,6 @@ interface PaymentDocumentRender {
1609
1522
  readonly kind: PaymentDocumentKind;
1610
1523
  readonly html: string;
1611
1524
  }
1612
- /**
1613
- * Internal commitment execution reference (G3 · #546). The on-chain
1614
- * `onchainCommitmentId` is internal evidence (like userOp/tx hashes) — it never
1615
- * appears on the wire `Payment` or any MCP tool output, but the signer-side host
1616
- * needs it to build a claim/cancel/redirect UserOp. This is the server-internal
1617
- * channel that carries it (and the recipient Safe address for an auto-claim
1618
- * relayer), never a consumer-facing surface.
1619
- */
1620
- interface PaymentCommitmentRef {
1621
- readonly paymentId: string;
1622
- readonly onchainCommitmentId: string | null;
1623
- readonly status: PaymentStatus;
1624
- }
1625
- /**
1626
- * The host-execution + on-chain-evidence channel for Payments (D2 · #564).
1627
- * SPLIT OFF the public `PaymentsMethods` so an external builder consuming
1628
- * `@capxul/sdk` directly never sees the custody substrate. Reached only via
1629
- * `client.payments._internal` (mirrors `client._internal.*`); the signer-side
1630
- * host (the dev MCP edge / a self-custody integrator) drives it AFTER executing
1631
- * a UserOp. Every input carries the `OnchainEvidence` brand — never a wire field.
1632
- */
1633
- interface PaymentsInternalMethods {
1634
- /** Report on-chain settlement evidence for an instant payment. */
1635
- markSettled(input: PaymentSettlementInput, options?: {
1636
- readonly signal?: AbortSignal;
1637
- }): Promise<CapxulResult<Payment>>;
1638
- /**
1639
- * B3: report on-chain settlement evidence for a withdraw/cash-out. The
1640
- * backend binds the userOp to a matching external `Transfer` before settling.
1641
- */
1642
- markWithdrawalSettled(input: PaymentSettlementInput, options?: {
1643
- readonly signal?: AbortSignal;
1644
- }): Promise<CapxulResult<Payment>>;
1645
- /**
1646
- * Record the on-chain escrow of a commitment after `createCommitment` returns
1647
- * its `onchainCommitmentId` (G3 · #546).
1648
- */
1649
- markCommitmentCreated(input: CommitmentCreatedInput, options?: {
1650
- readonly signal?: AbortSignal;
1651
- }): Promise<CapxulResult<Payment>>;
1652
- /**
1653
- * Record a settled ORG spend/payroll on the one `payments` ledger
1654
- * (D3 · #565) — `source:"org"` + `orgId`, read back as a leak-safe Payment.
1655
- */
1656
- recordOrgPayment(input: OrgPaymentRecordInput, options?: {
1657
- readonly signal?: AbortSignal;
1658
- }): Promise<CapxulResult<Payment>>;
1659
- /** Record a recipient-side `claim` after the on-chain claim UserOp settles. */
1660
- claim(input: CommitmentClaimInput, options?: {
1661
- readonly signal?: AbortSignal;
1662
- }): Promise<CapxulResult<Payment>>;
1663
- /** Record a creator-side `cancel` reclaiming only the unvested remainder. */
1664
- cancel(input: CommitmentCancelInput, options?: {
1665
- readonly signal?: AbortSignal;
1666
- }): Promise<CapxulResult<Payment>>;
1667
- /** Record a pre-claim `redirect` to a new validated recipient. */
1668
- redirect(input: CommitmentRedirectInput, options?: {
1669
- readonly signal?: AbortSignal;
1670
- }): Promise<CapxulResult<Payment>>;
1671
- /**
1672
- * The on-chain commitment reference the signer-side host needs to build a
1673
- * claim/cancel/redirect UserOp. `onchainCommitmentId` is internal evidence.
1674
- */
1675
- commitmentRef(paymentId: string, options?: {
1676
- readonly signal?: AbortSignal;
1677
- }): Promise<CapxulResult<PaymentCommitmentRef | null>>;
1678
- }
1679
1525
  /**
1680
1526
  * The PUBLIC, Stripe-shaped Payments surface (D2 · #564). Genus verbs only —
1681
1527
  * `pay` / `list` / `get`. No `userOpHash` / `txHash` / `onchainCommitmentId` /
@@ -1686,15 +1532,14 @@ interface PaymentsMethods {
1686
1532
  pay(input: PaymentsPayInput, options?: {
1687
1533
  readonly signal?: AbortSignal;
1688
1534
  }): Promise<CapxulResult<Payment>>;
1689
- payout(input: PaymentsPayoutInput, options?: {
1535
+ createCommitment(input: PaymentsPayInput & {
1536
+ readonly timing: Exclude<PaymentTiming, {
1537
+ readonly kind: "instant";
1538
+ }>;
1539
+ }, options?: {
1690
1540
  readonly signal?: AbortSignal;
1691
1541
  }): Promise<CapxulResult<Payment>>;
1692
- /**
1693
- * B3 withdraw / cash-out: send USDX from the user's custody Safe to an
1694
- * external 0x wallet, minting a kind:4 Withdrawal document. Returns a
1695
- * leak-safe `Payment` (recipient label is the redacted address).
1696
- */
1697
- withdraw(input: PaymentsWithdrawInput, options?: {
1542
+ claim(paymentId: string, options?: {
1698
1543
  readonly signal?: AbortSignal;
1699
1544
  }): Promise<CapxulResult<Payment>>;
1700
1545
  list(options?: {
@@ -1706,14 +1551,12 @@ interface PaymentsMethods {
1706
1551
  cancel(paymentId: string, options?: {
1707
1552
  readonly signal?: AbortSignal;
1708
1553
  }): Promise<CapxulResult<Payment>>;
1709
- /**
1710
- * Host-execution + on-chain-evidence channel — off the public surface
1711
- * (production-surface-policy.md pattern). Self-custody integrators drive this;
1712
- * a Stripe-shaped consumer never does.
1713
- *
1714
- * @internal-use
1715
- */
1716
- readonly _internal: PaymentsInternalMethods;
1554
+ redirect(input: {
1555
+ readonly paymentId: string;
1556
+ readonly to: TargetReference;
1557
+ }, options?: {
1558
+ readonly signal?: AbortSignal;
1559
+ }): Promise<CapxulResult<Payment>>;
1717
1560
  }
1718
1561
  interface PaymentDocumentsMethods {
1719
1562
  verify(documentHash: string, options?: {
@@ -1728,13 +1571,6 @@ interface PaymentDocumentsMethods {
1728
1571
  readonly signal?: AbortSignal;
1729
1572
  }): Promise<CapxulResult<PaymentDocumentRender>>;
1730
1573
  }
1731
- interface ReconciliationEntry {
1732
- readonly paymentRequestId: string;
1733
- readonly reference: string;
1734
- readonly status: "paid" | "exception";
1735
- readonly settledPaymentId: string | null;
1736
- readonly receiptDocumentHash: string | null;
1737
- }
1738
1574
  interface FinancialOpsMethods {
1739
1575
  readonly me: MeMethods;
1740
1576
  readonly handles: HandlesMethods;
@@ -1823,9 +1659,6 @@ interface ActorRequestsMethods {
1823
1659
  cancel(requestId: string, options?: {
1824
1660
  readonly signal?: AbortSignal;
1825
1661
  }): Promise<CapxulResult<ActorRequest>>;
1826
- reconcile(options?: {
1827
- readonly signal?: AbortSignal;
1828
- }): Promise<CapxulResult<readonly ReconciliationEntry[]>>;
1829
1662
  }
1830
1663
  interface InboxItem {
1831
1664
  readonly id: string;
@@ -1849,31 +1682,6 @@ interface InboxMethods {
1849
1682
  readonly signal?: AbortSignal;
1850
1683
  }): Promise<CapxulResult<InboxItem>>;
1851
1684
  }
1852
- interface InsightsSummary {
1853
- readonly pending: {
1854
- readonly count: number;
1855
- readonly total: PaymentMoney;
1856
- };
1857
- readonly paidThisMonth: {
1858
- readonly count: number;
1859
- readonly total: PaymentMoney;
1860
- };
1861
- readonly drafts: {
1862
- readonly count: number;
1863
- };
1864
- readonly reconciliation: {
1865
- readonly open: number;
1866
- readonly exceptions: number;
1867
- };
1868
- }
1869
- interface InsightsMethods {
1870
- summary(options?: {
1871
- readonly signal?: AbortSignal;
1872
- }): Promise<CapxulResult<InsightsSummary>>;
1873
- history(options?: {
1874
- readonly signal?: AbortSignal;
1875
- }): Promise<CapxulResult<readonly Payment[]>>;
1876
- }
1877
1685
  interface ActorProfileMethods {
1878
1686
  get(options?: {
1879
1687
  readonly signal?: AbortSignal;
@@ -1886,7 +1694,6 @@ interface ActorRelationshipMethods {
1886
1694
  readonly addressBook: AddressBookMethods;
1887
1695
  readonly requests: ActorRequestsMethods;
1888
1696
  readonly inbox: InboxMethods;
1889
- readonly insights: InsightsMethods;
1890
1697
  readonly profile: ActorProfileMethods;
1891
1698
  }
1892
1699
  //#endregion
@@ -1902,7 +1709,7 @@ type AccountStatus = {
1902
1709
  readonly requirement: AccountRequirement;
1903
1710
  readonly chainId: number;
1904
1711
  readonly source: AccountProviderSource;
1905
- readonly signerAddress: Address;
1712
+ readonly signerAddress: Address$1;
1906
1713
  } | {
1907
1714
  readonly status: "accountPrepared";
1908
1715
  readonly requirement: AccountRequirement;
@@ -1996,35 +1803,7 @@ interface AccountsFaucetMethods {
1996
1803
  }>>;
1997
1804
  }
1998
1805
  //#endregion
1999
- //#region src/domain/org/spend-gate.d.ts
2000
- /**
2001
- * The role's allowed recipients. The address form backs the S4 `spend` path
2002
- * (recipient is a resolved `Address`); the string form backs the G4
2003
- * `spendViaPayments` / `batchPayroll` path, whose recipient is a VALIDATED REF
2004
- * (handle/email/payee/org) compared in the same ref space as the role's set.
2005
- * Comparison is case-insensitive over the raw string value either way.
2006
- */
2007
- type SpendGateRecipients = "anyone" | readonly (Address | string)[];
2008
- type SpendGateSubAccountScope = {
2009
- readonly scope: "all";
2010
- } | {
2011
- readonly scope: "only";
2012
- readonly subAccountIds: readonly SubAccountId[];
2013
- };
2014
- //#endregion
2015
1806
  //#region src/ports/org.d.ts
2016
- /**
2017
- * The minimal `{from, to, amount}` spend shape the authority read keys off
2018
- * (D3 #565). The legacy address-keyed `OrgSpendInput`/`org.spend` lane was
2019
- * hard-removed when `orgSpends` folded into the one `payments` ledger; the
2020
- * leak-safe ref-based lane (`spendViaPayments`/`batchPayroll`) constructs this
2021
- * internally and enforces the real validated recipient on the gate.
2022
- */
2023
- type OrgSpendShape = {
2024
- readonly from: SubAccountId;
2025
- readonly to: Address;
2026
- readonly amount: Money;
2027
- };
2028
1807
  type CreateOrgPortInput = {
2029
1808
  readonly input: CreateOrgInput;
2030
1809
  };
@@ -2050,36 +1829,6 @@ type DetectPendingOrgInvitationsInput = Record<never, never>;
2050
1829
  type DetectPendingOrgInvitationsResult$1 = {
2051
1830
  readonly matched: readonly OrgId[];
2052
1831
  };
2053
- type DeployOrgRolesInput = {
2054
- readonly orgId: OrgId;
2055
- };
2056
- type OrgRolesDeploymentResult = {
2057
- readonly orgId: OrgId;
2058
- readonly roles: readonly RoleView[];
2059
- };
2060
- type GrantOrgRoleInput = {
2061
- readonly orgId: OrgId;
2062
- readonly input: AssignRoleInput;
2063
- };
2064
- type RevokeOrgRoleInput = {
2065
- readonly orgId: OrgId;
2066
- readonly input: RemoveMemberInput;
2067
- };
2068
- type OrgSpendAuthority = {
2069
- readonly activeMember: boolean;
2070
- readonly subAccountBalanceRaw: string;
2071
- readonly recipients: SpendGateRecipients;
2072
- readonly subAccounts: SpendGateSubAccountScope;
2073
- readonly perTxCapRaw?: string | null;
2074
- readonly perDayCapRaw?: string | null;
2075
- readonly spentTodayRaw?: string | null;
2076
- readonly role?: string;
2077
- };
2078
- type ReadOrgSpendAuthorityInput = {
2079
- readonly orgId: OrgId;
2080
- readonly input: OrgSpendShape;
2081
- readonly amountRaw: string;
2082
- };
2083
1832
  declare const OrgError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
2084
1833
  readonly _tag: "OrgError";
2085
1834
  } & Readonly<A>;
@@ -2107,39 +1856,71 @@ interface OrgPort {
2107
1856
  resendInviteToken?(input: ResendOrgInviteTokenInput): Effect.Effect<MemberView, OrgError, never>;
2108
1857
  detectAndAcceptPendingInvitations(input: DetectPendingOrgInvitationsInput): Effect.Effect<DetectPendingOrgInvitationsResult$1, OrgError, never>;
2109
1858
  }
2110
- interface OrgRolesDeploymentPort {
2111
- deployRoles(input: DeployOrgRolesInput): Effect.Effect<OrgRolesDeploymentResult, OrgError, never>;
2112
- grantRole(input: GrantOrgRoleInput): Effect.Effect<MemberView, OrgError, never>;
2113
- revokeRole(input: RevokeOrgRoleInput): Effect.Effect<void, OrgError, never>;
1859
+ //#endregion
1860
+ //#region src/contract/permission.d.ts
1861
+ interface PermissionReadResult {
1862
+ readonly permissions: readonly Permission[];
1863
+ readonly assignments: readonly PermissionAssignment[];
2114
1864
  }
2115
- type SubmitOrgSpendViaPaymentsInput = {
2116
- readonly orgId: OrgId;
2117
- readonly input: OrgSpendViaPaymentsInput;
2118
- readonly amountRaw: string;
2119
- readonly authority: OrgSpendAuthority;
1865
+ //#endregion
1866
+ //#region src/surface/permissions.d.ts
1867
+ type PermissionOptions = {
1868
+ readonly signal?: AbortSignal;
2120
1869
  };
2121
- type SubmitOrgBatchPayrollInput = {
2122
- readonly orgId: OrgId;
2123
- readonly from: OrgSpendViaPaymentsInput["from"];
2124
- readonly runs: readonly {
2125
- readonly run: OrgPayrollRun;
2126
- readonly amountRaw: string;
2127
- }[];
2128
- readonly authorities: readonly OrgSpendAuthority[];
1870
+ type PermissionCreateInput = {
1871
+ readonly requestKey: string;
1872
+ readonly intent: PermissionIntent;
2129
1873
  };
2130
- interface OrgSpendPort {
2131
- readSpendAuthority(input: ReadOrgSpendAuthorityInput): Effect.Effect<OrgSpendAuthority, OrgError, never>;
2132
- /**
2133
- * Leak-safe org spend (G4 · #547; D3 #565 — the one ledger of record): execute
2134
- * the spend through the payments engine (Roles modifier → CapxulPayments),
2135
- * write a real `payments` row (`source:"org"`) and read it back as a `Payment`
2136
- * the wire carries no `txHash` / Safe / userOp internals. Optional so a
2137
- * hermetic adapter without a payments-submit lane still compiles; absent ⇒ the
2138
- * program falls back to a deterministic hermetic `Payment`.
2139
- */
2140
- submitSpendViaPayments?(input: SubmitOrgSpendViaPaymentsInput): Effect.Effect<Payment, OrgError, never>;
2141
- /** Leak-safe org payroll batch (G4 · #547): one MultiSend, one Payment per run. */
2142
- submitBatchPayroll?(input: SubmitOrgBatchPayrollInput): Effect.Effect<readonly Payment[], OrgError, never>;
1874
+ type PermissionChangeInput = PermissionCreateInput & {
1875
+ readonly permissionId: string;
1876
+ };
1877
+ type PermissionAssignInput = {
1878
+ readonly requestKey: string;
1879
+ readonly permissionId: string;
1880
+ readonly accountId: string;
1881
+ };
1882
+ type PermissionRevokeInput = {
1883
+ readonly requestKey: string;
1884
+ readonly permissionAssignmentId: string;
1885
+ };
1886
+ type PermissionReplaceInput = {
1887
+ readonly requestKey: string;
1888
+ };
1889
+ interface PermissionMethods {
1890
+ create(input: PermissionCreateInput, options?: PermissionOptions): Promise<CapxulResult<SubmittedPermissionExecution>>;
1891
+ change(input: PermissionChangeInput, options?: PermissionOptions): Promise<CapxulResult<SubmittedPermissionExecution>>;
1892
+ assign(input: PermissionAssignInput, options?: PermissionOptions): Promise<CapxulResult<SubmittedPermissionExecution>>;
1893
+ revoke(input: PermissionRevokeInput, options?: PermissionOptions): Promise<CapxulResult<SubmittedPermissionExecution>>;
1894
+ replace(input: PermissionReplaceInput, options?: PermissionOptions): Promise<CapxulResult<SubmittedPermissionExecution>>;
1895
+ list(options?: PermissionOptions): Promise<CapxulResult<PermissionReadResult>>;
1896
+ get(permissionId: string, options?: PermissionOptions): Promise<CapxulResult<Permission | null>>;
1897
+ }
1898
+ //#endregion
1899
+ //#region src/surface/organization-payments.d.ts
1900
+ interface OrganizationPaymentItemInput {
1901
+ readonly to: Ref$1;
1902
+ readonly amount: PaymentMoney;
1903
+ readonly paymentType?: PaymentType;
1904
+ readonly document?: AttachablePaymentDocumentEnvelopeV1;
1905
+ }
1906
+ interface OrganizationPaymentInput extends OrganizationPaymentItemInput {
1907
+ readonly permissionId: string;
1908
+ readonly requestKey: string;
1909
+ readonly lineage?: PaymentCommandLineage;
1910
+ }
1911
+ interface OrganizationPaymentBatchInput {
1912
+ readonly permissionId: string;
1913
+ readonly requestKey: string;
1914
+ readonly items: readonly OrganizationPaymentItemInput[];
1915
+ readonly lineage?: PaymentCommandLineage;
1916
+ }
1917
+ interface OrganizationPaymentsMethods {
1918
+ pay(input: OrganizationPaymentInput, options?: {
1919
+ readonly signal?: AbortSignal;
1920
+ }): Promise<CapxulResult<Payment>>;
1921
+ payBatch(input: OrganizationPaymentBatchInput, options?: {
1922
+ readonly signal?: AbortSignal;
1923
+ }): Promise<CapxulResult<readonly Payment[]>>;
2143
1924
  }
2144
1925
  //#endregion
2145
1926
  //#region src/surface/org.d.ts
@@ -2162,7 +1943,7 @@ type OrgView = {
2162
1943
  readonly id: OrgId;
2163
1944
  readonly name: string;
2164
1945
  readonly handle: string;
2165
- readonly safeAddress: Address; /** The viewing member's own role label within this org. */
1946
+ readonly safeAddress: Address$1; /** The viewing member's own role label within this org. */
2166
1947
  readonly role: string; /** The Org treasury — the real M2 Account over the Org Safe (D3). */
2167
1948
  readonly treasury: Account$1; /** #1064: onboarding-collected description + size bucket; null when unset. */
2168
1949
  readonly bio: string | null;
@@ -2194,7 +1975,7 @@ type MemberView = {
2194
1975
  readonly orgId: OrgId;
2195
1976
  readonly email: Email;
2196
1977
  readonly name: string | null; /** Member-identity key (D7). `null` until the invitee provisions a Safe. */
2197
- readonly personalSafeAddress: Address | null; /** The member's role label (maps deterministically to the on-chain `roleKey`, D9). */
1978
+ readonly personalSafeAddress: Address$1 | null; /** The member's role label (maps deterministically to the on-chain `roleKey`, D9). */
2198
1979
  readonly role: string;
2199
1980
  readonly roleKey: RoleKey | null;
2200
1981
  readonly status: MemberStatus;
@@ -2210,20 +1991,16 @@ type MemberView = {
2210
1991
  type RoleSpendCap = {
2211
1992
  readonly perTx?: Money;
2212
1993
  readonly perDay?: Money;
2213
- readonly toRecipients?: "anyone" | readonly Address[];
1994
+ readonly toRecipients?: "anyone" | readonly Address$1[];
2214
1995
  };
2215
1996
  /**
2216
1997
  * The Capxul-owned Role DSL definition (D4). `label` becomes the sticky
2217
1998
  * bytes32 `roleKey` on-chain. `spend` compiles to Level-1 on-chain Zodiac
2218
- * conditions; `subAccounts` + `canManage*` compile to Level-2 off-chain Convex
2219
- * guards (D5).
1999
+ * conditions. Management flags compile to off-chain guards.
2220
2000
  */
2221
2001
  type RoleDefinition = {
2222
2002
  readonly label: string;
2223
2003
  readonly spend?: RoleSpendCap;
2224
- readonly subAccounts?: {
2225
- readonly scope: "all" | readonly SubAccountId[];
2226
- };
2227
2004
  readonly canManageMembers?: boolean;
2228
2005
  readonly canManageRoles?: boolean;
2229
2006
  };
@@ -2257,8 +2034,8 @@ type CreateOrgInput = {
2257
2034
  /**
2258
2035
  * Input to `org(orgId).invite` (S3, D8). Email is the universal entry point —
2259
2036
  * inviting an address that is not yet a Capxul user auto-creates a `pending`
2260
- * membership that resolves on sign-in (the virality loop). `role` names the
2261
- * role label the invitee is granted on accept.
2037
+ * membership that resolves on sign-in. `role` is invitation metadata. It does
2038
+ * not grant an L2 Permission.
2262
2039
  */
2263
2040
  type InviteMemberInput = {
2264
2041
  readonly email: string;
@@ -2267,62 +2044,7 @@ type InviteMemberInput = {
2267
2044
  type ResendInviteTokenInput = {
2268
2045
  readonly email: string;
2269
2046
  };
2270
- /**
2271
- * Input to `org(orgId).removeMember` (S3, D8). Keyed on the member's personal
2272
- * Safe address (D7 — Safe-as-identity). Drives the on-chain REVOKE + Convex
2273
- * mirror.
2274
- */
2275
- type RemoveMemberInput = {
2276
- readonly memberSafeAddress: Address;
2277
- };
2278
- /**
2279
- * Input to `org(orgId).assignRole` (S3, D7/D9). Keyed on the member's personal
2280
- * Safe address (D7). Drives the on-chain GRANT + Convex mirror; the `role`
2281
- * label maps deterministically to the on-chain `roleKey`.
2282
- */
2283
- type AssignRoleInput = {
2284
- readonly memberSafeAddress: Address;
2285
- readonly role: string;
2286
- };
2287
- /**
2288
- * Input to `org(orgId).spendViaPayments` (G4 · #547). The LEAK-SAFE org spend:
2289
- * delegates `org.spend` to the payments engine WITH the member's org role
2290
- * authority and returns a `Payment`, not a `txHash`. `to` is a VALIDATED
2291
- * recipient ref (handle / email / payee id / org handle) — never a raw
2292
- * `Address` (the legacy address-keyed `org.spend` lane was hard-removed in D3
2293
- * #565 when `orgSpends` was folded into the one `payments` ledger).
2294
- * `from` is the Level-2 sub-account envelope the spend draws from (D5).
2295
- */
2296
- type OrgSpendViaPaymentsInput = {
2297
- readonly from: SubAccountId; /** Validated recipient ref (handle/email/payee/org) — never a raw address. */
2298
- readonly to: Ref$1;
2299
- readonly amount: Money; /** Full EIP-712 payment document; hashed + stored, committed on-chain. */
2300
- readonly document?: PaymentDocumentEnvelopeV1;
2301
- readonly timing?: PaymentTiming;
2302
- readonly paymentType?: PaymentType;
2303
- };
2304
- /**
2305
- * One run in an `org(orgId).batchPayroll` batch (G4 · #547): a validated
2306
- * recipient, an amount, and an optional payslip document. Each run is gated
2307
- * independently against the role's per-tx / per-day / recipient conditions.
2308
- */
2309
- type OrgPayrollRun = {
2310
- /** Validated recipient ref (handle/email/payee/org) — never a raw address. */readonly to: Ref$1;
2311
- readonly amount: Money;
2312
- readonly timing?: PaymentTiming; /** The payslip — an EIP-712 payment document, committed by `documentHash`. */
2313
- readonly payslip?: PaymentDocumentEnvelopeV1;
2314
- };
2315
- /**
2316
- * Input to `org(orgId).batchPayroll` (G4 · #547). Pays N employees in one
2317
- * MultiSend through the Roles modifier; each carries a payslip and settles as
2318
- * `paymentType = payroll`. Every run is gated; an over-cap run REJECTS the
2319
- * whole batch (no partial treasury drain). Returns one leak-safe `Payment` per
2320
- * run.
2321
- */
2322
- type OrgBatchPayrollInput = {
2323
- readonly from: SubAccountId;
2324
- readonly runs: readonly OrgPayrollRun[];
2325
- };
2047
+ /** Organization ids whose pending invitations match the current Account. */
2326
2048
  type DetectPendingOrgInvitationsResult = {
2327
2049
  readonly matched: readonly OrgId[];
2328
2050
  };
@@ -2332,46 +2054,6 @@ type DetectPendingOrgInvitationsResult = {
2332
2054
  * stateful active context). `treasury()` returns the real M2 `Account` over
2333
2055
  * the Org Safe (D3).
2334
2056
  */
2335
- interface PayrollRosterLine {
2336
- readonly id: string;
2337
- readonly employee: Ref$1;
2338
- readonly amount: Money;
2339
- readonly timing: PaymentTiming;
2340
- readonly status: "active" | "paused" | "ended";
2341
- }
2342
- interface PayrollPayslipTemplate {
2343
- readonly title: string;
2344
- readonly memo?: string;
2345
- }
2346
- interface PayrollRosterAddInput {
2347
- readonly employee: Ref$1;
2348
- readonly amount: Money;
2349
- readonly timing: PaymentTiming;
2350
- readonly payslipTemplate?: PaymentDocumentEnvelopeV1 | PayrollPayslipTemplate;
2351
- }
2352
- interface PayrollRunInput {
2353
- readonly from: SubAccountId;
2354
- readonly period: string;
2355
- }
2356
- interface PayrollMethods {
2357
- readonly roster: {
2358
- add(input: PayrollRosterAddInput, options?: {
2359
- readonly signal?: AbortSignal;
2360
- }): Promise<CapxulResult<PayrollRosterLine>>;
2361
- list(options?: {
2362
- readonly signal?: AbortSignal;
2363
- }): Promise<CapxulResult<readonly PayrollRosterLine[]>>;
2364
- update(rosterLineId: string, input: Partial<PayrollRosterAddInput>, options?: {
2365
- readonly signal?: AbortSignal;
2366
- }): Promise<CapxulResult<PayrollRosterLine>>;
2367
- remove(rosterLineId: string, options?: {
2368
- readonly signal?: AbortSignal;
2369
- }): Promise<CapxulResult<PayrollRosterLine>>;
2370
- };
2371
- run(input: PayrollRunInput, options?: {
2372
- readonly signal?: AbortSignal;
2373
- }): Promise<CapxulResult<readonly Payment[]>>;
2374
- }
2375
2057
  interface OrgScopedMethods extends ActorRelationshipMethods {
2376
2058
  /** Observe the durable, leak-safe lifecycle for this Organization only. */
2377
2059
  getLifecycle(options?: {
@@ -2396,36 +2078,17 @@ interface OrgScopedMethods extends ActorRelationshipMethods {
2396
2078
  roles(options?: {
2397
2079
  readonly signal?: AbortSignal;
2398
2080
  }): Promise<CapxulResult<readonly RoleView[]>>;
2399
- deployRoles(options?: {
2400
- readonly signal?: AbortSignal;
2401
- }): Promise<CapxulResult<readonly RoleView[]>>;
2402
2081
  invite(input: InviteMemberInput, options?: {
2403
2082
  readonly signal?: AbortSignal;
2404
2083
  }): Promise<CapxulResult<MemberView>>;
2405
- removeMember(input: RemoveMemberInput, options?: {
2406
- readonly signal?: AbortSignal;
2407
- }): Promise<CapxulResult<void>>;
2408
- assignRole(input: AssignRoleInput, options?: {
2409
- readonly signal?: AbortSignal;
2410
- }): Promise<CapxulResult<MemberView>>;
2411
2084
  /**
2412
- * Leak-safe org spend (G4 · #547; D3 #565 — the one ledger of record): execute
2413
- * the spend through the payments engine with the member's org role authority
2085
+ * Leak-safe Organization payment: execute through the payments engine with
2086
+ * the selected receipt-verified Budget Permission
2414
2087
  * and return a `Payment` (no `to: Address`, no `txHash`, no Safe / userOp
2415
2088
  * internals). Writes a real `payments` row (`source:"org"`).
2416
2089
  */
2417
- spendViaPayments(input: OrgSpendViaPaymentsInput, options?: {
2418
- readonly signal?: AbortSignal;
2419
- }): Promise<CapxulResult<Payment>>;
2420
- /**
2421
- * Org payroll batch (G4 · #547): pay N employees in one MultiSend through the
2422
- * Roles modifier, each with a payslip. Every run is gated; an over-cap run
2423
- * rejects the whole batch. Returns one leak-safe `Payment` per run.
2424
- */
2425
- batchPayroll(input: OrgBatchPayrollInput, options?: {
2426
- readonly signal?: AbortSignal;
2427
- }): Promise<CapxulResult<readonly Payment[]>>;
2428
- readonly payroll: PayrollMethods;
2090
+ readonly permissions: PermissionMethods;
2091
+ readonly payments: OrganizationPaymentsMethods;
2429
2092
  auditLog(options?: {
2430
2093
  readonly signal?: AbortSignal;
2431
2094
  }): Promise<CapxulResult<readonly OrganizationAuditLogItem[]>>;
@@ -2526,28 +2189,13 @@ interface SystemMethods {
2526
2189
  }): Promise<CapxulResult<SystemHealth>>;
2527
2190
  }
2528
2191
  //#endregion
2529
- //#region src/surface/sub-accounts.d.ts
2530
- interface SubAccountsMethods {
2531
- create(accountId: AccountId, input: {
2532
- readonly name: string;
2192
+ //#region src/surface/holdings.d.ts
2193
+ interface HoldingsMethods {
2194
+ current(input?: {
2195
+ readonly actor?: ActorReference;
2533
2196
  }, options?: {
2534
2197
  readonly signal?: AbortSignal;
2535
- }): Promise<CapxulResult<SubAccount>>;
2536
- get(subAccountId: SubAccountId, options?: {
2537
- readonly signal?: AbortSignal;
2538
- }): Promise<CapxulResult<SubAccount | null>>;
2539
- list(accountId: AccountId, options?: {
2540
- readonly signal?: AbortSignal;
2541
- }): Promise<CapxulResult<readonly SubAccount[]>>;
2542
- rename(subAccountId: SubAccountId, name: string, options?: {
2543
- readonly signal?: AbortSignal;
2544
- }): Promise<CapxulResult<SubAccount>>;
2545
- delete(subAccountId: SubAccountId, options?: {
2546
- readonly signal?: AbortSignal;
2547
- }): Promise<CapxulResult<void>>;
2548
- transfer(input: TransferInput, options?: {
2549
- readonly signal?: AbortSignal;
2550
- }): Promise<CapxulResult<TransferResult>>;
2198
+ }): Promise<CapxulResult<CurrentHoldings>>;
2551
2199
  }
2552
2200
  //#endregion
2553
2201
  //#region src/surface/_shared/effect-actor-bridge.d.ts
@@ -2642,6 +2290,7 @@ interface CapxulClient {
2642
2290
  */
2643
2291
  readonly payments: PaymentsMethods;
2644
2292
  readonly activity: ActivityMethods;
2293
+ readonly holdings: HoldingsMethods;
2645
2294
  readonly offramp: OfframpMethods;
2646
2295
  /** Payment document verification (G2 · #545): re-derive the EIP-712 hash. */
2647
2296
  readonly paymentDocuments: PaymentDocumentsMethods;
@@ -2649,13 +2298,11 @@ interface CapxulClient {
2649
2298
  * Media surface (#1061 / ADR-0014): profile-image + org-logo upload/record.
2650
2299
  */
2651
2300
  readonly media: MediaMethods;
2652
- /** Sub-account lifecycle (M2 Slice S2a · #267). Transfer lands in S2b. */
2653
- readonly subAccounts: SubAccountsMethods;
2654
2301
  /**
2655
2302
  * Organization domain surface (canon `org-domain-model.md` §C2/§C3, D13).
2656
2303
  * `createOrg(input)` creates an Org; `orgs()` lists the Orgs you belong to;
2657
- * `org(orgId)` resolves the entity-scoped bundle (treasury / members / roles
2658
- * / invite / removeMember / assignRole / spend). Explicit entity scoping —
2304
+ * `org(orgId)` resolves the entity-scoped bundle (treasury / members / roles,
2305
+ * invitations, Permissions, and payments). Explicit entity scoping —
2659
2306
  * NO stateful active context (D13). RED until the S1→S4 slices fill it.
2660
2307
  */
2661
2308
  readonly createOrg: OrgMethods["createOrg"];
@@ -2743,10 +2390,6 @@ interface CreateCapxulClientInput {
2743
2390
  readonly orgDeploymentPort?: OrgPort;
2744
2391
  /** Locked D6 data-port name. Prefer over `orgDeploymentPort` in new code. */
2745
2392
  readonly orgPort?: OrgPort;
2746
- /** S2 deploy/grant/revoke port. S2 uses deploy; S3 adds grant/revoke. */
2747
- readonly orgRolesDeploymentPort?: OrgRolesDeploymentPort;
2748
- /** S4 treasury-spend authority + submit port. */
2749
- readonly orgSpendPort?: OrgSpendPort;
2750
2393
  /**
2751
2394
  * Internal Organization lifecycle capability. The Core SDK owns its
2752
2395
  * choreography; production composition supplies the provider/backend steps.
@@ -2760,5 +2403,4 @@ interface CreateCapxulClientInput {
2760
2403
  };
2761
2404
  }
2762
2405
  //#endregion
2763
- export { InsightsSummary as $, OrgSetupStep as $t, PayrollRosterLine as A, PaymentMoney as At, ActorProfileMethods as B, RecipientResolutionKind as Bt, OrgTemplate as C, PayeesMethods as Ct, PayrollMethods as D, PaymentDocumentRender as Dt, OrganizationAuditLogItem as E, PaymentDocumentRef as Et, RoleSpendCap as F, PaymentsMethods as Ft, AddressBookAddInput as G, TargetsMethods as Gt, ActorRequest as H, Ref$1 as Ht, RoleView as I, PaymentsPayInput as It, AddressBookMethods as J, isSettingUpLifecycle as Jt, AddressBookEntry as K, AccountLifecycle as Kt, AccountsMethods as L, PaymentsPayoutInput as Lt, RemoveMemberInput as M, PaymentStatus as Mt, ResendInviteTokenInput as N, PaymentTiming as Nt, PayrollPayslipTemplate as O, PaymentDocumentVerification as Ot, RoleDefinition as P, PaymentType as Pt, InsightsMethods as Q, OrgLifecycle as Qt, AccountMethods as R, PaymentsWithdrawInput as Rt, OrgSpendViaPaymentsInput as S, Payee as St, OrganizationAccount as T, PaymentDocumentKind as Tt, ActorRequestIssueInput as U, ResolvedTarget as Ut, ActorRelationshipMethods as V, ReconciliationEntry as Vt, ActorRequestsMethods as W, TargetReference as Wt, InboxItem as X, SmartAccountMethods as Xt, InboxApproveInput as Y, IdentityMethods as Yt, InboxMethods as Z, AuthMethods as Zt, MemberView as _, InvocationControls as _n, MeProfile as _t, IdentityRuntimeSendResult as a, TelemetryEvent as an, DepositInstructions as at, OrgPayrollRun as b, OfframpQuoteInput as bt, SystemHealth as c, TelemetryPort as cn, DestinationKind as ct, CurrentUserMethods as d, IdentityState as dn, DestinationRail as dt, WireObservationContext as en, ActivityItem as et, AssignRoleInput as f, OrgLane as fn, DestinationRemoveInput as ft, MemberStatus as g, IdentityTransition as gn, MeMethods as gt, InviteMemberInput as h, destination as hn, HandlesMethods as ht, IdentityRuntime as i, CapxulEnv as in, ActorReference as it, PayrollRunInput as j, PaymentSettlementInput as jt, PayrollRosterAddInput as k, PaymentDocumentsMethods as kt, MediaMethods as l, Destination$1 as ln, DestinationListInput as lt, DetectPendingOrgInvitationsResult as m, StateLabel as mn, FinancialOpsMethods as mt, CreateCapxulClientInput as n, TransferInput as nn, ActivityMethods as nt, SubAccountsMethods as o, TelemetryGroupInput as on, Destination as ot, CreateOrgInput as p, Readiness as pn, DestinationsMethods as pt, AddressBookLabelInput as q, AccountSetupStep as qt, IdentityProfileDetails as r, TransferResult as rn, ActivityPage as rt, SystemMethods as s, TelemetryIdentifyInput as sn, DestinationAddInput as st, CapxulClient as t, TransferEndpoint as tn, ActivityListParams as tt, CurrentUserContext as u, IdentityEvent as un, DestinationPayload as ut, OrgBatchPayrollInput as v, OfframpMethods as vt, OrgView as w, Payment as wt, OrgScopedMethods as x, OfframpStatus as xt, OrgMethods as y, OfframpQuote as yt, ActorProfile as z, RecipientResolution as zt };
2764
- //# sourceMappingURL=create-capxul-client-C7H5b68l.d.mts.map
2406
+ export { InboxMethods as $, WireObservationContext as $t, OrganizationPaymentsMethods as A, PaymentDocumentRender as At, AccountMethods as B, RecipientResolutionKind as Bt, ResendInviteTokenInput as C, OfframpQuoteInput as Ct, OrganizationPaymentBatchInput as D, Payment as Dt, RoleView as E, PayeesMethods as Et, PermissionOptions as F, PaymentTiming as Ft, ActorRequestIssueInput as G, AccountLifecycle as Gt, ActorProfileMethods as H, ResolvedTarget as Ht, PermissionReplaceInput as I, PaymentType as It, AddressBookEntry as J, IdentityMethods as Jt, ActorRequestsMethods as K, AccountSetupStep as Kt, PermissionRevokeInput as L, PaymentsMethods as Lt, PermissionChangeInput as M, PaymentDocumentsMethods as Mt, PermissionCreateInput as N, PaymentMoney as Nt, OrganizationPaymentInput as O, PaymentDocumentKind as Ot, PermissionMethods as P, PaymentStatus as Pt, InboxItem as Q, OrgSetupStep as Qt, PermissionReadResult as R, PaymentsPayInput as Rt, OrganizationAuditLogItem as S, OfframpQuote as St, RoleSpendCap as T, Payee as Tt, ActorRelationshipMethods as U, TargetReference as Ut, ActorProfile as V, Ref$1 as Vt, ActorRequest as W, TargetsMethods as Wt, AddressBookMethods as X, AuthMethods as Xt, AddressBookLabelInput as Y, SmartAccountMethods as Yt, InboxApproveInput as Z, OrgLifecycle as Zt, OrgMethods as _, IdentityTransition as _n, FinancialOpsMethods as _t, IdentityRuntimeSendResult as a, TelemetryEvent as an, ActivityPage as at, OrgView as b, MeProfile as bt, SystemHealth as c, TelemetryPort as cn, DepositInstructions as ct, CurrentUserMethods as d, IdentityEvent as dn, DestinationKind as dt, CurrentHoldings as en, ActivityAnnotationInput as et, CreateOrgInput as f, IdentityState as fn, DestinationListInput as ft, MemberView as g, destination as gn, DestinationsMethods as gt, MemberStatus as h, StateLabel as hn, DestinationRemoveInput as ht, IdentityRuntime as i, CapxulEnv as in, ActivityMethods as it, PermissionAssignInput as j, PaymentDocumentVerification as jt, OrganizationPaymentItemInput as k, PaymentDocumentRef as kt, MediaMethods as l, CAPXUL_PAYMENTS_V2_ADDRESS as ln, Destination as lt, InviteMemberInput as m, Readiness as mn, DestinationRail as mt, CreateCapxulClientInput as n, Permission as nn, ActivityItem as nt, HoldingsMethods as o, TelemetryGroupInput as on, ActivityReference as ot, DetectPendingOrgInvitationsResult as p, OrgLane as pn, DestinationPayload as pt, AddressBookAddInput as q, isSettingUpLifecycle as qt, IdentityProfileDetails as r, SubmittedPermissionExecution as rn, ActivityListParams as rt, SystemMethods as s, TelemetryIdentifyInput as sn, ActorReference as st, CapxulClient as t, MovementAnnotation as tn, ActivityDetail as tt, CurrentUserContext as u, Destination$1 as un, DestinationAddInput as ut, OrgScopedMethods as v, InvocationControls as vn, HandlesMethods as vt, RoleDefinition as w, OfframpStatus as wt, OrganizationAccount as x, OfframpMethods as xt, OrgTemplate as y, MeMethods as yt, AccountsMethods as z, RecipientResolution as zt };