@funkit/connect 12.11.1 → 12.12.1

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/dist/clients/{chunk-ATNOIBW2.js → chunk-GPI6LBBB.js} +1 -1
  3. package/dist/clients/{chunk-4OOCXIMA.js → chunk-JDQK4VQB.js} +5 -5
  4. package/dist/clients/{chunk-7GPRX32F.js → chunk-JN52EBYV.js} +64 -0
  5. package/dist/clients/{chunk-A2WBB3UO.js → chunk-RBMOSICG.js} +1 -1
  6. package/dist/clients/{chunk-B5KCBBSV.js → chunk-WXHSEFYH.js} +1 -1
  7. package/dist/clients/fanatics.js +2 -2
  8. package/dist/clients/internal/nado/withdrawalCallback.js +3 -3
  9. package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
  10. package/dist/clients/internal/nado/withdrawalForm.css +30 -30
  11. package/dist/clients/internal/nado/withdrawalForm.js +3 -3
  12. package/dist/clients/internal/nado/withdrawalStatus.js +3 -3
  13. package/dist/clients/lighter.js +3 -3
  14. package/dist/clients/mallard.js +2 -2
  15. package/dist/clients/nado.js +3 -3
  16. package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +7 -5
  17. package/dist/components/ErrorBoundary/ErrorFallback.d.ts +9 -1
  18. package/dist/index.css +79 -79
  19. package/dist/index.d.ts +2 -1
  20. package/dist/index.js +35717 -35456
  21. package/dist/modals/CheckoutModal/isSourceChangeLike.d.ts +3 -0
  22. package/dist/modals/ProfileDetails/FunProfileViews/Home/index.d.ts +3 -0
  23. package/dist/providers/FunkitQuoteContext.d.ts +2 -1
  24. package/dist/shadow-css.js +1 -1
  25. package/dist/utils/checkout.d.ts +1 -1
  26. package/dist/utils/externalDomMutation.d.ts +6 -0
  27. package/dist/utils/solanaRelayWallet.d.ts +3 -5
  28. package/dist/wallets/Wallet.d.ts +10 -0
  29. package/dist/wallets/hypercoreWithdrawal.d.ts +8 -0
  30. package/dist/wallets/walletConnectors/index.js +40 -40
  31. package/package.json +6 -6
@@ -6,7 +6,7 @@ import { type Address } from 'viem';
6
6
  import type { ServerCheckoutConfig } from '../domains/clientMetadata';
7
7
  import type { FunkitCheckoutQuoteResult } from '../domains/quote';
8
8
  import type { Config, UseConfigReturnType } from '../wagmi/hooks';
