@devlab.group/agent-commerce 2.0.0 → 2.1.0
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/README.md +104 -53
- package/dist/ap2.d.ts +2 -2
- package/dist/ap2.js +4 -3
- package/dist/ap2.js.map +1 -1
- package/dist/{authorization-BpbWGGrf.d.ts → authorization-CMkIuAkO.d.ts} +1 -1
- package/dist/chunk-2CJNA7MS.js +8 -0
- package/dist/chunk-2CJNA7MS.js.map +1 -0
- package/dist/{chunk-CKJRITWY.js → chunk-5ZYXBCDX.js} +3 -3
- package/dist/{chunk-CKJRITWY.js.map → chunk-5ZYXBCDX.js.map} +1 -1
- package/dist/{chunk-3LUJHVKX.js → chunk-6Z2H53CG.js} +5 -4
- package/dist/chunk-6Z2H53CG.js.map +1 -0
- package/dist/{chunk-HOZA3IWP.js → chunk-ES3V6ECS.js} +16 -6
- package/dist/chunk-ES3V6ECS.js.map +1 -0
- package/dist/chunk-IFGRCXME.js +581 -0
- package/dist/chunk-IFGRCXME.js.map +1 -0
- package/dist/chunk-KA2AX5FH.js +44 -0
- package/dist/chunk-KA2AX5FH.js.map +1 -0
- package/dist/{chunk-SYEGCNJZ.js → chunk-LZS5BL3W.js} +3 -3
- package/dist/{chunk-SYEGCNJZ.js.map → chunk-LZS5BL3W.js.map} +1 -1
- package/dist/{chunk-53WXXIPR.js → chunk-SY6GUYSQ.js} +6 -10
- package/dist/chunk-SY6GUYSQ.js.map +1 -0
- package/dist/chunk-UHMYRV3J.js +1396 -0
- package/dist/chunk-UHMYRV3J.js.map +1 -0
- package/dist/cli/index.js +3119 -2212
- package/dist/cli/index.js.map +1 -1
- package/dist/{constants-BSBRlKRR.d.ts → constants-nackLItD.d.ts} +2 -1
- package/dist/index.d.ts +59 -40
- package/dist/index.js +2602 -2208
- package/dist/index.js.map +1 -1
- package/dist/mcp.d.ts +3 -3
- package/dist/mcp.js +10 -5
- package/dist/mcp.js.map +1 -1
- package/dist/mpp.d.ts +12 -5
- package/dist/mpp.js +69 -65
- package/dist/mpp.js.map +1 -1
- package/dist/near-D6C42VPE.js +58 -0
- package/dist/near-D6C42VPE.js.map +1 -0
- package/dist/networks-olfflCI_.d.ts +38 -0
- package/dist/{protocol-adapter-DonxfAwa.d.ts → protocol-adapter-CfxU8Z2T.d.ts} +2 -2
- package/dist/{runtime-CiYbgGpi.d.ts → runtime-7vLNYvmU.d.ts} +25 -3
- package/dist/svm-QEUAUNPQ.js +33 -0
- package/dist/svm-QEUAUNPQ.js.map +1 -0
- package/dist/x402.d.ts +71 -64
- package/dist/x402.js +13 -4
- package/dist/x402.js.map +1 -1
- package/package.json +21 -1
- package/dist/chunk-3LUJHVKX.js.map +0 -1
- package/dist/chunk-53WXXIPR.js.map +0 -1
- package/dist/chunk-HOZA3IWP.js.map +0 -1
- package/dist/chunk-RKBGCPCK.js +0 -733
- package/dist/chunk-RKBGCPCK.js.map +0 -1
- package/dist/chunk-TWRUNWDR.js +0 -265
- package/dist/chunk-TWRUNWDR.js.map +0 -1
- package/dist/{payment-flow-DCS882tR.d.ts → guardrails-CX_jYXvZ.d.ts} +8 -8
package/README.md
CHANGED
|
@@ -98,17 +98,20 @@ const { url } = await gateway.listen();
|
|
|
98
98
|
Components with extra dependencies use separate subpaths, so a gateway serving
|
|
99
99
|
free HTTP resources does not install MCP, EVM, JOSE or SD-JWT packages.
|
|
100
100
|
|
|
101
|
-
| You want | Install
|
|
102
|
-
| --------------------------------------- |
|
|
103
|
-
| gateway, config, receipts, A2A/ACP, CLI | `@devlab.group/agent-commerce`
|
|
104
|
-
| expose resources as MCP tools | `+ @modelcontextprotocol/server`
|
|
105
|
-
| accept x402 payments | `+ @x402/core @x402/evm viem`
|
|
106
|
-
| accept
|
|
107
|
-
|
|
|
108
|
-
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
101
|
+
| You want | Install | Import |
|
|
102
|
+
| --------------------------------------- | ------------------------------------ | ------------------------------------------ |
|
|
103
|
+
| gateway, config, receipts, A2A/ACP, CLI | `@devlab.group/agent-commerce` | `from '@devlab.group/agent-commerce'` |
|
|
104
|
+
| expose resources as MCP tools | `+ @modelcontextprotocol/server` | `from '@devlab.group/agent-commerce/mcp'` |
|
|
105
|
+
| accept x402 payments | `+ @x402/core @x402/evm viem` | `from '@devlab.group/agent-commerce/x402'` |
|
|
106
|
+
| accept x402 on Solana | x402 peers `+ @x402/svm @solana/kit` | (no import - loaded for a Solana offer) |
|
|
107
|
+
| accept x402 on NEAR | x402 peers `+ @x402/near` | (no import - loaded for a NEAR offer) |
|
|
108
|
+
| accept MPP payments | `+ mppx viem @x402/core @x402/evm` | `from '@devlab.group/agent-commerce/mpp'` |
|
|
109
|
+
| verify AP2 mandates, sign checkout JWTs | `+ jose @sd-jwt/core canonicalize` | `from '@devlab.group/agent-commerce/ap2'` |
|
|
110
|
+
| authenticate to a CDP facilitator | `+ @coinbase/x402` | (no import - loaded on demand) |
|
|
111
|
+
|
|
112
|
+
The x402 entry needs `@x402/core`, `@x402/evm` and `viem` even when every
|
|
113
|
+
offer is on Solana or NEAR. MPP settles through an x402 facilitator, so its
|
|
114
|
+
entry also needs the x402 peers.
|
|
112
115
|
|
|
113
116
|
```bash
|
|
114
117
|
npm install @devlab.group/agent-commerce @modelcontextprotocol/server @x402/core @x402/evm viem
|
|
@@ -160,6 +163,21 @@ gateway and a dashboard.
|
|
|
160
163
|
|
|
161
164
|
To stop and wipe state: `docker compose down -v`.
|
|
162
165
|
|
|
166
|
+
### `agent-commerce demo`
|
|
167
|
+
|
|
168
|
+
From a repository clone, one command starts the stack and runs the buyer agent:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
npm run agent-commerce -- demo
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
It starts the stack with `docker compose up --build --detach --wait`, which
|
|
175
|
+
returns once every service with a health check is healthy, then runs
|
|
176
|
+
`npm run demo:agent`. A failing step stops the run with exit code 1, after
|
|
177
|
+
printing the end of its error output and the command to rerun it by hand.
|
|
178
|
+
`demo` does not run `doctor`. The Linux note above applies, and the stack
|
|
179
|
+
keeps running in the background until `docker compose down -v`.
|
|
180
|
+
|
|
163
181
|
## How it works
|
|
164
182
|
|
|
165
183
|
```text
|
|
@@ -231,25 +249,25 @@ See [docs/configuration.md](docs/configuration.md).
|
|
|
231
249
|
|
|
232
250
|
## Protocol support
|
|
233
251
|
|
|
234
|
-
| Protocol | Status | Pinned revision
|
|
235
|
-
| -------- | ------------ |
|
|
236
|
-
| **HTTP** | Supported | native routes
|
|
237
|
-
| **MCP** | Supported | `2026-07-28` and `2025-11-25`, `@modelcontextprotocol/server@2.3.0`
|
|
238
|
-
| **x402** | Supported | x402 v2 (`@x402/core`, `@x402/evm`), scheme `exact`, EVM
|
|
239
|
-
| **MPP** | Experimental | `mppx@0.13.1`, `charge` + `evm` + EIP-3009, USDC on Base Sepolia and Base
|
|
240
|
-
| **A2A** | Experimental | A2A v1.0.1, binding `JSONRPC`, method `SendMessage`, x402 extension
|
|
241
|
-
| **ACP** | Experimental | ACP `2026-04-17`, REST checkout + discovery
|
|
242
|
-
| **AP2** | Experimental | AP2 `v0.2.0`, Direct Checkout Mandate verification
|
|
243
|
-
| UCP | Planned | no implementation
|
|
244
|
-
|
|
245
|
-
[AP2](docs/ap2.md) is an authorization method, not a transport. It verifies a
|
|
252
|
+
| Protocol | Status | Pinned revision |
|
|
253
|
+
| -------- | ------------ | ------------------------------------------------------------------------------------------------------------ |
|
|
254
|
+
| **HTTP** | Supported | native routes |
|
|
255
|
+
| **MCP** | Supported | `2026-07-28` and `2025-11-25`, `@modelcontextprotocol/server@2.3.0` |
|
|
256
|
+
| **x402** | Supported | x402 v2 (`@x402/core`, `@x402/evm`, `@x402/svm`, `@x402/near`), scheme `exact`, EVM and Solana; NEAR partial |
|
|
257
|
+
| **MPP** | Experimental | `mppx@0.13.1`, `charge` + `evm` + EIP-3009, USDC on Base Sepolia and Base |
|
|
258
|
+
| **A2A** | Experimental | A2A v1.0.1, binding `JSONRPC`, method `SendMessage`, x402 extension |
|
|
259
|
+
| **ACP** | Experimental | ACP `2026-04-17`, REST checkout + discovery |
|
|
260
|
+
| **AP2** | Experimental | AP2 `v0.2.0`, Direct Checkout Mandate verification |
|
|
261
|
+
| UCP | Planned | no implementation |
|
|
262
|
+
|
|
263
|
+
[AP2](docs/protocols/ap2.md) is an authorization method, not a transport. It verifies a
|
|
246
264
|
mandate before a paid resource settles; the gateway does not issue the mandate
|
|
247
265
|
or its Checkout Receipt.
|
|
248
266
|
|
|
249
267
|
The experimental entries above ship off by default with documented subsets:
|
|
250
|
-
[A2A](docs/protocols.md
|
|
251
|
-
[AP2](docs/ap2.md#not-implemented) and [MPP](docs/protocols.md
|
|
252
|
-
[MCP](docs/protocols.md
|
|
268
|
+
[A2A](docs/protocols/a2a.md), [ACP](docs/protocols/acp.md),
|
|
269
|
+
[AP2](docs/protocols/ap2.md#not-implemented) and [MPP](docs/protocols/mpp.md). Supported
|
|
270
|
+
[MCP](docs/protocols/mcp.md) and [x402](docs/protocols/x402.md) are also scoped.
|
|
253
271
|
ACP exposes only its five checkout operations; merchant `payment_data` is never
|
|
254
272
|
converted into a gateway payment proof.
|
|
255
273
|
|
|
@@ -257,6 +275,15 @@ converted into a gateway payment proof.
|
|
|
257
275
|
`unsupported` for registered adapters and providers. `agent-commerce doctor`
|
|
258
276
|
prints the `unsupported` lists for A2A, ACP and AP2 when they are enabled.
|
|
259
277
|
|
|
278
|
+
### Versioning
|
|
279
|
+
|
|
280
|
+
Minor releases may break experimental configurations, integrations or types.
|
|
281
|
+
This applies to MPP, A2A, ACP, AP2 and `agent-commerce import openapi`.
|
|
282
|
+
Runtime adapters and providers report `status: experimental` in
|
|
283
|
+
`GET /.well-known/agent-commerce`. Pin an exact version and test upgrades
|
|
284
|
+
before deploying them. 2.1 also changes some supported x402 behavior and
|
|
285
|
+
types; see [Upgrading from 2.0](docs/migration-2.1.md).
|
|
286
|
+
|
|
260
287
|
## Payment model
|
|
261
288
|
|
|
262
289
|
- **Non-custodial.** Buyer payments go directly to the merchant address in
|
|
@@ -264,9 +291,9 @@ prints the `unsupported` lists for A2A, ACP and AP2 when they are enabled.
|
|
|
264
291
|
private keys. Local facilitator mode does hold a separate gas-paying signer.
|
|
265
292
|
- **Fail closed.** Missing, malformed, expired, replayed, wrong-amount,
|
|
266
293
|
wrong-recipient, wrong-network and wrong-asset payments are rejected.
|
|
267
|
-
- **Replay-safe twice over.** EIP-3009 stops a double
|
|
268
|
-
gateway additionally reserves a `replayKey` derived from
|
|
269
|
-
before it settles anything.
|
|
294
|
+
- **Replay-safe twice over.** The EIP-3009 or Permit2 nonce stops a double
|
|
295
|
+
spend on-chain; the gateway additionally reserves a `replayKey` derived from
|
|
296
|
+
the authorization before it settles anything.
|
|
270
297
|
- **On-chain settlement in CI.** The end-to-end test asserts the buyer's balance
|
|
271
298
|
falls and the merchant's rises by exactly the price, with a real transaction
|
|
272
299
|
hash in the receipt. A log line saying "payment successful" would not count.
|
|
@@ -288,21 +315,30 @@ Choose the network in config; Base mainnet also requires `allowMainnet: true`.
|
|
|
288
315
|
These transactions each moved 0.01 USDC from a buyer to a merchant through a
|
|
289
316
|
remote facilitator:
|
|
290
317
|
|
|
291
|
-
| Rail | Network
|
|
292
|
-
| ---- |
|
|
293
|
-
| x402 | Base Sepolia | [`0xea41b234c4…`](https://sepolia.basescan.org/tx/0xea41b234c4645a4d335589ec9753646aa7cccd1b97e9e15823b88bff7b54a247)
|
|
294
|
-
| x402 | Base
|
|
295
|
-
|
|
|
296
|
-
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
318
|
+
| Rail | Network | Method | Transaction |
|
|
319
|
+
| ---- | ------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
320
|
+
| x402 | Base Sepolia | EIP-3009 | [`0xea41b234c4…`](https://sepolia.basescan.org/tx/0xea41b234c4645a4d335589ec9753646aa7cccd1b97e9e15823b88bff7b54a247) |
|
|
321
|
+
| x402 | Base Sepolia | Permit2 | [`0xa66f56cf39…`](https://sepolia.basescan.org/tx/0xa66f56cf39daeae958b5067c99383da4974c2ae6450786c0f9088700fa6439fe) |
|
|
322
|
+
| x402 | Base | EIP-3009 | [`0x57ec81c2a3…`](https://basescan.org/tx/0x57ec81c2a360d14d59a43cf4e24be09a6bd75cbe6185016372895bda73e42763) |
|
|
323
|
+
| x402 | Base | Permit2 | [`0x79d3da1145…`](https://basescan.org/tx/0x79d3da114522d4b056b29fad34d6492ce5662b92efd8ef2fd1ac21295ab71a42) |
|
|
324
|
+
| x402 | Solana Devnet | SPL transfer | [`5289xbeyHJ…`](https://explorer.solana.com/tx/5289xbeyHJPX1vX9DsLwGGJaGJJCH45qUtArhoTyxdgmWbXqZSjVPuJ3jyyLG4VrT9mFTCkLKhcoNfb1tuJ5qheb?cluster=devnet) |
|
|
325
|
+
| x402 | Solana | SPL transfer | [`E7gAuG8pMA…`](https://explorer.solana.com/tx/E7gAuG8pMArQjgRvGCwqm6S4qpt4xFNuhUTxeaZ5M1M1z1VA8eybyJJAXyo9paecCKnyrxYEuppoAemhntnnzTa) |
|
|
326
|
+
| x402 | NEAR Testnet | NEP-141 transfer | [`5tdtGLv4TB…`](https://testnet.nearblocks.io/txns/5tdtGLv4TBifK7c12hEdRuvxvNNrWjcWDH4e1ApUcE1W) |
|
|
327
|
+
| x402 | NEAR | NEP-141 transfer | [`7hU3imHepV…`](https://nearblocks.io/txns/7hU3imHepVZazGv53QfWYMGnWX5sVFxJAepemmwVSzt2) |
|
|
328
|
+
| MPP | Base Sepolia | EIP-3009 | [`0x5d9fcd111b…`](https://sepolia.basescan.org/tx/0x5d9fcd111b615bb8fc9e56d55096f119fc81c3c72c334f813cfaecee402d0ac3) |
|
|
329
|
+
| MPP | Base | EIP-3009 | [`0xf4255bd7ec…`](https://basescan.org/tx/0xf4255bd7ec46ed06505dedfb5f9537924bd2633816e7952ec6f2b468395b1087) |
|
|
330
|
+
|
|
331
|
+
Facilitators broadcast these payments and paid their ETH, SOL or NEAR fees.
|
|
332
|
+
Permit2 requires an initial, gas-paying token approval from the buyer. The
|
|
333
|
+
NEAR runs used the suite's SDK facilitator and relayer; support remains
|
|
334
|
+
partial pending hosted-facilitator settlement. Buyer and merchant keys stayed
|
|
335
|
+
outside the gateway. The smoke suites verified settlement on-chain.
|
|
302
336
|
|
|
303
337
|
Reproduce with `npm run test:testnet`, which spends test USDC, or
|
|
304
338
|
`npm run test:mainnet`, which spends real USDC. Both run only by hand; see
|
|
305
|
-
[Base mainnet](#base-mainnet).
|
|
339
|
+
[Base mainnet](#base-mainnet) and [smoke tests](docs/smoke-tests.md). The
|
|
340
|
+
suites also cover NEAR testnet and mainnet (settled) and Arbitrum Sepolia (not
|
|
341
|
+
yet run).
|
|
306
342
|
|
|
307
343
|
### The facilitator model
|
|
308
344
|
|
|
@@ -348,10 +384,9 @@ from [faucet.circle.com](https://faucet.circle.com); the buyer needs no ETH.
|
|
|
348
384
|
`npm run test:testnet` drives the whole flow and reads the result back off the
|
|
349
385
|
chain.
|
|
350
386
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
together, and reported by `doctor`, `health()` and `/.well-known`.
|
|
387
|
+
The local dev chain is `eip155:31337`, Anvil's default chain id, so the network
|
|
388
|
+
says whether a deployment is local, testnet or mainnet. `doctor`, `health()`
|
|
389
|
+
and `/.well-known` report it.
|
|
355
390
|
|
|
356
391
|
### Base mainnet
|
|
357
392
|
|
|
@@ -390,7 +425,7 @@ PASS Protocols http=on mcp=on (/mcp) a2a=off acp=off
|
|
|
390
425
|
INFO A2A disabled
|
|
391
426
|
INFO ACP disabled
|
|
392
427
|
INFO AP2 disabled
|
|
393
|
-
PASS Payments x402 v2 (scheme=exact) enabled - LOCAL dev chain (eip155:
|
|
428
|
+
PASS Payments x402 v2 (scheme=exact) enabled - LOCAL dev chain (eip155:31337), destination=0x7099…79C8, facilitator=local (in-process), paymentFlow=authorization
|
|
394
429
|
INFO Payments (MPP) MPP not configured
|
|
395
430
|
PASS Storage sqlite schema v2 writable; receipts=2
|
|
396
431
|
PASS Protocol versions reported by gateway /.well-known/agent-commerce
|
|
@@ -398,11 +433,24 @@ PASS Protocol versions reported by gateway /.well-known/agent-commerce
|
|
|
398
433
|
Score: 7/7 checks passed
|
|
399
434
|
```
|
|
400
435
|
|
|
401
|
-
`doctor`
|
|
402
|
-
|
|
436
|
+
`doctor` compares live settlement terms with local config for each rail and
|
|
437
|
+
resource: offer order, network, token, payee and transfer method, plus decimals
|
|
438
|
+
and payment flows when published. Mismatches fail the check. It also names
|
|
439
|
+
failing offers when health is published; reasons appear in gateway debug logs.
|
|
403
440
|
|
|
404
441
|
Exits non-zero if anything fails. `--json` for machines.
|
|
405
442
|
|
|
443
|
+
### `agent-commerce version`
|
|
444
|
+
|
|
445
|
+
```bash
|
|
446
|
+
npm run agent-commerce -- version
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
Prints the CLI version and, for each protocol SDK and runtime library, the
|
|
450
|
+
version the package declares and the area that uses it. These are the pins in
|
|
451
|
+
`package.json`, optional peers included, not the versions installed in
|
|
452
|
+
`node_modules`. `agent-commerce --version` prints the CLI version alone.
|
|
453
|
+
|
|
406
454
|
## Exposure and access
|
|
407
455
|
|
|
408
456
|
The demo binds everything to `127.0.0.1`. Before putting the gateway anywhere
|
|
@@ -434,10 +482,11 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
|
434
482
|
|
|
435
483
|
## Roadmap
|
|
436
484
|
|
|
437
|
-
**Now** - MCP, x402 v2, settlement on the local chain, Base Sepolia
|
|
438
|
-
mainnet, receipts, doctor, deterministic
|
|
439
|
-
`2026-04-17` checkout adapters,
|
|
440
|
-
experimental
|
|
485
|
+
**Now** - MCP, x402 v2, settlement on the local chain, Base Sepolia, Base
|
|
486
|
+
mainnet, Solana devnet and Solana mainnet, receipts, doctor, deterministic
|
|
487
|
+
demo, experimental A2A v1.0.1 and ACP `2026-04-17` checkout adapters,
|
|
488
|
+
experimental AP2 v0.2.0 mandate verification, experimental MPP `charge`
|
|
489
|
+
payments, and experimental OpenAPI import.
|
|
441
490
|
|
|
442
491
|
**Next** - a `doctor` GitHub Action · UCP ·
|
|
443
492
|
autonomous-mode AP2 (open mandates, agent key binding, constraint evaluation) ·
|
|
@@ -454,8 +503,10 @@ they are added to a release.
|
|
|
454
503
|
| [Architecture](docs/architecture.md) | how the pieces fit |
|
|
455
504
|
| [Payment flow](docs/payment-flow.md) | the paid round trip and failure paths |
|
|
456
505
|
| [Protocols](docs/protocols.md) | supported and unsupported protocol features |
|
|
457
|
-
| [AP2](docs/ap2.md)
|
|
506
|
+
| [AP2](docs/protocols/ap2.md) | mandate verification and the trust model |
|
|
458
507
|
| [Configuration](docs/configuration.md) | `config.yaml` reference |
|
|
508
|
+
| [Upgrading from 2.0](docs/migration-2.1.md) | changes that can break a 2.0 setup |
|
|
509
|
+
| [Smoke tests](docs/smoke-tests.md) | settling on public networks, by hand |
|
|
459
510
|
| [OpenAPI import](docs/openapi-import.md) | generate resources from an existing API |
|
|
460
511
|
| [Security model](docs/security.md) | trust boundaries, and what we do not defend |
|
|
461
512
|
| [Contracts](docs/contracts.md) | the frozen cross-area contract |
|
package/dist/ap2.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as EnabledAp2Config } from './types-CVw6Sf46.js';
|
|
2
2
|
export { A as AP2_CHECKOUT_MANDATE_VCT, a as AP2_CHECKOUT_PROFILE, b as AP2_DEFAULT_CLOCK_SKEW_SECONDS, c as AP2_MAX_CLOCK_SKEW_SECONDS, d as AP2_SIGNING_ALGORITHM, e as AP2_SPEC_VERSION, f as Ap2AuthorizationConfig, g as Ap2Mode, h as Ap2TrustedIssuer, i as Ap2TrustedKey } from './types-CVw6Sf46.js';
|
|
3
|
-
import { A as AuthorizationProvider } from './authorization-
|
|
4
|
-
import { C as Clock, L as Logger } from './runtime-
|
|
3
|
+
import { A as AuthorizationProvider } from './authorization-CMkIuAkO.js';
|
|
4
|
+
import { C as Clock, L as Logger } from './runtime-7vLNYvmU.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A private ES256 key: either a private JWK (the pair of the public one in the
|
package/dist/ap2.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { AP2_CHECKOUT_MANDATE_VCT, AP2_SIGNING_ALGORITHM, AP2_DIGEST_ALGORITHM, AP2_CHECKOUT_PROFILE, AP2_SPEC_VERSION, AP2_KEY_TYPE, AP2_JWK_CURVE, openSqliteDatabase } from './chunk-
|
|
2
|
-
export { AP2_CHECKOUT_MANDATE_VCT, AP2_CHECKOUT_PROFILE, AP2_DEFAULT_CLOCK_SKEW_SECONDS, AP2_MAX_CLOCK_SKEW_SECONDS, AP2_SIGNING_ALGORITHM, AP2_SPEC_VERSION } from './chunk-
|
|
3
|
-
import { systemClock, NOOP_LOGGER, CommerceError,
|
|
1
|
+
import { AP2_CHECKOUT_MANDATE_VCT, AP2_SIGNING_ALGORITHM, AP2_DIGEST_ALGORITHM, AP2_CHECKOUT_PROFILE, AP2_SPEC_VERSION, AP2_KEY_TYPE, AP2_JWK_CURVE, openSqliteDatabase } from './chunk-LZS5BL3W.js';
|
|
2
|
+
export { AP2_CHECKOUT_MANDATE_VCT, AP2_CHECKOUT_PROFILE, AP2_DEFAULT_CLOCK_SKEW_SECONDS, AP2_MAX_CLOCK_SKEW_SECONDS, AP2_SIGNING_ALGORITHM, AP2_SPEC_VERSION } from './chunk-LZS5BL3W.js';
|
|
3
|
+
import { systemClock, NOOP_LOGGER, CommerceError, PACKAGE_VERSION } from './chunk-SY6GUYSQ.js';
|
|
4
|
+
import { isRecord } from './chunk-2CJNA7MS.js';
|
|
4
5
|
import { SignJWT, importPKCS8, importJWK, jwtVerify, decodeProtectedHeader, decodeJwt } from 'jose';
|
|
5
6
|
import canonicalize from 'canonicalize';
|
|
6
7
|
import { createHash } from 'crypto';
|