@capxul/sdk 4.2.0-rc.11 → 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.
- package/dist/capxul-source.json +3 -3
- package/dist/index.d.mts +3 -1
- package/dist/index.mjs +1 -1
- package/dist/{production-7jr-KUvX.mjs → production-CrW_sxwv.mjs} +62 -10
- package/dist/{production-A1zW1JPt.d.mts → production-Db4fBqSk.d.mts} +27 -12
- package/dist/testing/index.d.mts +1 -1
- package/dist/testing/index.mjs +1 -1
- package/package.json +3 -3
package/dist/capxul-source.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"source": {
|
|
3
|
-
"commit": "
|
|
4
|
-
"tree": "
|
|
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.
|
|
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-
|
|
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
|
|
@@ -339,6 +339,8 @@ declare const CAPXUL_OPERATIONS: {
|
|
|
339
339
|
};
|
|
340
340
|
readonly payroll: {
|
|
341
341
|
readonly authorizeRun: "payroll.authorizeRun";
|
|
342
|
+
readonly emitGroupChanged: "payroll.emitGroupChanged";
|
|
343
|
+
readonly emitRunTransitioned: "payroll.emitRunTransitioned";
|
|
342
344
|
readonly groups: {
|
|
343
345
|
readonly access: "payroll.groups";
|
|
344
346
|
readonly list: "payroll.groups.list";
|
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-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";
|
|
@@ -695,6 +695,8 @@ const CAPXUL_OPERATIONS = {
|
|
|
695
695
|
recipient: { resolve: "recipient.resolve" },
|
|
696
696
|
payroll: {
|
|
697
697
|
authorizeRun: "payroll.authorizeRun",
|
|
698
|
+
emitGroupChanged: "payroll.emitGroupChanged",
|
|
699
|
+
emitRunTransitioned: "payroll.emitRunTransitioned",
|
|
698
700
|
groups: {
|
|
699
701
|
access: "payroll.groups",
|
|
700
702
|
list: "payroll.groups.list",
|
|
@@ -1929,6 +1931,12 @@ Schema.Struct({
|
|
|
1929
1931
|
"settled"
|
|
1930
1932
|
]),
|
|
1931
1933
|
run_id: Schema.String,
|
|
1934
|
+
/**
|
|
1935
|
+
* The `paymentCommands` row at `payrollRuns.batchRef` — the durable owner of
|
|
1936
|
+
* this run's Payment membership. `payment_count` counts THAT command's
|
|
1937
|
+
* `paymentIds`, so an unrelated Payment quoting the run id changes neither.
|
|
1938
|
+
*/
|
|
1939
|
+
command_id: OptionalString,
|
|
1932
1940
|
payment_count: Schema.optional(Schema.Number),
|
|
1933
1941
|
occurred_at: Schema.Number
|
|
1934
1942
|
})
|
|
@@ -3204,6 +3212,13 @@ Schema.Struct({
|
|
|
3204
3212
|
transfers: Schema.Array(TransferEvidenceSchema),
|
|
3205
3213
|
requestCount: nonNegativeInteger("requestCount")
|
|
3206
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" }));
|
|
3207
3222
|
const VerifiedMoneyEvidenceCommonSchema = Schema.Struct({
|
|
3208
3223
|
chainId: BaseSepoliaChainIdSchema,
|
|
3209
3224
|
contractAddress: AddressSchema,
|
|
@@ -3212,7 +3227,17 @@ const VerifiedMoneyEvidenceCommonSchema = Schema.Struct({
|
|
|
3212
3227
|
blockNumber: BlockNumberSchema,
|
|
3213
3228
|
blockHash: Bytes32Schema,
|
|
3214
3229
|
blockTimestamp: Uint48Schema,
|
|
3215
|
-
|
|
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)
|
|
3216
3241
|
});
|
|
3217
3242
|
const VerifiedPaymentEvidenceSchema = Schema.Struct({
|
|
3218
3243
|
...VerifiedMoneyEvidenceCommonSchema.fields,
|
|
@@ -6066,7 +6091,7 @@ function subscribeActivity(deps, actor, controls, onChange) {
|
|
|
6066
6091
|
}
|
|
6067
6092
|
//#endregion
|
|
6068
6093
|
//#region package.json
|
|
6069
|
-
var version = "4.2.0-rc.
|
|
6094
|
+
var version = "4.2.0-rc.13";
|
|
6070
6095
|
//#endregion
|
|
6071
6096
|
//#region src/telemetry/exception-projection.ts
|
|
6072
6097
|
/** Fixed fallback for failures that have no safe message. */
|
|
@@ -7528,10 +7553,12 @@ function makeFinancialOpsMethods(deps) {
|
|
|
7528
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);
|
|
7529
7554
|
}
|
|
7530
7555
|
},
|
|
7531
|
-
targets: { resolve:
|
|
7532
|
-
const
|
|
7533
|
-
|
|
7534
|
-
|
|
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);
|
|
7535
7562
|
} },
|
|
7536
7563
|
destinations: {
|
|
7537
7564
|
add: (input, options) => {
|
|
@@ -7594,8 +7621,14 @@ function makeFinancialOpsMethods(deps) {
|
|
|
7594
7621
|
kind: "claim",
|
|
7595
7622
|
paymentId
|
|
7596
7623
|
}, deps.invocationControls?.(options) ?? options, CAPXUL_OPERATIONS.payments.claim),
|
|
7597
|
-
list:
|
|
7598
|
-
|
|
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
|
+
},
|
|
7599
7632
|
cancel: (paymentId, options) => runLifecycle({
|
|
7600
7633
|
kind: "cancel",
|
|
7601
7634
|
paymentId
|
|
@@ -7963,6 +7996,22 @@ function normalizePaymentTiming(payment) {
|
|
|
7963
7996
|
timing: payment.timing ?? payment.release ?? { kind: "instant" }
|
|
7964
7997
|
};
|
|
7965
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
|
+
}
|
|
7966
8015
|
function mapOk(result, f) {
|
|
7967
8016
|
if (!result.ok) return result;
|
|
7968
8017
|
try {
|
|
@@ -9453,6 +9502,8 @@ const OBSERVED_CONVEX_QUERIES = /* @__PURE__ */ new Set([
|
|
|
9453
9502
|
"movement/activity:summary",
|
|
9454
9503
|
"movement/activity:get",
|
|
9455
9504
|
"financialOps/queries:depositInstructions",
|
|
9505
|
+
"financialOps/queries:listPayments",
|
|
9506
|
+
"financialOps/queries:getPayment",
|
|
9456
9507
|
"financialOps/destinations:list",
|
|
9457
9508
|
"financialOps/queries:verifyPaymentDocument",
|
|
9458
9509
|
"financialOps/queries:renderStoredDocument",
|
|
@@ -14619,6 +14670,7 @@ function identity(row) {
|
|
|
14619
14670
|
chainId: toChainId(integer(row, "chain_id")),
|
|
14620
14671
|
txHash: toTxHash(hex(row, "tx_hash")),
|
|
14621
14672
|
transactionLogOrdinal: integer(row, "transaction_log_ordinal"),
|
|
14673
|
+
logIndex: integer(row, "log_index"),
|
|
14622
14674
|
blockNumber: big(row, "block_number"),
|
|
14623
14675
|
blockHash: hex(row, "block_hash"),
|
|
14624
14676
|
timestamp: big(row, "timestamp")
|
|
@@ -14701,8 +14753,8 @@ function decodeStatus(body) {
|
|
|
14701
14753
|
* that allowlist changes, this file changes with it or every read fails 403.
|
|
14702
14754
|
*/
|
|
14703
14755
|
const HEADS = {
|
|
14704
|
-
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",
|
|
14705
|
-
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",
|
|
14706
14758
|
balance: "select \"chain_id\", \"asset_id\", \"to\", \"amount\" from \"balance\" where \"balance\".\"to\" = $1"
|
|
14707
14759
|
};
|
|
14708
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
|
-
|
|
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>>;
|
|
@@ -2343,9 +2352,15 @@ interface AuthorizeRunInput {
|
|
|
2343
2352
|
*/
|
|
2344
2353
|
readonly requestKey?: string;
|
|
2345
2354
|
}
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2355
|
+
/**
|
|
2356
|
+
* R13 (#1968): the declared option type is the `InvocationControls` these
|
|
2357
|
+
* methods have always forwarded to `deps.invocationControls` — the same naming
|
|
2358
|
+
* R02 gave the address book. It lets a caller that captured one browser attempt
|
|
2359
|
+
* hand that attempt's `correlation_id`/`journey_id` to the payroll operation it
|
|
2360
|
+
* starts, so `ui_payroll_action_completed` and the durable group and run events
|
|
2361
|
+
* share a correlation. `{ signal }` callers are unaffected.
|
|
2362
|
+
*/
|
|
2363
|
+
type PayrollOptions = InvocationControls;
|
|
2349
2364
|
type AuthorizeRunOptions = PayrollOptions & {
|
|
2350
2365
|
/** Persist this SDK-allocated key before the first backend write. Reject to prevent execution. */
|
|
2351
2366
|
readonly onRequestKey?: (key: string) => void | Promise<void>;
|
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-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. */
|
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-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.
|
|
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/
|
|
51
|
+
"@capxul/errors": "0.3.0",
|
|
52
52
|
"@capxul/types": "0.3.0",
|
|
53
|
+
"@capxul/observability": "4.2.0-rc.13",
|
|
53
54
|
"@capxul/typescript-config": "0.0.0",
|
|
54
|
-
"@capxul/errors": "0.3.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.",
|