@settlemint/sdk-utils 2.3.1 → 2.3.2-main4c16ca2c

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.
@@ -1,4 +1,4 @@
1
- import { ZodSchema, ZodString, z } from 'zod';
1
+ import { ZodType, ZodString, z } from 'zod/v4';
2
2
 
3
3
  /**
4
4
  * Validates a value against a given Zod schema.
@@ -13,7 +13,7 @@ import { ZodSchema, ZodString, z } from 'zod';
13
13
  *
14
14
  * const validatedId = validate(IdSchema, "550e8400-e29b-41d4-a716-446655440000");
15
15
  */
16
- declare function validate<T extends ZodSchema>(schema: T, value: unknown): T["_output"];
16
+ declare function validate<T extends ZodType>(schema: T, value: unknown): T["_output"];
17
17
 
18
18
  /**
19
19
  * Schema for validating application access tokens.
@@ -34,175 +34,63 @@ type PersonalAccessToken = z.infer<typeof PersonalAccessTokenSchema>;
34
34
  declare const AccessTokenSchema: ZodString;
35
35
  type AccessToken = z.infer<typeof AccessTokenSchema>;
36
36
 
37
+ /**
38
+ * Use this value to indicate that the resources are not part of the SettleMint platform.
39
+ */
40
+ declare const STANDALONE_INSTANCE = "standalone";
37
41
  /**
38
42
  * Schema for validating environment variables used by the SettleMint SDK.
39
43
  * Defines validation rules and types for configuration values like URLs,
40
44
  * access tokens, workspace names, and service endpoints.
41
45
  */
42
46
  declare const DotEnvSchema: z.ZodObject<{
43
- /** Base URL of the SettleMint platform instance */
44
- SETTLEMINT_INSTANCE: z.ZodDefault<z.ZodString>;
45
- /** Application access token for authenticating with SettleMint services */
47
+ SETTLEMINT_INSTANCE: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"standalone">]>>;
46
48
  SETTLEMINT_ACCESS_TOKEN: z.ZodOptional<z.ZodString>;
47
- /** @internal */
48
49
  SETTLEMINT_PERSONAL_ACCESS_TOKEN: z.ZodOptional<z.ZodString>;
49
- /** Unique name of the workspace */
50
50
  SETTLEMINT_WORKSPACE: z.ZodOptional<z.ZodString>;
51
- /** Unique name of the application */
52
51
  SETTLEMINT_APPLICATION: z.ZodOptional<z.ZodString>;
53
- /** Unique name of the blockchain network */
54
52
  SETTLEMINT_BLOCKCHAIN_NETWORK: z.ZodOptional<z.ZodString>;
55
- /** Chain ID of the blockchain network */
56
53
  SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID: z.ZodOptional<z.ZodString>;
57
- /** Unique name of the blockchain node (should have a private key for signing transactions) */
58
54
  SETTLEMINT_BLOCKCHAIN_NODE: z.ZodOptional<z.ZodString>;
59
- /** JSON RPC endpoint for the blockchain node */
60
55
  SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT: z.ZodOptional<z.ZodString>;
61
- /** Unique name of the blockchain node or load balancer */
62
56
  SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER: z.ZodOptional<z.ZodString>;
63
- /** JSON RPC endpoint for the blockchain node or load balancer */
64
57
  SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT: z.ZodOptional<z.ZodString>;
65
- /** Unique name of the Hasura instance */
66
58
  SETTLEMINT_HASURA: z.ZodOptional<z.ZodString>;
67
- /** Endpoint URL for the Hasura GraphQL API */
68
59
  SETTLEMINT_HASURA_ENDPOINT: z.ZodOptional<z.ZodString>;
69
- /** Admin secret for authenticating with Hasura */
70
60
  SETTLEMINT_HASURA_ADMIN_SECRET: z.ZodOptional<z.ZodString>;
71
- /** Database connection URL for Hasura */
72
61
  SETTLEMINT_HASURA_DATABASE_URL: z.ZodOptional<z.ZodString>;
73
- /** Unique name of The Graph instance */
74
62
  SETTLEMINT_THEGRAPH: z.ZodOptional<z.ZodString>;
75
- /** Array of endpoint URLs for The Graph subgraphs */
76
- SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodString, "many">>, string[] | undefined, unknown>;
77
- /** Default The Graph subgraph to use */
63
+ SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z.ZodPipe<z.ZodTransform<never[] | null, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
78
64
  SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: z.ZodOptional<z.ZodString>;
79
- /** Unique name of the Smart Contract Portal instance */
80
65
  SETTLEMINT_PORTAL: z.ZodOptional<z.ZodString>;
81
- /** GraphQL endpoint URL for the Portal */
82
66
  SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: z.ZodOptional<z.ZodString>;
83
- /** REST endpoint URL for the Portal */
84
67
  SETTLEMINT_PORTAL_REST_ENDPOINT: z.ZodOptional<z.ZodString>;
85
- /** WebSocket endpoint URL for the Portal */
86
68
  SETTLEMINT_PORTAL_WS_ENDPOINT: z.ZodOptional<z.ZodString>;
87
- /** Unique name of the HD private key */
88
69
  SETTLEMINT_HD_PRIVATE_KEY: z.ZodOptional<z.ZodString>;
89
- /** Address of the HD private key forwarder */
90
70
  SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS: z.ZodOptional<z.ZodString>;
91
- /** Unique name of the accessible private key */
92
71
  SETTLEMINT_ACCESSIBLE_PRIVATE_KEY: z.ZodOptional<z.ZodString>;
93
- /** Unique name of the MinIO instance */
94
72
  SETTLEMINT_MINIO: z.ZodOptional<z.ZodString>;
95
- /** Endpoint URL for MinIO */
96
73
  SETTLEMINT_MINIO_ENDPOINT: z.ZodOptional<z.ZodString>;
97
- /** Access key for MinIO authentication */
98
74
  SETTLEMINT_MINIO_ACCESS_KEY: z.ZodOptional<z.ZodString>;
99
- /** Secret key for MinIO authentication */
100
75
  SETTLEMINT_MINIO_SECRET_KEY: z.ZodOptional<z.ZodString>;
101
- /** Unique name of the IPFS instance */
102
76
  SETTLEMINT_IPFS: z.ZodOptional<z.ZodString>;
103
- /** API endpoint URL for IPFS */
104
77
  SETTLEMINT_IPFS_API_ENDPOINT: z.ZodOptional<z.ZodString>;
105
- /** Pinning service endpoint URL for IPFS */
106
78
  SETTLEMINT_IPFS_PINNING_ENDPOINT: z.ZodOptional<z.ZodString>;
107
- /** Gateway endpoint URL for IPFS */
108
79
  SETTLEMINT_IPFS_GATEWAY_ENDPOINT: z.ZodOptional<z.ZodString>;
109
- /** Unique name of the custom deployment */
110
80
  SETTLEMINT_CUSTOM_DEPLOYMENT: z.ZodOptional<z.ZodString>;
111
- /** Endpoint URL for the custom deployment */
112
81
  SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: z.ZodOptional<z.ZodString>;
113
- /** Unique name of the Blockscout instance */
114
82
  SETTLEMINT_BLOCKSCOUT: z.ZodOptional<z.ZodString>;
115
- /** GraphQL endpoint URL for Blockscout */
116
83
  SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: z.ZodOptional<z.ZodString>;
