@capxul/sdk 3.1.0 → 3.2.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,6 +1,6 @@
1
- import { $ as RoleKey, A as AnonymousDistinctId, B as DurationMs, D as Address$1, F as BudgetId, G as PartyId, H as EpochMs, I as ChainId, J as PayrollRunId, K as PaymentCommandId, L as CountryCode, M as AuthSession, N as AuthUserId, O as AllowanceKey, P as BlockNumber, Q as PublishableKey, R as CurrencyCode, T as Account$1, U as Money, V as Email, W as OrgId, X as PermissionId, Y as PermissionAssignmentId, Z as Profile, _ as ClockPort, _t as FailureMode, a as SignerStatusStore, c as AccountProviderSource, ct as CapxulErrorCode, dt as Failure, et as SessionToken, g as SmartAccount$1, h as Session$1, j as AppId, k as AllowedOrigin, l as AccountRequirement, lt as CapxulErrorDetails, m as Profile$1, n as CapxulSigner, nt as TxHash, p as CapxulResult, q as PayrollGroupId, rt as WeiAmount, st as CapxulError, tt as SmartAccount, v as AuthClientPort, x as AuthCachePort, y as CanSendOtpStatus, z as DocumentHash } from "./signer-BpjdawiY.mjs";
2
- import { Hex } from "viem";
1
+ import { $ as SessionToken, A as AppId, B as Email, D as AllowanceKey, E as Address$1, F as ChainId, G as PaymentCommandId, H as Money, I as CountryCode, J as PermissionAssignmentId, K as PayrollGroupId, L as CurrencyCode, M as AuthUserId, N as BlockNumber, O as AllowedOrigin, P as BudgetId, Q as RoleKey, R as DocumentHash, U as OrgId, V as EpochMs, W as PartyId, X as Profile, Y as PermissionId, Z as PublishableKey, _ as ClockPort, _t as FailureMode, a as SignerStatusStore, c as AccountProviderSource, ct as CapxulErrorCode, dt as Failure, et as SmartAccount, g as SmartAccount$1, h as Session$1, j as AuthSession, k as AnonymousDistinctId, l as AccountRequirement, lt as CapxulErrorDetails, m as Profile$1, n as CapxulSigner, nt as WeiAmount, p as CapxulResult, q as PayrollRunId, st as CapxulError, tt as TxHash, v as AuthClientPort, w as Account$1, x as AuthCachePort, y as CanSendOtpStatus, z as DurationMs } from "./signer-DOqb8M1Y.mjs";
3
2
  import { Context, Effect, Layer, Schema, Scope, Tracer } from "effect";
3
+ import { Hex } from "viem";
4
4
  import { FunctionReference } from "convex/server";
5
5
  //#region src/domain/machine/shell.d.ts
6
6
  declare const INVOCATION_PARENT_SPAN: unique symbol;
@@ -260,6 +260,7 @@ declare const isClaimed: (state: IdentityState) => boolean;
260
260
  */
