@capxul/sdk 4.2.0-rc.2 → 4.2.0-rc.4
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/capxul-source.json +3 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{production-CBKHzqYP.d.mts → production-B8BQj9l0.d.mts} +23 -30
- package/dist/{production-WbMhv2Fb.mjs → production-Mcv2kEAX.mjs} +318 -15
- package/dist/testing/index.d.mts +1 -1
- package/dist/testing/index.mjs +1 -1
- package/package.json +4 -4
package/dist/capxul-source.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"source": {
|
|
3
|
-
"commit": "
|
|
4
|
-
"tree": "
|
|
3
|
+
"commit": "400e4b861e8c10091ad2d9e71fc0502fe222a801",
|
|
4
|
+
"tree": "c3afb8bb5f3ce69ee8aa1e8fbe811fe213627887",
|
|
5
5
|
"branch": "codex/programme-rc",
|
|
6
6
|
"repository": "https://github.com/Xelmar-tech/infrastructure",
|
|
7
7
|
"lockfileSha256": "5870f53b72706d103220c1bcf733cb4fb71196aea32a9cfbdc277d73cc959264"
|
|
8
8
|
},
|
|
9
9
|
"name": "@capxul/sdk",
|
|
10
|
-
"version": "4.2.0-rc.
|
|
10
|
+
"version": "4.2.0-rc.4"
|
|
11
11
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ as PayrollGroupId, B as ChainId, Ct as ChainCause, D as Account, Dt as RevertSummary, E as CAPXUL_PAYMENTS_V2_ADDRESS, Et as FailureMode, F as AssetId, G as EVM_ADDRESS_RE, H as CurrencyCode, I as AuthSession, J as Handle, L as AuthUserId, O as AccountId, P as AssetAmount, St as CHAIN_UPSTREAMS, Tt as FAILURE_MODES, V as CountryCode, X as OrgId, Y as Money, Z as PartyId, _ as Session, _t as CapxulErrorCode, a as Eip1193RequestProvider, at as RoleKey, c as injectedWalletSigner, ct as TesterKind, d as AccountRequirement, dt as toAddress, et as PayrollRunId, f as Eip1193Provider, ft as toCountryCode, g as Profile, gt as CapxulError, h as CapxulResult, ht as CAPXUL_ERROR_CODES, i as CapxulSigner, k as Address, l as AccountProvider, m as localPrivateKeyAccountProvider, mt as toPartyId, o as SignerStatus, p as eip1193AccountProvider, pt as toHandle, r as CapxulDigestSigner, s as SignerStatusStore, u as AccountProviderSource, v as SmartAccount, vt as CapxulErrorDetails, wt as ChainUpstream, xt as isCapxulError, yt as Errors, z as BudgetId } from "./OAuthBearerAuthClient-C-ip-z8M.mjs";
|
|
2
|
-
import { $ as OrganizationPaymentBatchInput, $n as RequestStatus, $t as Destination, A as OrgScopedMethods, An as Ref, At as AddressBookAddInput, B as AuthorizeRunOptions, Bn as SmartAccountMethods, Bt as ActivityFilter, C as CurrentUserMethods, Cn as PaymentMoney, Ct as AccountMethods, D as MemberStatus, Dn as PaymentsMethods, Dt as ActorRequest, E as InviteMemberInput, En as PaymentType, Et as ActorRelationshipMethods, F as ResendInviteTokenInput, Fn as AccountLifecycle, Ft as InboxItem, G as PayrollGroupsMethods, Gn as ActorRef, Gt as ActivityPage, H as PayrollGroup, Hn as OrgLifecycle, Ht as ActivityKind, I as RoleDefinition, In as AccountSetupStep, It as InboxMethods, J as PayrollRun, Jn as SubmittedPermissionExecution, Jt as ActivitySummary, K as PayrollMethods, Kn as CurrentHoldings, Kt as ActivityRange, L as RoleSpendCap, Ln as isSettingUpLifecycle, Lt as ActivityAnnotation, M as OrgView, Mn as TargetReference, Mt as AddressBookLabelInput, N as OrganizationAccount, Nn as TargetsMethods, Nt as AddressBookMethods, O as MemberView, On as PaymentsPayInput, Ot as ActorRequestIssueInput, P as OrganizationAuditLogItem, Pn as fingerprintPaymentIntent, Pt as InboxApproveInput, Q as PayrollTermsUnit, Qn as PaymentStatus$1, Qt as DepositInstructions, R as RoleView, Rn as CompleteProfileInput, Rt as ActivityAnnotationInput, S as CurrentUserContext, Sn as PaymentDocumentsMethods, St as ReadyAccountLifecycle, T as DetectPendingOrgInvitationsResult, Tn as PaymentTiming, Tt as ActorProfileMethods, U as PayrollGroupInput, Un as OrgSetupStep, Ut as ActivityListParams, V as PayrollEngagementTerms, Vn as AuthMethods, Vt as ActivityItem, W as PayrollGroupMember, Wn as PayoutAddress, Wt as ActivityMethods, X as PayrollRunStatus, Xn as PAYMENT_DIRECTIONS, Xt as ActivitySummaryTotal, Y as PayrollRunItemInput, Yn as InboxStatus, Yt as ActivitySummaryParams, Z as PayrollRuns, Zn as PAYMENT_STATUSES, Zt as ActorReference, _ as HoldingsMethods, _n as PaymentDirection, _t as OnboardingMethods, a as ObservationContext, an as DestinationRemoveInput, ar as IdentityEvent, at as PermissionCreateInput, b as SystemHealth, bn as PaymentDocumentRender, bt as PersonOnboarding, c as HostObservability, cn as MeMethods, cr as Readiness, ct as PermissionReplaceInput, d as postHogObservability, dn as OfframpMethods, dr as isClaimed, dt as Budget, en as DestinationAddInput, et as OrganizationPaymentInput, f as CapxulClient, fn as OfframpQuote, fr as isRestoring, ft as OrgMe, g as IdentityRuntimeSendResult, gn as PaymentActivityEvidence, gt as CompletedPersonProfile, h as IdentityRuntime, hn as Payment, ht as AccountsMethods, i as ObservationAdapter, in as DestinationRail, ir as Destination$1, it as PermissionChangeInput, j as OrgTemplate, jn as ResolvedTarget, jt as AddressBookEntry, k as OrgMethods, kn as RecipientResolution, kt as ActorRequestsMethods, l as PostHogObservabilityClient, ln as MeProfile, lr as StateLabel, lt as PermissionRevokeInput, m as IdentityProfileDetails, mn as OfframpStatus, mr as InvocationControls, mt as OrgMeOptions, nn as DestinationListInput, nt as OrganizationPaymentsMethods, o as ObservationDelivery, on as DestinationsMethods, or as IdentityState, ot as PermissionMethods, p as CreateCapxulClientInput, pn as OfframpQuoteInput, pr as IdentityTransition, pt as OrgMeMethod, q as PayrollOptions, qn as Permission, qt as ActivityReference, r as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, rn as DestinationPayload, rr as TelemetryPort, rt as PermissionAssignInput, s as SdkFailureObservation, sn as FinancialOpsMethods, sr as OrgLane, st as PermissionOptions, t as CapxulClientInput, tn as DestinationKind, tt as OrganizationPaymentItemInput, u as PostHogObservabilityOptions, un as MovementActivityEvidence, ur as destination, ut as PermissionReadResult, v as Holding, vn as PaymentDocumentKind, vt as OrganizationOnboarding, w as CreateOrgInput, wn as PaymentStatus, wt as ActorProfile, x as MediaMethods, xn as PaymentDocumentVerification, xt as PersonOnboardingInput, y as SystemMethods, yn as PaymentDocumentRef, yt as OrganizationOnboardingInput, z as AuthorizeRunInput, zn as IdentityMethods, zt as ActivityDetail } from "./production-
|
|
2
|
+
import { $ as OrganizationPaymentBatchInput, $n as RequestStatus, $t as Destination, A as OrgScopedMethods, An as Ref, At as AddressBookAddInput, B as AuthorizeRunOptions, Bn as SmartAccountMethods, Bt as ActivityFilter, C as CurrentUserMethods, Cn as PaymentMoney, Ct as AccountMethods, D as MemberStatus, Dn as PaymentsMethods, Dt as ActorRequest, E as InviteMemberInput, En as PaymentType, Et as ActorRelationshipMethods, F as ResendInviteTokenInput, Fn as AccountLifecycle, Ft as InboxItem, G as PayrollGroupsMethods, Gn as ActorRef, Gt as ActivityPage, H as PayrollGroup, Hn as OrgLifecycle, Ht as ActivityKind, I as RoleDefinition, In as AccountSetupStep, It as InboxMethods, J as PayrollRun, Jn as SubmittedPermissionExecution, Jt as ActivitySummary, K as PayrollMethods, Kn as CurrentHoldings, Kt as ActivityRange, L as RoleSpendCap, Ln as isSettingUpLifecycle, Lt as ActivityAnnotation, M as OrgView, Mn as TargetReference, Mt as AddressBookLabelInput, N as OrganizationAccount, Nn as TargetsMethods, Nt as AddressBookMethods, O as MemberView, On as PaymentsPayInput, Ot as ActorRequestIssueInput, P as OrganizationAuditLogItem, Pn as fingerprintPaymentIntent, Pt as InboxApproveInput, Q as PayrollTermsUnit, Qn as PaymentStatus$1, Qt as DepositInstructions, R as RoleView, Rn as CompleteProfileInput, Rt as ActivityAnnotationInput, S as CurrentUserContext, Sn as PaymentDocumentsMethods, St as ReadyAccountLifecycle, T as DetectPendingOrgInvitationsResult, Tn as PaymentTiming, Tt as ActorProfileMethods, U as PayrollGroupInput, Un as OrgSetupStep, Ut as ActivityListParams, V as PayrollEngagementTerms, Vn as AuthMethods, Vt as ActivityItem, W as PayrollGroupMember, Wn as PayoutAddress, Wt as ActivityMethods, X as PayrollRunStatus, Xn as PAYMENT_DIRECTIONS, Xt as ActivitySummaryTotal, Y as PayrollRunItemInput, Yn as InboxStatus, Yt as ActivitySummaryParams, Z as PayrollRuns, Zn as PAYMENT_STATUSES, Zt as ActorReference, _ as HoldingsMethods, _n as PaymentDirection, _t as OnboardingMethods, a as ObservationContext, an as DestinationRemoveInput, ar as IdentityEvent, at as PermissionCreateInput, b as SystemHealth, bn as PaymentDocumentRender, bt as PersonOnboarding, c as HostObservability, cn as MeMethods, cr as Readiness, ct as PermissionReplaceInput, d as postHogObservability, dn as OfframpMethods, dr as isClaimed, dt as Budget, en as DestinationAddInput, et as OrganizationPaymentInput, f as CapxulClient, fn as OfframpQuote, fr as isRestoring, ft as OrgMe, g as IdentityRuntimeSendResult, gn as PaymentActivityEvidence, gt as CompletedPersonProfile, h as IdentityRuntime, hn as Payment, ht as AccountsMethods, i as ObservationAdapter, in as DestinationRail, ir as Destination$1, it as PermissionChangeInput, j as OrgTemplate, jn as ResolvedTarget, jt as AddressBookEntry, k as OrgMethods, kn as RecipientResolution, kt as ActorRequestsMethods, l as PostHogObservabilityClient, ln as MeProfile, lr as StateLabel, lt as PermissionRevokeInput, m as IdentityProfileDetails, mn as OfframpStatus, mr as InvocationControls, mt as OrgMeOptions, nn as DestinationListInput, nt as OrganizationPaymentsMethods, o as ObservationDelivery, on as DestinationsMethods, or as IdentityState, ot as PermissionMethods, p as CreateCapxulClientInput, pn as OfframpQuoteInput, pr as IdentityTransition, pt as OrgMeMethod, q as PayrollOptions, qn as Permission, qt as ActivityReference, r as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, rn as DestinationPayload, rr as TelemetryPort, rt as PermissionAssignInput, s as SdkFailureObservation, sn as FinancialOpsMethods, sr as OrgLane, st as PermissionOptions, t as CapxulClientInput, tn as DestinationKind, tt as OrganizationPaymentItemInput, u as PostHogObservabilityOptions, un as MovementActivityEvidence, ur as destination, ut as PermissionReadResult, v as Holding, vn as PaymentDocumentKind, vt as OrganizationOnboarding, w as CreateOrgInput, wn as PaymentStatus, wt as ActorProfile, x as MediaMethods, xn as PaymentDocumentVerification, xt as PersonOnboardingInput, y as SystemMethods, yn as PaymentDocumentRef, yt as OrganizationOnboardingInput, z as AuthorizeRunInput, zn as IdentityMethods, zt as ActivityDetail } from "./production-B8BQj9l0.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 signerFailure, B as isRestoring, C as normalizeExceptionErrorKind, E as safeExceptionLabel, F as CAPXUL_OPERATIONS, I as isCapxulOperation, L as normalizeCapxulOperation, M as PAYMENT_DIRECTIONS, N as PAYMENT_STATUSES, O as isSettingUpLifecycle, R as destination, S as SDK_VERSION, T as projectSdkException, _ as fingerprintPaymentIntent, b as failureDetail, d as embeddedSigner, f as openfortEmbeddedSigner, g as devPrivateKeySigner, h as deriveDevPrivateKey, j as resolveFailureMode, k as injectedWalletSigner, m as openfortEmbeddedWalletPort, p as openfortEmbeddedSignerFromWallet, r as postHogObservability, t as createCapxulClient$1, w as normalizeExceptionOperation, x as EXCEPTION_MESSAGE, y as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, z as isClaimed } from "./production-
|
|
1
|
+
import { A as signerFailure, B as isRestoring, C as normalizeExceptionErrorKind, E as safeExceptionLabel, F as CAPXUL_OPERATIONS, I as isCapxulOperation, L as normalizeCapxulOperation, M as PAYMENT_DIRECTIONS, N as PAYMENT_STATUSES, O as isSettingUpLifecycle, R as destination, S as SDK_VERSION, T as projectSdkException, _ as fingerprintPaymentIntent, b as failureDetail, d as embeddedSigner, f as openfortEmbeddedSigner, g as devPrivateKeySigner, h as deriveDevPrivateKey, j as resolveFailureMode, k as injectedWalletSigner, m as openfortEmbeddedWalletPort, p as openfortEmbeddedSignerFromWallet, r as postHogObservability, t as createCapxulClient$1, w as normalizeExceptionOperation, x as EXCEPTION_MESSAGE, y as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, z as isClaimed } from "./production-Mcv2kEAX.mjs";
|
|
2
2
|
import { L as toCountryCode, O as assetIdFor, R as toCurrencyCode, U as toHandle, ct as CHAIN_UPSTREAMS, h as CAPXUL_PAYMENTS_V2_ADDRESS, it as CapxulError, j as toAddress, k as currencySymbolFor, lt as FAILURE_MODES, ot as Errors, q as toPartyId, rt as CAPXUL_ERROR_CODES, st as isCapxulError, tt as HANDLE_RE, w as EVM_ADDRESS_RE, y as configuredMoneyAssetById } from "./OAuthBearerAuthClient-BrbXrndM.mjs";
|
|
3
3
|
import { formatUnits } from "viem";
|
|
4
4
|
import { Effect } from "effect";
|
|
@@ -284,7 +284,7 @@ interface TelemetryPort {
|
|
|
284
284
|
}
|
|
285
285
|
//#endregion
|
|
286
286
|
//#region ../observability/src/index.d.ts
|
|
287
|
-
declare const TELEMETRY_EVENT_NAMES: readonly ["auth_otp_requested", "auth_otp_delivered", "auth_otp_expired", "auth_verified", "auth_failed", "auth_signed_out", "onboarding_intent_selected", "onboarding_profile_submitted", "onboarding_organization_submitted", "onboarding_dashboard_reached", "provisioning_safe_created", "provisioning_safe_confirmed", "bootstrap_resolved", "bootstrap_failed", "member_activation_started", "member_activation_ready", "member_activation_failed", "organization_creation_started", "organization_creation_ready", "organization_creation_failed", "chain_upstream_fallback", "bundler_error", "receipt_pending", "operation_retried", "account_balance_read", "account_balance_failed", "faucet_requested", "faucet_confirmed", "faucet_failed", "org_create_started", "org_safe_created", "org_safe_confirmed", "org_roles_seeded", "org_created", "org_create_failed", "org_invite_sent", "org_invite_accepted", "org_invite_expired", "payment_initiated", "payment_settled", "payment_failed", "payment_verification_retry", "payment_lifecycle_transition", "quick_pay_external_address_acknowledged", "deposit_initiated", "deposit_settled", "permission_mirror_verification", "movement_scan_window", "movement_scan_checkpoint", "movement_scan_incident", "activity_annotation_saved", "ui_activity_action_completed", "contact_relationship_changed", "ui_contact_action_completed"];
|
|
287
|
+
declare const TELEMETRY_EVENT_NAMES: readonly ["auth_otp_requested", "auth_otp_delivered", "auth_otp_expired", "auth_verified", "auth_failed", "auth_signed_out", "onboarding_intent_selected", "onboarding_profile_submitted", "onboarding_organization_submitted", "onboarding_dashboard_reached", "provisioning_safe_created", "provisioning_safe_confirmed", "bootstrap_resolved", "bootstrap_failed", "member_activation_started", "member_activation_ready", "member_activation_failed", "organization_creation_started", "organization_creation_ready", "organization_creation_failed", "chain_upstream_fallback", "bundler_error", "receipt_pending", "operation_retried", "account_balance_read", "account_balance_failed", "faucet_requested", "faucet_confirmed", "faucet_failed", "org_create_started", "org_safe_created", "org_safe_confirmed", "org_roles_seeded", "org_created", "org_create_failed", "org_invite_sent", "org_invite_accepted", "org_invite_expired", "payment_initiated", "payment_settled", "payment_failed", "payment_verification_retry", "payment_lifecycle_transition", "quick_pay_external_address_acknowledged", "deposit_initiated", "deposit_settled", "permission_mirror_verification", "movement_scan_window", "movement_scan_checkpoint", "movement_scan_incident", "activity_annotation_saved", "ui_activity_action_completed", "contact_relationship_changed", "ui_contact_action_completed", "access_recovery_completed", "ui_access_step_completed", "org_invite_progressed", "invoice_issued", "invoice_request_transitioned", "ui_invoice_step_completed", "ui_treasury_step_completed", "ui_receive_step_completed", "payroll_group_changed", "payroll_run_transitioned", "ui_payroll_action_completed"];
|
|
288
288
|
type TelemetryEventName = (typeof TELEMETRY_EVENT_NAMES)[number];
|
|
289
289
|
type TelemetryProps = Record<string, unknown>;
|
|
290
290
|
type TelemetryEvent = {
|
|
@@ -1551,20 +1551,19 @@ interface ActivityAnnotationInput {
|
|
|
1551
1551
|
readonly accountingCategory?: string;
|
|
1552
1552
|
readonly memo?: string;
|
|
1553
1553
|
}
|
|
1554
|
+
/**
|
|
1555
|
+
* #1960 R02: the declared option type is the `InvocationControls` these methods
|
|
1556
|
+
* have always forwarded to `deps.invocationControls`, so an Activity action can
|
|
1557
|
+
* carry the correlation its UI observation already used. `{ signal }` callers
|
|
1558
|
+
* are unaffected.
|
|
1559
|
+
*/
|
|
1554
1560
|
interface ActivityMethods {
|
|
1555
|
-
list(params?: ActivityListParams, options?:
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
summary(params?: ActivitySummaryParams, options?: {
|
|
1559
|
-
readonly signal?: AbortSignal;
|
|
1560
|
-
}): Promise<CapxulResult<ActivitySummary>>;
|
|
1561
|
-
get(reference: ActivityReference, options?: {
|
|
1562
|
-
readonly signal?: AbortSignal;
|
|
1561
|
+
list(params?: ActivityListParams, options?: InvocationControls): Promise<CapxulResult<ActivityPage>>;
|
|
1562
|
+
summary(params?: ActivitySummaryParams, options?: InvocationControls): Promise<CapxulResult<ActivitySummary>>;
|
|
1563
|
+
get(reference: ActivityReference, options?: InvocationControls & {
|
|
1563
1564
|
readonly actor?: ActorReference;
|
|
1564
1565
|
}): Promise<CapxulResult<ActivityDetail | null>>;
|
|
1565
|
-
annotate(input: ActivityAnnotationInput, options?:
|
|
1566
|
-
readonly signal?: AbortSignal;
|
|
1567
|
-
}): Promise<CapxulResult<ActivityAnnotation>>;
|
|
1566
|
+
annotate(input: ActivityAnnotationInput, options?: InvocationControls): Promise<CapxulResult<ActivityAnnotation>>;
|
|
1568
1567
|
}
|
|
1569
1568
|
interface OfframpQuoteInput {
|
|
1570
1569
|
readonly actor?: ActorReference;
|
|
@@ -1718,25 +1717,19 @@ interface AddressBookLabelInput {
|
|
|
1718
1717
|
interface AddressBookListInput {
|
|
1719
1718
|
readonly includeHidden?: boolean;
|
|
1720
1719
|
}
|
|
1720
|
+
/**
|
|
1721
|
+
* #1960 R02: the declared option type is the `InvocationControls` these methods
|
|
1722
|
+
* have always forwarded to `deps.invocationControls`. Naming it lets a caller
|
|
1723
|
+
* that captured one user attempt hand the same `correlation_id`/`journey_id` to
|
|
1724
|
+
* the operation the attempt starts. `{ signal }` callers are unaffected.
|
|
1725
|
+
*/
|
|
1721
1726
|
interface AddressBookMethods {
|
|
1722
|
-
list(input?: AddressBookListInput, options?:
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
add(input: AddressBookAddInput, options?: {
|
|
1729
|
-
readonly signal?: AbortSignal;
|
|
1730
|
-
}): Promise<CapxulResult<AddressBookEntry>>;
|
|
1731
|
-
hide(entryId: PartyId, options?: {
|
|
1732
|
-
readonly signal?: AbortSignal;
|
|
1733
|
-
}): Promise<CapxulResult<AddressBookEntry>>;
|
|
1734
|
-
unhide(entryId: PartyId, options?: {
|
|
1735
|
-
readonly signal?: AbortSignal;
|
|
1736
|
-
}): Promise<CapxulResult<AddressBookEntry>>;
|
|
1737
|
-
label(input: AddressBookLabelInput, options?: {
|
|
1738
|
-
readonly signal?: AbortSignal;
|
|
1739
|
-
}): Promise<CapxulResult<AddressBookEntry>>;
|
|
1727
|
+
list(input?: AddressBookListInput, options?: InvocationControls): Promise<CapxulResult<readonly AddressBookEntry[]>>;
|
|
1728
|
+
get(entryId: PartyId, options?: InvocationControls): Promise<CapxulResult<AddressBookEntry | null>>;
|
|
1729
|
+
add(input: AddressBookAddInput, options?: InvocationControls): Promise<CapxulResult<AddressBookEntry>>;
|
|
1730
|
+
hide(entryId: PartyId, options?: InvocationControls): Promise<CapxulResult<AddressBookEntry>>;
|
|
1731
|
+
unhide(entryId: PartyId, options?: InvocationControls): Promise<CapxulResult<AddressBookEntry>>;
|
|
1732
|
+
label(input: AddressBookLabelInput, options?: InvocationControls): Promise<CapxulResult<AddressBookEntry>>;
|
|
1740
1733
|
}
|
|
1741
1734
|
interface ActorRequest {
|
|
1742
1735
|
readonly id: string;
|
|
@@ -1333,10 +1333,24 @@ const DepositSettledProps = Schema.Struct({
|
|
|
1333
1333
|
});
|
|
1334
1334
|
const PermissionMirrorVerificationProps = Schema.Struct({
|
|
1335
1335
|
...TelemetryEnvelopeProps,
|
|
1336
|
+
/** The RECEIPT verification outcome. What the mirror then did is separate. */
|
|
1336
1337
|
outcome: Schema.String,
|
|
1337
1338
|
reason: Schema.String,
|
|
1338
1339
|
chain_id: Schema.Number,
|
|
1339
|
-
retry_count: Schema.Number
|
|
1340
|
+
retry_count: Schema.Number,
|
|
1341
|
+
/**
|
|
1342
|
+
* #1960 R02, consumed by R03. A verified receipt is not an applied Permission:
|
|
1343
|
+
* these two optional fields let the producer say what the applying mutation
|
|
1344
|
+
* actually returned, and which command it was, without either fact rewriting
|
|
1345
|
+
* the receipt outcome above. Absent when application has not happened yet.
|
|
1346
|
+
*/
|
|
1347
|
+
application_result: Schema.optional(Schema.Literals([
|
|
1348
|
+
"applied",
|
|
1349
|
+
"replayed",
|
|
1350
|
+
"conflicting_replay",
|
|
1351
|
+
"revision_mismatch"
|
|
1352
|
+
])),
|
|
1353
|
+
command_id: OptionalString
|
|
1340
1354
|
});
|
|
1341
1355
|
const MovementScanWindowProps = Schema.Struct({
|
|
1342
1356
|
...TelemetryEnvelopeProps,
|
|
@@ -1562,6 +1576,10 @@ Schema.Struct({
|
|
|
1562
1576
|
name: Schema.Literal("movement_scan_incident"),
|
|
1563
1577
|
props: MovementScanIncidentProps
|
|
1564
1578
|
});
|
|
1579
|
+
/** The one spelling of "whose scope did this happen in" across every surface. */
|
|
1580
|
+
const ScopeKindSchema = Schema.Literals(["account", "organization"]);
|
|
1581
|
+
const AccountKindSchema = Schema.Literals(["personalSafe", "orgTreasury"]);
|
|
1582
|
+
const OptionalReasonCode = Schema.optional(Schema.Literals(CAPXUL_ERROR_CODES));
|
|
1565
1583
|
const ActivityReferenceProps = {
|
|
1566
1584
|
reference_kind: Schema.Literals(["payment", "movement"]),
|
|
1567
1585
|
reference_id: Schema.String
|
|
@@ -1592,8 +1610,8 @@ const ActivityFilterProps = {
|
|
|
1592
1610
|
};
|
|
1593
1611
|
const ActivityActionProps = {
|
|
1594
1612
|
...TelemetryEnvelopeProps,
|
|
1595
|
-
scope_kind:
|
|
1596
|
-
reason_code:
|
|
1613
|
+
scope_kind: ScopeKindSchema,
|
|
1614
|
+
reason_code: OptionalReasonCode
|
|
1597
1615
|
};
|
|
1598
1616
|
Schema.Struct({
|
|
1599
1617
|
name: Schema.Literal("contact_relationship_changed"),
|
|
@@ -1605,7 +1623,7 @@ Schema.Struct({
|
|
|
1605
1623
|
"hidden",
|
|
1606
1624
|
"restored"
|
|
1607
1625
|
]),
|
|
1608
|
-
scope_kind:
|
|
1626
|
+
scope_kind: ScopeKindSchema,
|
|
1609
1627
|
scope_id: Schema.String,
|
|
1610
1628
|
owner_party_id: Schema.String,
|
|
1611
1629
|
party_id: Schema.String,
|
|
@@ -1621,9 +1639,9 @@ Schema.Struct({
|
|
|
1621
1639
|
});
|
|
1622
1640
|
const ContactActionProps = {
|
|
1623
1641
|
...TelemetryEnvelopeProps,
|
|
1624
|
-
scope_kind:
|
|
1642
|
+
scope_kind: ScopeKindSchema,
|
|
1625
1643
|
party_id: OptionalString,
|
|
1626
|
-
reason_code:
|
|
1644
|
+
reason_code: OptionalReasonCode
|
|
1627
1645
|
};
|
|
1628
1646
|
Schema.Struct({
|
|
1629
1647
|
name: Schema.Literal("ui_contact_action_completed"),
|
|
@@ -1650,7 +1668,7 @@ Schema.Struct({
|
|
|
1650
1668
|
props: Schema.Struct({
|
|
1651
1669
|
...TelemetryEnvelopeProps,
|
|
1652
1670
|
...ActivityReferenceProps,
|
|
1653
|
-
scope_kind:
|
|
1671
|
+
scope_kind: ScopeKindSchema,
|
|
1654
1672
|
scope_id: Schema.String,
|
|
1655
1673
|
occurred_at: Schema.Number
|
|
1656
1674
|
})
|
|
@@ -1705,6 +1723,193 @@ Schema.Struct({
|
|
|
1705
1723
|
})
|
|
1706
1724
|
])
|
|
1707
1725
|
});
|
|
1726
|
+
/**
|
|
1727
|
+
* Reliability closeout (#1960 R02) — the shape every explicit UI observation
|
|
1728
|
+
* below shares. `scope_kind` says whose surface the person was looking at,
|
|
1729
|
+
* `organization_id` is the verified Organization the producer resolved (absent
|
|
1730
|
+
* on a personal action), and `reason_code` is a catalog error code, never copy.
|
|
1731
|
+
*/
|
|
1732
|
+
const UiStepProps = {
|
|
1733
|
+
...TelemetryEnvelopeProps,
|
|
1734
|
+
scope_kind: ScopeKindSchema,
|
|
1735
|
+
organization_id: OptionalOrgId,
|
|
1736
|
+
reason_code: OptionalReasonCode
|
|
1737
|
+
};
|
|
1738
|
+
const AccessRecoveryCompletedProps = Schema.Union([Schema.Struct({
|
|
1739
|
+
...TelemetryEnvelopeProps,
|
|
1740
|
+
recovery: Schema.Literal("session_restoration"),
|
|
1741
|
+
outcome: Schema.Literals([
|
|
1742
|
+
"restored",
|
|
1743
|
+
"absent",
|
|
1744
|
+
"failed"
|
|
1745
|
+
]),
|
|
1746
|
+
reason_code: OptionalReasonCode,
|
|
1747
|
+
organization_id: OptionalOrgId
|
|
1748
|
+
}), Schema.Struct({
|
|
1749
|
+
...TelemetryEnvelopeProps,
|
|
1750
|
+
recovery: Schema.Literal("signer_readiness"),
|
|
1751
|
+
outcome: Schema.Literals(["ready", "unavailable"]),
|
|
1752
|
+
reason_code: OptionalReasonCode,
|
|
1753
|
+
organization_id: OptionalOrgId
|
|
1754
|
+
})]);
|
|
1755
|
+
Schema.Struct({
|
|
1756
|
+
name: Schema.Literal("access_recovery_completed"),
|
|
1757
|
+
props: AccessRecoveryCompletedProps
|
|
1758
|
+
});
|
|
1759
|
+
Schema.Struct({
|
|
1760
|
+
name: Schema.Literal("ui_access_step_completed"),
|
|
1761
|
+
props: Schema.Struct({
|
|
1762
|
+
...UiStepProps,
|
|
1763
|
+
step: Schema.Literals([
|
|
1764
|
+
"dashboard_granted",
|
|
1765
|
+
"redirect_completed",
|
|
1766
|
+
"gate_error_displayed",
|
|
1767
|
+
"retry_selected",
|
|
1768
|
+
"capability_refusal_displayed",
|
|
1769
|
+
"signer_refusal_displayed"
|
|
1770
|
+
]),
|
|
1771
|
+
capability: Schema.optional(Schema.Literals(["spend", "managePeople"])),
|
|
1772
|
+
probe: Schema.optional(Schema.Literals([
|
|
1773
|
+
"session",
|
|
1774
|
+
"membership",
|
|
1775
|
+
"lifecycle"
|
|
1776
|
+
])),
|
|
1777
|
+
reason: Schema.optional(Schema.Literals([
|
|
1778
|
+
"loading",
|
|
1779
|
+
"no-permission",
|
|
1780
|
+
"org-unavailable"
|
|
1781
|
+
]))
|
|
1782
|
+
})
|
|
1783
|
+
});
|
|
1784
|
+
Schema.Struct({
|
|
1785
|
+
name: Schema.Literal("org_invite_progressed"),
|
|
1786
|
+
props: Schema.Struct({
|
|
1787
|
+
...TelemetryEnvelopeProps,
|
|
1788
|
+
organization_id: OrgIdTelemetrySchema,
|
|
1789
|
+
progress: Schema.Literals([
|
|
1790
|
+
"account_ready",
|
|
1791
|
+
"permission_applied",
|
|
1792
|
+
"membership_activated",
|
|
1793
|
+
"revoked"
|
|
1794
|
+
]),
|
|
1795
|
+
/** The invited Party. The initiating actor stays on the envelope's identity. */
|
|
1796
|
+
member_party_id: Schema.String,
|
|
1797
|
+
occurred_at: Schema.Number
|
|
1798
|
+
})
|
|
1799
|
+
});
|
|
1800
|
+
Schema.Struct({
|
|
1801
|
+
name: Schema.Literal("invoice_issued"),
|
|
1802
|
+
props: Schema.Struct({
|
|
1803
|
+
...TelemetryEnvelopeProps,
|
|
1804
|
+
request_id: Schema.String,
|
|
1805
|
+
issuer_scope_kind: ScopeKindSchema,
|
|
1806
|
+
issuer_scope_id: Schema.String,
|
|
1807
|
+
payer_party_id: OptionalString,
|
|
1808
|
+
occurred_at: Schema.Number
|
|
1809
|
+
})
|
|
1810
|
+
});
|
|
1811
|
+
Schema.Struct({
|
|
1812
|
+
name: Schema.Literal("invoice_request_transitioned"),
|
|
1813
|
+
props: Schema.Struct({
|
|
1814
|
+
...TelemetryEnvelopeProps,
|
|
1815
|
+
request_id: Schema.String,
|
|
1816
|
+
transition: Schema.Literals([
|
|
1817
|
+
"approval_prepared",
|
|
1818
|
+
"declined",
|
|
1819
|
+
"cancelled"
|
|
1820
|
+
]),
|
|
1821
|
+
actor_scope_kind: ScopeKindSchema,
|
|
1822
|
+
actor_scope_id: Schema.String,
|
|
1823
|
+
occurred_at: Schema.Number
|
|
1824
|
+
})
|
|
1825
|
+
});
|
|
1826
|
+
Schema.Struct({
|
|
1827
|
+
name: Schema.Literal("ui_invoice_step_completed"),
|
|
1828
|
+
props: Schema.Struct({
|
|
1829
|
+
...UiStepProps,
|
|
1830
|
+
step: Schema.Literals([
|
|
1831
|
+
"opened",
|
|
1832
|
+
"previewed",
|
|
1833
|
+
"dismissed",
|
|
1834
|
+
"submitted",
|
|
1835
|
+
"result_displayed",
|
|
1836
|
+
"refusal_displayed",
|
|
1837
|
+
"retry_selected"
|
|
1838
|
+
]),
|
|
1839
|
+
request_id: OptionalString
|
|
1840
|
+
})
|
|
1841
|
+
});
|
|
1842
|
+
Schema.Struct({
|
|
1843
|
+
name: Schema.Literal("ui_treasury_step_completed"),
|
|
1844
|
+
props: Schema.Struct({
|
|
1845
|
+
...UiStepProps,
|
|
1846
|
+
step: Schema.Literals([
|
|
1847
|
+
"balance_displayed",
|
|
1848
|
+
"read_refusal_displayed",
|
|
1849
|
+
"retry_selected",
|
|
1850
|
+
"recovery_completed"
|
|
1851
|
+
]),
|
|
1852
|
+
account_kind: Schema.optional(AccountKindSchema)
|
|
1853
|
+
})
|
|
1854
|
+
});
|
|
1855
|
+
Schema.Struct({
|
|
1856
|
+
name: Schema.Literal("ui_receive_step_completed"),
|
|
1857
|
+
props: Schema.Struct({
|
|
1858
|
+
...UiStepProps,
|
|
1859
|
+
step: Schema.Literals([
|
|
1860
|
+
"instructions_displayed",
|
|
1861
|
+
"address_copied",
|
|
1862
|
+
"copy_failed",
|
|
1863
|
+
"refusal_displayed",
|
|
1864
|
+
"retry_selected"
|
|
1865
|
+
]),
|
|
1866
|
+
account_kind: Schema.optional(AccountKindSchema)
|
|
1867
|
+
})
|
|
1868
|
+
});
|
|
1869
|
+
Schema.Struct({
|
|
1870
|
+
name: Schema.Literal("payroll_group_changed"),
|
|
1871
|
+
props: Schema.Struct({
|
|
1872
|
+
...TelemetryEnvelopeProps,
|
|
1873
|
+
organization_id: OrgIdTelemetrySchema,
|
|
1874
|
+
change: Schema.Literals([
|
|
1875
|
+
"created",
|
|
1876
|
+
"updated",
|
|
1877
|
+
"deleted"
|
|
1878
|
+
]),
|
|
1879
|
+
group_id: Schema.String,
|
|
1880
|
+
member_count: Schema.Number,
|
|
1881
|
+
occurred_at: Schema.Number
|
|
1882
|
+
})
|
|
1883
|
+
});
|
|
1884
|
+
Schema.Struct({
|
|
1885
|
+
name: Schema.Literal("payroll_run_transitioned"),
|
|
1886
|
+
props: Schema.Struct({
|
|
1887
|
+
...TelemetryEnvelopeProps,
|
|
1888
|
+
organization_id: OrgIdTelemetrySchema,
|
|
1889
|
+
transition: Schema.Literals([
|
|
1890
|
+
"prepared",
|
|
1891
|
+
"authorized",
|
|
1892
|
+
"settled"
|
|
1893
|
+
]),
|
|
1894
|
+
run_id: Schema.String,
|
|
1895
|
+
payment_count: Schema.optional(Schema.Number),
|
|
1896
|
+
occurred_at: Schema.Number
|
|
1897
|
+
})
|
|
1898
|
+
});
|
|
1899
|
+
Schema.Struct({
|
|
1900
|
+
name: Schema.Literal("ui_payroll_action_completed"),
|
|
1901
|
+
props: Schema.Struct({
|
|
1902
|
+
...UiStepProps,
|
|
1903
|
+
action: Schema.Literals([
|
|
1904
|
+
"opened",
|
|
1905
|
+
"refusal_displayed",
|
|
1906
|
+
"recovery_completed",
|
|
1907
|
+
"cancelled",
|
|
1908
|
+
"submitted_displayed"
|
|
1909
|
+
]),
|
|
1910
|
+
run_id: OptionalString
|
|
1911
|
+
})
|
|
1912
|
+
});
|
|
1708
1913
|
function redactTelemetryEvent(event, options = {}) {
|
|
1709
1914
|
const props = redactTelemetryProps(event.name, event.props, options);
|
|
1710
1915
|
return props === void 0 ? { name: event.name } : {
|
|
@@ -5451,7 +5656,7 @@ const moneyExecutionContract = {
|
|
|
5451
5656
|
};
|
|
5452
5657
|
//#endregion
|
|
5453
5658
|
//#region package.json
|
|
5454
|
-
var version = "4.2.0-rc.
|
|
5659
|
+
var version = "4.2.0-rc.4";
|
|
5455
5660
|
//#endregion
|
|
5456
5661
|
//#region src/telemetry/exception-projection.ts
|
|
5457
5662
|
/** Fixed fallback for failures that have no safe message. */
|
|
@@ -5721,6 +5926,34 @@ function ignoreDeliveryFailure(delivery) {
|
|
|
5721
5926
|
} catch {}
|
|
5722
5927
|
}
|
|
5723
5928
|
/**
|
|
5929
|
+
* Fold a caller-captured attempt identity into the host's resolved context.
|
|
5930
|
+
*
|
|
5931
|
+
* The host's `resolveContext` runs at the moment an SDK method is entered, so a
|
|
5932
|
+
* host that mints a correlation per resolve gives every operation of one user
|
|
5933
|
+
* attempt a different identity — and a user or Organization switch between the
|
|
5934
|
+
* click and the reply relabels an action that already started. When the caller
|
|
5935
|
+
* captured `correlation_id`/`journey_id` BEFORE the action started, that is the
|
|
5936
|
+
* attempt, and it replaces what the resolver returned for this one call. The
|
|
5937
|
+
* result is what the SDK span/Log, the failure envelope and the backend carrier
|
|
5938
|
+
* all read, so the three agree by construction rather than by convention.
|
|
5939
|
+
*
|
|
5940
|
+
* A caller that captured nothing gets the resolver's context unchanged, so
|
|
5941
|
+
* automatic reads keep their own invocation context.
|
|
5942
|
+
*/
|
|
5943
|
+
function withCapturedAttemptContext(context, controls) {
|
|
5944
|
+
const correlationId = controls?.correlation_id;
|
|
5945
|
+
const journeyId = controls?.journey_id;
|
|
5946
|
+
if (correlationId === void 0 && journeyId === void 0) return context;
|
|
5947
|
+
const captured = sanitizeObservationContext({
|
|
5948
|
+
...correlationId === void 0 ? {} : { correlationId },
|
|
5949
|
+
...journeyId === void 0 ? {} : { journeyId }
|
|
5950
|
+
});
|
|
5951
|
+
return captured === void 0 ? context : {
|
|
5952
|
+
...context,
|
|
5953
|
+
...captured
|
|
5954
|
+
};
|
|
5955
|
+
}
|
|
5956
|
+
/**
|
|
5724
5957
|
* Map an ALREADY-sanitized observation context to the snake_case PostHog
|
|
5725
5958
|
* property keys. Shared by the failure boundary here and the host
|
|
5726
5959
|
* success-telemetry seam (`telemetry/from-posthog.ts`) so both attach identical
|
|
@@ -9872,6 +10105,32 @@ var ConsoleDiagnosticAdapter = class {
|
|
|
9872
10105
|
}
|
|
9873
10106
|
};
|
|
9874
10107
|
//#endregion
|
|
10108
|
+
//#region src/adapters/diagnostic/EffectLogDiagnosticAdapter.ts
|
|
10109
|
+
/**
|
|
10110
|
+
* Diagnostic breadcrumbs as SDK log records. The signer's readiness cycle
|
|
10111
|
+
* traces (`openfort.*`) used to reach only the browser console; through this
|
|
10112
|
+
* adapter they run in the client's own Effect context, so the engineering
|
|
10113
|
+
* telemetry layer ships them to PostHog Logs beside `identity.transition`.
|
|
10114
|
+
* Logging never throws back into the cycle that emitted it.
|
|
10115
|
+
*/
|
|
10116
|
+
var EffectLogDiagnosticAdapter = class {
|
|
10117
|
+
#runPromise;
|
|
10118
|
+
#console;
|
|
10119
|
+
constructor(context, consoleFallback) {
|
|
10120
|
+
this.#runPromise = Effect.runPromiseWith(context);
|
|
10121
|
+
this.#console = consoleFallback;
|
|
10122
|
+
}
|
|
10123
|
+
trace(scope, detail) {
|
|
10124
|
+
this.#console?.trace(scope, detail);
|
|
10125
|
+
try {
|
|
10126
|
+
this.#runPromise(Effect.logInfo(scope).pipe(Effect.annotateLogs({
|
|
10127
|
+
...detail,
|
|
10128
|
+
diagnostic_scope: scope
|
|
10129
|
+
}), Effect.catchCause(() => Effect.void))).catch(() => void 0);
|
|
10130
|
+
} catch {}
|
|
10131
|
+
}
|
|
10132
|
+
};
|
|
10133
|
+
//#endregion
|
|
9875
10134
|
//#region src/openfort/create-openfort-browser-signer.ts
|
|
9876
10135
|
function httpStatusOf(link) {
|
|
9877
10136
|
const carrier = link;
|
|
@@ -10009,7 +10268,23 @@ function createOpenfortBrowserSignerFromBootstrap(bootstrap, options = {}) {
|
|
|
10009
10268
|
function encryptionSessionUrl() {
|
|
10010
10269
|
return `${authBaseUrl}/encryption-session`;
|
|
10011
10270
|
}
|
|
10271
|
+
let cycleStartedAt = null;
|
|
10272
|
+
let stepStartedAt = 0;
|
|
10273
|
+
let tokenCalls = 0;
|
|
10274
|
+
const sinceCycleStart = () => cycleStartedAt === null ? void 0 : Date.now() - cycleStartedAt;
|
|
10275
|
+
const step = (name, extra = {}) => {
|
|
10276
|
+
const now = Date.now();
|
|
10277
|
+
diagnostic?.trace("openfort.step", {
|
|
10278
|
+
step: name,
|
|
10279
|
+
duration_ms: now - stepStartedAt,
|
|
10280
|
+
elapsed_ms: sinceCycleStart(),
|
|
10281
|
+
...extra
|
|
10282
|
+
});
|
|
10283
|
+
stepStartedAt = now;
|
|
10284
|
+
};
|
|
10012
10285
|
async function fetchBetterAuthAccessToken() {
|
|
10286
|
+
tokenCalls += 1;
|
|
10287
|
+
const tokenStartedAt = Date.now();
|
|
10013
10288
|
try {
|
|
10014
10289
|
const response = await fetch(betterAuthSessionUrl(), { credentials: "include" });
|
|
10015
10290
|
if (!response.ok) {
|
|
@@ -10032,7 +10307,10 @@ function createOpenfortBrowserSignerFromBootstrap(bootstrap, options = {}) {
|
|
|
10032
10307
|
}
|
|
10033
10308
|
diagnostic?.trace("openfort.token", {
|
|
10034
10309
|
ok: true,
|
|
10035
|
-
tokenPresent: true
|
|
10310
|
+
tokenPresent: true,
|
|
10311
|
+
call: tokenCalls,
|
|
10312
|
+
duration_ms: Date.now() - tokenStartedAt,
|
|
10313
|
+
elapsed_ms: sinceCycleStart()
|
|
10036
10314
|
});
|
|
10037
10315
|
return token;
|
|
10038
10316
|
} catch (cause) {
|
|
@@ -10088,10 +10366,16 @@ function createOpenfortBrowserSignerFromBootstrap(bootstrap, options = {}) {
|
|
|
10088
10366
|
let walletReadyPromise = null;
|
|
10089
10367
|
function startWalletReady() {
|
|
10090
10368
|
return (async () => {
|
|
10369
|
+
const startedAt = Date.now();
|
|
10370
|
+
cycleStartedAt = startedAt;
|
|
10371
|
+
stepStartedAt = startedAt;
|
|
10372
|
+
tokenCalls = 0;
|
|
10091
10373
|
if (isInsecureBrowserContext()) failNoSecureContext();
|
|
10092
10374
|
await openfort.waitForInitialization();
|
|
10375
|
+
step("initialize");
|
|
10093
10376
|
const accessToken = await fetchBetterAuthAccessToken();
|
|
10094
10377
|
if (accessToken === null) throw openfortProviderError("token", /* @__PURE__ */ new Error("Better Auth access token unavailable for Openfort"));
|
|
10378
|
+
step("token");
|
|
10095
10379
|
let encryptionResponse;
|
|
10096
10380
|
try {
|
|
10097
10381
|
encryptionResponse = await fetch(encryptionSessionUrl(), {
|
|
@@ -10134,10 +10418,12 @@ function createOpenfortBrowserSignerFromBootstrap(bootstrap, options = {}) {
|
|
|
10134
10418
|
ok: true,
|
|
10135
10419
|
httpStatus: encryptionResponse.status
|
|
10136
10420
|
});
|
|
10421
|
+
step("encryptionSession", { httpStatus: encryptionResponse.status });
|
|
10137
10422
|
let embeddedState;
|
|
10138
10423
|
try {
|
|
10139
10424
|
embeddedState = await openfort.embeddedWallet.getEmbeddedState();
|
|
10140
10425
|
diagnostic?.trace("openfort.embeddedState", { state: embeddedState });
|
|
10426
|
+
step("embeddedState", { state: embeddedState });
|
|
10141
10427
|
} catch (cause) {
|
|
10142
10428
|
diagnostic?.trace("openfort.embeddedState", {
|
|
10143
10429
|
ok: false,
|
|
@@ -10151,6 +10437,7 @@ function createOpenfortBrowserSignerFromBootstrap(bootstrap, options = {}) {
|
|
|
10151
10437
|
try {
|
|
10152
10438
|
await configureEmbeddedWallet(encryptionBody.sessionId);
|
|
10153
10439
|
diagnostic?.trace("openfort.configure", { ok: true });
|
|
10440
|
+
step("configure");
|
|
10154
10441
|
} catch (cause) {
|
|
10155
10442
|
const error = openfortProviderError("configure", cause);
|
|
10156
10443
|
diagnostic?.trace("openfort.configure", {
|
|
@@ -10163,6 +10450,7 @@ function createOpenfortBrowserSignerFromBootstrap(bootstrap, options = {}) {
|
|
|
10163
10450
|
try {
|
|
10164
10451
|
await openfort.embeddedWallet.get();
|
|
10165
10452
|
diagnostic?.trace("openfort.get", { ok: true });
|
|
10453
|
+
step("get");
|
|
10166
10454
|
} catch (cause) {
|
|
10167
10455
|
if (!isStaleUserSignal(cause)) {
|
|
10168
10456
|
diagnostic?.trace("openfort.get", {
|
|
@@ -10176,7 +10464,13 @@ function createOpenfortBrowserSignerFromBootstrap(bootstrap, options = {}) {
|
|
|
10176
10464
|
failure_mode: "stale-openfort-cache"
|
|
10177
10465
|
});
|
|
10178
10466
|
await healStaleOpenfortCache(encryptionBody.sessionId);
|
|
10467
|
+
step("healStaleCache");
|
|
10179
10468
|
}
|
|
10469
|
+
step("walletReady", {
|
|
10470
|
+
ok: true,
|
|
10471
|
+
total_ms: Date.now() - startedAt,
|
|
10472
|
+
token_calls: tokenCalls
|
|
10473
|
+
});
|
|
10180
10474
|
})();
|
|
10181
10475
|
}
|
|
10182
10476
|
async function ensureOpenfortWalletReady() {
|
|
@@ -10259,9 +10553,13 @@ function createOpenfortBrowserSignerFromBootstrap(bootstrap, options = {}) {
|
|
|
10259
10553
|
statusStore,
|
|
10260
10554
|
ensureWalletReady: ensureOpenfortWalletReady,
|
|
10261
10555
|
getAddress: async () => {
|
|
10556
|
+
const addressStartedAt = Date.now();
|
|
10262
10557
|
try {
|
|
10263
10558
|
const address = await signer.getAddress();
|
|
10264
|
-
diagnostic?.trace("openfort.address", {
|
|
10559
|
+
diagnostic?.trace("openfort.address", {
|
|
10560
|
+
ok: true,
|
|
10561
|
+
duration_ms: Date.now() - addressStartedAt
|
|
10562
|
+
});
|
|
10265
10563
|
return address;
|
|
10266
10564
|
} catch (cause) {
|
|
10267
10565
|
diagnostic?.trace("openfort.address", {
|
|
@@ -13192,10 +13490,13 @@ function assembleCapxulClient(input) {
|
|
|
13192
13490
|
...input.invokeTimeoutMs === void 0 ? {} : { invokeTimeoutMs: input.invokeTimeoutMs },
|
|
13193
13491
|
afterVerifyOtp: async () => {
|
|
13194
13492
|
const browserSigner = input.signer;
|
|
13195
|
-
if (browserSigner !== void 0 && "resetSession" in browserSigner && typeof browserSigner.resetSession === "function")
|
|
13196
|
-
|
|
13197
|
-
|
|
13198
|
-
|
|
13493
|
+
if (browserSigner !== void 0 && "resetSession" in browserSigner && typeof browserSigner.resetSession === "function") {
|
|
13494
|
+
try {
|
|
13495
|
+
browserSigner.resetSession();
|
|
13496
|
+
} catch (cause) {
|
|
13497
|
+
throw signerFailure(browserSigner.source, "resetSession", cause);
|
|
13498
|
+
}
|
|
13499
|
+
if (browserSigner.statusStore?.status() === "unknown" && typeof browserSigner.ensureWalletReady === "function") browserSigner.ensureWalletReady().catch(() => {});
|
|
13199
13500
|
}
|
|
13200
13501
|
await detectPendingOrgInvitations?.();
|
|
13201
13502
|
kickProvisioning?.();
|
|
@@ -13414,8 +13715,10 @@ function withHostObservationControls(snapshot, input, actorId) {
|
|
|
13414
13715
|
const previous = readInvocationObservation(input);
|
|
13415
13716
|
if (previous !== void 0) return attachInvocationObservation({ ...input }, previous);
|
|
13416
13717
|
const captured = snapshot?.() ?? { active: true };
|
|
13718
|
+
const context = captured.active ? withCapturedAttemptContext(captured.context, input) : captured.context;
|
|
13417
13719
|
return attachInvocationObservation({ ...input }, {
|
|
13418
13720
|
...captured,
|
|
13721
|
+
...context === void 0 ? {} : { context },
|
|
13419
13722
|
...actorId === void 0 ? {} : { actorId }
|
|
13420
13723
|
});
|
|
13421
13724
|
}
|
|
@@ -13931,7 +14234,7 @@ async function createCapxulClientWithSignerControls(input, controls) {
|
|
|
13931
14234
|
...adapters.value.bootstrap,
|
|
13932
14235
|
authBaseUrl: resolvedAuthBaseUrl
|
|
13933
14236
|
}, {
|
|
13934
|
-
diagnostic: new ConsoleDiagnosticAdapter(),
|
|
14237
|
+
diagnostic: new EffectLogDiagnosticAdapter(adapters.value.context, new ConsoleDiagnosticAdapter()),
|
|
13935
14238
|
signUserOpHash: controls.signEmbeddedUserOpHash
|
|
13936
14239
|
});
|
|
13937
14240
|
signer = withSignerControl(signer, controls.signUserOpHash);
|
package/dist/testing/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as CapxulResult } from "../OAuthBearerAuthClient-C-ip-z8M.mjs";
|
|
2
|
-
import { er as TelemetryEvent, f as CapxulClient, i as ObservationAdapter, n as ProductionSignerControls, nr as TelemetryIdentifyInput, pr as IdentityTransition, t as CapxulClientInput, tr as TelemetryGroupInput } from "../production-
|
|
2
|
+
import { er as TelemetryEvent, f as CapxulClient, i as ObservationAdapter, n as ProductionSignerControls, nr as TelemetryIdentifyInput, pr as IdentityTransition, t as CapxulClientInput, tr as TelemetryGroupInput } from "../production-B8BQj9l0.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 { D as fromWei, P as redactTelemetryEvent, a as smartAccountErrorFromCapxul, c as identityErrorFromCapxul, i as assembleCapxulClient, l as convexCallErrorFromCapxul, n as createCapxulClientWithSignerControls, o as accountReadErrorFromCapxul, s as wireChainId, u as bootstrapErrorFromCapxul, v as toWei } from "../production-
|
|
1
|
+
import { D as fromWei, P as redactTelemetryEvent, a as smartAccountErrorFromCapxul, c as identityErrorFromCapxul, i as assembleCapxulClient, l as convexCallErrorFromCapxul, n as createCapxulClientWithSignerControls, o as accountReadErrorFromCapxul, s as wireChainId, u as bootstrapErrorFromCapxul, v as toWei } from "../production-Mcv2kEAX.mjs";
|
|
2
2
|
import { A as toAccountId, B as toEmail, G as toKycTier, H as toEpochSeconds, I as toChainId, L as toCountryCode, M as toAllowedOrigin, N as toAppId, P as toAuthUserId, Q as toSessionToken, U as toHandle, V as toEpochMs, W as toJwtToken, X as toPublishableKey, d as authClientPortFromPromiseAdapter, et as validateHandle, it as CapxulError, j as toAddress, n as readClockNow, ot as Errors, r as InMemoryAuthCacheAdapter, v as deriveCapxulSafeAddress, z as toDurationMs } from "../OAuthBearerAuthClient-BrbXrndM.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.2.0-rc.
|
|
3
|
+
"version": "4.2.0-rc.4",
|
|
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/observability": "4.2.0-rc.4",
|
|
50
51
|
"@capxul/config": "0.3.0",
|
|
51
|
-
"@capxul/observability": "4.2.0-rc.2",
|
|
52
52
|
"@capxul/errors": "0.3.0",
|
|
53
53
|
"@capxul/types": "0.3.0",
|
|
54
|
-
"@capxul/
|
|
55
|
-
"@capxul/
|
|
54
|
+
"@capxul/wire": "0.7.0",
|
|
55
|
+
"@capxul/typescript-config": "0.0.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": {
|