@volr/react-ui 0.1.91 → 0.1.93

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.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import React$1 from 'react';
2
- import { KeyStorageType, VolrConfig } from '@volr/react';
2
+ import { KeyStorageType, VolrConfig, PaymentResult, PayOptions } from '@volr/react';
3
3
  export { EvmClient, KeyStorageType, SendBatchOverloads, SignerType, VolrClient, VolrConfig, VolrProvider, VolrUser, useDepositListener, usePasskeyEnrollment, useVolr, useVolrLogin } from '@volr/react';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
 
@@ -236,19 +236,34 @@ interface I18nProviderProps {
236
236
  declare function I18nProvider({ children }: I18nProviderProps): react_jsx_runtime.JSX.Element;
237
237
  declare const useTranslation: typeof useI18n;
238
238
 
239
- type ModalMode = "account" | "deposit";
239
+ type ModalMode = "account" | "deposit" | "payment";
240
240
  interface ModalAsset {
241
241
  chainId: number;
242
242
  symbol: string;
243
243
  }
244
+ interface PaymentModalOptions {
245
+ payment: PaymentResult;
246
+ options: PayOptions;
247
+ onComplete?: (result: PaymentResult) => void;
248
+ onProcessing?: (payment: PaymentResult & {
249
+ txHash: string;
250
+ }) => void;
251
+ onError?: (error: {
252
+ code: string;
253
+ message: string;
254
+ }) => void;
255
+ onCancel?: () => void;
256
+ }
244
257
  interface OpenModalOptions {
245
258
  mode?: ModalMode;
246
259
  asset?: ModalAsset;
260
+ payment?: PaymentModalOptions;
247
261
  }
248
262
  interface VolrModalContextValue {
249
263
  isOpen: boolean;
250
264
  mode: ModalMode;
251
265
  asset: ModalAsset | null;
266
+ paymentOptions: PaymentModalOptions | null;
252
267
  open: (options?: OpenModalOptions) => void;
253
268
  close: () => void;
254
269
  }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import React$1 from 'react';
2
- import { KeyStorageType, VolrConfig } from '@volr/react';
2
+ import { KeyStorageType, VolrConfig, PaymentResult, PayOptions } from '@volr/react';
3
3
  export { EvmClient, KeyStorageType, SendBatchOverloads, SignerType, VolrClient, VolrConfig, VolrProvider, VolrUser, useDepositListener, usePasskeyEnrollment, useVolr, useVolrLogin } from '@volr/react';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
 
@@ -236,19 +236,34 @@ interface I18nProviderProps {
236
236
  declare function I18nProvider({ children }: I18nProviderProps): react_jsx_runtime.JSX.Element;
237
237
  declare const useTranslation: typeof useI18n;
238
238
 
239
- type ModalMode = "account" | "deposit";
239
+ type ModalMode = "account" | "deposit" | "payment";
240
240
  interface ModalAsset {
241
241
  chainId: number;
242
242
  symbol: string;
243
243
  }
244
+ interface PaymentModalOptions {
245
+ payment: PaymentResult;
246
+ options: PayOptions;
247
+ onComplete?: (result: PaymentResult) => void;
248
+ onProcessing?: (payment: PaymentResult & {
249
+ txHash: string;
250
+ }) => void;
251
+ onError?: (error: {
252
+ code: string;
253
+ message: string;
254
+ }) => void;
255
+ onCancel?: () => void;
256
+ }
244
257
  interface OpenModalOptions {
245
258
  mode?: ModalMode;
246
259
  asset?: ModalAsset;
260
+ payment?: PaymentModalOptions;
247
261
  }
248
262
  interface VolrModalContextValue {
249
263
  isOpen: boolean;
250
264
  mode: ModalMode;
251
265
  asset: ModalAsset | null;
266
+ paymentOptions: PaymentModalOptions | null;
252
267
  open: (options?: OpenModalOptions) => void;
253
268
  close: () => void;
254
269
  }