@daimo/pay 1.7.3 → 1.7.4

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/build/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React$1, { ReactNode } from 'react';
1
+ import React$1, { ReactNode, ReactElement } from 'react';
2
2
  export { version } from '../package.json';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { CreateConfigParameters } from '@wagmi/core';
@@ -150,11 +150,6 @@ type DaimoPayEvent = {
150
150
  * chain for payment_completed/payment_bounced.
151
151
  */
152
152
  chainId: number;
153
- /**
154
- * The transaction hash for this event. Hex for all EVM events, Base58 for
155
- * payment_started on Solana.
156
- */
157
- txHash: Hex | string;
158
153
  /**
159
154
  * Payment details.
160
155
  */
@@ -162,12 +157,22 @@ type DaimoPayEvent = {
162
157
  };
163
158
  type DaimoPayStartedEvent = DaimoPayEvent & {
164
159
  type: "payment_started";
160
+ /**
161
+ * The transaction hash sent by the user, if found. (There are rare edge cases
162
+ * where a payment can be paid without a txhash.) Hex for all EVM events,
163
+ * Base58 for payment_started on Solana.
164
+ */
165
+ txHash: Hex | string | null;
165
166
  };
166
167
  type DaimoPayCompletedEvent = DaimoPayEvent & {
167
168
  type: "payment_completed";
169
+ /** The transaction hash completing this payment. */
170
+ txHash: Hex;
168
171
  };
169
172
  type DaimoPayBouncedEvent = DaimoPayEvent & {
170
173
  type: "payment_bounced";
174
+ /** The transaction hash containing the reverted final call and refund. */
175
+ txHash: Hex;
171
176
  };
172
177
  /** Props for DaimoPayButton. */
173
178
  type PayButtonPaymentProps = {
@@ -271,18 +276,18 @@ type DaimoPayButtonCustomProps = PayButtonCommonProps & {
271
276
  children: (renderProps: {
272
277
  show: () => void;
273
278
  hide: () => void;
274
- }) => React$1.ReactNode;
279
+ }) => ReactElement;
275
280
  };
276
281
  /**
277
282
  * A button that shows the Daimo Pay checkout. Replaces the traditional
278
283
  * Connect Wallet » approve » execute sequence with a single action.
279
284
  */
280
- declare function DaimoPayButton(props: DaimoPayButtonProps): react_jsx_runtime.JSX.Element;
285
+ declare function DaimoPayButton(props: DaimoPayButtonProps): JSX.Element;
281
286
  declare namespace DaimoPayButton {
282
287
  var Custom: typeof DaimoPayButtonCustom;
283
288
  }
284
289
  /** Like DaimoPayButton, but with custom styling. */
285
- declare function DaimoPayButtonCustom(props: DaimoPayButtonCustomProps): React$1.ReactNode;
290
+ declare function DaimoPayButtonCustom(props: DaimoPayButtonCustomProps): JSX.Element;
286
291
  declare namespace DaimoPayButtonCustom {
287
292
  var displayName: string;
288
293
  }
@@ -298,9 +303,10 @@ declare namespace DaimoPayButtonCustom {
298
303
  * to the payment's configured refund address on the destination chain.
299
304
  */
300
305
  declare function useDaimoPayStatus(): {
301
- paymentId: string;
302
- status: DaimoPayIntentStatus;
303
- } | undefined;
306
+ paymentId?: string;
307
+ status?: DaimoPayIntentStatus;
308
+ reset: () => void;
309
+ };
304
310
 
305
311
  /** Icon for an EVM chain, given chain ID. No ID shows a loading spinner. */
306
312
  declare const Chain: React$1.FC<{
@@ -470,12 +476,14 @@ interface PaymentState {
470
476
  setPayParams: (payParams: PayParams | undefined) => void;
471
477
  payParams: PayParams | undefined;
472
478
  generatePreviewOrder: (payParams: PayParams) => void;
479
+ resetOrder: () => void;
473
480
  daimoPayOrder: DaimoPayOrder | undefined;
474
481
  isDepositFlow: boolean;
475
482
  modalOptions: DaimoPayModalOptions;
476
483
  setModalOptions: (modalOptions: DaimoPayModalOptions) => void;
477
484
  paymentWaitingMessage: string | undefined;
478
485
  externalPaymentOptions: ReturnType<typeof useExternalPaymentOptions>;
486
+ showSolanaPaymentMethod: boolean;
479
487
  walletPaymentOptions: ReturnType<typeof useWalletPaymentOptions>;
480
488
  solanaPaymentOptions: ReturnType<typeof useSolanaPaymentOptions>;
481
489
  depositAddressOptions: ReturnType<typeof useDepositAddressOptions>;
@@ -556,4 +564,4 @@ type PayContextValue = {
556
564
  } & useConnectCallbackProps;
557
565
 
558
566
  export { Avatar, Chain as ChainIcon, DaimoPayButton, PayContext as DaimoPayContext, DaimoPayProvider, types as Types, daimoPayVersion, defaultConfig as getDefaultConfig, useDaimoPayStatus, usePayContext, wallets };
559
- export type { DaimoPayBouncedEvent, DaimoPayButtonCustomProps, DaimoPayButtonProps, DaimoPayCompletedEvent, DaimoPayEvent, DaimoPayStartedEvent, DaimoPayment };
567
+ export type { All, CustomAvatarProps, CustomTheme, DaimoPayBouncedEvent, DaimoPayButtonCustomProps, DaimoPayButtonProps, DaimoPayCompletedEvent, DaimoPayContextOptions, DaimoPayEvent, DaimoPayModalOptions, DaimoPayStartedEvent, DaimoPayment, Languages, Mode, PaymentOption, Theme };