@playthecut/agent 0.2.0 → 0.2.1

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.
Files changed (3) hide show
  1. package/api.md +9 -0
  2. package/docs/api.md +9 -0
  3. package/package.json +1 -1
package/api.md CHANGED
@@ -62,6 +62,7 @@ JSON bodies are capped at 128 KiB.
62
62
  | `/unsubscribe` | `unsubscribe.ts` |
63
63
  | `/stream` | `stream.ts` |
64
64
  | `/bot` | `bot.ts` |
65
+ | `/paymaster` | `paymaster.ts` |
65
66
 
66
67
  ---
67
68
 
@@ -73,6 +74,14 @@ JSON bodies are capped at 128 KiB.
73
74
 
74
75
  ---
75
76
 
77
+ ## Paymaster (`/api/paymaster`)
78
+
79
+ | Method | Path | Auth | Description |
80
+ |--------|------|------|-------------|
81
+ | POST | `/` | none | ERC-7677 paymaster JSON-RPC. Accepts `pm_getPaymasterStubData` and `pm_getPaymasterData`. Privy's dashboard paymaster URL points here. There is no bearer token: Privy posts the user operation from the browser. The server sponsors it only when the chain is Base or Base Sepolia, the EntryPoint is v0.7, the sender is a stored `UserWallet` for that chain, the gas limits are within the server cap, and the Kernel `execute` calldata is on the allowlist. Allowed calls are `createContest` on the contest factory, `approve` of a stored contest and `transfer` on the payment token, the six contest entry and claim functions on a stored contest address, and `installValidations` or `uninstallValidation` on the sender. The server then calls Pimlico with `PIMLICO_SPONSORSHIP_POLICY_ID` and ignores any policy id in the request. A Pimlico result above the gas cap is returned as a JSON-RPC error. |
82
+
83
+ ---
84
+
76
85
  ## Auth (`/api/auth`)
77
86
 
78
87
  | Method | Path | Auth | Description |
package/docs/api.md CHANGED
@@ -62,6 +62,7 @@ JSON bodies are capped at 128 KiB.
62
62
  | `/unsubscribe` | `unsubscribe.ts` |
63
63
  | `/stream` | `stream.ts` |
64
64
  | `/bot` | `bot.ts` |
65
+ | `/paymaster` | `paymaster.ts` |
65
66
 
66
67
  ---
67
68
 
@@ -73,6 +74,14 @@ JSON bodies are capped at 128 KiB.
73
74
 
74
75
  ---
75
76
 
77
+ ## Paymaster (`/api/paymaster`)
78
+
79
+ | Method | Path | Auth | Description |
80
+ |--------|------|------|-------------|
81
+ | POST | `/` | none | ERC-7677 paymaster JSON-RPC. Accepts `pm_getPaymasterStubData` and `pm_getPaymasterData`. Privy's dashboard paymaster URL points here. There is no bearer token: Privy posts the user operation from the browser. The server sponsors it only when the chain is Base or Base Sepolia, the EntryPoint is v0.7, the sender is a stored `UserWallet` for that chain, the gas limits are within the server cap, and the Kernel `execute` calldata is on the allowlist. Allowed calls are `createContest` on the contest factory, `approve` of a stored contest and `transfer` on the payment token, the six contest entry and claim functions on a stored contest address, and `installValidations` or `uninstallValidation` on the sender. The server then calls Pimlico with `PIMLICO_SPONSORSHIP_POLICY_ID` and ignores any policy id in the request. A Pimlico result above the gas cap is returned as a JSON-RPC error. |
82
+
83
+ ---
84
+
76
85
  ## Auth (`/api/auth`)
77
86
 
78
87
  | Method | Path | Auth | Description |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playthecut/agent",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Sign and send Play The Cut agent requests",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",