@capxul/sdk 1.0.0-alpha.12 → 1.0.0-alpha.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,14 +1,10 @@
1
- import { a as AccountProvider, c as Eip1193Provider, d as CapxulResult, f as Profile, g as AuthCachePort, i as injectedWalletSigner, l as eip1193AccountProvider, m as SmartAccount, n as CapxulSigner, o as AccountProviderSource, p as Session, r as Eip1193RequestProvider, s as AccountRequirement, t as CapxulDigestSigner, u as localPrivateKeyAccountProvider, v as CachedJwt } from "./signer-DEMJbpJ2.mjs";
2
- import { a as SafeDeploymentEvidence, n as SafeDeploymentConfig } from "./safe-deployment-DMGB1kEL.mjs";
3
- import { CapxulError, CapxulError as CapxulError$1, CapxulErrorCode, CapxulErrorCode as CapxulErrorCode$1, CapxulErrorDetails, CapxulErrorDetails as CapxulErrorDetails$1, isCapxulError } from "@capxul/errors";
4
- import { CapxulError as CapxulError$2, CapxulErrorCode as CapxulErrorCode$2, CapxulErrorDetails as CapxulErrorDetails$2, FailureMode } from "@capxul/config";
5
- import { Account, Account as Account$1, AccountId, Address, Address as Address$1, AllowedOrigin, AnonymousDistinctId, AppId, AuthSession, AuthSession as AuthSession$1, AuthUserId, AuthUserId as AuthUserId$1, ChainId, CountryCode, DeveloperApplication, DurationMs, Email, EpochMs, Money, Money as Money$1, OrgId, OrgId as OrgId$1, Profile as Profile$1, PublishableKey, PublishableKeyId, PublishableKeyRecord, RoleKey, RoleKey as RoleKey$1, RunId, SessionToken, SmartAccount as SmartAccount$1, SubAccount, SubAccount as SubAccount$1, SubAccountId, SubAccountId as SubAccountId$1 } from "@capxul/types";
1
+ import { A as SubAccount, C as PublishableKey, D as RunId, E as RoleKey, F as CapxulErrorDetails, I as FailureMode, L as isCapxulError, N as CapxulError, O as SessionToken, P as CapxulErrorCode, S as Profile$1, T as PublishableKeyRecord, _ as EpochMs, a as AnonymousDistinctId, b as Money, c as AuthUserId, d as CountryCode, f as CurrencyCode, g as Email, h as DurationMs, i as AllowedOrigin, j as SubAccountId, k as SmartAccount$1, m as DocumentHash, n as AccountId, o as AppId, p as DeveloperApplication, r as Address, s as AuthSession, t as Account, u as ChainId, w as PublishableKeyId, x as OrgId } from "./index-D0SflScT.mjs";
2
+ import { a as SafeDeploymentEvidence, n as SafeDeploymentConfig } from "./safe-deployment-ToMPzqwk.mjs";
3
+ import { a as AccountProvider, c as Eip1193Provider, d as CapxulResult, f as Profile, g as AuthCachePort, i as injectedWalletSigner, l as eip1193AccountProvider, m as SmartAccount, n as CapxulSigner, o as AccountProviderSource, p as Session, r as Eip1193RequestProvider, s as AccountRequirement, t as CapxulDigestSigner, u as localPrivateKeyAccountProvider, v as CachedJwt } from "./signer-Cp2G98ZK.mjs";
4
+ import { Hex } from "viem";
6
5
  import { Context, Effect, Layer, Request } from "effect";
7
6
  import { FunctionReference } from "convex/server";
8
- import { Hex } from "viem";
9
7
  import { Schema } from "@effect/schema";
10
- import { AttachablePaymentDocumentEnvelopeV1, LineItemV1, OnchainEvidence, PaymentDocumentEnvelopeV1, WithdrawalDocumentEnvelopeV1 } from "@capxul/wire";
11
- import { TelemetryPort } from "@capxul/observability";
12
8
  import { Machine } from "@effect/experimental";
13
9
 
14
10
  //#region src/ports/auth-client.d.ts