9
- import { type FunkitCheckoutActionParams, type FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
9
+ import { type FunkitCheckoutActionParams, type FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext/types';
10
10
  export declare const MOONPAY_TIME_ESTIMATE_MS = 120000;
11
11
  export declare const BROKERAGE_TIME_ESTIMATE_MS = 0;
12
12
  export declare const BANK_TIME_ESTIMATE_MS = 0;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * True for crashes caused by code outside the SDK rewriting our DOM.
3
+ * - These are logged at WARN so the error_boundary monitor tracks our bugs only
4
+ * - An extension counts only when it threw, not when it merely appears in the stack
5
+ */
6
+ export declare function isExternalDomMutation(error: Error): boolean;
@@ -2,18 +2,16 @@ import type { SolanaSigner, SolanaWallet } from '@funkit/fun-relay';
2
2
  import type { SolanaAddress } from '@funkit/api-base';
3
3
  import type { SolanaWalletSigner } from '../interfaces/solanaWallet';
4
4
  import type { ValidatedSolanaWallet } from '../providers/SolanaWalletProvider';
5
- import { type WithdrawalClient } from '../wallets/Wallet';
6
5
  export declare function resolveSigner(wallet: SolanaWalletSigner): SolanaSigner;
7
6
  export declare function createSolanaRelayWallet(wallet: SolanaWalletSigner & {
8
7
  address: SolanaAddress;
9
8
  }): SolanaWallet;
10
9
  /**
11
- * The relay wallet for a Solana source, or undefined for an EVM one. A
12
- * withdrawal config's own wallet wins over the provider's.
10
+ * The provider's relay wallet for a Solana-source deposit, or undefined for any
11
+ * other source. A withdrawal client brings its own wallet and never reaches this.
13
12
  */
14
- export declare function resolveSolanaRelayWallet({ sourceChainId, solanaWallet, withdrawalClient, logPrefix, }: {
13
+ export declare function resolveSolanaRelayWallet({ sourceChainId, solanaWallet, logPrefix, }: {
15
14
  sourceChainId: string;
16
15
  solanaWallet: ValidatedSolanaWallet | undefined;
17
- withdrawalClient?: WithdrawalClient;
18
16
  logPrefix: string;
19
17
  }): SolanaWallet | undefined;
@@ -1,5 +1,6 @@
1
1
  import type { WalletConnectParameters } from '../wagmi/connectors';
2
2
  import type { Connector, CreateConnectorFn } from '../wagmi/hooks';
3
+ import type { RelayVmType, RelayWallet } from '@funkit/fun-relay';
3
4
  import type { TransactionReceipt, TypedDataDomain } from 'viem';
4
5
  import type { CoinbaseWalletOptions } from './walletConnectors/coinbaseWallet/coinbaseWallet';
5
6
  import type { WalletConnectWalletOptions } from './walletConnectors/walletConnectWallet/walletConnectWallet';
@@ -116,7 +117,11 @@ export type WithdrawalTypedData = {
116
117
  primaryType: string;
117
118
  message: Record<string, unknown>;
118
119
  };
120
+ /** EVM is excluded: those sources still need the chain switch and allowance
121
+ * reset that direct execution skips for a pre-built wallet. */
122
+ export type NonEvmRelayWallet = RelayWallet<Exclude<RelayVmType, 'evm'>>;
119
123
  export interface WithdrawalClient {
124
+ adaptedWallet?: NonEvmRelayWallet;
120
125
  getChainId: () => Promise<number>;
121
126
  switchChain: (chainId: number) => Promise<void>;
122
127
  sendTransaction: (chainId: number, transaction: WithdrawalTransaction) => Promise<string>;
@@ -154,4 +159,9 @@ export interface LighterWithdrawalClient extends WithdrawalClient {
154
159
  readonly _type: 'lighter';
155
160
  readonly adaptedWallet: import('@funkit/fun-relay').LighterWallet;
156
161
  }
162
+ export interface HypercoreWithdrawalClient extends WithdrawalClient {
163
+ readonly _type: 'hypercore';
164
+ readonly adaptedWallet: import('@funkit/fun-relay').HypercoreWallet;
165
+ }
166
+ export declare function isHypercoreWithdrawalClient(client: WithdrawalClient): client is HypercoreWithdrawalClient;
157
167
  export declare function isLighterWithdrawalClient(client: WithdrawalClient): client is LighterWithdrawalClient;
@@ -0,0 +1,8 @@
1
+ import { type HypercoreSigner } from '@funkit/connect-core/clients/hypercore';
2
+ import type { WalletWithdrawalConfig, WithdrawalConfigBase } from '../providers/FunkitCheckoutContext/types';
3
+ export interface HypercoreWithdrawalOptions extends Omit<WithdrawalConfigBase, 'sourceChainId'> {
4
+ signer: HypercoreSigner;
5
+ }
6
+ /** `null` for a null `options` or a non-EVM signer address. `options` is compared by identity. */
7
+ export declare function useHypercoreWithdrawalConfig(options: HypercoreWithdrawalOptions | null): WalletWithdrawalConfig | null;
8
+ export type { HypercoreSigner } from '@funkit/connect-core/clients/hypercore';
@@ -1,34 +1,34 @@
1
1
  "use client";
2
- import {
3
- zealWallet
4
- } from "./chunk-GLX5FULK.js";
5
2
  import {
6
3
  xdefiWallet
7
4
  } from "./chunk-HXX4PRE2.js";
5
+ import {
6
+ zealWallet
7
+ } from "./chunk-GLX5FULK.js";
8
8
  import {
9
9
  zerionWallet
10
10
  } from "./chunk-34B7OJNT.js";
11
11
  import {
12
12
  subWallet
13
13
  } from "./chunk-XODA5ESL.js";
14
- import {
15
- talismanWallet
16
- } from "./chunk-IAYYWCVB.js";
17
14
  import {
18
15
  tahoWallet
19
16
  } from "./chunk-U74RFZOL.js";
17
+ import {
18
+ talismanWallet
19
+ } from "./chunk-IAYYWCVB.js";
20
20
  import {
21
21
  tokenPocketWallet
22
22
  } from "./chunk-NXWG6FG2.js";
23
+ import {
24
+ tokenaryWallet
25
+ } from "./chunk-TPM5PUJD.js";
23
26
  import {
24
27
  trustWallet
25
28
  } from "./chunk-SR5CZR3L.js";
26
29
  import {
27
30
  uniswapWallet
28
31
  } from "./chunk-UNDWHCDH.js";
29
- import {
30
- tokenaryWallet
31
- } from "./chunk-TPM5PUJD.js";
32
32
  import {
33
33
  walletConnectWallet
34
34
  } from "./chunk-DUX4XCDV.js";
@@ -57,38 +57,35 @@ import {
57
57
  safepalWallet
58
58
  } from "./chunk-BBB2J3US.js";
59
59
  import {
60
- injectedWallet
61
- } from "./chunk-M75V7OL3.js";
62
- import {
63
- mewWallet
64
- } from "./chunk-DSPQXAB2.js";
60
+ kresusWallet
61
+ } from "./chunk-V77ATGZT.js";
65
62
  import {
66
63
  metaMaskWallet
67
64
  } from "./chunk-RXRYHMRI.js";
65
+ import {
66
+ mewWallet
67
+ } from "./chunk-DSPQXAB2.js";
68
68
  import {
69
69
  oktoWallet
70
70
  } from "./chunk-V4M3SNPS.js";
71
+ import {
72
+ okxWallet
73
+ } from "./chunk-CU5J53XR.js";
71
74
  import {
72
75
  omniWallet
73
76
  } from "./chunk-2TAUCVX7.js";
74
77
  import {
75
78
  oneInchWallet
76
79
  } from "./chunk-GFS2AVAH.js";
77
- import {
78
- okxWallet
79
- } from "./chunk-CU5J53XR.js";
80
80
  import {
81
81
  oneKeyWallet
82
82
  } from "./chunk-KN32ITJ7.js";
83
83
  import {
84
- enkryptWallet
85
- } from "./chunk-Z6LDN2AN.js";
84
+ foxWallet
85
+ } from "./chunk-U52QO5HF.js";
86
86
  import {
87
87
  frameWallet
88
88
  } from "./chunk-B572YIAQ.js";
89
- import {
90
- foxWallet
91
- } from "./chunk-U52QO5HF.js";
92
89
  import {
93
90
  frontierWallet
94
91
  } from "./chunk-IWOMSW64.js";
@@ -99,50 +96,53 @@ import {
99
96
  imTokenWallet
100
97
  } from "./chunk-YY2JA23M.js";
101
98
  import {
102
- kresusWallet
103
- } from "./chunk-V77ATGZT.js";
99
+ desigWallet
100
+ } from "./chunk-DFHP75HV.js";
101
+ import {
102
+ injectedWallet
103
+ } from "./chunk-M75V7OL3.js";
104
104
  import {
105
105
  ledgerWallet
106
106
  } from "./chunk-BL4OC2EJ.js";
107
107
  import {
108
108
  bybitWallet
109
109
  } from "./chunk-BBDNB5TQ.js";
110
- import {
111
- coin98Wallet
112
- } from "./chunk-RFCZYLNR.js";
113
- import {
114
- coreWallet
115
- } from "./chunk-TRZDAXCQ.js";
116
110
  import {
117
111
  clvWallet
118
112
  } from "./chunk-4FHNLTR3.js";
113
+ import {
114
+ coin98Wallet
115
+ } from "./chunk-RFCZYLNR.js";
119
116
  import {
120
117
  coinbaseWallet
121
118
  } from "./chunk-SM2A3OSG.js";
122
119
  import {
123
- customWallet
124
- } from "./chunk-VKM5M5UK.js";
120
+ coreWallet
121
+ } from "./chunk-TRZDAXCQ.js";
125
122
  import {
126
123
  dawnWallet
127
124
  } from "./chunk-LV6YV3DE.js";
128
125
  import {
129
- desigWallet
130
- } from "./chunk-DFHP75HV.js";
126
+ customWallet
127
+ } from "./chunk-VKM5M5UK.js";
131
128
  import {
132
- bitgetWallet
133
- } from "./chunk-HOCKAU5H.js";
129
+ enkryptWallet
130
+ } from "./chunk-Z6LDN2AN.js";
131
+ import {
132
+ argentWallet
133
+ } from "./chunk-XSDTNMQY.js";
134
134
  import {
135
135
  bifrostWallet
136
136
  } from "./chunk-ALGPGI6V.js";
