@capxul/sdk 4.2.0-rc.12 → 4.2.0-rc.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "source": {
3
- "commit": "fd5b4d0f124c75f609e469b8673c61f84253c0dc",
4
- "tree": "d61f0f6b0c83dfc2d405ffc6b55eecf2e9d80f2d",
3
+ "commit": "887920e1ba54e17bd8465975fcbc6e1537dfb6b8",
4
+ "tree": "deed16dc942ed9d6b587ceead4dbf8b0b4174e2c",
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.12"
10
+ "version": "4.2.0-rc.13"
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-Cpz4hm8p.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-Db4fBqSk.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-C8FuAYm1.mjs";
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-CrW_sxwv.mjs";
2
2
  import { A as currencySymbolFor, B as toCurrencyCode, G as toHandle, M as toAddress, T as EVM_ADDRESS_RE, Y as toPartyId, at as HANDLE_RE, b as configuredMoneyAssetById, ct as CapxulError, dt as isCapxulError, ft as CHAIN_UPSTREAMS, g as CAPXUL_PAYMENTS_V2_ADDRESS, k as assetIdFor, pt as FAILURE_MODES, st as CAPXUL_ERROR_CODES, ut as Errors, z as toCountryCode } from "./OAuthBearerAuthClient-CbU_W9Sp.mjs";
3
3
  import { formatUnits } from "viem";
4
4
  import { Effect } from "effect";
@@ -3212,6 +3212,13 @@ Schema.Struct({
3212
3212
  transfers: Schema.Array(TransferEvidenceSchema),
3213
3213
  requestCount: nonNegativeInteger("requestCount")
3214
3214
  });
3215
+ /**
3216
+ * `chainId:txHash:transactionLogOrdinal` — the indexer's own row id. The
3217
+ * ordinal is the position in the transaction's receipt logs, never the
3218
+ * block-global index that `eventLogIndex` carries.
3219
+ */
3220
+ const LOGICAL_EVENT_ID_RE = /^[1-9][0-9]{0,9}:0x[0-9a-f]{64}:(0|[1-9][0-9]{0,5})$/u;
3221
+ const LogicalEventIdSchema = Schema.String.pipe(Schema.refine((value) => LOGICAL_EVENT_ID_RE.test(value), { message: "must be chainId:txHash:transactionLogOrdinal" }));
3215
3222
  const VerifiedMoneyEvidenceCommonSchema = Schema.Struct({
3216
3223
  chainId: BaseSepoliaChainIdSchema,
3217
3224
  contractAddress: AddressSchema,
@@ -3220,7 +3227,17 @@ const VerifiedMoneyEvidenceCommonSchema = Schema.Struct({
3220
3227
  blockNumber: BlockNumberSchema,
3221
3228
  blockHash: Bytes32Schema,
3222
3229
  blockTimestamp: Uint48Schema,
3223
- eventLogIndex: LogIndexSchema
3230
+ /**
3231
+ * The block-global log index of the settled event, as
3232
+ * `eth_getTransactionReceipt` reports it. Both readers key on this value, and
3233
+ * the ledger de-duplicates a settlement on `(txHash, eventLogIndex)`.
3234
+ */
3235
+ eventLogIndex: LogIndexSchema,
3236
+ /**
3237
+ * The indexer row the fact was read from. Present only when the indexer
3238
+ * answered; the receipt-backed reader reads no row and sets nothing.
3239
+ */
3240
+ logicalEventId: Schema.optional(LogicalEventIdSchema)
3224
3241
  });
3225
3242
  const VerifiedPaymentEvidenceSchema = Schema.Struct({
3226
3243
  ...VerifiedMoneyEvidenceCommonSchema.fields,
@@ -6074,7 +6091,7 @@ function subscribeActivity(deps, actor, controls, onChange) {
6074
6091
  }
6075
6092
  //#endregion
6076
6093
  //#region package.json
6077
- var version = "4.2.0-rc.12";
6094
+ var version = "4.2.0-rc.13";
6078
6095
  //#endregion
6079
6096
  //#region src/telemetry/exception-projection.ts
6080
6097
  /** Fixed fallback for failures that have no safe message. */
@@ -7536,10 +7553,12 @@ function makeFinancialOpsMethods(deps) {
7536
7553
  return runPortEffect(Effect.suspend(() => deps.convexCall.query(fns.depositInstructions, copyInvocationObservation(controls, {}))).pipe(Effect.tap((instructions) => emitDepositInitiated(deps.telemetry, instructions, controls))), controls, CAPXUL_OPERATIONS.me.depositInstructions, deps.runPromise);
7537
7554
  }
7538
7555
  },
7539
- targets: { resolve: async (reference, options) => {
7540
- const recipient = normalizeTargetForBackend(reference, "reference");
7541
- if (!recipient.ok) return recipient;
7542
- return mapOk(await runIfActive(options?.signal, CAPXUL_OPERATIONS.recipient.resolve, () => deps.convexCall.query(fns.resolveRecipient, { recipient: recipient.value })), resolvedTargetFromResolution);
7556
+ targets: { resolve: (reference, options) => {
7557
+ const controls = deps.invocationControls?.(options) ?? options;
7558
+ return runPortEffect(projectReply(Effect.suspend(() => {
7559
+ const recipient = normalizeTargetForBackend(reference, "reference");
7560
+ return recipient.ok ? deps.convexCall.query(fns.resolveRecipient, copyInvocationObservation(controls, { recipient: recipient.value })) : Effect.fail({ publicError: recipient.error });
7561
+ }), resolvedTargetFromResolution), controls, CAPXUL_OPERATIONS.recipient.resolve, deps.runPromise);
7543
7562
  } },
7544
7563
  destinations: {
7545
7564
  add: (input, options) => {
@@ -7602,8 +7621,14 @@ function makeFinancialOpsMethods(deps) {
7602
7621
  kind: "claim",
7603
7622
  paymentId
7604
7623
  }, deps.invocationControls?.(options) ?? options, CAPXUL_OPERATIONS.payments.claim),
7605
- list: async (options) => mapOk(await runIfActive(options?.signal, CAPXUL_OPERATIONS.payments.list, () => deps.convexCall.query(fns.listPayments, {})), (payments) => payments.map(normalizePaymentTiming)),
7606
- get: async (paymentId, options) => mapOk(await runIfActive(options?.signal, CAPXUL_OPERATIONS.payments.get, () => deps.convexCall.query(fns.getPayment, { paymentId })), (payment) => payment === null ? null : normalizePaymentTiming(payment)),
7624
+ list: (options) => {
7625
+ const controls = deps.invocationControls?.(options) ?? options;
7626
+ return runPortEffect(projectReply(Effect.suspend(() => deps.convexCall.query(fns.listPayments, copyInvocationObservation(controls, {}))), (payments) => payments.map(normalizePaymentTiming)), controls, CAPXUL_OPERATIONS.payments.list, deps.runPromise);
7627
+ },
7628
+ get: (paymentId, options) => {
7629
+ const controls = deps.invocationControls?.(options) ?? options;
7630
+ return runPortEffect(projectReply(Effect.suspend(() => deps.convexCall.query(fns.getPayment, copyInvocationObservation(controls, { paymentId }))), (payment) => payment === null ? null : normalizePaymentTiming(payment)), controls, CAPXUL_OPERATIONS.payments.get, deps.runPromise);
7631
+ },
7607
7632
  cancel: (paymentId, options) => runLifecycle({
7608
7633
  kind: "cancel",
7609
7634
  paymentId
@@ -7971,6 +7996,22 @@ function normalizePaymentTiming(payment) {
7971
7996
  timing: payment.timing ?? payment.release ?? { kind: "instant" }
7972
7997
  };
7973
7998
  }
7999
+ /**
8000
+ * `mapOk`, moved inside the observed Effect (R09 #1967).
8001
+ *
8002
+ * The projection can refuse — `toAddress` and `toPartyId` throw on a malformed
8003
+ * reply — and every verb on this surface returns a `CapxulResult`, so that
8004
+ * throw stays a value here (ADR-0023). The error identity is `mapOk`'s: a
8005
+ * `CapxulError` passes through, anything else becomes `Errors.unknown(cause)`.
8006
+ * Running it inside the runner is what puts the decode failure on the same
8007
+ * operation record as the read that produced the reply.
8008
+ */
8009
+ function projectReply(program, project) {
8010
+ return program.pipe(Effect.flatMap((value) => Effect.try({
8011
+ try: () => project(value),
8012
+ catch: (cause) => ({ publicError: cause instanceof CapxulError ? cause : Errors.unknown(cause) })
8013
+ })));
8014
+ }
7974
8015
  function mapOk(result, f) {
7975
8016
  if (!result.ok) return result;
7976
8017
  try {
@@ -9461,6 +9502,8 @@ const OBSERVED_CONVEX_QUERIES = /* @__PURE__ */ new Set([
9461
9502
  "movement/activity:summary",
9462
9503
  "movement/activity:get",
9463
9504
  "financialOps/queries:depositInstructions",
9505
+ "financialOps/queries:listPayments",
9506
+ "financialOps/queries:getPayment",
9464
9507
  "financialOps/destinations:list",
9465
9508
  "financialOps/queries:verifyPaymentDocument",
9466
9509
  "financialOps/queries:renderStoredDocument",
@@ -14627,6 +14670,7 @@ function identity(row) {
14627
14670
  chainId: toChainId(integer(row, "chain_id")),
14628
14671
  txHash: toTxHash(hex(row, "tx_hash")),
14629
14672
  transactionLogOrdinal: integer(row, "transaction_log_ordinal"),
14673
+ logIndex: integer(row, "log_index"),
14630
14674
  blockNumber: big(row, "block_number"),
14631
14675
  blockHash: hex(row, "block_hash"),
14632
14676
  timestamp: big(row, "timestamp")
@@ -14709,8 +14753,8 @@ function decodeStatus(body) {
14709
14753
  * that allowlist changes, this file changes with it or every read fails 403.
14710
14754
  */
14711
14755
  const HEADS = {
14712
- transfer: "select \"id\", \"chain_id\", \"tx_hash\", \"transaction_log_ordinal\", \"block_number\", \"block_hash\", \"timestamp\", \"asset_id\", \"token\", \"from\", \"to\", \"amount\" from \"transfer\" where (\"transfer\".\"from\" = $1 or \"transfer\".\"to\" = $2) order by \"transfer\".\"block_number\" desc, \"transfer\".\"id\" desc",
14713
- payment: "select \"id\", \"chain_id\", \"tx_hash\", \"transaction_log_ordinal\", \"block_number\", \"block_hash\", \"timestamp\", \"contract\", \"settlement_id\", \"sender\", \"recipient\", \"asset_id\", \"token\", \"amount\", \"kind\", \"document_hash\" from \"payment\" where (\"payment\".\"sender\" = $1 or \"payment\".\"recipient\" = $2) order by \"payment\".\"block_number\" desc, \"payment\".\"id\" desc",
14756
+ transfer: "select \"id\", \"chain_id\", \"tx_hash\", \"transaction_log_ordinal\", \"log_index\", \"block_number\", \"block_hash\", \"timestamp\", \"asset_id\", \"token\", \"from\", \"to\", \"amount\" from \"transfer\" where (\"transfer\".\"from\" = $1 or \"transfer\".\"to\" = $2) order by \"transfer\".\"block_number\" desc, \"transfer\".\"id\" desc",
14757
+ payment: "select \"id\", \"chain_id\", \"tx_hash\", \"transaction_log_ordinal\", \"log_index\", \"block_number\", \"block_hash\", \"timestamp\", \"contract\", \"settlement_id\", \"sender\", \"recipient\", \"asset_id\", \"token\", \"amount\", \"kind\", \"document_hash\" from \"payment\" where (\"payment\".\"sender\" = $1 or \"payment\".\"recipient\" = $2) order by \"payment\".\"block_number\" desc, \"payment\".\"id\" desc",
14714
14758
  balance: "select \"chain_id\", \"asset_id\", \"to\", \"amount\" from \"balance\" where \"balance\".\"to\" = $1"
14715
14759
  };
14716
14760
  /** How many times the statement binds the Safe address. */
@@ -938,6 +938,12 @@ interface IndexerEventIdentity {
938
938
  readonly chainId: ChainId;
939
939
  readonly txHash: TxHash;
940
940
  readonly transactionLogOrdinal: number;
941
+ /**
942
+ * The block-global log index of the same log, as the transaction receipt
943
+ * reports it. The ordinal above is the identity; this is the key Convex
944
+ * settles a Payment on (P12).
945
+ */
946
+ readonly logIndex: number;
941
947
  readonly blockNumber: bigint;
942
948
  readonly blockHash: string;
943
949
  /** Block timestamp in epoch seconds. */
@@ -1274,10 +1280,17 @@ interface ResolvedTarget {
1274
1280
  readonly canPayout: boolean;
1275
1281
  };
1276
1282
  }
1283
+ /**
1284
+ * R09 (#1967): the declared option type is the `InvocationControls` the money
1285
+ * surface already forwards to `deps.invocationControls`, named here exactly as
1286
+ * R02 named it on the address book and R13 on payroll. A caller that captured
1287
+ * one user attempt can hand the same `correlation_id`/`journey_id` to the read
1288
+ * it starts, so the read joins that attempt instead of standing alone.
1289
+ * `{ signal }` callers are unaffected.
1290
+ */
1291
+ type PaymentReadOptions = InvocationControls;
1277
1292
  interface TargetsMethods {
1278
- resolve(reference: TargetReference, options?: {
1279
- readonly signal?: AbortSignal;
1280
- }): Promise<CapxulResult<ResolvedTarget>>;
1293
+ resolve(reference: TargetReference, options?: PaymentReadOptions): Promise<CapxulResult<ResolvedTarget>>;
1281
1294
  }
1282
1295
  type Ref$1 = {
1283
1296
  readonly kind: "handle";
@@ -1763,12 +1776,8 @@ interface PaymentsMethods {
1763
1776
  claim(paymentId: string, options?: {
1764
1777
  readonly signal?: AbortSignal;
1765
1778
  }): Promise<CapxulResult<Payment>>;
1766
- list(options?: {
1767
- readonly signal?: AbortSignal;
1768
- }): Promise<CapxulResult<readonly Payment[]>>;
1769
- get(paymentId: string, options?: {
1770
- readonly signal?: AbortSignal;
1771
- }): Promise<CapxulResult<Payment | null>>;
1779
+ list(options?: PaymentReadOptions): Promise<CapxulResult<readonly Payment[]>>;
1780
+ get(paymentId: string, options?: PaymentReadOptions): Promise<CapxulResult<Payment | null>>;
1772
1781
  cancel(paymentId: string, options?: {
1773
1782
  readonly signal?: AbortSignal;
1774
1783
  }): Promise<CapxulResult<Payment>>;
@@ -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-Cpz4hm8p.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-Db4fBqSk.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. */
@@ -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-C8FuAYm1.mjs";
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-CrW_sxwv.mjs";
2
2
  import { G as toHandle, H as toEmail, I as toAuthUserId, K as toJwtToken, M as toAddress, N as toAllowedOrigin, P as toAppId, Q as toPublishableKey, R as toChainId, U as toEpochMs, V as toDurationMs, W as toEpochSeconds, ct as CapxulError, d as authClientPortFromPromiseAdapter, et as toSessionToken, it as validateHandle, j as toAccountId, n as readClockNow, q as toKycTier, r as InMemoryAuthCacheAdapter, ut as Errors, y as deriveCapxulSafeAddress, z as toCountryCode } from "../OAuthBearerAuthClient-CbU_W9Sp.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.12",
3
+ "version": "4.2.0-rc.13",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Xelmar-tech/infrastructure.git",
@@ -48,10 +48,10 @@
48
48
  "vite-plus": "0.3.0",
49
49
  "vitest": "4.1.11",
50
50
  "@capxul/config": "0.3.0",
51
- "@capxul/observability": "4.2.0-rc.12",
52
- "@capxul/typescript-config": "0.0.0",
53
- "@capxul/types": "0.3.0",
54
51
  "@capxul/errors": "0.3.0",
52
+ "@capxul/types": "0.3.0",
53
+ "@capxul/observability": "4.2.0-rc.13",
54
+ "@capxul/typescript-config": "0.0.0",
55
55
  "@capxul/wire": "0.7.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.",