@settlemint/sdk-utils
Advanced tools
Comparing version
@@ -51,4 +51,8 @@ import { z } from 'zod'; | ||
SETTLEMINT_PORTAL_REST_ENDPOINT: z.ZodOptional<z.ZodString>; | ||
/** WebSocket endpoint URL for the Portal */ | ||
SETTLEMINT_PORTAL_WS_ENDPOINT: z.ZodOptional<z.ZodString>; | ||
/** Unique name of the HD private key */ | ||
SETTLEMINT_HD_PRIVATE_KEY: z.ZodOptional<z.ZodString>; | ||
/** Address of the HD private key forwarder */ | ||
SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS: z.ZodOptional<z.ZodString>; | ||
/** Unique name of the accessible private key */ | ||
@@ -109,3 +113,5 @@ SETTLEMINT_ACCESSIBLE_PRIVATE_KEY: z.ZodOptional<z.ZodString>; | ||
SETTLEMINT_PORTAL_REST_ENDPOINT?: string | undefined; | ||
SETTLEMINT_PORTAL_WS_ENDPOINT?: string | undefined; | ||
SETTLEMINT_HD_PRIVATE_KEY?: string | undefined; | ||
SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?: string | undefined; | ||
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?: string | undefined; | ||
@@ -148,3 +154,5 @@ SETTLEMINT_MINIO?: string | undefined; | ||
SETTLEMINT_PORTAL_REST_ENDPOINT?: string | undefined; | ||
SETTLEMINT_PORTAL_WS_ENDPOINT?: string | undefined; | ||
SETTLEMINT_HD_PRIVATE_KEY?: string | undefined; | ||
SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?: string | undefined; | ||
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?: string | undefined; | ||
@@ -197,3 +205,5 @@ SETTLEMINT_MINIO?: string | undefined; | ||
SETTLEMINT_PORTAL_REST_ENDPOINT: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_PORTAL_WS_ENDPOINT: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_HD_PRIVATE_KEY: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
@@ -237,3 +247,5 @@ SETTLEMINT_MINIO: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_PORTAL_REST_ENDPOINT?: string | undefined; | ||
SETTLEMINT_PORTAL_WS_ENDPOINT?: string | undefined; | ||
SETTLEMINT_HD_PRIVATE_KEY?: string | undefined; | ||
SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?: string | undefined; | ||
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?: string | undefined; | ||
@@ -277,3 +289,5 @@ SETTLEMINT_MINIO?: string | undefined; | ||
SETTLEMINT_PORTAL_REST_ENDPOINT?: string | undefined; | ||
SETTLEMINT_PORTAL_WS_ENDPOINT?: string | undefined; | ||
SETTLEMINT_HD_PRIVATE_KEY?: string | undefined; | ||
SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?: string | undefined; | ||
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?: string | undefined; | ||
@@ -280,0 +294,0 @@ SETTLEMINT_MINIO?: string | undefined; |
@@ -39,2 +39,15 @@ /** | ||
declare function extractJsonObject<T>(value: string): T | null; | ||
/** | ||
* Converts a value to a JSON stringifiable format. | ||
* | ||
* @param value - The value to convert | ||
* @returns The JSON stringifiable value | ||
* | ||
* @example | ||
* import { makeJsonStringifiable } from "@settlemint/sdk-utils"; | ||
* | ||
* const json = makeJsonStringifiable<{ amount: bigint }>({ amount: BigInt(1000) }); | ||
* // Returns: '{"amount":"1000"}' | ||
*/ | ||
declare function makeJsonStringifiable<T>(value: unknown): T; | ||
@@ -110,2 +123,2 @@ /** | ||
export { camelCaseToWords, capitalizeFirstLetter, extractJsonObject, replaceUnderscoresAndHyphensWithSpaces, retryWhenFailed, truncate, tryParseJson }; | ||
export { camelCaseToWords, capitalizeFirstLetter, extractJsonObject, makeJsonStringifiable, replaceUnderscoresAndHyphensWithSpaces, retryWhenFailed, truncate, tryParseJson }; |
@@ -85,4 +85,8 @@ import { ZodSchema, ZodString, z } from 'zod'; | ||
SETTLEMINT_PORTAL_REST_ENDPOINT: z.ZodOptional<z.ZodString>; | ||
/** WebSocket endpoint URL for the Portal */ | ||
SETTLEMINT_PORTAL_WS_ENDPOINT: z.ZodOptional<z.ZodString>; | ||
/** Unique name of the HD private key */ | ||
SETTLEMINT_HD_PRIVATE_KEY: z.ZodOptional<z.ZodString>; | ||
/** Address of the HD private key forwarder */ | ||
SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS: z.ZodOptional<z.ZodString>; | ||
/** Unique name of the accessible private key */ | ||
@@ -143,3 +147,5 @@ SETTLEMINT_ACCESSIBLE_PRIVATE_KEY: z.ZodOptional<z.ZodString>; | ||
SETTLEMINT_PORTAL_REST_ENDPOINT?: string | undefined; | ||
SETTLEMINT_PORTAL_WS_ENDPOINT?: string | undefined; | ||
SETTLEMINT_HD_PRIVATE_KEY?: string | undefined; | ||
SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?: string | undefined; | ||
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?: string | undefined; | ||
@@ -182,3 +188,5 @@ SETTLEMINT_MINIO?: string | undefined; | ||
SETTLEMINT_PORTAL_REST_ENDPOINT?: string | undefined; | ||
SETTLEMINT_PORTAL_WS_ENDPOINT?: string | undefined; | ||
SETTLEMINT_HD_PRIVATE_KEY?: string | undefined; | ||
SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?: string | undefined; | ||
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?: string | undefined; | ||
@@ -231,3 +239,5 @@ SETTLEMINT_MINIO?: string | undefined; | ||
SETTLEMINT_PORTAL_REST_ENDPOINT: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_PORTAL_WS_ENDPOINT: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_HD_PRIVATE_KEY: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
@@ -271,3 +281,5 @@ SETTLEMINT_MINIO: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_PORTAL_REST_ENDPOINT?: string | undefined; | ||
SETTLEMINT_PORTAL_WS_ENDPOINT?: string | undefined; | ||
SETTLEMINT_HD_PRIVATE_KEY?: string | undefined; | ||
SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?: string | undefined; | ||
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?: string | undefined; | ||
@@ -311,3 +323,5 @@ SETTLEMINT_MINIO?: string | undefined; | ||
SETTLEMINT_PORTAL_REST_ENDPOINT?: string | undefined; | ||
SETTLEMINT_PORTAL_WS_ENDPOINT?: string | undefined; | ||
SETTLEMINT_HD_PRIVATE_KEY?: string | undefined; | ||
SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?: string | undefined; | ||
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?: string | undefined; | ||
@@ -314,0 +328,0 @@ SETTLEMINT_MINIO?: string | undefined; |
{ | ||
"name": "@settlemint/sdk-utils", | ||
"description": "Shared utilities and helper functions for SettleMint SDK modules", | ||
"version": "2.2.3", | ||
"version": "2.3.0-pr537f3bf0", | ||
"type": "module", | ||
@@ -75,3 +75,3 @@ "private": false, | ||
"find-up": "^7", | ||
"nano-spawn": "^0.2", | ||
"nano-spawn": "^1.0.0", | ||
"package-manager-detector": "^1.0.0", | ||
@@ -78,0 +78,0 @@ "yocto-spinner": "^0.2.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
614819
2.61%4243
2.07%2105
2.04%1
Infinity%29
38.1%7
75%+ Added
- Removed
Updated