@settlemint/sdk-js 2.3.2-prf63bb3f0 → 2.3.2-prf6c4f06f
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 +7 -0
- package/dist/settlemint.cjs.map +1 -1
- package/dist/settlemint.mjs +8 -1
- package/dist/settlemint.mjs.map +1 -1
- package/package.json +2 -2
package/dist/settlemint.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/settlemint.ts
|
|
2
2
|
import { fetchWithRetry } from "@settlemint/sdk-utils/http";
|
|
3
3
|
import { ensureServer } from "@settlemint/sdk-utils/runtime";
|
|
4
|
-
import { validate as validate2 } from "@settlemint/sdk-utils/validation";
|
|
4
|
+
import { STANDALONE_INSTANCE, validate as validate2 } from "@settlemint/sdk-utils/validation";
|
|
5
5
|
import { GraphQLClient } from "graphql-request";
|
|
6
6
|
import { z as z2 } from "zod/v4";
|
|
7
7
|
|
|
@@ -1773,6 +1773,13 @@ function getPincodeVerificationChallengeResponse({
|
|
|
1773
1773
|
// src/settlemint.ts
|
|
1774
1774
|
function createSettleMintClient(options) {
|
|
1775
1775
|
ensureServer();
|
|
1776
|
+
if (options.instance === STANDALONE_INSTANCE) {
|
|
1777
|
+
if (options.anonymous) {
|
|
1778
|
+
options.instance = "https://console.settlemint.com";
|
|
1779
|
+
} else {
|
|
1780
|
+
throw new Error("Standalone instances cannot connect to the SettleMint platform");
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1776
1783
|
const validatedOptions = options.anonymous ? validate2(
|
|
1777
1784
|
z2.object({
|
|
1778
1785
|
...ClientOptionsSchema.shape,
|