@settlemint/sdk-js 2.5.1-pre6103334 → 2.5.1-pred474268
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/dist/settlemint.cjs +4 -4
- package/dist/settlemint.cjs.map +1 -1
- package/dist/settlemint.d.cts +33 -33
- package/dist/settlemint.d.ts +1 -1
- package/dist/settlemint.js +1 -1
- package/dist/settlemint.js.map +1 -1
- package/package.json +3 -3
package/dist/settlemint.cjs
CHANGED
|
@@ -26,7 +26,7 @@ const __settlemint_sdk_utils_http = __toESM(require("@settlemint/sdk-utils/http"
|
|
|
26
26
|
const __settlemint_sdk_utils_runtime = __toESM(require("@settlemint/sdk-utils/runtime"));
|
|
27
27
|
const __settlemint_sdk_utils_validation = __toESM(require("@settlemint/sdk-utils/validation"));
|
|
28
28
|
const graphql_request = __toESM(require("graphql-request"));
|
|
29
|
-
const
|
|
29
|
+
const zod = __toESM(require("zod"));
|
|
30
30
|
const gql_tada = __toESM(require("gql.tada"));
|
|
31
31
|
const node_crypto = __toESM(require("node:crypto"));
|
|
32
32
|
|
|
@@ -2472,7 +2472,7 @@ const privateKeyResume = (gqlClient) => async (privateKeyUniqueName) => {
|
|
|
2472
2472
|
/**
|
|
2473
2473
|
* Schema for validating SettleMint client options.
|
|
2474
2474
|
*/
|
|
2475
|
-
const ClientOptionsSchema =
|
|
2475
|
+
const ClientOptionsSchema = zod.z.object({
|
|
2476
2476
|
accessToken: __settlemint_sdk_utils_validation.AccessTokenSchema,
|
|
2477
2477
|
instance: __settlemint_sdk_utils_validation.UrlSchema
|
|
2478
2478
|
});
|
|
@@ -2560,9 +2560,9 @@ function createSettleMintClient(options) {
|
|
|
2560
2560
|
throw new Error("Standalone and local instances cannot connect to the SettleMint platform");
|
|
2561
2561
|
}
|
|
2562
2562
|
}
|
|
2563
|
-
const validatedOptions = options.anonymous ? (0, __settlemint_sdk_utils_validation.validate)(
|
|
2563
|
+
const validatedOptions = options.anonymous ? (0, __settlemint_sdk_utils_validation.validate)(zod.z.object({
|
|
2564
2564
|
...ClientOptionsSchema.shape,
|
|
2565
|
-
accessToken:
|
|
2565
|
+
accessToken: zod.z.literal("")
|
|
2566
2566
|
}), options) : (0, __settlemint_sdk_utils_validation.validate)(ClientOptionsSchema, options);
|
|
2567
2567
|
const baseUrl = new URL(validatedOptions.instance).toString().replace(/\/$/, "");
|
|
2568
2568
|
const gqlClient = new graphql_request.GraphQLClient(`${baseUrl}/api/graphql`, {
|