@capxul/sdk 4.20.0-beta.37 → 4.20.0-beta.39

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.
@@ -438,9 +438,11 @@ const Errors = {
438
438
  * internal state machine. `currentState` is the Effect-machine snapshot
439
439
  * tag (stringified from the SDK's actor-shell snapshot; see
440
440
  * `packages/errors/CONTEXT.md`); `validStates`
441
- * enumerates the states the method accepts.
441
+ * enumerates the states the method accepts that the target can still reach.
442
+ * An empty list means the target is final, and the message says so instead
443
+ * of listing states.
442
444
  */
443
- wrongState: (details) => new CapxulError("WRONG_STATE", `${details.method} called from state '${details.currentState}'; valid states: ${details.validStates.join(", ")}`, { details: {
445
+ wrongState: (details) => new CapxulError("WRONG_STATE", details.validStates.length === 0 ? `${details.method} called from state '${details.currentState}'; it can no longer move to any state` : `${details.method} called from state '${details.currentState}'; valid states: ${details.validStates.join(", ")}`, { details: {
444
446
  method: details.method,
445
447
  currentState: details.currentState,
446
448
  validStates: [...details.validStates],
@@ -2110,6 +2112,8 @@ const Payment = Schema.Struct({
2110
2112
  notSent: Schema.optionalKey(Schema.Literal(true))
2111
2113
  })),
2112
2114
  requestedOutput: Schema.optionalKey(MoneySchema),
2115
+ /** What Bridge reports reached the recipient's bank. Present once delivery is done. */
2116
+ deliveredOutput: Schema.optionalKey(MoneySchema),
2113
2117
  outputExact: Schema.optionalKey(Schema.Boolean),
2114
2118
  recipientOnCapxul: Schema.optionalKey(Schema.Boolean),
2115
2119
  recipientWarning: Schema.optionalKey(Schema.Boolean),
@@ -2129,7 +2133,7 @@ const Payment = Schema.Struct({
2129
2133
  })),
2130
2134
  createdAt: EpochMsSchema$1,
2131
2135
  updatedAt: EpochMsSchema$1
2132
- }).pipe(Schema.check(Schema.makeFilter((payment) => payment.documents.every((document) => document.role !== "instruction" || document.kind === "memo" || paymentTypeForDocumentKind(document.kind) === payment.paymentType), { message: "document kind must map to paymentType" }), Schema.makeFilter((payment) => payment.recipient.kind === "party_account" ? payment.requestedOutput !== void 0 && payment.outputExact !== void 0 && payment.recipientOnCapxul !== void 0 && payment.recipientWarning !== void 0 && payment.links !== void 0 && payment.legs?.length === 2 && payment.legs[0]?.kind === "funding" && payment.legs[1]?.kind === "delivery" : payment.requestedOutput === void 0 && payment.outputExact === void 0 && payment.recipientOnCapxul === void 0 && payment.recipientWarning === void 0 && payment.links === void 0 && payment.legs === void 0, { message: "Bank payout Payments require their quote, output and two rail legs" })));
2136
+ }).pipe(Schema.check(Schema.makeFilter((payment) => payment.documents.every((document) => document.role !== "instruction" || document.kind === "memo" || paymentTypeForDocumentKind(document.kind) === payment.paymentType), { message: "document kind must map to paymentType" }), Schema.makeFilter((payment) => payment.recipient.kind === "party_account" ? payment.requestedOutput !== void 0 && payment.outputExact !== void 0 && payment.recipientOnCapxul !== void 0 && payment.recipientWarning !== void 0 && payment.links !== void 0 && payment.legs?.length === 2 && payment.legs[0]?.kind === "funding" && payment.legs[1]?.kind === "delivery" : payment.requestedOutput === void 0 && payment.deliveredOutput === void 0 && payment.outputExact === void 0 && payment.recipientOnCapxul === void 0 && payment.recipientWarning === void 0 && payment.links === void 0 && payment.legs === void 0, { message: "Bank payout Payments require their quote, output and two rail legs" })));
2133
2137
  //#endregion
2134
2138
  //#region ../protocol/src/payments/model.ts
2135
2139
  function toPaymentId(raw) {
@@ -2736,6 +2740,8 @@ const PaymentQuoteSchema = Schema.Struct({
2736
2740
  requestedOutput: MoneySchema,
2737
2741
  outputExact: Schema.Boolean,
2738
2742
  funding: AssetAmountSchema,
2743
+ /** The part of `funding` that covers rate movement before the transfer is funded. */
2744
+ slippage: Schema.optionalKey(AssetAmountSchema),
2739
2745
  expiresAt: Schema.Finite,
2740
2746
  recipient: Schema.Struct({
2741
2747
  label: Schema.String,
@@ -14496,7 +14502,7 @@ function causeFromSummary(links) {
14496
14502
  }
14497
14503
  //#endregion
14498
14504
  //#region package.json
14499
- var version = "4.20.0-beta.37";
14505
+ var version = "4.20.0-beta.39";
14500
14506
  //#endregion
14501
14507
  //#region src/observability/telemetry/exception-projection.ts
14502
14508
  /** Fixed fallback for failures that have no safe message. */
@@ -23200,7 +23206,7 @@ function makeApprovalsMethods(deps) {
23200
23206
  const signal = options?.signal;
23201
23207
  if (isCommandApproval(input)) return openApproval(signal, (signerAddress) => prepareVerifiedCommand(deps, input, signerAddress, signal));
23202
23208
  if (isPermissionChange(input)) return openApproval(signal, async (signerAddress) => {
23203
- const { prepareVerifiedPermissionChange } = await import("./permission-approvals-B6Oqszeb.mjs");
23209
+ const { prepareVerifiedPermissionChange } = await import("./permission-approvals-EjGEke32.mjs");
23204
23210
  return prepareVerifiedPermissionChange(deps, input, signerAddress, signal);
23205
23211
  });
23206
23212
  if ("organizationId" in input) return checkedBankApproval(deps, input, await openApproval(signal, (signerAddress) => prepareVerifiedOrganizationPayment(deps, input, signerAddress, signal)));