Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@settlemint/sdk-utils

Package Overview
Dependencies
Maintainers
0
Versions
981
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@settlemint/sdk-utils - npm Package Compare versions

Comparing version 0.4.34-prfcf304a to 0.5.0-main33853af

dist/environment.cjs

4

dist/filesystem.d.ts
declare function ensureFolder(path: string): void;
export { ensureFolder };
declare function projectRoot(): Promise<string>;
export { ensureFolder, projectRoot };
import { z, ZodSchema } from 'zod';
import { DotenvParseOutput } from 'dotenv';
declare function ensureFolder(path: string): void;
declare function getPackageManager(targetDir: string): Promise<"yarn" | "pnpm" | "bun" | "npm">;
declare function ensureServer(): void;
/**

@@ -16,2 +11,56 @@ * Schema for validating access tokens.

/**
* Schema for validating access tokens.
*/
declare const DotEnvSchema: z.ZodObject<{
SETTLEMINT_ENVIRONMENT: z.ZodString;
SETTLEMINT_INSTANCE: z.ZodString;
SETTLEMINT_ACCESS_TOKEN: z.ZodString;
SETTLEMINT_WORKSPACE: z.ZodUnion<[z.ZodString, z.ZodString]>;
SETTLEMINT_APPLICATION: z.ZodUnion<[z.ZodString, z.ZodString]>;
SETTLEMINT_HASURA: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
SETTLEMINT_HASURA_ENDPOINT: z.ZodOptional<z.ZodString>;
SETTLEMINT_HASURA_ADMIN_SECRET: z.ZodOptional<z.ZodString>;
SETTLEMINT_THEGRAPH: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT: z.ZodOptional<z.ZodString>;
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK: z.ZodOptional<z.ZodString>;
SETTLEMINT_PORTAL: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: z.ZodOptional<z.ZodString>;
SETTLEMINT_PORTAL_REST_ENDPOINT: z.ZodOptional<z.ZodString>;
SETTLEMINT_HD_PRIVATE_KEY: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
SETTLEMINT_ENVIRONMENT: string;
SETTLEMINT_INSTANCE: string;
SETTLEMINT_ACCESS_TOKEN: string;
SETTLEMINT_WORKSPACE: string;
SETTLEMINT_APPLICATION: string;
SETTLEMINT_HASURA?: string | undefined;
SETTLEMINT_HASURA_ENDPOINT?: string | undefined;
SETTLEMINT_HASURA_ADMIN_SECRET?: string | undefined;
SETTLEMINT_THEGRAPH?: string | undefined;
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT?: string | undefined;
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK?: string | undefined;
SETTLEMINT_PORTAL?: string | undefined;
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined;
SETTLEMINT_PORTAL_REST_ENDPOINT?: string | undefined;
SETTLEMINT_HD_PRIVATE_KEY?: string | undefined;
}, {
SETTLEMINT_ENVIRONMENT: string;
SETTLEMINT_INSTANCE: string;
SETTLEMINT_ACCESS_TOKEN: string;
SETTLEMINT_WORKSPACE: string;
SETTLEMINT_APPLICATION: string;
SETTLEMINT_HASURA?: string | undefined;
SETTLEMINT_HASURA_ENDPOINT?: string | undefined;
SETTLEMINT_HASURA_ADMIN_SECRET?: string | undefined;
SETTLEMINT_THEGRAPH?: string | undefined;
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT?: string | undefined;
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK?: string | undefined;
SETTLEMINT_PORTAL?: string | undefined;
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined;
SETTLEMINT_PORTAL_REST_ENDPOINT?: string | undefined;
SETTLEMINT_HD_PRIVATE_KEY?: string | undefined;
}>;
type DotEnv = z.infer<typeof DotEnvSchema>;
/**
* Schema for validating IDs. Accepts both PostgreSQL UUIDs and MongoDB ObjectIDs.

@@ -44,2 +93,25 @@ */

export { type AccessToken, AccessTokenSchema, type Id, IdSchema, type Url, UrlSchema, ensureFolder, ensureServer, getPackageManager, validate };
/**
* Loads environment variables from .env files.
* To enable encryption with dotenvx (https://www.dotenvx.com/docs) run `bunx dotenvx encrypt`
*
* @returns A promise that resolves to the validated environment variables.
* @throws Will throw an error if validation fails.
*
* @example
* const env = await loadEnv();
* console.log(env.SETTLEMINT_INSTANCE);
*/
declare function loadEnv<T extends boolean = true>(validateEnv?: T): Promise<T extends true ? DotEnv : DotenvParseOutput>;
declare function writeEnv(env: Partial<DotEnv>, secrets: boolean): Promise<void>;
declare function ensureFolder(path: string): void;
declare function projectRoot(): Promise<string>;
declare function getPackageManager(targetDir: string): Promise<"yarn" | "pnpm" | "bun" | "npm">;
declare function ensureServer(): void;
export { type AccessToken, AccessTokenSchema, type DotEnv, DotEnvSchema, type Id, IdSchema, type Url, UrlSchema, ensureFolder, ensureServer, getPackageManager, loadEnv, projectRoot, validate, writeEnv };