261
261
  interface HandledErrorReportContext {
262
262
  readonly layer?: string;
263
+ /** Host input is normalized at the reporting boundary. */
263
264
  readonly operation?: string;
264
265
  readonly failure_mode?: FailureMode;
265
266
  readonly provider?: string;
@@ -1016,10 +1017,19 @@ interface SmartAccountMethods {
1016
1017
  }
1017
1018
  //#endregion
1018
1019
  //#region src/surface/identity.d.ts
1020
+ interface CompleteProfileInput {
1021
+ readonly displayName: string;
1022
+ readonly country: string;
1023
+ readonly username: string;
1024
+ }
1019
1025
  interface IdentityMethods {
1020
1026
  loadCurrent(options?: {
1021
1027
  readonly signal?: AbortSignal;
1022
1028
  }): Promise<CapxulResult<Profile$1 | null>>;
1029
+ /** Complete the Person profile. A normalized, globally unique username is required. */
1030
+ completeProfile(profile: CompleteProfileInput, options?: {
1031
+ readonly signal?: AbortSignal;
1032
+ }): Promise<CapxulResult<Profile$1>>;
1023
1033
  /**
1024
1034
  * #1062: availability probe for the username the user is typing. Returns the
1025
1035
  * canonical stored form so the UI can echo it.
@@ -1864,6 +1874,25 @@ interface AccountInternalSurface {
1864
1874
  retryProvisioning(): Promise<CapxulResult<ProvisioningPhase>>;
1865
1875
  }
1866
1876
  //#endregion
1877
+ //#region src/surface/onboarding.d.ts
1878
+ type PersonOnboardingInput = CompleteProfileInput;
1879
+ type ReadyAccountLifecycle = Extract<AccountLifecycle, {
1880
+ readonly status: "ready";
1881
+ }>;
1882
+ type CompletedPersonProfile = Omit<Profile$1, "displayName" | "username"> & {
1883
+ readonly displayName: string;
1884
+ readonly username: string;
1885
+ };
1886
+ interface PersonOnboarding {
1887
+ readonly profile: CompletedPersonProfile;
1888
+ readonly account: ReadyAccountLifecycle;
1889
+ }
1890
+ interface OnboardingMethods {
1891
+ completePerson(input: PersonOnboardingInput, options?: {
1892
+ readonly signal?: AbortSignal;
1893
+ }): Promise<CapxulResult<PersonOnboarding>>;
1894
+ }
1895
+ //#endregion
1867
1896
  //#region src/surface/accounts.d.ts
1868
1897
  interface AccountsMethods {
1869
1898
  read(options?: {
@@ -2516,6 +2545,7 @@ interface IdentityRuntime {
2516
2545
  } | {
2517
2546
  readonly ok: false;
2518
2547
  readonly reason: CapxulErrorCode;
2548
+ readonly error?: CapxulError;
2519
2549
  }>;
2520
2550
  /** @internal Optional facade bridge for consumer test doubles. */
2521
2551
  readonly runFacade?: <T>(verb: IdentityFacadeVerb, controls: InvocationControls | undefined, run: (controls: InvocationControls) => Promise<T>) => Promise<T>;
@@ -2524,6 +2554,7 @@ interface CapxulClient {
2524
2554
  readonly auth: AuthMethods;
2525
2555
  readonly smartAccount: SmartAccountMethods;
2526
2556
  readonly identity: IdentityMethods;
2557
+ readonly onboarding: OnboardingMethods;
2527
2558
  /** `health(nonce)` returns the nonce from the configured deployment. Use it to verify backend liveness before sign-in. */
2528
2559
  readonly system: SystemMethods;
2529
2560
  /**
@@ -2794,4 +2825,4 @@ interface ObservationAdapter {
2794
2825
  /** Stable PostHog event used for typed failures that are expected product outcomes. */
2795
2826
  declare const CAPXUL_SDK_EXPECTED_OUTCOME_EVENT = "capxul_sdk_expected_outcome";
2796
2827
  //#endregion
2797
- export { OrganizationPaymentsMethods as $, OrgLane as $n, MeMethods as $t, OrgView as A, AccountSetupStep as An, ActivityFilter as At, PayrollGroupInput as B, SubmittedPermissionExecution as Bn, ActivitySummaryTotal as Bt, DetectPendingOrgInvitationsResult as C, RecipientResolutionKind as Cn, AddressBookMethods as Ct, OrgMethods as D, TargetsMethods as Dn, ActivityAnnotation as Dt, MemberView as E, TargetReference as En, InboxMethods as Et, RoleSpendCap as F, OrgLifecycle as Fn, ActivityPage as Ft, PayrollRun as G, RequestStatus as Gn, DestinationKind as Gt, PayrollGroupsMethods as H, PAYMENT_DIRECTIONS as Hn, DepositInstructions as Ht, RoleView as I, OrgSetupStep as In, ActivityRange as It, PayrollRuns as J, TelemetryIdentifyInput as Jn, DestinationRail as Jt, PayrollRunItemInput as K, TelemetryEvent as Kn, DestinationListInput as Kt, AuthorizeRunInput as L, ActorRef as Ln, ActivityReference as Lt, OrganizationAuditLogItem as M, IdentityMethods as Mn, ActivityKind as Mt, ResendInviteTokenInput as N, SmartAccountMethods as Nn, ActivityListParams as Nt, OrgScopedMethods as O, fingerprintPaymentIntent as On, ActivityAnnotationInput as Ot, RoleDefinition as P, AuthMethods as Pn, ActivityMethods as Pt, OrganizationPaymentItemInput as Q, IdentityState as Qn, HandlesMethods as Qt, PayrollEngagementTerms as R, CurrentHoldings as Rn, ActivitySummary as Rt, CreateOrgInput as S, RecipientResolution as Sn, AddressBookLabelInput as St, MemberStatus as T, ResolvedTarget as Tn, InboxItem as Tt, PayrollMethods as U, PAYMENT_STATUSES as Un, Destination as Ut, PayrollGroupMember as V, InboxStatus as Vn, ActorReference as Vt, PayrollOptions as W, PaymentStatus$1 as Wn, DestinationAddInput as Wt, OrganizationPaymentBatchInput as X, Destination$1 as Xn, DestinationsMethods as Xt, PayrollTermsUnit as Y, TelemetryPort as Yn, DestinationRemoveInput as Yt, OrganizationPaymentInput as Z, IdentityEvent as Zn, FinancialOpsMethods as Zt, SystemMethods as _, PaymentStatus as _n, ActorRequest as _t, SdkFailureObservation as a, OfframpStatus as an, IdentityTransition as ar, PermissionReplaceInput as at, CurrentUserContext as b, PaymentsMethods as bn, AddressBookAddInput as bt, PostHogObservabilityOptions as c, Payment as cn, Budget as ct, CreateCapxulClientInput as d, PaymentDocumentKind as dn, OrgMeOptions as dt, MeProfile as en, Readiness as er, PermissionAssignInput as et, IdentityProfileDetails as f, PaymentDocumentRef as fn, AccountsMethods as ft, Holding as g, PaymentMoney as gn, ActorRelationshipMethods as gt, HoldingsMethods as h, PaymentDocumentsMethods as hn, ActorProfileMethods as ht, ObservationDelivery as i, OfframpQuoteInput as in, isRestoring as ir, PermissionOptions as it, OrganizationAccount as j, isSettingUpLifecycle as jn, ActivityItem as jt, OrgTemplate as k, AccountLifecycle as kn, ActivityDetail as kt, postHogObservability as l, PaymentActivityEvidence as ln, OrgMe as lt, IdentityRuntimeSendResult as m, PaymentDocumentVerification as mn, ActorProfile as mt, ObservationAdapter as n, OfframpMethods as nn, destination as nr, PermissionCreateInput as nt, HostObservability as o, Payee as on, InvocationControls as or, PermissionRevokeInput as ot, IdentityRuntime as p, PaymentDocumentRender as pn, AccountMethods as pt, PayrollRunStatus as q, TelemetryGroupInput as qn, DestinationPayload as qt, ObservationContext as r, OfframpQuote as rn, isClaimed as rr, PermissionMethods as rt, PostHogObservabilityClient as s, PayeesMethods as sn, PermissionReadResult as st, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT as t, MovementActivityEvidence as tn, StateLabel as tr, PermissionChangeInput as tt, CapxulClient as u, PaymentDirection as un, OrgMeMethod as ut, SystemHealth as v, PaymentTiming as vn, ActorRequestIssueInput as vt, InviteMemberInput as w, Ref$1 as wn, InboxApproveInput as wt, CurrentUserMethods as x, PaymentsPayInput as xn, AddressBookEntry as xt, MediaMethods as y, PaymentType as yn, ActorRequestsMethods as yt, PayrollGroup as z, Permission as zn, ActivitySummaryParams as zt };
2828
+ export { OrganizationPaymentsMethods as $, TelemetryGroupInput as $n, DestinationRail as $t, OrgView as A, ResolvedTarget as An, InboxItem as At, PayrollGroupInput as B, AuthMethods as Bn, ActivityPage as Bt, DetectPendingOrgInvitationsResult as C, PaymentTiming as Cn, ActorRequestIssueInput as Ct, OrgMethods as D, RecipientResolution as Dn, AddressBookLabelInput as Dt, MemberView as E, PaymentsPayInput as En, AddressBookEntry as Et, RoleSpendCap as F, AccountSetupStep as Fn, ActivityFilter as Ft, PayrollRun as G, Permission as Gn, ActivitySummaryTotal as Gt, PayrollGroupsMethods as H, OrgSetupStep as Hn, ActivityReference as Ht, RoleView as I, isSettingUpLifecycle as In, ActivityItem as It, PayrollRuns as J, PAYMENT_DIRECTIONS as Jn, Destination as Jt, PayrollRunItemInput as K, SubmittedPermissionExecution as Kn, ActorReference as Kt, AuthorizeRunInput as L, CompleteProfileInput as Ln, ActivityKind as Lt, OrganizationAuditLogItem as M, TargetsMethods as Mn, ActivityAnnotation as Mt, ResendInviteTokenInput as N, fingerprintPaymentIntent as Nn, ActivityAnnotationInput as Nt, OrgScopedMethods as O, RecipientResolutionKind as On, AddressBookMethods as Ot, RoleDefinition as P, AccountLifecycle as Pn, ActivityDetail as Pt, OrganizationPaymentItemInput as Q, TelemetryEvent as Qn, DestinationPayload as Qt, PayrollEngagementTerms as R, IdentityMethods as Rn, ActivityListParams as Rt, CreateOrgInput as S, PaymentStatus as Sn, ActorRequest as St, MemberStatus as T, PaymentsMethods as Tn, AddressBookAddInput as Tt, PayrollMethods as U, ActorRef as Un, ActivitySummary as Ut, PayrollGroupMember as V, OrgLifecycle as Vn, ActivityRange as Vt, PayrollOptions as W, CurrentHoldings as Wn, ActivitySummaryParams as Wt, OrganizationPaymentBatchInput as X, PaymentStatus$1 as Xn, DestinationKind as Xt, PayrollTermsUnit as Y, PAYMENT_STATUSES as Yn, DestinationAddInput as Yt, OrganizationPaymentInput as Z, RequestStatus as Zn, DestinationListInput as Zt, SystemMethods as _, PaymentDocumentRef as _n, ReadyAccountLifecycle as _t, SdkFailureObservation as a, MeProfile as an, OrgLane as ar, PermissionReplaceInput as at, CurrentUserContext as b, PaymentDocumentsMethods as bn, ActorProfileMethods as bt, PostHogObservabilityOptions as c, OfframpQuote as cn, destination as cr, Budget as ct, CreateCapxulClientInput as d, Payee as dn, IdentityTransition as dr, OrgMeOptions as dt, DestinationRemoveInput as en, TelemetryIdentifyInput as er, PermissionAssignInput as et, IdentityProfileDetails as f, PayeesMethods as fn, InvocationControls as fr, AccountsMethods as ft, Holding as g, PaymentDocumentKind as gn, PersonOnboardingInput as gt, HoldingsMethods as h, PaymentDirection as hn, PersonOnboarding as ht, ObservationDelivery as i, MeMethods as in, IdentityState as ir, PermissionOptions as it, OrganizationAccount as j, TargetReference as jn, InboxMethods as jt, OrgTemplate as k, Ref$1 as kn, InboxApproveInput as kt, postHogObservability as l, OfframpQuoteInput as ln, isClaimed as lr, OrgMe as lt, IdentityRuntimeSendResult as m, PaymentActivityEvidence as mn, OnboardingMethods as mt, ObservationAdapter as n, FinancialOpsMethods as nn, Destination$1 as nr, PermissionCreateInput as nt, HostObservability as o, MovementActivityEvidence as on, Readiness as or, PermissionRevokeInput as ot, IdentityRuntime as p, Payment as pn, CompletedPersonProfile as pt, PayrollRunStatus as q, InboxStatus as qn, DepositInstructions as qt, ObservationContext as r, HandlesMethods as rn, IdentityEvent as rr, PermissionMethods as rt, PostHogObservabilityClient as s, OfframpMethods as sn, StateLabel as sr, PermissionReadResult as st, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT as t, DestinationsMethods as tn, TelemetryPort as tr, PermissionChangeInput as tt, CapxulClient as u, OfframpStatus as un, isRestoring as ur, OrgMeMethod as ut, SystemHealth as v, PaymentDocumentRender as vn, AccountMethods as vt, InviteMemberInput as w, PaymentType as wn, ActorRequestsMethods as wt, CurrentUserMethods as x, PaymentMoney as xn, ActorRelationshipMethods as xt, MediaMethods as y, PaymentDocumentVerification as yn, ActorProfile as yt, PayrollGroup as z, SmartAccountMethods as zn, ActivityMethods as zt };
@@ -1,5 +1,5 @@
1
- import { Account, Address, Hex } from "viem";
2
1
  import { Context, Effect } from "effect";
2
+ import { Account, Address, Hex } from "viem";
3
3
  //#region ../errors/src/chain-cause.d.ts
4
4
  /**
5
5
  * Why an operation failed — the one flat vocabulary. The first four are the
@@ -257,6 +257,10 @@ declare const Errors: {
257
257
  }) => CapxulError;
258
258
  };
259
259
  //#endregion
260
+ //#region ../config/src/capxul-payments-v2.d.ts
261
+ /** Immutable CapxulPaymentsV2 deployment on Base Sepolia. */
262
+ declare const CAPXUL_PAYMENTS_V2_ADDRESS: Address;
263
+ //#endregion
260
264
  //#region ../types/src/brand.d.ts
261
265
  /**
262
266
  * Nominal type helper. `Brand<T, B>` is structurally a `T` at runtime but
@@ -364,10 +368,6 @@ type SupportedCurrencyCode = (typeof SUPPORTED_CURRENCIES)[number]["code"];
364
368
  declare function toAddress(raw: unknown): Address$1;
365
369
  declare function toCountryCode(raw: unknown): CountryCode;
366
370
  //#endregion
367
- //#region ../config/src/capxul-payments-v2.d.ts
368
- /** Immutable CapxulPaymentsV2 deployment on Base Sepolia. */
369
- declare const CAPXUL_PAYMENTS_V2_ADDRESS: Address;
370
- //#endregion
371
371
  //#region src/ports/auth-cache.d.ts
372
372
  /**
373
373
  * AuthCachePort stores the user session and the cached
@@ -594,4 +594,4 @@ interface Eip1193RequestProvider {
594
594
  */
595
595
  declare function injectedWalletSigner(provider: Eip1193RequestProvider): CapxulSigner;
596
596
  //#endregion
597
- export { RoleKey as $, AnonymousDistinctId as A, DurationMs as B, CachedJwt as C, Address$1 as D, AccountId as E, BudgetId as F, PartyId as G, EpochMs as H, ChainId as I, PayrollRunId as J, PaymentCommandId as K, CountryCode as L, AuthSession as M, AuthUserId as N, AllowanceKey as O, BlockNumber as P, PublishableKey as Q, CurrencyCode as R, AuthCachePortTag as S, Account$1 as T, Money as U, Email as V, OrgId as W, PermissionId as X, PermissionAssignmentId as Y, Profile$1 as Z, ClockPort as _, FailureMode as _t, SignerStatusStore as a, toCountryCode as at, AuthCacheError as b, AccountProviderSource as c, CapxulErrorCode as ct, eip1193AccountProvider as d, Failure as dt, SessionToken as et, localPrivateKeyAccountProvider as f, isCapxulError as ft, SmartAccount as g, FAILURE_MODES as gt, Session as h, ChainUpstream as ht, SignerStatus as i, toAddress as it, AppId as j, AllowedOrigin as k, AccountRequirement as l, CapxulErrorDetails as lt, Profile as m, ChainCause as mt, CapxulSigner as n, TxHash as nt, injectedWalletSigner as o, CAPXUL_ERROR_CODES as ot, CapxulResult as p, CHAIN_UPSTREAMS as pt, PayrollGroupId as q, Eip1193RequestProvider as r, WeiAmount as rt, AccountProvider as s, CapxulError as st, CapxulDigestSigner as t, SmartAccount$1 as tt, Eip1193Provider as u, Errors as ut, AuthClientPort as v, RevertSummary as vt, CAPXUL_PAYMENTS_V2_ADDRESS as w, AuthCachePort as x, CanSendOtpStatus as y, DocumentHash as z };
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 };
@@ -1,4 +1,4 @@
1
- import { Jn as TelemetryIdentifyInput, Kn as TelemetryEvent, ar as IdentityTransition, n as ObservationAdapter, qn as TelemetryGroupInput, u as CapxulClient } from "../observation-B3PCugGC.mjs";
1
+ import { $n as TelemetryGroupInput, Qn as TelemetryEvent, dr as IdentityTransition, er as TelemetryIdentifyInput, n as ObservationAdapter, u as CapxulClient } from "../observation-B76zFxd6.mjs";
2
2
  import { Effect, Layer } from "effect";
3
3
  //#region src/testing/telemetry/RecordingTelemetryAdapter.d.ts
4
4
  type RecordingTelemetryOperation = {
@@ -1,7 +1,7 @@
1
- import { F as fromWei, _ as convexCallErrorFromCapxul, c as redactTelemetryEvent, h as identityErrorFromCapxul, i as smartAccountErrorFromCapxul, o as accountReadErrorFromCapxul, p as wireChainId, t as assembleCapxulClient, x as toWei, y as bootstrapErrorFromCapxul } from "../create-capxul-client-dk67qjlK.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-m_aHLaNm.mjs";
3
- import { keccak256 } from "viem";
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";
4
3
  import { Effect, Result, Semaphore } from "effect";
4
+ import { keccak256 } from "viem";
5
5
  import { getFunctionName } from "convex/server";
6
6
  //#region src/testing/account/InMemoryAccountReadAdapter.ts
7
7
  var InMemoryAccountReadAdapter = class {
@@ -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: existing?.username ?? null,
554
+ username: input.username ?? existing?.username ?? null,
555
555
  imageUrl: existing?.imageUrl ?? null,
556
556
  kycTier: existing?.kycTier ?? toKycTier(0),
557
557
  createdAt: existing?.createdAt ?? now,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capxul/sdk",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Xelmar-tech/infrastructure.git",
@@ -49,10 +49,10 @@
49
49
  "vitest": "4.1.11",
50
50
  "@capxul/config": "0.2.3",
51
51
  "@capxul/errors": "0.2.0",
52
+ "@capxul/observability": "3.2.0",
52
53
  "@capxul/types": "0.2.3",
53
54
  "@capxul/typescript-config": "0.0.0",
54
- "@capxul/wire": "0.6.0",
55
- "@capxul/observability": "3.1.0"
55
+ "@capxul/wire": "0.6.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": {
@@ -1,5 +1,5 @@
1
- import { concat, encodeAbiParameters, encodeFunctionData, encodePacked, getContractAddress, keccak256, padHex, stringToHex, toBytes, toEventSelector, toFunctionSelector, toFunctionSignature } from "viem";
2
1
  import { Context, Data, Effect, Layer, Result } from "effect";
2
+ import { concat, encodeAbiParameters, encodeFunctionData, encodePacked, getContractAddress, keccak256, padHex, stringToHex, toBytes, toEventSelector, toFunctionSelector, toFunctionSignature } from "viem";
3
3
  //#region ../errors/src/secret-material.ts
4
4
  const SENSITIVE_MATERIAL_PATTERNS = [
5
5
  /(?:^|[^a-fA-F0-9])(?<!0[xX])[a-fA-F0-9]{64}(?:$|[^a-fA-F0-9])/u,