@daimo/pay 1.6.3 → 1.6.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/build/index.d.ts +41 -40
- package/build/index.js +4623 -4543
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.d.ts
CHANGED
|
@@ -6,9 +6,9 @@ import { CreateConnectorFn } from 'wagmi';
|
|
|
6
6
|
import { CoinbaseWalletParameters } from 'wagmi/connectors';
|
|
7
7
|
import { DaimoPayOrderView, DaimoPayUserMetadata, DaimoPayIntentStatus, DaimoPayOrderMode, DepositAddressPaymentOptionMetadata, PlatformType, ExternalPaymentOptionMetadata, WalletPaymentOption, DaimoPayOrder, ExternalPaymentOptions, DepositAddressPaymentOptions, DepositAddressPaymentOptionData, SolanaPublicKey } from '@daimo/pay-common';
|
|
8
8
|
import { Hex, Address } from 'viem';
|
|
9
|
+
import { WalletName } from '@solana/wallet-adapter-base';
|
|
9
10
|
import { AppRouter } from '@daimo/pay-api';
|
|
10
11
|
import { CreateTRPCClient } from '@trpc/client';
|
|
11
|
-
import { WalletName } from '@solana/wallet-adapter-base';
|
|
12
12
|
|
|
13
13
|
type Hash = `0x${string}`;
|
|
14
14
|
type CustomAvatarProps = {
|
|
@@ -309,6 +309,8 @@ declare const wallets: {
|
|
|
309
309
|
|
|
310
310
|
declare const daimoPayVersion: string;
|
|
311
311
|
|
|
312
|
+
type SolanaWalletName = WalletName<string>;
|
|
313
|
+
|
|
312
314
|
declare enum ROUTES {
|
|
313
315
|
SELECT_METHOD = "daimoPaySelectMethod",
|
|
314
316
|
SELECT_TOKEN = "daimoPaySelectToken",
|
|
@@ -334,6 +336,37 @@ declare enum ROUTES {
|
|
|
334
336
|
SWITCHNETWORKS = "switchNetworks"
|
|
335
337
|
}
|
|
336
338
|
|
|
339
|
+
/**
|
|
340
|
+
* EIP-6963: Multi Injected Provider Discovery
|
|
341
|
+
* https://eips.ethereum.org/EIPS/eip-6963
|
|
342
|
+
*
|
|
343
|
+
*/
|
|
344
|
+
type WalletConfigProps = {
|
|
345
|
+
name?: string;
|
|
346
|
+
shortName?: string;
|
|
347
|
+
icon?: string | React.ReactNode;
|
|
348
|
+
iconConnector?: React.ReactNode;
|
|
349
|
+
iconShape?: "squircle" | "circle" | "square";
|
|
350
|
+
iconShouldShrink?: boolean;
|
|
351
|
+
downloadUrls?: {
|
|
352
|
+
download?: string;
|
|
353
|
+
website?: string;
|
|
354
|
+
desktop?: string;
|
|
355
|
+
android?: string;
|
|
356
|
+
ios?: string;
|
|
357
|
+
chrome?: string;
|
|
358
|
+
firefox?: string;
|
|
359
|
+
brave?: string;
|
|
360
|
+
edge?: string;
|
|
361
|
+
safari?: string;
|
|
362
|
+
};
|
|
363
|
+
getWalletConnectDeeplink?: (uri: string) => string;
|
|
364
|
+
walletDeepLink?: string;
|
|
365
|
+
shouldDeeplinkDesktop?: boolean;
|
|
366
|
+
showInMobileConnectors?: boolean;
|
|
367
|
+
isWcMobileConnector?: boolean;
|
|
368
|
+
};
|
|
369
|
+
|
|
337
370
|
type TrpcClient = CreateTRPCClient<AppRouter>;
|
|
338
371
|
|
|
339
372
|
declare function useDepositAddressOptions({ trpc, usdRequired, mode, }: {
|
|
@@ -459,40 +492,11 @@ interface PaymentState {
|
|
|
459
492
|
senderEnsName: string | undefined;
|
|
460
493
|
}
|
|
461
494
|
|
|
462
|
-
/**
|
|
463
|
-
* EIP-6963: Multi Injected Provider Discovery
|
|
464
|
-
* https://eips.ethereum.org/EIPS/eip-6963
|
|
465
|
-
*
|
|
466
|
-
*/
|
|
467
|
-
type WalletConfigProps = {
|
|
468
|
-
name?: string;
|
|
469
|
-
shortName?: string;
|
|
470
|
-
icon?: string | React.ReactNode;
|
|
471
|
-
iconConnector?: React.ReactNode;
|
|
472
|
-
iconShape?: "squircle" | "circle" | "square";
|
|
473
|
-
iconShouldShrink?: boolean;
|
|
474
|
-
downloadUrls?: {
|
|
475
|
-
download?: string;
|
|
476
|
-
website?: string;
|
|
477
|
-
desktop?: string;
|
|
478
|
-
android?: string;
|
|
479
|
-
ios?: string;
|
|
480
|
-
chrome?: string;
|
|
481
|
-
firefox?: string;
|
|
482
|
-
brave?: string;
|
|
483
|
-
edge?: string;
|
|
484
|
-
safari?: string;
|
|
485
|
-
};
|
|
486
|
-
getWalletConnectDeeplink?: (uri: string) => string;
|
|
487
|
-
shouldDeeplinkDesktop?: boolean;
|
|
488
|
-
};
|
|
489
|
-
|
|
490
|
-
type SolanaWalletName = WalletName<string>;
|
|
491
|
-
|
|
492
495
|
/** Daimo Pay internal context. */
|
|
493
496
|
declare const usePayContext: () => PayContextValue;
|
|
494
497
|
/** Meant for internal use. This will be non-exported in a future SDK version. */
|
|
495
498
|
declare const PayContext: React$1.Context<PayContextValue | null>;
|
|
499
|
+
type PayLogFn = (message: string, ...props: any[]) => void;
|
|
496
500
|
/** Daimo Pay internal context. */
|
|
497
501
|
type PayContextValue = {
|
|
498
502
|
theme: Theme;
|
|
@@ -507,18 +511,19 @@ type PayContextValue = {
|
|
|
507
511
|
setOpen: (open: boolean, meta?: Record<string, any>) => void;
|
|
508
512
|
route: string;
|
|
509
513
|
setRoute: (route: ROUTES, data?: Record<string, any>) => void;
|
|
510
|
-
connector: Connector;
|
|
511
|
-
setConnector: React$1.Dispatch<React$1.SetStateAction<Connector>>;
|
|
512
|
-
wcWallet: WalletConfigProps | undefined;
|
|
513
|
-
setWcWallet: React$1.Dispatch<React$1.SetStateAction<WalletConfigProps | undefined>>;
|
|
514
514
|
errorMessage: string | React$1.ReactNode | null;
|
|
515
515
|
debugMode?: boolean;
|
|
516
|
-
log:
|
|
516
|
+
log: PayLogFn;
|
|
517
517
|
displayError: (message: string | React$1.ReactNode | null, code?: any) => void;
|
|
518
518
|
resize: number;
|
|
519
519
|
triggerResize: () => void;
|
|
520
520
|
/** Session ID. */
|
|
521
521
|
sessionId: string;
|
|
522
|
+
/** EVM mobile connector */
|
|
523
|
+
wcWallet: WalletConfigProps | undefined;
|
|
524
|
+
/** EVM pending connector */
|
|
525
|
+
pendingConnectorId: string | undefined;
|
|
526
|
+
setPendingConnectorId: (id: string) => void;
|
|
522
527
|
/** Chosen Solana wallet, eg Phantom.*/
|
|
523
528
|
solanaConnector: SolanaWalletName | undefined;
|
|
524
529
|
setSolanaConnector: React$1.Dispatch<React$1.SetStateAction<SolanaWalletName | undefined>>;
|
|
@@ -537,10 +542,6 @@ type PayContextValue = {
|
|
|
537
542
|
redirectReturnUrl?: string;
|
|
538
543
|
setRedirectReturnUrl: React$1.Dispatch<React$1.SetStateAction<string | undefined>>;
|
|
539
544
|
} & useConnectCallbackProps;
|
|
540
|
-
/** Chosen Ethereum wallet, eg MM or Rainbow. Specifies wallet ID. */
|
|
541
|
-
type Connector = {
|
|
542
|
-
id: string;
|
|
543
|
-
};
|
|
544
545
|
|
|
545
546
|
export { Avatar, Chain as ChainIcon, DaimoPayButton, PayContext as DaimoPayContext, DaimoPayProvider, types as Types, daimoPayVersion, defaultConfig as getDefaultConfig, useDaimoPayStatus, usePayContext, wallets };
|
|
546
547
|
export type { DaimoPayBouncedEvent, DaimoPayButtonCustomProps, DaimoPayButtonProps, DaimoPayCompletedEvent, DaimoPayEvent, DaimoPayStartedEvent, DaimoPayment };
|