117
- /** UI endpoint URL for Blockscout */
118
84
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: z.ZodOptional<z.ZodString>;
119
- /** Name of the new project being created */
120
85
  SETTLEMINT_NEW_PROJECT_NAME: z.ZodOptional<z.ZodString>;
121
- /** The log level to use */
122
- SETTLEMINT_LOG_LEVEL: z.ZodDefault<z.ZodEnum<["debug", "info", "warn", "error", "none"]>>;
123
- }, "strip", z.ZodTypeAny, {
124
- SETTLEMINT_INSTANCE: string;
125
- SETTLEMINT_LOG_LEVEL: "debug" | "info" | "warn" | "error" | "none";
126
- SETTLEMINT_ACCESS_TOKEN?: string | undefined;
127
- SETTLEMINT_PERSONAL_ACCESS_TOKEN?: string | undefined;
128
- SETTLEMINT_WORKSPACE?: string | undefined;
129
- SETTLEMINT_APPLICATION?: string | undefined;
130
- SETTLEMINT_BLOCKCHAIN_NETWORK?: string | undefined;
131
- SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID?: string | undefined;
132
- SETTLEMINT_BLOCKCHAIN_NODE?: string | undefined;
133
- SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT?: string | undefined;
134
- SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER?: string | undefined;
135
- SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT?: string | undefined;
136
- SETTLEMINT_HASURA?: string | undefined;
137
- SETTLEMINT_HASURA_ENDPOINT?: string | undefined;
138
- SETTLEMINT_HASURA_ADMIN_SECRET?: string | undefined;
139
- SETTLEMINT_HASURA_DATABASE_URL?: string | undefined;
140
- SETTLEMINT_THEGRAPH?: string | undefined;
141
- SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?: string[] | undefined;
142
- SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH?: string | undefined;
143
- SETTLEMINT_PORTAL?: string | undefined;
144
- SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined;
145
- SETTLEMINT_PORTAL_REST_ENDPOINT?: string | undefined;
146
- SETTLEMINT_PORTAL_WS_ENDPOINT?: string | undefined;
147
- SETTLEMINT_HD_PRIVATE_KEY?: string | undefined;
148
- SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?: string | undefined;
149
- SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?: string | undefined;
150
- SETTLEMINT_MINIO?: string | undefined;
151
- SETTLEMINT_MINIO_ENDPOINT?: string | undefined;
152
- SETTLEMINT_MINIO_ACCESS_KEY?: string | undefined;
153
- SETTLEMINT_MINIO_SECRET_KEY?: string | undefined;
154
- SETTLEMINT_IPFS?: string | undefined;
155
- SETTLEMINT_IPFS_API_ENDPOINT?: string | undefined;
156
- SETTLEMINT_IPFS_PINNING_ENDPOINT?: string | undefined;
157
- SETTLEMINT_IPFS_GATEWAY_ENDPOINT?: string | undefined;
158
- SETTLEMINT_CUSTOM_DEPLOYMENT?: string | undefined;
159
- SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT?: string | undefined;
160
- SETTLEMINT_BLOCKSCOUT?: string | undefined;
161
- SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT?: string | undefined;
162
- SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT?: string | undefined;
163
- SETTLEMINT_NEW_PROJECT_NAME?: string | undefined;
164
- }, {
165
- SETTLEMINT_INSTANCE?: string | undefined;
166
- SETTLEMINT_ACCESS_TOKEN?: string | undefined;
167
- SETTLEMINT_PERSONAL_ACCESS_TOKEN?: string | undefined;
168
- SETTLEMINT_WORKSPACE?: string | undefined;
169
- SETTLEMINT_APPLICATION?: string | undefined;
170
- SETTLEMINT_BLOCKCHAIN_NETWORK?: string | undefined;
171
- SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID?: string | undefined;
172
- SETTLEMINT_BLOCKCHAIN_NODE?: string | undefined;
173
- SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT?: string | undefined;
174
- SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER?: string | undefined;
175
- SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT?: string | undefined;
176
- SETTLEMINT_HASURA?: string | undefined;
177
- SETTLEMINT_HASURA_ENDPOINT?: string | undefined;
178
- SETTLEMINT_HASURA_ADMIN_SECRET?: string | undefined;
179
- SETTLEMINT_HASURA_DATABASE_URL?: string | undefined;
180
- SETTLEMINT_THEGRAPH?: string | undefined;
181
- SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?: unknown;
182
- SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH?: string | undefined;
183
- SETTLEMINT_PORTAL?: string | undefined;
184
- SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined;
185
- SETTLEMINT_PORTAL_REST_ENDPOINT?: string | undefined;
186
- SETTLEMINT_PORTAL_WS_ENDPOINT?: string | undefined;
187
- SETTLEMINT_HD_PRIVATE_KEY?: string | undefined;
188
- SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?: string | undefined;
189
- SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?: string | undefined;
190
- SETTLEMINT_MINIO?: string | undefined;
191
- SETTLEMINT_MINIO_ENDPOINT?: string | undefined;
192
- SETTLEMINT_MINIO_ACCESS_KEY?: string | undefined;
193
- SETTLEMINT_MINIO_SECRET_KEY?: string | undefined;
194
- SETTLEMINT_IPFS?: string | undefined;
195
- SETTLEMINT_IPFS_API_ENDPOINT?: string | undefined;
196
- SETTLEMINT_IPFS_PINNING_ENDPOINT?: string | undefined;
197
- SETTLEMINT_IPFS_GATEWAY_ENDPOINT?: string | undefined;
198
- SETTLEMINT_CUSTOM_DEPLOYMENT?: string | undefined;
199
- SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT?: string | undefined;
200
- SETTLEMINT_BLOCKSCOUT?: string | undefined;
201
- SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT?: string | undefined;
202
- SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT?: string | undefined;
203
- SETTLEMINT_NEW_PROJECT_NAME?: string | undefined;
204
- SETTLEMINT_LOG_LEVEL?: "debug" | "info" | "warn" | "error" | "none" | undefined;
205
- }>;
86
+ SETTLEMINT_LOG_LEVEL: z.ZodDefault<z.ZodEnum<{
87
+ error: "error";
88
+ debug: "debug";
89
+ info: "info";
90
+ warn: "warn";
91
+ none: "none";
92
+ }>>;
93
+ }, z.core.$strip>;
206
94
  /**
207
95
  * Type definition for the environment variables schema.
208
96
  */
@@ -212,7 +100,7 @@ type DotEnv = z.infer<typeof DotEnvSchema>;
212
100
  * Useful for validating incomplete configurations during development or build time.
213
101
  */
214
102
  declare const DotEnvSchemaPartial: z.ZodObject<{
215
- SETTLEMINT_INSTANCE: z.ZodOptional<z.ZodDefault<z.ZodString>>;
103
+ SETTLEMINT_INSTANCE: z.ZodOptional<z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"standalone">]>>>;
216
104
  SETTLEMINT_ACCESS_TOKEN: z.ZodOptional<z.ZodOptional<z.ZodString>>;
217
105
  SETTLEMINT_PERSONAL_ACCESS_TOKEN: z.ZodOptional<z.ZodOptional<z.ZodString>>;
218
106
  SETTLEMINT_WORKSPACE: z.ZodOptional<z.ZodOptional<z.ZodString>>;
