@volr/react 0.2.2 → 0.2.5
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/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -146,6 +146,7 @@ interface UserDto {
|
|
|
146
146
|
signerType?: 'passkey' | 'external_wallet' | 'mpc';
|
|
147
147
|
walletConnector?: string;
|
|
148
148
|
lastWalletChainId?: number;
|
|
149
|
+
externalWalletPreferred?: boolean;
|
|
149
150
|
blobUrl?: string;
|
|
150
151
|
prfInput?: PrfInputDto;
|
|
151
152
|
credentialId?: string;
|
|
@@ -276,6 +277,7 @@ interface VolrUser {
|
|
|
276
277
|
signerType?: SignerType;
|
|
277
278
|
walletConnector?: string;
|
|
278
279
|
lastWalletChainId?: number;
|
|
280
|
+
externalWalletPreferred?: boolean;
|
|
279
281
|
blobUrl?: string;
|
|
280
282
|
prfInput?: PrfInputDto;
|
|
281
283
|
credentialId?: string;
|
|
@@ -289,8 +291,13 @@ type VolrConfig = {
|
|
|
289
291
|
projectApiKey: string;
|
|
290
292
|
rpcOverrides?: Record<string, string>;
|
|
291
293
|
autoRecoverOnLogin?: boolean;
|
|
292
|
-
|
|
293
|
-
|
|
294
|
+
/**
|
|
295
|
+
* Allowed locales for UI language selection.
|
|
296
|
+
* If the user's locale is not allowed, English is used.
|
|
297
|
+
*/
|
|
298
|
+
allowedLocales?: Array<"en" | "ko">;
|
|
299
|
+
walletPolicy?: {
|
|
300
|
+
requireVolrWalletOnLogin?: boolean;
|
|
294
301
|
};
|
|
295
302
|
/**
|
|
296
303
|
* Deposit/Topup configuration for multi-chain, multi-token support
|
|
@@ -966,6 +973,7 @@ interface PaymentToken {
|
|
|
966
973
|
decimals: number;
|
|
967
974
|
address: string;
|
|
968
975
|
iconUrl?: string | null;
|
|
976
|
+
permitSupported?: boolean;
|
|
969
977
|
}
|
|
970
978
|
interface PaymentResult {
|
|
971
979
|
id: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -146,6 +146,7 @@ interface UserDto {
|
|
|
146
146
|
signerType?: 'passkey' | 'external_wallet' | 'mpc';
|
|
147
147
|
walletConnector?: string;
|
|
148
148
|
lastWalletChainId?: number;
|
|
149
|
+
externalWalletPreferred?: boolean;
|
|
149
150
|
blobUrl?: string;
|
|
150
151
|
prfInput?: PrfInputDto;
|
|
151
152
|
credentialId?: string;
|
|
@@ -276,6 +277,7 @@ interface VolrUser {
|
|
|
276
277
|
signerType?: SignerType;
|
|
277
278
|
walletConnector?: string;
|
|
278
279
|
lastWalletChainId?: number;
|
|
280
|
+
externalWalletPreferred?: boolean;
|
|
279
281
|
blobUrl?: string;
|
|
280
282
|
prfInput?: PrfInputDto;
|
|
281
283
|
credentialId?: string;
|
|
@@ -289,8 +291,13 @@ type VolrConfig = {
|
|
|
289
291
|
projectApiKey: string;
|
|
290
292
|
rpcOverrides?: Record<string, string>;
|
|
291
293
|
autoRecoverOnLogin?: boolean;
|
|
292
|
-
|
|
293
|
-
|
|
294
|
+
/**
|
|
295
|
+
* Allowed locales for UI language selection.
|
|
296
|
+
* If the user's locale is not allowed, English is used.
|
|
297
|
+
*/
|
|
298
|
+
allowedLocales?: Array<"en" | "ko">;
|
|
299
|
+
walletPolicy?: {
|
|
300
|
+
requireVolrWalletOnLogin?: boolean;
|
|
294
301
|
};
|
|
295
302
|
/**
|
|
296
303
|
* Deposit/Topup configuration for multi-chain, multi-token support
|
|
@@ -966,6 +973,7 @@ interface PaymentToken {
|
|
|
966
973
|
decimals: number;
|
|
967
974
|
address: string;
|
|
968
975
|
iconUrl?: string | null;
|
|
976
|
+
permitSupported?: boolean;
|
|
969
977
|
}
|
|
970
978
|
interface PaymentResult {
|
|
971
979
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -10736,7 +10736,7 @@ function VolrProvider({ config, children }) {
|
|
|
10736
10736
|
const client = useMemo(() => {
|
|
10737
10737
|
if (!config.projectApiKey) {
|
|
10738
10738
|
throw new Error(
|
|
10739
|
-
"VolrProvider requires config.projectApiKey. Please
|
|
10739
|
+
"VolrProvider requires config.projectApiKey. Please provide projectApiKey in config."
|
|
10740
10740
|
);
|
|
10741
10741
|
}
|
|
10742
10742
|
return new APIClient({
|
|
@@ -19910,7 +19910,9 @@ Issued At: ${issuedAt}`;
|
|
|
19910
19910
|
if (apiBaseUrl.includes("dev-api") || apiBaseUrl.includes("localhost")) {
|
|
19911
19911
|
params.set("env", "dev");
|
|
19912
19912
|
}
|
|
19913
|
-
const
|
|
19913
|
+
const detectedLang = typeof navigator !== "undefined" ? navigator.language?.toLowerCase().startsWith("ko") ? "ko" : "en" : "en";
|
|
19914
|
+
const allowedLocales = config.allowedLocales;
|
|
19915
|
+
const lang = allowedLocales && !allowedLocales.includes(detectedLang) ? "en" : detectedLang;
|
|
19914
19916
|
params.set("lang", lang);
|
|
19915
19917
|
return `https://sign.volr.io?${params.toString()}`;
|
|
19916
19918
|
},
|