@lacasoft/openrelay-protocol 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../src/types/webhook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,MAAM,MAAM,gBAAgB,GACxB,wBAAwB,GACxB,wBAAwB,GACxB,uBAAuB,GACvB,wBAAwB,GACxB,0BAA0B,GAC1B,gBAAgB,GAChB,kBAAkB,CAAA;AAEtB,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,gBAAgB,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,aAAa,GAAG,YAAY,CAAA;CACnC;AAED,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,EAAE,MAAM,CAAA;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAAA;IACrD,OAAO,CAAC,EAAE,eAAe,GAAG,WAAW,CAAA;CACxC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=webhook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../src/types/webhook.ts"],"names":[],"mappings":""}
@@ -0,0 +1,26 @@
1
+ export interface X402PaymentRequired {
2
+ x402Version: 1;
3
+ accepts: X402PaymentOption[];
4
+ }
5
+ export interface X402PaymentOption {
6
+ scheme: 'exact';
7
+ network: string;
8
+ maxAmountRequired: string;
9
+ resource: string;
10
+ description: string;
11
+ mimeType: string;
12
+ payTo: string;
13
+ maxTimeoutSeconds: number;
14
+ asset: string;
15
+ extra?: {
16
+ name: string;
17
+ version: string;
18
+ };
19
+ }
20
+ export interface X402MiddlewareOptions {
21
+ price: number;
22
+ currency: 'usdc';
23
+ chain: 'base';
24
+ description?: string;
25
+ }
26
+ //# sourceMappingURL=x402.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x402.d.ts","sourceRoot":"","sources":["../../src/types/x402.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,CAAC,CAAA;IACd,OAAO,EAAE,iBAAiB,EAAE,CAAA;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,iBAAiB,EAAE,MAAM,CAAA;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAC1C;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=x402.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x402.js","sourceRoot":"","sources":["../../src/types/x402.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@lacasoft/openrelay-protocol",
3
+ "version": "0.1.0",
4
+ "description": "Shared types, interfaces, constants, and chain helpers for the OpenRelay protocol",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "keywords": [
11
+ "payments",
12
+ "web3",
13
+ "usdc",
14
+ "base",
15
+ "x402",
16
+ "openrelay",
17
+ "erc-3009"
18
+ ],
19
+ "license": "Apache-2.0",
20
+ "homepage": "https://openrelay.site",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/lacasoft/openrelay",
24
+ "directory": "packages/protocol"
25
+ },
26
+ "bugs": "https://github.com/lacasoft/openrelay/issues",
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "dependencies": {
31
+ "viem": "^2.48.7"
32
+ },
33
+ "devDependencies": {
34
+ "tsx": "^4.15.0",
35
+ "typescript": "^5.5.0"
36
+ },
37
+ "scripts": {
38
+ "build": "tsc",
39
+ "dev": "tsc --watch",
40
+ "typecheck": "tsc --noEmit",
41
+ "clean": "rm -rf dist",
42
+ "generate:fee-constants": "tsx scripts/generate-fee-constants.ts",
43
+ "check:fee-constants": "tsx scripts/generate-fee-constants.ts --check"
44
+ }
45
+ }