@@ -228,7 +116,7 @@ declare const DotEnvSchemaPartial: z.ZodObject<{
228
116
  SETTLEMINT_HASURA_ADMIN_SECRET: z.ZodOptional<z.ZodOptional<z.ZodString>>;
229
117
  SETTLEMINT_HASURA_DATABASE_URL: z.ZodOptional<z.ZodOptional<z.ZodString>>;
230
118
  SETTLEMINT_THEGRAPH: z.ZodOptional<z.ZodOptional<z.ZodString>>;
231
- SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodString, "many">>, string[] | undefined, unknown>>;
119
+ SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z.ZodOptional<z.ZodPipe<z.ZodTransform<never[] | null, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>>;
232
120
  SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: z.ZodOptional<z.ZodOptional<z.ZodString>>;
233
121
  SETTLEMINT_PORTAL: z.ZodOptional<z.ZodOptional<z.ZodString>>;
234
122
  SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: z.ZodOptional<z.ZodOptional<z.ZodString>>;
@@ -251,90 +139,14 @@ declare const DotEnvSchemaPartial: z.ZodObject<{
251
139
  SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: z.ZodOptional<z.ZodOptional<z.ZodString>>;
252
140
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: z.ZodOptional<z.ZodOptional<z.ZodString>>;
253
141
  SETTLEMINT_NEW_PROJECT_NAME: z.ZodOptional<z.ZodOptional<z.ZodString>>;
254
- SETTLEMINT_LOG_LEVEL: z.ZodOptional<z.ZodDefault<z.ZodEnum<["debug", "info", "warn", "error", "none"]>>>;
255
- }, "strip", z.ZodTypeAny, {
256
- SETTLEMINT_INSTANCE?: string | undefined;
257
- SETTLEMINT_ACCESS_TOKEN?: string | undefined;
258
- SETTLEMINT_PERSONAL_ACCESS_TOKEN?: string | undefined;
259
- SETTLEMINT_WORKSPACE?: string | undefined;
260
- SETTLEMINT_APPLICATION?: string | undefined;
261
- SETTLEMINT_BLOCKCHAIN_NETWORK?: string | undefined;
262
- SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID?: string | undefined;
263
- SETTLEMINT_BLOCKCHAIN_NODE?: string | undefined;
264
- SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT?: string | undefined;
265
- SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER?: string | undefined;
266
- SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT?: string | undefined;
267
- SETTLEMINT_HASURA?: string | undefined;
268
- SETTLEMINT_HASURA_ENDPOINT?: string | undefined;
269
- SETTLEMINT_HASURA_ADMIN_SECRET?: string | undefined;
270
- SETTLEMINT_HASURA_DATABASE_URL?: string | undefined;
271
- SETTLEMINT_THEGRAPH?: string | undefined;
272
- SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?: string[] | undefined;
273
- SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH?: string | undefined;
274
- SETTLEMINT_PORTAL?: string | undefined;
275
- SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined;
276
- SETTLEMINT_PORTAL_REST_ENDPOINT?: string | undefined;
277
- SETTLEMINT_PORTAL_WS_ENDPOINT?: string | undefined;
278
- SETTLEMINT_HD_PRIVATE_KEY?: string | undefined;
279
- SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?: string | undefined;
280
- SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?: string | undefined;
281
- SETTLEMINT_MINIO?: string | undefined;
282
- SETTLEMINT_MINIO_ENDPOINT?: string | undefined;
283
- SETTLEMINT_MINIO_ACCESS_KEY?: string | undefined;
284
- SETTLEMINT_MINIO_SECRET_KEY?: string | undefined;
285
- SETTLEMINT_IPFS?: string | undefined;
286
- SETTLEMINT_IPFS_API_ENDPOINT?: string | undefined;
287
- SETTLEMINT_IPFS_PINNING_ENDPOINT?: string | undefined;
288
- SETTLEMINT_IPFS_GATEWAY_ENDPOINT?: string | undefined;
289
- SETTLEMINT_CUSTOM_DEPLOYMENT?: string | undefined;
290
- SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT?: string | undefined;
291
- SETTLEMINT_BLOCKSCOUT?: string | undefined;
292
- SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT?: string | undefined;
293
- SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT?: string | undefined;
294
- SETTLEMINT_NEW_PROJECT_NAME?: string | undefined;
295
- SETTLEMINT_LOG_LEVEL?: "debug" | "info" | "warn" | "error" | "none" | undefined;
296
- }, {
297
- SETTLEMINT_INSTANCE?: string | undefined;
298
- SETTLEMINT_ACCESS_TOKEN?: string | undefined;
299
- SETTLEMINT_PERSONAL_ACCESS_TOKEN?: string | undefined;
300
- SETTLEMINT_WORKSPACE?: string | undefined;
301
- SETTLEMINT_APPLICATION?: string | undefined;
302
- SETTLEMINT_BLOCKCHAIN_NETWORK?: string | undefined;
303
- SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID?: string | undefined;
304
- SETTLEMINT_BLOCKCHAIN_NODE?: string | undefined;
305
- SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT?: string | undefined;
306
- SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER?: string | undefined;
307
- SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT?: string | undefined;
308
- SETTLEMINT_HASURA?: string | undefined;
309
- SETTLEMINT_HASURA_ENDPOINT?: string | undefined;
310
- SETTLEMINT_HASURA_ADMIN_SECRET?: string | undefined;
311
- SETTLEMINT_HASURA_DATABASE_URL?: string | undefined;
312
- SETTLEMINT_THEGRAPH?: string | undefined;
313
- SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?: unknown;
314
- SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH?: string | undefined;
315
- SETTLEMINT_PORTAL?: string | undefined;
316
- SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined;
317
- SETTLEMINT_PORTAL_REST_ENDPOINT?: string | undefined;
318
- SETTLEMINT_PORTAL_WS_ENDPOINT?: string | undefined;
319
- SETTLEMINT_HD_PRIVATE_KEY?: string | undefined;
320
- SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?: string | undefined;
321
- SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?: string | undefined;
322
- SETTLEMINT_MINIO?: string | undefined;
323
- SETTLEMINT_MINIO_ENDPOINT?: string | undefined;
324
- SETTLEMINT_MINIO_ACCESS_KEY?: string | undefined;
325
- SETTLEMINT_MINIO_SECRET_KEY?: string | undefined;
326
- SETTLEMINT_IPFS?: string | undefined;
327
- SETTLEMINT_IPFS_API_ENDPOINT?: string | undefined;
328
- SETTLEMINT_IPFS_PINNING_ENDPOINT?: string | undefined;
329
- SETTLEMINT_IPFS_GATEWAY_ENDPOINT?: string | undefined;
330
- SETTLEMINT_CUSTOM_DEPLOYMENT?: string | undefined;
331
- SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT?: string | undefined;
332
- SETTLEMINT_BLOCKSCOUT?: string | undefined;
333
- SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT?: string | undefined;
334
- SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT?: string | undefined;
335
- SETTLEMINT_NEW_PROJECT_NAME?: string | undefined;
336
- SETTLEMINT_LOG_LEVEL?: "debug" | "info" | "warn" | "error" | "none" | undefined;
337
- }>;
142
+ SETTLEMINT_LOG_LEVEL: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
143
+ error: "error";
144
+ debug: "debug";
145
+ info: "info";
146
+ warn: "warn";
147
+ none: "none";
148
+ }>>>;
149
+ }, z.core.$strip>;
338
150
  /**
339
151
  * Type definition for the partial environment variables schema.
340
152
  */
