@daimo/pay 1.6.4 → 1.7.0
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 -43
- package/build/index.js +4770 -4641
- 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,43 +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
|
-
walletDeepLink?: string;
|
|
488
|
-
shouldDeeplinkDesktop?: boolean;
|
|
489
|
-
showInMobileConnectors?: boolean;
|
|
490
|
-
isWcMobileConnector?: boolean;
|
|
491
|
-
};
|
|
492
|
-
|
|
493
|
-
type SolanaWalletName = WalletName<string>;
|
|
494
|
-
|
|
495
495
|
/** Daimo Pay internal context. */
|
|
496
496
|
declare const usePayContext: () => PayContextValue;
|
|
497
497
|
/** Meant for internal use. This will be non-exported in a future SDK version. */
|
|
498
498
|
declare const PayContext: React$1.Context<PayContextValue | null>;
|
|
499
|
+
type PayLogFn = (message: string, ...props: any[]) => void;
|
|
499
500
|
/** Daimo Pay internal context. */
|
|
500
501
|
type PayContextValue = {
|
|
501
502
|
theme: Theme;
|
|
@@ -510,18 +511,19 @@ type PayContextValue = {
|
|
|
510
511
|
setOpen: (open: boolean, meta?: Record<string, any>) => void;
|
|
511
512
|
route: string;
|
|
512
513
|
setRoute: (route: ROUTES, data?: Record<string, any>) => void;
|
|
513
|
-
connector: Connector;
|
|
514
|
-
setConnector: React$1.Dispatch<React$1.SetStateAction<Connector>>;
|
|
515
|
-
wcWallet: WalletConfigProps | undefined;
|
|
516
|
-
setWcWallet: React$1.Dispatch<React$1.SetStateAction<WalletConfigProps | undefined>>;
|
|
517
514
|
errorMessage: string | React$1.ReactNode | null;
|
|
518
515
|
debugMode?: boolean;
|
|
519
|
-
log:
|
|
516
|
+
log: PayLogFn;
|
|
520
517
|
displayError: (message: string | React$1.ReactNode | null, code?: any) => void;
|
|
521
518
|
resize: number;
|
|
522
519
|
triggerResize: () => void;
|
|
523
520
|
/** Session ID. */
|
|
524
521
|
sessionId: string;
|
|
522
|
+
/** EVM mobile connector */
|
|
523
|
+
wcWallet: WalletConfigProps | undefined;
|
|
524
|
+
/** EVM pending connector */
|
|
525
|
+
pendingConnectorId: string | undefined;
|
|
526
|
+
setPendingConnectorId: (id: string) => void;
|
|
525
527
|
/** Chosen Solana wallet, eg Phantom.*/
|
|
526
528
|
solanaConnector: SolanaWalletName | undefined;
|
|
527
529
|
setSolanaConnector: React$1.Dispatch<React$1.SetStateAction<SolanaWalletName | undefined>>;
|
|
@@ -540,10 +542,6 @@ type PayContextValue = {
|
|
|
540
542
|
redirectReturnUrl?: string;
|
|
541
543
|
setRedirectReturnUrl: React$1.Dispatch<React$1.SetStateAction<string | undefined>>;
|
|
542
544
|
} & useConnectCallbackProps;
|
|
543
|
-
/** Chosen Ethereum wallet, eg MM or Rainbow. Specifies wallet ID. */
|
|
544
|
-
type Connector = {
|
|
545
|
-
id: string;
|
|
546
|
-
};
|
|
547
545
|
|
|
548
546
|
export { Avatar, Chain as ChainIcon, DaimoPayButton, PayContext as DaimoPayContext, DaimoPayProvider, types as Types, daimoPayVersion, defaultConfig as getDefaultConfig, useDaimoPayStatus, usePayContext, wallets };
|
|
549
547
|
export type { DaimoPayBouncedEvent, DaimoPayButtonCustomProps, DaimoPayButtonProps, DaimoPayCompletedEvent, DaimoPayEvent, DaimoPayStartedEvent, DaimoPayment };
|