@settlemint/sdk-utils 2.2.3-prf8d0b522 → 2.3.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/README.md +198 -156
- package/dist/environment.cjs +6 -1
- package/dist/environment.cjs.map +1 -1
- package/dist/environment.d.cts +14 -0
- package/dist/environment.d.ts +14 -0
- package/dist/environment.mjs +6 -1
- package/dist/environment.mjs.map +1 -1
- package/dist/filesystem.cjs.map +1 -1
- package/dist/filesystem.mjs.map +1 -1
- package/dist/index.cjs +14 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.mjs +13 -0
- package/dist/index.mjs.map +1 -1
- package/dist/validation.cjs +4 -0
- package/dist/validation.cjs.map +1 -1
- package/dist/validation.d.cts +14 -0
- package/dist/validation.d.ts +14 -0
- package/dist/validation.mjs +4 -0
- package/dist/validation.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
- [isPackageInstalled()](#ispackageinstalled)
|
|
54
54
|
- [list()](#list)
|
|
55
55
|
- [loadEnv()](#loadenv)
|
|
56
|
+
- [makeJsonStringifiable()](#makejsonstringifiable)
|
|
56
57
|
- [maskTokens()](#masktokens)
|
|
57
58
|
- [note()](#note)
|
|
58
59
|
- [outro()](#outro)
|
|
@@ -115,7 +116,7 @@ The SettleMint Utils SDK provides a collection of shared utilities and helper fu
|
|
|
115
116
|
|
|
116
117
|
> **ascii**(): `void`
|
|
117
118
|
|
|
118
|
-
Defined in: [sdk/utils/src/terminal/ascii.ts:14](https://github.com/settlemint/sdk/blob/v2.
|
|
119
|
+
Defined in: [sdk/utils/src/terminal/ascii.ts:14](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/ascii.ts#L14)
|
|
119
120
|
|
|
120
121
|
Prints the SettleMint ASCII art logo to the console in magenta color.
|
|
121
122
|
Used for CLI branding and visual identification.
|
|
@@ -139,7 +140,7 @@ ascii();
|
|
|
139
140
|
|
|
140
141
|
> **camelCaseToWords**(`s`): `string`
|
|
141
142
|
|
|
142
|
-
Defined in: [sdk/utils/src/string.ts:29](https://github.com/settlemint/sdk/blob/v2.
|
|
143
|
+
Defined in: [sdk/utils/src/string.ts:29](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/string.ts#L29)
|
|
143
144
|
|
|
144
145
|
Converts a camelCase string to a human-readable string.
|
|
145
146
|
|
|
@@ -170,7 +171,7 @@ const words = camelCaseToWords("camelCaseString");
|
|
|
170
171
|
|
|
171
172
|
> **cancel**(`msg`): `never`
|
|
172
173
|
|
|
173
|
-
Defined in: [sdk/utils/src/terminal/cancel.ts:23](https://github.com/settlemint/sdk/blob/v2.
|
|
174
|
+
Defined in: [sdk/utils/src/terminal/cancel.ts:23](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/cancel.ts#L23)
|
|
174
175
|
|
|
175
176
|
Displays an error message in red inverse text and throws a CancelError.
|
|
176
177
|
Used to terminate execution with a visible error message.
|
|
@@ -203,7 +204,7 @@ cancel("An error occurred");
|
|
|
203
204
|
|
|
204
205
|
> **capitalizeFirstLetter**(`val`): `string`
|
|
205
206
|
|
|
206
|
-
Defined in: [sdk/utils/src/string.ts:13](https://github.com/settlemint/sdk/blob/v2.
|
|
207
|
+
Defined in: [sdk/utils/src/string.ts:13](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/string.ts#L13)
|
|
207
208
|
|
|
208
209
|
Capitalizes the first letter of a string.
|
|
209
210
|
|
|
@@ -234,7 +235,7 @@ const capitalized = capitalizeFirstLetter("hello");
|
|
|
234
235
|
|
|
235
236
|
> **createLogger**(`options`): [`Logger`](#logger)
|
|
236
237
|
|
|
237
|
-
Defined in: [sdk/utils/src/logging/logger.ts:50](https://github.com/settlemint/sdk/blob/v2.
|
|
238
|
+
Defined in: [sdk/utils/src/logging/logger.ts:50](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/logging/logger.ts#L50)
|
|
238
239
|
|
|
239
240
|
Creates a simple logger with configurable log level
|
|
240
241
|
|
|
@@ -267,7 +268,7 @@ logger.error('Operation failed', new Error('Connection timeout'));
|
|
|
267
268
|
|
|
268
269
|
> **emptyDir**(`dir`): `Promise`\<`void`\>
|
|
269
270
|
|
|
270
|
-
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:45](https://github.com/settlemint/sdk/blob/v2.
|
|
271
|
+
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:45](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/package-manager/download-and-extract.ts#L45)
|
|
271
272
|
|
|
272
273
|
Removes all contents of a directory except the .git folder
|
|
273
274
|
|
|
@@ -295,7 +296,7 @@ await emptyDir("/path/to/dir"); // Removes all contents except .git
|
|
|
295
296
|
|
|
296
297
|
> **ensureBrowser**(): `void`
|
|
297
298
|
|
|
298
|
-
Defined in: [sdk/utils/src/runtime/ensure-server.ts:31](https://github.com/settlemint/sdk/blob/v2.
|
|
299
|
+
Defined in: [sdk/utils/src/runtime/ensure-server.ts:31](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/runtime/ensure-server.ts#L31)
|
|
299
300
|
|
|
300
301
|
Ensures that code is running in a browser environment and not on the server.
|
|
301
302
|
|
|
@@ -322,7 +323,7 @@ ensureBrowser();
|
|
|
322
323
|
|
|
323
324
|
> **ensureServer**(): `void`
|
|
324
325
|
|
|
325
|
-
Defined in: [sdk/utils/src/runtime/ensure-server.ts:13](https://github.com/settlemint/sdk/blob/v2.
|
|
326
|
+
Defined in: [sdk/utils/src/runtime/ensure-server.ts:13](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/runtime/ensure-server.ts#L13)
|
|
326
327
|
|
|
327
328
|
Ensures that code is running on the server and not in a browser environment.
|
|
328
329
|
|
|
@@ -349,7 +350,7 @@ ensureServer();
|
|
|
349
350
|
|
|
350
351
|
> **executeCommand**(`command`, `args`, `options?`): `Promise`\<`string`[]\>
|
|
351
352
|
|
|
352
|
-
Defined in: [sdk/utils/src/terminal/execute-command.ts:51](https://github.com/settlemint/sdk/blob/v2.
|
|
353
|
+
Defined in: [sdk/utils/src/terminal/execute-command.ts:51](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/execute-command.ts#L51)
|
|
353
354
|
|
|
354
355
|
Executes a command with the given arguments in a child process.
|
|
355
356
|
Pipes stdin to the child process and captures stdout/stderr output.
|
|
@@ -391,7 +392,7 @@ await executeCommand("npm", ["install"], { silent: true });
|
|
|
391
392
|
|
|
392
393
|
> **exists**(`path`): `Promise`\<`boolean`\>
|
|
393
394
|
|
|
394
|
-
Defined in: [sdk/utils/src/filesystem/exists.ts:17](https://github.com/settlemint/sdk/blob/v2.
|
|
395
|
+
Defined in: [sdk/utils/src/filesystem/exists.ts:17](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/filesystem/exists.ts#L17)
|
|
395
396
|
|
|
396
397
|
Checks if a file or directory exists at the given path
|
|
397
398
|
|
|
@@ -424,7 +425,7 @@ if (await exists('/path/to/file.txt')) {
|
|
|
424
425
|
|
|
425
426
|
> **extractJsonObject**\<`T`\>(`value`): `null` \| `T`
|
|
426
427
|
|
|
427
|
-
Defined in: [sdk/utils/src/json.ts:50](https://github.com/settlemint/sdk/blob/v2.
|
|
428
|
+
Defined in: [sdk/utils/src/json.ts:50](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/json.ts#L50)
|
|
428
429
|
|
|
429
430
|
Extracts a JSON object from a string.
|
|
430
431
|
|
|
@@ -467,7 +468,7 @@ const json = extractJsonObject<{ port: number }>(
|
|
|
467
468
|
|
|
468
469
|
> **fetchWithRetry**(`input`, `init?`, `maxRetries?`, `initialSleepTime?`): `Promise`\<`Response`\>
|
|
469
470
|
|
|
470
|
-
Defined in: [sdk/utils/src/http/fetch-with-retry.ts:18](https://github.com/settlemint/sdk/blob/v2.
|
|
471
|
+
Defined in: [sdk/utils/src/http/fetch-with-retry.ts:18](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/http/fetch-with-retry.ts#L18)
|
|
471
472
|
|
|
472
473
|
Retry an HTTP request with exponential backoff and jitter.
|
|
473
474
|
Only retries on server errors (5xx), rate limits (429), timeouts (408), and network errors.
|
|
@@ -505,7 +506,7 @@ const response = await fetchWithRetry("https://api.example.com/data");
|
|
|
505
506
|
|
|
506
507
|
> **findMonoRepoPackages**(`projectDir`): `Promise`\<`string`[]\>
|
|
507
508
|
|
|
508
|
-
Defined in: [sdk/utils/src/filesystem/mono-repo.ts:59](https://github.com/settlemint/sdk/blob/v2.
|
|
509
|
+
Defined in: [sdk/utils/src/filesystem/mono-repo.ts:59](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/filesystem/mono-repo.ts#L59)
|
|
509
510
|
|
|
510
511
|
Finds all packages in a monorepo
|
|
511
512
|
|
|
@@ -536,7 +537,7 @@ console.log(packages); // Output: ["/path/to/your/project/packages/core", "/path
|
|
|
536
537
|
|
|
537
538
|
> **findMonoRepoRoot**(`startDir`): `Promise`\<`null` \| `string`\>
|
|
538
539
|
|
|
539
|
-
Defined in: [sdk/utils/src/filesystem/mono-repo.ts:19](https://github.com/settlemint/sdk/blob/v2.
|
|
540
|
+
Defined in: [sdk/utils/src/filesystem/mono-repo.ts:19](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/filesystem/mono-repo.ts#L19)
|
|
540
541
|
|
|
541
542
|
Finds the root directory of a monorepo
|
|
542
543
|
|
|
@@ -567,7 +568,7 @@ console.log(root); // Output: /path/to/your/project/packages/core
|
|
|
567
568
|
|
|
568
569
|
> **formatTargetDir**(`targetDir`): `string`
|
|
569
570
|
|
|
570
|
-
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:15](https://github.com/settlemint/sdk/blob/v2.
|
|
571
|
+
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:15](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/package-manager/download-and-extract.ts#L15)
|
|
571
572
|
|
|
572
573
|
Formats a directory path by removing trailing slashes and whitespace
|
|
573
574
|
|
|
@@ -597,7 +598,7 @@ const formatted = formatTargetDir("/path/to/dir/ "); // "/path/to/dir"
|
|
|
597
598
|
|
|
598
599
|
> **getPackageManager**(`targetDir?`): `Promise`\<`AgentName`\>
|
|
599
600
|
|
|
600
|
-
Defined in: [sdk/utils/src/package-manager/get-package-manager.ts:15](https://github.com/settlemint/sdk/blob/v2.
|
|
601
|
+
Defined in: [sdk/utils/src/package-manager/get-package-manager.ts:15](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/package-manager/get-package-manager.ts#L15)
|
|
601
602
|
|
|
602
603
|
Detects the package manager used in the current project
|
|
603
604
|
|
|
@@ -628,7 +629,7 @@ console.log(`Using ${packageManager}`);
|
|
|
628
629
|
|
|
629
630
|
> **getPackageManagerExecutable**(`targetDir?`): `Promise`\<\{ `args`: `string`[]; `command`: `string`; \}\>
|
|
630
631
|
|
|
631
|
-
Defined in: [sdk/utils/src/package-manager/get-package-manager-executable.ts:14](https://github.com/settlemint/sdk/blob/v2.
|
|
632
|
+
Defined in: [sdk/utils/src/package-manager/get-package-manager-executable.ts:14](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/package-manager/get-package-manager-executable.ts#L14)
|
|
632
633
|
|
|
633
634
|
Retrieves the executable command and arguments for the package manager
|
|
634
635
|
|
|
@@ -659,7 +660,7 @@ console.log(`Using ${command} with args: ${args.join(" ")}`);
|
|
|
659
660
|
|
|
660
661
|
> **graphqlFetchWithRetry**\<`Data`\>(`input`, `init?`, `maxRetries?`, `initialSleepTime?`): `Promise`\<`Data`\>
|
|
661
662
|
|
|
662
|
-
Defined in: [sdk/utils/src/http/graphql-fetch-with-retry.ts:34](https://github.com/settlemint/sdk/blob/v2.
|
|
663
|
+
Defined in: [sdk/utils/src/http/graphql-fetch-with-retry.ts:34](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/http/graphql-fetch-with-retry.ts#L34)
|
|
663
664
|
|
|
664
665
|
Executes a GraphQL request with automatic retries using exponential backoff and jitter.
|
|
665
666
|
Only retries on server errors (5xx), rate limits (429), timeouts (408), and network errors.
|
|
@@ -718,7 +719,7 @@ const data = await graphqlFetchWithRetry<{ user: { id: string } }>(
|
|
|
718
719
|
|
|
719
720
|
> **installDependencies**(`pkgs`, `cwd?`): `Promise`\<`void`\>
|
|
720
721
|
|
|
721
|
-
Defined in: [sdk/utils/src/package-manager/install-dependencies.ts:20](https://github.com/settlemint/sdk/blob/v2.
|
|
722
|
+
Defined in: [sdk/utils/src/package-manager/install-dependencies.ts:20](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/package-manager/install-dependencies.ts#L20)
|
|
722
723
|
|
|
723
724
|
Installs one or more packages as dependencies using the detected package manager
|
|
724
725
|
|
|
@@ -757,7 +758,7 @@ await installDependencies(["express", "cors"]);
|
|
|
757
758
|
|
|
758
759
|
> **intro**(`msg`): `void`
|
|
759
760
|
|
|
760
|
-
Defined in: [sdk/utils/src/terminal/intro.ts:16](https://github.com/settlemint/sdk/blob/v2.
|
|
761
|
+
Defined in: [sdk/utils/src/terminal/intro.ts:16](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/intro.ts#L16)
|
|
761
762
|
|
|
762
763
|
Displays an introductory message in magenta text with padding.
|
|
763
764
|
Any sensitive tokens in the message are masked before display.
|
|
@@ -787,7 +788,7 @@ intro("Starting deployment...");
|
|
|
787
788
|
|
|
788
789
|
> **isEmpty**(`path`): `Promise`\<`boolean`\>
|
|
789
790
|
|
|
790
|
-
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:31](https://github.com/settlemint/sdk/blob/v2.
|
|
791
|
+
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:31](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/package-manager/download-and-extract.ts#L31)
|
|
791
792
|
|
|
792
793
|
Checks if a directory is empty or contains only a .git folder
|
|
793
794
|
|
|
@@ -819,7 +820,7 @@ if (await isEmpty("/path/to/dir")) {
|
|
|
819
820
|
|
|
820
821
|
> **isPackageInstalled**(`name`, `path?`): `Promise`\<`boolean`\>
|
|
821
822
|
|
|
822
|
-
Defined in: [sdk/utils/src/package-manager/is-package-installed.ts:17](https://github.com/settlemint/sdk/blob/v2.
|
|
823
|
+
Defined in: [sdk/utils/src/package-manager/is-package-installed.ts:17](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/package-manager/is-package-installed.ts#L17)
|
|
823
824
|
|
|
824
825
|
Checks if a package is installed in the project's dependencies, devDependencies, or peerDependencies.
|
|
825
826
|
|
|
@@ -855,7 +856,7 @@ console.log(`@settlemint/sdk-utils is installed: ${isInstalled}`);
|
|
|
855
856
|
|
|
856
857
|
> **list**(`title`, `items`): `void`
|
|
857
858
|
|
|
858
|
-
Defined in: [sdk/utils/src/terminal/list.ts:23](https://github.com/settlemint/sdk/blob/v2.
|
|
859
|
+
Defined in: [sdk/utils/src/terminal/list.ts:23](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/list.ts#L23)
|
|
859
860
|
|
|
860
861
|
Displays a list of items in a formatted manner, supporting nested items.
|
|
861
862
|
|
|
@@ -895,7 +896,7 @@ list("Providers", [
|
|
|
895
896
|
|
|
896
897
|
> **loadEnv**\<`T`\>(`validateEnv`, `prod`, `path`): `Promise`\<`T` *extends* `true` ? `object` : `object`\>
|
|
897
898
|
|
|
898
|
-
Defined in: [sdk/utils/src/environment/load-env.ts:25](https://github.com/settlemint/sdk/blob/v2.
|
|
899
|
+
Defined in: [sdk/utils/src/environment/load-env.ts:25](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/environment/load-env.ts#L25)
|
|
899
900
|
|
|
900
901
|
Loads environment variables from .env files.
|
|
901
902
|
To enable encryption with dotenvx (https://www.dotenvx.com/docs) run `bunx dotenvx encrypt`
|
|
@@ -939,11 +940,48 @@ const rawEnv = await loadEnv(false, false);
|
|
|
939
940
|
|
|
940
941
|
***
|
|
941
942
|
|
|
943
|
+
#### makeJsonStringifiable()
|
|
944
|
+
|
|
945
|
+
> **makeJsonStringifiable**\<`T`\>(`value`): `T`
|
|
946
|
+
|
|
947
|
+
Defined in: [sdk/utils/src/json.ts:73](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/json.ts#L73)
|
|
948
|
+
|
|
949
|
+
Converts a value to a JSON stringifiable format.
|
|
950
|
+
|
|
951
|
+
##### Type Parameters
|
|
952
|
+
|
|
953
|
+
| Type Parameter |
|
|
954
|
+
| ------ |
|
|
955
|
+
| `T` |
|
|
956
|
+
|
|
957
|
+
##### Parameters
|
|
958
|
+
|
|
959
|
+
| Parameter | Type | Description |
|
|
960
|
+
| ------ | ------ | ------ |
|
|
961
|
+
| `value` | `unknown` | The value to convert |
|
|
962
|
+
|
|
963
|
+
##### Returns
|
|
964
|
+
|
|
965
|
+
`T`
|
|
966
|
+
|
|
967
|
+
The JSON stringifiable value
|
|
968
|
+
|
|
969
|
+
##### Example
|
|
970
|
+
|
|
971
|
+
```ts
|
|
972
|
+
import { makeJsonStringifiable } from "@settlemint/sdk-utils";
|
|
973
|
+
|
|
974
|
+
const json = makeJsonStringifiable<{ amount: bigint }>({ amount: BigInt(1000) });
|
|
975
|
+
// Returns: '{"amount":"1000"}'
|
|
976
|
+
```
|
|
977
|
+
|
|
978
|
+
***
|
|
979
|
+
|
|
942
980
|
#### maskTokens()
|
|
943
981
|
|
|
944
982
|
> **maskTokens**(`output`): `string`
|
|
945
983
|
|
|
946
|
-
Defined in: [sdk/utils/src/logging/mask-tokens.ts:13](https://github.com/settlemint/sdk/blob/v2.
|
|
984
|
+
Defined in: [sdk/utils/src/logging/mask-tokens.ts:13](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/logging/mask-tokens.ts#L13)
|
|
947
985
|
|
|
948
986
|
Masks sensitive SettleMint tokens in output text by replacing them with asterisks.
|
|
949
987
|
Handles personal access tokens (PAT), application access tokens (AAT), and service account tokens (SAT).
|
|
@@ -975,7 +1013,7 @@ const masked = maskTokens("Token: sm_pat_****"); // "Token: ***"
|
|
|
975
1013
|
|
|
976
1014
|
> **note**(`message`, `level`): `void`
|
|
977
1015
|
|
|
978
|
-
Defined in: [sdk/utils/src/terminal/note.ts:21](https://github.com/settlemint/sdk/blob/v2.
|
|
1016
|
+
Defined in: [sdk/utils/src/terminal/note.ts:21](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/note.ts#L21)
|
|
979
1017
|
|
|
980
1018
|
Displays a note message with optional warning level formatting.
|
|
981
1019
|
Regular notes are displayed in normal text, while warnings are shown in yellow.
|
|
@@ -1010,7 +1048,7 @@ note("Low disk space remaining", "warn");
|
|
|
1010
1048
|
|
|
1011
1049
|
> **outro**(`msg`): `void`
|
|
1012
1050
|
|
|
1013
|
-
Defined in: [sdk/utils/src/terminal/outro.ts:16](https://github.com/settlemint/sdk/blob/v2.
|
|
1051
|
+
Defined in: [sdk/utils/src/terminal/outro.ts:16](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/outro.ts#L16)
|
|
1014
1052
|
|
|
1015
1053
|
Displays a closing message in green inverted text with padding.
|
|
1016
1054
|
Any sensitive tokens in the message are masked before display.
|
|
@@ -1040,7 +1078,7 @@ outro("Deployment completed successfully!");
|
|
|
1040
1078
|
|
|
1041
1079
|
> **projectRoot**(`fallbackToCwd`, `cwd?`): `Promise`\<`string`\>
|
|
1042
1080
|
|
|
1043
|
-
Defined in: [sdk/utils/src/filesystem/project-root.ts:18](https://github.com/settlemint/sdk/blob/v2.
|
|
1081
|
+
Defined in: [sdk/utils/src/filesystem/project-root.ts:18](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/filesystem/project-root.ts#L18)
|
|
1044
1082
|
|
|
1045
1083
|
Finds the root directory of the current project by locating the nearest package.json file
|
|
1046
1084
|
|
|
@@ -1077,7 +1115,7 @@ console.log(`Project root is at: ${rootDir}`);
|
|
|
1077
1115
|
|
|
1078
1116
|
> **replaceUnderscoresAndHyphensWithSpaces**(`s`): `string`
|
|
1079
1117
|
|
|
1080
|
-
Defined in: [sdk/utils/src/string.ts:48](https://github.com/settlemint/sdk/blob/v2.
|
|
1118
|
+
Defined in: [sdk/utils/src/string.ts:48](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/string.ts#L48)
|
|
1081
1119
|
|
|
1082
1120
|
Replaces underscores and hyphens with spaces.
|
|
1083
1121
|
|
|
@@ -1108,7 +1146,7 @@ const result = replaceUnderscoresAndHyphensWithSpaces("Already_Spaced-Second");
|
|
|
1108
1146
|
|
|
1109
1147
|
> **requestLogger**(`logger`, `name`, `fn`): (...`args`) => `Promise`\<`Response`\>
|
|
1110
1148
|
|
|
1111
|
-
Defined in: [sdk/utils/src/logging/request-logger.ts:14](https://github.com/settlemint/sdk/blob/v2.
|
|
1149
|
+
Defined in: [sdk/utils/src/logging/request-logger.ts:14](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/logging/request-logger.ts#L14)
|
|
1112
1150
|
|
|
1113
1151
|
Logs the request and duration of a fetch call (> 500ms is logged as warn, otherwise info)
|
|
1114
1152
|
|
|
@@ -1142,7 +1180,7 @@ The fetch function
|
|
|
1142
1180
|
|
|
1143
1181
|
> **retryWhenFailed**\<`T`\>(`fn`, `maxRetries`, `initialSleepTime`, `stopOnError?`): `Promise`\<`T`\>
|
|
1144
1182
|
|
|
1145
|
-
Defined in: [sdk/utils/src/retry.ts:14](https://github.com/settlemint/sdk/blob/v2.
|
|
1183
|
+
Defined in: [sdk/utils/src/retry.ts:14](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/retry.ts#L14)
|
|
1146
1184
|
|
|
1147
1185
|
Retry a function when it fails.
|
|
1148
1186
|
|
|
@@ -1182,7 +1220,7 @@ const result = await retryWhenFailed(() => readFile("/path/to/file.txt"), 3, 1_0
|
|
|
1182
1220
|
|
|
1183
1221
|
> **setName**(`name`, `path?`): `Promise`\<`void`\>
|
|
1184
1222
|
|
|
1185
|
-
Defined in: [sdk/utils/src/package-manager/set-name.ts:16](https://github.com/settlemint/sdk/blob/v2.
|
|
1223
|
+
Defined in: [sdk/utils/src/package-manager/set-name.ts:16](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/package-manager/set-name.ts#L16)
|
|
1186
1224
|
|
|
1187
1225
|
Sets the name field in the package.json file
|
|
1188
1226
|
|
|
@@ -1217,7 +1255,7 @@ await setName("my-new-project-name");
|
|
|
1217
1255
|
|
|
1218
1256
|
> **spinner**\<`R`\>(`options`): `Promise`\<`R`\>
|
|
1219
1257
|
|
|
1220
|
-
Defined in: [sdk/utils/src/terminal/spinner.ts:55](https://github.com/settlemint/sdk/blob/v2.
|
|
1258
|
+
Defined in: [sdk/utils/src/terminal/spinner.ts:55](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/spinner.ts#L55)
|
|
1221
1259
|
|
|
1222
1260
|
Displays a loading spinner while executing an async task.
|
|
1223
1261
|
Shows progress with start/stop messages and handles errors.
|
|
@@ -1267,7 +1305,7 @@ const result = await spinner({
|
|
|
1267
1305
|
|
|
1268
1306
|
> **table**(`title`, `data`): `void`
|
|
1269
1307
|
|
|
1270
|
-
Defined in: [sdk/utils/src/terminal/table.ts:21](https://github.com/settlemint/sdk/blob/v2.
|
|
1308
|
+
Defined in: [sdk/utils/src/terminal/table.ts:21](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/table.ts#L21)
|
|
1271
1309
|
|
|
1272
1310
|
Displays data in a formatted table in the terminal.
|
|
1273
1311
|
|
|
@@ -1301,7 +1339,7 @@ table("My Table", data);
|
|
|
1301
1339
|
|
|
1302
1340
|
> **truncate**(`value`, `maxLength`): `string`
|
|
1303
1341
|
|
|
1304
|
-
Defined in: [sdk/utils/src/string.ts:65](https://github.com/settlemint/sdk/blob/v2.
|
|
1342
|
+
Defined in: [sdk/utils/src/string.ts:65](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/string.ts#L65)
|
|
1305
1343
|
|
|
1306
1344
|
Truncates a string to a maximum length and appends "..." if it is longer.
|
|
1307
1345
|
|
|
@@ -1333,7 +1371,7 @@ const truncated = truncate("Hello, world!", 10);
|
|
|
1333
1371
|
|
|
1334
1372
|
> **tryParseJson**\<`T`\>(`value`, `defaultValue`): `null` \| `T`
|
|
1335
1373
|
|
|
1336
|
-
Defined in: [sdk/utils/src/json.ts:23](https://github.com/settlemint/sdk/blob/v2.
|
|
1374
|
+
Defined in: [sdk/utils/src/json.ts:23](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/json.ts#L23)
|
|
1337
1375
|
|
|
1338
1376
|
Attempts to parse a JSON string into a typed value, returning a default value if parsing fails.
|
|
1339
1377
|
|
|
@@ -1380,7 +1418,7 @@ const invalid = tryParseJson<string[]>(
|
|
|
1380
1418
|
|
|
1381
1419
|
> **validate**\<`T`\>(`schema`, `value`): `T`\[`"_output"`\]
|
|
1382
1420
|
|
|
1383
|
-
Defined in: [sdk/utils/src/validation/validate.ts:16](https://github.com/settlemint/sdk/blob/v2.
|
|
1421
|
+
Defined in: [sdk/utils/src/validation/validate.ts:16](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/validate.ts#L16)
|
|
1384
1422
|
|
|
1385
1423
|
Validates a value against a given Zod schema.
|
|
1386
1424
|
|
|
@@ -1421,7 +1459,7 @@ const validatedId = validate(IdSchema, "550e8400-e29b-41d4-a716-446655440000");
|
|
|
1421
1459
|
|
|
1422
1460
|
> **writeEnv**(`options`): `Promise`\<`void`\>
|
|
1423
1461
|
|
|
1424
|
-
Defined in: [sdk/utils/src/environment/write-env.ts:41](https://github.com/settlemint/sdk/blob/v2.
|
|
1462
|
+
Defined in: [sdk/utils/src/environment/write-env.ts:41](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/environment/write-env.ts#L41)
|
|
1425
1463
|
|
|
1426
1464
|
Writes environment variables to .env files across a project or monorepo
|
|
1427
1465
|
|
|
@@ -1429,9 +1467,9 @@ Writes environment variables to .env files across a project or monorepo
|
|
|
1429
1467
|
|
|
1430
1468
|
| Parameter | Type | Description |
|
|
1431
1469
|
| ------ | ------ | ------ |
|
|
1432
|
-
| `options` | \{ `cwd?`: `string`; `env`: `Partial`\<\{ `SETTLEMINT_ACCESS_TOKEN?`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?`: `string`; `SETTLEMINT_APPLICATION?`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK?`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID?`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE?`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT?`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER?`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT?`: `string`; `SETTLEMINT_BLOCKSCOUT?`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT?`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT?`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT?`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT?`: `string`; `SETTLEMINT_HASURA?`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET?`: `string`; `SETTLEMINT_HASURA_DATABASE_URL?`: `string`; `SETTLEMINT_HASURA_ENDPOINT?`: `string`; `SETTLEMINT_HD_PRIVATE_KEY?`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS?`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT?`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT?`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT?`: `string`; `SETTLEMINT_LOG_LEVEL`: `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"`; `SETTLEMINT_MINIO?`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY?`: `string`; `SETTLEMINT_MINIO_ENDPOINT?`: `string`; `SETTLEMINT_MINIO_SECRET_KEY?`: `string`; `SETTLEMINT_NEW_PROJECT_NAME?`: `string`; `SETTLEMINT_PORTAL?`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT?`: `string`; `SETTLEMINT_THEGRAPH?`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH?`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?`: `string`[]; `SETTLEMINT_WORKSPACE?`: `string`; \}\>; `prod`: `boolean`; `secrets`: `boolean`; \} | The options for writing the environment variables |
|
|
1470
|
+
| `options` | \{ `cwd?`: `string`; `env`: `Partial`\<\{ `SETTLEMINT_ACCESS_TOKEN?`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?`: `string`; `SETTLEMINT_APPLICATION?`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK?`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID?`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE?`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT?`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER?`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT?`: `string`; `SETTLEMINT_BLOCKSCOUT?`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT?`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT?`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT?`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT?`: `string`; `SETTLEMINT_HASURA?`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET?`: `string`; `SETTLEMINT_HASURA_DATABASE_URL?`: `string`; `SETTLEMINT_HASURA_ENDPOINT?`: `string`; `SETTLEMINT_HD_PRIVATE_KEY?`: `string`; `SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS?`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT?`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT?`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT?`: `string`; `SETTLEMINT_LOG_LEVEL`: `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"`; `SETTLEMINT_MINIO?`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY?`: `string`; `SETTLEMINT_MINIO_ENDPOINT?`: `string`; `SETTLEMINT_MINIO_SECRET_KEY?`: `string`; `SETTLEMINT_NEW_PROJECT_NAME?`: `string`; `SETTLEMINT_PORTAL?`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT?`: `string`; `SETTLEMINT_PORTAL_WS_ENDPOINT?`: `string`; `SETTLEMINT_THEGRAPH?`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH?`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?`: `string`[]; `SETTLEMINT_WORKSPACE?`: `string`; \}\>; `prod`: `boolean`; `secrets`: `boolean`; \} | The options for writing the environment variables |
|
|
1433
1471
|
| `options.cwd?` | `string` | The directory to start searching for the package.json file from (defaults to process.cwd()) |
|
|
1434
|
-
| `options.env` | `Partial`\<\{ `SETTLEMINT_ACCESS_TOKEN?`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?`: `string`; `SETTLEMINT_APPLICATION?`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK?`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID?`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE?`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT?`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER?`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT?`: `string`; `SETTLEMINT_BLOCKSCOUT?`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT?`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT?`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT?`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT?`: `string`; `SETTLEMINT_HASURA?`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET?`: `string`; `SETTLEMINT_HASURA_DATABASE_URL?`: `string`; `SETTLEMINT_HASURA_ENDPOINT?`: `string`; `SETTLEMINT_HD_PRIVATE_KEY?`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS?`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT?`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT?`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT?`: `string`; `SETTLEMINT_LOG_LEVEL`: `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"`; `SETTLEMINT_MINIO?`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY?`: `string`; `SETTLEMINT_MINIO_ENDPOINT?`: `string`; `SETTLEMINT_MINIO_SECRET_KEY?`: `string`; `SETTLEMINT_NEW_PROJECT_NAME?`: `string`; `SETTLEMINT_PORTAL?`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT?`: `string`; `SETTLEMINT_THEGRAPH?`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH?`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?`: `string`[]; `SETTLEMINT_WORKSPACE?`: `string`; \}\> | The environment variables to write |
|
|
1472
|
+
| `options.env` | `Partial`\<\{ `SETTLEMINT_ACCESS_TOKEN?`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?`: `string`; `SETTLEMINT_APPLICATION?`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK?`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID?`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE?`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT?`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER?`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT?`: `string`; `SETTLEMINT_BLOCKSCOUT?`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT?`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT?`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT?`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT?`: `string`; `SETTLEMINT_HASURA?`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET?`: `string`; `SETTLEMINT_HASURA_DATABASE_URL?`: `string`; `SETTLEMINT_HASURA_ENDPOINT?`: `string`; `SETTLEMINT_HD_PRIVATE_KEY?`: `string`; `SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS?`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT?`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT?`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT?`: `string`; `SETTLEMINT_LOG_LEVEL`: `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"`; `SETTLEMINT_MINIO?`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY?`: `string`; `SETTLEMINT_MINIO_ENDPOINT?`: `string`; `SETTLEMINT_MINIO_SECRET_KEY?`: `string`; `SETTLEMINT_NEW_PROJECT_NAME?`: `string`; `SETTLEMINT_PORTAL?`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT?`: `string`; `SETTLEMINT_PORTAL_WS_ENDPOINT?`: `string`; `SETTLEMINT_THEGRAPH?`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH?`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?`: `string`[]; `SETTLEMINT_WORKSPACE?`: `string`; \}\> | The environment variables to write |
|
|
1435
1473
|
| `options.prod` | `boolean` | Whether to write production environment variables |
|
|
1436
1474
|
| `options.secrets` | `boolean` | Whether to write to .env.local files for secrets |
|
|
1437
1475
|
|
|
@@ -1473,7 +1511,7 @@ await writeEnv({
|
|
|
1473
1511
|
|
|
1474
1512
|
#### CancelError
|
|
1475
1513
|
|
|
1476
|
-
Defined in: [sdk/utils/src/terminal/cancel.ts:8](https://github.com/settlemint/sdk/blob/v2.
|
|
1514
|
+
Defined in: [sdk/utils/src/terminal/cancel.ts:8](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/cancel.ts#L8)
|
|
1477
1515
|
|
|
1478
1516
|
Error class used to indicate that the operation was cancelled.
|
|
1479
1517
|
This error is used to signal that the operation should be aborted.
|
|
@@ -1486,7 +1524,7 @@ This error is used to signal that the operation should be aborted.
|
|
|
1486
1524
|
|
|
1487
1525
|
#### CommandError
|
|
1488
1526
|
|
|
1489
|
-
Defined in: [sdk/utils/src/terminal/execute-command.ts:16](https://github.com/settlemint/sdk/blob/v2.
|
|
1527
|
+
Defined in: [sdk/utils/src/terminal/execute-command.ts:16](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/execute-command.ts#L16)
|
|
1490
1528
|
|
|
1491
1529
|
Error class for command execution errors
|
|
1492
1530
|
|
|
@@ -1500,7 +1538,7 @@ Error class for command execution errors
|
|
|
1500
1538
|
|
|
1501
1539
|
> **new CommandError**(`message`, `code`, `output`): [`CommandError`](#commanderror)
|
|
1502
1540
|
|
|
1503
|
-
Defined in: [sdk/utils/src/terminal/execute-command.ts:23](https://github.com/settlemint/sdk/blob/v2.
|
|
1541
|
+
Defined in: [sdk/utils/src/terminal/execute-command.ts:23](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/execute-command.ts#L23)
|
|
1504
1542
|
|
|
1505
1543
|
Constructs a new CommandError
|
|
1506
1544
|
|
|
@@ -1526,7 +1564,7 @@ Constructs a new CommandError
|
|
|
1526
1564
|
|
|
1527
1565
|
> `readonly` **code**: `number`
|
|
1528
1566
|
|
|
1529
|
-
Defined in: [sdk/utils/src/terminal/execute-command.ts:25](https://github.com/settlemint/sdk/blob/v2.
|
|
1567
|
+
Defined in: [sdk/utils/src/terminal/execute-command.ts:25](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/execute-command.ts#L25)
|
|
1530
1568
|
|
|
1531
1569
|
The exit code of the command
|
|
1532
1570
|
|
|
@@ -1534,7 +1572,7 @@ The exit code of the command
|
|
|
1534
1572
|
|
|
1535
1573
|
> `readonly` **output**: `string`[]
|
|
1536
1574
|
|
|
1537
|
-
Defined in: [sdk/utils/src/terminal/execute-command.ts:26](https://github.com/settlemint/sdk/blob/v2.
|
|
1575
|
+
Defined in: [sdk/utils/src/terminal/execute-command.ts:26](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/execute-command.ts#L26)
|
|
1538
1576
|
|
|
1539
1577
|
The output of the command
|
|
1540
1578
|
|
|
@@ -1542,7 +1580,7 @@ The output of the command
|
|
|
1542
1580
|
|
|
1543
1581
|
#### SpinnerError
|
|
1544
1582
|
|
|
1545
|
-
Defined in: [sdk/utils/src/terminal/spinner.ts:12](https://github.com/settlemint/sdk/blob/v2.
|
|
1583
|
+
Defined in: [sdk/utils/src/terminal/spinner.ts:12](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/spinner.ts#L12)
|
|
1546
1584
|
|
|
1547
1585
|
Error class used to indicate that the spinner operation failed.
|
|
1548
1586
|
This error is used to signal that the operation should be aborted.
|
|
@@ -1555,7 +1593,7 @@ This error is used to signal that the operation should be aborted.
|
|
|
1555
1593
|
|
|
1556
1594
|
#### ExecuteCommandOptions
|
|
1557
1595
|
|
|
1558
|
-
Defined in: [sdk/utils/src/terminal/execute-command.ts:7](https://github.com/settlemint/sdk/blob/v2.
|
|
1596
|
+
Defined in: [sdk/utils/src/terminal/execute-command.ts:7](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/execute-command.ts#L7)
|
|
1559
1597
|
|
|
1560
1598
|
Options for executing a command, extending SpawnOptionsWithoutStdio
|
|
1561
1599
|
|
|
@@ -1567,13 +1605,13 @@ Options for executing a command, extending SpawnOptionsWithoutStdio
|
|
|
1567
1605
|
|
|
1568
1606
|
| Property | Type | Description | Defined in |
|
|
1569
1607
|
| ------ | ------ | ------ | ------ |
|
|
1570
|
-
| <a id="silent"></a> `silent?` | `boolean` | Whether to suppress output to stdout/stderr | [sdk/utils/src/terminal/execute-command.ts:9](https://github.com/settlemint/sdk/blob/v2.
|
|
1608
|
+
| <a id="silent"></a> `silent?` | `boolean` | Whether to suppress output to stdout/stderr | [sdk/utils/src/terminal/execute-command.ts:9](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/execute-command.ts#L9) |
|
|
1571
1609
|
|
|
1572
1610
|
***
|
|
1573
1611
|
|
|
1574
1612
|
#### Logger
|
|
1575
1613
|
|
|
1576
|
-
Defined in: [sdk/utils/src/logging/logger.ts:23](https://github.com/settlemint/sdk/blob/v2.
|
|
1614
|
+
Defined in: [sdk/utils/src/logging/logger.ts:23](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/logging/logger.ts#L23)
|
|
1577
1615
|
|
|
1578
1616
|
Simple logger interface with basic logging methods
|
|
1579
1617
|
Logger
|
|
@@ -1582,16 +1620,16 @@ Simple logger interface with basic logging methods
|
|
|
1582
1620
|
|
|
1583
1621
|
| Property | Type | Description | Defined in |
|
|
1584
1622
|
| ------ | ------ | ------ | ------ |
|
|
1585
|
-
| <a id="debug"></a> `debug` | (`message`, ...`args`) => `void` | Log debug information | [sdk/utils/src/logging/logger.ts:25](https://github.com/settlemint/sdk/blob/v2.
|
|
1586
|
-
| <a id="error"></a> `error` | (`message`, ...`args`) => `void` | Log errors | [sdk/utils/src/logging/logger.ts:31](https://github.com/settlemint/sdk/blob/v2.
|
|
1587
|
-
| <a id="info"></a> `info` | (`message`, ...`args`) => `void` | Log general information | [sdk/utils/src/logging/logger.ts:27](https://github.com/settlemint/sdk/blob/v2.
|
|
1588
|
-
| <a id="warn"></a> `warn` | (`message`, ...`args`) => `void` | Log warnings | [sdk/utils/src/logging/logger.ts:29](https://github.com/settlemint/sdk/blob/v2.
|
|
1623
|
+
| <a id="debug"></a> `debug` | (`message`, ...`args`) => `void` | Log debug information | [sdk/utils/src/logging/logger.ts:25](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/logging/logger.ts#L25) |
|
|
1624
|
+
| <a id="error"></a> `error` | (`message`, ...`args`) => `void` | Log errors | [sdk/utils/src/logging/logger.ts:31](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/logging/logger.ts#L31) |
|
|
1625
|
+
| <a id="info"></a> `info` | (`message`, ...`args`) => `void` | Log general information | [sdk/utils/src/logging/logger.ts:27](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/logging/logger.ts#L27) |
|
|
1626
|
+
| <a id="warn"></a> `warn` | (`message`, ...`args`) => `void` | Log warnings | [sdk/utils/src/logging/logger.ts:29](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/logging/logger.ts#L29) |
|
|
1589
1627
|
|
|
1590
1628
|
***
|
|
1591
1629
|
|
|
1592
1630
|
#### LoggerOptions
|
|
1593
1631
|
|
|
1594
|
-
Defined in: [sdk/utils/src/logging/logger.ts:12](https://github.com/settlemint/sdk/blob/v2.
|
|
1632
|
+
Defined in: [sdk/utils/src/logging/logger.ts:12](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/logging/logger.ts#L12)
|
|
1595
1633
|
|
|
1596
1634
|
Configuration options for the logger
|
|
1597
1635
|
LoggerOptions
|
|
@@ -1600,14 +1638,14 @@ Configuration options for the logger
|
|
|
1600
1638
|
|
|
1601
1639
|
| Property | Type | Description | Defined in |
|
|
1602
1640
|
| ------ | ------ | ------ | ------ |
|
|
1603
|
-
| <a id="level"></a> `level?` | [`LogLevel`](#loglevel) | The minimum log level to output | [sdk/utils/src/logging/logger.ts:14](https://github.com/settlemint/sdk/blob/v2.
|
|
1604
|
-
| <a id="prefix"></a> `prefix?` | `string` | The prefix to add to the log message | [sdk/utils/src/logging/logger.ts:16](https://github.com/settlemint/sdk/blob/v2.
|
|
1641
|
+
| <a id="level"></a> `level?` | [`LogLevel`](#loglevel) | The minimum log level to output | [sdk/utils/src/logging/logger.ts:14](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/logging/logger.ts#L14) |
|
|
1642
|
+
| <a id="prefix"></a> `prefix?` | `string` | The prefix to add to the log message | [sdk/utils/src/logging/logger.ts:16](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/logging/logger.ts#L16) |
|
|
1605
1643
|
|
|
1606
1644
|
***
|
|
1607
1645
|
|
|
1608
1646
|
#### SpinnerOptions\<R\>
|
|
1609
1647
|
|
|
1610
|
-
Defined in: [sdk/utils/src/terminal/spinner.ts:25](https://github.com/settlemint/sdk/blob/v2.
|
|
1648
|
+
Defined in: [sdk/utils/src/terminal/spinner.ts:25](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/spinner.ts#L25)
|
|
1611
1649
|
|
|
1612
1650
|
Options for configuring the spinner behavior
|
|
1613
1651
|
|
|
@@ -1621,9 +1659,9 @@ Options for configuring the spinner behavior
|
|
|
1621
1659
|
|
|
1622
1660
|
| Property | Type | Description | Defined in |
|
|
1623
1661
|
| ------ | ------ | ------ | ------ |
|
|
1624
|
-
| <a id="startmessage"></a> `startMessage` | `string` | Message to display when spinner starts | [sdk/utils/src/terminal/spinner.ts:27](https://github.com/settlemint/sdk/blob/v2.
|
|
1625
|
-
| <a id="stopmessage"></a> `stopMessage` | `string` | Message to display when spinner completes successfully | [sdk/utils/src/terminal/spinner.ts:31](https://github.com/settlemint/sdk/blob/v2.
|
|
1626
|
-
| <a id="task"></a> `task` | (`spinner?`) => `Promise`\<`R`\> | Async task to execute while spinner is active | [sdk/utils/src/terminal/spinner.ts:29](https://github.com/settlemint/sdk/blob/v2.
|
|
1662
|
+
| <a id="startmessage"></a> `startMessage` | `string` | Message to display when spinner starts | [sdk/utils/src/terminal/spinner.ts:27](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/spinner.ts#L27) |
|
|
1663
|
+
| <a id="stopmessage"></a> `stopMessage` | `string` | Message to display when spinner completes successfully | [sdk/utils/src/terminal/spinner.ts:31](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/spinner.ts#L31) |
|
|
1664
|
+
| <a id="task"></a> `task` | (`spinner?`) => `Promise`\<`R`\> | Async task to execute while spinner is active | [sdk/utils/src/terminal/spinner.ts:29](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/terminal/spinner.ts#L29) |
|
|
1627
1665
|
|
|
1628
1666
|
### Type Aliases
|
|
1629
1667
|
|
|
@@ -1631,7 +1669,7 @@ Options for configuring the spinner behavior
|
|
|
1631
1669
|
|
|
1632
1670
|
> **AccessToken** = `string`
|
|
1633
1671
|
|
|
1634
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:22](https://github.com/settlemint/sdk/blob/v2.
|
|
1672
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:22](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/access-token.schema.ts#L22)
|
|
1635
1673
|
|
|
1636
1674
|
Schema for validating both application and personal access tokens.
|
|
1637
1675
|
Accepts tokens starting with either 'sm_pat_' or 'sm_aat_' prefix.
|
|
@@ -1642,7 +1680,7 @@ Accepts tokens starting with either 'sm_pat_' or 'sm_aat_' prefix.
|
|
|
1642
1680
|
|
|
1643
1681
|
> **ApplicationAccessToken** = `string`
|
|
1644
1682
|
|
|
1645
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:8](https://github.com/settlemint/sdk/blob/v2.
|
|
1683
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:8](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/access-token.schema.ts#L8)
|
|
1646
1684
|
|
|
1647
1685
|
Schema for validating application access tokens.
|
|
1648
1686
|
Application access tokens start with 'sm_aat_' prefix.
|
|
@@ -1653,7 +1691,7 @@ Application access tokens start with 'sm_aat_' prefix.
|
|
|
1653
1691
|
|
|
1654
1692
|
> **DotEnv** = `object`
|
|
1655
1693
|
|
|
1656
|
-
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1694
|
+
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:101](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L101)
|
|
1657
1695
|
|
|
1658
1696
|
Type definition for the environment variables schema.
|
|
1659
1697
|
|
|
@@ -1661,43 +1699,45 @@ Type definition for the environment variables schema.
|
|
|
1661
1699
|
|
|
1662
1700
|
| Name | Type | Description | Defined in |
|
|
1663
1701
|
| ------ | ------ | ------ | ------ |
|
|
1664
|
-
| <a id="settlemint_access_token"></a> `SETTLEMINT_ACCESS_TOKEN?` | `string` | Application access token for authenticating with SettleMint services | [sdk/utils/src/validation/dot-env.schema.ts:16](https://github.com/settlemint/sdk/blob/v2.
|
|
1665
|
-
| <a id="settlemint_accessible_private_key"></a> `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?` | `string` | Unique name of the accessible private key | [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1666
|
-
| <a id="settlemint_application"></a> `SETTLEMINT_APPLICATION?` | `string` | Unique name of the application | [sdk/utils/src/validation/dot-env.schema.ts:22](https://github.com/settlemint/sdk/blob/v2.
|
|
1667
|
-
| <a id="settlemint_blockchain_network"></a> `SETTLEMINT_BLOCKCHAIN_NETWORK?` | `string` | Unique name of the blockchain network | [sdk/utils/src/validation/dot-env.schema.ts:24](https://github.com/settlemint/sdk/blob/v2.
|
|
1668
|
-
| <a id="settlemint_blockchain_network_chain_id"></a> `SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID?` | `string` | Chain ID of the blockchain network | [sdk/utils/src/validation/dot-env.schema.ts:26](https://github.com/settlemint/sdk/blob/v2.
|
|
1669
|
-
| <a id="settlemint_blockchain_node"></a> `SETTLEMINT_BLOCKCHAIN_NODE?` | `string` | Unique name of the blockchain node (should have a private key for signing transactions) | [sdk/utils/src/validation/dot-env.schema.ts:28](https://github.com/settlemint/sdk/blob/v2.
|
|
1670
|
-
| <a id="settlemint_blockchain_node_json_rpc_endpoint"></a> `SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT?` | `string` | JSON RPC endpoint for the blockchain node | [sdk/utils/src/validation/dot-env.schema.ts:30](https://github.com/settlemint/sdk/blob/v2.
|
|
1671
|
-
| <a id="settlemint_blockchain_node_or_load_balancer"></a> `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER?` | `string` | Unique name of the blockchain node or load balancer | [sdk/utils/src/validation/dot-env.schema.ts:32](https://github.com/settlemint/sdk/blob/v2.
|
|
1672
|
-
| <a id="settlemint_blockchain_node_or_load_balancer_json_rpc_endpoint"></a> `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT?` | `string` | JSON RPC endpoint for the blockchain node or load balancer | [sdk/utils/src/validation/dot-env.schema.ts:34](https://github.com/settlemint/sdk/blob/v2.
|
|
1673
|
-
| <a id="settlemint_blockscout"></a> `SETTLEMINT_BLOCKSCOUT?` | `string` | Unique name of the Blockscout instance | [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1674
|
-
| <a id="settlemint_blockscout_graphql_endpoint"></a> `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT?` | `string` | GraphQL endpoint URL for Blockscout | [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1675
|
-
| <a id="settlemint_blockscout_ui_endpoint"></a> `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT?` | `string` | UI endpoint URL for Blockscout | [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1676
|
-
| <a id="settlemint_custom_deployment"></a> `SETTLEMINT_CUSTOM_DEPLOYMENT?` | `string` | Unique name of the custom deployment | [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1677
|
-
| <a id="settlemint_custom_deployment_endpoint"></a> `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT?` | `string` | Endpoint URL for the custom deployment | [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1678
|
-
| <a id="settlemint_hasura"></a> `SETTLEMINT_HASURA?` | `string` | Unique name of the Hasura instance | [sdk/utils/src/validation/dot-env.schema.ts:36](https://github.com/settlemint/sdk/blob/v2.
|
|
1679
|
-
| <a id="settlemint_hasura_admin_secret"></a> `SETTLEMINT_HASURA_ADMIN_SECRET?` | `string` | Admin secret for authenticating with Hasura | [sdk/utils/src/validation/dot-env.schema.ts:40](https://github.com/settlemint/sdk/blob/v2.
|
|
1680
|
-
| <a id="settlemint_hasura_database_url"></a> `SETTLEMINT_HASURA_DATABASE_URL?` | `string` | Database connection URL for Hasura | [sdk/utils/src/validation/dot-env.schema.ts:42](https://github.com/settlemint/sdk/blob/v2.
|
|
1681
|
-
| <a id="settlemint_hasura_endpoint"></a> `SETTLEMINT_HASURA_ENDPOINT?` | `string` | Endpoint URL for the Hasura GraphQL API | [sdk/utils/src/validation/dot-env.schema.ts:38](https://github.com/settlemint/sdk/blob/v2.
|
|
1682
|
-
| <a id="settlemint_hd_private_key"></a> `SETTLEMINT_HD_PRIVATE_KEY?` | `string` | Unique name of the HD private key | [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1683
|
-
| <a id="
|
|
1684
|
-
| <a id="
|
|
1685
|
-
| <a id="
|
|
1686
|
-
| <a id="
|
|
1687
|
-
| <a id="
|
|
1688
|
-
| <a id="
|
|
1689
|
-
| <a id="
|
|
1690
|
-
| <a id="
|
|
1691
|
-
| <a id="
|
|
1692
|
-
| <a id="
|
|
1693
|
-
| <a id="
|
|
1694
|
-
| <a id="
|
|
1695
|
-
| <a id="
|
|
1696
|
-
| <a id="
|
|
1697
|
-
| <a id="
|
|
1698
|
-
| <a id="
|
|
1699
|
-
| <a id="
|
|
1700
|
-
| <a id="
|
|
1702
|
+
| <a id="settlemint_access_token"></a> `SETTLEMINT_ACCESS_TOKEN?` | `string` | Application access token for authenticating with SettleMint services | [sdk/utils/src/validation/dot-env.schema.ts:16](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L16) |
|
|
1703
|
+
| <a id="settlemint_accessible_private_key"></a> `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?` | `string` | Unique name of the accessible private key | [sdk/utils/src/validation/dot-env.schema.ts:65](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L65) |
|
|
1704
|
+
| <a id="settlemint_application"></a> `SETTLEMINT_APPLICATION?` | `string` | Unique name of the application | [sdk/utils/src/validation/dot-env.schema.ts:22](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L22) |
|
|
1705
|
+
| <a id="settlemint_blockchain_network"></a> `SETTLEMINT_BLOCKCHAIN_NETWORK?` | `string` | Unique name of the blockchain network | [sdk/utils/src/validation/dot-env.schema.ts:24](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L24) |
|
|
1706
|
+
| <a id="settlemint_blockchain_network_chain_id"></a> `SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID?` | `string` | Chain ID of the blockchain network | [sdk/utils/src/validation/dot-env.schema.ts:26](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L26) |
|
|
1707
|
+
| <a id="settlemint_blockchain_node"></a> `SETTLEMINT_BLOCKCHAIN_NODE?` | `string` | Unique name of the blockchain node (should have a private key for signing transactions) | [sdk/utils/src/validation/dot-env.schema.ts:28](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L28) |
|
|
1708
|
+
| <a id="settlemint_blockchain_node_json_rpc_endpoint"></a> `SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT?` | `string` | JSON RPC endpoint for the blockchain node | [sdk/utils/src/validation/dot-env.schema.ts:30](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L30) |
|
|
1709
|
+
| <a id="settlemint_blockchain_node_or_load_balancer"></a> `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER?` | `string` | Unique name of the blockchain node or load balancer | [sdk/utils/src/validation/dot-env.schema.ts:32](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L32) |
|
|
1710
|
+
| <a id="settlemint_blockchain_node_or_load_balancer_json_rpc_endpoint"></a> `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT?` | `string` | JSON RPC endpoint for the blockchain node or load balancer | [sdk/utils/src/validation/dot-env.schema.ts:34](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L34) |
|
|
1711
|
+
| <a id="settlemint_blockscout"></a> `SETTLEMINT_BLOCKSCOUT?` | `string` | Unique name of the Blockscout instance | [sdk/utils/src/validation/dot-env.schema.ts:87](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L87) |
|
|
1712
|
+
| <a id="settlemint_blockscout_graphql_endpoint"></a> `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT?` | `string` | GraphQL endpoint URL for Blockscout | [sdk/utils/src/validation/dot-env.schema.ts:89](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L89) |
|
|
1713
|
+
| <a id="settlemint_blockscout_ui_endpoint"></a> `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT?` | `string` | UI endpoint URL for Blockscout | [sdk/utils/src/validation/dot-env.schema.ts:91](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L91) |
|
|
1714
|
+
| <a id="settlemint_custom_deployment"></a> `SETTLEMINT_CUSTOM_DEPLOYMENT?` | `string` | Unique name of the custom deployment | [sdk/utils/src/validation/dot-env.schema.ts:83](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L83) |
|
|
1715
|
+
| <a id="settlemint_custom_deployment_endpoint"></a> `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT?` | `string` | Endpoint URL for the custom deployment | [sdk/utils/src/validation/dot-env.schema.ts:85](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L85) |
|
|
1716
|
+
| <a id="settlemint_hasura"></a> `SETTLEMINT_HASURA?` | `string` | Unique name of the Hasura instance | [sdk/utils/src/validation/dot-env.schema.ts:36](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L36) |
|
|
1717
|
+
| <a id="settlemint_hasura_admin_secret"></a> `SETTLEMINT_HASURA_ADMIN_SECRET?` | `string` | Admin secret for authenticating with Hasura | [sdk/utils/src/validation/dot-env.schema.ts:40](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L40) |
|
|
1718
|
+
| <a id="settlemint_hasura_database_url"></a> `SETTLEMINT_HASURA_DATABASE_URL?` | `string` | Database connection URL for Hasura | [sdk/utils/src/validation/dot-env.schema.ts:42](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L42) |
|
|
1719
|
+
| <a id="settlemint_hasura_endpoint"></a> `SETTLEMINT_HASURA_ENDPOINT?` | `string` | Endpoint URL for the Hasura GraphQL API | [sdk/utils/src/validation/dot-env.schema.ts:38](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L38) |
|
|
1720
|
+
| <a id="settlemint_hd_private_key"></a> `SETTLEMINT_HD_PRIVATE_KEY?` | `string` | Unique name of the HD private key | [sdk/utils/src/validation/dot-env.schema.ts:61](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L61) |
|
|
1721
|
+
| <a id="settlemint_hd_private_key_forwarder_address"></a> `SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?` | `string` | Address of the HD private key forwarder | [sdk/utils/src/validation/dot-env.schema.ts:63](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L63) |
|
|
1722
|
+
| <a id="settlemint_instance"></a> `SETTLEMINT_INSTANCE` | `string` | Base URL of the SettleMint platform instance | [sdk/utils/src/validation/dot-env.schema.ts:14](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L14) |
|
|
1723
|
+
| <a id="settlemint_ipfs"></a> `SETTLEMINT_IPFS?` | `string` | Unique name of the IPFS instance | [sdk/utils/src/validation/dot-env.schema.ts:75](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L75) |
|
|
1724
|
+
| <a id="settlemint_ipfs_api_endpoint"></a> `SETTLEMINT_IPFS_API_ENDPOINT?` | `string` | API endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:77](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L77) |
|
|
1725
|
+
| <a id="settlemint_ipfs_gateway_endpoint"></a> `SETTLEMINT_IPFS_GATEWAY_ENDPOINT?` | `string` | Gateway endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:81](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L81) |
|
|
1726
|
+
| <a id="settlemint_ipfs_pinning_endpoint"></a> `SETTLEMINT_IPFS_PINNING_ENDPOINT?` | `string` | Pinning service endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:79](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L79) |
|
|
1727
|
+
| <a id="settlemint_log_level"></a> `SETTLEMINT_LOG_LEVEL` | `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"` | The log level to use | [sdk/utils/src/validation/dot-env.schema.ts:95](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L95) |
|
|
1728
|
+
| <a id="settlemint_minio"></a> `SETTLEMINT_MINIO?` | `string` | Unique name of the MinIO instance | [sdk/utils/src/validation/dot-env.schema.ts:67](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L67) |
|
|
1729
|
+
| <a id="settlemint_minio_access_key"></a> `SETTLEMINT_MINIO_ACCESS_KEY?` | `string` | Access key for MinIO authentication | [sdk/utils/src/validation/dot-env.schema.ts:71](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L71) |
|
|
1730
|
+
| <a id="settlemint_minio_endpoint"></a> `SETTLEMINT_MINIO_ENDPOINT?` | `string` | Endpoint URL for MinIO | [sdk/utils/src/validation/dot-env.schema.ts:69](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L69) |
|
|
1731
|
+
| <a id="settlemint_minio_secret_key"></a> `SETTLEMINT_MINIO_SECRET_KEY?` | `string` | Secret key for MinIO authentication | [sdk/utils/src/validation/dot-env.schema.ts:73](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L73) |
|
|
1732
|
+
| <a id="settlemint_new_project_name"></a> `SETTLEMINT_NEW_PROJECT_NAME?` | `string` | Name of the new project being created | [sdk/utils/src/validation/dot-env.schema.ts:93](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L93) |
|
|
1733
|
+
| <a id="settlemint_portal"></a> `SETTLEMINT_PORTAL?` | `string` | Unique name of the Smart Contract Portal instance | [sdk/utils/src/validation/dot-env.schema.ts:53](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L53) |
|
|
1734
|
+
| <a id="settlemint_portal_graphql_endpoint"></a> `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?` | `string` | GraphQL endpoint URL for the Portal | [sdk/utils/src/validation/dot-env.schema.ts:55](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L55) |
|
|
1735
|
+
| <a id="settlemint_portal_rest_endpoint"></a> `SETTLEMINT_PORTAL_REST_ENDPOINT?` | `string` | REST endpoint URL for the Portal | [sdk/utils/src/validation/dot-env.schema.ts:57](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L57) |
|
|
1736
|
+
| <a id="settlemint_portal_ws_endpoint"></a> `SETTLEMINT_PORTAL_WS_ENDPOINT?` | `string` | WebSocket endpoint URL for the Portal | [sdk/utils/src/validation/dot-env.schema.ts:59](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L59) |
|
|
1737
|
+
| <a id="settlemint_thegraph"></a> `SETTLEMINT_THEGRAPH?` | `string` | Unique name of The Graph instance | [sdk/utils/src/validation/dot-env.schema.ts:44](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L44) |
|
|
1738
|
+
| <a id="settlemint_thegraph_default_subgraph"></a> `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH?` | `string` | Default The Graph subgraph to use | [sdk/utils/src/validation/dot-env.schema.ts:51](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L51) |
|
|
1739
|
+
| <a id="settlemint_thegraph_subgraphs_endpoints"></a> `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?` | `string`[] | Array of endpoint URLs for The Graph subgraphs | [sdk/utils/src/validation/dot-env.schema.ts:46](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L46) |
|
|
1740
|
+
| <a id="settlemint_workspace"></a> `SETTLEMINT_WORKSPACE?` | `string` | Unique name of the workspace | [sdk/utils/src/validation/dot-env.schema.ts:20](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L20) |
|
|
1701
1741
|
|
|
1702
1742
|
***
|
|
1703
1743
|
|
|
@@ -1705,7 +1745,7 @@ Type definition for the environment variables schema.
|
|
|
1705
1745
|
|
|
1706
1746
|
> **DotEnvPartial** = `object`
|
|
1707
1747
|
|
|
1708
|
-
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1748
|
+
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:112](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L112)
|
|
1709
1749
|
|
|
1710
1750
|
Type definition for the partial environment variables schema.
|
|
1711
1751
|
|
|
@@ -1713,43 +1753,45 @@ Type definition for the partial environment variables schema.
|
|
|
1713
1753
|
|
|
1714
1754
|
| Name | Type | Description | Defined in |
|
|
1715
1755
|
| ------ | ------ | ------ | ------ |
|
|
1716
|
-
| <a id="settlemint_access_token-1"></a> `SETTLEMINT_ACCESS_TOKEN?` | `string` | Application access token for authenticating with SettleMint services | [sdk/utils/src/validation/dot-env.schema.ts:16](https://github.com/settlemint/sdk/blob/v2.
|
|
1717
|
-
| <a id="settlemint_accessible_private_key-1"></a> `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?` | `string` | Unique name of the accessible private key | [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1718
|
-
| <a id="settlemint_application-1"></a> `SETTLEMINT_APPLICATION?` | `string` | Unique name of the application | [sdk/utils/src/validation/dot-env.schema.ts:22](https://github.com/settlemint/sdk/blob/v2.
|
|
1719
|
-
| <a id="settlemint_blockchain_network-1"></a> `SETTLEMINT_BLOCKCHAIN_NETWORK?` | `string` | Unique name of the blockchain network | [sdk/utils/src/validation/dot-env.schema.ts:24](https://github.com/settlemint/sdk/blob/v2.
|
|
1720
|
-
| <a id="settlemint_blockchain_network_chain_id-1"></a> `SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID?` | `string` | Chain ID of the blockchain network | [sdk/utils/src/validation/dot-env.schema.ts:26](https://github.com/settlemint/sdk/blob/v2.
|
|
1721
|
-
| <a id="settlemint_blockchain_node-1"></a> `SETTLEMINT_BLOCKCHAIN_NODE?` | `string` | Unique name of the blockchain node (should have a private key for signing transactions) | [sdk/utils/src/validation/dot-env.schema.ts:28](https://github.com/settlemint/sdk/blob/v2.
|
|
1722
|
-
| <a id="settlemint_blockchain_node_json_rpc_endpoint-1"></a> `SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT?` | `string` | JSON RPC endpoint for the blockchain node | [sdk/utils/src/validation/dot-env.schema.ts:30](https://github.com/settlemint/sdk/blob/v2.
|
|
1723
|
-
| <a id="settlemint_blockchain_node_or_load_balancer-1"></a> `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER?` | `string` | Unique name of the blockchain node or load balancer | [sdk/utils/src/validation/dot-env.schema.ts:32](https://github.com/settlemint/sdk/blob/v2.
|
|
1724
|
-
| <a id="settlemint_blockchain_node_or_load_balancer_json_rpc_endpoint-1"></a> `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT?` | `string` | JSON RPC endpoint for the blockchain node or load balancer | [sdk/utils/src/validation/dot-env.schema.ts:34](https://github.com/settlemint/sdk/blob/v2.
|
|
1725
|
-
| <a id="settlemint_blockscout-1"></a> `SETTLEMINT_BLOCKSCOUT?` | `string` | Unique name of the Blockscout instance | [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1726
|
-
| <a id="settlemint_blockscout_graphql_endpoint-1"></a> `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT?` | `string` | GraphQL endpoint URL for Blockscout | [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1727
|
-
| <a id="settlemint_blockscout_ui_endpoint-1"></a> `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT?` | `string` | UI endpoint URL for Blockscout | [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1728
|
-
| <a id="settlemint_custom_deployment-1"></a> `SETTLEMINT_CUSTOM_DEPLOYMENT?` | `string` | Unique name of the custom deployment | [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1729
|
-
| <a id="settlemint_custom_deployment_endpoint-1"></a> `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT?` | `string` | Endpoint URL for the custom deployment | [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1730
|
-
| <a id="settlemint_hasura-1"></a> `SETTLEMINT_HASURA?` | `string` | Unique name of the Hasura instance | [sdk/utils/src/validation/dot-env.schema.ts:36](https://github.com/settlemint/sdk/blob/v2.
|
|
1731
|
-
| <a id="settlemint_hasura_admin_secret-1"></a> `SETTLEMINT_HASURA_ADMIN_SECRET?` | `string` | Admin secret for authenticating with Hasura | [sdk/utils/src/validation/dot-env.schema.ts:40](https://github.com/settlemint/sdk/blob/v2.
|
|
1732
|
-
| <a id="settlemint_hasura_database_url-1"></a> `SETTLEMINT_HASURA_DATABASE_URL?` | `string` | Database connection URL for Hasura | [sdk/utils/src/validation/dot-env.schema.ts:42](https://github.com/settlemint/sdk/blob/v2.
|
|
1733
|
-
| <a id="settlemint_hasura_endpoint-1"></a> `SETTLEMINT_HASURA_ENDPOINT?` | `string` | Endpoint URL for the Hasura GraphQL API | [sdk/utils/src/validation/dot-env.schema.ts:38](https://github.com/settlemint/sdk/blob/v2.
|
|
1734
|
-
| <a id="settlemint_hd_private_key-1"></a> `SETTLEMINT_HD_PRIVATE_KEY?` | `string` | Unique name of the HD private key | [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1735
|
-
| <a id="
|
|
1736
|
-
| <a id="
|
|
1737
|
-
| <a id="
|
|
1738
|
-
| <a id="
|
|
1739
|
-
| <a id="
|
|
1740
|
-
| <a id="
|
|
1741
|
-
| <a id="
|
|
1742
|
-
| <a id="
|
|
1743
|
-
| <a id="
|
|
1744
|
-
| <a id="
|
|
1745
|
-
| <a id="
|
|
1746
|
-
| <a id="
|
|
1747
|
-
| <a id="
|
|
1748
|
-
| <a id="
|
|
1749
|
-
| <a id="
|
|
1750
|
-
| <a id="
|
|
1751
|
-
| <a id="
|
|
1752
|
-
| <a id="
|
|
1756
|
+
| <a id="settlemint_access_token-1"></a> `SETTLEMINT_ACCESS_TOKEN?` | `string` | Application access token for authenticating with SettleMint services | [sdk/utils/src/validation/dot-env.schema.ts:16](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L16) |
|
|
1757
|
+
| <a id="settlemint_accessible_private_key-1"></a> `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?` | `string` | Unique name of the accessible private key | [sdk/utils/src/validation/dot-env.schema.ts:65](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L65) |
|
|
1758
|
+
| <a id="settlemint_application-1"></a> `SETTLEMINT_APPLICATION?` | `string` | Unique name of the application | [sdk/utils/src/validation/dot-env.schema.ts:22](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L22) |
|
|
1759
|
+
| <a id="settlemint_blockchain_network-1"></a> `SETTLEMINT_BLOCKCHAIN_NETWORK?` | `string` | Unique name of the blockchain network | [sdk/utils/src/validation/dot-env.schema.ts:24](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L24) |
|
|
1760
|
+
| <a id="settlemint_blockchain_network_chain_id-1"></a> `SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID?` | `string` | Chain ID of the blockchain network | [sdk/utils/src/validation/dot-env.schema.ts:26](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L26) |
|
|
1761
|
+
| <a id="settlemint_blockchain_node-1"></a> `SETTLEMINT_BLOCKCHAIN_NODE?` | `string` | Unique name of the blockchain node (should have a private key for signing transactions) | [sdk/utils/src/validation/dot-env.schema.ts:28](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L28) |
|
|
1762
|
+
| <a id="settlemint_blockchain_node_json_rpc_endpoint-1"></a> `SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT?` | `string` | JSON RPC endpoint for the blockchain node | [sdk/utils/src/validation/dot-env.schema.ts:30](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L30) |
|
|
1763
|
+
| <a id="settlemint_blockchain_node_or_load_balancer-1"></a> `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER?` | `string` | Unique name of the blockchain node or load balancer | [sdk/utils/src/validation/dot-env.schema.ts:32](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L32) |
|
|
1764
|
+
| <a id="settlemint_blockchain_node_or_load_balancer_json_rpc_endpoint-1"></a> `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT?` | `string` | JSON RPC endpoint for the blockchain node or load balancer | [sdk/utils/src/validation/dot-env.schema.ts:34](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L34) |
|
|
1765
|
+
| <a id="settlemint_blockscout-1"></a> `SETTLEMINT_BLOCKSCOUT?` | `string` | Unique name of the Blockscout instance | [sdk/utils/src/validation/dot-env.schema.ts:87](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L87) |
|
|
1766
|
+
| <a id="settlemint_blockscout_graphql_endpoint-1"></a> `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT?` | `string` | GraphQL endpoint URL for Blockscout | [sdk/utils/src/validation/dot-env.schema.ts:89](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L89) |
|
|
1767
|
+
| <a id="settlemint_blockscout_ui_endpoint-1"></a> `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT?` | `string` | UI endpoint URL for Blockscout | [sdk/utils/src/validation/dot-env.schema.ts:91](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L91) |
|
|
1768
|
+
| <a id="settlemint_custom_deployment-1"></a> `SETTLEMINT_CUSTOM_DEPLOYMENT?` | `string` | Unique name of the custom deployment | [sdk/utils/src/validation/dot-env.schema.ts:83](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L83) |
|
|
1769
|
+
| <a id="settlemint_custom_deployment_endpoint-1"></a> `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT?` | `string` | Endpoint URL for the custom deployment | [sdk/utils/src/validation/dot-env.schema.ts:85](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L85) |
|
|
1770
|
+
| <a id="settlemint_hasura-1"></a> `SETTLEMINT_HASURA?` | `string` | Unique name of the Hasura instance | [sdk/utils/src/validation/dot-env.schema.ts:36](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L36) |
|
|
1771
|
+
| <a id="settlemint_hasura_admin_secret-1"></a> `SETTLEMINT_HASURA_ADMIN_SECRET?` | `string` | Admin secret for authenticating with Hasura | [sdk/utils/src/validation/dot-env.schema.ts:40](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L40) |
|
|
1772
|
+
| <a id="settlemint_hasura_database_url-1"></a> `SETTLEMINT_HASURA_DATABASE_URL?` | `string` | Database connection URL for Hasura | [sdk/utils/src/validation/dot-env.schema.ts:42](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L42) |
|
|
1773
|
+
| <a id="settlemint_hasura_endpoint-1"></a> `SETTLEMINT_HASURA_ENDPOINT?` | `string` | Endpoint URL for the Hasura GraphQL API | [sdk/utils/src/validation/dot-env.schema.ts:38](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L38) |
|
|
1774
|
+
| <a id="settlemint_hd_private_key-1"></a> `SETTLEMINT_HD_PRIVATE_KEY?` | `string` | Unique name of the HD private key | [sdk/utils/src/validation/dot-env.schema.ts:61](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L61) |
|
|
1775
|
+
| <a id="settlemint_hd_private_key_forwarder_address-1"></a> `SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?` | `string` | Address of the HD private key forwarder | [sdk/utils/src/validation/dot-env.schema.ts:63](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L63) |
|
|
1776
|
+
| <a id="settlemint_instance-1"></a> `SETTLEMINT_INSTANCE?` | `string` | Base URL of the SettleMint platform instance | [sdk/utils/src/validation/dot-env.schema.ts:14](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L14) |
|
|
1777
|
+
| <a id="settlemint_ipfs-1"></a> `SETTLEMINT_IPFS?` | `string` | Unique name of the IPFS instance | [sdk/utils/src/validation/dot-env.schema.ts:75](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L75) |
|
|
1778
|
+
| <a id="settlemint_ipfs_api_endpoint-1"></a> `SETTLEMINT_IPFS_API_ENDPOINT?` | `string` | API endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:77](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L77) |
|
|
1779
|
+
| <a id="settlemint_ipfs_gateway_endpoint-1"></a> `SETTLEMINT_IPFS_GATEWAY_ENDPOINT?` | `string` | Gateway endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:81](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L81) |
|
|
1780
|
+
| <a id="settlemint_ipfs_pinning_endpoint-1"></a> `SETTLEMINT_IPFS_PINNING_ENDPOINT?` | `string` | Pinning service endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:79](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L79) |
|
|
1781
|
+
| <a id="settlemint_log_level-1"></a> `SETTLEMINT_LOG_LEVEL?` | `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"` | The log level to use | [sdk/utils/src/validation/dot-env.schema.ts:95](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L95) |
|
|
1782
|
+
| <a id="settlemint_minio-1"></a> `SETTLEMINT_MINIO?` | `string` | Unique name of the MinIO instance | [sdk/utils/src/validation/dot-env.schema.ts:67](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L67) |
|
|
1783
|
+
| <a id="settlemint_minio_access_key-1"></a> `SETTLEMINT_MINIO_ACCESS_KEY?` | `string` | Access key for MinIO authentication | [sdk/utils/src/validation/dot-env.schema.ts:71](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L71) |
|
|
1784
|
+
| <a id="settlemint_minio_endpoint-1"></a> `SETTLEMINT_MINIO_ENDPOINT?` | `string` | Endpoint URL for MinIO | [sdk/utils/src/validation/dot-env.schema.ts:69](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L69) |
|
|
1785
|
+
| <a id="settlemint_minio_secret_key-1"></a> `SETTLEMINT_MINIO_SECRET_KEY?` | `string` | Secret key for MinIO authentication | [sdk/utils/src/validation/dot-env.schema.ts:73](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L73) |
|
|
1786
|
+
| <a id="settlemint_new_project_name-1"></a> `SETTLEMINT_NEW_PROJECT_NAME?` | `string` | Name of the new project being created | [sdk/utils/src/validation/dot-env.schema.ts:93](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L93) |
|
|
1787
|
+
| <a id="settlemint_portal-1"></a> `SETTLEMINT_PORTAL?` | `string` | Unique name of the Smart Contract Portal instance | [sdk/utils/src/validation/dot-env.schema.ts:53](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L53) |
|
|
1788
|
+
| <a id="settlemint_portal_graphql_endpoint-1"></a> `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?` | `string` | GraphQL endpoint URL for the Portal | [sdk/utils/src/validation/dot-env.schema.ts:55](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L55) |
|
|
1789
|
+
| <a id="settlemint_portal_rest_endpoint-1"></a> `SETTLEMINT_PORTAL_REST_ENDPOINT?` | `string` | REST endpoint URL for the Portal | [sdk/utils/src/validation/dot-env.schema.ts:57](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L57) |
|
|
1790
|
+
| <a id="settlemint_portal_ws_endpoint-1"></a> `SETTLEMINT_PORTAL_WS_ENDPOINT?` | `string` | WebSocket endpoint URL for the Portal | [sdk/utils/src/validation/dot-env.schema.ts:59](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L59) |
|
|
1791
|
+
| <a id="settlemint_thegraph-1"></a> `SETTLEMINT_THEGRAPH?` | `string` | Unique name of The Graph instance | [sdk/utils/src/validation/dot-env.schema.ts:44](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L44) |
|
|
1792
|
+
| <a id="settlemint_thegraph_default_subgraph-1"></a> `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH?` | `string` | Default The Graph subgraph to use | [sdk/utils/src/validation/dot-env.schema.ts:51](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L51) |
|
|
1793
|
+
| <a id="settlemint_thegraph_subgraphs_endpoints-1"></a> `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?` | `string`[] | Array of endpoint URLs for The Graph subgraphs | [sdk/utils/src/validation/dot-env.schema.ts:46](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L46) |
|
|
1794
|
+
| <a id="settlemint_workspace-1"></a> `SETTLEMINT_WORKSPACE?` | `string` | Unique name of the workspace | [sdk/utils/src/validation/dot-env.schema.ts:20](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L20) |
|
|
1753
1795
|
|
|
1754
1796
|
***
|
|
1755
1797
|
|
|
@@ -1757,7 +1799,7 @@ Type definition for the partial environment variables schema.
|
|
|
1757
1799
|
|
|
1758
1800
|
> **Id** = `string`
|
|
1759
1801
|
|
|
1760
|
-
Defined in: [sdk/utils/src/validation/id.schema.ts:30](https://github.com/settlemint/sdk/blob/v2.
|
|
1802
|
+
Defined in: [sdk/utils/src/validation/id.schema.ts:30](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/id.schema.ts#L30)
|
|
1761
1803
|
|
|
1762
1804
|
Type definition for database IDs, inferred from IdSchema.
|
|
1763
1805
|
Can be either a PostgreSQL UUID string or MongoDB ObjectID string.
|
|
@@ -1768,7 +1810,7 @@ Can be either a PostgreSQL UUID string or MongoDB ObjectID string.
|
|
|
1768
1810
|
|
|
1769
1811
|
> **LogLevel** = `"debug"` \| `"info"` \| `"warn"` \| `"error"` \| `"none"`
|
|
1770
1812
|
|
|
1771
|
-
Defined in: [sdk/utils/src/logging/logger.ts:6](https://github.com/settlemint/sdk/blob/v2.
|
|
1813
|
+
Defined in: [sdk/utils/src/logging/logger.ts:6](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/logging/logger.ts#L6)
|
|
1772
1814
|
|
|
1773
1815
|
Log levels supported by the logger
|
|
1774
1816
|
|
|
@@ -1778,7 +1820,7 @@ Log levels supported by the logger
|
|
|
1778
1820
|
|
|
1779
1821
|
> **PersonalAccessToken** = `string`
|
|
1780
1822
|
|
|
1781
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:15](https://github.com/settlemint/sdk/blob/v2.
|
|
1823
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:15](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/access-token.schema.ts#L15)
|
|
1782
1824
|
|
|
1783
1825
|
Schema for validating personal access tokens.
|
|
1784
1826
|
Personal access tokens start with 'sm_pat_' prefix.
|
|
@@ -1789,7 +1831,7 @@ Personal access tokens start with 'sm_pat_' prefix.
|
|
|
1789
1831
|
|
|
1790
1832
|
> **Url** = `string`
|
|
1791
1833
|
|
|
1792
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:18](https://github.com/settlemint/sdk/blob/v2.
|
|
1834
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:18](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/url.schema.ts#L18)
|
|
1793
1835
|
|
|
1794
1836
|
Schema for validating URLs.
|
|
1795
1837
|
|
|
@@ -1813,7 +1855,7 @@ const isInvalidUrl = UrlSchema.safeParse("not-a-url").success;
|
|
|
1813
1855
|
|
|
1814
1856
|
> **UrlOrPath** = `string`
|
|
1815
1857
|
|
|
1816
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:55](https://github.com/settlemint/sdk/blob/v2.
|
|
1858
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:55](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/url.schema.ts#L55)
|
|
1817
1859
|
|
|
1818
1860
|
Schema that accepts either a full URL or a URL path.
|
|
1819
1861
|
|
|
@@ -1837,7 +1879,7 @@ const isValidPath = UrlOrPathSchema.safeParse("/api/v1/users").success;
|
|
|
1837
1879
|
|
|
1838
1880
|
> **UrlPath** = `string`
|
|
1839
1881
|
|
|
1840
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:38](https://github.com/settlemint/sdk/blob/v2.
|
|
1882
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:38](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/url.schema.ts#L38)
|
|
1841
1883
|
|
|
1842
1884
|
Schema for validating URL paths.
|
|
1843
1885
|
|
|
@@ -1861,7 +1903,7 @@ const isInvalidPath = UrlPathSchema.safeParse("not-a-path").success;
|
|
|
1861
1903
|
|
|
1862
1904
|
> `const` **AccessTokenSchema**: `ZodString`\<[`AccessToken`](#accesstoken)\>
|
|
1863
1905
|
|
|
1864
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:21](https://github.com/settlemint/sdk/blob/v2.
|
|
1906
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:21](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/access-token.schema.ts#L21)
|
|
1865
1907
|
|
|
1866
1908
|
Schema for validating both application and personal access tokens.
|
|
1867
1909
|
Accepts tokens starting with either 'sm_pat_' or 'sm_aat_' prefix.
|
|
@@ -1872,7 +1914,7 @@ Accepts tokens starting with either 'sm_pat_' or 'sm_aat_' prefix.
|
|
|
1872
1914
|
|
|
1873
1915
|
> `const` **ApplicationAccessTokenSchema**: `ZodString`\<[`ApplicationAccessToken`](#applicationaccesstoken)\>
|
|
1874
1916
|
|
|
1875
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:7](https://github.com/settlemint/sdk/blob/v2.
|
|
1917
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:7](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/access-token.schema.ts#L7)
|
|
1876
1918
|
|
|
1877
1919
|
Schema for validating application access tokens.
|
|
1878
1920
|
Application access tokens start with 'sm_aat_' prefix.
|
|
@@ -1883,7 +1925,7 @@ Application access tokens start with 'sm_aat_' prefix.
|
|
|
1883
1925
|
|
|
1884
1926
|
> `const` **DotEnvSchema**: `ZodObject`\<[`DotEnv`](#dotenv)\>
|
|
1885
1927
|
|
|
1886
|
-
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:12](https://github.com/settlemint/sdk/blob/v2.
|
|
1928
|
+
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:12](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L12)
|
|
1887
1929
|
|
|
1888
1930
|
Schema for validating environment variables used by the SettleMint SDK.
|
|
1889
1931
|
Defines validation rules and types for configuration values like URLs,
|
|
@@ -1895,7 +1937,7 @@ access tokens, workspace names, and service endpoints.
|
|
|
1895
1937
|
|
|
1896
1938
|
> `const` **DotEnvSchemaPartial**: `ZodObject`\<[`DotEnvPartial`](#dotenvpartial)\>
|
|
1897
1939
|
|
|
1898
|
-
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1940
|
+
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:107](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/dot-env.schema.ts#L107)
|
|
1899
1941
|
|
|
1900
1942
|
Partial version of the environment variables schema where all fields are optional.
|
|
1901
1943
|
Useful for validating incomplete configurations during development or build time.
|
|
@@ -1906,7 +1948,7 @@ Useful for validating incomplete configurations during development or build time
|
|
|
1906
1948
|
|
|
1907
1949
|
> `const` **IdSchema**: `ZodUnion`\<[`Id`](#id)\>
|
|
1908
1950
|
|
|
1909
|
-
Defined in: [sdk/utils/src/validation/id.schema.ts:17](https://github.com/settlemint/sdk/blob/v2.
|
|
1951
|
+
Defined in: [sdk/utils/src/validation/id.schema.ts:17](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/id.schema.ts#L17)
|
|
1910
1952
|
|
|
1911
1953
|
Schema for validating database IDs. Accepts both PostgreSQL UUIDs and MongoDB ObjectIDs.
|
|
1912
1954
|
PostgreSQL UUIDs are 32 hexadecimal characters with hyphens (e.g. 123e4567-e89b-12d3-a456-426614174000).
|
|
@@ -1930,7 +1972,7 @@ const isValidObjectId = IdSchema.safeParse("507f1f77bcf86cd799439011").success;
|
|
|
1930
1972
|
|
|
1931
1973
|
> `const` **PersonalAccessTokenSchema**: `ZodString`\<[`PersonalAccessToken`](#personalaccesstoken)\>
|
|
1932
1974
|
|
|
1933
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:14](https://github.com/settlemint/sdk/blob/v2.
|
|
1975
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:14](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/access-token.schema.ts#L14)
|
|
1934
1976
|
|
|
1935
1977
|
Schema for validating personal access tokens.
|
|
1936
1978
|
Personal access tokens start with 'sm_pat_' prefix.
|
|
@@ -1941,7 +1983,7 @@ Personal access tokens start with 'sm_pat_' prefix.
|
|
|
1941
1983
|
|
|
1942
1984
|
> `const` **runsInBrowser**: `boolean` = `isBrowser`
|
|
1943
1985
|
|
|
1944
|
-
Defined in: [sdk/utils/src/runtime/ensure-server.ts:40](https://github.com/settlemint/sdk/blob/v2.
|
|
1986
|
+
Defined in: [sdk/utils/src/runtime/ensure-server.ts:40](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/runtime/ensure-server.ts#L40)
|
|
1945
1987
|
|
|
1946
1988
|
Boolean indicating if code is currently running in a browser environment
|
|
1947
1989
|
|
|
@@ -1951,7 +1993,7 @@ Boolean indicating if code is currently running in a browser environment
|
|
|
1951
1993
|
|
|
1952
1994
|
> `const` **runsOnServer**: `boolean` = `!isBrowser`
|
|
1953
1995
|
|
|
1954
|
-
Defined in: [sdk/utils/src/runtime/ensure-server.ts:45](https://github.com/settlemint/sdk/blob/v2.
|
|
1996
|
+
Defined in: [sdk/utils/src/runtime/ensure-server.ts:45](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/runtime/ensure-server.ts#L45)
|
|
1955
1997
|
|
|
1956
1998
|
Boolean indicating if code is currently running in a server environment
|
|
1957
1999
|
|
|
@@ -1961,7 +2003,7 @@ Boolean indicating if code is currently running in a server environment
|
|
|
1961
2003
|
|
|
1962
2004
|
> `const` **UniqueNameSchema**: `ZodString`
|
|
1963
2005
|
|
|
1964
|
-
Defined in: [sdk/utils/src/validation/unique-name.schema.ts:19](https://github.com/settlemint/sdk/blob/v2.
|
|
2006
|
+
Defined in: [sdk/utils/src/validation/unique-name.schema.ts:19](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/unique-name.schema.ts#L19)
|
|
1965
2007
|
|
|
1966
2008
|
Schema for validating unique names used across the SettleMint platform.
|
|
1967
2009
|
Only accepts lowercase alphanumeric characters and hyphens.
|
|
@@ -1987,7 +2029,7 @@ const isInvalidName = UniqueNameSchema.safeParse("My Workspace!").success;
|
|
|
1987
2029
|
|
|
1988
2030
|
> `const` **UrlOrPathSchema**: `ZodUnion`\<[`UrlOrPath`](#urlorpath)\>
|
|
1989
2031
|
|
|
1990
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:54](https://github.com/settlemint/sdk/blob/v2.
|
|
2032
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:54](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/url.schema.ts#L54)
|
|
1991
2033
|
|
|
1992
2034
|
Schema that accepts either a full URL or a URL path.
|
|
1993
2035
|
|
|
@@ -2011,7 +2053,7 @@ const isValidPath = UrlOrPathSchema.safeParse("/api/v1/users").success;
|
|
|
2011
2053
|
|
|
2012
2054
|
> `const` **UrlPathSchema**: `ZodString`\<[`UrlPath`](#urlpath)\>
|
|
2013
2055
|
|
|
2014
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:34](https://github.com/settlemint/sdk/blob/v2.
|
|
2056
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:34](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/url.schema.ts#L34)
|
|
2015
2057
|
|
|
2016
2058
|
Schema for validating URL paths.
|
|
2017
2059
|
|
|
@@ -2035,7 +2077,7 @@ const isInvalidPath = UrlPathSchema.safeParse("not-a-path").success;
|
|
|
2035
2077
|
|
|
2036
2078
|
> `const` **UrlSchema**: `ZodString`\<[`Url`](#url)\>
|
|
2037
2079
|
|
|
2038
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:17](https://github.com/settlemint/sdk/blob/v2.
|
|
2080
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:17](https://github.com/settlemint/sdk/blob/v2.3.0/sdk/utils/src/validation/url.schema.ts#L17)
|
|
2039
2081
|
|
|
2040
2082
|
Schema for validating URLs.
|
|
2041
2083
|
|