Skip to content

Commit fcaffa0

Browse files
author
azeth-sync[bot]
committed
v0.2.9: sync from monorepo 2026-06-02
1 parent e8a0ae3 commit fcaffa0

2 files changed

Lines changed: 26 additions & 17 deletions

File tree

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@azeth/provider",
3-
"version": "0.2.8",
3+
"version": "0.2.9",
44
"type": "module",
55
"description": "x402 service provider tooling for Azeth — gate Hono endpoints behind x402 payments with payment-agreement support",
66
"license": "MIT",
@@ -42,11 +42,11 @@
4242
"typecheck": "tsc --noEmit"
4343
},
4444
"dependencies": {
45-
"@azeth/common": "^0.2.9",
46-
"@x402/core": "^2.4.0",
47-
"@x402/evm": "^2.4.0",
48-
"@x402/extensions": "^2.4.0",
49-
"@x402/hono": "^2.4.0",
45+
"@azeth/common": "^0.2.10",
46+
"@x402/core": "^2.14.0",
47+
"@x402/evm": "^2.14.0",
48+
"@x402/extensions": "^2.14.0",
49+
"@x402/hono": "^2.14.0",
5050
"hono": "^4.7.0",
5151
"viem": "^2.21.0"
5252
},

src/stack.ts

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { registerExactEvmScheme as registerFacilitatorEvm } from '@x402/evm/exac
1919
import { registerExactEvmScheme as registerServerEvm } from '@x402/evm/exact/server';
2020
import { toFacilitatorEvmSigner } from '@x402/evm';
2121
import {
22-
siwxResourceServerExtension,
22+
createSIWxResourceServerExtension,
2323
createSIWxSettleHook,
2424
createSIWxRequestHook,
2525
declareSIWxExtension,
@@ -124,7 +124,15 @@ export function createX402Stack(
124124
registerFacilitatorEvm(facilitator, {
125125
signer,
126126
networks: config.network,
127-
deployERC4337WithEIP6492: true,
127+
// EIP-6492 counterfactual-deploy is restricted to Azeth's OWN account factory.
128+
// x402 V2 replaced the blanket `deployERC4337WithEIP6492: true` (deploy any factory)
129+
// with an explicit allowlist; an empty list denies all factory deployment. Azeth-only
130+
// means only undeployed Azeth smart accounts can be deployed-on-settle — strictly safer
131+
// than V1, and correct for Azeth's own counterfactual accounts (the primary payer here).
132+
// Broaden to a curated multi-factory list only when a non-Azeth payer needs it.
133+
eip6492AllowedFactories: AZETH_CONTRACTS[config.chainName].factory
134+
? [AZETH_CONTRACTS[config.chainName].factory]
135+
: [],
128136
});
129137

130138
// 3. Local facilitator client (no HTTP round-trips)
@@ -134,15 +142,8 @@ export function createX402Stack(
134142
const server = new x402ResourceServer(facilitatorClient);
135143
registerServerEvm(server);
136144

137-
// 5. Register SIWx extension (wallet sessions)
138-
server.registerExtension(siwxResourceServerExtension);
139-
140-
// 6. Register payment-agreement extension if configured
141-
if (config.agreementTerms) {
142-
server.registerExtension(createPaymentAgreementExtension(config.agreementTerms));
143-
}
144-
145-
// 7. Agreement-aware SIWx storage
145+
// 5. Agreement-aware SIWx storage — built before the SIWx extension, which (in V2)
146+
// is a factory that takes the storage instance.
146147
const storageConfig: AzethSIWxStorageConfig = {
147148
publicClient: config.publicClient,
148149
servicePayee: config.payTo,
@@ -158,6 +159,14 @@ export function createX402Stack(
158159
};
159160
const storage = new AzethSIWxStorage(storageConfig);
160161

162+
// 6. Register SIWx extension (wallet sessions) — V2 factory takes the storage instance.
163+
server.registerExtension(createSIWxResourceServerExtension({ storage }));
164+
165+
// 7. Register payment-agreement extension if configured
166+
if (config.agreementTerms) {
167+
server.registerExtension(createPaymentAgreementExtension(config.agreementTerms));
168+
}
169+
161170
// 8. SIWx hooks: session recording + request validation
162171
facilitator.onAfterSettle(createSIWxSettleHook({ storage }));
163172

0 commit comments

Comments
 (0)