137
137
  import {
138
- argentWallet
139
- } from "./chunk-XSDTNMQY.js";
138
+ bloomWallet
139
+ } from "./chunk-PNHDOC77.js";
140
140
  import {
141
141
  bitverseWallet
142
142
  } from "./chunk-5AEWIKRA.js";
143
143
  import {
144
- bloomWallet
145
- } from "./chunk-PNHDOC77.js";
144
+ bitgetWallet
145
+ } from "./chunk-HOCKAU5H.js";
146
146
  import "./chunk-AALSJCUR.js";
147
147
  import {
148
148
  bitskiWallet
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "12.11.1",
3
+ "version": "12.12.1",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -119,11 +119,11 @@
119
119
  "ua-parser-js": "^1.0.37",
120
120
  "use-debounce": "^10.0.5",
121
121
  "uuid": "^11.1.1",
122
- "@funkit/api-base": "8.5.1",
123
- "@funkit/chains": "2.4.1",
124
- "@funkit/connect-core": "8.4.1",
125
- "@funkit/utils": "5.0.1",
126
- "@funkit/fun-relay": "3.1.1"
122
+ "@funkit/fun-relay": "3.1.2",
123
+ "@funkit/connect-core": "8.5.1",
124
+ "@funkit/api-base": "8.5.3",
125
+ "@funkit/utils": "5.0.2",
126
+ "@funkit/chains": "2.4.2"
127
127
  },
128
128
  "repository": {
129
129
  "type": "git",