@capxul/sdk 3.2.0 → 4.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.
@@ -276,14 +276,16 @@ type Brand<T, B extends string> = T & {
276
276
  //#region ../types/src/index.d.ts
277
277
  type Address$1 = Brand<string, "Address">;
278
278
  type Email = Brand<string, "Email">;
279
+ type TesterKind = "human" | "e2e" | "agent";
279
280
  type Profile$1 = {
281
+ readonly testerKind?: TesterKind;
280
282
  readonly authUserId: AuthUserId;
281
283
  readonly email: Email;
282
284
  readonly displayName: string | null;
283
285
  readonly country: CountryCode | null;
284
286
  readonly onboarded: boolean;
285
287
  readonly withdrawalAddress: Address$1 | null;
286
- readonly username: string | null;
288
+ readonly handle: Handle | null;
287
289
  readonly imageUrl: string | null;
288
290
  readonly kycTier: KycTier;
289
291
  readonly createdAt: EpochMs;
@@ -312,6 +314,8 @@ type AuthUserId = Brand<string, "AuthUserId">;
312
314
  type AnonymousDistinctId = Brand<string, "AnonymousDistinctId">;
313
315
  type AccountId = Brand<string, "AccountId">;
314
316
  type PartyId = Brand<string, "PartyId">;
317
+ /** One globally unique public name for a claimed person or Organization Party. */
318
+ type Handle = Brand<string, "Handle">;
315
319
  type PermissionId = Brand<string, "PermissionId">;
316
320
  type PermissionAssignmentId = Brand<string, "PermissionAssignmentId">;
317
321
  type BudgetId = Brand<string, "BudgetId">;
@@ -343,6 +347,7 @@ type AuthSession = {
343
347
  readonly token: SessionToken;
344
348
  readonly expiresAt: EpochMs;
345
349
  };
350
+ declare const EVM_ADDRESS_RE: RegExp;
346
351
  declare const SUPPORTED_CURRENCIES: readonly [{
347
352
  readonly code: "USD";
348
353
  readonly symbol: "$";
@@ -366,6 +371,8 @@ declare const SUPPORTED_CURRENCIES: readonly [{
366
371
  }];
367
372
  type SupportedCurrencyCode = (typeof SUPPORTED_CURRENCIES)[number]["code"];
368
373
  declare function toAddress(raw: unknown): Address$1;
374
+ declare function toPartyId(raw: unknown): PartyId;
375
+ declare function toHandle(raw: unknown): Handle;
369
376
  declare function toCountryCode(raw: unknown): CountryCode;
370
377
  //#endregion
371
378
  //#region src/ports/auth-cache.d.ts
@@ -594,4 +601,4 @@ interface Eip1193RequestProvider {
594
601
  */
595
602
  declare function injectedWalletSigner(provider: Eip1193RequestProvider): CapxulSigner;
596
603
  //#endregion
597
- export { SessionToken as $, AppId as A, Email as B, CachedJwt as C, AllowanceKey as D, Address$1 as E, ChainId as F, PaymentCommandId as G, Money as H, CountryCode as I, PermissionAssignmentId as J, PayrollGroupId as K, CurrencyCode as L, AuthUserId as M, BlockNumber as N, AllowedOrigin as O, BudgetId as P, RoleKey as Q, DocumentHash as R, AuthCachePortTag as S, AccountId as T, OrgId as U, EpochMs as V, PartyId as W, Profile$1 as X, PermissionId as Y, PublishableKey as Z, ClockPort as _, FailureMode as _t, SignerStatusStore as a, CAPXUL_PAYMENTS_V2_ADDRESS as at, AuthCacheError as b, AccountProviderSource as c, CapxulErrorCode as ct, eip1193AccountProvider as d, Failure as dt, SmartAccount$1 as et, localPrivateKeyAccountProvider as f, isCapxulError as ft, SmartAccount as g, FAILURE_MODES as gt, Session as h, ChainUpstream as ht, SignerStatus as i, toCountryCode as it, AuthSession as j, AnonymousDistinctId as k, AccountRequirement as l, CapxulErrorDetails as lt, Profile as m, ChainCause as mt, CapxulSigner as n, WeiAmount as nt, injectedWalletSigner as o, CAPXUL_ERROR_CODES as ot, CapxulResult as p, CHAIN_UPSTREAMS as pt, PayrollRunId as q, Eip1193RequestProvider as r, toAddress as rt, AccountProvider as s, CapxulError as st, CapxulDigestSigner as t, TxHash as tt, Eip1193Provider as u, Errors as ut, AuthClientPort as v, RevertSummary as vt, Account$1 as w, AuthCachePort as x, CanSendOtpStatus as y, DurationMs as z };
604
+ export { PublishableKey as $, AppId as A, EVM_ADDRESS_RE as B, CachedJwt as C, RevertSummary as Ct, AllowanceKey as D, Address$1 as E, ChainId as F, OrgId as G, EpochMs as H, CountryCode as I, PayrollGroupId as J, PartyId as K, CurrencyCode as L, AuthUserId as M, BlockNumber as N, AllowedOrigin as O, BudgetId as P, Profile$1 as Q, DocumentHash as R, AuthCachePortTag as S, FailureMode as St, AccountId as T, Handle as U, Email as V, Money as W, PermissionAssignmentId as X, PayrollRunId as Y, PermissionId as Z, ClockPort as _, isCapxulError as _t, SignerStatusStore as a, WeiAmount as at, AuthCacheError as b, ChainUpstream as bt, AccountProviderSource as c, toHandle as ct, eip1193AccountProvider as d, CAPXUL_ERROR_CODES as dt, RoleKey as et, localPrivateKeyAccountProvider as f, CapxulError as ft, SmartAccount as g, Failure as gt, Session as h, Errors as ht, SignerStatus as i, TxHash as it, AuthSession as j, AnonymousDistinctId as k, AccountRequirement as l, toPartyId as lt, Profile as m, CapxulErrorDetails as mt, CapxulSigner as n, SmartAccount$1 as nt, injectedWalletSigner as o, toAddress as ot, CapxulResult as p, CapxulErrorCode as pt, PaymentCommandId as q, Eip1193RequestProvider as r, TesterKind as rt, AccountProvider as s, toCountryCode as st, CapxulDigestSigner as t, SessionToken as tt, Eip1193Provider as u, CAPXUL_PAYMENTS_V2_ADDRESS as ut, AuthClientPort as v, CHAIN_UPSTREAMS as vt, Account$1 as w, AuthCachePort as x, FAILURE_MODES as xt, CanSendOtpStatus as y, ChainCause as yt, DurationMs as z };
@@ -1,4 +1,4 @@
1
- import { $n as TelemetryGroupInput, Qn as TelemetryEvent, dr as IdentityTransition, er as TelemetryIdentifyInput, n as ObservationAdapter, u as CapxulClient } from "../observation-B76zFxd6.mjs";
1
+ import { Qn as TelemetryIdentifyInput, Xn as TelemetryEvent, Zn as TelemetryGroupInput, lr as IdentityTransition, n as ObservationAdapter, u as CapxulClient } from "../observation-DtzTdv20.mjs";
2
2
  import { Effect, Layer } from "effect";
3
3
  //#region src/testing/telemetry/RecordingTelemetryAdapter.d.ts
4
4
  type RecordingTelemetryOperation = {
@@ -1,5 +1,5 @@
1
- import { M as fromWei, Z as redactTelemetryEvent, f as identityErrorFromCapxul, g as bootstrapErrorFromCapxul, i as smartAccountErrorFromCapxul, m as convexCallErrorFromCapxul, o as accountReadErrorFromCapxul, t as assembleCapxulClient, u as wireChainId, v as toWei } from "../create-capxul-client-BCq08ppe.mjs";
2
- import { D as toAllowedOrigin, E as toAddress, F as toEmail, I as toEpochMs, K as toSessionToken, L as toEpochSeconds, M as toCountryCode, O as toAppId, P as toDurationMs, R as toJwtToken, T as toAccountId, W as toPublishableKey, Y as CapxulError, Z as Errors, _ as deriveCapxulSafeAddress, j as toChainId, k as toAuthUserId, n as InMemoryAuthCacheAdapter, t as readClockNow, u as authClientPortFromPromiseAdapter, z as toKycTier } from "../clock-CWpcQlLy.mjs";
1
+ import { M as fromWei, Z as redactTelemetryEvent, f as identityErrorFromCapxul, g as bootstrapErrorFromCapxul, i as smartAccountErrorFromCapxul, m as convexCallErrorFromCapxul, o as accountReadErrorFromCapxul, t as assembleCapxulClient, u as wireChainId, v as toWei } from "../create-capxul-client-DyCEJZtD.mjs";
2
+ import { $ as CapxulError, A as toAuthUserId, B as toJwtToken, D as toAddress, E as toAccountId, F as toDurationMs, I as toEmail, J as toSessionToken, K as toPublishableKey, L as toEpochMs, M as toChainId, N as toCountryCode, O as toAllowedOrigin, R as toEpochSeconds, V as toKycTier, _ as deriveCapxulSafeAddress, k as toAppId, n as InMemoryAuthCacheAdapter, t as readClockNow, tt as Errors, u as authClientPortFromPromiseAdapter, v as validateHandle, z as toHandle } from "../clock-C2AUlq1V.mjs";
3
3
  import { Effect, Result, Semaphore } from "effect";
4
4
  import { keccak256 } from "viem";
5
5
  import { getFunctionName } from "convex/server";
@@ -506,7 +506,7 @@ var InMemoryIdentityAdapter = class {
506
506
  country: input.country ?? null,
507
507
  onboarded: false,
508
508
  withdrawalAddress: null,
509
- username: null,
509
+ handle: null,
510
510
  imageUrl: null,
511
511
  kycTier: toKycTier(0),
512
512
  createdAt: now,
@@ -531,7 +531,7 @@ var InMemoryIdentityAdapter = class {
531
531
  country: input.country !== void 0 ? input.country : existing.country,
532
532
  onboarded: existing.onboarded,
533
533
  withdrawalAddress: existing.withdrawalAddress,
534
- username: existing.username,
534
+ handle: existing.handle,
535
535
  imageUrl: existing.imageUrl,
536
536
  updatedAt: now
537
537
  };
@@ -551,7 +551,7 @@ var InMemoryIdentityAdapter = class {
551
551
  country: input.country,
552
552
  onboarded: true,
553
553
  withdrawalAddress: input.withdrawalAddress ?? existing?.withdrawalAddress ?? null,
554
- username: input.username ?? existing?.username ?? null,
554
+ handle: toHandle(validateHandle(input.handle)),
555
555
  imageUrl: existing?.imageUrl ?? null,
556
556
  kycTier: existing?.kycTier ?? toKycTier(0),
557
557
  createdAt: existing?.createdAt ?? now,
@@ -576,7 +576,7 @@ function cloneProfile(profile) {
576
576
  country: profile.country,
577
577
  onboarded: profile.onboarded,
578
578
  withdrawalAddress: profile.withdrawalAddress,
579
- username: profile.username,
579
+ handle: profile.handle,
580
580
  imageUrl: profile.imageUrl,
581
581
  kycTier: profile.kycTier,
582
582
  createdAt: profile.createdAt,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capxul/sdk",
3
- "version": "3.2.0",
3
+ "version": "4.0.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Xelmar-tech/infrastructure.git",
@@ -47,12 +47,12 @@
47
47
  "vite": "npm:@voidzero-dev/vite-plus-core@0.3.0",
48
48
  "vite-plus": "0.3.0",
49
49
  "vitest": "4.1.11",
50
- "@capxul/config": "0.2.3",
51
- "@capxul/errors": "0.2.0",
52
- "@capxul/observability": "3.2.0",
53
- "@capxul/types": "0.2.3",
50
+ "@capxul/config": "0.3.0",
51
+ "@capxul/errors": "0.3.0",
54
52
  "@capxul/typescript-config": "0.0.0",
55
- "@capxul/wire": "0.6.0"
53
+ "@capxul/observability": "4.0.0",
54
+ "@capxul/wire": "0.7.0",
55
+ "@capxul/types": "0.3.0"
56
56
  },
57
57
  "_permissionlessPinReason": "permissionless.toSafeSmartAccount is pinned to 0.3.4 for live Safe deployment E2E. Counterfactual address fixtures captured 2026-05-17 in packages/backend/convex/_shared/__tests__/counterfactual.test.ts and packages/config/tests/safe.test.ts must be re-verified before upgrading.",
58
58
  "scripts": {