@@ -10,2 +10,56 @@ import { z, ZodSchema } from 'zod';

/**
* Schema for validating access tokens.
*/
declare const DotEnvSchema: z.ZodObject<{
SETTLEMINT_ENVIRONMENT: z.ZodString;
SETTLEMINT_INSTANCE: z.ZodString;
SETTLEMINT_ACCESS_TOKEN: z.ZodString;
SETTLEMINT_WORKSPACE: z.ZodUnion<[z.ZodString, z.ZodString]>;
SETTLEMINT_APPLICATION: z.ZodUnion<[z.ZodString, z.ZodString]>;
SETTLEMINT_HASURA: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
SETTLEMINT_HASURA_ENDPOINT: z.ZodOptional<z.ZodString>;
SETTLEMINT_HASURA_ADMIN_SECRET: z.ZodOptional<z.ZodString>;
SETTLEMINT_THEGRAPH: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT: z.ZodOptional<z.ZodString>;
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK: z.ZodOptional<z.ZodString>;
SETTLEMINT_PORTAL: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: z.ZodOptional<z.ZodString>;
SETTLEMINT_PORTAL_REST_ENDPOINT: z.ZodOptional<z.ZodString>;
SETTLEMINT_HD_PRIVATE_KEY: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
SETTLEMINT_ENVIRONMENT: string;
SETTLEMINT_INSTANCE: string;
SETTLEMINT_ACCESS_TOKEN: string;
SETTLEMINT_WORKSPACE: string;
SETTLEMINT_APPLICATION: string;
SETTLEMINT_HASURA?: string | undefined;
SETTLEMINT_HASURA_ENDPOINT?: string | undefined;
SETTLEMINT_HASURA_ADMIN_SECRET?: string | undefined;
SETTLEMINT_THEGRAPH?: string | undefined;
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT?: string | undefined;
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK?: string | undefined;
SETTLEMINT_PORTAL?: string | undefined;
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined;
SETTLEMINT_PORTAL_REST_ENDPOINT?: string | undefined;
SETTLEMINT_HD_PRIVATE_KEY?: string | undefined;
}, {
SETTLEMINT_ENVIRONMENT: string;
SETTLEMINT_INSTANCE: string;
SETTLEMINT_ACCESS_TOKEN: string;
SETTLEMINT_WORKSPACE: string;
SETTLEMINT_APPLICATION: string;
SETTLEMINT_HASURA?: string | undefined;
SETTLEMINT_HASURA_ENDPOINT?: string | undefined;
SETTLEMINT_HASURA_ADMIN_SECRET?: string | undefined;
SETTLEMINT_THEGRAPH?: string | undefined;
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT?: string | undefined;
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK?: string | undefined;
SETTLEMINT_PORTAL?: string | undefined;
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined;
SETTLEMINT_PORTAL_REST_ENDPOINT?: string | undefined;
SETTLEMINT_HD_PRIVATE_KEY?: string | undefined;
}>;
type DotEnv = z.infer<typeof DotEnvSchema>;
/**
* Schema for validating IDs. Accepts both PostgreSQL UUIDs and MongoDB ObjectIDs.

@@ -38,2 +92,2 @@ */

export { type AccessToken, AccessTokenSchema, type Id, IdSchema, type Url, UrlSchema, validate };
export { type AccessToken, AccessTokenSchema, type DotEnv, DotEnvSchema, type Id, IdSchema, type Url, UrlSchema, validate };
{
"name": "@settlemint/sdk-utils",
"description": "SettleMint SDK, integrate SettleMint into your application with ease.",
"version": "0.4.34-prfcf304a",
"version": "0.5.0-main33853af",
"type": "module",

@@ -61,3 +61,10 @@ "private": false,

"dependencies": {
"@antfu/ni": "^0.23.0"
"@antfu/ni": "^0.23",
"@dotenvx/dotenvx": "^1",
"deepmerge-ts": "^7",
"environment": "^1",
"find-up": "^7",
"nano-spawn": "^0.1.0",
"yocto-spinner": "^0.1",
"yoctocolors": "^2"
},

@@ -64,0 +71,0 @@ "peerDependencies": {},

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc