zk-credits 0.2.9 → 0.2.10

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/README.md CHANGED
@@ -81,7 +81,7 @@ still receives the class. A rejected request consumes no credit.
81
81
  `zk-credits x402-agent`. Subsequent launches use OS storage without a password
82
82
  or import file. The activated download remains a private recovery backup.
83
83
 
84
- The RPC defaults to https://sepolia.base.org. If the public endpoint is limited,
84
+ The RPC defaults to the launch endpoint baked into the package. If that endpoint is limited,
85
85
  run `zk-credits config rpc` and enter your own Base Sepolia endpoint in the hidden
86
86
  local prompt. Saved settings stay owner-only; `BASE_RPC_URL` takes precedence.
87
87
  Provider keys must not appear in chat or evidence. No gateway admin token is
package/dist/cli.js CHANGED
@@ -164,7 +164,7 @@ request-aware adapter and local proof engine; aggregate metrics stay on the
164
164
  loopback-only authenticated endpoint.
165
165
  "zk-credits serve --internal-trial-one-proof" limits this sidecar process to
166
166
  one authenticated, valid spend request and one local proof attempt.
167
- Base Sepolia uses https://sepolia.base.org automatically. Public RPC endpoints
167
+ Base Sepolia uses the launch endpoint baked into the package automatically. RPC endpoints
168
168
  are rate-limited; run "zk-credits config rpc" to use your own endpoint.
169
169
  Provider guide: https://docs.base.org/base-chain/node-operators/node-providers
170
170
  Set ZK_CREDITS_CREDENTIAL_PATH to the activated browser download for first setup.
