@capxul/sdk 4.20.0-beta.1 → 4.20.0-beta.3
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/{OAuthBearerAuthClient-DDD0JlaI.mjs → OAuthBearerAuthClient-DWkofxdZ.mjs} +9 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/node/index.mjs +1 -1
- package/dist/{production-DvGDNIwu.d.mts → production-CJwxgI8u.d.mts} +55 -6
- package/dist/{production-BmsFhDUr.mjs → production-M4dWz5g4.mjs} +1141 -215
- package/dist/testing/index.d.mts +1 -1
- package/dist/testing/index.mjs +2 -2
- package/package.json +5 -5
|
@@ -76,7 +76,12 @@ const CREDENTIAL_FIELDS = /* @__PURE__ */ new Set([
|
|
|
76
76
|
"authcode",
|
|
77
77
|
"authorizationcode",
|
|
78
78
|
"oauthcode",
|
|
79
|
-
"codeverifier"
|
|
79
|
+
"codeverifier",
|
|
80
|
+
"devicecode",
|
|
81
|
+
"usercode",
|
|
82
|
+
"continuitytoken",
|
|
83
|
+
"refreshattemptid",
|
|
84
|
+
"revocationtoken"
|
|
80
85
|
]);
|
|
81
86
|
/** Match credential fields by meaning, without hiding token addresses or replay IDs. */
|
|
82
87
|
function isCredentialField(name, context) {
|
|
@@ -908,6 +913,8 @@ const COUNTRY_CODE_RE = /^[A-Z]{2}$/;
|
|
|
908
913
|
const ACCOUNT_ID_RE = /^account_[0-9A-Za-z]+$/;
|
|
909
914
|
const PARTY_ID_RE = /^party_[0-9A-Za-z]+$/;
|
|
910
915
|
const APP_ID_RE = /^app_[0-7][0-9A-HJKMNP-TV-Z]{25}$/;
|
|
916
|
+
const CLIENT_REQUEST_ID_RE = /^creq_[0-7][0-9A-HJKMNP-TV-Z]{25}$/;
|
|
917
|
+
const CLIENT_GRANT_ID_RE = /^cgrant_[0-7][0-9A-HJKMNP-TV-Z]{25}$/;
|
|
911
918
|
const TX_HASH_RE = /^0x[0-9a-f]{64}$/i;
|
|
912
919
|
const WEI_RE = /^[0-9]+$/;
|
|
913
920
|
Math.floor(Number.MAX_SAFE_INTEGER / 1e3);
|
|
@@ -2478,4 +2485,4 @@ function readExchange(body) {
|
|
|
2478
2485
|
};
|
|
2479
2486
|
}
|
|
2480
2487
|
//#endregion
|
|
2481
|
-
export {
|
|
2488
|
+
export { toPartyId as $, SUPPORTED_CURRENCY_CODES as A, toAuthUserId as B, ASSET_ID_RE as C, isChainUpstream as Ct, COUNTRY_CODE_RE as D, isCredentialField as Dt, CLIENT_REQUEST_ID_RE as E, containsSensitiveMaterial as Et, toAccountId as F, toDurationMs as G, toChainId as H, toAddress as I, toEpochSeconds as J, toEmail as K, toAllowedOrigin as L, ZERO_BYTES32 as M, assetIdFor as N, EMAIL_RE as O, redactSecrets as Ot, currencySymbolFor as P, toOrgId as Q, toAppId as R, APP_ID_RE as S, failureFingerprint as St, CLIENT_GRANT_ID_RE as T, revertSummaryText as Tt, toCountryCode as U, toBudgetId as V, toCurrencyCode as W, toJwtToken as X, toHandle as Y, toKycTier as Z, normalizeBindingEmail as _, FAILURE_MODES as _t, parseAuthSession as a, toTesterKind as at, configuredMoneyAssetById as b, chainEvidenceLabel as bt, AuthCachePortTag as c, validateHandle as ct, authClientPortFromPromiseAdapter as d, CAPXUL_ERROR_CODES as dt, toPayrollGroupId as et, AuthClientError as f, CapxulError as ft, CAPXUL_PAYMENTS_V2_ADDRESS as g, CHAIN_UPSTREAMS as gt, orgRoleKeyForLabel as h, isCapxulError as ht, BrowserAuthCacheAdapter as i, toSessionToken as it, WEI_RE as j, EVM_ADDRESS_RE as k, redactUrlSecrets as kt, SystemClockLayer as l, HANDLE_RE as lt, ADMIN_ROLE_LABEL as m, Errors as mt, readClockNow as n, toPublishableKey as nt, parseCachedJwt as o, toTxHash as ot, AuthClientPortTag as p, EXPECTED_OPERATION_OUTCOMES as pt, toEpochMs as q, InMemoryAuthCacheAdapter as r, toRoleKey as rt, AuthCacheError as s, toWeiAmount as st, oauthBearerAuthClient as t, toPayrollRunId as tt, ClockPortTag as u, decodeConvexError as ut, BASE_SEPOLIA_CHAIN_ID as v, boundedResponseHeaders as vt, BYTES32_RE as w, isFailureMode as wt, ACCOUNT_ID_RE as x, decodeChainCause as xt, deriveCapxulSafeAddress as y, chainCauseProperties as yt, toAssetId as z };
|
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-CJwxgI8u.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,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
import {
|
|
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-M4dWz5g4.mjs";
|
|
2
|
+
import { $ as toPartyId, I as toAddress, N as assetIdFor, P as currencySymbolFor, U as toCountryCode, W as toCurrencyCode, Y as toHandle, _t as FAILURE_MODES, b as configuredMoneyAssetById, dt as CAPXUL_ERROR_CODES, ft as CapxulError, g as CAPXUL_PAYMENTS_V2_ADDRESS, gt as CHAIN_UPSTREAMS, ht as isCapxulError, k as EVM_ADDRESS_RE, lt as HANDLE_RE, mt as Errors } from "./OAuthBearerAuthClient-DWkofxdZ.mjs";
|
|
3
3
|
import { formatUnits } from "viem";
|
|
4
4
|
import { Effect } from "effect";
|
|
5
5
|
import { privateKeyToAccount } from "viem/accounts";
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as toAddress, a as parseAuthSession, c as AuthCachePortTag, i as BrowserAuthCacheAdapter, o as parseCachedJwt, r as InMemoryAuthCacheAdapter, s as AuthCacheError, t as oauthBearerAuthClient } from "../OAuthBearerAuthClient-DWkofxdZ.mjs";
|
|
2
2
|
import { Effect, FileSystem, Layer, Path } from "effect";
|
|
3
3
|
import { privateKeyToAccount } from "viem/accounts";
|
|
4
4
|
import * as os from "node:os";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { $ as PayrollGroupId, A as AllowanceKey, B as ChainId, C as AuthCachePort, D as Account$1, Et as FailureMode, F as AssetId, H as CurrencyCode, I as AuthSession, K as Email, L as AuthUserId, M as AnonymousDistinctId, N as AppId, Q as PaymentCommandId, R as BlockNumber, U as DocumentHash, V as CountryCode, W as DurationMs, X as OrgId, Y as Money, Z as PartyId, _ as Session$1, _t as CapxulErrorCode, at as RoleKey, b as AuthClientPort, bt as Failure, ct as TesterKind, d as AccountRequirement, et as PayrollRunId, g as Profile$1, gt as CapxulError, h as CapxulResult, i as CapxulSigner, it as PublishableKey, j as AllowedOrigin, k as Address$1, lt as TxHash, nt as PermissionId, ot as SessionToken, q as EpochMs, rt as Profile, s as SignerStatusStore, st as SmartAccount, tt as PermissionAssignmentId, u as AccountProviderSource, ut as WeiAmount, v as SmartAccount$1, vt as CapxulErrorDetails, x as CanSendOtpStatus, y as ClockPort, z as BudgetId } from "./OAuthBearerAuthClient-C-ip-z8M.mjs";
|
|
2
2
|
import { Hex } from "viem";
|
|
3
|
-
import { Context, Effect, Layer, Schema, Scope, Tracer } from "effect";
|
|
3
|
+
import { Context, Duration, Effect, Layer, Logger, Metric, References, Schema, Scope, Tracer } from "effect";
|
|
4
4
|
import { FunctionReference } from "convex/server";
|
|
5
|
+
import { HttpClient, HttpClientError } from "effect/unstable/http";
|
|
6
|
+
import { OtlpExporter, OtlpSerialization } from "effect/unstable/observability";
|
|
5
7
|
//#region src/domain/machine/shell.d.ts
|
|
6
8
|
declare const INVOCATION_PARENT_SPAN: unique symbol;
|
|
7
9
|
interface InvocationControls {
|
|
@@ -284,7 +286,7 @@ interface TelemetryPort {
|
|
|
284
286
|
}
|
|
285
287
|
//#endregion
|
|
286
288
|
//#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", "identity_refused", "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", "indexer_drift_corrected", "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", "cli_diagnostic_completed"];
|
|
289
|
+
declare const TELEMETRY_EVENT_NAMES: readonly ["auth_otp_requested", "auth_otp_delivered", "auth_otp_expired", "auth_verified", "auth_failed", "identity_refused", "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", "indexer_drift_corrected", "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", "cli_diagnostic_completed", "cli_first_used", "cli_command_started", "cli_command_completed"];
|
|
288
290
|
type TelemetryEventName = (typeof TELEMETRY_EVENT_NAMES)[number];
|
|
289
291
|
type TelemetryProps = Record<string, unknown>;
|
|
290
292
|
type TelemetryEvent = {
|
|
@@ -332,6 +334,13 @@ declare const PAYMENT_STATUSES: readonly ["pending", "settling", "unresolved", "
|
|
|
332
334
|
type PaymentStatus$1 = (typeof PAYMENT_STATUSES)[number];
|
|
333
335
|
declare const PAYMENT_EXECUTION_STATUSES: readonly ["pending", "included", "dropped", "replaced", "expired", "unresolved", "superseded", "failed", "settled"];
|
|
334
336
|
type PaymentExecutionStatus = (typeof PAYMENT_EXECUTION_STATUSES)[number];
|
|
337
|
+
/** Read-time execution meaning; it does not change the Payment's durable outcome. */
|
|
338
|
+
interface PaymentExecutionView {
|
|
339
|
+
readonly status: PaymentExecutionStatus;
|
|
340
|
+
readonly retryRequired: boolean;
|
|
341
|
+
/** Present only when complete durable execution history supports no broadcast. */
|
|
342
|
+
readonly notSent?: true;
|
|
343
|
+
}
|
|
335
344
|
/** The payment direction relative to the current actor. */
|
|
336
345
|
declare const PAYMENT_DIRECTIONS: readonly ["in", "out", "self"];
|
|
337
346
|
type PaymentDirection$1 = (typeof PAYMENT_DIRECTIONS)[number];
|
|
@@ -927,6 +936,18 @@ interface IndexerReadInput {
|
|
|
927
936
|
/** 1 to 1000 inclusive — the indexer's own bound. */
|
|
928
937
|
readonly limit: number;
|
|
929
938
|
readonly offset?: number;
|
|
939
|
+
readonly eventId?: string;
|
|
940
|
+
/** Exact Payment lookup for a bounded set of actor-authorized settlement IDs. */
|
|
941
|
+
readonly settlements?: readonly string[];
|
|
942
|
+
/** Transfer occurrence time in epoch seconds; continuation excludes the last row. */
|
|
943
|
+
readonly timeline?: {
|
|
944
|
+
readonly from: number;
|
|
945
|
+
readonly to: number;
|
|
946
|
+
readonly before?: {
|
|
947
|
+
readonly timestamp: number;
|
|
948
|
+
readonly id: string;
|
|
949
|
+
};
|
|
950
|
+
};
|
|
930
951
|
}
|
|
931
952
|
/**
|
|
932
953
|
* The chain evidence every indexed row carries. `id` is the logical event id
|
|
@@ -950,6 +971,8 @@ interface IndexerEventIdentity {
|
|
|
950
971
|
readonly timestamp: bigint;
|
|
951
972
|
}
|
|
952
973
|
interface IndexerTransferRow extends IndexerEventIdentity {
|
|
974
|
+
/** Timeline projection only. Null means no protocol event owns this Transfer. */
|
|
975
|
+
readonly paymentSettlementId?: string | null;
|
|
953
976
|
readonly assetId: AssetId;
|
|
954
977
|
readonly token: Address$1;
|
|
955
978
|
readonly from: Address$1;
|
|
@@ -1390,10 +1413,7 @@ interface Payment {
|
|
|
1390
1413
|
readonly timing: PaymentTiming;
|
|
1391
1414
|
readonly released: PaymentMoney;
|
|
1392
1415
|
readonly availableToClaim: PaymentMoney;
|
|
1393
|
-
readonly execution?:
|
|
1394
|
-
readonly status: PaymentExecutionStatus;
|
|
1395
|
-
readonly retryRequired: boolean;
|
|
1396
|
-
};
|
|
1416
|
+
readonly execution?: PaymentExecutionView;
|
|
1397
1417
|
readonly createdAt: number;
|
|
1398
1418
|
readonly updatedAt: number;
|
|
1399
1419
|
}
|
|
@@ -1543,6 +1563,7 @@ type ActivityReference = {
|
|
|
1543
1563
|
};
|
|
1544
1564
|
type ActivityItem = {
|
|
1545
1565
|
readonly kind: "payment";
|
|
1566
|
+
readonly execution?: PaymentExecutionView;
|
|
1546
1567
|
readonly id: string;
|
|
1547
1568
|
readonly ledgerKind: "Payment" | "Payout" | "Deposit";
|
|
1548
1569
|
readonly status: PaymentStatus;
|
|
@@ -2910,6 +2931,32 @@ interface CreateCapxulClientInput {
|
|
|
2910
2931
|
};
|
|
2911
2932
|
}
|
|
2912
2933
|
//#endregion
|
|
2934
|
+
//#region ../observability/src/engineering-delivery.d.ts
|
|
2935
|
+
type MetricEntry = Metric.Metric.Metadata<unknown, unknown>;
|
|
2936
|
+
interface CliEngineeringStats {
|
|
2937
|
+
readonly records: number;
|
|
2938
|
+
readonly reservedRecordBytes: number;
|
|
2939
|
+
readonly peakRecords: number;
|
|
2940
|
+
readonly peakReservedRecordBytes: number;
|
|
2941
|
+
readonly activeRequests: number;
|
|
2942
|
+
readonly requestBytes: number;
|
|
2943
|
+
readonly peakRequests: number;
|
|
2944
|
+
readonly peakRequestBytes: number;
|
|
2945
|
+
/** Rejected records, fields, metric registrations and export attempts; not delivered-event count. */
|
|
2946
|
+
readonly dropped: number;
|
|
2947
|
+
readonly metricSeries: number;
|
|
2948
|
+
}
|
|
2949
|
+
/** Shared, closure-owned admission state; no queue or mutable counters are exposed. */
|
|
2950
|
+
declare function makeCliEngineeringBudget(): Readonly<{
|
|
2951
|
+
metricRegistry: Map<string, MetricEntry>;
|
|
2952
|
+
emptyMetricRegistry: () => Map<string, MetricEntry>;
|
|
2953
|
+
drop: () => void;
|
|
2954
|
+
admitRecord(terminal: boolean): (() => void) | undefined;
|
|
2955
|
+
admitRequest(bytes: number, terminal: boolean): (() => void) | undefined;
|
|
2956
|
+
snapshot(): CliEngineeringStats;
|
|
2957
|
+
}>;
|
|
2958
|
+
type CliEngineeringBudget = ReturnType<typeof makeCliEngineeringBudget>;
|
|
2959
|
+
//#endregion
|
|
2913
2960
|
//#region src/host-observability.d.ts
|
|
2914
2961
|
/** One host-owned observability module at the SDK consumer boundary. */
|
|
2915
2962
|
interface HostObservability {
|
|
@@ -2930,6 +2977,8 @@ interface PostHogObservabilityOptions {
|
|
|
2930
2977
|
readonly engineeringEnabled?: boolean | (() => boolean);
|
|
2931
2978
|
/** Opt in to code/timing/correlation-only engineering exports. Omission preserves full safe diagnostics. */
|
|
2932
2979
|
readonly engineeringPrivacy?: "minimal";
|
|
2980
|
+
/** Shared CLI-only admission and transport budget; omitted for other hosts. */
|
|
2981
|
+
readonly engineeringDeliveryBudget?: CliEngineeringBudget;
|
|
2933
2982
|
/** Host environment stamped on every SDK-owned product event. */
|
|
2934
2983
|
readonly capxulEnv?: CapxulEnv;
|
|
2935
2984
|
/** Host-owned correlation context shared by product and failure delivery. */
|