Skip to content

Conversation

@amilz
Copy link
Contributor

@amilz amilz commented Sep 26, 2025

Adds a demo for using Kora as a x402 Facilitator:

  • includes demo code: client, protected api, facilitator proxy for kora, and kora config
  • includes guide

Important

Adds a comprehensive demo for integrating x402 with Kora, including code, configuration, and a detailed guide.

  • Demo Code:
    • Adds client, protected API, and facilitator proxy code in docs/x402/demo.
    • Facilitator proxy adapts Kora to x402 protocol with /verify, /settle, and /supported endpoints.
    • Protected API uses x402-express middleware to handle payments.
  • Configuration:
    • Adds .env.example for environment variables setup.
    • Includes kora.toml and signers.toml for Kora configuration.
  • Guide:
    • Provides X402_DEMO_GUIDE.md detailing setup, architecture, and running the demo.
    • Explains x402 protocol, Kora's role, and the payment flow.
  • Scripts:
    • Adds scripts in package.json for setup, building, and running the demo components.

This description was created by Ellipsis for 4a02a29. You can customize this summary. It will automatically update as commits are pushed.

add demo code and guide
@amilz amilz self-assigned this Sep 26, 2025
@amilz amilz added the documentation Improvements or additions to documentation label Sep 26, 2025
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Changes requested ❌

Reviewed everything up to 8be85a0 in 2 minutes and 10 seconds. Click for details.
  • Reviewed 1299 lines of code in 12 files
  • Skipped 5 files when reviewing.
  • Skipped posting 5 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. docs/x402/demo/X402_DEMO_GUIDE.md:88
  • Draft comment:
    Typo: There is an extra space in the sentence "provides signing and gasless transaction services." Remove the extra space between "and" and "gasless".
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% While the comment is technically correct about the extra space, this is an extremely minor formatting issue in documentation. The extra space doesn't impact readability or meaning. The rules say not to make comments that are obvious or unimportant. A single extra space in documentation text seems to fall into this category. The extra space could be seen as a small formatting inconsistency that's worth fixing while we're editing the file. Some might argue that maintaining perfect formatting is important for documentation. While clean formatting is good, this level of nitpicking about a single space creates noise in the PR review process and distracts from more substantive issues. The benefit of fixing it is extremely minimal. This comment should be deleted as it points out an extremely minor formatting issue that doesn't meaningfully impact the documentation.
2. docs/x402/demo/X402_DEMO_GUIDE.md:339
  • Draft comment:
    Typo: The image path in "Transaction Flow" contains a double slash. Please change it to a single slash (e.g. "./assets/x402-protocol-flow.png").
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% While technically correct that double slashes are unnecessary, they don't actually cause any problems in file paths - both single and double slashes work fine. The image will display correctly either way. This is an extremely minor stylistic issue that doesn't affect functionality. The comment is technically accurate - there is indeed a double slash. And some might argue that clean, consistent file paths are good practice. However, this is an extremely minor stylistic issue that doesn't affect functionality at all. The image will work fine either way. This kind of nitpicky comment creates noise without adding value. This comment should be deleted as it points out an extremely minor stylistic issue that doesn't affect functionality.
3. docs/x402/demo/X402_DEMO_GUIDE.md:409
  • Draft comment:
    Typo: The phrase "demonstrates automatic how x402 works" seems off. Consider rephrasing it to something like "demonstrates how x402 works automatically".
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% While the comment correctly identifies a grammatical error, the PR review rules emphasize focusing on substantive code changes and avoiding purely informative comments. Grammar fixes in documentation, while helpful, are not critical changes that require a comment. The meaning is still clear despite the awkward phrasing. The grammar error does make the documentation slightly less professional. Poor documentation quality could impact user understanding. While documentation quality matters, this is a minor grammatical issue that doesn't significantly impact understanding. The PR review rules specifically discourage non-critical comments. Delete the comment. While the grammar suggestion is valid, it's too minor to warrant a PR comment according to our rules.
4. docs/x402/demo/api/src/api.ts:53
  • Draft comment:
    Note: The file does not end with a newline (detected by the \ No newline at end of file marker). Although this might be automatically handled by some formatters, consider adding a trailing newline if your coding standards require it.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative and does not provide a specific code suggestion or highlight a potential issue. It simply notes the absence of a newline at the end of the file, which is often automatically handled by formatters. It does not ask for a specific action or confirm an intention, which makes it fall under the category of purely informative comments.
5. docs/x402/demo/client/src/index.ts:18
  • Draft comment:
    The error message refers to TEST_SENDER_KEYPAIR, but the code checks for PAYER_PRIVATE_KEY. Please update the environment variable name in the error message for consistency.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_MgpCrnilhyZfAfuw

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed 3047c72 in 51 seconds. Click for details.
  • Reviewed 57 lines of code in 3 files
  • Skipped 1 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. docs/x402/demo/.env.example:24
  • Draft comment:
    Add a newline at the end of the file for POSIX compatibility and best practices.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. docs/x402/demo/X402_DEMO_GUIDE.md:339
  • Draft comment:
    Corrected image path by removing an extra slash; ensure the asset exists at './assets/x402-protocol-flow.png'.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. docs/x402/demo/client/src/index.ts:17
  • Draft comment:
    Updated error message to refer to PAYER_PRIVATE_KEY, aligning it with the required environment variable.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_jD9PUcrOBkprXVmf

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@dev-jodee dev-jodee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LFG

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Changes requested ❌

Reviewed 4a02a29 in 2 minutes and 7 seconds. Click for details.
  • Reviewed 43 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. docs/x402/demo/kora/signers.toml:8
  • Draft comment:
    The 'weight = 1' setting has been removed. Verify that this removal is intentional since the documentation sample includes it.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. docs/x402/demo/package.json:7
  • Draft comment:
    The 'install:all' script now chains multiple 'cd' commands with relative paths. This approach can be brittle if the directory structure changes and may benefit from a more robust installation strategy.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% While the comment raises a valid concern about maintainability, it's not offering a specific, actionable solution. The pattern of using cd commands is consistent throughout the file and seems to be the established pattern. The comment is more of a general observation than a specific issue requiring immediate action. The comment might be pointing to a real architectural concern that could cause problems during future refactoring. The suggested brittleness could lead to real maintenance issues. While the concern is valid, without proposing a specific, better alternative, this comment doesn't provide actionable value. It's more of a general observation about the codebase's structure. Delete the comment as it doesn't provide specific, actionable feedback and appears to be questioning an established pattern in the codebase rather than addressing a specific issue with the changes.

Workflow ID: wflow_9izl1OQFf9iNvmw7

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
@amilz amilz merged commit 06de9a0 into release/feature-freeze-for-audit Sep 26, 2025
@amilz amilz deleted the docs/x402 branch September 26, 2025 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants