From 67cda2e774a1355b4771b7a3bc9c402f5fb4bc54 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 23 May 2026 02:21:51 +0000 Subject: [PATCH] chore(release): version packages (alpha) --- .changeset/pre.json | 7 +++- packages/cli/CHANGELOG.md | 25 ++++++++++++ packages/cli/package.json | 2 +- packages/core/CHANGELOG.md | 77 +++++++++++++++++++++++++++++++++++ packages/core/package.json | 2 +- packages/helpers/CHANGELOG.md | 75 ++++++++++++++++++++++++++++++++++ packages/helpers/package.json | 2 +- packages/sdk/CHANGELOG.md | 58 ++++++++++++++++++++++++++ packages/sdk/package.json | 2 +- 9 files changed, 245 insertions(+), 5 deletions(-) create mode 100644 packages/cli/CHANGELOG.md create mode 100644 packages/core/CHANGELOG.md create mode 100644 packages/helpers/CHANGELOG.md create mode 100644 packages/sdk/CHANGELOG.md diff --git a/.changeset/pre.json b/.changeset/pre.json index dbf565a..c3ba5c2 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -8,5 +8,10 @@ "@x402r/helpers": "0.2.1", "@x402r/sdk": "0.2.1" }, - "changesets": [] + "changesets": [ + "sdk-authcapture-autocapture-wireformat", + "sdk-authcapture-lift", + "sdk-authcapture-permit2", + "sdk-authcapture-reconstruct-payment-info" + ] } diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md new file mode 100644 index 0000000..06f3bd3 --- /dev/null +++ b/packages/cli/CHANGELOG.md @@ -0,0 +1,25 @@ +# @x402r/cli + +## 0.3.0-alpha.0 + +### Minor Changes + +- [#123](https://github.com/BackTrackCo/x402r-sdk/pull/123) [`fc56fae`](https://github.com/BackTrackCo/x402r-sdk/commit/fc56fae28610123ff0684255d42b46a381fa1a33) Thanks [@vraspar](https://github.com/vraspar)! - authCapture wire format glue and autoCapture builder. + + **Breaking** + - `@x402r/helpers` `forwardToArbiter` skips settlements whose scheme is not `'authCapture'` (was `'commerce'`). + - `@x402r/helpers` and `@x402r/cli` widen `@x402r/evm` to `>=0.2.0-alpha.0 <0.3.0`. + - `@x402r/cli` switches from `registerCommerceEvmScheme` to `registerAuthCaptureEvmScheme`. + + **New** + - `x402rDefaults(input) → AuthCaptureExtra` from `@x402r/helpers` — only `captureAuthorizer` is required. + - Wire-format types re-exported from `@x402r/helpers`: `AuthCaptureExtra`, `AuthCapturePayload`, `Eip3009Payload`, `Permit2Payload`, `PaymentInfoStruct`, plus payload type guards. + +### Patch Changes + +- [#125](https://github.com/BackTrackCo/x402r-sdk/pull/125) [`b7a930f`](https://github.com/BackTrackCo/x402r-sdk/commit/b7a930f1e2ae0f29a7552cdbe43bbecb8bc4c0e3) Thanks [@vraspar](https://github.com/vraspar)! - Add Permit2 payer-side helpers. + + **New** + - `@x402r/core/payment/permit2`: `signPermit2Authorization`, `createPermit2ApprovalTx`, `getPermit2AllowanceReadParams`, and the `PERMIT2_ADDRESS` constant. Returns `{collectorData, tokenCollector}` suitable for `payment.charge` / `payment.authorize`. + - `@x402r/sdk` re-exports the four Permit2 surfaces. + - `@x402r/cli` adds `--asset-transfer-method ` to filter `accepts[]` alongside `--chain`. Invalid value or empty match set errors with a `Malformed402Error` (exit code 2). diff --git a/packages/cli/package.json b/packages/cli/package.json index f749646..73f1710 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@x402r/cli", - "version": "0.2.0", + "version": "0.3.0-alpha.0", "description": "One-shot CLI for paying x402 / x402r endpoints. Wallet-agnostic: raw key, JSON-RPC signer, or custom module.", "type": "module", "license": "Apache-2.0", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md new file mode 100644 index 0000000..4f84811 --- /dev/null +++ b/packages/core/CHANGELOG.md @@ -0,0 +1,77 @@ +# @x402r/core + +## 0.3.0-alpha.0 + +### Minor Changes + +- [#123](https://github.com/BackTrackCo/x402r-sdk/pull/123) [`fc56fae`](https://github.com/BackTrackCo/x402r-sdk/commit/fc56fae28610123ff0684255d42b46a381fa1a33) Thanks [@vraspar](https://github.com/vraspar)! - authCapture wire format glue and autoCapture builder. + + **Breaking** + - `@x402r/helpers` `forwardToArbiter` skips settlements whose scheme is not `'authCapture'` (was `'commerce'`). + - `@x402r/helpers` and `@x402r/cli` widen `@x402r/evm` to `>=0.2.0-alpha.0 <0.3.0`. + - `@x402r/cli` switches from `registerCommerceEvmScheme` to `registerAuthCaptureEvmScheme`. + + **New** + - `x402rDefaults(input) → AuthCaptureExtra` from `@x402r/helpers` — only `captureAuthorizer` is required. + - Wire-format types re-exported from `@x402r/helpers`: `AuthCaptureExtra`, `AuthCapturePayload`, `Eip3009Payload`, `Permit2Payload`, `PaymentInfoStruct`, plus payload type guards. + +- [#122](https://github.com/BackTrackCo/x402r-sdk/pull/122) [`cc02695`](https://github.com/BackTrackCo/x402r-sdk/commit/cc02695d37e5654aed3e76cc7114311332603d40) Thanks [@vraspar](https://github.com/vraspar)! - Lift the SDK to the authCapture contract surface. + + **Breaking — operator methods** + - `release()` → `capture()` (SDK + on-chain). + - `refundInEscrow(paymentInfo, amount, data)` → `voidPayment(paymentInfo, data?)`. `void` is full-only and drops the `amount` argument; use partial capture + void remainder for the old partial-refund flow. + - `refundPostEscrow()` → `refund()`. Allowance helpers renamed: `approvePostEscrowRefund` → `approveRefundAllowance`, `getPostEscrowRefundAllowance` → `getRefundAllowance`. + - `OperatorConfig.feeRecipient` → `feeReceiver`. `OperatorSlots` fields renamed to `authorizeHook`, `captureCondition`, `feeReceiver`, etc. + + **Breaking — plugin terminology** + - `recorder` / `Recorder` → `hook` / `Hook` across ABIs, factories, types, exports, and addresses. + - `actions/recorder/` → `actions/hook/`. `getRecorderPaymentInfo` → `getHookPaymentInfo`. `getPayerPaymentsFromRecorder` → `getPayerPaymentsFromHook`. `getReceiverPaymentsFromRecorder` → `getReceiverPaymentsFromHook`. + - `recorderCombinator*` → `hookCombinator*`. `paymentIndexRecorder` → `paymentIndexRecorderHook`. `authorizationTimeRecorder` → `authorizationTimeRecorderHook`. + - `X402rChainConfig.recorders` → `hooks`. `RecorderSingletonAddresses` → `HookSingletonAddresses`. `getRecorderSingletons` → `getHookSingletons`. `iRecorderAbi` → `iHookAbi`. + + **Breaking — types, slots, events, errors** + - `ConditionConfig` (constructor plugin-config arg) → `PluginConfig`. Shape is now `{authorize, charge, capture, void, refund} × {PreActionCondition, PostActionHook}` per action plus `feeReceiver` and `feeCalculator`. Use named-field syntax. + - Slot getters renamed: `AUTHORIZE_CONDITION` → `AUTHORIZE_PRE_ACTION_CONDITION`, `AUTHORIZE_RECORDER` → `AUTHORIZE_POST_ACTION_HOOK`. `FEE_RECIPIENT` → `FEE_RECEIVER`. + - Events renamed to `Executed`: `AuthorizationCreated` → `AuthorizeExecuted`, `ReleaseExecuted` → `CaptureExecuted`, `RefundInEscrowExecuted` → `VoidExecuted`, `RefundPostEscrowExecuted` → `RefundExecuted`. `VoidExecuted` no longer carries `amount`. `FeesDistributed.arbiterAmount` → `operatorAmount`. + - Errors: `ConditionNotMet` → `PreActionConditionNotMet`. + + **Breaking — chains and addresses** + - `x402rChains` reduced to Base mainnet (8453) and Base Sepolia (84532). Canonical addresses now point at the audited `commerce-payments` v1.0.0 deployment of `AuthCaptureEscrow`. + - `usdcTvlLimit` removed from the canonical config and helpers re-export. Marketplace and delivery-protection presets now wire `authorizePreActionCondition: zeroAddress`. + + **Breaking — query scoping** + - SDK `query.*` methods (`getPayerPayments`, `getReceiverPayments`, `getPayment`) auto-scope hook reads to the SDK's configured `operatorAddress`. Direct callers of `@x402r/core/actions/hook/*` must pass `operatorAddress` explicitly to opt in. `getPayerPayment` and `getReceiverPayment` narrow to `Promise`. + + **Partial in-escrow refund migration** + + The old `refundInEscrow(paymentInfo, amount)` has no single-call replacement. Use partial capture + void remainder: + + ```ts + const { capturableAmount } = await client.payment.getAmounts(paymentInfo); + await client.payment.capture( + paymentInfo, + capturableAmount - refundToPayer, + "0x", + ); + await client.payment.voidPayment(paymentInfo); + ``` + +- [#125](https://github.com/BackTrackCo/x402r-sdk/pull/125) [`b7a930f`](https://github.com/BackTrackCo/x402r-sdk/commit/b7a930f1e2ae0f29a7552cdbe43bbecb8bc4c0e3) Thanks [@vraspar](https://github.com/vraspar)! - Add Permit2 payer-side helpers. + + **New** + - `@x402r/core/payment/permit2`: `signPermit2Authorization`, `createPermit2ApprovalTx`, `getPermit2AllowanceReadParams`, and the `PERMIT2_ADDRESS` constant. Returns `{collectorData, tokenCollector}` suitable for `payment.charge` / `payment.authorize`. + - `@x402r/sdk` re-exports the four Permit2 surfaces. + - `@x402r/cli` adds `--asset-transfer-method ` to filter `accepts[]` alongside `--chain`. Invalid value or empty match set errors with a `Malformed402Error` (exit code 2). + +- [#126](https://github.com/BackTrackCo/x402r-sdk/pull/126) [`598f461`](https://github.com/BackTrackCo/x402r-sdk/commit/598f461072837ef8906951b3a539332831bbe090) Thanks [@vraspar](https://github.com/vraspar)! - Add the `PaymentInfo` namespace and `reconstructPaymentInfoWire` to bridge the authCapture wire format to the bigint shape SDK actions accept. + + **New** + - `PaymentInfo` is now both a type and a namespace const in `@x402r/core` (re-exported from `@x402r/sdk`). Use `PaymentInfo.fromWire(wire)` to convert a JSON-form `PaymentInfoWire` to the bigint `PaymentInfo`, and `PaymentInfo.toWire(info)` for the reverse. + - `PaymentInfoWire` type in `@x402r/core` — derived from the contract ABI, stays in sync at compile time when the ABI changes. + - `reconstructPaymentInfoWire(context)` in `@x402r/helpers` — builds the wire JSON form from a verified `SettleResultContext`. + - `@x402r/core` no longer declares `@x402r/evm` as a peer dependency. Consumers using only `@x402r/core` (arbiters, standalone wallet code) no longer need `@x402r/evm` installed. + + **Breaking** + - `@x402r/helpers`: `toPaymentInfo` removed. Use `PaymentInfo.fromWire` from `@x402r/sdk` or `@x402r/core`. Arbiters and standalone workers can now drop the `@x402r/helpers` dependency entirely. + - `@x402r/helpers`: `reconstructPaymentInfoStruct` renamed to `reconstructPaymentInfoWire`. Return type renamed from `PaymentInfoStruct` to `PaymentInfoWire`. + - `@x402r/helpers`: `forwardToArbiter` POST body field renamed from `paymentInfoStruct` to `paymentInfoWire`. Arbiters should consume `req.body.paymentInfoWire` and run it through `PaymentInfo.fromWire`. diff --git a/packages/core/package.json b/packages/core/package.json index e8683c0..ff28fca 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@x402r/core", - "version": "0.2.0", + "version": "0.3.0-alpha.0", "type": "module", "license": "Apache-2.0", "repository": { diff --git a/packages/helpers/CHANGELOG.md b/packages/helpers/CHANGELOG.md new file mode 100644 index 0000000..52770a2 --- /dev/null +++ b/packages/helpers/CHANGELOG.md @@ -0,0 +1,75 @@ +# @x402r/helpers + +## 0.3.0-alpha.0 + +### Minor Changes + +- [#123](https://github.com/BackTrackCo/x402r-sdk/pull/123) [`fc56fae`](https://github.com/BackTrackCo/x402r-sdk/commit/fc56fae28610123ff0684255d42b46a381fa1a33) Thanks [@vraspar](https://github.com/vraspar)! - authCapture wire format glue and autoCapture builder. + + **Breaking** + - `@x402r/helpers` `forwardToArbiter` skips settlements whose scheme is not `'authCapture'` (was `'commerce'`). + - `@x402r/helpers` and `@x402r/cli` widen `@x402r/evm` to `>=0.2.0-alpha.0 <0.3.0`. + - `@x402r/cli` switches from `registerCommerceEvmScheme` to `registerAuthCaptureEvmScheme`. + + **New** + - `x402rDefaults(input) → AuthCaptureExtra` from `@x402r/helpers` — only `captureAuthorizer` is required. + - Wire-format types re-exported from `@x402r/helpers`: `AuthCaptureExtra`, `AuthCapturePayload`, `Eip3009Payload`, `Permit2Payload`, `PaymentInfoStruct`, plus payload type guards. + +- [#122](https://github.com/BackTrackCo/x402r-sdk/pull/122) [`cc02695`](https://github.com/BackTrackCo/x402r-sdk/commit/cc02695d37e5654aed3e76cc7114311332603d40) Thanks [@vraspar](https://github.com/vraspar)! - Lift the SDK to the authCapture contract surface. + + **Breaking — operator methods** + - `release()` → `capture()` (SDK + on-chain). + - `refundInEscrow(paymentInfo, amount, data)` → `voidPayment(paymentInfo, data?)`. `void` is full-only and drops the `amount` argument; use partial capture + void remainder for the old partial-refund flow. + - `refundPostEscrow()` → `refund()`. Allowance helpers renamed: `approvePostEscrowRefund` → `approveRefundAllowance`, `getPostEscrowRefundAllowance` → `getRefundAllowance`. + - `OperatorConfig.feeRecipient` → `feeReceiver`. `OperatorSlots` fields renamed to `authorizeHook`, `captureCondition`, `feeReceiver`, etc. + + **Breaking — plugin terminology** + - `recorder` / `Recorder` → `hook` / `Hook` across ABIs, factories, types, exports, and addresses. + - `actions/recorder/` → `actions/hook/`. `getRecorderPaymentInfo` → `getHookPaymentInfo`. `getPayerPaymentsFromRecorder` → `getPayerPaymentsFromHook`. `getReceiverPaymentsFromRecorder` → `getReceiverPaymentsFromHook`. + - `recorderCombinator*` → `hookCombinator*`. `paymentIndexRecorder` → `paymentIndexRecorderHook`. `authorizationTimeRecorder` → `authorizationTimeRecorderHook`. + - `X402rChainConfig.recorders` → `hooks`. `RecorderSingletonAddresses` → `HookSingletonAddresses`. `getRecorderSingletons` → `getHookSingletons`. `iRecorderAbi` → `iHookAbi`. + + **Breaking — types, slots, events, errors** + - `ConditionConfig` (constructor plugin-config arg) → `PluginConfig`. Shape is now `{authorize, charge, capture, void, refund} × {PreActionCondition, PostActionHook}` per action plus `feeReceiver` and `feeCalculator`. Use named-field syntax. + - Slot getters renamed: `AUTHORIZE_CONDITION` → `AUTHORIZE_PRE_ACTION_CONDITION`, `AUTHORIZE_RECORDER` → `AUTHORIZE_POST_ACTION_HOOK`. `FEE_RECIPIENT` → `FEE_RECEIVER`. + - Events renamed to `Executed`: `AuthorizationCreated` → `AuthorizeExecuted`, `ReleaseExecuted` → `CaptureExecuted`, `RefundInEscrowExecuted` → `VoidExecuted`, `RefundPostEscrowExecuted` → `RefundExecuted`. `VoidExecuted` no longer carries `amount`. `FeesDistributed.arbiterAmount` → `operatorAmount`. + - Errors: `ConditionNotMet` → `PreActionConditionNotMet`. + + **Breaking — chains and addresses** + - `x402rChains` reduced to Base mainnet (8453) and Base Sepolia (84532). Canonical addresses now point at the audited `commerce-payments` v1.0.0 deployment of `AuthCaptureEscrow`. + - `usdcTvlLimit` removed from the canonical config and helpers re-export. Marketplace and delivery-protection presets now wire `authorizePreActionCondition: zeroAddress`. + + **Breaking — query scoping** + - SDK `query.*` methods (`getPayerPayments`, `getReceiverPayments`, `getPayment`) auto-scope hook reads to the SDK's configured `operatorAddress`. Direct callers of `@x402r/core/actions/hook/*` must pass `operatorAddress` explicitly to opt in. `getPayerPayment` and `getReceiverPayment` narrow to `Promise`. + + **Partial in-escrow refund migration** + + The old `refundInEscrow(paymentInfo, amount)` has no single-call replacement. Use partial capture + void remainder: + + ```ts + const { capturableAmount } = await client.payment.getAmounts(paymentInfo); + await client.payment.capture( + paymentInfo, + capturableAmount - refundToPayer, + "0x", + ); + await client.payment.voidPayment(paymentInfo); + ``` + +- [#126](https://github.com/BackTrackCo/x402r-sdk/pull/126) [`598f461`](https://github.com/BackTrackCo/x402r-sdk/commit/598f461072837ef8906951b3a539332831bbe090) Thanks [@vraspar](https://github.com/vraspar)! - Add the `PaymentInfo` namespace and `reconstructPaymentInfoWire` to bridge the authCapture wire format to the bigint shape SDK actions accept. + + **New** + - `PaymentInfo` is now both a type and a namespace const in `@x402r/core` (re-exported from `@x402r/sdk`). Use `PaymentInfo.fromWire(wire)` to convert a JSON-form `PaymentInfoWire` to the bigint `PaymentInfo`, and `PaymentInfo.toWire(info)` for the reverse. + - `PaymentInfoWire` type in `@x402r/core` — derived from the contract ABI, stays in sync at compile time when the ABI changes. + - `reconstructPaymentInfoWire(context)` in `@x402r/helpers` — builds the wire JSON form from a verified `SettleResultContext`. + - `@x402r/core` no longer declares `@x402r/evm` as a peer dependency. Consumers using only `@x402r/core` (arbiters, standalone wallet code) no longer need `@x402r/evm` installed. + + **Breaking** + - `@x402r/helpers`: `toPaymentInfo` removed. Use `PaymentInfo.fromWire` from `@x402r/sdk` or `@x402r/core`. Arbiters and standalone workers can now drop the `@x402r/helpers` dependency entirely. + - `@x402r/helpers`: `reconstructPaymentInfoStruct` renamed to `reconstructPaymentInfoWire`. Return type renamed from `PaymentInfoStruct` to `PaymentInfoWire`. + - `@x402r/helpers`: `forwardToArbiter` POST body field renamed from `paymentInfoStruct` to `paymentInfoWire`. Arbiters should consume `req.body.paymentInfoWire` and run it through `PaymentInfo.fromWire`. + +### Patch Changes + +- Updated dependencies [[`fc56fae`](https://github.com/BackTrackCo/x402r-sdk/commit/fc56fae28610123ff0684255d42b46a381fa1a33), [`cc02695`](https://github.com/BackTrackCo/x402r-sdk/commit/cc02695d37e5654aed3e76cc7114311332603d40), [`b7a930f`](https://github.com/BackTrackCo/x402r-sdk/commit/b7a930f1e2ae0f29a7552cdbe43bbecb8bc4c0e3), [`598f461`](https://github.com/BackTrackCo/x402r-sdk/commit/598f461072837ef8906951b3a539332831bbe090)]: + - @x402r/core@0.3.0-alpha.0 diff --git a/packages/helpers/package.json b/packages/helpers/package.json index d6d7fa4..bcf8fd1 100644 --- a/packages/helpers/package.json +++ b/packages/helpers/package.json @@ -1,6 +1,6 @@ { "name": "@x402r/helpers", - "version": "0.2.1", + "version": "0.3.0-alpha.0", "type": "module", "license": "Apache-2.0", "repository": { diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md new file mode 100644 index 0000000..f4886c7 --- /dev/null +++ b/packages/sdk/CHANGELOG.md @@ -0,0 +1,58 @@ +# @x402r/sdk + +## 0.3.0-alpha.0 + +### Minor Changes + +- [#122](https://github.com/BackTrackCo/x402r-sdk/pull/122) [`cc02695`](https://github.com/BackTrackCo/x402r-sdk/commit/cc02695d37e5654aed3e76cc7114311332603d40) Thanks [@vraspar](https://github.com/vraspar)! - Lift the SDK to the authCapture contract surface. + + **Breaking — operator methods** + - `release()` → `capture()` (SDK + on-chain). + - `refundInEscrow(paymentInfo, amount, data)` → `voidPayment(paymentInfo, data?)`. `void` is full-only and drops the `amount` argument; use partial capture + void remainder for the old partial-refund flow. + - `refundPostEscrow()` → `refund()`. Allowance helpers renamed: `approvePostEscrowRefund` → `approveRefundAllowance`, `getPostEscrowRefundAllowance` → `getRefundAllowance`. + - `OperatorConfig.feeRecipient` → `feeReceiver`. `OperatorSlots` fields renamed to `authorizeHook`, `captureCondition`, `feeReceiver`, etc. + + **Breaking — plugin terminology** + - `recorder` / `Recorder` → `hook` / `Hook` across ABIs, factories, types, exports, and addresses. + - `actions/recorder/` → `actions/hook/`. `getRecorderPaymentInfo` → `getHookPaymentInfo`. `getPayerPaymentsFromRecorder` → `getPayerPaymentsFromHook`. `getReceiverPaymentsFromRecorder` → `getReceiverPaymentsFromHook`. + - `recorderCombinator*` → `hookCombinator*`. `paymentIndexRecorder` → `paymentIndexRecorderHook`. `authorizationTimeRecorder` → `authorizationTimeRecorderHook`. + - `X402rChainConfig.recorders` → `hooks`. `RecorderSingletonAddresses` → `HookSingletonAddresses`. `getRecorderSingletons` → `getHookSingletons`. `iRecorderAbi` → `iHookAbi`. + + **Breaking — types, slots, events, errors** + - `ConditionConfig` (constructor plugin-config arg) → `PluginConfig`. Shape is now `{authorize, charge, capture, void, refund} × {PreActionCondition, PostActionHook}` per action plus `feeReceiver` and `feeCalculator`. Use named-field syntax. + - Slot getters renamed: `AUTHORIZE_CONDITION` → `AUTHORIZE_PRE_ACTION_CONDITION`, `AUTHORIZE_RECORDER` → `AUTHORIZE_POST_ACTION_HOOK`. `FEE_RECIPIENT` → `FEE_RECEIVER`. + - Events renamed to `Executed`: `AuthorizationCreated` → `AuthorizeExecuted`, `ReleaseExecuted` → `CaptureExecuted`, `RefundInEscrowExecuted` → `VoidExecuted`, `RefundPostEscrowExecuted` → `RefundExecuted`. `VoidExecuted` no longer carries `amount`. `FeesDistributed.arbiterAmount` → `operatorAmount`. + - Errors: `ConditionNotMet` → `PreActionConditionNotMet`. + + **Breaking — chains and addresses** + - `x402rChains` reduced to Base mainnet (8453) and Base Sepolia (84532). Canonical addresses now point at the audited `commerce-payments` v1.0.0 deployment of `AuthCaptureEscrow`. + - `usdcTvlLimit` removed from the canonical config and helpers re-export. Marketplace and delivery-protection presets now wire `authorizePreActionCondition: zeroAddress`. + + **Breaking — query scoping** + - SDK `query.*` methods (`getPayerPayments`, `getReceiverPayments`, `getPayment`) auto-scope hook reads to the SDK's configured `operatorAddress`. Direct callers of `@x402r/core/actions/hook/*` must pass `operatorAddress` explicitly to opt in. `getPayerPayment` and `getReceiverPayment` narrow to `Promise`. + + **Partial in-escrow refund migration** + + The old `refundInEscrow(paymentInfo, amount)` has no single-call replacement. Use partial capture + void remainder: + + ```ts + const { capturableAmount } = await client.payment.getAmounts(paymentInfo); + await client.payment.capture( + paymentInfo, + capturableAmount - refundToPayer, + "0x", + ); + await client.payment.voidPayment(paymentInfo); + ``` + +- [#125](https://github.com/BackTrackCo/x402r-sdk/pull/125) [`b7a930f`](https://github.com/BackTrackCo/x402r-sdk/commit/b7a930f1e2ae0f29a7552cdbe43bbecb8bc4c0e3) Thanks [@vraspar](https://github.com/vraspar)! - Add Permit2 payer-side helpers. + + **New** + - `@x402r/core/payment/permit2`: `signPermit2Authorization`, `createPermit2ApprovalTx`, `getPermit2AllowanceReadParams`, and the `PERMIT2_ADDRESS` constant. Returns `{collectorData, tokenCollector}` suitable for `payment.charge` / `payment.authorize`. + - `@x402r/sdk` re-exports the four Permit2 surfaces. + - `@x402r/cli` adds `--asset-transfer-method ` to filter `accepts[]` alongside `--chain`. Invalid value or empty match set errors with a `Malformed402Error` (exit code 2). + +### Patch Changes + +- Updated dependencies [[`fc56fae`](https://github.com/BackTrackCo/x402r-sdk/commit/fc56fae28610123ff0684255d42b46a381fa1a33), [`cc02695`](https://github.com/BackTrackCo/x402r-sdk/commit/cc02695d37e5654aed3e76cc7114311332603d40), [`b7a930f`](https://github.com/BackTrackCo/x402r-sdk/commit/b7a930f1e2ae0f29a7552cdbe43bbecb8bc4c0e3), [`598f461`](https://github.com/BackTrackCo/x402r-sdk/commit/598f461072837ef8906951b3a539332831bbe090)]: + - @x402r/core@0.3.0-alpha.0 diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 64257b2..0e7850b 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@x402r/sdk", - "version": "0.2.1", + "version": "0.3.0-alpha.0", "type": "module", "license": "Apache-2.0", "repository": {