@reineira-os/x402-rss 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.
- package/LICENSE +21 -0
- package/README.md +24 -0
- package/dist/index.cjs +85 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +60 -0
- package/dist/index.js.map +1 -0
- package/package.json +44 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Reineira Labs Limited
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# @reineira-os/x402-rss
|
|
2
|
+
|
|
3
|
+
MIT buyer-side x402 adapter for Arbitrum Sepolia. A thin wrapper over our own
|
|
4
|
+
`@reineira-os/x402-core` `exact` client, preconfigured for the `eip155:421614`
|
|
5
|
+
`exact` (EIP-3009) scheme and the Arbitrum Sepolia USDC.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { createX402RssFetch } from "@reineira-os/x402-rss";
|
|
11
|
+
import { privateKeyToAccount } from "viem/accounts";
|
|
12
|
+
|
|
13
|
+
const fetchPaid = createX402RssFetch({ account: privateKeyToAccount(PK) });
|
|
14
|
+
const res = await fetchPaid("https://provider.example/job");
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`createX402RssFetch` returns a payment-aware `fetch`: on an HTTP `402` it signs an
|
|
18
|
+
`exact` authorization for the requested `payTo`/amount and retries with the
|
|
19
|
+
`PAYMENT-SIGNATURE` header. A `maxValue` cap (default 10 USDC) rejects a payment
|
|
20
|
+
that exceeds the limit before signing.
|
|
21
|
+
|
|
22
|
+
Built on `@reineira-os/x402-core`. Plain pays settle via
|
|
23
|
+
`transferWithAuthorization`; escrow-bound pays settle via
|
|
24
|
+
`receiveWithAuthorization` (both implemented in core).
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
arbitrumSepolia: () => arbitrumSepolia,
|
|
24
|
+
createX402RssFetch: () => createX402RssFetch
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
|
+
|
|
28
|
+
// src/fetch.ts
|
|
29
|
+
var import_viem = require("viem");
|
|
30
|
+
var import_chains = require("viem/chains");
|
|
31
|
+
var import_client = require("@reineira-os/x402-core/exact/client");
|
|
32
|
+
var import_client2 = require("@reineira-os/x402-core/exact/client");
|
|
33
|
+
|
|
34
|
+
// src/config.ts
|
|
35
|
+
var import_x402_shared = require("@reineira-os/x402-shared");
|
|
36
|
+
var arbitrumSepolia = {
|
|
37
|
+
chainId: import_x402_shared.ARBITRUM_SEPOLIA.chainId,
|
|
38
|
+
usdc: import_x402_shared.ARBITRUM_SEPOLIA.usdc,
|
|
39
|
+
network: import_x402_shared.X402.network,
|
|
40
|
+
scheme: import_x402_shared.X402.scheme,
|
|
41
|
+
defaultMaxValue: 10000000n
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// src/fetch.ts
|
|
45
|
+
function createX402RssFetch(opts) {
|
|
46
|
+
const publicClient = (0, import_viem.createPublicClient)({
|
|
47
|
+
chain: import_chains.arbitrumSepolia,
|
|
48
|
+
transport: (0, import_viem.http)(opts.rpcUrl)
|
|
49
|
+
});
|
|
50
|
+
const signer = (0, import_client2.toClientEvmSigner)(opts.account, publicClient);
|
|
51
|
+
const maxValue = opts.maxValue ?? arbitrumSepolia.defaultMaxValue;
|
|
52
|
+
const selectWithinMaxValue = (_x402Version, requirements) => {
|
|
53
|
+
const chosen = requirements.find(
|
|
54
|
+
(r) => r.scheme === arbitrumSepolia.scheme && r.network === arbitrumSepolia.network && r.asset.toLowerCase() === arbitrumSepolia.usdc.toLowerCase()
|
|
55
|
+
);
|
|
56
|
+
if (!chosen) {
|
|
57
|
+
throw new Error(
|
|
58
|
+
"x402-rss: no acceptable payment requirements (exact / eip155:421614 / USDC)"
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
if (!/^[0-9]+$/.test(chosen.amount)) {
|
|
62
|
+
throw new Error("x402-rss: malformed payment amount");
|
|
63
|
+
}
|
|
64
|
+
const amount = BigInt(chosen.amount);
|
|
65
|
+
if (amount <= 0n) {
|
|
66
|
+
throw new Error("x402-rss: non-positive payment amount");
|
|
67
|
+
}
|
|
68
|
+
if (amount > maxValue) {
|
|
69
|
+
throw new Error("x402-rss: amount exceeds maxValue");
|
|
70
|
+
}
|
|
71
|
+
return chosen;
|
|
72
|
+
};
|
|
73
|
+
const client = new import_client.x402Client(selectWithinMaxValue).register(
|
|
74
|
+
arbitrumSepolia.network,
|
|
75
|
+
new import_client2.ExactEvmScheme(signer)
|
|
76
|
+
);
|
|
77
|
+
const baseFetch = opts.fetch ?? fetch;
|
|
78
|
+
return (0, import_client.wrapFetchWithPayment)(baseFetch, client);
|
|
79
|
+
}
|
|
80
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
81
|
+
0 && (module.exports = {
|
|
82
|
+
arbitrumSepolia,
|
|
83
|
+
createX402RssFetch
|
|
84
|
+
});
|
|
85
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/fetch.ts","../src/config.ts"],"sourcesContent":["export { createX402RssFetch } from \"./fetch.js\";\nexport type { CreateX402RssFetchOptions } from \"./fetch.js\";\nexport { arbitrumSepolia } from \"./config.js\";\n","import { createPublicClient, http, type LocalAccount } from \"viem\";\nimport { arbitrumSepolia as arbitrumSepoliaChain } from \"viem/chains\";\nimport {\n wrapFetchWithPayment,\n x402Client,\n type SelectPaymentRequirements,\n} from \"@reineira-os/x402-core/exact/client\";\nimport { ExactEvmScheme, toClientEvmSigner } from \"@reineira-os/x402-core/exact/client\";\nimport { arbitrumSepolia } from \"./config.js\";\n\nexport interface CreateX402RssFetchOptions {\n account: LocalAccount;\n fetch?: typeof fetch;\n maxValue?: bigint;\n rpcUrl?: string;\n}\n\nexport function createX402RssFetch(opts: CreateX402RssFetchOptions): typeof fetch {\n const publicClient = createPublicClient({\n chain: arbitrumSepoliaChain,\n transport: http(opts.rpcUrl),\n });\n const signer = toClientEvmSigner(opts.account, publicClient);\n const maxValue = opts.maxValue ?? arbitrumSepolia.defaultMaxValue;\n\n const selectWithinMaxValue: SelectPaymentRequirements = (_x402Version, requirements) => {\n const chosen = requirements.find(\n (r) =>\n r.scheme === arbitrumSepolia.scheme &&\n r.network === arbitrumSepolia.network &&\n r.asset.toLowerCase() === arbitrumSepolia.usdc.toLowerCase(),\n );\n if (!chosen) {\n throw new Error(\n \"x402-rss: no acceptable payment requirements (exact / eip155:421614 / USDC)\",\n );\n }\n if (!/^[0-9]+$/.test(chosen.amount)) {\n throw new Error(\"x402-rss: malformed payment amount\");\n }\n const amount = BigInt(chosen.amount);\n if (amount <= 0n) {\n throw new Error(\"x402-rss: non-positive payment amount\");\n }\n if (amount > maxValue) {\n throw new Error(\"x402-rss: amount exceeds maxValue\");\n }\n return chosen;\n };\n\n const client = new x402Client(selectWithinMaxValue).register(\n arbitrumSepolia.network,\n new ExactEvmScheme(signer),\n );\n\n const baseFetch = opts.fetch ?? fetch;\n return wrapFetchWithPayment(baseFetch, client) as typeof fetch;\n}\n","import { ARBITRUM_SEPOLIA, X402 } from \"@reineira-os/x402-shared\";\n\nexport const arbitrumSepolia = {\n chainId: ARBITRUM_SEPOLIA.chainId,\n usdc: ARBITRUM_SEPOLIA.usdc,\n network: X402.network,\n scheme: X402.scheme,\n defaultMaxValue: 10_000_000n,\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAA4D;AAC5D,oBAAwD;AACxD,oBAIO;AACP,IAAAA,iBAAkD;;;ACPlD,yBAAuC;AAEhC,IAAM,kBAAkB;AAAA,EAC7B,SAAS,oCAAiB;AAAA,EAC1B,MAAM,oCAAiB;AAAA,EACvB,SAAS,wBAAK;AAAA,EACd,QAAQ,wBAAK;AAAA,EACb,iBAAiB;AACnB;;;ADSO,SAAS,mBAAmB,MAA+C;AAChF,QAAM,mBAAe,gCAAmB;AAAA,IACtC,OAAO,cAAAC;AAAA,IACP,eAAW,kBAAK,KAAK,MAAM;AAAA,EAC7B,CAAC;AACD,QAAM,aAAS,kCAAkB,KAAK,SAAS,YAAY;AAC3D,QAAM,WAAW,KAAK,YAAY,gBAAgB;AAElD,QAAM,uBAAkD,CAAC,cAAc,iBAAiB;AACtF,UAAM,SAAS,aAAa;AAAA,MAC1B,CAAC,MACC,EAAE,WAAW,gBAAgB,UAC7B,EAAE,YAAY,gBAAgB,WAC9B,EAAE,MAAM,YAAY,MAAM,gBAAgB,KAAK,YAAY;AAAA,IAC/D;AACA,QAAI,CAAC,QAAQ;AACX,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AACA,QAAI,CAAC,WAAW,KAAK,OAAO,MAAM,GAAG;AACnC,YAAM,IAAI,MAAM,oCAAoC;AAAA,IACtD;AACA,UAAM,SAAS,OAAO,OAAO,MAAM;AACnC,QAAI,UAAU,IAAI;AAChB,YAAM,IAAI,MAAM,uCAAuC;AAAA,IACzD;AACA,QAAI,SAAS,UAAU;AACrB,YAAM,IAAI,MAAM,mCAAmC;AAAA,IACrD;AACA,WAAO;AAAA,EACT;AAEA,QAAM,SAAS,IAAI,yBAAW,oBAAoB,EAAE;AAAA,IAClD,gBAAgB;AAAA,IAChB,IAAI,8BAAe,MAAM;AAAA,EAC3B;AAEA,QAAM,YAAY,KAAK,SAAS;AAChC,aAAO,oCAAqB,WAAW,MAAM;AAC/C;","names":["import_client","arbitrumSepoliaChain"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LocalAccount } from 'viem';
|
|
2
|
+
|
|
3
|
+
interface CreateX402RssFetchOptions {
|
|
4
|
+
account: LocalAccount;
|
|
5
|
+
fetch?: typeof fetch;
|
|
6
|
+
maxValue?: bigint;
|
|
7
|
+
rpcUrl?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function createX402RssFetch(opts: CreateX402RssFetchOptions): typeof fetch;
|
|
10
|
+
|
|
11
|
+
declare const arbitrumSepolia: {
|
|
12
|
+
readonly chainId: 421614;
|
|
13
|
+
readonly usdc: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d";
|
|
14
|
+
readonly network: "eip155:421614";
|
|
15
|
+
readonly scheme: "exact";
|
|
16
|
+
readonly defaultMaxValue: 10000000n;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { type CreateX402RssFetchOptions, arbitrumSepolia, createX402RssFetch };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LocalAccount } from 'viem';
|
|
2
|
+
|
|
3
|
+
interface CreateX402RssFetchOptions {
|
|
4
|
+
account: LocalAccount;
|
|
5
|
+
fetch?: typeof fetch;
|
|
6
|
+
maxValue?: bigint;
|
|
7
|
+
rpcUrl?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function createX402RssFetch(opts: CreateX402RssFetchOptions): typeof fetch;
|
|
10
|
+
|
|
11
|
+
declare const arbitrumSepolia: {
|
|
12
|
+
readonly chainId: 421614;
|
|
13
|
+
readonly usdc: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d";
|
|
14
|
+
readonly network: "eip155:421614";
|
|
15
|
+
readonly scheme: "exact";
|
|
16
|
+
readonly defaultMaxValue: 10000000n;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { type CreateX402RssFetchOptions, arbitrumSepolia, createX402RssFetch };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// src/fetch.ts
|
|
2
|
+
import { createPublicClient, http } from "viem";
|
|
3
|
+
import { arbitrumSepolia as arbitrumSepoliaChain } from "viem/chains";
|
|
4
|
+
import {
|
|
5
|
+
wrapFetchWithPayment,
|
|
6
|
+
x402Client
|
|
7
|
+
} from "@reineira-os/x402-core/exact/client";
|
|
8
|
+
import { ExactEvmScheme, toClientEvmSigner } from "@reineira-os/x402-core/exact/client";
|
|
9
|
+
|
|
10
|
+
// src/config.ts
|
|
11
|
+
import { ARBITRUM_SEPOLIA, X402 } from "@reineira-os/x402-shared";
|
|
12
|
+
var arbitrumSepolia = {
|
|
13
|
+
chainId: ARBITRUM_SEPOLIA.chainId,
|
|
14
|
+
usdc: ARBITRUM_SEPOLIA.usdc,
|
|
15
|
+
network: X402.network,
|
|
16
|
+
scheme: X402.scheme,
|
|
17
|
+
defaultMaxValue: 10000000n
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// src/fetch.ts
|
|
21
|
+
function createX402RssFetch(opts) {
|
|
22
|
+
const publicClient = createPublicClient({
|
|
23
|
+
chain: arbitrumSepoliaChain,
|
|
24
|
+
transport: http(opts.rpcUrl)
|
|
25
|
+
});
|
|
26
|
+
const signer = toClientEvmSigner(opts.account, publicClient);
|
|
27
|
+
const maxValue = opts.maxValue ?? arbitrumSepolia.defaultMaxValue;
|
|
28
|
+
const selectWithinMaxValue = (_x402Version, requirements) => {
|
|
29
|
+
const chosen = requirements.find(
|
|
30
|
+
(r) => r.scheme === arbitrumSepolia.scheme && r.network === arbitrumSepolia.network && r.asset.toLowerCase() === arbitrumSepolia.usdc.toLowerCase()
|
|
31
|
+
);
|
|
32
|
+
if (!chosen) {
|
|
33
|
+
throw new Error(
|
|
34
|
+
"x402-rss: no acceptable payment requirements (exact / eip155:421614 / USDC)"
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
if (!/^[0-9]+$/.test(chosen.amount)) {
|
|
38
|
+
throw new Error("x402-rss: malformed payment amount");
|
|
39
|
+
}
|
|
40
|
+
const amount = BigInt(chosen.amount);
|
|
41
|
+
if (amount <= 0n) {
|
|
42
|
+
throw new Error("x402-rss: non-positive payment amount");
|
|
43
|
+
}
|
|
44
|
+
if (amount > maxValue) {
|
|
45
|
+
throw new Error("x402-rss: amount exceeds maxValue");
|
|
46
|
+
}
|
|
47
|
+
return chosen;
|
|
48
|
+
};
|
|
49
|
+
const client = new x402Client(selectWithinMaxValue).register(
|
|
50
|
+
arbitrumSepolia.network,
|
|
51
|
+
new ExactEvmScheme(signer)
|
|
52
|
+
);
|
|
53
|
+
const baseFetch = opts.fetch ?? fetch;
|
|
54
|
+
return wrapFetchWithPayment(baseFetch, client);
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
arbitrumSepolia,
|
|
58
|
+
createX402RssFetch
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/fetch.ts","../src/config.ts"],"sourcesContent":["import { createPublicClient, http, type LocalAccount } from \"viem\";\nimport { arbitrumSepolia as arbitrumSepoliaChain } from \"viem/chains\";\nimport {\n wrapFetchWithPayment,\n x402Client,\n type SelectPaymentRequirements,\n} from \"@reineira-os/x402-core/exact/client\";\nimport { ExactEvmScheme, toClientEvmSigner } from \"@reineira-os/x402-core/exact/client\";\nimport { arbitrumSepolia } from \"./config.js\";\n\nexport interface CreateX402RssFetchOptions {\n account: LocalAccount;\n fetch?: typeof fetch;\n maxValue?: bigint;\n rpcUrl?: string;\n}\n\nexport function createX402RssFetch(opts: CreateX402RssFetchOptions): typeof fetch {\n const publicClient = createPublicClient({\n chain: arbitrumSepoliaChain,\n transport: http(opts.rpcUrl),\n });\n const signer = toClientEvmSigner(opts.account, publicClient);\n const maxValue = opts.maxValue ?? arbitrumSepolia.defaultMaxValue;\n\n const selectWithinMaxValue: SelectPaymentRequirements = (_x402Version, requirements) => {\n const chosen = requirements.find(\n (r) =>\n r.scheme === arbitrumSepolia.scheme &&\n r.network === arbitrumSepolia.network &&\n r.asset.toLowerCase() === arbitrumSepolia.usdc.toLowerCase(),\n );\n if (!chosen) {\n throw new Error(\n \"x402-rss: no acceptable payment requirements (exact / eip155:421614 / USDC)\",\n );\n }\n if (!/^[0-9]+$/.test(chosen.amount)) {\n throw new Error(\"x402-rss: malformed payment amount\");\n }\n const amount = BigInt(chosen.amount);\n if (amount <= 0n) {\n throw new Error(\"x402-rss: non-positive payment amount\");\n }\n if (amount > maxValue) {\n throw new Error(\"x402-rss: amount exceeds maxValue\");\n }\n return chosen;\n };\n\n const client = new x402Client(selectWithinMaxValue).register(\n arbitrumSepolia.network,\n new ExactEvmScheme(signer),\n );\n\n const baseFetch = opts.fetch ?? fetch;\n return wrapFetchWithPayment(baseFetch, client) as typeof fetch;\n}\n","import { ARBITRUM_SEPOLIA, X402 } from \"@reineira-os/x402-shared\";\n\nexport const arbitrumSepolia = {\n chainId: ARBITRUM_SEPOLIA.chainId,\n usdc: ARBITRUM_SEPOLIA.usdc,\n network: X402.network,\n scheme: X402.scheme,\n defaultMaxValue: 10_000_000n,\n} as const;\n"],"mappings":";AAAA,SAAS,oBAAoB,YAA+B;AAC5D,SAAS,mBAAmB,4BAA4B;AACxD;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AACP,SAAS,gBAAgB,yBAAyB;;;ACPlD,SAAS,kBAAkB,YAAY;AAEhC,IAAM,kBAAkB;AAAA,EAC7B,SAAS,iBAAiB;AAAA,EAC1B,MAAM,iBAAiB;AAAA,EACvB,SAAS,KAAK;AAAA,EACd,QAAQ,KAAK;AAAA,EACb,iBAAiB;AACnB;;;ADSO,SAAS,mBAAmB,MAA+C;AAChF,QAAM,eAAe,mBAAmB;AAAA,IACtC,OAAO;AAAA,IACP,WAAW,KAAK,KAAK,MAAM;AAAA,EAC7B,CAAC;AACD,QAAM,SAAS,kBAAkB,KAAK,SAAS,YAAY;AAC3D,QAAM,WAAW,KAAK,YAAY,gBAAgB;AAElD,QAAM,uBAAkD,CAAC,cAAc,iBAAiB;AACtF,UAAM,SAAS,aAAa;AAAA,MAC1B,CAAC,MACC,EAAE,WAAW,gBAAgB,UAC7B,EAAE,YAAY,gBAAgB,WAC9B,EAAE,MAAM,YAAY,MAAM,gBAAgB,KAAK,YAAY;AAAA,IAC/D;AACA,QAAI,CAAC,QAAQ;AACX,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AACA,QAAI,CAAC,WAAW,KAAK,OAAO,MAAM,GAAG;AACnC,YAAM,IAAI,MAAM,oCAAoC;AAAA,IACtD;AACA,UAAM,SAAS,OAAO,OAAO,MAAM;AACnC,QAAI,UAAU,IAAI;AAChB,YAAM,IAAI,MAAM,uCAAuC;AAAA,IACzD;AACA,QAAI,SAAS,UAAU;AACrB,YAAM,IAAI,MAAM,mCAAmC;AAAA,IACrD;AACA,WAAO;AAAA,EACT;AAEA,QAAM,SAAS,IAAI,WAAW,oBAAoB,EAAE;AAAA,IAClD,gBAAgB;AAAA,IAChB,IAAI,eAAe,MAAM;AAAA,EAC3B;AAEA,QAAM,YAAY,KAAK,SAAS;AAChC,SAAO,qBAAqB,WAAW,MAAM;AAC/C;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@reineira-os/x402-rss",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Insured, FHE-confidential x402 settlement on the Reineira Settlement Standard (umbrella SDK)",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/ReineiraOS/x402.git",
|
|
9
|
+
"directory": "packages/x402-rss"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"main": "./dist/index.cjs",
|
|
16
|
+
"module": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.js",
|
|
22
|
+
"require": "./dist/index.cjs"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"viem": "^2.21.0",
|
|
30
|
+
"@reineira-os/x402-core": "0.1.0",
|
|
31
|
+
"@reineira-os/x402-shared": "0.1.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "^22.0.0",
|
|
35
|
+
"tsup": "^8.3.0",
|
|
36
|
+
"vitest": "^2.1.0",
|
|
37
|
+
"typescript": "^5.7.0"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsup",
|
|
41
|
+
"test": "vitest run",
|
|
42
|
+
"typecheck": "tsc --noEmit"
|
|
43
|
+
}
|
|
44
|
+
}
|