@@ -354,7 +166,7 @@ type DotEnvPartial = z.infer<typeof DotEnvSchemaPartial>;
354
166
  * // Validate MongoDB ObjectID
355
167
  * const isValidObjectId = IdSchema.safeParse("507f1f77bcf86cd799439011").success;
356
168
  */
357
- declare const IdSchema: z.ZodUnion<[z.ZodString, z.ZodString]>;
169
+ declare const IdSchema: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
358
170
  /**
359
171
  * Type definition for database IDs, inferred from IdSchema.
360
172
  * Can be either a PostgreSQL UUID string or MongoDB ObjectID string.
@@ -425,7 +237,7 @@ type UrlPath = z.infer<typeof UrlPathSchema>;
425
237
  * const isValidPath = UrlOrPathSchema.safeParse("/api/v1/users").success;
426
238
  * // true
427
239
  */
428
- declare const UrlOrPathSchema: z.ZodUnion<[z.ZodString, z.ZodString]>;
240
+ declare const UrlOrPathSchema: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
429
241
  type UrlOrPath = z.infer<typeof UrlOrPathSchema>;
430
242
 
431
- export { type AccessToken, AccessTokenSchema, type ApplicationAccessToken, ApplicationAccessTokenSchema, type DotEnv, type DotEnvPartial, DotEnvSchema, DotEnvSchemaPartial, type Id, IdSchema, type PersonalAccessToken, PersonalAccessTokenSchema, UniqueNameSchema, type Url, type UrlOrPath, UrlOrPathSchema, type UrlPath, UrlPathSchema, UrlSchema, validate };
243
+ export { type AccessToken, AccessTokenSchema, type ApplicationAccessToken, ApplicationAccessTokenSchema, type DotEnv, type DotEnvPartial, DotEnvSchema, DotEnvSchemaPartial, type Id, IdSchema, type PersonalAccessToken, PersonalAccessTokenSchema, STANDALONE_INSTANCE, UniqueNameSchema, type Url, type UrlOrPath, UrlOrPathSchema, type UrlPath, UrlPathSchema, UrlSchema, validate };
@@ -1,12 +1,12 @@
1
1
  // src/validation/validate.ts
2
- import { ZodError } from "zod";
2
+ import { ZodError } from "zod/v4";
3
3
  function validate(schema, value) {
4
4
  try {
5
5
  return schema.parse(value);
6
6
  } catch (error) {
7
7
  if (error instanceof ZodError) {
8
- const formattedErrors = error.errors.map((err) => `- ${err.path.join(".")}: ${err.message}`).join("\n");
9
- throw new Error(`Validation error${error.errors.length > 1 ? "s" : ""}:
8
+ const formattedErrors = error.issues.map((err) => `- ${err.path.join(".")}: ${err.message}`).join("\n");
9
+ throw new Error(`Validation error${error.issues.length > 1 ? "s" : ""}:
10
10
  ${formattedErrors}`);
11
11
  }
12
12
  throw error;
@@ -14,7 +14,7 @@ ${formattedErrors}`);
14
14
  }
15
15
 
16
16
  // src/validation/access-token.schema.ts
17
- import { z } from "zod";
17
+ import { z } from "zod/v4";
18
18
  var ApplicationAccessTokenSchema = z.string().regex(/^sm_aat_.*$/);
19
19
  var PersonalAccessTokenSchema = z.string().regex(/^sm_pat_.*$/);
20
20
  var AccessTokenSchema = z.string().regex(/^sm_pat_.*|sm_aat_.*$/);
@@ -33,14 +33,14 @@ function tryParseJson(value, defaultValue = null) {
33
33
  }
34
34
 
35
35
  // src/validation/dot-env.schema.ts
36
- import { z as z4 } from "zod";
36
+ import { z as z4 } from "zod/v4";
37
37
 
38
38
  // src/validation/unique-name.schema.ts
39
- import { z as z2 } from "zod";
39
+ import { z as z2 } from "zod/v4";
40
40
  var UniqueNameSchema = z2.string().regex(/^[a-z0-9-]+$/);
41
41
 
42
42
  // src/validation/url.schema.ts
43
- import { z as z3 } from "zod";
43
+ import { z as z3 } from "zod/v4";
44
44
  var UrlSchema = z3.string().url();
45
45
  var UrlPathSchema = z3.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/[a-zA-Z0-9-_]+)*\/?)?$/, {
46
46
  message: "Invalid URL path format. Must start with '/' and can contain letters, numbers, hyphens, and underscores."
@@ -48,9 +48,10 @@ var UrlPathSchema = z3.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/[a-zA-Z0-9-_]+)*
48
48
  var UrlOrPathSchema = z3.union([UrlSchema, UrlPathSchema]);
49
49
 
50
50
  // src/validation/dot-env.schema.ts
