尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
Checkout for almost any coin. One line of HTML: the buyer pays from any chain, and exact USDC lands in your NEAR wallet via NEAR Intents.
翻译准备中
正在加载完整 README。
查看完整 README ↗A shop that wants crypto has to pick which chains and coins to accept, and its buyers rarely hold the right one. Hasp is one script tag. The buyer pays with whatever they hold, on NEAR, Ethereum, Base, Arbitrum, Solana, Bitcoin or dozens of other chains, and the shop receives the exact USDC it asked for in its NEAR account. NEAR Intents does the conversion and the settlement. Hasp has no server, no sign-up and no keys, and never holds the funds.
<script src="https://thehasp.vercel.app/checkout.js"
data-to="yourname.near" data-usd="5" data-item="A coffee"></script>
Watch the 90-second demo: x.com/thesithunyein/status/2120411134130065516
It is the "universal checkout widget" from Illia Polosukhin's list of things to build on NEAR (3 October 2026): customers pay through NEAR Intents with whatever wallet and chain holds their assets.
Tracks: Agent Economy (agents) and Real-World Money (realworld).
A shop that wants crypto has to guess which coin its buyers hold, and usually guesses wrong. One buyer has ETH on Arbitrum, the next has SOL, the next only NEAR. Listing five wallet addresses for five chains is confusing, and getting paid in a coin whose price moves is a risk for the seller. Most buyers leave before they pay.
With Hasp, the buyer pays with whatever they already hold and the seller always receives the same thing: the exact price, in USDC, in one NEAR account.
| Who | Why Hasp fits |
|---|---|
| Freelancers and creators paid from abroad: designers, developers, writers, artists | The client pays in any coin; the freelancer gets stable USDC, not a coin whose price swings |
| Small online sellers with a crypto-holding audience: digital products, courses, templates | One line on any site (WordPress, Webflow, plain HTML), no payment company to sign up with, no monthly fee |
| Creators and open-source projects taking tips | One "support me" button for every coin, instead of a list of addresses per chain |
| Web3 projects, DAOs and events selling tickets, memberships or services | Their community holds many chains; they want one currency in one account |
| People where card payments are hard to get | Anyone with crypto can pay them, and they receive dollars (USDC) with no bank in the middle. Local rules on receiving crypto still apply. |
| AI agents buying services such as an API or a dataset | They pay at any Hasp checkout, inside limits a person sets (see For AI agents) |
Who it is not for: shops whose buyers pay by card (a card processor is simpler for them), and shops that need invoices or automatic order fulfilment, which Hasp does not do yet.
No wallet is needed for steps 1 to 3. Nothing moves until a buyer sends coins to the address the quote gives.
| Do | See |
|---|---|
| 1. Open the example shop, choose Pay $1, pick a coin, give a refund address on that coin's chain | A one-time deposit address from NEAR Intents and the exact amount to send, for example 0.286647 NEAR. The status line reads "Waiting for your payment…". The page is plain HTML with no framework: two <script> tags, two prices. |
| 2. Open thehasp.vercel.app and, under Get a button, enter a NEAR account and a price | The line to paste, and a live preview of the button it makes |
| 3. Under Pricing and FAQ on the same page | What a shop pays (nothing to Hasp, 0.25% to NEAR Intents inside the buyer's price) and how refunds work |
3b. Open thehasp.vercel.app/payments and enter a NEAR account that has been paid, for example sithunyein.near once a payment has settled | Every USDC payment NEAR Intents sent to that account, newest first, with totals and a NearBlocks receipt for each |
4. node scripts/hasp-agent.mjs buy --to sithunyein.near --usd 1 --item "A coffee" | rule allows it, then a live mainnet quote, then dry run nothing sent |
5. node scripts/hasp-agent.mjs buy --to stranger.near --usd 1 | STOPPED: stranger.near is not on the agent's list of merchants, exit code 2, no quote asked for |
6. npm ci && npm test | 17 tests pass: prices, accounts, refund addresses, the coin list, the exact quote, the agent's rule |
Steps 4 and 5 also run on every push in CI: open a run and read the notices "Agent dry run (mainnet quote, nothing sent)" and "Agent stopped by its rule (exit 2)".
<!-- One button where the tag is -->
<script src="https://thehasp.vercel.app/checkout.js"
data-to="yourname.near" data-usd="5" data-item="A coffee" data-label="Buy a coffee"></script>
<!-- Or several, anywhere, with one script tag -->
<div data-hasp-to="yourname.near" data-hasp-usd="3" data-hasp-item="Lunch"></div>
<script src="https://thehasp.vercel.app/checkout.js"></script>
| Attribute | Meaning |
|---|---|
data-to | Your NEAR account. The USDC is paid here. |
data-usd | The price in dollars, like 5 or 4.50, up to 10,000. You receive exactly this much USDC. |
data-item | Optional. What the buyer is paying for. |
data-label | Optional. The button text. Default: Pay $5. |
From JavaScript: Hasp.open({ to: "yourname.near", usd: "5", item: "A coffee" }). When NEAR Intents reports SUCCESS, the button fires a hasp:paid event with { to, usd, item, depositAddress, amountOut }. The event comes from the buyer's browser, so before you ship anything, confirm the payment yourself: GET https://1click.chaindefuser.com/v0/status?depositAddress=... must say SUCCESS, or check your NEAR account.
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