@capxul/sdk 4.20.0-beta.7 → 4.20.0-beta.8
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 +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{production-UMTDZSTH.d.mts → production-CDJHj_pg.d.mts} +2 -0
- package/dist/{production-B63Xm_fl.mjs → production-DI1pfsy1.mjs} +38 -6
- package/dist/testing/index.d.mts +1 -1
- package/dist/testing/index.mjs +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ as OrgId, A as Address, At as ChainCause, B as BudgetId, Ct as CapxulError, D as Account, E as CAPXUL_PAYMENTS_V2_ADDRESS, Et as Errors, F as AssetAmount, G as CurrencyCode, I as AssetId, J as EVM_ADDRESS_RE, L as AuthSession, Mt as FAILURE_MODES, Nt as FailureMode, O as AccountId, Ot as isCapxulError, Pt as RevertSummary, Q as Money, R as AuthUserId, St as CAPXUL_ERROR_CODES, Tt as CapxulErrorDetails, V as ChainId, W as CountryCode, Z as Handle, _ as Session, _t as toCountryCode, a as Eip1193RequestProvider, at as PermissionId, bt as toPartyId, c as injectedWalletSigner, ct as RoleKey, d as AccountRequirement, dt as TesterKind, et as PartyId, f as Eip1193Provider, g as Profile, gt as toBudgetId, h as CapxulResult, ht as toAddress, i as CapxulSigner, jt as ChainUpstream, kt as CHAIN_UPSTREAMS, l as AccountProvider, m as localPrivateKeyAccountProvider, mt as toAccountId, nt as PayrollGroupId, o as SignerStatus, p as eip1193AccountProvider, r as CapxulDigestSigner, rt as PayrollRunId, s as SignerStatusStore, u as AccountProviderSource, v as SmartAccount, vt as toHandle, wt as CapxulErrorCode, xt as toPermissionId, yt as toOrgId } from "./OAuthBearerAuthClient-DOPDDSPs.mjs";
|
|
2
|
-
import { $ as PayrollRuns, $n as OrgSetupStep, $t as ActivityListParams, A as MemberStatus, An as PaymentDocumentsMethods, Ar as PAYMENT_STATUSES, At as PersonOnboarding, B as RoleView, Bn as TargetReference, Br as OrgLane, Bt as AddressBookAddInput, C as SystemHealth, Cn as OfframpQuoteInput, Cr as PaymentDocumentVerification, Ct as AccountsMethods, D as AssignmentProjection, Dn as PaymentDirection, Dr as SubmittedPermissionExecution, Dt as OrganizationOnboardingInput, E as CurrentUserMethods, En as PaymentActivityEvidence, Er as Permission, Et as OrganizationOnboarding, F as OrgView, Fn as PaymentsMethods, Ft as ActorProfileMethods, G as PayrollGroupInput, Gn as isSettingUpLifecycle, Gr as isRestoring, Gt as InboxItem, H as AuthorizeRunOptions, Hn as fingerprintPaymentIntent, Hr as StateLabel, Ht as AddressBookLabelInput, I as OrganizationAccess, In as PaymentsPayInput, Ir as TelemetryPort, It as ActorRelationshipMethods, J as PayrollMethods, Jn as SmartAccountMethods, Jt as ActivityAnnotationInput, K as PayrollGroupMember, Kn as CompleteProfileInput, Kr as IdentityTransition, Kt as InboxMethods, L as OrganizationAccount, Ln as RecipientResolution, Lr as Destination$1, Lt as ActorRequest, M as OrgMethods, Mn as PaymentStatus, Mr as RequestStatus, Mt as ReadyAccountLifecycle, N as OrgScopedMethods, Nn as PaymentTiming, Nt as AccountMethods, O as CreateOrgInput, On as PaymentDocumentKind, Or as InboxStatus, Ot as OrganizationOnboardingOptions, P as OrgTemplate, Pn as PaymentType, Pt as ActorProfile, Q as PayrollRunStatus, Qn as OrgLifecycle, Qt as ActivityKind, R as OrganizationAuditLogItem, Rn as Ref, Rr as IdentityEvent, Rt as ActorRequestIssueInput, S as SystemMethods, Sn as OfframpQuote, Sr as PaymentDocumentRender, St as OrgMeOptions, T as CurrentUserContext, Tn as Payment, Tr as CurrentHoldings, Tt as OnboardingMethods, U as PayrollEngagementTerms, Un as AccountLifecycle, Ur as destination, Ut as AddressBookMethods, V as AuthorizeRunInput, Vn as TargetsMethods, Vr as Readiness, Vt as AddressBookEntry, W as PayrollGroup, Wn as AccountSetupStep, Wr as isClaimed, Wt as InboxApproveInput, X as PayrollRun, Xn as AccountSetupPolicy, Xt as ActivityFilter, Y as PayrollOptions, Yn as AuthMethods, Yt as ActivityDetail, Z as PayrollRunItemInput, Zn as ClientRequests, Zt as ActivityItem, _ as CreateCapxulClientInput, _n as FinancialOpsMethods, _r as OfferedAuthority, _t as OrgInvitations, a as ObservationContext, an as ActivitySummaryParams, ar as GranteeRef, at as PermissionAssignInput, b as IdentityRuntimeSendResult, bn as MovementActivityEvidence, br as PaymentDocumentDownload, bt as OrgMe, c as HostObservability, cn as DepositInstructions, cr as InvitationPage, ct as PermissionMethods, d as postHogObservability, dn as DestinationKind, dr as InvitationRecovery, dt as PermissionRevokeInput, en as ActivityMethods, er as PayoutAddress, et as PayrollTermsUnit, f as OpenfortBrowserAuth, fn as DestinationListInput, fr as InvitationTarget, ft as PermissionReadResult, g as CapxulClient, gn as DestinationsMethods, gr as InvitePreview, gt as InvitePreviewInput, h as createOpenfortBrowserSigner, hn as DestinationRemoveInput, hr as InviteInput, ht as InvitePrepared, i as ObservationAdapter, in as ActivitySummary, ir as EndingReason, it as OrganizationPaymentsMethods, j as MemberView, jn as PaymentMoney, jr as PaymentStatus$1, jt as PersonOnboardingInput, k as MemberIdentityProjection, kn as PaymentDocumentRef, kr as PAYMENT_DIRECTIONS, kt as OrganizationOnboardingState, l as PostHogObservabilityClient, ln as Destination, lr as InvitationPageInput, lt as PermissionOptions, m as OpenfortBrowserSignerBootstrap, mn as DestinationRail, mr as InviteGrant, mt as InviteOptions, nn as ActivityRange, nr as BudgetIntent, nt as OrganizationPaymentInput, o as ObservationDelivery, on as ActivitySummaryTotal, or as InvitationAcceptInput, ot as PermissionChangeInput, p as OpenfortBrowserSigner, pn as DestinationPayload, pr as InvitationView, pt as InviteMethod, q as PayrollGroupsMethods, qn as IdentityMethods, qr as InvocationControls, qt as ActivityAnnotation, r as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, rn as ActivityReference, rr as CurrentPolicy, rt as OrganizationPaymentItemInput, s as SdkFailureObservation, sn as ActorReference, sr as InvitationId, st as PermissionCreateInput, t as CapxulClientInput, tn as ActivityPage, tr as AuthorityRef, tt as OrganizationPaymentBatchInput, u as PostHogObservabilityOptions, un as DestinationAddInput, ur as InvitationPhase, ut as PermissionReplaceInput, v as IdentityProfileDetails, vn as MeMethods, vr as SpendingScope, vt as OwnInvitationsMethod, w as MediaMethods, wn as OfframpStatus, wr as ActorRef, wt as CompletedPersonProfile, x as HoldingsMethods, xn as OfframpMethods, xr as PaymentDocumentReadRef, xt as OrgMeMethod, y as IdentityRuntime, yn as MeProfile, yr as ClientRequestView, yt as Budget, z as RoleDefinition, zn as ResolvedTarget, zr as IdentityState, zt as ActorRequestsMethods } from "./production-
|
|
2
|
+
import { $ as PayrollRuns, $n as OrgSetupStep, $t as ActivityListParams, A as MemberStatus, An as PaymentDocumentsMethods, Ar as PAYMENT_STATUSES, At as PersonOnboarding, B as RoleView, Bn as TargetReference, Br as OrgLane, Bt as AddressBookAddInput, C as SystemHealth, Cn as OfframpQuoteInput, Cr as PaymentDocumentVerification, Ct as AccountsMethods, D as AssignmentProjection, Dn as PaymentDirection, Dr as SubmittedPermissionExecution, Dt as OrganizationOnboardingInput, E as CurrentUserMethods, En as PaymentActivityEvidence, Er as Permission, Et as OrganizationOnboarding, F as OrgView, Fn as PaymentsMethods, Ft as ActorProfileMethods, G as PayrollGroupInput, Gn as isSettingUpLifecycle, Gr as isRestoring, Gt as InboxItem, H as AuthorizeRunOptions, Hn as fingerprintPaymentIntent, Hr as StateLabel, Ht as AddressBookLabelInput, I as OrganizationAccess, In as PaymentsPayInput, Ir as TelemetryPort, It as ActorRelationshipMethods, J as PayrollMethods, Jn as SmartAccountMethods, Jt as ActivityAnnotationInput, K as PayrollGroupMember, Kn as CompleteProfileInput, Kr as IdentityTransition, Kt as InboxMethods, L as OrganizationAccount, Ln as RecipientResolution, Lr as Destination$1, Lt as ActorRequest, M as OrgMethods, Mn as PaymentStatus, Mr as RequestStatus, Mt as ReadyAccountLifecycle, N as OrgScopedMethods, Nn as PaymentTiming, Nt as AccountMethods, O as CreateOrgInput, On as PaymentDocumentKind, Or as InboxStatus, Ot as OrganizationOnboardingOptions, P as OrgTemplate, Pn as PaymentType, Pt as ActorProfile, Q as PayrollRunStatus, Qn as OrgLifecycle, Qt as ActivityKind, R as OrganizationAuditLogItem, Rn as Ref, Rr as IdentityEvent, Rt as ActorRequestIssueInput, S as SystemMethods, Sn as OfframpQuote, Sr as PaymentDocumentRender, St as OrgMeOptions, T as CurrentUserContext, Tn as Payment, Tr as CurrentHoldings, Tt as OnboardingMethods, U as PayrollEngagementTerms, Un as AccountLifecycle, Ur as destination, Ut as AddressBookMethods, V as AuthorizeRunInput, Vn as TargetsMethods, Vr as Readiness, Vt as AddressBookEntry, W as PayrollGroup, Wn as AccountSetupStep, Wr as isClaimed, Wt as InboxApproveInput, X as PayrollRun, Xn as AccountSetupPolicy, Xt as ActivityFilter, Y as PayrollOptions, Yn as AuthMethods, Yt as ActivityDetail, Z as PayrollRunItemInput, Zn as ClientRequests, Zt as ActivityItem, _ as CreateCapxulClientInput, _n as FinancialOpsMethods, _r as OfferedAuthority, _t as OrgInvitations, a as ObservationContext, an as ActivitySummaryParams, ar as GranteeRef, at as PermissionAssignInput, b as IdentityRuntimeSendResult, bn as MovementActivityEvidence, br as PaymentDocumentDownload, bt as OrgMe, c as HostObservability, cn as DepositInstructions, cr as InvitationPage, ct as PermissionMethods, d as postHogObservability, dn as DestinationKind, dr as InvitationRecovery, dt as PermissionRevokeInput, en as ActivityMethods, er as PayoutAddress, et as PayrollTermsUnit, f as OpenfortBrowserAuth, fn as DestinationListInput, fr as InvitationTarget, ft as PermissionReadResult, g as CapxulClient, gn as DestinationsMethods, gr as InvitePreview, gt as InvitePreviewInput, h as createOpenfortBrowserSigner, hn as DestinationRemoveInput, hr as InviteInput, ht as InvitePrepared, i as ObservationAdapter, in as ActivitySummary, ir as EndingReason, it as OrganizationPaymentsMethods, j as MemberView, jn as PaymentMoney, jr as PaymentStatus$1, jt as PersonOnboardingInput, k as MemberIdentityProjection, kn as PaymentDocumentRef, kr as PAYMENT_DIRECTIONS, kt as OrganizationOnboardingState, l as PostHogObservabilityClient, ln as Destination, lr as InvitationPageInput, lt as PermissionOptions, m as OpenfortBrowserSignerBootstrap, mn as DestinationRail, mr as InviteGrant, mt as InviteOptions, nn as ActivityRange, nr as BudgetIntent, nt as OrganizationPaymentInput, o as ObservationDelivery, on as ActivitySummaryTotal, or as InvitationAcceptInput, ot as PermissionChangeInput, p as OpenfortBrowserSigner, pn as DestinationPayload, pr as InvitationView, pt as InviteMethod, q as PayrollGroupsMethods, qn as IdentityMethods, qr as InvocationControls, qt as ActivityAnnotation, r as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, rn as ActivityReference, rr as CurrentPolicy, rt as OrganizationPaymentItemInput, s as SdkFailureObservation, sn as ActorReference, sr as InvitationId, st as PermissionCreateInput, t as CapxulClientInput, tn as ActivityPage, tr as AuthorityRef, tt as OrganizationPaymentBatchInput, u as PostHogObservabilityOptions, un as DestinationAddInput, ur as InvitationPhase, ut as PermissionReplaceInput, v as IdentityProfileDetails, vn as MeMethods, vr as SpendingScope, vt as OwnInvitationsMethod, w as MediaMethods, wn as OfframpStatus, wr as ActorRef, wt as CompletedPersonProfile, x as HoldingsMethods, xn as OfframpMethods, xr as PaymentDocumentReadRef, xt as OrgMeMethod, y as IdentityRuntime, yn as MeProfile, yr as ClientRequestView, yt as Budget, z as RoleDefinition, zn as ResolvedTarget, zr as IdentityState, zt as ActorRequestsMethods } from "./production-CDJHj_pg.mjs";
|
|
3
3
|
import { Hex } from "viem";
|
|
4
4
|
import { Effect, Layer } from "effect";
|
|
5
5
|
//#region ../errors/src/index.d.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as resolveFailureMode, B as valueIn, C as normalizeExceptionErrorKind, D as isSettingUpLifecycle, E as safeExceptionLabel, F as isCapxulOperation, G as requireAsset, H as assetSymbolFor, I as normalizeCapxulOperation, J as parseMoney, K as toRaw, M as PAYMENT_STATUSES, O as injectedWalletSigner, P as CAPXUL_OPERATIONS, R as positionPeg, S as SDK_VERSION, T as projectSdkException, U as formatAssetAmount, W as parseAssetAmount, X as isClaimed, Y as destination, Z as isRestoring, _ as openfortEmbeddedWalletPort, b as failureDetail, d as deriveDevPrivateKey, f as devPrivateKeySigner, g as openfortEmbeddedSignerFromWallet, h as openfortEmbeddedSigner, j as PAYMENT_DIRECTIONS, k as signerFailure, m as embeddedSigner, p as createOpenfortBrowserSigner, q as isMoneyParseError, r as postHogObservability, t as createCapxulClient$1, v as fingerprintPaymentIntent, w as normalizeExceptionOperation, x as EXCEPTION_MESSAGE, y as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, z as valueActivitySummary } from "./production-
|
|
1
|
+
import { A as resolveFailureMode, B as valueIn, C as normalizeExceptionErrorKind, D as isSettingUpLifecycle, E as safeExceptionLabel, F as isCapxulOperation, G as requireAsset, H as assetSymbolFor, I as normalizeCapxulOperation, J as parseMoney, K as toRaw, M as PAYMENT_STATUSES, O as injectedWalletSigner, P as CAPXUL_OPERATIONS, R as positionPeg, S as SDK_VERSION, T as projectSdkException, U as formatAssetAmount, W as parseAssetAmount, X as isClaimed, Y as destination, Z as isRestoring, _ as openfortEmbeddedWalletPort, b as failureDetail, d as deriveDevPrivateKey, f as devPrivateKeySigner, g as openfortEmbeddedSignerFromWallet, h as openfortEmbeddedSigner, j as PAYMENT_DIRECTIONS, k as signerFailure, m as embeddedSigner, p as createOpenfortBrowserSigner, q as isMoneyParseError, r as postHogObservability, t as createCapxulClient$1, v as fingerprintPaymentIntent, w as normalizeExceptionOperation, x as EXCEPTION_MESSAGE, y as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, z as valueActivitySummary } from "./production-DI1pfsy1.mjs";
|
|
2
2
|
import { G as toCountryCode, I as currencySymbolFor, K as toCurrencyCode, L as toAccountId, R as toAddress, U as toBudgetId, Z as toHandle, at as toPermissionId, bt as CHAIN_UPSTREAMS, et as toOrgId, gt as CapxulError, ht as CAPXUL_ERROR_CODES, j as EVM_ADDRESS_RE, m as CAPXUL_PAYMENTS_V2_ADDRESS, pt as HANDLE_RE, tt as toPartyId, vt as Errors, x as TOKENS, xt as FAILURE_MODES, yt as isCapxulError } from "./OAuthBearerAuthClient-DdKYPHE0.mjs";
|
|
3
3
|
import { Effect } from "effect";
|
|
4
4
|
import { privateKeyToAccount } from "viem/accounts";
|
|
@@ -3839,6 +3839,8 @@ interface CapxulClientInput {
|
|
|
3839
3839
|
readonly publishableKey: string;
|
|
3840
3840
|
/** Public Capxul bootstrap origin; defaults remain unchanged when omitted. */
|
|
3841
3841
|
readonly bootstrapBaseUrl?: string;
|
|
3842
|
+
/** Show sanitized SDK, provider, and backend diagnostics on the host console. */
|
|
3843
|
+
readonly localDiagnostics?: boolean;
|
|
3842
3844
|
/**
|
|
3843
3845
|
* One host-owned product/failure observability module around the host's
|
|
3844
3846
|
* existing analytics client. Omit for zero host observation work.
|
|
@@ -6219,6 +6219,18 @@ function withInvocationParentSpan(effect, controls) {
|
|
|
6219
6219
|
const parent = controls?.[INVOCATION_PARENT_SPAN];
|
|
6220
6220
|
return parent === void 0 ? effect : effect.pipe(Effect.withParentSpan(parent));
|
|
6221
6221
|
}
|
|
6222
|
+
/**
|
|
6223
|
+
* The input field a refused request named.
|
|
6224
|
+
*
|
|
6225
|
+
* The surfaces that call the port directly already carry `details.field` for an
|
|
6226
|
+
* `INVALID_INPUT` refusal. The actor keeps that one allowlisted detail instead of
|
|
6227
|
+
* dropping it, so a caller sees the same refusal either way.
|
|
6228
|
+
*/
|
|
6229
|
+
const refusedInputField = (failure) => {
|
|
6230
|
+
if (failure.code !== "INVALID_INPUT") return void 0;
|
|
6231
|
+
const field = failure.error?.details?.field;
|
|
6232
|
+
return typeof field === "string" && field.length > 0 ? { field } : void 0;
|
|
6233
|
+
};
|
|
6222
6234
|
var ActorFailure = class extends Error {
|
|
6223
6235
|
reason;
|
|
6224
6236
|
machine;
|
|
@@ -6384,7 +6396,7 @@ const boot = (spec, options = {}) => Effect.gen(function* () {
|
|
|
6384
6396
|
const event = { _tag: env.origin.event };
|
|
6385
6397
|
const failedState = exit.failure === timeoutFailure || exit.failure === cancelledFailure ? yield* recoverFailure(state, env.origin, exit.failure) : state;
|
|
6386
6398
|
yield* emit(nonApplied(failedState, event, exit.failure.code, outcome, env, exit.failure));
|
|
6387
|
-
const details = exit.failure === timeoutFailure ? { reason: "timeout" } :
|
|
6399
|
+
const details = exit.failure === timeoutFailure ? { reason: "timeout" } : refusedInputField(exit.failure);
|
|
6388
6400
|
yield* failReply(held.reply, makeFailure(failedState, event, exit.failure.code, details, exit.failure.error ?? exit.failure));
|
|
6389
6401
|
return;
|
|
6390
6402
|
}
|
|
@@ -8098,7 +8110,7 @@ function subscribeActivity(deps, actor, controls, onChange) {
|
|
|
8098
8110
|
}
|
|
8099
8111
|
//#endregion
|
|
8100
8112
|
//#region package.json
|
|
8101
|
-
var version = "4.20.0-beta.
|
|
8113
|
+
var version = "4.20.0-beta.8";
|
|
8102
8114
|
//#endregion
|
|
8103
8115
|
//#region src/telemetry/exception-projection.ts
|
|
8104
8116
|
/** Fixed fallback for failures that have no safe message. */
|
|
@@ -11679,6 +11691,7 @@ function mapBetterAuthError(operation, body) {
|
|
|
11679
11691
|
const code = typeof errBody.code === "string" ? errBody.code : "";
|
|
11680
11692
|
if (code === "OTP_EXPIRED") return Errors.otpExpired();
|
|
11681
11693
|
if (code === "INVALID_OTP") return Errors.invalidInput("otp", errBody.message ?? "invalid OTP");
|
|
11694
|
+
if (code === "TOO_MANY_ATTEMPTS") return Errors.rateLimited({ resource: "better-auth/verifyOtp" });
|
|
11682
11695
|
if (code === "VALIDATION_ERROR" || code === "INVALID_EMAIL") return Errors.invalidInput("email", errBody.message ?? "invalid email");
|
|
11683
11696
|
}
|
|
11684
11697
|
return Errors.providerError("better-auth", operation, new Error(String(body)));
|
|
@@ -12296,6 +12309,10 @@ var BetterAuthNodeAdapter = class {
|
|
|
12296
12309
|
ok: false,
|
|
12297
12310
|
error: Errors.invalidInput("otp", errBody.message ?? "invalid OTP")
|
|
12298
12311
|
};
|
|
12312
|
+
if (errBody.code === "TOO_MANY_ATTEMPTS") return {
|
|
12313
|
+
ok: false,
|
|
12314
|
+
error: Errors.rateLimited({ resource: "better-auth/verifyOtp" })
|
|
12315
|
+
};
|
|
12299
12316
|
}
|
|
12300
12317
|
}
|
|
12301
12318
|
return {
|
|
@@ -12855,6 +12872,12 @@ const stderrConvexLogger = {
|
|
|
12855
12872
|
error: writeConvexDiagnostic,
|
|
12856
12873
|
logVerbose: () => void 0
|
|
12857
12874
|
};
|
|
12875
|
+
const silentConvexLogger = {
|
|
12876
|
+
log: () => void 0,
|
|
12877
|
+
warn: () => void 0,
|
|
12878
|
+
error: () => void 0,
|
|
12879
|
+
logVerbose: () => void 0
|
|
12880
|
+
};
|
|
12858
12881
|
/** Exact floor-first allowlist; every additional handler must migrate its validator first. */
|
|
12859
12882
|
const OBSERVED_CONVEX_ACTIONS = /* @__PURE__ */ new Set([
|
|
12860
12883
|
"system:healthObserved",
|
|
@@ -12943,7 +12966,7 @@ var ConvexCallAdapter = class {
|
|
|
12943
12966
|
const webSocketConstructor = this.#connectionMonitor.observedWebSocketConstructor();
|
|
12944
12967
|
this.#client = deps.client ?? new ConvexClient(deps.convexUrl, {
|
|
12945
12968
|
...webSocketConstructor === void 0 ? {} : { webSocketConstructor },
|
|
12946
|
-
|
|
12969
|
+
logger: deps.localDiagnostics === true ? stderrConvexLogger : silentConvexLogger
|
|
12947
12970
|
});
|
|
12948
12971
|
this.#tokenProvider = deps.tokenProvider;
|
|
12949
12972
|
this.#applicationId = deps.applicationId;
|
|
@@ -18628,7 +18651,7 @@ function productionAuthCacheLayer(input) {
|
|
|
18628
18651
|
function productionConvexCallLayer(input, refreshConvexAuthRef) {
|
|
18629
18652
|
return Layer.unwrap(Effect.map(AuthClientPortTag, (authClient) => ConvexCallLayer({
|
|
18630
18653
|
convexUrl: input.runtimeUrls.convexUrl,
|
|
18631
|
-
|
|
18654
|
+
localDiagnostics: input.localDiagnostics,
|
|
18632
18655
|
...input.applicationId === void 0 ? {} : { applicationId: input.applicationId },
|
|
18633
18656
|
...input.observation === void 0 ? {} : { observation: input.observation },
|
|
18634
18657
|
...input.convexClient === void 0 ? {} : { client: input.convexClient },
|
|
@@ -18667,6 +18690,7 @@ function resolveProductionObservability(input) {
|
|
|
18667
18690
|
};
|
|
18668
18691
|
}
|
|
18669
18692
|
async function createProductionAdapters(input) {
|
|
18693
|
+
const localDiagnostics = productionLocalDiagnostics(input);
|
|
18670
18694
|
const { observation, telemetry, invocationObservation, invocationTelemetry } = resolveProductionObservability(input);
|
|
18671
18695
|
const resolvedInput = resolveInput(input);
|
|
18672
18696
|
if (!resolvedInput.ok) return resolvedInput;
|
|
@@ -18737,6 +18761,7 @@ async function createProductionAdapters(input) {
|
|
|
18737
18761
|
const portsLayer = mergeProductionAdapterLayers(makeProductionAdapterLayerEntries({
|
|
18738
18762
|
bootstrap,
|
|
18739
18763
|
runtime: resolvedInput.value.runtime,
|
|
18764
|
+
localDiagnostics,
|
|
18740
18765
|
...resolvedInput.value.origin === void 0 ? {} : { origin: resolvedInput.value.origin },
|
|
18741
18766
|
runtimeUrls: runtimeUrls.value,
|
|
18742
18767
|
chainId: bootstrapResult.value.chainId,
|
|
@@ -18751,7 +18776,7 @@ async function createProductionAdapters(input) {
|
|
|
18751
18776
|
...input.signal === void 0 ? {} : { signal: input.signal },
|
|
18752
18777
|
...input.resetSignerSession === void 0 ? {} : { resetSignerSession: input.resetSignerSession }
|
|
18753
18778
|
}));
|
|
18754
|
-
const applicationLayer = Layer.merge(portsLayer, optionalEngineeringTelemetryLayer(bootstrapResult.value.engineeringTelemetry, resolvedInput.value.runtime, hostEngineeringPolicy(input.observability))).pipe(Layer.provideMerge(resolvedInput.value.runtime
|
|
18779
|
+
const applicationLayer = Layer.merge(portsLayer, optionalEngineeringTelemetryLayer(bootstrapResult.value.engineeringTelemetry, resolvedInput.value.runtime, hostEngineeringPolicy(input.observability))).pipe(Layer.provideMerge(localDiagnosticsLayer(localDiagnostics, resolvedInput.value.runtime)));
|
|
18755
18780
|
const context = await Effect.runPromise(Layer.buildWithScope(applicationLayer, scope));
|
|
18756
18781
|
const collected = await Effect.runPromise(collectProductionFlowPorts.pipe(Effect.provide(context)));
|
|
18757
18782
|
const indexerUrl = input.indexerUrl ?? bootstrapResult.value.indexerUrl;
|
|
@@ -18815,6 +18840,13 @@ function optionalEngineeringTelemetryLayer(policy, runtime, hostPolicy) {
|
|
|
18815
18840
|
return Layer.empty;
|
|
18816
18841
|
}
|
|
18817
18842
|
}
|
|
18843
|
+
function localDiagnosticsLayer(enabled, runtime) {
|
|
18844
|
+
if (!enabled) return Logger.layer([]);
|
|
18845
|
+
return runtime === "node" ? Layer.succeed(Logger.LogToStderr, true) : Layer.empty;
|
|
18846
|
+
}
|
|
18847
|
+
function productionLocalDiagnostics(input) {
|
|
18848
|
+
return input.localDiagnostics !== false;
|
|
18849
|
+
}
|
|
18818
18850
|
function refreshConvexAuthOnSession(authClient, refresh) {
|
|
18819
18851
|
return {
|
|
18820
18852
|
...authClient,
|
|
@@ -18879,7 +18911,7 @@ async function createCapxulClientWithSignerControls(input, controls) {
|
|
|
18879
18911
|
runtime,
|
|
18880
18912
|
authBaseUrl: resolvedAuthBaseUrl,
|
|
18881
18913
|
createBrowserSigner: createOpenfortBrowserSignerFromBootstrap,
|
|
18882
|
-
diagnostic: new EffectLogDiagnosticAdapter(adapters.value.context, new ConsoleDiagnosticAdapter()),
|
|
18914
|
+
diagnostic: new EffectLogDiagnosticAdapter(adapters.value.context, productionLocalDiagnostics(input) ? new ConsoleDiagnosticAdapter() : void 0),
|
|
18883
18915
|
signer: input.signer,
|
|
18884
18916
|
factory: input.openfortSignerFactory,
|
|
18885
18917
|
finalSign: controls.signUserOpHash,
|
package/dist/testing/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as CapxulResult } from "../OAuthBearerAuthClient-DOPDDSPs.mjs";
|
|
2
|
-
import { Fr as TelemetryIdentifyInput, Kr as IdentityTransition, Nr as TelemetryEvent, Pr as TelemetryGroupInput, g as CapxulClient, i as ObservationAdapter, n as ProductionSignerControls, t as CapxulClientInput } from "../production-
|
|
2
|
+
import { Fr as TelemetryIdentifyInput, Kr as IdentityTransition, Nr as TelemetryEvent, Pr as TelemetryGroupInput, g as CapxulClient, i as ObservationAdapter, n as ProductionSignerControls, t as CapxulClientInput } from "../production-CDJHj_pg.mjs";
|
|
3
3
|
import { Effect, Layer } from "effect";
|
|
4
4
|
//#region src/testing/production-client.d.ts
|
|
5
5
|
/** Create the one production client with per-client controls at its signing boundaries. */
|
package/dist/testing/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as toRaw, L as accountFromAccountPositions, N as redactTelemetryEvent, V as assetAmountFromRaw, a as smartAccountErrorFromCapxul, c as identityErrorFromCapxul, i as assembleCapxulClient, l as convexCallErrorFromCapxul, n as createCapxulClientWithSignerControls, o as accountReadErrorFromCapxul, s as wireChainId, u as bootstrapErrorFromCapxul } from "../production-
|
|
1
|
+
import { K as toRaw, L as accountFromAccountPositions, N as redactTelemetryEvent, V as assetAmountFromRaw, a as smartAccountErrorFromCapxul, c as identityErrorFromCapxul, i as assembleCapxulClient, l as convexCallErrorFromCapxul, n as createCapxulClientWithSignerControls, o as accountReadErrorFromCapxul, s as wireChainId, u as bootstrapErrorFromCapxul } from "../production-DI1pfsy1.mjs";
|
|
2
2
|
import { $ as toKycTier, B as toAppId, G as toCountryCode, H as toAuthUserId, J as toEmail, L as toAccountId, Q as toJwtToken, R as toAddress, W as toChainId, X as toEpochSeconds, Y as toEpochMs, Z as toHandle, ct as toSessionToken, d as authClientPortFromPromiseAdapter, dt as toWeiAmount, ft as validateHandle, gt as CapxulError, n as readClockNow, ot as toPublishableKey, q as toDurationMs, r as InMemoryAuthCacheAdapter, v as deriveCapxulSafeAddress, vt as Errors, y as CONFIGURED_MONEY_ASSETS, z as toAllowedOrigin } from "../OAuthBearerAuthClient-DdKYPHE0.mjs";
|
|
3
3
|
import { keccak256 } from "viem";
|
|
4
4
|
import { Effect, Result, Semaphore } from "effect";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capxul/sdk",
|
|
3
|
-
"version": "4.20.0-beta.
|
|
3
|
+
"version": "4.20.0-beta.8",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/Xelmar-tech/infrastructure.git",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"@capxul/errors": "0.3.0",
|
|
54
54
|
"@capxul/types": "0.3.0",
|
|
55
55
|
"@capxul/typescript-config": "0.0.0",
|
|
56
|
-
"@capxul/
|
|
57
|
-
"@capxul/
|
|
56
|
+
"@capxul/wire": "0.8.0-beta.1",
|
|
57
|
+
"@capxul/observability": "4.20.0-beta.8"
|
|
58
58
|
},
|
|
59
59
|
"_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.",
|
|
60
60
|
"scripts": {
|