51
+ var STANDALONE_INSTANCE = "standalone";
51
52
  var DotEnvSchema = z4.object({
52
- /** Base URL of the SettleMint platform instance */
53
- SETTLEMINT_INSTANCE: UrlSchema.default("https://console.settlemint.com"),
53
+ /** Base URL of the SettleMint platform instance, set to standalone if your resources are not part of the SettleMint platform */
54
+ SETTLEMINT_INSTANCE: z4.union([UrlSchema, z4.literal(STANDALONE_INSTANCE)]).default("https://console.settlemint.com"),
54
55
  /** Application access token for authenticating with SettleMint services */
55
56
  SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema.optional(),
56
57
  /** @internal */
@@ -136,7 +137,7 @@ var DotEnvSchema = z4.object({
136
137
  var DotEnvSchemaPartial = DotEnvSchema.partial();
137
138
 
138
139
  // src/validation/id.schema.ts
139
- import { z as z5 } from "zod";
140
+ import { z as z5 } from "zod/v4";
140
141
  var IdSchema = z5.union([
141
142
  z5.string().uuid(),
142
143
  // PostgreSQL UUID
@@ -150,6 +151,7 @@ export {
150
151
  DotEnvSchemaPartial,
151
152
  IdSchema,
152
153
  PersonalAccessTokenSchema,
154
+ STANDALONE_INSTANCE,
153
155
  UniqueNameSchema,
154
156
  UrlOrPathSchema,
155
157
  UrlPathSchema,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/validation/validate.ts","../src/validation/access-token.schema.ts","../src/json.ts","../src/validation/dot-env.schema.ts","../src/validation/unique-name.schema.ts","../src/validation/url.schema.ts","../src/validation/id.schema.ts"],"sourcesContent":["import { ZodError, type ZodSchema } from \"zod\";\n\n/**\n * Validates a value against a given Zod schema.\n *\n * @param schema - The Zod schema to validate against.\n * @param value - The value to validate.\n * @returns The validated and parsed value.\n * @throws Will throw an error if validation fails, with formatted error messages.\n *\n * @example\n * import { validate } from \"@settlemint/sdk-utils/validation\";\n *\n * const validatedId = validate(IdSchema, \"550e8400-e29b-41d4-a716-446655440000\");\n */\nexport function validate<T extends ZodSchema>(schema: T, value: unknown): T[\"_output\"] {\n try {\n return schema.parse(value);\n } catch (error) {\n if (error instanceof ZodError) {\n const formattedErrors = error.errors.map((err) => `- ${err.path.join(\".\")}: ${err.message}`).join(\"\\n\");\n throw new Error(`Validation error${error.errors.length > 1 ? \"s\" : \"\"}:\\n${formattedErrors}`);\n }\n throw error; // Re-throw if it's not a ZodError\n }\n}\n","import { type ZodString, z } from \"zod\";\n\n/**\n * Schema for validating application access tokens.\n * Application access tokens start with 'sm_aat_' prefix.\n */\nexport const ApplicationAccessTokenSchema: ZodString = z.string().regex(/^sm_aat_.*$/);\nexport type ApplicationAccessToken = z.infer<typeof ApplicationAccessTokenSchema>;\n\n/**\n * Schema for validating personal access tokens.\n * Personal access tokens start with 'sm_pat_' prefix.\n */\nexport const PersonalAccessTokenSchema: ZodString = z.string().regex(/^sm_pat_.*$/);\nexport type PersonalAccessToken = z.infer<typeof PersonalAccessTokenSchema>;\n\n/**\n * Schema for validating both application and personal access tokens.\n * Accepts tokens starting with either 'sm_pat_' or 'sm_aat_' prefix.\n */\nexport const AccessTokenSchema: ZodString = z.string().regex(/^sm_pat_.*|sm_aat_.*$/);\nexport type AccessToken = z.infer<typeof AccessTokenSchema>;\n","/**\n * Attempts to parse a JSON string into a typed value, returning a default value if parsing fails.\n *\n * @param value - The JSON string to parse\n * @param defaultValue - The value to return if parsing fails or results in null/undefined\n * @returns The parsed JSON value as type T, or the default value if parsing fails\n *\n * @example\n * import { tryParseJson } from \"@settlemint/sdk-utils\";\n *\n * const config = tryParseJson<{ port: number }>(\n * '{\"port\": 3000}',\n * { port: 8080 }\n * );\n * // Returns: { port: 3000 }\n *\n * const invalid = tryParseJson<string[]>(\n * 'invalid json',\n * []\n * );\n * // Returns: []\n */\nexport function tryParseJson<T>(value: string, defaultValue: T | null = null): T | null {\n try {\n const parsed = JSON.parse(value) as T;\n if (parsed === undefined || parsed === null) {\n return defaultValue;\n }\n return parsed;\n } catch (err) {\n // Invalid json\n return defaultValue;\n }\n}\n\n/**\n * Extracts a JSON object from a string.\n *\n * @param value - The string to extract the JSON object from\n * @returns The parsed JSON object, or null if no JSON object is found\n * @throws {Error} If the input string is too long (longer than 5000 characters)\n * @example\n * import { extractJsonObject } from \"@settlemint/sdk-utils\";\n *\n * const json = extractJsonObject<{ port: number }>(\n * 'port info: {\"port\": 3000}',\n * );\n * // Returns: { port: 3000 }\n */\nexport function extractJsonObject<T>(value: string): T | null {\n if (value.length > 5000) {\n throw new Error(\"Input too long\");\n }\n const result = /\\{([\\s\\S]*)\\}/.exec(value);\n if (!result) {\n return null;\n }\n return tryParseJson<T>(result[0]);\n}\n\n/**\n * Converts a value to a JSON stringifiable format.\n *\n * @param value - The value to convert\n * @returns The JSON stringifiable value\n *\n * @example\n * import { makeJsonStringifiable } from \"@settlemint/sdk-utils\";\n *\n * const json = makeJsonStringifiable<{ amount: bigint }>({ amount: BigInt(1000) });\n * // Returns: '{\"amount\":\"1000\"}'\n */\nexport function makeJsonStringifiable<T>(value: unknown): T {\n if (value === undefined || value === null) {\n return value as T;\n }\n return tryParseJson<T>(\n JSON.stringify(\n value,\n (_, value) => (typeof value === \"bigint\" ? value.toString() : value), // return everything else unchanged\n ),\n ) as T;\n}\n","import { tryParseJson } from \"@/json.js\";\nimport { z } from \"zod\";\nimport { ApplicationAccessTokenSchema, PersonalAccessTokenSchema } from \"./access-token.schema.js\";\nimport { UniqueNameSchema } from \"./unique-name.schema.js\";\nimport { UrlSchema } from \"./url.schema.js\";\n\n/**\n * Schema for validating environment variables used by the SettleMint SDK.\n * Defines validation rules and types for configuration values like URLs,\n * access tokens, workspace names, and service endpoints.\n */\nexport const DotEnvSchema = z.object({\n /** Base URL of the SettleMint platform instance */\n SETTLEMINT_INSTANCE: UrlSchema.default(\"https://console.settlemint.com\"),\n /** Application access token for authenticating with SettleMint services */\n SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema.optional(),\n /** @internal */\n SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema.optional(),\n /** Unique name of the workspace */\n SETTLEMINT_WORKSPACE: UniqueNameSchema.optional(),\n /** Unique name of the application */\n SETTLEMINT_APPLICATION: UniqueNameSchema.optional(),\n /** Unique name of the blockchain network */\n SETTLEMINT_BLOCKCHAIN_NETWORK: UniqueNameSchema.optional(),\n /** Chain ID of the blockchain network */\n SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID: z.string().optional(),\n /** Unique name of the blockchain node (should have a private key for signing transactions) */\n SETTLEMINT_BLOCKCHAIN_NODE: UniqueNameSchema.optional(),\n /** JSON RPC endpoint for the blockchain node */\n SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT: UrlSchema.optional(),\n /** Unique name of the blockchain node or load balancer */\n SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER: UniqueNameSchema.optional(),\n /** JSON RPC endpoint for the blockchain node or load balancer */\n SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT: UrlSchema.optional(),\n /** Unique name of the Hasura instance */\n SETTLEMINT_HASURA: UniqueNameSchema.optional(),\n /** Endpoint URL for the Hasura GraphQL API */\n SETTLEMINT_HASURA_ENDPOINT: UrlSchema.optional(),\n /** Admin secret for authenticating with Hasura */\n SETTLEMINT_HASURA_ADMIN_SECRET: z.string().optional(),\n /** Database connection URL for Hasura */\n SETTLEMINT_HASURA_DATABASE_URL: z.string().optional(),\n /** Unique name of The Graph instance */\n SETTLEMINT_THEGRAPH: UniqueNameSchema.optional(),\n /** Array of endpoint URLs for The Graph subgraphs */\n SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z.preprocess(\n (value) => tryParseJson(value as string, []),\n z.array(UrlSchema).optional(),\n ),\n /** Default The Graph subgraph to use */\n SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: z.string().optional(),\n /** Unique name of the Smart Contract Portal instance */\n SETTLEMINT_PORTAL: UniqueNameSchema.optional(),\n /** GraphQL endpoint URL for the Portal */\n SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema.optional(),\n /** REST endpoint URL for the Portal */\n SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema.optional(),\n /** WebSocket endpoint URL for the Portal */\n SETTLEMINT_PORTAL_WS_ENDPOINT: UrlSchema.optional(),\n /** Unique name of the HD private key */\n SETTLEMINT_HD_PRIVATE_KEY: UniqueNameSchema.optional(),\n /** Address of the HD private key forwarder */\n SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS: z.string().optional(),\n /** Unique name of the accessible private key */\n SETTLEMINT_ACCESSIBLE_PRIVATE_KEY: UniqueNameSchema.optional(),\n /** Unique name of the MinIO instance */\n SETTLEMINT_MINIO: UniqueNameSchema.optional(),\n /** Endpoint URL for MinIO */\n SETTLEMINT_MINIO_ENDPOINT: UrlSchema.optional(),\n /** Access key for MinIO authentication */\n SETTLEMINT_MINIO_ACCESS_KEY: z.string().optional(),\n /** Secret key for MinIO authentication */\n SETTLEMINT_MINIO_SECRET_KEY: z.string().optional(),\n /** Unique name of the IPFS instance */\n SETTLEMINT_IPFS: UniqueNameSchema.optional(),\n /** API endpoint URL for IPFS */\n SETTLEMINT_IPFS_API_ENDPOINT: UrlSchema.optional(),\n /** Pinning service endpoint URL for IPFS */\n SETTLEMINT_IPFS_PINNING_ENDPOINT: UrlSchema.optional(),\n /** Gateway endpoint URL for IPFS */\n SETTLEMINT_IPFS_GATEWAY_ENDPOINT: UrlSchema.optional(),\n /** Unique name of the custom deployment */\n SETTLEMINT_CUSTOM_DEPLOYMENT: UniqueNameSchema.optional(),\n /** Endpoint URL for the custom deployment */\n SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: UrlSchema.optional(),\n /** Unique name of the Blockscout instance */\n SETTLEMINT_BLOCKSCOUT: UniqueNameSchema.optional(),\n /** GraphQL endpoint URL for Blockscout */\n SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema.optional(),\n /** UI endpoint URL for Blockscout */\n SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema.optional(),\n /** Name of the new project being created */\n SETTLEMINT_NEW_PROJECT_NAME: z.string().optional(),\n /** The log level to use */\n SETTLEMINT_LOG_LEVEL: z.enum([\"debug\", \"info\", \"warn\", \"error\", \"none\"]).default(\"warn\"),\n});\n\n/**\n * Type definition for the environment variables schema.\n */\nexport type DotEnv = z.infer<typeof DotEnvSchema>;\n\n/**\n * Partial version of the environment variables schema where all fields are optional.\n * Useful for validating incomplete configurations during development or build time.\n */\nexport const DotEnvSchemaPartial = DotEnvSchema.partial();\n\n/**\n * Type definition for the partial environment variables schema.\n */\nexport type DotEnvPartial = z.infer<typeof DotEnvSchemaPartial>;\n","import { z } from \"zod\";\n\n/**\n * Schema for validating unique names used across the SettleMint platform.\n * Only accepts lowercase alphanumeric characters and hyphens.\n * Used for workspace names, application names, service names etc.\n *\n * @example\n * import { UniqueNameSchema } from \"@settlemint/sdk-utils/validation\";\n *\n * // Validate a workspace name\n * const isValidName = UniqueNameSchema.safeParse(\"my-workspace-123\").success;\n * // true\n *\n * // Invalid names will fail validation\n * const isInvalidName = UniqueNameSchema.safeParse(\"My Workspace!\").success;\n * // false\n */\nexport const UniqueNameSchema = z.string().regex(/^[a-z0-9-]+$/);\n\n/**\n * Type definition for unique names, inferred from UniqueNameSchema.\n */\nexport type UniqueName = z.infer<typeof UniqueNameSchema>;\n","import { z } from \"zod\";\n\n/**\n * Schema for validating URLs.\n *\n * @example\n * import { UrlSchema } from \"@settlemint/sdk-utils/validation\";\n *\n * // Validate a URL\n * const isValidUrl = UrlSchema.safeParse(\"https://console.settlemint.com\").success;\n * // true\n *\n * // Invalid URLs will fail validation\n * const isInvalidUrl = UrlSchema.safeParse(\"not-a-url\").success;\n * // false\n */\nexport const UrlSchema = z.string().url();\nexport type Url = z.infer<typeof UrlSchema>;\n\n/**\n * Schema for validating URL paths.\n *\n * @example\n * import { UrlPathSchema } from \"@settlemint/sdk-utils/validation\";\n *\n * // Validate a URL path\n * const isValidPath = UrlPathSchema.safeParse(\"/api/v1/users\").success;\n * // true\n *\n * // Invalid paths will fail validation\n * const isInvalidPath = UrlPathSchema.safeParse(\"not-a-path\").success;\n * // false\n */\nexport const UrlPathSchema = z.string().regex(/^\\/(?:[a-zA-Z0-9-_]+(?:\\/[a-zA-Z0-9-_]+)*\\/?)?$/, {\n message: \"Invalid URL path format. Must start with '/' and can contain letters, numbers, hyphens, and underscores.\",\n});\n\nexport type UrlPath = z.infer<typeof UrlPathSchema>;\n\n/**\n * Schema that accepts either a full URL or a URL path.\n *\n * @example\n * import { UrlOrPathSchema } from \"@settlemint/sdk-utils/validation\";\n *\n * // Validate a URL\n * const isValidUrl = UrlOrPathSchema.safeParse(\"https://console.settlemint.com\").success;\n * // true\n *\n * // Validate a path\n * const isValidPath = UrlOrPathSchema.safeParse(\"/api/v1/users\").success;\n * // true\n */\nexport const UrlOrPathSchema = z.union([UrlSchema, UrlPathSchema]);\nexport type UrlOrPath = z.infer<typeof UrlOrPathSchema>;\n","import { z } from \"zod\";\n\n/**\n * Schema for validating database IDs. Accepts both PostgreSQL UUIDs and MongoDB ObjectIDs.\n * PostgreSQL UUIDs are 32 hexadecimal characters with hyphens (e.g. 123e4567-e89b-12d3-a456-426614174000).\n * MongoDB ObjectIDs are 24 hexadecimal characters (e.g. 507f1f77bcf86cd799439011).\n *\n * @example\n * import { IdSchema } from \"@settlemint/sdk-utils/validation\";\n *\n * // Validate PostgreSQL UUID\n * const isValidUuid = IdSchema.safeParse(\"123e4567-e89b-12d3-a456-426614174000\").success;\n *\n * // Validate MongoDB ObjectID\n * const isValidObjectId = IdSchema.safeParse(\"507f1f77bcf86cd799439011\").success;\n */\nexport const IdSchema = z.union([\n z\n .string()\n .uuid(), // PostgreSQL UUID\n z\n .string()\n .regex(/^[0-9a-fA-F]{24}$/), // MongoDB ObjectID\n]);\n\n/**\n * Type definition for database IDs, inferred from IdSchema.\n * Can be either a PostgreSQL UUID string or MongoDB ObjectID string.\n */\nexport type Id = z.infer<typeof IdSchema>;\n"],"mappings":"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","names":["z","z","z","z","z"]}
1
+ {"version":3,"sources":["../src/validation/validate.ts","../src/validation/access-token.schema.ts","../src/json.ts","../src/validation/dot-env.schema.ts","../src/validation/unique-name.schema.ts","../src/validation/url.schema.ts","../src/validation/id.schema.ts"],"sourcesContent":["import { ZodError, type ZodType } from \"zod/v4\";\n\n/**\n * Validates a value against a given Zod schema.\n *\n * @param schema - The Zod schema to validate against.\n * @param value - The value to validate.\n * @returns The validated and parsed value.\n * @throws Will throw an error if validation fails, with formatted error messages.\n *\n * @example\n * import { validate } from \"@settlemint/sdk-utils/validation\";\n *\n * const validatedId = validate(IdSchema, \"550e8400-e29b-41d4-a716-446655440000\");\n */\nexport function validate<T extends ZodType>(schema: T, value: unknown): T[\"_output\"] {\n try {\n return schema.parse(value);\n } catch (error) {\n if (error instanceof ZodError) {\n const formattedErrors = error.issues.map((err) => `- ${err.path.join(\".\")}: ${err.message}`).join(\"\\n\");\n throw new Error(`Validation error${error.issues.length > 1 ? \"s\" : \"\"}:\\n${formattedErrors}`);\n }\n throw error; // Re-throw if it's not a ZodError\n }\n}\n","import { type ZodString, z } from \"zod/v4\";\n\n/**\n * Schema for validating application access tokens.\n * Application access tokens start with 'sm_aat_' prefix.\n */\nexport const ApplicationAccessTokenSchema: ZodString = z.string().regex(/^sm_aat_.*$/);\nexport type ApplicationAccessToken = z.infer<typeof ApplicationAccessTokenSchema>;\n\n/**\n * Schema for validating personal access tokens.\n * Personal access tokens start with 'sm_pat_' prefix.\n */\nexport const PersonalAccessTokenSchema: ZodString = z.string().regex(/^sm_pat_.*$/);\nexport type PersonalAccessToken = z.infer<typeof PersonalAccessTokenSchema>;\n\n/**\n * Schema for validating both application and personal access tokens.\n * Accepts tokens starting with either 'sm_pat_' or 'sm_aat_' prefix.\n */\nexport const AccessTokenSchema: ZodString = z.string().regex(/^sm_pat_.*|sm_aat_.*$/);\nexport type AccessToken = z.infer<typeof AccessTokenSchema>;\n","/**\n * Attempts to parse a JSON string into a typed value, returning a default value if parsing fails.\n *\n * @param value - The JSON string to parse\n * @param defaultValue - The value to return if parsing fails or results in null/undefined\n * @returns The parsed JSON value as type T, or the default value if parsing fails\n *\n * @example\n * import { tryParseJson } from \"@settlemint/sdk-utils\";\n *\n * const config = tryParseJson<{ port: number }>(\n * '{\"port\": 3000}',\n * { port: 8080 }\n * );\n * // Returns: { port: 3000 }\n *\n * const invalid = tryParseJson<string[]>(\n * 'invalid json',\n * []\n * );\n * // Returns: []\n */\nexport function tryParseJson<T>(value: string, defaultValue: T | null = null): T | null {\n try {\n const parsed = JSON.parse(value) as T;\n if (parsed === undefined || parsed === null) {\n return defaultValue;\n }\n return parsed;\n } catch (err) {\n // Invalid json\n return defaultValue;\n }\n}\n\n/**\n * Extracts a JSON object from a string.\n *\n * @param value - The string to extract the JSON object from\n * @returns The parsed JSON object, or null if no JSON object is found\n * @throws {Error} If the input string is too long (longer than 5000 characters)\n * @example\n * import { extractJsonObject } from \"@settlemint/sdk-utils\";\n *\n * const json = extractJsonObject<{ port: number }>(\n * 'port info: {\"port\": 3000}',\n * );\n * // Returns: { port: 3000 }\n */\nexport function extractJsonObject<T>(value: string): T | null {\n if (value.length > 5000) {\n throw new Error(\"Input too long\");\n }\n const result = /\\{([\\s\\S]*)\\}/.exec(value);\n if (!result) {\n return null;\n }\n return tryParseJson<T>(result[0]);\n}\n\n/**\n * Converts a value to a JSON stringifiable format.\n *\n * @param value - The value to convert\n * @returns The JSON stringifiable value\n *\n * @example\n * import { makeJsonStringifiable } from \"@settlemint/sdk-utils\";\n *\n * const json = makeJsonStringifiable<{ amount: bigint }>({ amount: BigInt(1000) });\n * // Returns: '{\"amount\":\"1000\"}'\n */\nexport function makeJsonStringifiable<T>(value: unknown): T {\n if (value === undefined || value === null) {\n return value as T;\n }\n return tryParseJson<T>(\n JSON.stringify(\n value,\n (_, value) => (typeof value === \"bigint\" ? value.toString() : value), // return everything else unchanged\n ),\n ) as T;\n}\n","import { tryParseJson } from \"@/json.js\";\nimport { z } from \"zod/v4\";\nimport { ApplicationAccessTokenSchema, PersonalAccessTokenSchema } from \"./access-token.schema.js\";\nimport { UniqueNameSchema } from \"./unique-name.schema.js\";\nimport { UrlSchema } from \"./url.schema.js\";\n\n/**\n * Use this value to indicate that the resources are not part of the SettleMint platform.\n */\nexport const STANDALONE_INSTANCE = \"standalone\";\n\n/**\n * Schema for validating environment variables used by the SettleMint SDK.\n * Defines validation rules and types for configuration values like URLs,\n * access tokens, workspace names, and service endpoints.\n */\nexport const DotEnvSchema = z.object({\n /** Base URL of the SettleMint platform instance, set to standalone if your resources are not part of the SettleMint platform */\n SETTLEMINT_INSTANCE: z.union([UrlSchema, z.literal(STANDALONE_INSTANCE)]).default(\"https://console.settlemint.com\"),\n /** Application access token for authenticating with SettleMint services */\n SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema.optional(),\n /** @internal */\n SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema.optional(),\n /** Unique name of the workspace */\n SETTLEMINT_WORKSPACE: UniqueNameSchema.optional(),\n /** Unique name of the application */\n SETTLEMINT_APPLICATION: UniqueNameSchema.optional(),\n /** Unique name of the blockchain network */\n SETTLEMINT_BLOCKCHAIN_NETWORK: UniqueNameSchema.optional(),\n /** Chain ID of the blockchain network */\n SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID: z.string().optional(),\n /** Unique name of the blockchain node (should have a private key for signing transactions) */\n SETTLEMINT_BLOCKCHAIN_NODE: UniqueNameSchema.optional(),\n /** JSON RPC endpoint for the blockchain node */\n SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT: UrlSchema.optional(),\n /** Unique name of the blockchain node or load balancer */\n SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER: UniqueNameSchema.optional(),\n /** JSON RPC endpoint for the blockchain node or load balancer */\n SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT: UrlSchema.optional(),\n /** Unique name of the Hasura instance */\n SETTLEMINT_HASURA: UniqueNameSchema.optional(),\n /** Endpoint URL for the Hasura GraphQL API */\n SETTLEMINT_HASURA_ENDPOINT: UrlSchema.optional(),\n /** Admin secret for authenticating with Hasura */\n SETTLEMINT_HASURA_ADMIN_SECRET: z.string().optional(),\n /** Database connection URL for Hasura */\n SETTLEMINT_HASURA_DATABASE_URL: z.string().optional(),\n /** Unique name of The Graph instance */\n SETTLEMINT_THEGRAPH: UniqueNameSchema.optional(),\n /** Array of endpoint URLs for The Graph subgraphs */\n SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z.preprocess(\n (value) => tryParseJson(value as string, []),\n z.array(UrlSchema).optional(),\n ),\n /** Default The Graph subgraph to use */\n SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH: z.string().optional(),\n /** Unique name of the Smart Contract Portal instance */\n SETTLEMINT_PORTAL: UniqueNameSchema.optional(),\n /** GraphQL endpoint URL for the Portal */\n SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema.optional(),\n /** REST endpoint URL for the Portal */\n SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema.optional(),\n /** WebSocket endpoint URL for the Portal */\n SETTLEMINT_PORTAL_WS_ENDPOINT: UrlSchema.optional(),\n /** Unique name of the HD private key */\n SETTLEMINT_HD_PRIVATE_KEY: UniqueNameSchema.optional(),\n /** Address of the HD private key forwarder */\n SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS: z.string().optional(),\n /** Unique name of the accessible private key */\n SETTLEMINT_ACCESSIBLE_PRIVATE_KEY: UniqueNameSchema.optional(),\n /** Unique name of the MinIO instance */\n SETTLEMINT_MINIO: UniqueNameSchema.optional(),\n /** Endpoint URL for MinIO */\n SETTLEMINT_MINIO_ENDPOINT: UrlSchema.optional(),\n /** Access key for MinIO authentication */\n SETTLEMINT_MINIO_ACCESS_KEY: z.string().optional(),\n /** Secret key for MinIO authentication */\n SETTLEMINT_MINIO_SECRET_KEY: z.string().optional(),\n /** Unique name of the IPFS instance */\n SETTLEMINT_IPFS: UniqueNameSchema.optional(),\n /** API endpoint URL for IPFS */\n SETTLEMINT_IPFS_API_ENDPOINT: UrlSchema.optional(),\n /** Pinning service endpoint URL for IPFS */\n SETTLEMINT_IPFS_PINNING_ENDPOINT: UrlSchema.optional(),\n /** Gateway endpoint URL for IPFS */\n SETTLEMINT_IPFS_GATEWAY_ENDPOINT: UrlSchema.optional(),\n /** Unique name of the custom deployment */\n SETTLEMINT_CUSTOM_DEPLOYMENT: UniqueNameSchema.optional(),\n /** Endpoint URL for the custom deployment */\n SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: UrlSchema.optional(),\n /** Unique name of the Blockscout instance */\n SETTLEMINT_BLOCKSCOUT: UniqueNameSchema.optional(),\n /** GraphQL endpoint URL for Blockscout */\n SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema.optional(),\n /** UI endpoint URL for Blockscout */\n SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema.optional(),\n /** Name of the new project being created */\n SETTLEMINT_NEW_PROJECT_NAME: z.string().optional(),\n /** The log level to use */\n SETTLEMINT_LOG_LEVEL: z.enum([\"debug\", \"info\", \"warn\", \"error\", \"none\"]).default(\"warn\"),\n});\n\n/**\n * Type definition for the environment variables schema.\n */\nexport type DotEnv = z.infer<typeof DotEnvSchema>;\n\n/**\n * Partial version of the environment variables schema where all fields are optional.\n * Useful for validating incomplete configurations during development or build time.\n */\nexport const DotEnvSchemaPartial = DotEnvSchema.partial();\n\n/**\n * Type definition for the partial environment variables schema.\n */\nexport type DotEnvPartial = z.infer<typeof DotEnvSchemaPartial>;\n","import { z } from \"zod/v4\";\n\n/**\n * Schema for validating unique names used across the SettleMint platform.\n * Only accepts lowercase alphanumeric characters and hyphens.\n * Used for workspace names, application names, service names etc.\n *\n * @example\n * import { UniqueNameSchema } from \"@settlemint/sdk-utils/validation\";\n *\n * // Validate a workspace name\n * const isValidName = UniqueNameSchema.safeParse(\"my-workspace-123\").success;\n * // true\n *\n * // Invalid names will fail validation\n * const isInvalidName = UniqueNameSchema.safeParse(\"My Workspace!\").success;\n * // false\n */\nexport const UniqueNameSchema = z.string().regex(/^[a-z0-9-]+$/);\n\n/**\n * Type definition for unique names, inferred from UniqueNameSchema.\n */\nexport type UniqueName = z.infer<typeof UniqueNameSchema>;\n","import { z } from \"zod/v4\";\n\n/**\n * Schema for validating URLs.\n *\n * @example\n * import { UrlSchema } from \"@settlemint/sdk-utils/validation\";\n *\n * // Validate a URL\n * const isValidUrl = UrlSchema.safeParse(\"https://console.settlemint.com\").success;\n * // true\n *\n * // Invalid URLs will fail validation\n * const isInvalidUrl = UrlSchema.safeParse(\"not-a-url\").success;\n * // false\n */\nexport const UrlSchema = z.string().url();\nexport type Url = z.infer<typeof UrlSchema>;\n\n/**\n * Schema for validating URL paths.\n *\n * @example\n * import { UrlPathSchema } from \"@settlemint/sdk-utils/validation\";\n *\n * // Validate a URL path\n * const isValidPath = UrlPathSchema.safeParse(\"/api/v1/users\").success;\n * // true\n *\n * // Invalid paths will fail validation\n * const isInvalidPath = UrlPathSchema.safeParse(\"not-a-path\").success;\n * // false\n */\nexport const UrlPathSchema = z.string().regex(/^\\/(?:[a-zA-Z0-9-_]+(?:\\/[a-zA-Z0-9-_]+)*\\/?)?$/, {\n message: \"Invalid URL path format. Must start with '/' and can contain letters, numbers, hyphens, and underscores.\",\n});\n\nexport type UrlPath = z.infer<typeof UrlPathSchema>;\n\n/**\n * Schema that accepts either a full URL or a URL path.\n *\n * @example\n * import { UrlOrPathSchema } from \"@settlemint/sdk-utils/validation\";\n *\n * // Validate a URL\n * const isValidUrl = UrlOrPathSchema.safeParse(\"https://console.settlemint.com\").success;\n * // true\n *\n * // Validate a path\n * const isValidPath = UrlOrPathSchema.safeParse(\"/api/v1/users\").success;\n * // true\n */\nexport const UrlOrPathSchema = z.union([UrlSchema, UrlPathSchema]);\nexport type UrlOrPath = z.infer<typeof UrlOrPathSchema>;\n","import { z } from \"zod/v4\";\n\n/**\n * Schema for validating database IDs. Accepts both PostgreSQL UUIDs and MongoDB ObjectIDs.\n * PostgreSQL UUIDs are 32 hexadecimal characters with hyphens (e.g. 123e4567-e89b-12d3-a456-426614174000).\n * MongoDB ObjectIDs are 24 hexadecimal characters (e.g. 507f1f77bcf86cd799439011).\n *\n * @example\n * import { IdSchema } from \"@settlemint/sdk-utils/validation\";\n *\n * // Validate PostgreSQL UUID\n * const isValidUuid = IdSchema.safeParse(\"123e4567-e89b-12d3-a456-426614174000\").success;\n *\n * // Validate MongoDB ObjectID\n * const isValidObjectId = IdSchema.safeParse(\"507f1f77bcf86cd799439011\").success;\n */\nexport const IdSchema = z.union([\n z\n .string()\n .uuid(), // PostgreSQL UUID\n z\n .string()\n .regex(/^[0-9a-fA-F]{24}$/), // MongoDB ObjectID\n]);\n\n/**\n * Type definition for database IDs, inferred from IdSchema.\n * Can be either a PostgreSQL UUID string or MongoDB ObjectID string.\n */\nexport type Id = z.infer<typeof IdSchema>;\n"],"mappings":"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","names":["z","z","z","z","z"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@settlemint/sdk-utils",
3
3
  "description": "Shared utilities and helper functions for SettleMint SDK modules",
4
- "version": "2.3.1",
4
+ "version": "2.3.2-main4c16ca2c",
5
5
  "type": "module",
6
6
  "private": false,
7
7
  "license": "FSL-1.1-MIT",