mppx 0.8.15 → 0.8.18
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/CHANGELOG.md +91 -0
- package/README.md +15 -0
- package/dist/Challenge.js +61 -39
- package/dist/Constants.d.ts +17 -17
- package/dist/Errors.d.ts +3 -3
- package/dist/Method.d.ts +35 -5
- package/dist/Method.js +7 -22
- package/dist/Store.d.ts +19 -0
- package/dist/Store.js +43 -0
- package/dist/attestation/Client.d.ts +17 -0
- package/dist/attestation/Client.js +28 -0
- package/dist/attestation/Constants.d.ts +15 -0
- package/dist/attestation/Constants.js +15 -0
- package/dist/attestation/Server.d.ts +4 -0
- package/dist/attestation/Server.js +8 -0
- package/dist/attestation/Types.d.ts +76 -0
- package/dist/attestation/Types.js +2 -0
- package/dist/attestation/index.d.ts +6 -0
- package/dist/attestation/index.js +6 -0
- package/dist/attestation/internal/HttpMessageSignature.d.ts +73 -0
- package/dist/attestation/internal/HttpMessageSignature.js +320 -0
- package/dist/attestation/internal/SigningContext.d.ts +4 -0
- package/dist/attestation/internal/SigningContext.js +11 -0
- package/dist/bin.js +3 -3
- package/dist/cli/THIRD-PARTY-LICENSES.txt +328 -0
- package/dist/cli/account.d.ts +14 -14
- package/dist/cli/cli.d.ts +6 -6
- package/dist/cli/cli.js +253 -1504
- package/dist/cli/plugins/index.js +19 -5
- package/dist/cli/plugins/tempo.js +7 -3
- package/dist/cli/sessions/Manager.js +7 -4
- package/dist/cli/sessions/commands.d.ts +4 -4
- package/dist/cli/sessions/request.d.ts +2 -0
- package/dist/cli/sessions/request.js +18 -0
- package/dist/cli/sessions/store.js +28 -14
- package/dist/cli/utils.d.ts +1 -1
- package/dist/cli/validate/index.d.ts +3 -3
- package/dist/client/Mppx.d.ts +3 -0
- package/dist/client/Mppx.js +13 -5
- package/dist/client/Transport.d.ts +3 -5
- package/dist/client/Transport.js +1 -17
- package/dist/client/internal/Fetch.js +2 -6
- package/dist/discovery/Discovery.js +2 -1
- package/dist/discovery/OpenApi.d.ts +3 -5
- package/dist/discovery/OpenApi.js +13 -34
- package/dist/discovery/internal/Metadata.d.ts +20 -0
- package/dist/discovery/internal/Metadata.js +36 -0
- package/dist/evm/Methods.d.ts +11 -11
- package/dist/evm/Types.d.ts +17 -17
- package/dist/evm/client/Charge.d.ts +11 -11
- package/dist/evm/client/Charge.js +8 -0
- package/dist/evm/client/Methods.d.ts +11 -11
- package/dist/evm/server/Charge.d.ts +1 -1
- package/dist/evm/server/Charge.js +2 -0
- package/dist/evm/server/Methods.d.ts +11 -11
- package/dist/internal/HeaderCodec.d.ts +2 -2
- package/dist/internal/types.d.ts +6 -0
- package/dist/proxy/Proxy.d.ts +2 -0
- package/dist/proxy/Proxy.js +117 -9
- package/dist/proxy/Service.d.ts +36 -1
- package/dist/proxy/Service.js +9 -8
- package/dist/proxy/services/anthropic.js +1 -0
- package/dist/proxy/services/openai.js +1 -0
- package/dist/proxy/services/stripe.js +1 -0
- package/dist/server/Mppx.d.ts +75 -13
- package/dist/server/Mppx.js +201 -23
- package/dist/server/core.d.ts +9 -0
- package/dist/server/core.js +9 -0
- package/dist/server/internal/html/config.d.ts +9 -9
- package/dist/server/internal/html/constants.d.ts +17 -17
- package/dist/stripe/Methods.d.ts +10 -10
- package/dist/stripe/client/Charge.d.ts +10 -10
- package/dist/stripe/client/Methods.d.ts +10 -10
- package/dist/stripe/internal/constants.d.ts +1 -1
- package/dist/stripe/internal/constants.js +1 -1
- package/dist/stripe/internal/types.d.ts +1 -0
- package/dist/stripe/server/Charge.d.ts +11 -11
- package/dist/stripe/server/Charge.js +51 -5
- package/dist/stripe/server/Methods.d.ts +137 -48
- package/dist/stripe/server/Methods.js +265 -4
- package/dist/stripe/server/internal/deposit-address.d.ts +13 -0
- package/dist/stripe/server/internal/deposit-address.js +28 -0
- package/dist/stripe/server/internal/html.gen.d.ts +1 -1
- package/dist/stripe/server/internal/html.gen.js +1 -1
- package/dist/stripe/server/internal/record-payment.d.ts +15 -0
- package/dist/stripe/server/internal/record-payment.js +42 -0
- package/dist/stripe/server/internal/request.d.ts +25 -0
- package/dist/stripe/server/internal/request.js +29 -0
- package/dist/stripe/server/spt.d.ts +8 -0
- package/dist/stripe/server/spt.js +8 -0
- package/dist/tap/Constants.d.ts +28 -0
- package/dist/tap/Constants.js +32 -0
- package/dist/tap/Types.d.ts +11 -0
- package/dist/tap/Types.js +2 -0
- package/dist/tap/client/index.d.ts +26 -0
- package/dist/tap/client/index.js +33 -0
- package/dist/tap/index.d.ts +5 -0
- package/dist/tap/index.js +5 -0
- package/dist/tap/server/index.d.ts +20 -0
- package/dist/tap/server/index.js +36 -0
- package/dist/tempo/Attribution.d.ts +1 -1
- package/dist/tempo/Methods.d.ts +73 -60
- package/dist/tempo/Methods.js +14 -3
- package/dist/tempo/Proof.d.ts +16 -16
- package/dist/tempo/client/Charge.d.ts +22 -19
- package/dist/tempo/client/Charge.js +32 -16
- package/dist/tempo/client/Methods.d.ts +51 -38
- package/dist/tempo/client/Subscription.d.ts +23 -23
- package/dist/tempo/internal/address.d.ts +2 -1
- package/dist/tempo/internal/address.js +3 -1
- package/dist/tempo/internal/auto-swap.js +4 -19
- package/dist/tempo/internal/defaults.d.ts +17 -6
- package/dist/tempo/internal/defaults.js +11 -0
- package/dist/tempo/internal/fee-payer.d.ts +12 -12
- package/dist/tempo/internal/machine-token-charge.d.ts +51 -0
- package/dist/tempo/internal/machine-token-charge.js +113 -0
- package/dist/tempo/internal/machine-token-session.d.ts +88 -0
- package/dist/tempo/internal/machine-token-session.js +173 -0
- package/dist/tempo/internal/proof.d.ts +17 -17
- package/dist/tempo/internal/signature-envelope.d.ts +14 -0
- package/dist/tempo/internal/signature-envelope.js +28 -0
- package/dist/tempo/legacy/client/ChannelOps.d.ts +2 -2
- package/dist/tempo/legacy/client/ChannelOps.js +11 -5
- package/dist/tempo/legacy/client/Session.d.ts +33 -21
- package/dist/tempo/legacy/client/Session.js +3 -3
- package/dist/tempo/legacy/client/SessionManager.d.ts +3 -1
- package/dist/tempo/legacy/client/SessionManager.js +2 -0
- package/dist/tempo/legacy/index.d.ts +1 -3
- package/dist/tempo/legacy/index.js +1 -3
- package/dist/tempo/legacy/session/escrow.abi.d.ts +374 -374
- package/dist/tempo/server/Charge.d.ts +28 -11
- package/dist/tempo/server/Charge.js +101 -55
- package/dist/tempo/server/Methods.d.ts +58 -56
- package/dist/tempo/server/Methods.js +8 -18
- package/dist/tempo/server/Relay.d.ts +1 -1
- package/dist/tempo/server/Relay.js +2 -2
- package/dist/tempo/server/Subscription.d.ts +25 -25
- package/dist/tempo/server/Subscription.js +2 -0
- package/dist/tempo/server/index.d.ts +1 -1
- package/dist/tempo/server/index.js +1 -1
- package/dist/tempo/server/internal/html.gen.d.ts +1 -1
- package/dist/tempo/server/internal/html.gen.js +1 -1
- package/dist/tempo/server/internal/transport.d.ts +2 -0
- package/dist/tempo/server/internal/transport.js +9 -2
- package/dist/tempo/session/client/ChannelOps.d.ts +18 -3
- package/dist/tempo/session/client/ChannelOps.js +35 -6
- package/dist/tempo/session/client/ChannelStore.d.ts +0 -5
- package/dist/tempo/session/client/ChannelStore.js +2 -2
- package/dist/tempo/session/client/CredentialState.d.ts +18 -3
- package/dist/tempo/session/client/CredentialState.js +77 -76
- package/dist/tempo/session/client/Runtime.d.ts +4 -2
- package/dist/tempo/session/client/Runtime.js +21 -5
- package/dist/tempo/session/client/Session.d.ts +34 -22
- package/dist/tempo/session/client/Session.js +186 -63
- package/dist/tempo/session/client/SessionManager.d.ts +3 -1
- package/dist/tempo/session/client/SessionManager.js +35 -11
- package/dist/tempo/session/client/Transports.d.ts +2 -0
- package/dist/tempo/session/client/Transports.js +12 -2
- package/dist/tempo/session/precompile/Chain.d.ts +37 -2
- package/dist/tempo/session/precompile/Chain.js +116 -15
- package/dist/tempo/session/precompile/Protocol.d.ts +15 -0
- package/dist/tempo/session/precompile/Protocol.js +7 -0
- package/dist/tempo/session/precompile/Voucher.d.ts +7 -5
- package/dist/tempo/session/precompile/Voucher.js +6 -12
- package/dist/tempo/session/precompile/escrow.abi.d.ts +306 -306
- package/dist/tempo/session/server/ChannelStore.d.ts +15 -0
- package/dist/tempo/session/server/ChannelStore.js +27 -12
- package/dist/tempo/session/server/CredentialVerification.d.ts +39 -20
- package/dist/tempo/session/server/CredentialVerification.js +359 -89
- package/dist/tempo/session/server/MeteredStream.d.ts +4 -1
- package/dist/tempo/session/server/MeteredStream.js +8 -5
- package/dist/tempo/session/server/RequestState.d.ts +19 -0
- package/dist/tempo/session/server/RequestState.js +61 -15
- package/dist/tempo/session/server/Session.d.ts +46 -23
- package/dist/tempo/session/server/Session.js +150 -56
- package/dist/tempo/session/server/Settlement.d.ts +11 -4
- package/dist/tempo/session/server/Settlement.js +53 -21
- package/dist/tempo/session/server/Sse.d.ts +3 -1
- package/dist/tempo/session/server/Sse.js +2 -1
- package/dist/tempo/session/server/Transports.d.ts +1 -1
- package/dist/tempo/session/server/Transports.js +1 -0
- package/dist/tempo/session/server/Ws.d.ts +6 -1
- package/dist/tempo/session/server/Ws.js +1 -0
- package/dist/tempo/subscription/KeyAuthorization.d.ts +39 -39
- package/dist/web-bot-auth/Constants.d.ts +20 -0
- package/dist/web-bot-auth/Constants.js +24 -0
- package/dist/web-bot-auth/Types.d.ts +10 -0
- package/dist/web-bot-auth/Types.js +2 -0
- package/dist/web-bot-auth/client/index.d.ts +29 -0
- package/dist/web-bot-auth/client/index.js +64 -0
- package/dist/web-bot-auth/index.d.ts +7 -0
- package/dist/web-bot-auth/index.js +7 -0
- package/dist/web-bot-auth/internal/JwkThumbprint.d.ts +5 -0
- package/dist/web-bot-auth/internal/JwkThumbprint.js +20 -0
- package/dist/web-bot-auth/internal/SignatureAgent.d.ts +3 -0
- package/dist/web-bot-auth/internal/SignatureAgent.js +18 -0
- package/dist/web-bot-auth/server/index.d.ts +35 -0
- package/dist/web-bot-auth/server/index.js +88 -0
- package/dist/x402/Types.d.ts +6 -6
- package/dist/x402/client/Exact.d.ts +8 -0
- package/dist/x402/client/Exact.js +40 -10
- package/dist/x402/server/EvmCharge.d.ts +22 -0
- package/dist/x402/server/EvmCharge.js +54 -20
- package/package.json +28 -34
- package/dist/BodyDigest.d.ts.map +0 -1
- package/dist/BodyDigest.js.map +0 -1
- package/dist/Challenge.d.ts.map +0 -1
- package/dist/Challenge.js.map +0 -1
- package/dist/Constants.d.ts.map +0 -1
- package/dist/Constants.js.map +0 -1
- package/dist/Credential.d.ts.map +0 -1
- package/dist/Credential.js.map +0 -1
- package/dist/Errors.d.ts.map +0 -1
- package/dist/Errors.js.map +0 -1
- package/dist/Expires.d.ts.map +0 -1
- package/dist/Expires.js.map +0 -1
- package/dist/Html.d.ts.map +0 -1
- package/dist/Html.js.map +0 -1
- package/dist/Mcp.d.ts.map +0 -1
- package/dist/Mcp.js.map +0 -1
- package/dist/Method.d.ts.map +0 -1
- package/dist/Method.js.map +0 -1
- package/dist/PaymentRequest.d.ts.map +0 -1
- package/dist/PaymentRequest.js.map +0 -1
- package/dist/Receipt.d.ts.map +0 -1
- package/dist/Receipt.js.map +0 -1
- package/dist/Store.d.ts.map +0 -1
- package/dist/Store.js.map +0 -1
- package/dist/bin.d.ts.map +0 -1
- package/dist/bin.js.map +0 -1
- package/dist/cli/account.d.ts.map +0 -1
- package/dist/cli/account.js.map +0 -1
- package/dist/cli/cli.d.ts.map +0 -1
- package/dist/cli/cli.js.map +0 -1
- package/dist/cli/config.d.ts.map +0 -1
- package/dist/cli/config.js.map +0 -1
- package/dist/cli/internal.d.ts.map +0 -1
- package/dist/cli/internal.js.map +0 -1
- package/dist/cli/plugins/evm.d.ts.map +0 -1
- package/dist/cli/plugins/evm.js.map +0 -1
- package/dist/cli/plugins/index.d.ts.map +0 -1
- package/dist/cli/plugins/index.js.map +0 -1
- package/dist/cli/plugins/plugin.d.ts.map +0 -1
- package/dist/cli/plugins/plugin.js.map +0 -1
- package/dist/cli/plugins/stripe.d.ts.map +0 -1
- package/dist/cli/plugins/stripe.js.map +0 -1
- package/dist/cli/plugins/tempo.d.ts.map +0 -1
- package/dist/cli/plugins/tempo.js.map +0 -1
- package/dist/cli/sessions/Manager.d.ts.map +0 -1
- package/dist/cli/sessions/Manager.js.map +0 -1
- package/dist/cli/sessions/commands.d.ts.map +0 -1
- package/dist/cli/sessions/commands.js.map +0 -1
- package/dist/cli/sessions/request.d.ts.map +0 -1
- package/dist/cli/sessions/request.js.map +0 -1
- package/dist/cli/sessions/store.d.ts.map +0 -1
- package/dist/cli/sessions/store.js.map +0 -1
- package/dist/cli/utils.d.ts.map +0 -1
- package/dist/cli/utils.js.map +0 -1
- package/dist/cli/validate/challenge.d.ts.map +0 -1
- package/dist/cli/validate/challenge.js.map +0 -1
- package/dist/cli/validate/discovery.d.ts.map +0 -1
- package/dist/cli/validate/discovery.js.map +0 -1
- package/dist/cli/validate/helpers.d.ts.map +0 -1
- package/dist/cli/validate/helpers.js.map +0 -1
- package/dist/cli/validate/index.d.ts.map +0 -1
- package/dist/cli/validate/index.js.map +0 -1
- package/dist/cli/validate/messages.d.ts.map +0 -1
- package/dist/cli/validate/messages.js.map +0 -1
- package/dist/cli/validate/payment.d.ts.map +0 -1
- package/dist/cli/validate/payment.js.map +0 -1
- package/dist/client/Methods.d.ts.map +0 -1
- package/dist/client/Methods.js.map +0 -1
- package/dist/client/Mppx.d.ts.map +0 -1
- package/dist/client/Mppx.js.map +0 -1
- package/dist/client/Transport.d.ts.map +0 -1
- package/dist/client/Transport.js.map +0 -1
- package/dist/client/index.d.ts.map +0 -1
- package/dist/client/index.js.map +0 -1
- package/dist/client/internal/Fetch.d.ts.map +0 -1
- package/dist/client/internal/Fetch.js.map +0 -1
- package/dist/client/internal/MethodChallenge.d.ts.map +0 -1
- package/dist/client/internal/MethodChallenge.js.map +0 -1
- package/dist/client/internal/MethodResponse.d.ts.map +0 -1
- package/dist/client/internal/MethodResponse.js.map +0 -1
- package/dist/client/internal/protocols/Mcp.d.ts.map +0 -1
- package/dist/client/internal/protocols/Mcp.js.map +0 -1
- package/dist/client/internal/protocols/Mpp.d.ts.map +0 -1
- package/dist/client/internal/protocols/Mpp.js.map +0 -1
- package/dist/client/internal/protocols/Protocol.d.ts.map +0 -1
- package/dist/client/internal/protocols/Protocol.js.map +0 -1
- package/dist/client/internal/protocols/Shared.d.ts.map +0 -1
- package/dist/client/internal/protocols/Shared.js.map +0 -1
- package/dist/client/internal/protocols/X402.d.ts.map +0 -1
- package/dist/client/internal/protocols/X402.js.map +0 -1
- package/dist/client/node.d.ts.map +0 -1
- package/dist/client/node.js.map +0 -1
- package/dist/discovery/Discovery.d.ts.map +0 -1
- package/dist/discovery/Discovery.js.map +0 -1
- package/dist/discovery/OpenApi.d.ts.map +0 -1
- package/dist/discovery/OpenApi.js.map +0 -1
- package/dist/discovery/Validate.d.ts.map +0 -1
- package/dist/discovery/Validate.js.map +0 -1
- package/dist/discovery/index.d.ts.map +0 -1
- package/dist/discovery/index.js.map +0 -1
- package/dist/evm/Assets.d.ts.map +0 -1
- package/dist/evm/Assets.js.map +0 -1
- package/dist/evm/Chains.d.ts.map +0 -1
- package/dist/evm/Chains.js.map +0 -1
- package/dist/evm/Methods.d.ts.map +0 -1
- package/dist/evm/Methods.js.map +0 -1
- package/dist/evm/Types.d.ts.map +0 -1
- package/dist/evm/Types.js.map +0 -1
- package/dist/evm/client/Charge.d.ts.map +0 -1
- package/dist/evm/client/Charge.js.map +0 -1
- package/dist/evm/client/Methods.d.ts.map +0 -1
- package/dist/evm/client/Methods.js.map +0 -1
- package/dist/evm/client/index.d.ts.map +0 -1
- package/dist/evm/client/index.js.map +0 -1
- package/dist/evm/index.d.ts.map +0 -1
- package/dist/evm/index.js.map +0 -1
- package/dist/evm/server/Charge.d.ts.map +0 -1
- package/dist/evm/server/Charge.js.map +0 -1
- package/dist/evm/server/Methods.d.ts.map +0 -1
- package/dist/evm/server/Methods.js.map +0 -1
- package/dist/evm/server/index.d.ts.map +0 -1
- package/dist/evm/server/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internal/AcceptPayment.d.ts.map +0 -1
- package/dist/internal/AcceptPayment.js.map +0 -1
- package/dist/internal/HeaderCodec.d.ts.map +0 -1
- package/dist/internal/HeaderCodec.js.map +0 -1
- package/dist/internal/constantTimeEqual.d.ts.map +0 -1
- package/dist/internal/constantTimeEqual.js.map +0 -1
- package/dist/internal/env.d.ts.map +0 -1
- package/dist/internal/env.js.map +0 -1
- package/dist/internal/types.d.ts.map +0 -1
- package/dist/internal/types.js.map +0 -1
- package/dist/mcp/client/McpClient.d.ts.map +0 -1
- package/dist/mcp/client/McpClient.js.map +0 -1
- package/dist/mcp/client/index.d.ts.map +0 -1
- package/dist/mcp/client/index.js.map +0 -1
- package/dist/mcp/server/Transport.d.ts.map +0 -1
- package/dist/mcp/server/Transport.js.map +0 -1
- package/dist/mcp/server/index.d.ts.map +0 -1
- package/dist/mcp/server/index.js.map +0 -1
- package/dist/middlewares/elysia.d.ts.map +0 -1
- package/dist/middlewares/elysia.js.map +0 -1
- package/dist/middlewares/express.d.ts.map +0 -1
- package/dist/middlewares/express.js.map +0 -1
- package/dist/middlewares/hono.d.ts.map +0 -1
- package/dist/middlewares/hono.js.map +0 -1
- package/dist/middlewares/internal/mppx.d.ts.map +0 -1
- package/dist/middlewares/internal/mppx.js.map +0 -1
- package/dist/middlewares/nextjs.d.ts.map +0 -1
- package/dist/middlewares/nextjs.js.map +0 -1
- package/dist/proxy/Proxy.d.ts.map +0 -1
- package/dist/proxy/Proxy.js.map +0 -1
- package/dist/proxy/Service.d.ts.map +0 -1
- package/dist/proxy/Service.js.map +0 -1
- package/dist/proxy/index.d.ts.map +0 -1
- package/dist/proxy/index.js.map +0 -1
- package/dist/proxy/internal/Headers.d.ts.map +0 -1
- package/dist/proxy/internal/Headers.js.map +0 -1
- package/dist/proxy/internal/Route.d.ts.map +0 -1
- package/dist/proxy/internal/Route.js.map +0 -1
- package/dist/proxy/services/anthropic.d.ts.map +0 -1
- package/dist/proxy/services/anthropic.js.map +0 -1
- package/dist/proxy/services/openai.d.ts.map +0 -1
- package/dist/proxy/services/openai.js.map +0 -1
- package/dist/proxy/services/stripe.d.ts.map +0 -1
- package/dist/proxy/services/stripe.js.map +0 -1
- package/dist/server/Methods.d.ts.map +0 -1
- package/dist/server/Methods.js.map +0 -1
- package/dist/server/Mppx.d.ts.map +0 -1
- package/dist/server/Mppx.js.map +0 -1
- package/dist/server/NodeListener.d.ts.map +0 -1
- package/dist/server/NodeListener.js.map +0 -1
- package/dist/server/Request.d.ts.map +0 -1
- package/dist/server/Request.js.map +0 -1
- package/dist/server/Response.d.ts.map +0 -1
- package/dist/server/Response.js.map +0 -1
- package/dist/server/Transport.d.ts.map +0 -1
- package/dist/server/Transport.js.map +0 -1
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/index.js.map +0 -1
- package/dist/server/internal/html/compose.main.gen.d.ts.map +0 -1
- package/dist/server/internal/html/compose.main.gen.js.map +0 -1
- package/dist/server/internal/html/config.d.ts.map +0 -1
- package/dist/server/internal/html/config.js.map +0 -1
- package/dist/server/internal/html/constants.d.ts.map +0 -1
- package/dist/server/internal/html/constants.js.map +0 -1
- package/dist/server/internal/html/serviceWorker.client.d.ts.map +0 -1
- package/dist/server/internal/html/serviceWorker.client.js.map +0 -1
- package/dist/server/internal/html/serviceWorker.gen.d.ts.map +0 -1
- package/dist/server/internal/html/serviceWorker.gen.js.map +0 -1
- package/dist/server/internal/scope.d.ts.map +0 -1
- package/dist/server/internal/scope.js.map +0 -1
- package/dist/stripe/Methods.d.ts.map +0 -1
- package/dist/stripe/Methods.js.map +0 -1
- package/dist/stripe/client/Charge.d.ts.map +0 -1
- package/dist/stripe/client/Charge.js.map +0 -1
- package/dist/stripe/client/Methods.d.ts.map +0 -1
- package/dist/stripe/client/Methods.js.map +0 -1
- package/dist/stripe/client/index.d.ts.map +0 -1
- package/dist/stripe/client/index.js.map +0 -1
- package/dist/stripe/index.d.ts.map +0 -1
- package/dist/stripe/index.js.map +0 -1
- package/dist/stripe/internal/constants.d.ts.map +0 -1
- package/dist/stripe/internal/constants.js.map +0 -1
- package/dist/stripe/internal/types.d.ts.map +0 -1
- package/dist/stripe/internal/types.js.map +0 -1
- package/dist/stripe/server/Charge.d.ts.map +0 -1
- package/dist/stripe/server/Charge.js.map +0 -1
- package/dist/stripe/server/Methods.d.ts.map +0 -1
- package/dist/stripe/server/Methods.js.map +0 -1
- package/dist/stripe/server/index.d.ts.map +0 -1
- package/dist/stripe/server/index.js.map +0 -1
- package/dist/stripe/server/internal/html/types.d.ts.map +0 -1
- package/dist/stripe/server/internal/html/types.js.map +0 -1
- package/dist/stripe/server/internal/html.gen.d.ts.map +0 -1
- package/dist/stripe/server/internal/html.gen.js.map +0 -1
- package/dist/tempo/Attribution.d.ts.map +0 -1
- package/dist/tempo/Attribution.js.map +0 -1
- package/dist/tempo/Methods.d.ts.map +0 -1
- package/dist/tempo/Methods.js.map +0 -1
- package/dist/tempo/Proof.d.ts.map +0 -1
- package/dist/tempo/Proof.js.map +0 -1
- package/dist/tempo/client/Charge.d.ts.map +0 -1
- package/dist/tempo/client/Charge.js.map +0 -1
- package/dist/tempo/client/Methods.d.ts.map +0 -1
- package/dist/tempo/client/Methods.js.map +0 -1
- package/dist/tempo/client/ResolveAccount.d.ts.map +0 -1
- package/dist/tempo/client/ResolveAccount.js.map +0 -1
- package/dist/tempo/client/Subscription.d.ts.map +0 -1
- package/dist/tempo/client/Subscription.js.map +0 -1
- package/dist/tempo/client/index.d.ts.map +0 -1
- package/dist/tempo/client/index.js.map +0 -1
- package/dist/tempo/index.d.ts.map +0 -1
- package/dist/tempo/index.js.map +0 -1
- package/dist/tempo/internal/account.d.ts.map +0 -1
- package/dist/tempo/internal/account.js.map +0 -1
- package/dist/tempo/internal/address.d.ts.map +0 -1
- package/dist/tempo/internal/address.js.map +0 -1
- package/dist/tempo/internal/auto-swap.d.ts.map +0 -1
- package/dist/tempo/internal/auto-swap.js.map +0 -1
- package/dist/tempo/internal/charge.d.ts.map +0 -1
- package/dist/tempo/internal/charge.js.map +0 -1
- package/dist/tempo/internal/defaults.d.ts.map +0 -1
- package/dist/tempo/internal/defaults.js.map +0 -1
- package/dist/tempo/internal/fee-payer.d.ts.map +0 -1
- package/dist/tempo/internal/fee-payer.js.map +0 -1
- package/dist/tempo/internal/fee-token.d.ts.map +0 -1
- package/dist/tempo/internal/fee-token.js.map +0 -1
- package/dist/tempo/internal/proof.d.ts.map +0 -1
- package/dist/tempo/internal/proof.js.map +0 -1
- package/dist/tempo/internal/selectors.d.ts.map +0 -1
- package/dist/tempo/internal/selectors.js.map +0 -1
- package/dist/tempo/internal/types.d.ts.map +0 -1
- package/dist/tempo/internal/types.js.map +0 -1
- package/dist/tempo/legacy/client/ChannelOps.d.ts.map +0 -1
- package/dist/tempo/legacy/client/ChannelOps.js.map +0 -1
- package/dist/tempo/legacy/client/Session.d.ts.map +0 -1
- package/dist/tempo/legacy/client/Session.js.map +0 -1
- package/dist/tempo/legacy/client/SessionManager.d.ts.map +0 -1
- package/dist/tempo/legacy/client/SessionManager.js.map +0 -1
- package/dist/tempo/legacy/client/index.d.ts.map +0 -1
- package/dist/tempo/legacy/client/index.js.map +0 -1
- package/dist/tempo/legacy/index.d.ts.map +0 -1
- package/dist/tempo/legacy/index.js.map +0 -1
- package/dist/tempo/legacy/server/Session.d.ts +0 -208
- package/dist/tempo/legacy/server/Session.d.ts.map +0 -1
- package/dist/tempo/legacy/server/Session.js +0 -698
- package/dist/tempo/legacy/server/Session.js.map +0 -1
- package/dist/tempo/legacy/server/index.d.ts +0 -5
- package/dist/tempo/legacy/server/index.d.ts.map +0 -1
- package/dist/tempo/legacy/server/index.js +0 -5
- package/dist/tempo/legacy/server/index.js.map +0 -1
- package/dist/tempo/legacy/session/Chain.d.ts.map +0 -1
- package/dist/tempo/legacy/session/Chain.js.map +0 -1
- package/dist/tempo/legacy/session/Channel.d.ts.map +0 -1
- package/dist/tempo/legacy/session/Channel.js.map +0 -1
- package/dist/tempo/legacy/session/ChannelStore.d.ts +0 -22
- package/dist/tempo/legacy/session/ChannelStore.d.ts.map +0 -1
- package/dist/tempo/legacy/session/ChannelStore.js +0 -6
- package/dist/tempo/legacy/session/ChannelStore.js.map +0 -1
- package/dist/tempo/legacy/session/Types.d.ts.map +0 -1
- package/dist/tempo/legacy/session/Types.js.map +0 -1
- package/dist/tempo/legacy/session/Voucher.d.ts.map +0 -1
- package/dist/tempo/legacy/session/Voucher.js.map +0 -1
- package/dist/tempo/legacy/session/escrow.abi.d.ts.map +0 -1
- package/dist/tempo/legacy/session/escrow.abi.js.map +0 -1
- package/dist/tempo/legacy/session/index.d.ts.map +0 -1
- package/dist/tempo/legacy/session/index.js.map +0 -1
- package/dist/tempo/server/Charge.d.ts.map +0 -1
- package/dist/tempo/server/Charge.js.map +0 -1
- package/dist/tempo/server/Methods.d.ts.map +0 -1
- package/dist/tempo/server/Methods.js.map +0 -1
- package/dist/tempo/server/Relay.d.ts.map +0 -1
- package/dist/tempo/server/Relay.js.map +0 -1
- package/dist/tempo/server/SponsorBudget.d.ts.map +0 -1
- package/dist/tempo/server/SponsorBudget.js.map +0 -1
- package/dist/tempo/server/Subscription.d.ts.map +0 -1
- package/dist/tempo/server/Subscription.js.map +0 -1
- package/dist/tempo/server/index.d.ts.map +0 -1
- package/dist/tempo/server/index.js.map +0 -1
- package/dist/tempo/server/internal/html.gen.d.ts.map +0 -1
- package/dist/tempo/server/internal/html.gen.js.map +0 -1
- package/dist/tempo/server/internal/request-body.d.ts.map +0 -1
- package/dist/tempo/server/internal/request-body.js.map +0 -1
- package/dist/tempo/server/internal/transport.d.ts.map +0 -1
- package/dist/tempo/server/internal/transport.js.map +0 -1
- package/dist/tempo/session/Snapshot.d.ts.map +0 -1
- package/dist/tempo/session/Snapshot.js.map +0 -1
- package/dist/tempo/session/client/ChannelOps.d.ts.map +0 -1
- package/dist/tempo/session/client/ChannelOps.js.map +0 -1
- package/dist/tempo/session/client/ChannelStore.d.ts.map +0 -1
- package/dist/tempo/session/client/ChannelStore.js.map +0 -1
- package/dist/tempo/session/client/CredentialState.d.ts.map +0 -1
- package/dist/tempo/session/client/CredentialState.js.map +0 -1
- package/dist/tempo/session/client/ReceiptCoordinator.d.ts.map +0 -1
- package/dist/tempo/session/client/ReceiptCoordinator.js.map +0 -1
- package/dist/tempo/session/client/Runtime.d.ts.map +0 -1
- package/dist/tempo/session/client/Runtime.js.map +0 -1
- package/dist/tempo/session/client/Session.d.ts.map +0 -1
- package/dist/tempo/session/client/Session.js.map +0 -1
- package/dist/tempo/session/client/SessionManager.d.ts.map +0 -1
- package/dist/tempo/session/client/SessionManager.js.map +0 -1
- package/dist/tempo/session/client/Transports.d.ts.map +0 -1
- package/dist/tempo/session/client/Transports.js.map +0 -1
- package/dist/tempo/session/client/index.d.ts.map +0 -1
- package/dist/tempo/session/client/index.js.map +0 -1
- package/dist/tempo/session/client/internal/SessionManager.d.ts.map +0 -1
- package/dist/tempo/session/client/internal/SessionManager.js.map +0 -1
- package/dist/tempo/session/index.d.ts.map +0 -1
- package/dist/tempo/session/index.js.map +0 -1
- package/dist/tempo/session/precompile/Chain.d.ts.map +0 -1
- package/dist/tempo/session/precompile/Chain.js.map +0 -1
- package/dist/tempo/session/precompile/Channel.d.ts.map +0 -1
- package/dist/tempo/session/precompile/Channel.js.map +0 -1
- package/dist/tempo/session/precompile/Protocol.d.ts.map +0 -1
- package/dist/tempo/session/precompile/Protocol.js.map +0 -1
- package/dist/tempo/session/precompile/Voucher.d.ts.map +0 -1
- package/dist/tempo/session/precompile/Voucher.js.map +0 -1
- package/dist/tempo/session/precompile/escrow.abi.d.ts.map +0 -1
- package/dist/tempo/session/precompile/escrow.abi.js.map +0 -1
- package/dist/tempo/session/precompile/index.d.ts.map +0 -1
- package/dist/tempo/session/precompile/index.js.map +0 -1
- package/dist/tempo/session/server/ChannelOps.d.ts.map +0 -1
- package/dist/tempo/session/server/ChannelOps.js.map +0 -1
- package/dist/tempo/session/server/ChannelStore.d.ts.map +0 -1
- package/dist/tempo/session/server/ChannelStore.js.map +0 -1
- package/dist/tempo/session/server/CredentialVerification.d.ts.map +0 -1
- package/dist/tempo/session/server/CredentialVerification.js.map +0 -1
- package/dist/tempo/session/server/MeteredStream.d.ts.map +0 -1
- package/dist/tempo/session/server/MeteredStream.js.map +0 -1
- package/dist/tempo/session/server/RequestState.d.ts.map +0 -1
- package/dist/tempo/session/server/RequestState.js.map +0 -1
- package/dist/tempo/session/server/Session.d.ts.map +0 -1
- package/dist/tempo/session/server/Session.js.map +0 -1
- package/dist/tempo/session/server/Settlement.d.ts.map +0 -1
- package/dist/tempo/session/server/Settlement.js.map +0 -1
- package/dist/tempo/session/server/Sse.d.ts.map +0 -1
- package/dist/tempo/session/server/Sse.js.map +0 -1
- package/dist/tempo/session/server/Transports.d.ts.map +0 -1
- package/dist/tempo/session/server/Transports.js.map +0 -1
- package/dist/tempo/session/server/Ws.d.ts.map +0 -1
- package/dist/tempo/session/server/Ws.js.map +0 -1
- package/dist/tempo/session/server/index.d.ts.map +0 -1
- package/dist/tempo/session/server/index.js.map +0 -1
- package/dist/tempo/subscription/KeyAuthorization.d.ts.map +0 -1
- package/dist/tempo/subscription/KeyAuthorization.js.map +0 -1
- package/dist/tempo/subscription/Receipt.d.ts.map +0 -1
- package/dist/tempo/subscription/Receipt.js.map +0 -1
- package/dist/tempo/subscription/Store.d.ts.map +0 -1
- package/dist/tempo/subscription/Store.js.map +0 -1
- package/dist/tempo/subscription/Types.d.ts.map +0 -1
- package/dist/tempo/subscription/Types.js.map +0 -1
- package/dist/tempo/subscription/index.d.ts.map +0 -1
- package/dist/tempo/subscription/index.js.map +0 -1
- package/dist/validation/core.d.ts.map +0 -1
- package/dist/validation/core.js.map +0 -1
- package/dist/validation/index.d.ts.map +0 -1
- package/dist/validation/index.js.map +0 -1
- package/dist/viem/Account.d.ts.map +0 -1
- package/dist/viem/Account.js.map +0 -1
- package/dist/viem/Client.d.ts.map +0 -1
- package/dist/viem/Client.js.map +0 -1
- package/dist/x402/Assets.d.ts.map +0 -1
- package/dist/x402/Assets.js.map +0 -1
- package/dist/x402/Header.d.ts.map +0 -1
- package/dist/x402/Header.js.map +0 -1
- package/dist/x402/Types.d.ts.map +0 -1
- package/dist/x402/Types.js.map +0 -1
- package/dist/x402/client/Exact.d.ts.map +0 -1
- package/dist/x402/client/Exact.js.map +0 -1
- package/dist/x402/index.d.ts.map +0 -1
- package/dist/x402/index.js.map +0 -1
- package/dist/x402/internal/ChallengeBrand.d.ts.map +0 -1
- package/dist/x402/internal/ChallengeBrand.js.map +0 -1
- package/dist/x402/internal/RouteBinding.d.ts.map +0 -1
- package/dist/x402/internal/RouteBinding.js.map +0 -1
- package/dist/x402/server/EvmCharge.d.ts.map +0 -1
- package/dist/x402/server/EvmCharge.js.map +0 -1
- package/dist/x402/server/Facilitator.d.ts.map +0 -1
- package/dist/x402/server/Facilitator.js.map +0 -1
- package/dist/zod.d.ts.map +0 -1
- package/dist/zod.js.map +0 -1
- package/src/BodyDigest.test.ts +0 -43
- package/src/BodyDigest.ts +0 -55
- package/src/Challenge.fuzz.test.ts +0 -121
- package/src/Challenge.test-d.ts +0 -82
- package/src/Challenge.test.ts +0 -995
- package/src/Challenge.ts +0 -683
- package/src/Constants.ts +0 -58
- package/src/Credential.fuzz.test.ts +0 -62
- package/src/Credential.test.ts +0 -378
- package/src/Credential.ts +0 -217
- package/src/Errors.test.ts +0 -520
- package/src/Errors.ts +0 -448
- package/src/Expires.test.ts +0 -112
- package/src/Expires.ts +0 -59
- package/src/Html.ts +0 -67
- package/src/Mcp.ts +0 -85
- package/src/Method.test.ts +0 -177
- package/src/Method.ts +0 -617
- package/src/PaymentRequest.test.ts +0 -147
- package/src/PaymentRequest.ts +0 -108
- package/src/Receipt.test.ts +0 -151
- package/src/Receipt.ts +0 -146
- package/src/Store.test-d.ts +0 -195
- package/src/Store.test.ts +0 -357
- package/src/Store.ts +0 -329
- package/src/bin.ts +0 -4
- package/src/cli/account.ts +0 -269
- package/src/cli/cli.test.ts +0 -2221
- package/src/cli/cli.ts +0 -1649
- package/src/cli/config.test.ts +0 -89
- package/src/cli/config.ts +0 -50
- package/src/cli/internal.ts +0 -114
- package/src/cli/mcp.test.ts +0 -262
- package/src/cli/plugins/evm.ts +0 -55
- package/src/cli/plugins/index.ts +0 -4
- package/src/cli/plugins/plugin.ts +0 -84
- package/src/cli/plugins/stripe.ts +0 -174
- package/src/cli/plugins/tempo.ts +0 -1102
- package/src/cli/sessions/Manager.test.ts +0 -249
- package/src/cli/sessions/Manager.ts +0 -93
- package/src/cli/sessions/commands.ts +0 -444
- package/src/cli/sessions/request.test.ts +0 -51
- package/src/cli/sessions/request.ts +0 -353
- package/src/cli/sessions/store.test.ts +0 -581
- package/src/cli/sessions/store.ts +0 -940
- package/src/cli/utils.test.ts +0 -156
- package/src/cli/utils.ts +0 -394
- package/src/cli/validate/challenge.ts +0 -565
- package/src/cli/validate/discovery.test.ts +0 -435
- package/src/cli/validate/discovery.ts +0 -221
- package/src/cli/validate/helpers.ts +0 -166
- package/src/cli/validate/index.ts +0 -229
- package/src/cli/validate/messages.ts +0 -7
- package/src/cli/validate/payment.ts +0 -774
- package/src/cli/validate.test.ts +0 -843
- package/src/client/Methods.ts +0 -8
- package/src/client/Mppx.test-d.ts +0 -270
- package/src/client/Mppx.test.ts +0 -1065
- package/src/client/Mppx.ts +0 -466
- package/src/client/Transport.test.ts +0 -619
- package/src/client/Transport.ts +0 -191
- package/src/client/index.ts +0 -29
- package/src/client/internal/Fetch.browser.test.ts +0 -197
- package/src/client/internal/Fetch.test-d.ts +0 -109
- package/src/client/internal/Fetch.test.ts +0 -2336
- package/src/client/internal/Fetch.ts +0 -1079
- package/src/client/internal/MethodChallenge.ts +0 -35
- package/src/client/internal/MethodResponse.ts +0 -67
- package/src/client/internal/protocols/Mcp.test.ts +0 -220
- package/src/client/internal/protocols/Mcp.ts +0 -186
- package/src/client/internal/protocols/Mpp.ts +0 -21
- package/src/client/internal/protocols/Protocol.ts +0 -10
- package/src/client/internal/protocols/Shared.ts +0 -25
- package/src/client/internal/protocols/X402.ts +0 -46
- package/src/client/node.test.ts +0 -115
- package/src/client/node.ts +0 -247
- package/src/discovery/Discovery.test.ts +0 -214
- package/src/discovery/Discovery.ts +0 -105
- package/src/discovery/OpenApi.test.ts +0 -453
- package/src/discovery/OpenApi.ts +0 -224
- package/src/discovery/Validate.test.ts +0 -305
- package/src/discovery/Validate.ts +0 -77
- package/src/discovery/index.ts +0 -3
- package/src/env.d.ts +0 -12
- package/src/evm/Assets.ts +0 -1
- package/src/evm/Chains.ts +0 -11
- package/src/evm/Methods.ts +0 -44
- package/src/evm/PublicInterface.test-d.ts +0 -134
- package/src/evm/Types.ts +0 -140
- package/src/evm/client/Charge.test.ts +0 -347
- package/src/evm/client/Charge.ts +0 -187
- package/src/evm/client/Methods.ts +0 -19
- package/src/evm/client/index.ts +0 -6
- package/src/evm/index.ts +0 -16
- package/src/evm/server/Charge.test.ts +0 -339
- package/src/evm/server/Charge.ts +0 -290
- package/src/evm/server/Methods.ts +0 -22
- package/src/evm/server/index.ts +0 -6
- package/src/index.ts +0 -14
- package/src/internal/AcceptPayment.test.ts +0 -343
- package/src/internal/AcceptPayment.ts +0 -366
- package/src/internal/HeaderCodec.ts +0 -36
- package/src/internal/changeset.test.ts +0 -106
- package/src/internal/constantTimeEqual.test.ts +0 -47
- package/src/internal/constantTimeEqual.ts +0 -10
- package/src/internal/env.test.ts +0 -42
- package/src/internal/env.ts +0 -49
- package/src/internal/types.test-d.ts +0 -21
- package/src/internal/types.ts +0 -470
- package/src/mcp/client/McpClient.integration.test.ts +0 -652
- package/src/mcp/client/McpClient.test-d.ts +0 -144
- package/src/mcp/client/McpClient.test.ts +0 -463
- package/src/mcp/client/McpClient.ts +0 -307
- package/src/mcp/client/McpClient.unit.test.ts +0 -135
- package/src/mcp/client/index.ts +0 -2
- package/src/mcp/server/Transport.test.ts +0 -191
- package/src/mcp/server/Transport.ts +0 -111
- package/src/mcp/server/index.ts +0 -1
- package/src/middlewares/elysia.test.ts +0 -295
- package/src/middlewares/elysia.ts +0 -116
- package/src/middlewares/express.test.ts +0 -371
- package/src/middlewares/express.ts +0 -140
- package/src/middlewares/hono.test.ts +0 -476
- package/src/middlewares/hono.ts +0 -153
- package/src/middlewares/internal/mppx.test.ts +0 -177
- package/src/middlewares/internal/mppx.ts +0 -67
- package/src/middlewares/nextjs.test.ts +0 -369
- package/src/middlewares/nextjs.ts +0 -107
- package/src/proxy/Proxy.test.ts +0 -1031
- package/src/proxy/Proxy.ts +0 -345
- package/src/proxy/Service.test.ts +0 -182
- package/src/proxy/Service.ts +0 -253
- package/src/proxy/index.ts +0 -6
- package/src/proxy/internal/Headers.test.ts +0 -139
- package/src/proxy/internal/Headers.ts +0 -66
- package/src/proxy/internal/Route.test.ts +0 -217
- package/src/proxy/internal/Route.ts +0 -64
- package/src/proxy/services/anthropic.test.ts +0 -132
- package/src/proxy/services/anthropic.ts +0 -52
- package/src/proxy/services/openai.test.ts +0 -157
- package/src/proxy/services/openai.ts +0 -59
- package/src/proxy/services/stripe.test.ts +0 -175
- package/src/proxy/services/stripe.ts +0 -58
- package/src/server/Methods.ts +0 -3
- package/src/server/Mppx.authorize.test.ts +0 -210
- package/src/server/Mppx.test-d.ts +0 -360
- package/src/server/Mppx.test.ts +0 -5813
- package/src/server/Mppx.ts +0 -2623
- package/src/server/NodeListener.test.ts +0 -293
- package/src/server/NodeListener.ts +0 -45
- package/src/server/Request.test.ts +0 -255
- package/src/server/Request.ts +0 -155
- package/src/server/Response.test.ts +0 -32
- package/src/server/Response.ts +0 -45
- package/src/server/Transport.test.ts +0 -598
- package/src/server/Transport.ts +0 -320
- package/src/server/index.ts +0 -9
- package/src/server/internal/html/compose.main.gen.ts +0 -2
- package/src/server/internal/html/compose.main.ts +0 -88
- package/src/server/internal/html/config.ts +0 -672
- package/src/server/internal/html/constants.ts +0 -28
- package/src/server/internal/html/serviceWorker.client.ts +0 -28
- package/src/server/internal/html/serviceWorker.gen.ts +0 -2
- package/src/server/internal/html/serviceWorker.ts +0 -27
- package/src/server/internal/html/tsconfig.compose.json +0 -8
- package/src/server/internal/html/tsconfig.worker.client.json +0 -8
- package/src/server/internal/html/tsconfig.worker.json +0 -8
- package/src/server/internal/scope.ts +0 -43
- package/src/stripe/Charge.integration.test.ts +0 -329
- package/src/stripe/Methods.test.ts +0 -62
- package/src/stripe/Methods.ts +0 -44
- package/src/stripe/client/Charge.test.ts +0 -205
- package/src/stripe/client/Charge.ts +0 -132
- package/src/stripe/client/Methods.ts +0 -37
- package/src/stripe/client/index.ts +0 -2
- package/src/stripe/index.ts +0 -1
- package/src/stripe/internal/constants.ts +0 -7
- package/src/stripe/internal/types.ts +0 -46
- package/src/stripe/server/Charge.test-d.ts +0 -66
- package/src/stripe/server/Charge.test.ts +0 -621
- package/src/stripe/server/Charge.ts +0 -434
- package/src/stripe/server/Methods.ts +0 -24
- package/src/stripe/server/index.ts +0 -2
- package/src/stripe/server/internal/html/main.ts +0 -165
- package/src/stripe/server/internal/html/node_modules/.bin/mppx +0 -22
- package/src/stripe/server/internal/html/node_modules/.bin/mppx.src +0 -22
- package/src/stripe/server/internal/html/package.json +0 -9
- package/src/stripe/server/internal/html/stripe-js-pure.d.ts +0 -7
- package/src/stripe/server/internal/html/tsconfig.json +0 -8
- package/src/stripe/server/internal/html/types.ts +0 -5
- package/src/stripe/server/internal/html.gen.ts +0 -2
- package/src/tempo/AccessKeyAuthorization.test.ts +0 -141
- package/src/tempo/Attribution.test.ts +0 -294
- package/src/tempo/Attribution.ts +0 -185
- package/src/tempo/Methods.test.ts +0 -425
- package/src/tempo/Methods.ts +0 -367
- package/src/tempo/Proof.conformance.test.ts +0 -146
- package/src/tempo/Proof.test-d.ts +0 -32
- package/src/tempo/Proof.test.ts +0 -40
- package/src/tempo/Proof.ts +0 -69
- package/src/tempo/PublicExports.test-d.ts +0 -130
- package/src/tempo/Subscription.integration.test.ts +0 -591
- package/src/tempo/client/Charge.test.ts +0 -501
- package/src/tempo/client/Charge.ts +0 -289
- package/src/tempo/client/Methods.ts +0 -45
- package/src/tempo/client/ResolveAccount.ts +0 -46
- package/src/tempo/client/Subscription.test.ts +0 -180
- package/src/tempo/client/Subscription.ts +0 -156
- package/src/tempo/client/index.ts +0 -17
- package/src/tempo/index.ts +0 -5
- package/src/tempo/internal/account.ts +0 -56
- package/src/tempo/internal/address.ts +0 -6
- package/src/tempo/internal/auto-swap.test.ts +0 -198
- package/src/tempo/internal/auto-swap.ts +0 -188
- package/src/tempo/internal/charge.test.ts +0 -66
- package/src/tempo/internal/charge.ts +0 -43
- package/src/tempo/internal/defaults.test.ts +0 -95
- package/src/tempo/internal/defaults.ts +0 -53
- package/src/tempo/internal/fee-payer.test.ts +0 -1177
- package/src/tempo/internal/fee-payer.ts +0 -808
- package/src/tempo/internal/fee-token.test.ts +0 -165
- package/src/tempo/internal/fee-token.ts +0 -72
- package/src/tempo/internal/proof.test.ts +0 -97
- package/src/tempo/internal/proof.ts +0 -87
- package/src/tempo/internal/selectors.ts +0 -10
- package/src/tempo/internal/types.ts +0 -19
- package/src/tempo/legacy/AccessKeyAuthorization.test.ts +0 -162
- package/src/tempo/legacy/README.md +0 -9
- package/src/tempo/legacy/client/ChannelOps.test.ts +0 -379
- package/src/tempo/legacy/client/ChannelOps.ts +0 -271
- package/src/tempo/legacy/client/Session.test.ts +0 -800
- package/src/tempo/legacy/client/Session.ts +0 -397
- package/src/tempo/legacy/client/SessionManager.test.ts +0 -468
- package/src/tempo/legacy/client/SessionManager.ts +0 -909
- package/src/tempo/legacy/client/index.ts +0 -6
- package/src/tempo/legacy/index.ts +0 -6
- package/src/tempo/legacy/server/Defaults.test-d.ts +0 -9
- package/src/tempo/legacy/server/Session.test.ts +0 -6370
- package/src/tempo/legacy/server/Session.ts +0 -1024
- package/src/tempo/legacy/server/index.ts +0 -4
- package/src/tempo/legacy/session/Chain.test.ts +0 -1349
- package/src/tempo/legacy/session/Chain.ts +0 -830
- package/src/tempo/legacy/session/Channel.test.ts +0 -109
- package/src/tempo/legacy/session/Channel.ts +0 -51
- package/src/tempo/legacy/session/ChannelStore.test.ts +0 -58
- package/src/tempo/legacy/session/ChannelStore.ts +0 -39
- package/src/tempo/legacy/session/Types.ts +0 -91
- package/src/tempo/legacy/session/Voucher.test.ts +0 -410
- package/src/tempo/legacy/session/Voucher.ts +0 -183
- package/src/tempo/legacy/session/escrow.abi.ts +0 -760
- package/src/tempo/legacy/session/index.ts +0 -8
- package/src/tempo/server/AtomicStore.test-d.ts +0 -50
- package/src/tempo/server/Charge.test.ts +0 -6121
- package/src/tempo/server/Charge.ts +0 -1351
- package/src/tempo/server/Methods.ts +0 -106
- package/src/tempo/server/Relay.test.ts +0 -677
- package/src/tempo/server/Relay.ts +0 -297
- package/src/tempo/server/SponsorBudget.test.ts +0 -154
- package/src/tempo/server/SponsorBudget.ts +0 -219
- package/src/tempo/server/Sse.test.ts +0 -321
- package/src/tempo/server/Subscription.test.ts +0 -1944
- package/src/tempo/server/Subscription.ts +0 -1333
- package/src/tempo/server/index.ts +0 -12
- package/src/tempo/server/internal/html/main.ts +0 -115
- package/src/tempo/server/internal/html/node_modules/.bin/mppx +0 -22
- package/src/tempo/server/internal/html/node_modules/.bin/mppx.src +0 -22
- package/src/tempo/server/internal/html/package.json +0 -10
- package/src/tempo/server/internal/html/tsconfig.json +0 -8
- package/src/tempo/server/internal/html.gen.ts +0 -2
- package/src/tempo/server/internal/request-body.test.ts +0 -210
- package/src/tempo/server/internal/request-body.ts +0 -61
- package/src/tempo/server/internal/transport.test.ts +0 -903
- package/src/tempo/server/internal/transport.ts +0 -310
- package/src/tempo/session/README.md +0 -208
- package/src/tempo/session/Snapshot.test.ts +0 -41
- package/src/tempo/session/Snapshot.ts +0 -95
- package/src/tempo/session/client/ChannelOps.test.ts +0 -218
- package/src/tempo/session/client/ChannelOps.ts +0 -348
- package/src/tempo/session/client/ChannelStore.ts +0 -111
- package/src/tempo/session/client/CredentialState.test.ts +0 -789
- package/src/tempo/session/client/CredentialState.ts +0 -942
- package/src/tempo/session/client/ReceiptCoordinator.ts +0 -95
- package/src/tempo/session/client/Runtime.test.ts +0 -1104
- package/src/tempo/session/client/Runtime.ts +0 -1008
- package/src/tempo/session/client/Session.test.ts +0 -1355
- package/src/tempo/session/client/Session.ts +0 -420
- package/src/tempo/session/client/SessionManager.test.ts +0 -1899
- package/src/tempo/session/client/SessionManager.ts +0 -996
- package/src/tempo/session/client/Transports.test.ts +0 -1141
- package/src/tempo/session/client/Transports.ts +0 -1534
- package/src/tempo/session/client/index.ts +0 -40
- package/src/tempo/session/client/internal/SessionManager.ts +0 -36
- package/src/tempo/session/index.ts +0 -7
- package/src/tempo/session/precompile/Chain.integration.test.ts +0 -339
- package/src/tempo/session/precompile/Chain.test.ts +0 -1641
- package/src/tempo/session/precompile/Chain.ts +0 -1149
- package/src/tempo/session/precompile/Channel.test.ts +0 -147
- package/src/tempo/session/precompile/Channel.ts +0 -108
- package/src/tempo/session/precompile/Protocol.test.ts +0 -358
- package/src/tempo/session/precompile/Protocol.ts +0 -520
- package/src/tempo/session/precompile/Voucher.test.ts +0 -354
- package/src/tempo/session/precompile/Voucher.ts +0 -162
- package/src/tempo/session/precompile/escrow.abi.ts +0 -226
- package/src/tempo/session/precompile/index.ts +0 -33
- package/src/tempo/session/server/ChannelOps.test.ts +0 -129
- package/src/tempo/session/server/ChannelOps.ts +0 -157
- package/src/tempo/session/server/ChannelStore.test.ts +0 -1093
- package/src/tempo/session/server/ChannelStore.ts +0 -835
- package/src/tempo/session/server/CredentialVerification.test.ts +0 -299
- package/src/tempo/session/server/CredentialVerification.ts +0 -775
- package/src/tempo/session/server/MeteredStream.ts +0 -95
- package/src/tempo/session/server/RequestState.test.ts +0 -574
- package/src/tempo/session/server/RequestState.ts +0 -507
- package/src/tempo/session/server/Session.integration.test.ts +0 -449
- package/src/tempo/session/server/Session.test.ts +0 -3862
- package/src/tempo/session/server/Session.ts +0 -570
- package/src/tempo/session/server/Settlement.test.ts +0 -345
- package/src/tempo/session/server/Settlement.ts +0 -527
- package/src/tempo/session/server/Sse.fuzz.test.ts +0 -138
- package/src/tempo/session/server/Sse.test.ts +0 -557
- package/src/tempo/session/server/Sse.ts +0 -254
- package/src/tempo/session/server/Transports.test.ts +0 -346
- package/src/tempo/session/server/Transports.ts +0 -255
- package/src/tempo/session/server/Ws.test.ts +0 -594
- package/src/tempo/session/server/Ws.ts +0 -385
- package/src/tempo/session/server/index.ts +0 -12
- package/src/tempo/subscription/KeyAuthorization.test.ts +0 -282
- package/src/tempo/subscription/KeyAuthorization.ts +0 -396
- package/src/tempo/subscription/Receipt.ts +0 -28
- package/src/tempo/subscription/Store.test.ts +0 -609
- package/src/tempo/subscription/Store.ts +0 -449
- package/src/tempo/subscription/Types.ts +0 -68
- package/src/tempo/subscription/index.ts +0 -23
- package/src/tsconfig.json +0 -10
- package/src/validation/core.ts +0 -386
- package/src/validation/index.ts +0 -11
- package/src/viem/Account.test.ts +0 -72
- package/src/viem/Account.ts +0 -30
- package/src/viem/Client.test.ts +0 -366
- package/src/viem/Client.ts +0 -93
- package/src/x402/Assets.test.ts +0 -253
- package/src/x402/Assets.ts +0 -221
- package/src/x402/Exact.e2e.test.ts +0 -448
- package/src/x402/Exact.localnet.test.ts +0 -475
- package/src/x402/Header.test.ts +0 -73
- package/src/x402/Header.ts +0 -79
- package/src/x402/PublicInterface.test-d.ts +0 -39
- package/src/x402/Types.ts +0 -248
- package/src/x402/client/Exact.test.ts +0 -309
- package/src/x402/client/Exact.ts +0 -186
- package/src/x402/index.ts +0 -6
- package/src/x402/internal/ChallengeBrand.ts +0 -14
- package/src/x402/internal/RouteBinding.ts +0 -18
- package/src/x402/server/EvmCharge.ts +0 -394
- package/src/x402/server/Facilitator.test.ts +0 -111
- package/src/x402/server/Facilitator.ts +0 -56
- package/src/zod.test.ts +0 -169
- package/src/zod.ts +0 -71
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as HttpMessageSignature from '../../attestation/internal/HttpMessageSignature.js';
|
|
2
|
+
import { Constants } from '../Constants.js';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a TAP request signer.
|
|
5
|
+
*
|
|
6
|
+
* The signer emits RFC 9421 HTTP message signatures with TAP's
|
|
7
|
+
* `agent-browser-auth` or `agent-payer-auth` tag. Pass it to
|
|
8
|
+
* `Attestation.Client.wrapFetch` so MPPX signs both the initial request and
|
|
9
|
+
* its automatic paid retry.
|
|
10
|
+
*/
|
|
11
|
+
export function signer(config) {
|
|
12
|
+
const tag = config.intent === Constants.intents.payment ? Constants.tags.payment : Constants.tags.browse;
|
|
13
|
+
const expiresIn = config.expiresIn ?? Constants.defaultSignatureLifetime;
|
|
14
|
+
if (!Number.isInteger(expiresIn) ||
|
|
15
|
+
expiresIn <= 0 ||
|
|
16
|
+
expiresIn > Constants.maximumSignatureLifetime)
|
|
17
|
+
throw new RangeError(`TAP expiresIn must be an integer from 1 to ${Constants.maximumSignatureLifetime}.`);
|
|
18
|
+
return {
|
|
19
|
+
protocol: Constants.protocol,
|
|
20
|
+
sign(request, context) {
|
|
21
|
+
return HttpMessageSignature.sign(request, {
|
|
22
|
+
components: Constants.requiredComponents,
|
|
23
|
+
context,
|
|
24
|
+
expiresIn,
|
|
25
|
+
key: config.key,
|
|
26
|
+
keyId: config.keyId,
|
|
27
|
+
label: config.label ?? Constants.label,
|
|
28
|
+
tag,
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type * as Attestation from '../../attestation/Types.js';
|
|
2
|
+
import type * as Store from '../../Store.js';
|
|
3
|
+
import type * as Types from '../Types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Creates a verifier for TAP agent-recognition signatures.
|
|
6
|
+
*
|
|
7
|
+
* TAP verifies trusted agent participation and request integrity. Consumer
|
|
8
|
+
* recognition and payment-container verification stay protocol-specific and
|
|
9
|
+
* are intentionally not inferred from this header-only verifier.
|
|
10
|
+
*/
|
|
11
|
+
export declare function verifier(config: verifier.Config): Attestation.Verifier<Types.VerifiedRequest>;
|
|
12
|
+
export declare namespace verifier {
|
|
13
|
+
type Config = {
|
|
14
|
+
/** Resolves a TAP-approved public key by its `keyid` and signature algorithm. */
|
|
15
|
+
keyResolver: Attestation.KeyResolver;
|
|
16
|
+
/** Atomically consumes each nonce in shared storage for multi-instance deployments. */
|
|
17
|
+
nonceStore: Store.AtomicStore;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as HttpMessageSignature from '../../attestation/internal/HttpMessageSignature.js';
|
|
2
|
+
import { Constants } from '../Constants.js';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a verifier for TAP agent-recognition signatures.
|
|
5
|
+
*
|
|
6
|
+
* TAP verifies trusted agent participation and request integrity. Consumer
|
|
7
|
+
* recognition and payment-container verification stay protocol-specific and
|
|
8
|
+
* are intentionally not inferred from this header-only verifier.
|
|
9
|
+
*/
|
|
10
|
+
export function verifier(config) {
|
|
11
|
+
return {
|
|
12
|
+
async verify(request) {
|
|
13
|
+
const result = await HttpMessageSignature.verify(request, {
|
|
14
|
+
keyResolver: config.keyResolver,
|
|
15
|
+
maxAge: Constants.maximumSignatureLifetime,
|
|
16
|
+
nonceNamespace: Constants.protocol,
|
|
17
|
+
nonceStore: config.nonceStore,
|
|
18
|
+
requiredComponents: Constants.requiredComponents,
|
|
19
|
+
tag: [Constants.tags.browse, Constants.tags.payment],
|
|
20
|
+
});
|
|
21
|
+
if (result.status !== 'verified')
|
|
22
|
+
return result;
|
|
23
|
+
return {
|
|
24
|
+
status: 'verified',
|
|
25
|
+
value: {
|
|
26
|
+
keyId: result.input.keyId,
|
|
27
|
+
nonce: result.input.nonce,
|
|
28
|
+
intent: result.input.tag === Constants.tags.payment
|
|
29
|
+
? Constants.intents.payment
|
|
30
|
+
: Constants.intents.browse,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
/** First 4 bytes of keccak256("mpp") — the on-chain MPP tag. */
|
|
23
23
|
export declare const tag: `0x${string}`;
|
|
24
24
|
/** 10 zero bytes representing an anonymous (no clientId) client. */
|
|
25
|
-
export declare const anonymous:
|
|
25
|
+
export declare const anonymous: '0x00000000000000000000';
|
|
26
26
|
/**
|
|
27
27
|
* Encodes an MPP attribution memo as a `bytes32` hex string.
|
|
28
28
|
*
|
package/dist/tempo/Methods.d.ts
CHANGED
|
@@ -2,14 +2,14 @@ import type { Account } from 'viem';
|
|
|
2
2
|
import * as z from '../zod.js';
|
|
3
3
|
import type { SessionSnapshot } from './session/client/Runtime.js';
|
|
4
4
|
import type * as PrecompileChannel from './session/precompile/Channel.js';
|
|
5
|
-
export declare const chargeModes: readonly [
|
|
5
|
+
export declare const chargeModes: readonly ['push', 'pull'];
|
|
6
6
|
export type ChargeMode = (typeof chargeModes)[number];
|
|
7
7
|
export type SubscriptionPeriodCountInput = string | number | bigint;
|
|
8
8
|
declare const subscriptionAccessKey: z.ZodMiniObject<{
|
|
9
9
|
accessKeyAddress: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<`0x${string}`, string>>;
|
|
10
10
|
keyType: z.ZodMiniEnum<{
|
|
11
|
-
secp256k1: "secp256k1";
|
|
12
11
|
p256: "p256";
|
|
12
|
+
secp256k1: "secp256k1";
|
|
13
13
|
webAuthn: "webAuthn";
|
|
14
14
|
}>;
|
|
15
15
|
}, z.core.$strip>;
|
|
@@ -22,8 +22,8 @@ export declare const charge: {
|
|
|
22
22
|
readonly name: "tempo";
|
|
23
23
|
readonly intent: "charge";
|
|
24
24
|
readonly schema: {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
credential: {
|
|
26
|
+
payload: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
27
27
|
hash: z.ZodMiniString<string>;
|
|
28
28
|
type: z.ZodMiniLiteral<"hash">;
|
|
29
29
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
@@ -34,7 +34,8 @@ export declare const charge: {
|
|
|
34
34
|
type: z.ZodMiniLiteral<"proof">;
|
|
35
35
|
}, z.core.$strip>], "type">;
|
|
36
36
|
};
|
|
37
|
-
|
|
37
|
+
request: z.ZodMiniPipe<z.ZodMiniObject<{
|
|
38
|
+
machineTokenEnabled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
38
39
|
amount: z.ZodMiniString<string>;
|
|
39
40
|
chainId: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
40
41
|
currency: z.ZodMiniString<string>;
|
|
@@ -50,31 +51,33 @@ export declare const charge: {
|
|
|
50
51
|
recipient: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<`0x${string}`, string>>;
|
|
51
52
|
}, z.core.$strip>>>;
|
|
52
53
|
supportedModes: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniEnum<{
|
|
53
|
-
push: "push";
|
|
54
54
|
pull: "pull";
|
|
55
|
+
push: "push";
|
|
55
56
|
}>>>;
|
|
56
57
|
}, z.core.$strip>, z.ZodMiniTransform<{
|
|
58
|
+
currency: string;
|
|
59
|
+
description?: string | undefined;
|
|
60
|
+
externalId?: string | undefined;
|
|
61
|
+
recipient?: string | undefined;
|
|
62
|
+
amount: string;
|
|
57
63
|
methodDetails?: {
|
|
58
|
-
|
|
64
|
+
machineTokenEnabled?: boolean | undefined;
|
|
65
|
+
chainId?: number | undefined;
|
|
66
|
+
feePayer?: boolean | undefined;
|
|
67
|
+
memo?: string | undefined;
|
|
59
68
|
splits?: {
|
|
60
|
-
amount: string;
|
|
61
|
-
recipient: `0x${string}`;
|
|
62
69
|
memo?: string | undefined;
|
|
70
|
+
recipient: `0x${string}`;
|
|
71
|
+
amount: string;
|
|
63
72
|
}[] | undefined;
|
|
64
|
-
|
|
65
|
-
feePayer?: boolean | undefined;
|
|
66
|
-
chainId?: number | undefined;
|
|
73
|
+
supportedModes?: ("pull" | "push")[] | undefined;
|
|
67
74
|
} | undefined;
|
|
68
|
-
amount: string;
|
|
69
|
-
currency: string;
|
|
70
|
-
description?: string | undefined;
|
|
71
|
-
externalId?: string | undefined;
|
|
72
|
-
recipient?: string | undefined;
|
|
73
75
|
}, {
|
|
76
|
+
machineTokenEnabled?: boolean | undefined;
|
|
74
77
|
amount: string;
|
|
78
|
+
chainId?: number | undefined;
|
|
75
79
|
currency: string;
|
|
76
80
|
decimals: number;
|
|
77
|
-
chainId?: number | undefined;
|
|
78
81
|
description?: string | undefined;
|
|
79
82
|
externalId?: string | undefined;
|
|
80
83
|
feePayer?: boolean | undefined;
|
|
@@ -82,10 +85,10 @@ export declare const charge: {
|
|
|
82
85
|
recipient?: string | undefined;
|
|
83
86
|
splits?: {
|
|
84
87
|
amount: string;
|
|
85
|
-
recipient: `0x${string}`;
|
|
86
88
|
memo?: string | undefined;
|
|
89
|
+
recipient: `0x${string}`;
|
|
87
90
|
}[] | undefined;
|
|
88
|
-
supportedModes?: ("
|
|
91
|
+
supportedModes?: ("pull" | "push")[] | undefined;
|
|
89
92
|
}>>;
|
|
90
93
|
};
|
|
91
94
|
};
|
|
@@ -99,9 +102,10 @@ export declare const session: {
|
|
|
99
102
|
readonly name: "tempo";
|
|
100
103
|
readonly intent: "session";
|
|
101
104
|
readonly schema: {
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
credential: {
|
|
106
|
+
payload: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
104
107
|
action: z.ZodMiniLiteral<"open">;
|
|
108
|
+
authorizationSignature: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
105
109
|
authorizedSigner: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
106
110
|
channelId: z.ZodMiniString<string>;
|
|
107
111
|
cumulativeAmount: z.ZodMiniString<string>;
|
|
@@ -118,19 +122,22 @@ export declare const session: {
|
|
|
118
122
|
type: z.ZodMiniLiteral<"transaction">;
|
|
119
123
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
120
124
|
action: z.ZodMiniLiteral<"voucher">;
|
|
125
|
+
authorizationSignature: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
121
126
|
channelId: z.ZodMiniString<string>;
|
|
122
127
|
cumulativeAmount: z.ZodMiniString<string>;
|
|
123
128
|
descriptor: z.ZodMiniOptional<z.ZodMiniCustom<PrecompileChannel.ChannelDescriptor, PrecompileChannel.ChannelDescriptor>>;
|
|
124
129
|
signature: z.ZodMiniString<string>;
|
|
125
130
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
126
131
|
action: z.ZodMiniLiteral<"close">;
|
|
132
|
+
authorizationSignature: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
127
133
|
channelId: z.ZodMiniString<string>;
|
|
128
134
|
cumulativeAmount: z.ZodMiniString<string>;
|
|
129
135
|
descriptor: z.ZodMiniOptional<z.ZodMiniCustom<PrecompileChannel.ChannelDescriptor, PrecompileChannel.ChannelDescriptor>>;
|
|
136
|
+
refundSignature: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
130
137
|
signature: z.ZodMiniString<string>;
|
|
131
138
|
}, z.core.$strip>], "action">;
|
|
132
139
|
};
|
|
133
|
-
|
|
140
|
+
request: z.ZodMiniPipe<z.ZodMiniObject<{
|
|
134
141
|
amount: z.ZodMiniString<string>;
|
|
135
142
|
chainId: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
136
143
|
channelId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -138,6 +145,8 @@ export declare const session: {
|
|
|
138
145
|
decimals: z.ZodMiniNumber<number>;
|
|
139
146
|
escrowContract: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
140
147
|
feePayer: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniCustom<Account, Account>]>, z.ZodMiniTransform<boolean, boolean | Account>>>;
|
|
148
|
+
feeToken: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
149
|
+
machineTokenEnabled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
141
150
|
minVoucherDelta: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
142
151
|
operator: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
143
152
|
recipient: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -149,36 +158,40 @@ export declare const session: {
|
|
|
149
158
|
suggestedDeposit: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
150
159
|
unitType: z.ZodMiniString<string>;
|
|
151
160
|
}, z.core.$strip>, z.ZodMiniTransform<{
|
|
161
|
+
currency: string;
|
|
162
|
+
recipient?: string | undefined;
|
|
163
|
+
unitType: string;
|
|
164
|
+
amount: string;
|
|
165
|
+
suggestedDeposit?: string | undefined;
|
|
152
166
|
methodDetails: {
|
|
153
|
-
sessionSnapshot?: SessionSnapshot | undefined;
|
|
154
|
-
sessionProtocol?: "v1" | "v2" | undefined;
|
|
155
|
-
operator?: string | undefined;
|
|
156
|
-
feePayer?: boolean | undefined;
|
|
157
|
-
chainId?: number | undefined;
|
|
158
|
-
minVoucherDelta?: string | undefined;
|
|
159
|
-
channelId?: string | undefined;
|
|
160
167
|
escrowContract: string | undefined;
|
|
168
|
+
channelId?: string | undefined;
|
|
169
|
+
minVoucherDelta?: string | undefined;
|
|
170
|
+
chainId?: number | undefined;
|
|
171
|
+
feePayer?: boolean | undefined;
|
|
172
|
+
feeToken?: string | undefined;
|
|
173
|
+
machineTokenEnabled?: boolean | undefined;
|
|
174
|
+
operator?: string | undefined;
|
|
175
|
+
sessionProtocol?: "v1" | "v2" | undefined;
|
|
176
|
+
sessionSnapshot?: SessionSnapshot | undefined;
|
|
161
177
|
};
|
|
162
|
-
suggestedDeposit?: string | undefined;
|
|
163
|
-
amount: string;
|
|
164
|
-
currency: string;
|
|
165
|
-
unitType: string;
|
|
166
|
-
recipient?: string | undefined;
|
|
167
178
|
}, {
|
|
168
179
|
amount: string;
|
|
169
|
-
currency: string;
|
|
170
|
-
decimals: number;
|
|
171
|
-
unitType: string;
|
|
172
180
|
chainId?: number | undefined;
|
|
173
181
|
channelId?: string | undefined;
|
|
182
|
+
currency: string;
|
|
183
|
+
decimals: number;
|
|
174
184
|
escrowContract?: string | undefined;
|
|
175
185
|
feePayer?: boolean | undefined;
|
|
186
|
+
feeToken?: string | undefined;
|
|
187
|
+
machineTokenEnabled?: boolean | undefined;
|
|
176
188
|
minVoucherDelta?: string | undefined;
|
|
177
189
|
operator?: string | undefined;
|
|
178
190
|
recipient?: string | undefined;
|
|
179
191
|
sessionProtocol?: "v1" | "v2" | undefined;
|
|
180
192
|
sessionSnapshot?: SessionSnapshot | undefined;
|
|
181
193
|
suggestedDeposit?: string | undefined;
|
|
194
|
+
unitType: string;
|
|
182
195
|
}>>;
|
|
183
196
|
};
|
|
184
197
|
};
|
|
@@ -191,19 +204,19 @@ export declare const subscription: {
|
|
|
191
204
|
readonly name: "tempo";
|
|
192
205
|
readonly intent: "subscription";
|
|
193
206
|
readonly schema: {
|
|
194
|
-
|
|
195
|
-
|
|
207
|
+
credential: {
|
|
208
|
+
payload: z.ZodMiniObject<{
|
|
196
209
|
signature: z.ZodMiniString<string>;
|
|
197
210
|
type: z.ZodMiniLiteral<"keyAuthorization">;
|
|
198
211
|
}, z.core.$strip>;
|
|
199
212
|
};
|
|
200
|
-
|
|
213
|
+
request: z.ZodMiniPipe<z.ZodMiniObject<{
|
|
201
214
|
amount: z.ZodMiniString<string>;
|
|
202
215
|
accessKey: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
203
216
|
accessKeyAddress: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<`0x${string}`, string>>;
|
|
204
217
|
keyType: z.ZodMiniEnum<{
|
|
205
|
-
secp256k1: "secp256k1";
|
|
206
218
|
p256: "p256";
|
|
219
|
+
secp256k1: "secp256k1";
|
|
207
220
|
webAuthn: "webAuthn";
|
|
208
221
|
}>;
|
|
209
222
|
}, z.core.$strip>>;
|
|
@@ -216,8 +229,8 @@ export declare const subscription: {
|
|
|
216
229
|
accessKey: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
217
230
|
accessKeyAddress: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<`0x${string}`, string>>;
|
|
218
231
|
keyType: z.ZodMiniEnum<{
|
|
219
|
-
secp256k1: "secp256k1";
|
|
220
232
|
p256: "p256";
|
|
233
|
+
secp256k1: "secp256k1";
|
|
221
234
|
webAuthn: "webAuthn";
|
|
222
235
|
}>;
|
|
223
236
|
}, z.core.$strip>>;
|
|
@@ -225,47 +238,47 @@ export declare const subscription: {
|
|
|
225
238
|
}, z.core.$strip>>;
|
|
226
239
|
periodCount: z.ZodMiniPipe<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniBigInt<bigint>, z.ZodMiniCustom<number, number>]>, z.ZodMiniTransform<string, string | number | bigint>>;
|
|
227
240
|
periodUnit: z.ZodMiniEnum<{
|
|
228
|
-
dev_second: "dev_second";
|
|
229
241
|
day: "day";
|
|
242
|
+
dev_second: "dev_second";
|
|
230
243
|
week: "week";
|
|
231
244
|
}>;
|
|
232
245
|
recipient: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<`0x${string}`, string>>;
|
|
233
246
|
subscriptionExpires: z.ZodMiniPipe<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniCustom<Date, Date>]>, z.ZodMiniTransform<Date, z.DatetimeInput>>;
|
|
234
247
|
}, z.core.$strip>, z.ZodMiniTransform<{
|
|
248
|
+
currency: `0x${string}`;
|
|
249
|
+
description?: string | undefined;
|
|
250
|
+
externalId?: string | undefined;
|
|
251
|
+
periodCount: string;
|
|
252
|
+
periodUnit: "day" | "dev_second" | "week";
|
|
253
|
+
recipient: `0x${string}`;
|
|
254
|
+
amount: string;
|
|
255
|
+
subscriptionExpires: string;
|
|
235
256
|
methodDetails?: {
|
|
236
257
|
accessKey?: z.infer<typeof subscriptionAccessKey> | undefined;
|
|
237
258
|
chainId?: number | undefined;
|
|
238
259
|
} | undefined;
|
|
239
|
-
amount: string;
|
|
240
|
-
subscriptionExpires: string;
|
|
241
|
-
currency: `0x${string}`;
|
|
242
|
-
periodCount: string;
|
|
243
|
-
periodUnit: "dev_second" | "day" | "week";
|
|
244
|
-
recipient: `0x${string}`;
|
|
245
|
-
description?: string | undefined;
|
|
246
|
-
externalId?: string | undefined;
|
|
247
260
|
}, {
|
|
248
261
|
amount: string;
|
|
249
|
-
currency: `0x${string}`;
|
|
250
|
-
decimals: number;
|
|
251
|
-
periodCount: string;
|
|
252
|
-
periodUnit: "dev_second" | "day" | "week";
|
|
253
|
-
recipient: `0x${string}`;
|
|
254
|
-
subscriptionExpires: Date;
|
|
255
262
|
accessKey?: {
|
|
256
263
|
accessKeyAddress: `0x${string}`;
|
|
257
|
-
keyType: "
|
|
264
|
+
keyType: "p256" | "secp256k1" | "webAuthn";
|
|
258
265
|
} | undefined;
|
|
259
266
|
chainId?: number | undefined;
|
|
267
|
+
currency: `0x${string}`;
|
|
268
|
+
decimals: number;
|
|
260
269
|
description?: string | undefined;
|
|
261
270
|
externalId?: string | undefined;
|
|
262
271
|
methodDetails?: {
|
|
263
272
|
accessKey?: {
|
|
264
273
|
accessKeyAddress: `0x${string}`;
|
|
265
|
-
keyType: "
|
|
274
|
+
keyType: "p256" | "secp256k1" | "webAuthn";
|
|
266
275
|
} | undefined;
|
|
267
276
|
chainId?: number | undefined;
|
|
268
277
|
} | undefined;
|
|
278
|
+
periodCount: string;
|
|
279
|
+
periodUnit: "day" | "dev_second" | "week";
|
|
280
|
+
recipient: `0x${string}`;
|
|
281
|
+
subscriptionExpires: Date;
|
|
269
282
|
}>>;
|
|
270
283
|
};
|
|
271
284
|
};
|
package/dist/tempo/Methods.js
CHANGED
|
@@ -82,6 +82,7 @@ export const charge = Method.from({
|
|
|
82
82
|
},
|
|
83
83
|
request: z.pipe(z
|
|
84
84
|
.object({
|
|
85
|
+
machineTokenEnabled: z.optional(z.boolean()),
|
|
85
86
|
amount: z.amount(),
|
|
86
87
|
chainId: z.optional(z.number()),
|
|
87
88
|
currency: z.string(),
|
|
@@ -101,16 +102,18 @@ export const charge = Method.from({
|
|
|
101
102
|
const splitTotal = splits.reduce((sum, split) => sum + parseUnits(split.amount, decimals), 0n);
|
|
102
103
|
return (splits.every((split) => parseUnits(split.amount, decimals) > 0n) &&
|
|
103
104
|
splitTotal < totalAmount);
|
|
104
|
-
}, 'Invalid splits')), z.transform(({ amount, chainId, decimals, feePayer, memo, splits, supportedModes, ...rest }) => ({
|
|
105
|
+
}, 'Invalid splits')), z.transform(({ machineTokenEnabled, amount, chainId, decimals, feePayer, memo, splits, supportedModes, ...rest }) => ({
|
|
105
106
|
...rest,
|
|
106
107
|
amount: parseUnits(amount, decimals).toString(),
|
|
107
|
-
...(
|
|
108
|
+
...(machineTokenEnabled !== undefined ||
|
|
109
|
+
chainId !== undefined ||
|
|
108
110
|
feePayer !== undefined ||
|
|
109
111
|
memo !== undefined ||
|
|
110
112
|
splits !== undefined ||
|
|
111
113
|
supportedModes !== undefined
|
|
112
114
|
? {
|
|
113
115
|
methodDetails: {
|
|
116
|
+
...(machineTokenEnabled !== undefined && { machineTokenEnabled }),
|
|
114
117
|
...(chainId !== undefined && { chainId }),
|
|
115
118
|
...(feePayer !== undefined && { feePayer }),
|
|
116
119
|
...(memo !== undefined && { memo }),
|
|
@@ -141,6 +144,7 @@ export const session = Method.from({
|
|
|
141
144
|
payload: z.discriminatedUnion('action', [
|
|
142
145
|
z.object({
|
|
143
146
|
action: z.literal('open'),
|
|
147
|
+
authorizationSignature: z.optional(z.signature()),
|
|
144
148
|
authorizedSigner: z.optional(z.string()),
|
|
145
149
|
channelId: z.hash(),
|
|
146
150
|
cumulativeAmount: z.amount(),
|
|
@@ -159,6 +163,7 @@ export const session = Method.from({
|
|
|
159
163
|
}),
|
|
160
164
|
z.object({
|
|
161
165
|
action: z.literal('voucher'),
|
|
166
|
+
authorizationSignature: z.optional(z.signature()),
|
|
162
167
|
channelId: z.hash(),
|
|
163
168
|
cumulativeAmount: z.amount(),
|
|
164
169
|
descriptor: z.optional(z.custom()),
|
|
@@ -166,9 +171,11 @@ export const session = Method.from({
|
|
|
166
171
|
}),
|
|
167
172
|
z.object({
|
|
168
173
|
action: z.literal('close'),
|
|
174
|
+
authorizationSignature: z.optional(z.signature()),
|
|
169
175
|
channelId: z.hash(),
|
|
170
176
|
cumulativeAmount: z.amount(),
|
|
171
177
|
descriptor: z.optional(z.custom()),
|
|
178
|
+
refundSignature: z.optional(z.signature()),
|
|
172
179
|
signature: z.signature(),
|
|
173
180
|
}),
|
|
174
181
|
]),
|
|
@@ -182,6 +189,8 @@ export const session = Method.from({
|
|
|
182
189
|
decimals: z.number(),
|
|
183
190
|
escrowContract: z.optional(z.string()),
|
|
184
191
|
feePayer: z.optional(z.pipe(z.union([z.boolean(), z.custom()]), z.transform((v) => (typeof v === 'object' ? true : v)))),
|
|
192
|
+
feeToken: z.optional(z.address()),
|
|
193
|
+
machineTokenEnabled: z.optional(z.boolean()),
|
|
185
194
|
minVoucherDelta: z.optional(z.amount()),
|
|
186
195
|
operator: z.optional(z.address()),
|
|
187
196
|
recipient: z.optional(z.string()),
|
|
@@ -190,7 +199,7 @@ export const session = Method.from({
|
|
|
190
199
|
suggestedDeposit: z.optional(z.amount()),
|
|
191
200
|
unitType: z.string(),
|
|
192
201
|
})
|
|
193
|
-
.check(z.refine(({ amount, decimals }) => parseUnits(amount, decimals) > 0n, 'Session amount must be greater than 0')), z.transform(({ amount, chainId, channelId, decimals, escrowContract, feePayer, minVoucherDelta, operator, sessionProtocol, sessionSnapshot, suggestedDeposit, ...rest }) => ({
|
|
202
|
+
.check(z.refine(({ amount, decimals }) => parseUnits(amount, decimals) > 0n, 'Session amount must be greater than 0')), z.transform(({ amount, chainId, channelId, decimals, escrowContract, feePayer, feeToken, machineTokenEnabled, minVoucherDelta, operator, sessionProtocol, sessionSnapshot, suggestedDeposit, ...rest }) => ({
|
|
194
203
|
...rest,
|
|
195
204
|
amount: parseUnits(amount, decimals).toString(),
|
|
196
205
|
...(suggestedDeposit
|
|
@@ -206,6 +215,8 @@ export const session = Method.from({
|
|
|
206
215
|
}),
|
|
207
216
|
...(chainId !== undefined && { chainId }),
|
|
208
217
|
...(feePayer !== undefined && { feePayer }),
|
|
218
|
+
...(feeToken !== undefined && { feeToken }),
|
|
219
|
+
...(machineTokenEnabled !== undefined && { machineTokenEnabled }),
|
|
209
220
|
...(operator !== undefined && { operator }),
|
|
210
221
|
...(sessionProtocol !== undefined && {
|
|
211
222
|
[Constants.MethodDetailKeys.sessionProtocol]: sessionProtocol,
|
package/dist/tempo/Proof.d.ts
CHANGED
|
@@ -9,20 +9,20 @@ export declare const primaryType: "Proof";
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const types: {
|
|
11
11
|
readonly Proof: readonly [{
|
|
12
|
-
readonly name:
|
|
13
|
-
readonly type:
|
|
12
|
+
readonly name: 'account';
|
|
13
|
+
readonly type: 'address';
|
|
14
14
|
}, {
|
|
15
|
-
readonly name:
|
|
16
|
-
readonly type:
|
|
15
|
+
readonly name: 'challengeId';
|
|
16
|
+
readonly type: 'string';
|
|
17
17
|
}, {
|
|
18
|
-
readonly name:
|
|
19
|
-
readonly type:
|
|
18
|
+
readonly name: 'realm';
|
|
19
|
+
readonly type: 'string';
|
|
20
20
|
}];
|
|
21
21
|
};
|
|
22
22
|
/** Constructs the EIP-712 domain for a Tempo proof credential. */
|
|
23
23
|
export declare function domain(chainId: number): {
|
|
24
|
-
readonly name:
|
|
25
|
-
readonly version:
|
|
24
|
+
readonly name: 'MPP';
|
|
25
|
+
readonly version: '3';
|
|
26
26
|
readonly chainId: number;
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
@@ -53,20 +53,20 @@ export declare function typedData(parameters: {
|
|
|
53
53
|
realm: string;
|
|
54
54
|
}): {
|
|
55
55
|
readonly domain: {
|
|
56
|
-
readonly name:
|
|
57
|
-
readonly version:
|
|
56
|
+
readonly name: 'MPP';
|
|
57
|
+
readonly version: '3';
|
|
58
58
|
readonly chainId: number;
|
|
59
59
|
};
|
|
60
60
|
readonly types: {
|
|
61
61
|
readonly Proof: readonly [{
|
|
62
|
-
readonly name:
|
|
63
|
-
readonly type:
|
|
62
|
+
readonly name: 'account';
|
|
63
|
+
readonly type: 'address';
|
|
64
64
|
}, {
|
|
65
|
-
readonly name:
|
|
66
|
-
readonly type:
|
|
65
|
+
readonly name: 'challengeId';
|
|
66
|
+
readonly type: 'string';
|
|
67
67
|
}, {
|
|
68
|
-
readonly name:
|
|
69
|
-
readonly type:
|
|
68
|
+
readonly name: 'realm';
|
|
69
|
+
readonly type: 'string';
|
|
70
70
|
}];
|
|
71
71
|
};
|
|
72
72
|
readonly primaryType: "Proof";
|
|
@@ -29,8 +29,8 @@ export declare function charge(parameters?: charge.Parameters): Method.Client<{
|
|
|
29
29
|
readonly name: "tempo";
|
|
30
30
|
readonly intent: "charge";
|
|
31
31
|
readonly schema: {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
credential: {
|
|
33
|
+
payload: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
34
34
|
hash: z.ZodMiniString<string>;
|
|
35
35
|
type: z.ZodMiniLiteral<"hash">;
|
|
36
36
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
@@ -41,7 +41,8 @@ export declare function charge(parameters?: charge.Parameters): Method.Client<{
|
|
|
41
41
|
type: z.ZodMiniLiteral<"proof">;
|
|
42
42
|
}, z.core.$strip>], "type">;
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
request: z.ZodMiniPipe<z.ZodMiniObject<{
|
|
45
|
+
machineTokenEnabled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
45
46
|
amount: z.ZodMiniString<string>;
|
|
46
47
|
chainId: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
47
48
|
currency: z.ZodMiniString<string>;
|
|
@@ -57,31 +58,33 @@ export declare function charge(parameters?: charge.Parameters): Method.Client<{
|
|
|
57
58
|
recipient: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<`0x${string}`, string>>;
|
|
58
59
|
}, z.core.$strip>>>;
|
|
59
60
|
supportedModes: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniEnum<{
|
|
60
|
-
push: "push";
|
|
61
61
|
pull: "pull";
|
|
62
|
+
push: "push";
|
|
62
63
|
}>>>;
|
|
63
64
|
}, z.core.$strip>, z.ZodMiniTransform<{
|
|
65
|
+
currency: string;
|
|
66
|
+
description?: string | undefined;
|
|
67
|
+
externalId?: string | undefined;
|
|
68
|
+
recipient?: string | undefined;
|
|
69
|
+
amount: string;
|
|
64
70
|
methodDetails?: {
|
|
65
|
-
|
|
71
|
+
machineTokenEnabled?: boolean | undefined;
|
|
72
|
+
chainId?: number | undefined;
|
|
73
|
+
feePayer?: boolean | undefined;
|
|
74
|
+
memo?: string | undefined;
|
|
66
75
|
splits?: {
|
|
67
|
-
amount: string;
|
|
68
|
-
recipient: `0x${string}`;
|
|
69
76
|
memo?: string | undefined;
|
|
77
|
+
recipient: `0x${string}`;
|
|
78
|
+
amount: string;
|
|
70
79
|
}[] | undefined;
|
|
71
|
-
|
|
72
|
-
feePayer?: boolean | undefined;
|
|
73
|
-
chainId?: number | undefined;
|
|
80
|
+
supportedModes?: ("pull" | "push")[] | undefined;
|
|
74
81
|
} | undefined;
|
|
75
|
-
amount: string;
|
|
76
|
-
currency: string;
|
|
77
|
-
description?: string | undefined;
|
|
78
|
-
externalId?: string | undefined;
|
|
79
|
-
recipient?: string | undefined;
|
|
80
82
|
}, {
|
|
83
|
+
machineTokenEnabled?: boolean | undefined;
|
|
81
84
|
amount: string;
|
|
85
|
+
chainId?: number | undefined;
|
|
82
86
|
currency: string;
|
|
83
87
|
decimals: number;
|
|
84
|
-
chainId?: number | undefined;
|
|
85
88
|
description?: string | undefined;
|
|
86
89
|
externalId?: string | undefined;
|
|
87
90
|
feePayer?: boolean | undefined;
|
|
@@ -89,18 +92,18 @@ export declare function charge(parameters?: charge.Parameters): Method.Client<{
|
|
|
89
92
|
recipient?: string | undefined;
|
|
90
93
|
splits?: {
|
|
91
94
|
amount: string;
|
|
92
|
-
recipient: `0x${string}`;
|
|
93
95
|
memo?: string | undefined;
|
|
96
|
+
recipient: `0x${string}`;
|
|
94
97
|
}[] | undefined;
|
|
95
|
-
supportedModes?: ("
|
|
98
|
+
supportedModes?: ("pull" | "push")[] | undefined;
|
|
96
99
|
}>>;
|
|
97
100
|
};
|
|
98
101
|
}, z.ZodMiniObject<{
|
|
99
102
|
account: z.ZodMiniOptional<z.ZodMiniCustom<`0x${string}` | Account.Account | undefined, `0x${string}` | Account.Account | undefined>>;
|
|
100
103
|
autoSwap: z.ZodMiniOptional<z.ZodMiniCustom<AutoSwap.resolve.Value | undefined, AutoSwap.resolve.Value | undefined>>;
|
|
101
104
|
mode: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
102
|
-
push: "push";
|
|
103
105
|
pull: "pull";
|
|
106
|
+
push: "push";
|
|
104
107
|
}>>;
|
|
105
108
|
}, z.core.$strip>>;
|
|
106
109
|
export declare namespace charge {
|