@kimafinance/kima-transaction-widget 1.5.3 → 1.5.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 +9 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -160,7 +160,7 @@ interface FeeResult<T extends BigintAmount<bigint | string>> {
|
|
|
160
160
|
expiration: string;
|
|
161
161
|
transactionValues: FeeTransactionValues<T>;
|
|
162
162
|
options?: {
|
|
163
|
-
|
|
163
|
+
paymentMethod: '' | 'sepaEur' | 'creditCard' | 'swiftUsd';
|
|
164
164
|
};
|
|
165
165
|
swapInfo?: SwapInfo<T>;
|
|
166
166
|
}
|
|
@@ -184,7 +184,7 @@ interface ServiceFee {
|
|
|
184
184
|
swapFee?: BigintAmount<bigint>;
|
|
185
185
|
swapInfo?: SwapInfo<BigintAmount<bigint>>;
|
|
186
186
|
options?: {
|
|
187
|
-
|
|
187
|
+
paymentMethod: '' | 'sepaEur' | 'creditCard' | 'swiftUsd';
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
190
|
|
|
@@ -295,6 +295,7 @@ interface PluginProviderProps {
|
|
|
295
295
|
networkOption?: NetworkOptions;
|
|
296
296
|
projectId?: string;
|
|
297
297
|
isLoading?: boolean;
|
|
298
|
+
solRPC?: string;
|
|
298
299
|
}
|
|
299
300
|
interface PluginData {
|
|
300
301
|
id: string;
|
|
@@ -329,6 +330,7 @@ declare enum ChainCompatibility {
|
|
|
329
330
|
|
|
330
331
|
interface KimaProviderProps {
|
|
331
332
|
projectId: string;
|
|
333
|
+
solRPC?: string;
|
|
332
334
|
externalProvider?: ExternalProvider;
|
|
333
335
|
kimaBackendUrl: string;
|
|
334
336
|
children: ReactNode;
|
|
@@ -339,7 +341,7 @@ interface KimaProviderProps {
|
|
|
339
341
|
keplrHandler?: (e: any) => void;
|
|
340
342
|
switchChainHandler?: (e: any) => void;
|
|
341
343
|
}
|
|
342
|
-
declare const KimaProvider: ({ projectId, children, externalProvider, kimaBackendUrl, logLevel, keplrHandler, successHandler, closeHandler, errorHandler, switchChainHandler }: KimaProviderProps) => react_jsx_runtime.JSX.Element;
|
|
344
|
+
declare const KimaProvider: ({ projectId, children, externalProvider, kimaBackendUrl, solRPC, logLevel, keplrHandler, successHandler, closeHandler, errorHandler, switchChainHandler }: KimaProviderProps) => react_jsx_runtime.JSX.Element;
|
|
343
345
|
|
|
344
346
|
interface Props {
|
|
345
347
|
theme: ThemeOptions;
|
package/dist/index.d.ts
CHANGED
|
@@ -160,7 +160,7 @@ interface FeeResult<T extends BigintAmount<bigint | string>> {
|
|
|
160
160
|
expiration: string;
|
|
161
161
|
transactionValues: FeeTransactionValues<T>;
|
|
162
162
|
options?: {
|
|
163
|
-
|
|
163
|
+
paymentMethod: '' | 'sepaEur' | 'creditCard' | 'swiftUsd';
|
|
164
164
|
};
|
|
165
165
|
swapInfo?: SwapInfo<T>;
|
|
166
166
|
}
|
|
@@ -184,7 +184,7 @@ interface ServiceFee {
|
|
|
184
184
|
swapFee?: BigintAmount<bigint>;
|
|
185
185
|
swapInfo?: SwapInfo<BigintAmount<bigint>>;
|
|
186
186
|
options?: {
|
|
187
|
-
|
|
187
|
+
paymentMethod: '' | 'sepaEur' | 'creditCard' | 'swiftUsd';
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
190
|
|
|
@@ -295,6 +295,7 @@ interface PluginProviderProps {
|
|
|
295
295
|
networkOption?: NetworkOptions;
|
|
296
296
|
projectId?: string;
|
|
297
297
|
isLoading?: boolean;
|
|
298
|
+
solRPC?: string;
|
|
298
299
|
}
|
|
299
300
|
interface PluginData {
|
|
300
301
|
id: string;
|
|
@@ -329,6 +330,7 @@ declare enum ChainCompatibility {
|
|
|
329
330
|
|
|
330
331
|
interface KimaProviderProps {
|
|
331
332
|
projectId: string;
|
|
333
|
+
solRPC?: string;
|
|
332
334
|
externalProvider?: ExternalProvider;
|
|
333
335
|
kimaBackendUrl: string;
|
|
334
336
|
children: ReactNode;
|
|
@@ -339,7 +341,7 @@ interface KimaProviderProps {
|
|
|
339
341
|
keplrHandler?: (e: any) => void;
|
|
340
342
|
switchChainHandler?: (e: any) => void;
|
|
341
343
|
}
|
|
342
|
-
declare const KimaProvider: ({ projectId, children, externalProvider, kimaBackendUrl, logLevel, keplrHandler, successHandler, closeHandler, errorHandler, switchChainHandler }: KimaProviderProps) => react_jsx_runtime.JSX.Element;
|
|
344
|
+
declare const KimaProvider: ({ projectId, children, externalProvider, kimaBackendUrl, solRPC, logLevel, keplrHandler, successHandler, closeHandler, errorHandler, switchChainHandler }: KimaProviderProps) => react_jsx_runtime.JSX.Element;
|
|
343
345
|
|
|
344
346
|
interface Props {
|
|
345
347
|
theme: ThemeOptions;
|
package/dist/index.js
CHANGED
|
@@ -3104,7 +3104,8 @@ var SolanaWalletProvider = ({
|
|
|
3104
3104
|
children,
|
|
3105
3105
|
networkOption
|
|
3106
3106
|
}) => {
|
|
3107
|
-
const
|
|
3107
|
+
const { solRPC } = useKimaContext();
|
|
3108
|
+
const endpoint = networkOption === "testnet" /* testnet */ ? clusterApiUrl2("testnet") : solRPC ?? "https://go.getblock.us/86aac42ad4484f3c813079afc201451c";
|
|
3108
3109
|
return /* @__PURE__ */ jsx44(ConnectionProvider, { endpoint, children: /* @__PURE__ */ jsx44(
|
|
3109
3110
|
WalletProvider,
|
|
3110
3111
|
{
|
|
@@ -3597,7 +3598,7 @@ import { Connection as Connection2, clusterApiUrl as clusterApiUrl3 } from "@sol
|
|
|
3597
3598
|
import { useWallet } from "@solana/wallet-adapter-react";
|
|
3598
3599
|
var useSolProvider = () => {
|
|
3599
3600
|
const net = useSelector8(selectNetworkOption);
|
|
3600
|
-
const { externalProvider } = useKimaContext();
|
|
3601
|
+
const { externalProvider, solRPC } = useKimaContext();
|
|
3601
3602
|
const wallet = useWallet();
|
|
3602
3603
|
return useMemo9(() => {
|
|
3603
3604
|
if (externalProvider?.type === "solana") {
|
|
@@ -3616,7 +3617,7 @@ var useSolProvider = () => {
|
|
|
3616
3617
|
signMessage: prov.signMessage
|
|
3617
3618
|
};
|
|
3618
3619
|
}
|
|
3619
|
-
const endpoint = net === "testnet" /* testnet */ ? clusterApiUrl3("devnet") :
|
|
3620
|
+
const endpoint = net === "testnet" /* testnet */ ? clusterApiUrl3("devnet") : solRPC ?? "https://go.getblock.us/86aac42ad4484f3c813079afc201451c";
|
|
3620
3621
|
const connection = new Connection2(endpoint, "confirmed");
|
|
3621
3622
|
const pk = wallet.publicKey?.toBase58();
|
|
3622
3623
|
const signTransaction = wallet.signTransaction;
|
|
@@ -5043,7 +5044,7 @@ var useKimaContext = () => {
|
|
|
5043
5044
|
}
|
|
5044
5045
|
return context;
|
|
5045
5046
|
};
|
|
5046
|
-
var InternalKimaProvider = React3.memo(({ kimaBackendUrl, projectId, children }) => {
|
|
5047
|
+
var InternalKimaProvider = React3.memo(({ kimaBackendUrl, solRPC, projectId, children }) => {
|
|
5047
5048
|
const { data: envOptions, isLoading: isLoadingEnv } = useGetEnvOptions({
|
|
5048
5049
|
kimaBackendUrl
|
|
5049
5050
|
});
|
|
@@ -5074,6 +5075,7 @@ var InternalKimaProvider = React3.memo(({ kimaBackendUrl, projectId, children })
|
|
|
5074
5075
|
networkOption,
|
|
5075
5076
|
projectId,
|
|
5076
5077
|
isLoading: isLoadingEnv || !appKitReady,
|
|
5078
|
+
solRPC,
|
|
5077
5079
|
children: acc
|
|
5078
5080
|
},
|
|
5079
5081
|
plugin.data.id
|
|
@@ -5090,6 +5092,7 @@ var KimaProvider = ({
|
|
|
5090
5092
|
children = /* @__PURE__ */ jsx51(Fragment4, {}),
|
|
5091
5093
|
externalProvider,
|
|
5092
5094
|
kimaBackendUrl = "http://localhost:3001",
|
|
5095
|
+
solRPC,
|
|
5093
5096
|
logLevel,
|
|
5094
5097
|
keplrHandler,
|
|
5095
5098
|
successHandler,
|
|
@@ -5118,6 +5121,7 @@ var KimaProvider = ({
|
|
|
5118
5121
|
const kimaContext = {
|
|
5119
5122
|
externalProvider: validExternalProvider,
|
|
5120
5123
|
sourceAddress,
|
|
5124
|
+
solRPC,
|
|
5121
5125
|
kimaBackendUrl,
|
|
5122
5126
|
keplrHandler,
|
|
5123
5127
|
successHandler,
|
|
@@ -5130,6 +5134,7 @@ var KimaProvider = ({
|
|
|
5130
5134
|
{
|
|
5131
5135
|
kimaBackendUrl,
|
|
5132
5136
|
projectId,
|
|
5137
|
+
solRPC,
|
|
5133
5138
|
children
|
|
5134
5139
|
}
|
|
5135
5140
|
) }) }) });
|