@@ -43,8 +39,8 @@ declare class AuthClientError extends AuthClientError_base<{
43
39
  interface AuthClientPort {
44
40
  canSendOtp(input: CanSendOtpInput, options?: AuthClientOperationOptions): Effect.Effect<CanSendOtpStatus, AuthClientError>;
45
41
  sendOtp(input: SendOtpInput, options?: AuthClientOperationOptions): Effect.Effect<void, AuthClientError>;
46
- verifyOtp(input: VerifyOtpInput, options?: AuthClientOperationOptions): Effect.Effect<AuthSession$1, AuthClientError>;
47
- getSession(options?: AuthClientOperationOptions): Effect.Effect<AuthSession$1 | null, AuthClientError>;
42
+ verifyOtp(input: VerifyOtpInput, options?: AuthClientOperationOptions): Effect.Effect<AuthSession, AuthClientError>;
43
+ getSession(options?: AuthClientOperationOptions): Effect.Effect<AuthSession | null, AuthClientError>;
48
44
  signOut(options?: AuthClientOperationOptions): Effect.Effect<void, AuthClientError>;
49
45
  /**
50
46
  * Fetches a Convex-aud JWT from `/api/auth/convex/token` (W7). Server mints
@@ -69,6 +65,50 @@ declare class ClockError extends ClockError_base<{
69
65
  readonly cause: unknown;
70
66
  }> {}
71
67
  //#endregion
68
+ //#region ../observability/src/telemetry-port.d.ts
69
+ /**
70
+ * Context for reporting handled errors via `reportHandledError`.
71
+ * Carries structured metadata extracted from the error context.
72
+ */
73
+ interface HandledErrorReportContext$1 {
74
+ readonly layer?: string;
75
+ readonly operation?: string;
76
+ readonly failure_mode?: FailureMode;
77
+ readonly provider?: string;
78
+ }
79
+ /**
80
+ * Canonical TelemetryPort interface. Every adapter (production, test, in-memory)
81
+ * implements this contract. All methods return `Effect<void, never>` —
82
+ * fire-and-forget, defects are caught and traced.
83
+ */
84
+ interface TelemetryPort {
85
+ readonly emit: (event: TelemetryEvent) => Effect.Effect<void, never>;
86
+ readonly identify: (input: TelemetryIdentifyInput) => Effect.Effect<void, never>;
87
+ readonly group: (input: TelemetryGroupInput) => Effect.Effect<void, never>;
88
+ readonly reset: () => Effect.Effect<void, never>;
89
+ readonly reportHandledError?: (error: CapxulError, context?: HandledErrorReportContext$1) => Effect.Effect<void, never>;
90
+ }
91
+ //#endregion
92
+ //#region ../observability/src/index.d.ts
93
+ declare const TELEMETRY_EVENT_NAMES: readonly ["auth_otp_requested", "auth_otp_delivered", "auth_otp_expired", "auth_verified", "auth_failed", "auth_signed_out", "provisioning_safe_created", "provisioning_safe_confirmed", "bootstrap_resolved", "bootstrap_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_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"];
94
+ type TelemetryEventName = (typeof TELEMETRY_EVENT_NAMES)[number];
95
+ type TelemetryProps = Record<string, unknown>;
96
+ type TelemetryEvent = {
97
+ readonly name: TelemetryEventName;
98
+ readonly props?: TelemetryProps | undefined;
99
+ };
100
+ interface TelemetryIdentifyInput {
101
+ readonly distinctId: string;
102
+ readonly anonDistinctId?: AnonymousDistinctId;
103
+ readonly traits?: TelemetryProps;
104
+ readonly properties?: TelemetryProps;
105
+ }
106
+ interface TelemetryGroupInput {
107
+ readonly groupType: string;
108
+ readonly groupKey: string;
109
+ readonly properties?: TelemetryProps;
110
+ }
111
+ //#endregion
72
112
  //#region src/flows/auth.d.ts
73
113
  interface AuthFlowInput {
74
114
  readonly otpTtlMs?: number;
@@ -77,10 +117,10 @@ type AuthFlowState = "idle" | "sending_otp" | "otp_requested" | "verifying" | "a
77
117
  interface AuthFlowContext {
78
118
  readonly state: AuthFlowState;
79
119
  readonly email: Email | null;
80
- readonly session: AuthSession$1 | null;
120
+ readonly session: AuthSession | null;
81
121
  readonly otpRequestedAt: EpochMs | null;
82
122
  readonly anonDistinctId?: AnonymousDistinctId;
83
- readonly error: CapxulError$2 | null;
123
+ readonly error: CapxulError | null;
84
124
  }
85
125
  interface AuthFlowObserver {
86
126
  readonly input: AuthFlowInput;
@@ -108,10 +148,10 @@ declare const EnvError_base: new <A extends Record<string, any> = {}>(args: impo
108
148
  readonly _tag: "EnvError";
109
149
  } & Readonly<A>;
110
150
  declare class EnvError extends EnvError_base<{
111
- readonly publicError: CapxulError$2;
112
- readonly publicCode?: CapxulErrorCode$2;
151
+ readonly publicError: CapxulError;
152
+ readonly publicCode?: CapxulErrorCode;
113
153
  readonly key?: string;
114
- readonly details?: CapxulErrorDetails$2;
154
+ readonly details?: CapxulErrorDetails;
115
155
  readonly cause?: unknown;
116
156
  }> {}
117
157
  interface EnvPort {
@@ -133,11 +173,11 @@ declare const TransportError_base: new <A extends Record<string, any> = {}>(args
133
173
  declare class TransportError extends TransportError_base<{
134
174
  readonly operation: TransportOperationKind;
135
175
  readonly name: string;
136
- readonly publicCode: CapxulErrorCode$2;
137
- readonly publicError: CapxulError$2;
176
+ readonly publicCode: CapxulErrorCode;
177
+ readonly publicError: CapxulError;
138
178
  readonly cause: unknown;
139
179
  readonly correlationId?: string;
140
- readonly details?: CapxulErrorDetails$2;
180
+ readonly details?: CapxulErrorDetails;
141
181
  }> {}
142
182
  interface TransportPort {
143
183
  readonly runQuery: <TOutput = unknown, TArgs = unknown>(request: TransportRequest<TArgs>) => Effect.Effect<TOutput, TransportError>;
@@ -179,9 +219,9 @@ declare const BootstrapError_base: new <A extends Record<string, any> = {}>(args
179
219
  declare class BootstrapError extends BootstrapError_base<{
180
220
  readonly operation: "resolve";
181
221
  readonly kind: BootstrapErrorKind;
182
- readonly publicCode: CapxulErrorCode$2;
222
+ readonly publicCode: CapxulErrorCode;
183
223
  readonly cause: unknown;
184
- readonly details?: CapxulErrorDetails$2;
224
+ readonly details?: CapxulErrorDetails;
185
225
  }> {}
186
226
  interface BootstrapPort {
187
227
  readonly resolve: (input: BootstrapInput) => Effect.Effect<BootstrapResolution, BootstrapError>;
@@ -225,7 +265,7 @@ type Unsubscribe = () => void;
225
265
  *
226
266
  * @internal-use
227
267
  */
228
- type Snapshot<T, E = CapxulError$2> = {
268
+ type Snapshot<T, E = CapxulError> = {
229
269
  readonly status: "loading";
230
270
  } | {
231
271
  readonly status: "ok";
@@ -241,10 +281,10 @@ declare const ConvexCallError_base: new <A extends Record<string, any> = {}>(arg
241
281
  } & Readonly<A>;
242
282
  declare class ConvexCallError extends ConvexCallError_base<{
243
283
  readonly operation: string;
244
- readonly publicCode: CapxulErrorCode$2;
245
- readonly publicError: CapxulError$2;
284
+ readonly publicCode: CapxulErrorCode;
285
+ readonly publicError: CapxulError;
246
286
  readonly cause: unknown;
247
- readonly details?: CapxulErrorDetails$2;
287
+ readonly details?: CapxulErrorDetails;
248
288
  }> {}
249
289
  interface ConvexCallPort {
250
290
  query<TArgs extends Record<string, unknown>, TOutput>(fn: FunctionReference<"query", "public", TArgs, TOutput>, args: TArgs): Effect.Effect<TOutput, ConvexCallError>;
@@ -261,22 +301,22 @@ interface ConvexCallPort {
261
301
  //#endregion
262
302
  //#region src/ports/credentials.d.ts
263
303
  type CreateApplicationInput = {
264
- readonly authUserId: AuthUserId$1;
304
+ readonly authUserId: AuthUserId;
265
305
  readonly name: string;
266
306
  readonly allowedOrigins: readonly AllowedOrigin[];
267
307
  };
268
308
  type MintKeyInput = {
269
309
  readonly applicationId: AppId;
270
- readonly authUserId: AuthUserId$1;
310
+ readonly authUserId: AuthUserId;
271
311
  };
272
312
  type RotateKeyInput = {
273
313
  readonly keyId: PublishableKeyId;
274
- readonly authUserId: AuthUserId$1;
314
+ readonly authUserId: AuthUserId;
275
315
  readonly graceMs: DurationMs;
276
316
  };
277
317
  type RevokeKeyInput = {
278
318
  readonly keyId: PublishableKeyId;
279
- readonly authUserId: AuthUserId$1;
319
+ readonly authUserId: AuthUserId;
280
320
  };
281
321
  type RotateKeyResult = {
282
322
  readonly active: PublishableKeyRecord;
@@ -287,13 +327,13 @@ declare const CredentialsError_base: new <A extends Record<string, any> = {}>(ar
287
327
  } & Readonly<A>;
288
328
  declare class CredentialsError extends CredentialsError_base<{
289
329
  readonly operation: string;
290
- readonly publicCode: CapxulErrorCode$2;
291
- readonly publicError: CapxulError$2;
330
+ readonly publicCode: CapxulErrorCode;
331
+ readonly publicError: CapxulError;
292
332
  readonly cause: unknown;
293
- readonly details?: CapxulErrorDetails$2;
333
+ readonly details?: CapxulErrorDetails;
294
334
  }> {}
295
335
  interface CredentialsPort {
296
- listApplications(authUserId: AuthUserId$1): Effect.Effect<readonly DeveloperApplication[], CredentialsError>;
336
+ listApplications(authUserId: AuthUserId): Effect.Effect<readonly DeveloperApplication[], CredentialsError>;
297
337
  createApplication(input: CreateApplicationInput): Effect.Effect<DeveloperApplication, CredentialsError>;
298
338
  mintPublishableKey(input: MintKeyInput): Effect.Effect<PublishableKeyRecord, CredentialsError>;
299
339
  rotatePublishableKey(input: RotateKeyInput): Effect.Effect<RotateKeyResult, CredentialsError>;
@@ -302,13 +342,13 @@ interface CredentialsPort {
302
342
  //#endregion
303
343
  //#region src/ports/identity.d.ts
304
344
  type CreateIdentityInput = {
305
- readonly authUserId: AuthUserId$1;
345
+ readonly authUserId: AuthUserId;
306
346
  readonly email: Email;
307
347
  readonly displayName?: string;
308
348
  readonly country?: CountryCode;
309
349
  };
310
350
  type UpdateIdentityInput = {
311
- readonly authUserId: AuthUserId$1;
351
+ readonly authUserId: AuthUserId;
312
352
  readonly displayName?: string;
313
353
  readonly country?: CountryCode;
314
354
  };
@@ -321,24 +361,24 @@ type UpdateIdentityInput = {
321
361
  * flags live on the wire row and are not projected onto the read surface.
322
362
  */
323
363
  type CompleteOnboardingIdentityInput = {
324
- readonly authUserId: AuthUserId$1;
364
+ readonly authUserId: AuthUserId;
325
365
  readonly email: Email;
326
366
  readonly displayName: string;
327
367
  readonly country: CountryCode;
328
- readonly withdrawalAddress?: Address$1;
368
+ readonly withdrawalAddress?: Address;
329
369
  };
330
370
  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 & {
331
371
  readonly _tag: "IdentityError";
332
372
  } & Readonly<A>;
333
373
  declare class IdentityError extends IdentityError_base<{
334
374
  readonly operation: string;
335
- readonly publicCode: CapxulErrorCode$2;
336
- readonly publicError: CapxulError$2;
375
+ readonly publicCode: CapxulErrorCode;
376
+ readonly publicError: CapxulError;
337
377
  readonly cause: unknown;
338
- readonly details?: CapxulErrorDetails$2;
378
+ readonly details?: CapxulErrorDetails;
339
379
  }> {}
340
380
  interface IdentityPort {
341
- loadByAuthUserId(authUserId: AuthUserId$1): Effect.Effect<Profile$1 | null, IdentityError, never>;
381
+ loadByAuthUserId(authUserId: AuthUserId): Effect.Effect<Profile$1 | null, IdentityError, never>;
342
382
  create(input: CreateIdentityInput): Effect.Effect<Profile$1, IdentityError, never>;
343
383
  update(input: UpdateIdentityInput): Effect.Effect<Profile$1, IdentityError, never>;
344
384
  /** D-ONBOARD (#669): idempotent upsert that marks the identity onboarded. */
@@ -347,7 +387,7 @@ interface IdentityPort {
347
387
  //#endregion
348
388
  //#region src/ports/smart-account.d.ts
349
389
  type ProvisionInput = {
350
- readonly authUserId: AuthUserId$1;
390
+ readonly authUserId: AuthUserId;
351
391
  readonly chainId: ChainId;
352
392
  };
353
393
  /**
@@ -365,9 +405,9 @@ type ProvisionInput = {
365
405
  * `eth_getUserOperationReceipt(userOpHash)` to re-verify and derive.
366
406
  */
367
407
  type ConfirmDeploymentInput = {
368
- readonly authUserId: AuthUserId$1;
408
+ readonly authUserId: AuthUserId;
369
409
  readonly chainId: ChainId;
370
- readonly safeAddress: Address$1;
410
+ readonly safeAddress: Address;
371
411
  readonly evidence: SafeDeploymentEvidence;
372
412
  /**
373
413
  * Optional live-E2E correlation id. This does not prove deployment; the
@@ -383,9 +423,9 @@ type ConfirmDeploymentInput = {
383
423
  * nothing at claim.
384
424
  */
385
425
  type ClaimInput = {
386
- readonly authUserId: AuthUserId$1;
426
+ readonly authUserId: AuthUserId;
387
427
  readonly chainId: ChainId;
388
- readonly signerAddress: Address$1;
428
+ readonly signerAddress: Address;
389
429
  readonly telemetryRunId?: RunId;
390
430
  };
391
431
  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 & {
@@ -393,14 +433,14 @@ declare const SmartAccountError_base: new <A extends Record<string, any> = {}>(a
393
433
  } & Readonly<A>;
394
434
  declare class SmartAccountError extends SmartAccountError_base<{
395
435
  readonly operation: string;
396
- readonly publicCode: CapxulErrorCode$2;
397
- readonly publicError: CapxulError$2;
436
+ readonly publicCode: CapxulErrorCode;
437
+ readonly publicError: CapxulError;
398
438
  readonly cause: unknown;
399
- readonly details?: CapxulErrorDetails$2;
439
+ readonly details?: CapxulErrorDetails;
400
440
  }> {}
401
441
  interface SmartAccountPort {
402
- loadByAuthUserId(authUserId: AuthUserId$1): Effect.Effect<SmartAccount$1 | null, SmartAccountError, never>;
403
- loadBySmartAccountAddress(address: Address$1): Effect.Effect<SmartAccount$1 | null, SmartAccountError, never>;
442
+ loadByAuthUserId(authUserId: AuthUserId): Effect.Effect<SmartAccount$1 | null, SmartAccountError, never>;
443
+ loadBySmartAccountAddress(address: Address): Effect.Effect<SmartAccount$1 | null, SmartAccountError, never>;
404
444
  provision(input: ProvisionInput): Effect.Effect<SmartAccount$1, SmartAccountError, never>;
405
445
  /**
406
446
  * Persist on-chain Safe-deployment evidence. The backend re-verifies
@@ -428,7 +468,7 @@ type ReadAccountBalanceInput = {
428
468
  };
429
469
  type FundFromFaucetInput = {
430
470
  readonly chainId: ChainId;
431
- readonly amount: Money$1;
471
+ readonly amount: Money;
432
472
  };
433
473
  type FundFromFaucetResult = {
434
474
  readonly txHash: string;
@@ -438,17 +478,17 @@ declare const AccountReadError_base: new <A extends Record<string, any> = {}>(ar
438
478
  } & Readonly<A>;
439
479
  declare class AccountReadError extends AccountReadError_base<{
440
480
  readonly operation: string;
441
- readonly publicCode: CapxulErrorCode$2;
442
- readonly publicError: CapxulError$2;
481
+ readonly publicCode: CapxulErrorCode;
482
+ readonly publicError: CapxulError;
443
483
  readonly cause: unknown;
444
- readonly details?: CapxulErrorDetails$2;
484
+ readonly details?: CapxulErrorDetails;
445
485
  }> {}
446
486
  /**
447
487
  * Logical Account money read (M2 Slice S1a). Joins the `accounts` row with a
448
488
  * live RPC `balanceOf` pull; the adapter lifts wire integers to `Money`.
449
489
  */
450
490
  interface AccountReadPort {
451
- readBalance(input: ReadAccountBalanceInput): Effect.Effect<Account$1, AccountReadError, never>;
491
+ readBalance(input: ReadAccountBalanceInput): Effect.Effect<Account, AccountReadError, never>;
452
492
  fundFromFaucet(input: FundFromFaucetInput): Effect.Effect<FundFromFaucetResult, AccountReadError, never>;
453
493
  }
454
494
  //#endregion
@@ -458,20 +498,20 @@ declare const SubAccountError_base: new <A extends Record<string, any> = {}>(arg
458
498
  } & Readonly<A>;
459
499
  declare class SubAccountError extends SubAccountError_base<{
460
500
  readonly operation: string;
461
- readonly publicCode: CapxulErrorCode$2;
462
- readonly publicError: CapxulError$2;
501
+ readonly publicCode: CapxulErrorCode;
502
+ readonly publicError: CapxulError;
463
503
  readonly cause: unknown;
464
- readonly details?: CapxulErrorDetails$2;
504
+ readonly details?: CapxulErrorDetails;
465
505
  }> {}
466
506
  type CreateSubAccountInput = {
467
507
  readonly accountId: AccountId;
468
508
  readonly name: string;
469
509
  };
470
510
  type SubAccountIdInput = {
471
- readonly subAccountId: SubAccountId$1;
511
+ readonly subAccountId: SubAccountId;
472
512
  };
473
513
  type RenameSubAccountInput = {
474
- readonly subAccountId: SubAccountId$1;
514
+ readonly subAccountId: SubAccountId;
475
515
  readonly name: string;
476
516
  };
477
517
  /**
@@ -480,7 +520,7 @@ type RenameSubAccountInput = {
480
520
  * specific sub-account, addressed by its `SubAccountId` (canon
481
521
  * `account-balance-model.md` §5, §12).
482
522
  */
483
- type TransferEndpoint = "main" | SubAccountId$1;
523
+ type TransferEndpoint = "main" | SubAccountId;
484
524
  /**
485
525
  * Move money between two of the SAME Account's balances (canon §12). The
486
526
  * backend resolves the Account from auth (v1 = one Account per user), so the
@@ -491,7 +531,7 @@ type TransferEndpoint = "main" | SubAccountId$1;
491
531
  type TransferInput = {
492
532
  readonly from: TransferEndpoint;
493
533
  readonly to: TransferEndpoint;
494
- readonly amount: Money$1;
534
+ readonly amount: Money;
495
535
  };
496
536
  /**
497
537
  * Result of a `transfer`: the recomputed `available` (`balanceOf − Σ`), plus
@@ -499,17 +539,17 @@ type TransferInput = {
499
539
  * has no stored row, so its slot is `null`.
500
540
  */
501
541
  type TransferResult = {
502
- readonly available: Money$1;
503
- readonly from: SubAccount$1 | null;
504
- readonly to: SubAccount$1 | null;
542
+ readonly available: Money;
543
+ readonly from: SubAccount | null;
544
+ readonly to: SubAccount | null;
505
545
  };
506
546
  interface SubAccountPort {
507
- create(input: CreateSubAccountInput): Effect.Effect<SubAccount$1, SubAccountError, never>;
508
- get(input: SubAccountIdInput): Effect.Effect<SubAccount$1 | null, SubAccountError, never>;
547
+ create(input: CreateSubAccountInput): Effect.Effect<SubAccount, SubAccountError, never>;
548
+ get(input: SubAccountIdInput): Effect.Effect<SubAccount | null, SubAccountError, never>;
509
549
  list(input: {
510
550
  readonly accountId: AccountId;
511
- }): Effect.Effect<readonly SubAccount$1[], SubAccountError, never>;
512
- rename(input: RenameSubAccountInput): Effect.Effect<SubAccount$1, SubAccountError, never>;
551
+ }): Effect.Effect<readonly SubAccount[], SubAccountError, never>;
552
+ rename(input: RenameSubAccountInput): Effect.Effect<SubAccount, SubAccountError, never>;
513
553
  delete(input: SubAccountIdInput): Effect.Effect<void, SubAccountError, never>;
514
554
  transfer(input: TransferInput): Effect.Effect<TransferResult, SubAccountError, never>;
515
555
  }
@@ -572,7 +612,7 @@ interface FlowPorts {
572
612
  * convention, flow-shape composites stay co-located with their flow.
573
613
  */
574
614
  interface ExternalSigner {
575
- readonly address: Address$1;
615
+ readonly address: Address;
576
616
  readonly signedProof: string;
577
617
  }
578
618
  //#endregion
@@ -634,7 +674,7 @@ type ProvisioningPhase = {
634
674
  } | {
635
675
  readonly status: "failed";
636
676
  readonly at: ProvisioningFailureStep;
637
- readonly error: CapxulError$2;
677
+ readonly error: CapxulError;
638
678
  };
639
679
  //#endregion
640
680
  //#region src/client/account-lifecycle.d.ts
@@ -651,10 +691,247 @@ type AccountLifecycle = {
651
691
  } | {
652
692
  readonly status: "failed";
653
693
  readonly at: AccountSetupStep;
654
- readonly error: CapxulError$2;
694
+ readonly error: CapxulError;
655
695
  };
656
696
  declare function isSettingUpLifecycle(lifecycle: AccountLifecycle): boolean;
657
697
  //#endregion
698
+ //#region ../wire/src/financial-ops.d.ts
699
+ declare const AttachablePaymentDocumentEnvelope: Schema.Union<[Schema.Struct<{
700
+ protocol: Schema.Literal<["capxul.payment-document"]>;
701
+ version: Schema.Literal<[1]>;
702
+ domain: Schema.Struct<{
703
+ name: Schema.Literal<["CapxulPayments"]>;
704
+ version: Schema.Literal<["1"]>;
705
+ chainId: Schema.Schema<ChainId, number, never>;
706
+ verifyingContract: Schema.Literal<["0xe740ea65521edc9bef0ea75d30b5334711db99f4"]>;
707
+ }>;
708
+ primaryType: Schema.Literal<["Memo"]>;
709
+ message: Schema.Struct<{
710
+ kind: Schema.Literal<[0]>;
711
+ reference: typeof Schema.String;
712
+ note: typeof Schema.String;
713
+ issuedAt: Schema.refine<number, Schema.Schema<number, number, never>>;
714
+ }>;
715
+ }>, Schema.Struct<{
716
+ protocol: Schema.Literal<["capxul.payment-document"]>;
717
+ version: Schema.Literal<[1]>;
718
+ domain: Schema.Struct<{
719
+ name: Schema.Literal<["CapxulPayments"]>;
720
+ version: Schema.Literal<["1"]>;
721
+ chainId: Schema.Schema<ChainId, number, never>;
722
+ verifyingContract: Schema.Literal<["0xe740ea65521edc9bef0ea75d30b5334711db99f4"]>;
723
+ }>;
724
+ primaryType: Schema.Literal<["Invoice"]>;
725
+ message: Schema.Struct<{
726
+ kind: Schema.Literal<[1]>;
727
+ invoiceNumber: typeof Schema.String;
728
+ payerRef: typeof Schema.String;
729
+ payeeRef: typeof Schema.String;
730
+ amount: Schema.refine<string, Schema.Schema<string, string, never>>;
731
+ currency: Schema.Schema<CurrencyCode, string, never>;
732
+ decimals: Schema.refine<number, Schema.Schema<number, number, never>>;
733
+ issuedAt: Schema.refine<number, Schema.Schema<number, number, never>>;
734
+ dueAt: Schema.refine<number, Schema.Schema<number, number, never>>;
735
+ lineItemsHash: Schema.Schema<DocumentHash, string, never>;
736
+ }>;
737
+ }>, Schema.Struct<{
738
+ protocol: Schema.Literal<["capxul.payment-document"]>;
739
+ version: Schema.Literal<[1]>;
740
+ domain: Schema.Struct<{
741
+ name: Schema.Literal<["CapxulPayments"]>;
742
+ version: Schema.Literal<["1"]>;
743
+ chainId: Schema.Schema<ChainId, number, never>;
744
+ verifyingContract: Schema.Literal<["0xe740ea65521edc9bef0ea75d30b5334711db99f4"]>;
745
+ }>;
746
+ primaryType: Schema.Literal<["Payslip"]>;
747
+ message: Schema.Struct<{
748
+ kind: Schema.Literal<[2]>;
749
+ employerRef: typeof Schema.String;
750
+ employeeRef: typeof Schema.String;
751
+ period: typeof Schema.String;
752
+ gross: Schema.refine<string, Schema.Schema<string, string, never>>;
753
+ net: Schema.refine<string, Schema.Schema<string, string, never>>;
754
+ currency: Schema.Schema<CurrencyCode, string, never>;
755
+ decimals: Schema.refine<number, Schema.Schema<number, number, never>>;
756
+ issuedAt: Schema.refine<number, Schema.Schema<number, number, never>>;
757
+ }>;
758
+ }>, Schema.Struct<{
759
+ protocol: Schema.Literal<["capxul.payment-document"]>;
760
+ version: Schema.Literal<[1]>;
761
+ domain: Schema.Struct<{
762
+ name: Schema.Literal<["CapxulPayments"]>;
763
+ version: Schema.Literal<["1"]>;
764
+ chainId: Schema.Schema<ChainId, number, never>;
765
+ verifyingContract: Schema.Literal<["0xe740ea65521edc9bef0ea75d30b5334711db99f4"]>;
766
+ }>;
767
+ primaryType: Schema.Literal<["Receipt"]>;
768
+ message: Schema.Struct<{
769
+ kind: Schema.Literal<[3]>;
770
+ reference: typeof Schema.String;
771
+ amount: Schema.refine<string, Schema.Schema<string, string, never>>;
772
+ currency: Schema.Schema<CurrencyCode, string, never>;
773
+ decimals: Schema.refine<number, Schema.Schema<number, number, never>>;
774
+ paidAt: Schema.refine<number, Schema.Schema<number, number, never>>;
775
+ note: typeof Schema.String;
776
+ }>;
777
+ }>]>;
778
+ declare const WithdrawalDocumentEnvelope: Schema.Struct<{
779
+ protocol: Schema.Literal<["capxul.payment-document"]>;
780
+ version: Schema.Literal<[1]>;
781
+ domain: Schema.Struct<{
782
+ name: Schema.Literal<["CapxulPayments"]>;
783
+ version: Schema.Literal<["1"]>;
784
+ chainId: Schema.Schema<ChainId, number, never>;
785
+ verifyingContract: Schema.Literal<["0xe740ea65521edc9bef0ea75d30b5334711db99f4"]>;
786
+ }>;
787
+ primaryType: Schema.Literal<["Withdrawal"]>;
788
+ message: Schema.Struct<{
789
+ kind: Schema.Literal<[4]>;
790
+ reference: typeof Schema.String;
791
+ amount: Schema.refine<string, Schema.Schema<string, string, never>>;
792
+ currency: Schema.Schema<CurrencyCode, string, never>;
793
+ decimals: Schema.refine<number, Schema.Schema<number, number, never>>;
794
+ destChain: Schema.Schema<ChainId, number, never>;
795
+ destAddress: Schema.refine<string, Schema.Schema<string, string, never>>;
796
+ settledAt: Schema.refine<number, Schema.Schema<number, number, never>>;
797
+ provider: typeof Schema.String;
798
+ note: typeof Schema.String;
799
+ }>;
800
+ }>;
801
+ declare const PaymentDocumentEnvelope: Schema.Union<[Schema.Union<[Schema.Struct<{
802
+ protocol: Schema.Literal<["capxul.payment-document"]>;
803
+ version: Schema.Literal<[1]>;
804
+ domain: Schema.Struct<{
805
+ name: Schema.Literal<["CapxulPayments"]>;
806
+ version: Schema.Literal<["1"]>;
807
+ chainId: Schema.Schema<ChainId, number, never>;
808
+ verifyingContract: Schema.Literal<["0xe740ea65521edc9bef0ea75d30b5334711db99f4"]>;
809
+ }>;
810
+ primaryType: Schema.Literal<["Memo"]>;
811
+ message: Schema.Struct<{
812
+ kind: Schema.Literal<[0]>;
813
+ reference: typeof Schema.String;
814
+ note: typeof Schema.String;
815
+ issuedAt: Schema.refine<number, Schema.Schema<number, number, never>>;
816
+ }>;
817
+ }>, Schema.Struct<{
818
+ protocol: Schema.Literal<["capxul.payment-document"]>;
819
+ version: Schema.Literal<[1]>;
820
+ domain: Schema.Struct<{
821
+ name: Schema.Literal<["CapxulPayments"]>;
822
+ version: Schema.Literal<["1"]>;
823
+ chainId: Schema.Schema<ChainId, number, never>;
824
+ verifyingContract: Schema.Literal<["0xe740ea65521edc9bef0ea75d30b5334711db99f4"]>;
825
+ }>;
826
+ primaryType: Schema.Literal<["Invoice"]>;
827
+ message: Schema.Struct<{
828
+ kind: Schema.Literal<[1]>;
829
+ invoiceNumber: typeof Schema.String;
830
+ payerRef: typeof Schema.String;
831
+ payeeRef: typeof Schema.String;
832
+ amount: Schema.refine<string, Schema.Schema<string, string, never>>;
833
+ currency: Schema.Schema<CurrencyCode, string, never>;
834
+ decimals: Schema.refine<number, Schema.Schema<number, number, never>>;
835
+ issuedAt: Schema.refine<number, Schema.Schema<number, number, never>>;
836
+ dueAt: Schema.refine<number, Schema.Schema<number, number, never>>;
837
+ lineItemsHash: Schema.Schema<DocumentHash, string, never>;
838
+ }>;
839
+ }>, Schema.Struct<{
840
+ protocol: Schema.Literal<["capxul.payment-document"]>;
841
+ version: Schema.Literal<[1]>;
842
+ domain: Schema.Struct<{
843
+ name: Schema.Literal<["CapxulPayments"]>;
844
+ version: Schema.Literal<["1"]>;
845
+ chainId: Schema.Schema<ChainId, number, never>;
846
+ verifyingContract: Schema.Literal<["0xe740ea65521edc9bef0ea75d30b5334711db99f4"]>;
847
+ }>;
848
+ primaryType: Schema.Literal<["Payslip"]>;
849
+ message: Schema.Struct<{
850
+ kind: Schema.Literal<[2]>;
851
+ employerRef: typeof Schema.String;
852
+ employeeRef: typeof Schema.String;
853
+ period: typeof Schema.String;
854
+ gross: Schema.refine<string, Schema.Schema<string, string, never>>;
855
+ net: Schema.refine<string, Schema.Schema<string, string, never>>;
856
+ currency: Schema.Schema<CurrencyCode, string, never>;
857
+ decimals: Schema.refine<number, Schema.Schema<number, number, never>>;
858
+ issuedAt: Schema.refine<number, Schema.Schema<number, number, never>>;
859
+ }>;
860
+ }>, Schema.Struct<{
861
+ protocol: Schema.Literal<["capxul.payment-document"]>;
862
+ version: Schema.Literal<[1]>;
863
+ domain: Schema.Struct<{
864
+ name: Schema.Literal<["CapxulPayments"]>;
865
+ version: Schema.Literal<["1"]>;
866
+ chainId: Schema.Schema<ChainId, number, never>;
867
+ verifyingContract: Schema.Literal<["0xe740ea65521edc9bef0ea75d30b5334711db99f4"]>;
868
+ }>;
869
+ primaryType: Schema.Literal<["Receipt"]>;
870
+ message: Schema.Struct<{
871
+ kind: Schema.Literal<[3]>;
872
+ reference: typeof Schema.String;
873
+ amount: Schema.refine<string, Schema.Schema<string, string, never>>;
874
+ currency: Schema.Schema<CurrencyCode, string, never>;
875
+ decimals: Schema.refine<number, Schema.Schema<number, number, never>>;
876
+ paidAt: Schema.refine<number, Schema.Schema<number, number, never>>;
877
+ note: typeof Schema.String;
878
+ }>;
879
+ }>]>, Schema.Struct<{
880
+ protocol: Schema.Literal<["capxul.payment-document"]>;
881
+ version: Schema.Literal<[1]>;
882
+ domain: Schema.Struct<{
883
+ name: Schema.Literal<["CapxulPayments"]>;
884
+ version: Schema.Literal<["1"]>;
885
+ chainId: Schema.Schema<ChainId, number, never>;
886
+ verifyingContract: Schema.Literal<["0xe740ea65521edc9bef0ea75d30b5334711db99f4"]>;
887
+ }>;
888
+ primaryType: Schema.Literal<["Withdrawal"]>;
889
+ message: Schema.Struct<{
890
+ kind: Schema.Literal<[4]>;
891
+ reference: typeof Schema.String;
892
+ amount: Schema.refine<string, Schema.Schema<string, string, never>>;
893
+ currency: Schema.Schema<CurrencyCode, string, never>;
894
+ decimals: Schema.refine<number, Schema.Schema<number, number, never>>;
895
+ destChain: Schema.Schema<ChainId, number, never>;
896
+ destAddress: Schema.refine<string, Schema.Schema<string, string, never>>;
897
+ settledAt: Schema.refine<number, Schema.Schema<number, number, never>>;
898
+ provider: typeof Schema.String;
899
+ note: typeof Schema.String;
900
+ }>;
901
+ }>]>;
902
+ /**
903
+ * #592 invoice line item. `quantity` is a positive integer; `unitMinor` is the
904
+ * per-unit price in integer minor units. The list is canonically hashed by
905
+ * `hashLineItems` (payment-document-hash.ts) into the Invoice `lineItemsHash`,
906
+ * and Σ(quantity × unitMinor) MUST equal the invoice `amount`. The hash binds
907
+ * the documentHash to the exact items; the sum-check makes the items add up to
908
+ * the amount due. See the payment-document spec (canon/mcp/financial-ops.md).
909
+ */
910
+ declare const LineItem: Schema.Struct<{
911
+ description: typeof Schema.String;
912
+ quantity: Schema.refine<number, Schema.Schema<number, number, never>>;
913
+ unitMinor: Schema.refine<string, Schema.Schema<string, string, never>>;
914
+ }>;
915
+ type AttachablePaymentDocumentEnvelopeV1 = Schema.Schema.Type<typeof AttachablePaymentDocumentEnvelope>;
916
+ type PaymentDocumentEnvelopeV1 = Schema.Schema.Type<typeof PaymentDocumentEnvelope>;
917
+ type WithdrawalDocumentEnvelopeV1 = Schema.Schema.Type<typeof WithdrawalDocumentEnvelope>;
918
+ type LineItemV1 = Schema.Schema.Type<typeof LineItem>;
919
+ //#endregion
920
+ //#region ../wire/src/leak-safety.d.ts
921
+ declare const OnchainEvidenceBrand: unique symbol;
922
+ /**
923
+ * The branded `{ userOpHash, txHash }` pair. On-chain settlement evidence is
924
+ * INTERNAL — it flows on the server-internal channel only, never onto a wire
925
+ * Payment or any MCP tool output. The brand makes "this is internal evidence"
926
+ * a type, so a loose pair can't be passed where a wire field is expected.
927
+ */
928
+ type OnchainEvidence = {
929
+ readonly userOpHash: string;
930
+ readonly txHash: string;
931
+ } & {
932
+ readonly [OnchainEvidenceBrand]: "OnchainEvidence";
933
+ };
934
+ //#endregion
658
935
  //#region src/client/financial-ops.d.ts
659
936
  type ActorReference = {
660
937
  readonly kind: "personal";
@@ -817,6 +1094,14 @@ interface PaymentsPayInput {
817
1094
  readonly actor?: ActorReference;
818
1095
  readonly to: TargetReference;
819
1096
  readonly amount: PaymentMoney;
1097
+ /**
1098
+ * How the payment is classified on the ledger. When a `document` is
1099
+ * attached, the type derived from the document kind is AUTHORITATIVE
1100
+ * (memo → unspecified, invoice → invoice, payslip → payroll, receipt →
1101
+ * reimbursement) — an explicit conflicting value is rejected with
1102
+ * INVALID_INPUT ("must match the attached document kind"). With no
1103
+ * document the explicit value is honored, defaulting to "unspecified".
1104
+ */
820
1105
  readonly paymentType?: PaymentType;
821
1106
  /** Full EIP-712 document envelope; hashed + stored, committed on-chain. */
822
1107
  readonly document?: AttachablePaymentDocumentEnvelopeV1;
@@ -1511,7 +1796,7 @@ type AccountStatus = {
1511
1796
  readonly requirement: AccountRequirement;
1512
1797
  readonly chainId: number;
1513
1798
  readonly source: AccountProviderSource;
1514
- readonly signerAddress: Address$1;
1799
+ readonly signerAddress: Address;
1515
1800
  } | {
1516
1801
  readonly status: "accountPrepared";
1517
1802
  readonly requirement: AccountRequirement;
@@ -1590,7 +1875,7 @@ interface AccountInternalSurface {
1590
1875
  interface AccountsMethods {
1591
1876
  read(options?: {
1592
1877
  readonly signal?: AbortSignal;
1593
- }): Promise<CapxulResult<Account$1>>;
1878
+ }): Promise<CapxulResult<Account>>;
1594
1879
  }
1595
1880
  /**
1596
1881
  * Faucet surface (dev-only). Deliberately OFF the public `AccountsMethods`;
@@ -1598,7 +1883,7 @@ interface AccountsMethods {
1598
1883
  * The reference CLI uses it behind a test-env gate — consumers never see `fund`.
1599
1884
  */
1600
1885
  interface AccountsFaucetMethods {
1601
- fund(amount: Money$1, options?: {
1886
+ fund(amount: Money, options?: {
1602
1887
  readonly signal?: AbortSignal;
1603
1888
  }): Promise<CapxulResult<{
1604
1889
  readonly txHash: string;
@@ -1613,12 +1898,12 @@ interface AccountsFaucetMethods {
1613
1898
  * (handle/email/payee/org) compared in the same ref space as the role's set.
1614
1899
  * Comparison is case-insensitive over the raw string value either way.
1615
1900
  */
1616
- type SpendGateRecipients = "anyone" | readonly (Address$1 | string)[];
1901
+ type SpendGateRecipients = "anyone" | readonly (Address | string)[];
1617
1902
  type SpendGateSubAccountScope = {
1618
1903
  readonly scope: "all";
1619
1904
  } | {
1620
1905
  readonly scope: "only";
1621
- readonly subAccountIds: readonly SubAccountId$1[];
1906
+ readonly subAccountIds: readonly SubAccountId[];
1622
1907
  };
1623
1908
  //#endregion
1624
1909
  //#region src/ports/org.d.ts
@@ -1630,48 +1915,48 @@ type SpendGateSubAccountScope = {
1630
1915
  * internally and enforces the real validated recipient on the gate.
1631
1916
  */
1632
1917
  type OrgSpendShape = {
1633
- readonly from: SubAccountId$1;
1634
- readonly to: Address$1;
1635
- readonly amount: Money$1;
1918
+ readonly from: SubAccountId;
1919
+ readonly to: Address;
1920
+ readonly amount: Money;
1636
1921
  };
1637
1922
  type CreateOrgPortInput = {
1638
1923
  readonly input: CreateOrgInput;
1639
1924
  };
1640
1925
  type ReadOrgTreasuryInput = {
1641
- readonly orgId: OrgId$1;
1926
+ readonly orgId: OrgId;
1642
1927
  };
1643
1928
  type ListOrgsInput = Record<never, never>;
1644
1929
  type ListOrgRolesInput = {
1645
- readonly orgId: OrgId$1;
1930
+ readonly orgId: OrgId;
1646
1931
  };
1647
1932
  type ListOrgMembersInput = {
1648
- readonly orgId: OrgId$1;
1933
+ readonly orgId: OrgId;
1649
1934
  };
1650
1935
  type InviteOrgMemberInput = {
1651
- readonly orgId: OrgId$1;
1936
+ readonly orgId: OrgId;
1652
1937
  readonly input: InviteMemberInput;
1653
1938
  };
1654
1939
  type ResendOrgInviteTokenInput = {
1655
- readonly orgId: OrgId$1;
1940
+ readonly orgId: OrgId;
1656
1941
  readonly email: string;
1657
1942
  };
1658
1943
  type DetectPendingOrgInvitationsInput = Record<never, never>;
1659
1944
  type DetectPendingOrgInvitationsResult$1 = {
1660
- readonly matched: readonly OrgId$1[];
1945
+ readonly matched: readonly OrgId[];
1661
1946
  };
1662
1947
  type DeployOrgRolesInput = {
1663
- readonly orgId: OrgId$1;
1948
+ readonly orgId: OrgId;
1664
1949
  };
1665
1950
  type OrgRolesDeploymentResult = {
1666
- readonly orgId: OrgId$1;
1951
+ readonly orgId: OrgId;
1667
1952
  readonly roles: readonly RoleView[];
1668
1953
  };
1669
1954
  type GrantOrgRoleInput = {
1670
- readonly orgId: OrgId$1;
1955
+ readonly orgId: OrgId;
1671
1956
  readonly input: AssignRoleInput;
1672
1957
  };
1673
1958
  type RevokeOrgRoleInput = {
1674
- readonly orgId: OrgId$1;
1959
+ readonly orgId: OrgId;
1675
1960
  readonly input: RemoveMemberInput;
1676
1961
  };
1677
1962
  type OrgSpendAuthority = {
@@ -1685,7 +1970,7 @@ type OrgSpendAuthority = {
1685
1970
  readonly role?: string;
1686
1971
  };
1687
1972
  type ReadOrgSpendAuthorityInput = {
1688
- readonly orgId: OrgId$1;
1973
+ readonly orgId: OrgId;
1689
1974
  readonly input: OrgSpendShape;
1690
1975
  readonly amountRaw: string;
1691
1976
  };
@@ -1694,10 +1979,10 @@ declare const OrgError_base: new <A extends Record<string, any> = {}>(args: impo
1694
1979
  } & Readonly<A>;
1695
1980
  declare class OrgError extends OrgError_base<{
1696
1981
  readonly operation: string;
1697
- readonly publicCode: CapxulErrorCode$1;
1698
- readonly publicError: CapxulError$1;
1982
+ readonly publicCode: CapxulErrorCode;
1983
+ readonly publicError: CapxulError;
1699
1984
  readonly cause: unknown;
1700
- readonly details?: CapxulErrorDetails$1;
1985
+ readonly details?: CapxulErrorDetails;
1701
1986
  }> {}
1702
1987
  /**
1703
1988
  * Live org seam. `createOrg` runs the SDK-orchestrated deploy (D10) and returns
@@ -1707,7 +1992,7 @@ declare class OrgError extends OrgError_base<{
1707
1992
  */
1708
1993
  interface OrgPort {
1709
1994
  createOrg(input: CreateOrgPortInput): Effect.Effect<OrgView, OrgError, never>;
1710
- readTreasury(input: ReadOrgTreasuryInput): Effect.Effect<Account$1, OrgError, never>;
1995
+ readTreasury(input: ReadOrgTreasuryInput): Effect.Effect<Account, OrgError, never>;
1711
1996
  listOrgs(input: ListOrgsInput): Effect.Effect<readonly OrgView[], OrgError, never>;
1712
1997
  listRoles(input: ListOrgRolesInput): Effect.Effect<readonly RoleView[], OrgError, never>;
1713
1998
  listMembers(input: ListOrgMembersInput): Effect.Effect<readonly MemberView[], OrgError, never>;
@@ -1722,13 +2007,13 @@ interface OrgRolesDeploymentPort {
1722
2007
  revokeRole(input: RevokeOrgRoleInput): Effect.Effect<void, OrgError, never>;
1723
2008
  }
1724
2009
  type SubmitOrgSpendViaPaymentsInput = {
1725
- readonly orgId: OrgId$1;
2010
+ readonly orgId: OrgId;
1726
2011
  readonly input: OrgSpendViaPaymentsInput;
1727
2012
  readonly amountRaw: string;
1728
2013
  readonly authority: OrgSpendAuthority;
1729
2014
  };
1730
2015
  type SubmitOrgBatchPayrollInput = {
1731
- readonly orgId: OrgId$1;
2016
+ readonly orgId: OrgId;
1732
2017
  readonly from: OrgSpendViaPaymentsInput["from"];
1733
2018
  readonly runs: readonly {
1734
2019
  readonly run: OrgPayrollRun;
@@ -1768,18 +2053,18 @@ type MemberStatus = "pending" | "pending_safe" | "pending_grant" | "active" | "r
1768
2053
  * brand.
1769
2054
  */
1770
2055
  type OrgView = {
1771
- readonly id: OrgId$1;
2056
+ readonly id: OrgId;
1772
2057
  readonly name: string;
1773
2058
  readonly handle: string;
1774
- readonly safeAddress: Address$1; /** The viewing member's own role label within this org. */
2059
+ readonly safeAddress: Address; /** The viewing member's own role label within this org. */
1775
2060
  readonly role: string; /** The Org treasury — the real M2 Account over the Org Safe (D3). */
1776
- readonly treasury: Account$1;
2061
+ readonly treasury: Account;
1777
2062
  };
1778
2063
  interface OrganizationAccount {
1779
2064
  readonly id: string;
1780
2065
  readonly address: string | null;
1781
- readonly balance: Money$1;
1782
- readonly available: Money$1;
2066
+ readonly balance: Money;
2067
+ readonly available: Money;
1783
2068
  }
1784
2069
  interface OrganizationAuditLogItem {
1785
2070
  readonly id: string;
@@ -1797,12 +2082,12 @@ interface OrganizationAuditLogItem {
1797
2082
  * yet provisioned a personal Safe). `email` is the universal entry point (D8).
1798
2083
  */
1799
2084
  type MemberView = {
1800
- readonly orgId: OrgId$1;
2085
+ readonly orgId: OrgId;
1801
2086
  readonly email: Email;
1802
2087
  readonly name: string | null; /** Member-identity key (D7). `null` until the invitee provisions a Safe. */
1803
- readonly personalSafeAddress: Address$1 | null; /** The member's role label (maps deterministically to the on-chain `roleKey`, D9). */
2088
+ readonly personalSafeAddress: Address | null; /** The member's role label (maps deterministically to the on-chain `roleKey`, D9). */
1804
2089
  readonly role: string;
1805
- readonly roleKey: RoleKey$1 | null;
2090
+ readonly roleKey: RoleKey | null;
1806
2091
  readonly status: MemberStatus;
1807
2092
  readonly grantTxHash: string | null;
1808
2093
  readonly revokeTxHash: string | null;
@@ -1814,9 +2099,9 @@ type MemberView = {
1814
2099
  * (the Owner role).
1815
2100
  */
1816
2101
  type RoleSpendCap = {
1817
- readonly perTx?: Money$1;
1818
- readonly perDay?: Money$1;
1819
- readonly toRecipients?: "anyone" | readonly Address$1[];
2102
+ readonly perTx?: Money;
2103
+ readonly perDay?: Money;
2104
+ readonly toRecipients?: "anyone" | readonly Address[];
1820
2105
  };
1821
2106
  /**
1822
2107
  * The Capxul-owned Role DSL definition (D4). `label` becomes the sticky
@@ -1828,7 +2113,7 @@ type RoleDefinition = {
1828
2113
  readonly label: string;
1829
2114
  readonly spend?: RoleSpendCap;
1830
2115
  readonly subAccounts?: {
1831
- readonly scope: "all" | readonly SubAccountId$1[];
2116
+ readonly scope: "all" | readonly SubAccountId[];
1832
2117
  };
1833
2118
  readonly canManageMembers?: boolean;
1834
2119
  readonly canManageRoles?: boolean;
@@ -1839,9 +2124,9 @@ type RoleDefinition = {
1839
2124
  * is the full Role DSL entry.
1840
2125
  */
1841
2126
  type RoleView = {
1842
- readonly orgId: OrgId$1;
2127
+ readonly orgId: OrgId;
1843
2128
  readonly label: string;
1844
- readonly roleKey: RoleKey$1;
2129
+ readonly roleKey: RoleKey;
1845
2130
  readonly definition: RoleDefinition;
1846
2131
  };
1847
2132
  /** Built-in role templates that seed a new Org at creation (D6). */
@@ -1879,7 +2164,7 @@ type ResendInviteTokenInput = {
1879
2164
  * mirror.
1880
2165
  */
1881
2166
  type RemoveMemberInput = {
1882
- readonly memberSafeAddress: Address$1;
2167
+ readonly memberSafeAddress: Address;
1883
2168
  };
1884
2169
  /**
1885
2170
  * Input to `org(orgId).assignRole` (S3, D7/D9). Keyed on the member's personal
@@ -1887,7 +2172,7 @@ type RemoveMemberInput = {
1887
2172
  * label maps deterministically to the on-chain `roleKey`.
1888
2173
  */
1889
2174
  type AssignRoleInput = {
1890
- readonly memberSafeAddress: Address$1;
2175
+ readonly memberSafeAddress: Address;
1891
2176
  readonly role: string;
1892
2177
  };
1893
2178
  /**
@@ -1900,9 +2185,9 @@ type AssignRoleInput = {
1900
2185
  * `from` is the Level-2 sub-account envelope the spend draws from (D5).
1901
2186
  */
1902
2187
  type OrgSpendViaPaymentsInput = {
1903
- readonly from: SubAccountId$1; /** Validated recipient ref (handle/email/payee/org) — never a raw address. */
2188
+ readonly from: SubAccountId; /** Validated recipient ref (handle/email/payee/org) — never a raw address. */
1904
2189
  readonly to: Ref;
1905
- readonly amount: Money$1; /** Full EIP-712 payment document; hashed + stored, committed on-chain. */
2190
+ readonly amount: Money; /** Full EIP-712 payment document; hashed + stored, committed on-chain. */
1906
2191
  readonly document?: PaymentDocumentEnvelopeV1;
1907
2192
  readonly timing?: PaymentTiming;
1908
2193
  readonly paymentType?: PaymentType;
@@ -1914,7 +2199,7 @@ type OrgSpendViaPaymentsInput = {
1914
2199
  */
1915
2200
  type OrgPayrollRun = {
1916
2201
  /** Validated recipient ref (handle/email/payee/org) — never a raw address. */readonly to: Ref;
1917
- readonly amount: Money$1;
2202
+ readonly amount: Money;
1918
2203
  readonly timing?: PaymentTiming; /** The payslip — an EIP-712 payment document, committed by `documentHash`. */
1919
2204
  readonly payslip?: PaymentDocumentEnvelopeV1;
1920
2205
  };
@@ -1926,11 +2211,11 @@ type OrgPayrollRun = {
1926
2211
  * run.
1927
2212
  */
1928
2213
  type OrgBatchPayrollInput = {
1929
- readonly from: SubAccountId$1;
2214
+ readonly from: SubAccountId;
1930
2215
  readonly runs: readonly OrgPayrollRun[];
1931
2216
  };
1932
2217
  type DetectPendingOrgInvitationsResult = {
1933
- readonly matched: readonly OrgId$1[];
2218
+ readonly matched: readonly OrgId[];
1934
2219
  };
1935
2220
  /**
1936
2221
  * Entity-scoped Org method bundle, returned by `capxul.org(orgId)`. Every
@@ -1941,7 +2226,7 @@ type DetectPendingOrgInvitationsResult = {
1941
2226
  interface PayrollRosterLine {
1942
2227
  readonly id: string;
1943
2228
  readonly employee: Ref;
1944
- readonly amount: Money$1;
2229
+ readonly amount: Money;
1945
2230
  readonly timing: PaymentTiming;
1946
2231
  readonly status: "active" | "paused" | "ended";
1947
2232
  }
@@ -1951,12 +2236,12 @@ interface PayrollPayslipTemplate {
1951
2236
  }
1952
2237
  interface PayrollRosterAddInput {
1953
2238
  readonly employee: Ref;
1954
- readonly amount: Money$1;
2239
+ readonly amount: Money;
1955
2240
  readonly timing: PaymentTiming;
1956
2241
  readonly payslipTemplate?: PaymentDocumentEnvelopeV1 | PayrollPayslipTemplate;
1957
2242
  }
1958
2243
  interface PayrollRunInput {
1959
- readonly from: SubAccountId$1;
2244
+ readonly from: SubAccountId;
1960
2245
  readonly period: string;
1961
2246
  }
1962
2247
  interface PayrollMethods {
@@ -1982,7 +2267,7 @@ interface OrgScopedMethods extends ActorRelationshipMethods {
1982
2267
  /** The Org treasury — the real M2 Account over the Org Safe (D3). */
1983
2268
  treasury(options?: {
1984
2269
  readonly signal?: AbortSignal;
1985
- }): Promise<CapxulResult<Account$1>>;
2270
+ }): Promise<CapxulResult<Account>>;
1986
2271
  readonly account: {
1987
2272
  get(options?: {
1988
2273
  readonly signal?: AbortSignal;
@@ -2046,7 +2331,7 @@ interface OrgMethods {
2046
2331
  }): Promise<CapxulResult<OrgView>>;
2047
2332
  readonly orgs: OrgsMethod;
2048
2333
  /** Resolve the entity-scoped bundle for a specific Org (D13). */
2049
- org(orgId: OrgId$1): OrgScopedMethods;
2334
+ org(orgId: OrgId): OrgScopedMethods;
2050
2335
  }
2051
2336
  //#endregion
2052
2337
  //#region src/client/current-user.d.ts
@@ -2088,17 +2373,17 @@ interface SubAccountsMethods {
2088
2373
  readonly name: string;
2089
2374
  }, options?: {
2090
2375
  readonly signal?: AbortSignal;
2091
- }): Promise<CapxulResult<SubAccount$1>>;
2092
- get(subAccountId: SubAccountId$1, options?: {
2376
+ }): Promise<CapxulResult<SubAccount>>;
2377
+ get(subAccountId: SubAccountId, options?: {
2093
2378
  readonly signal?: AbortSignal;
2094
- }): Promise<CapxulResult<SubAccount$1 | null>>;
2379
+ }): Promise<CapxulResult<SubAccount | null>>;
2095
2380
  list(accountId: AccountId, options?: {
2096
2381
  readonly signal?: AbortSignal;
2097
- }): Promise<CapxulResult<readonly SubAccount$1[]>>;
2098
- rename(subAccountId: SubAccountId$1, name: string, options?: {
2382
+ }): Promise<CapxulResult<readonly SubAccount[]>>;
2383
+ rename(subAccountId: SubAccountId, name: string, options?: {
2099
2384
  readonly signal?: AbortSignal;
2100
- }): Promise<CapxulResult<SubAccount$1>>;
2101
- delete(subAccountId: SubAccountId$1, options?: {
2385
+ }): Promise<CapxulResult<SubAccount>>;
2386
+ delete(subAccountId: SubAccountId, options?: {
2102
2387
  readonly signal?: AbortSignal;
2103
2388
  }): Promise<CapxulResult<void>>;
2104
2389
  transfer(input: TransferInput, options?: {
@@ -2446,5 +2731,5 @@ declare function captureException(telemetry: TelemetryPort, error: unknown, cont
2446
2731
  */
2447
2732
  declare function captureExceptionSync(telemetry: TelemetryPort, error: unknown, context?: HandledErrorReportContext): void;
2448
2733
  //#endregion
2449
- export { type Account, type AccountLifecycle, type AccountMethods, type AccountProvider, type AccountProviderSource, type AccountRequirement, type AccountSetupStep, type AccountsMethods, type ActivityItem, type ActivityListParams, type ActivityMethods, type ActivityPage, type ActorProfile, type ActorProfileMethods, type ActorReference, type ActorRelationshipMethods, type ActorRequest, type ActorRequestIssueInput, type ActorRequestsMethods, type Address, type AddressBookAddInput, type AddressBookEntry, type AddressBookLabelInput, type AddressBookMethods, type AssignRoleInput, type AuthMethods, type AuthSession, type AuthUserId, type CapxulClient, type CapxulClientInput, type CapxulDigestSigner, CapxulError, type CapxulErrorCode, type CapxulErrorDetails, type CapxulResult, type CapxulSigner, type CompleteOrganizationOnboardingInput, type CompleteOrganizationOnboardingResult, type CompletePersonalOnboardingInput, type CompletePersonalOnboardingResult, type CreateCapxulClientInput, type CreateOrgInput, type CurrentUserContext, type CurrentUserMethods, type DepositInstructions, type Destination, type DestinationAddInput, type DestinationKind, type DestinationListInput, type DestinationPayload, type DestinationRail, type DestinationRemoveInput, type DestinationsMethods, type DetectPendingOrgInvitationsResult, type DevPrivateKeySignerInput, type Eip1193Provider, type Eip1193RequestProvider, type FinancialOpsMethods, type HandledErrorReportContext, type HandlesMethods, type IdentityMethods, type InboxApproveInput, type InboxItem, type InboxMethods, type InsightsMethods, type InsightsSummary, type InviteMemberInput, type MeMethods, type MeProfile, type MemberStatus, type MemberView, type Money, type OfframpMethods, type OfframpQuote, type OfframpQuoteInput, type OfframpStatus, type OnboardingMethods, type OpenfortEmbeddedSignerInput, type OpenfortEmbeddedWalletApi, type OpenfortEmbeddedWalletPort, type OrgBatchPayrollInput, type OrgId, type OrgMethods, type OrgPayrollRun, type OrgScopedMethods, type OrgSpendViaPaymentsInput, type OrgTemplate, type OrgView, type OrganizationAccount, type OrganizationAuditLogItem, type Payee, type PayeesMethods, type Payment, type PaymentDocumentRef, type PaymentDocumentRender, type PaymentDocumentVerification, type PaymentDocumentsMethods, type PaymentDraft, type PaymentDraftStatus, type PaymentMoney, type PaymentRequest, type PaymentRequestStatus, type PaymentRequestsCreateInput, type PaymentRequestsMethods, type PaymentSettlementInput, type PaymentStatus, type PaymentTiming, type PaymentType, type PaymentsMethods, type PaymentsPayInput, type PaymentsPayoutInput, type PaymentsWithdrawInput, type PayrollMethods, type PayrollPayslipTemplate, type PayrollRosterAddInput, type PayrollRosterLine, type PayrollRunInput, type Profile, type RecipientResolution, type RecipientResolutionKind, type ReconciliationEntry, type Ref, type RemoveMemberInput, type ResendInviteTokenInput, type ResolvedTarget, type RoleDefinition, type RoleKey, type RoleSpendCap, type RoleView, type Session, type SmartAccount, type SmartAccountMethods, type SubAccount, type SubAccountId, type SubAccountsMethods, type TargetReference, type TargetsMethods, type TelemetryPort, type TransferEndpoint, type TransferInput, type TransferResult, type WorkbenchDraftInput, type WorkbenchExecuteInput, type WorkbenchMethods, type WorkbenchMintResult, captureException, captureExceptionSync, createCapxulClient, deriveDevPrivateKey, devPrivateKeySigner, eip1193AccountProvider, embeddedSigner, injectedWalletSigner, isCapxulError, isSettingUpLifecycle, localPrivateKeyAccountProvider, openfortEmbeddedSigner, openfortEmbeddedSignerFromWallet, openfortEmbeddedWalletPort };
2734
+ export { type Account, type AccountId, type AccountLifecycle, type AccountMethods, type AccountProvider, type AccountProviderSource, type AccountRequirement, type AccountSetupStep, type AccountsMethods, type ActivityItem, type ActivityListParams, type ActivityMethods, type ActivityPage, type ActorProfile, type ActorProfileMethods, type ActorReference, type ActorRelationshipMethods, type ActorRequest, type ActorRequestIssueInput, type ActorRequestsMethods, type Address, type AddressBookAddInput, type AddressBookEntry, type AddressBookLabelInput, type AddressBookMethods, type AssignRoleInput, type AuthMethods, type AuthSession, type AuthUserId, type CapxulClient, type CapxulClientInput, type CapxulDigestSigner, CapxulError, type CapxulErrorCode, type CapxulErrorDetails, type CapxulResult, type CapxulSigner, type CompleteOrganizationOnboardingInput, type CompleteOrganizationOnboardingResult, type CompletePersonalOnboardingInput, type CompletePersonalOnboardingResult, type CreateCapxulClientInput, type CreateOrgInput, type CurrentUserContext, type CurrentUserMethods, type DepositInstructions, type Destination, type DestinationAddInput, type DestinationKind, type DestinationListInput, type DestinationPayload, type DestinationRail, type DestinationRemoveInput, type DestinationsMethods, type DetectPendingOrgInvitationsResult, type DevPrivateKeySignerInput, type Eip1193Provider, type Eip1193RequestProvider, type FinancialOpsMethods, type HandledErrorReportContext, type HandlesMethods, type IdentityMethods, type InboxApproveInput, type InboxItem, type InboxMethods, type InsightsMethods, type InsightsSummary, type InviteMemberInput, type MeMethods, type MeProfile, type MemberStatus, type MemberView, type Money, type OfframpMethods, type OfframpQuote, type OfframpQuoteInput, type OfframpStatus, type OnboardingMethods, type OpenfortEmbeddedSignerInput, type OpenfortEmbeddedWalletApi, type OpenfortEmbeddedWalletPort, type OrgBatchPayrollInput, type OrgId, type OrgMethods, type OrgPayrollRun, type OrgScopedMethods, type OrgSpendViaPaymentsInput, type OrgTemplate, type OrgView, type OrganizationAccount, type OrganizationAuditLogItem, type Payee, type PayeesMethods, type Payment, type PaymentDocumentRef, type PaymentDocumentRender, type PaymentDocumentVerification, type PaymentDocumentsMethods, type PaymentDraft, type PaymentDraftStatus, type PaymentMoney, type PaymentRequest, type PaymentRequestStatus, type PaymentRequestsCreateInput, type PaymentRequestsMethods, type PaymentSettlementInput, type PaymentStatus, type PaymentTiming, type PaymentType, type PaymentsMethods, type PaymentsPayInput, type PaymentsPayoutInput, type PaymentsWithdrawInput, type PayrollMethods, type PayrollPayslipTemplate, type PayrollRosterAddInput, type PayrollRosterLine, type PayrollRunInput, type Profile, type RecipientResolution, type RecipientResolutionKind, type ReconciliationEntry, type Ref, type RemoveMemberInput, type ResendInviteTokenInput, type ResolvedTarget, type RoleDefinition, type RoleKey, type RoleSpendCap, type RoleView, type Session, type SmartAccount, type SmartAccountMethods, type SubAccount, type SubAccountId, type SubAccountsMethods, type TargetReference, type TargetsMethods, type TelemetryPort, type TransferEndpoint, type TransferInput, type TransferResult, type WorkbenchDraftInput, type WorkbenchExecuteInput, type WorkbenchMethods, type WorkbenchMintResult, captureException, captureExceptionSync, createCapxulClient, deriveDevPrivateKey, devPrivateKeySigner, eip1193AccountProvider, embeddedSigner, injectedWalletSigner, isCapxulError, isSettingUpLifecycle, localPrivateKeyAccountProvider, openfortEmbeddedSigner, openfortEmbeddedSignerFromWallet, openfortEmbeddedWalletPort };
2450
2735
  //# sourceMappingURL=index.d.mts.map