@@ -165511,11 +165511,14 @@ async function readStoredCredential(store) {
165511
165511
  // dist/rpc-config.js
165512
165512
  import { chmod, lstat, mkdir, open, readFile, rename, rm } from "node:fs/promises";
165513
165513
  import { dirname, join } from "node:path";
165514
- var DEFAULT_BASE_SEPOLIA_RPC_URL = "https://sepolia.base.org";
165514
+ var DEFAULT_BASE_SEPOLIA_RPC_URL = "https://base-sepolia.infura.io/v3/4d7561cbe56f49fe8cdf30d46f609806";
165515
165515
  function resolveBaseSepoliaRpc(environment, legacyRpc) {
165516
- return environment.BASE_RPC_URL?.trim() || legacyRpc?.trim() || DEFAULT_BASE_SEPOLIA_RPC_URL;
165516
+ const rpc = environment.BASE_RPC_URL?.trim() || legacyRpc?.trim() || DEFAULT_BASE_SEPOLIA_RPC_URL;
165517
+ if (rpc === "__ZK_CREDITS_RELEASE_RPC_URL__")
165518
+ throw new Error("Release RPC has not been baked. Set BASE_RPC_URL or build the release package.");
165519
+ return rpc;
165517
165520
  }
165518
- var RPC_GUIDANCE = "The built-in public Base Sepolia endpoint is rate-limited. To use your own endpoint (chain ID 84532), run zk-credits config rpc. Providers: https://docs.base.org/base-chain/node-operators/node-providers .";
165521
+ var RPC_GUIDANCE = "The package uses the release Base Sepolia endpoint by default. To use your own endpoint (chain ID 84532), run zk-credits config rpc. Providers: https://docs.base.org/base-chain/node-operators/node-providers .";
165519
165522
  function validateRpcUrl(value) {
165520
165523
  try {
165521
165524
  const url = new URL(value.trim());
@@ -1,6 +1,6 @@
1
- export declare const DEFAULT_BASE_SEPOLIA_RPC_URL = "https://sepolia.base.org";
1
+ export declare const DEFAULT_BASE_SEPOLIA_RPC_URL = "__ZK_CREDITS_RELEASE_RPC_URL__";
2
2
  export declare function resolveBaseSepoliaRpc(environment: NodeJS.ProcessEnv, legacyRpc?: string): string;
3
- export declare const RPC_GUIDANCE = "The built-in public Base Sepolia endpoint is rate-limited. To use your own endpoint (chain ID 84532), run zk-credits config rpc. Providers: https://docs.base.org/base-chain/node-operators/node-providers .";
3
+ export declare const RPC_GUIDANCE = "The package uses the release Base Sepolia endpoint by default. To use your own endpoint (chain ID 84532), run zk-credits config rpc. Providers: https://docs.base.org/base-chain/node-operators/node-providers .";
4
4
  export declare function validateRpcUrl(value: string): string;
5
5
  export declare function checkBaseSepoliaRpc(value: string, request?: typeof fetch): Promise<string>;
6
6
  export declare function readRpcConfig(directory: string): Promise<string | undefined>;
@@ -1,11 +1,14 @@
1
1
  import { randomUUID } from 'node:crypto';
2
2
  import { chmod, lstat, mkdir, open, readFile, rename, rm } from 'node:fs/promises';
3
3
  import { dirname, join } from 'node:path';
4
- export const DEFAULT_BASE_SEPOLIA_RPC_URL = 'https://sepolia.base.org';
4
+ export const DEFAULT_BASE_SEPOLIA_RPC_URL = "https://base-sepolia.infura.io/v3/4d7561cbe56f49fe8cdf30d46f609806";
5
5
  export function resolveBaseSepoliaRpc(environment, legacyRpc) {
6
- return environment.BASE_RPC_URL?.trim() || legacyRpc?.trim() || DEFAULT_BASE_SEPOLIA_RPC_URL;
6
+ const rpc = environment.BASE_RPC_URL?.trim() || legacyRpc?.trim() || DEFAULT_BASE_SEPOLIA_RPC_URL;
7
+ if (rpc === '__ZK_CREDITS_RELEASE_RPC_URL__')
8
+ throw new Error('Release RPC has not been baked. Set BASE_RPC_URL or build the release package.');
9
+ return rpc;
7
10
  }
8
- export const RPC_GUIDANCE = 'The built-in public Base Sepolia endpoint is rate-limited. To use your own endpoint (chain ID 84532), run zk-credits config rpc. Providers: https://docs.base.org/base-chain/node-operators/node-providers .';
11
+ export const RPC_GUIDANCE = 'The package uses the release Base Sepolia endpoint by default. To use your own endpoint (chain ID 84532), run zk-credits config rpc. Providers: https://docs.base.org/base-chain/node-operators/node-providers .';
9
12
  export function validateRpcUrl(value) {
10
13
  try {
11
14
  const url = new URL(value.trim());
@@ -166153,11 +166153,14 @@ async function importCredentialPath(path, store, password) {
166153
166153
  import { randomUUID } from "node:crypto";
166154
166154
  import { chmod as chmod3, lstat, mkdir as mkdir3, open, readFile as readFile2, rename as rename2, rm } from "node:fs/promises";
166155
166155
  import { dirname, join as join3 } from "node:path";
166156
- var DEFAULT_BASE_SEPOLIA_RPC_URL = "https://sepolia.base.org";
166156
+ var DEFAULT_BASE_SEPOLIA_RPC_URL = "https://base-sepolia.infura.io/v3/4d7561cbe56f49fe8cdf30d46f609806";
166157
166157
  function resolveBaseSepoliaRpc(environment, legacyRpc) {
166158
- return environment.BASE_RPC_URL?.trim() || legacyRpc?.trim() || DEFAULT_BASE_SEPOLIA_RPC_URL;
166158
+ const rpc = environment.BASE_RPC_URL?.trim() || legacyRpc?.trim() || DEFAULT_BASE_SEPOLIA_RPC_URL;
166159
+ if (rpc === "__ZK_CREDITS_RELEASE_RPC_URL__")
166160
+ throw new Error("Release RPC has not been baked. Set BASE_RPC_URL or build the release package.");
166161
+ return rpc;
166159
166162
  }
166160
- var RPC_GUIDANCE = "The built-in public Base Sepolia endpoint is rate-limited. To use your own endpoint (chain ID 84532), run zk-credits config rpc. Providers: https://docs.base.org/base-chain/node-operators/node-providers .";
166163
+ var RPC_GUIDANCE = "The package uses the release Base Sepolia endpoint by default. To use your own endpoint (chain ID 84532), run zk-credits config rpc. Providers: https://docs.base.org/base-chain/node-operators/node-providers .";
166161
166164
  function validateRpcUrl(value) {
166162
166165
  try {
166163
166166
  const url = new URL(value.trim());
@@ -168819,7 +168822,7 @@ request-aware adapter and local proof engine; aggregate metrics stay on the
168819
168822
  loopback-only authenticated endpoint.
168820
168823
  "zk-credits serve --internal-trial-one-proof" limits this sidecar process to
168821
168824
  one authenticated, valid spend request and one local proof attempt.
168822
- Base Sepolia uses https://sepolia.base.org automatically. Public RPC endpoints
168825
+ Base Sepolia uses the launch endpoint baked into the package automatically. RPC endpoints
168823
168826
  are rate-limited; run "zk-credits config rpc" to use your own endpoint.
168824
168827
  Provider guide: https://docs.base.org/base-chain/node-operators/node-providers
168825
168828
  Set ZK_CREDITS_CREDENTIAL_PATH to the activated browser download for first setup.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zk-credits",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "Loopback x402 zk-prepaid transport for private Base API credits.",
5
5
  "homepage": "https://hazecredits.vercel.app",
6
6
  "repository": {