@funkit/connect-rn 11.3.1 → 12.0.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.
Files changed (132) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +19 -13
  3. package/dist/{chunk-JM7562IY.js → chunk-BC6N7CI3.js} +169 -33
  4. package/dist/chunk-BC6N7CI3.js.map +7 -0
  5. package/dist/{chunk-7SP2UUHA.js → chunk-UDEGXDMU.js} +6 -1
  6. package/dist/{chunk-7SP2UUHA.js.map → chunk-UDEGXDMU.js.map} +2 -2
  7. package/dist/{chunk-PSO6DYOK.js → chunk-UR3BDCRK.js} +2 -2
  8. package/dist/clients/lighter.js +1 -1
  9. package/dist/clients/nado.js +2 -2
  10. package/dist/clients/solana/index.d.ts +2 -2
  11. package/dist/clients/solana/index.d.ts.map +1 -1
  12. package/dist/clients/solana/solanaWithdrawal.d.ts +0 -6
  13. package/dist/clients/solana/solanaWithdrawal.d.ts.map +1 -1
  14. package/dist/clients/solana/useSolanaWithdrawal.d.ts +11 -6
  15. package/dist/clients/solana/useSolanaWithdrawal.d.ts.map +1 -1
  16. package/dist/clients/solana.js +23 -23
  17. package/dist/clients/solana.js.map +2 -2
  18. package/dist/index.js +3187 -1737
  19. package/dist/index.js.map +4 -4
  20. package/dist/preview.js +70 -1
  21. package/dist/preview.js.map +2 -2
  22. package/dist/src/components/BlurBand.d.ts +5 -1
  23. package/dist/src/components/BlurBand.d.ts.map +1 -1
  24. package/dist/src/components/ConnectedBadge.d.ts +9 -0
  25. package/dist/src/components/ConnectedBadge.d.ts.map +1 -1
  26. package/dist/src/components/GlassToast.d.ts +23 -0
  27. package/dist/src/components/GlassToast.d.ts.map +1 -0
  28. package/dist/src/components/Grabber.d.ts +3 -1
  29. package/dist/src/components/Grabber.d.ts.map +1 -1
  30. package/dist/src/components/PasteAddressPanel.d.ts.map +1 -1
  31. package/dist/src/components/PillButton.d.ts +5 -2
  32. package/dist/src/components/PillButton.d.ts.map +1 -1
  33. package/dist/src/components/v2/IconDisc.d.ts.map +1 -1
  34. package/dist/src/components/v2/ListRow.d.ts.map +1 -1
  35. package/dist/src/components/v2/PaymentMethodPicker.d.ts.map +1 -1
  36. package/dist/src/fiat/form/formLayout.d.ts +1 -1
  37. package/dist/src/fiat/form/formLayout.d.ts.map +1 -1
  38. package/dist/src/fiat/kyc/FiatKycIntroScreen.d.ts +5 -1
  39. package/dist/src/fiat/kyc/FiatKycIntroScreen.d.ts.map +1 -1
  40. package/dist/src/fiat/kyc/sectionDetail.d.ts.map +1 -1
  41. package/dist/src/fiat/processing/CompletionCheck.d.ts +3 -1
  42. package/dist/src/fiat/processing/CompletionCheck.d.ts.map +1 -1
  43. package/dist/src/fiat/providers/checkout/slotOutlets.d.ts.map +1 -1
  44. package/dist/src/fiat/providers/stripe/next/Checkout.d.ts.map +1 -1
  45. package/dist/src/fiat/providers/stripe/next/stripeIdentityChecks.d.ts +12 -0
  46. package/dist/src/fiat/providers/stripe/next/stripeIdentityChecks.d.ts.map +1 -0
  47. package/dist/src/fiat/providers/stripe/next/useStripeAttestation.d.ts +20 -0
  48. package/dist/src/fiat/providers/stripe/next/useStripeAttestation.d.ts.map +1 -0
  49. package/dist/src/fiat/providers/stripe/next/useStripeCheckout.d.ts +19 -0
  50. package/dist/src/fiat/providers/stripe/next/useStripeCheckout.d.ts.map +1 -1
  51. package/dist/src/fiat/providers/stripe/next/useStripeCheckoutCalls.d.ts.map +1 -1
  52. package/dist/src/fiat/providers/stripe/next/useStripeFunnel.d.ts.map +1 -1
  53. package/dist/src/fiat/providers/stripe/next/useStripeIdentifiers.d.ts +30 -0
  54. package/dist/src/fiat/providers/stripe/next/useStripeIdentifiers.d.ts.map +1 -0
  55. package/dist/src/fiat/providers/stripe/next/useStripeIdentity.d.ts +5 -2
  56. package/dist/src/fiat/providers/stripe/next/useStripeIdentity.d.ts.map +1 -1
  57. package/dist/src/fiat/providers/stripe/next/useStripeReview.d.ts +10 -2
  58. package/dist/src/fiat/providers/stripe/next/useStripeReview.d.ts.map +1 -1
  59. package/dist/src/fiat/providers/stripe/next/useStripeSignIn.d.ts +6 -0
  60. package/dist/src/fiat/providers/stripe/next/useStripeSignIn.d.ts.map +1 -1
  61. package/dist/src/fiat/providers/stripe/stripeApplePaySelection.d.ts +5 -0
  62. package/dist/src/fiat/providers/stripe/stripeApplePaySelection.d.ts.map +1 -1
  63. package/dist/src/fiat/providers/stripe/stripeEuCountries.d.ts +8 -0
  64. package/dist/src/fiat/providers/stripe/stripeEuCountries.d.ts.map +1 -0
  65. package/dist/src/fiat/providers/stripe/stripeEuErrors.d.ts +16 -0
  66. package/dist/src/fiat/providers/stripe/stripeEuErrors.d.ts.map +1 -0
  67. package/dist/src/fiat/providers/stripe/stripeIdentifierField.d.ts +23 -0
  68. package/dist/src/fiat/providers/stripe/stripeIdentifierField.d.ts.map +1 -0
  69. package/dist/src/fiat/providers/stripe/stripeKycInfo.d.ts.map +1 -1
  70. package/dist/src/fiat/providers/stripe/stripeOnramp.d.ts +54 -0
  71. package/dist/src/fiat/providers/stripe/stripeOnramp.d.ts.map +1 -1
  72. package/dist/src/fiat/providers/stripe/stripeOnrampBridge.d.ts.map +1 -1
  73. package/dist/src/fiat/providers/stripe/useStripeOnrampClient.d.ts +13 -1
  74. package/dist/src/fiat/providers/stripe/useStripeOnrampClient.d.ts.map +1 -1
  75. package/dist/src/fiat/quote/quoteRouting.d.ts +9 -1
  76. package/dist/src/fiat/quote/quoteRouting.d.ts.map +1 -1
  77. package/dist/src/flow/CryptoLearnMorePage.d.ts.map +1 -1
  78. package/dist/src/flow/CryptoTokenPage.d.ts.map +1 -1
  79. package/dist/src/flow/Drawer.d.ts +13 -2
  80. package/dist/src/flow/Drawer.d.ts.map +1 -1
  81. package/dist/src/flow/FiatDepositAmountStep.d.ts.map +1 -1
  82. package/dist/src/flow/FlowSheet.d.ts +11 -1
  83. package/dist/src/flow/FlowSheet.d.ts.map +1 -1
  84. package/dist/src/flow/FunkitFlowProvider.d.ts +2 -0
  85. package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
  86. package/dist/src/flow/TakeoverPages.d.ts +9 -0
  87. package/dist/src/flow/TakeoverPages.d.ts.map +1 -0
  88. package/dist/src/flow/WalletDepositStep.d.ts.map +1 -1
  89. package/dist/src/flow/checkoutHistory.d.ts +4 -0
  90. package/dist/src/flow/checkoutHistory.d.ts.map +1 -0
  91. package/dist/src/flow/depositFlowConfig.d.ts +2 -0
  92. package/dist/src/flow/depositFlowConfig.d.ts.map +1 -1
  93. package/dist/src/flow/renderFiatFlowScreen.d.ts.map +1 -1
  94. package/dist/src/flow/sheetSizing.d.ts +10 -0
  95. package/dist/src/flow/sheetSizing.d.ts.map +1 -1
  96. package/dist/src/flow/useWalletDeposit.d.ts +8 -4
  97. package/dist/src/flow/useWalletDeposit.d.ts.map +1 -1
  98. package/dist/src/flow/walletFundingCopy.d.ts +27 -0
  99. package/dist/src/flow/walletFundingCopy.d.ts.map +1 -0
  100. package/dist/src/hooks/track/events.d.ts +1 -0
  101. package/dist/src/hooks/track/events.d.ts.map +1 -1
  102. package/dist/src/hooks/track/useDepositFlowEvents.d.ts.map +1 -1
  103. package/dist/src/hooks/track/useWithdrawalFlowEvents.d.ts.map +1 -1
  104. package/dist/src/hooks/usePressScale.d.ts +15 -2
  105. package/dist/src/hooks/usePressScale.d.ts.map +1 -1
  106. package/dist/src/icons/EmptyWalletArtwork.d.ts +10 -0
  107. package/dist/src/icons/EmptyWalletArtwork.d.ts.map +1 -0
  108. package/dist/src/icons/MinusCircleIcon.d.ts +4 -0
  109. package/dist/src/icons/MinusCircleIcon.d.ts.map +1 -0
  110. package/dist/src/icons/QrTileIcon.d.ts +6 -0
  111. package/dist/src/icons/QrTileIcon.d.ts.map +1 -0
  112. package/dist/src/preview/fixtures/kycForms.d.ts +5 -0
  113. package/dist/src/preview/fixtures/kycForms.d.ts.map +1 -1
  114. package/dist/src/preview/replay/recordedStripeOnramp.d.ts.map +1 -1
  115. package/dist/src/preview/scenarioCatalog.d.ts +12 -0
  116. package/dist/src/preview/scenarioCatalog.d.ts.map +1 -1
  117. package/dist/src/preview/scenarios.d.ts.map +1 -1
  118. package/dist/src/screens/PaymentConfirmScreen.d.ts +8 -4
  119. package/dist/src/screens/PaymentConfirmScreen.d.ts.map +1 -1
  120. package/dist/src/theme/buildFunkitTheme.d.ts +10 -0
  121. package/dist/src/theme/buildFunkitTheme.d.ts.map +1 -1
  122. package/dist/src/theme/restyle.d.ts +330 -0
  123. package/dist/src/theme/restyle.d.ts.map +1 -1
  124. package/dist/src/theme/toRestyleTheme.d.ts +30 -0
  125. package/dist/src/theme/toRestyleTheme.d.ts.map +1 -1
  126. package/dist/src/theme/typeScale.d.ts +60 -0
  127. package/dist/src/theme/typeScale.d.ts.map +1 -1
  128. package/package.json +3 -7
  129. package/dist/chunk-JM7562IY.js.map +0 -7
  130. package/dist/src/icons/CryptoTransferQRIcon.d.ts +0 -11
  131. package/dist/src/icons/CryptoTransferQRIcon.d.ts.map +0 -1
  132. /package/dist/{chunk-PSO6DYOK.js.map → chunk-UR3BDCRK.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,62 @@
1
1
  # @funkit/connect-rn
2
2
 
3
+ ## 12.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - ff4bf8e: Solana withdrawals take a `FunkitSolanaAdapter` from `@funkit/solana-kit` or `@funkit/solana-web3`, and `@solana/web3.js` is no longer a peer dependency.
8
+
9
+ Migration: call `useSolanaWithdrawal({ adapter, config })` in place of `useSolanaWithdrawal({ solana: { signer }, config })`, building `adapter` with `createSolanaAdapter({ rpc, signer })` from `@funkit/solana-kit` or `createSolanaAdapter({ address, connection, signTransaction })` from `@funkit/solana-web3`. `SolanaWalletSigner` and `SolanaWithdrawalFlowConfig` are removed from `@funkit/connect-rn/clients/solana`; it exports `FunkitSolanaAdapter` instead.
10
+
11
+ ### Minor Changes
12
+
13
+ - 7309309: An EU buyer accepts Stripe's terms in Stripe's own sheet before the identity check.
14
+ - f27f264: Stripe is configured with the buyer's country, so an EU buyer gets Stripe's EU merchant of record.
15
+ - a3430c0: An EU buyer enters the MiCA and tax identifiers Stripe asks for, one at a time, on the KYC tax ID page.
16
+ - 18661e6: Stripe receives an EU buyer's nationality and birthplace from the identity form.
17
+
18
+ ### Patch Changes
19
+
20
+ - dc60269: The crypto "How it works" page shows the designed QR tile icon.
21
+ - 30e8355: The crypto "How it works" page names Solana, Tron or Bitcoin in its headline and drops "Most used tokens" on those networks.
22
+ - 5e0512b: The crypto currency card opened from the payment method picker keeps its 8pt bottom margin at its opening height.
23
+ - bcdb0ca: Currency search: rows blur under the field and no longer show through the keyboard.
24
+ - bfe9fb3: The wallet connection failure banner is glass, springs in and lifts out after 3 seconds, and reads "Unable to complete deposit.", naming a rejected request as such.
25
+ - 921b7a9: The wallet token sheet is an inset card closed by a drag handle instead of a back button, lists low-balance tokens inline under a muted Low balance badge, and shows "Powered by Fun" under its rows.
26
+ - 2e93e55: Linking a wallet that holds nothing usable, or too little, opens a sheet that explains why and offers Disconnect Wallet; the token selector reads No usable tokens or Low balance.
27
+ - 5473326: The linked wallet's payment review draws its success check at the loading spinner's stroke weight.
28
+ - eeabf96: Wallet link-outs accept an optional `logomarkUrl`, and the linked wallet's payment review shows Phantom's bare logomark beside its name on dark sheets instead of the app icon.
29
+ - eeabf96: The linked wallet's payment review drops the repeated "Requested amount" row and the token amount, shows Change as a smaller chip, adopts the design's spacing and type, and grows on short phones so the Pay button stays on screen.
30
+ - 1e473dd: The linked wallet's Unlink Wallet action leads with a minus-circle icon.
31
+ - 99555b7: Provider checkout screens now slide from one to the next instead of cutting.
32
+ - f040e98: Deposit list rows no longer flash or buzz when a scroll starts on them, and press haptics now fire on release instead of touch-down.
33
+ - 0497487: A Polish or Maltese buyer can give the alternative ID Stripe accepts (NIP, or a passport number) in the same field.
34
+ - 266be1c: The KYC form asks the place of birth on one page, and Stripe's EU terms step has its own intro.
35
+ - 1f3a54a: Stripe EU steps that Stripe reports out of order are asked again instead of failing over.
36
+ - ad0da73: Price every EU buyer in EUR while Stripe's `/fiat/next` checkout is offered, so buyers in Poland, Sweden and other non-euro EU countries can buy through Stripe
37
+ - 0f46136: Tell EU buyers on Stripe to have their ID ready, instead of "no ID needed"
38
+ - 5f73018: Stripe EU checkout: after Re-do ID verification, the buyer sees the review while Stripe decides, not the ID request again, and a double tap opens one ID sheet.
39
+ - 8f2d249: Show the Stripe ID check's intro, loading, while a re-done check opens and after it returns.
40
+ - 2c8b050: Tell a Stripe buyer their ID was not accepted when Stripe asks for it again.
41
+ - 7d59250: Stripe EU checkout: a buyer who leaves the ID review and comes back before Stripe decides sees the review again, not a new ID request.
42
+ - 4b4803f: Stripe EU checkout: after the ID check, show a review screen the buyer can leave while Stripe decides, and show the "ID check did not work" card only when Stripe rejected the ID.
43
+ - 2e3915a: Internal: Stripe's EU identifier calls, ready for the identifiers screen.
44
+ - 4b3c80a: Stripe EU checkout: the Apple Pay sheet shown before sign-in names Stripe's Irish business for an EUR purchase, not its US one.
45
+ - 266be1c: Preview scenario for Stripe's EU identity form.
46
+ - ea12ff1: Tell a Stripe buyer whose Apple Pay card is from another country why Stripe can't take the purchase, then move them to another provider
47
+ - Updated dependencies [8afd857]
48
+ - Updated dependencies [ff4bf8e]
49
+ - Updated dependencies [afca5cd]
50
+ - Updated dependencies [1f3a54a]
51
+ - Updated dependencies [5f73018]
52
+ - Updated dependencies [8f2d249]
53
+ - Updated dependencies [2c8b050]
54
+ - Updated dependencies [7d59250]
55
+ - Updated dependencies [4b4803f]
56
+ - Updated dependencies [ea12ff1]
57
+ - Updated dependencies [dc087f3]
58
+ - @funkit/connect-core@15.0.0
59
+
3
60
  ## 11.3.1
4
61
 
5
62
  ### Patch Changes
package/README.md CHANGED
@@ -525,17 +525,22 @@ even though nothing calls it today; a stub is fine. Same for the optional
525
525
 
526
526
  Solana lives on its own entry, `@funkit/connect-rn/clients/solana`, so a host
527
527
  that never configures it carries none of it. The host owns the Solana wallet
528
- connection; the SDK takes the connected wallet's signer and builds a withdrawal
529
- config over it. USDC on Solana is the only source today, and both the crypto
530
- and the cash (Swapped) methods work from it.
528
+ connection and builds a `FunkitSolanaAdapter` with `@funkit/solana-kit` (Kit) or
529
+ `@funkit/solana-web3` (web3.js); the SDK builds a withdrawal config over it.
530
+ USDC on Solana is the only source today, and both the crypto and the cash
531
+ (Swapped) methods work from it.
531
532
 
532
533
  ```tsx
533
534
  import { useFunkitCheckout } from '@funkit/connect-rn'
534
535
  import { useSolanaWithdrawal } from '@funkit/connect-rn/clients/solana'
536
+ import { createSolanaAdapter } from '@funkit/solana-kit'
535
537
  import { useMemo } from 'react'
536
538
 
537
539
  // Both inputs are compared by identity, so keep them stable across renders.
538
- const solana = useMemo(() => ({ signer: solanaWallet }), [solanaWallet])
540
+ const adapter = useMemo(
541
+ () => createSolanaAdapter({ rpc, signer }),
542
+ [rpc, signer],
543
+ )
539
544
  const config = useMemo(
540
545
  () => ({
541
546
  defaultReceiveToken: 'USDC',
@@ -544,20 +549,21 @@ const config = useMemo(
544
549
  }),
545
550
  [usdcBalance],
546
551
  )
547
- // `solanaWallet`: a base58 address, the RPC connection funkit submits through,
548
- // and one of `signTransaction` / `signAndSendTransaction`.
549
- const withdrawal = useSolanaWithdrawal({ solana, config })
552
+ const withdrawal = useSolanaWithdrawal({ adapter, config })
550
553
 
551
554
  const { beginWithdrawal } = useFunkitCheckout()
552
- // `undefined` while the signer is absent or its address is not base58.
555
+ // `undefined` while the adapter is absent or its address is not base58.
553
556
  if (withdrawal) beginWithdrawal(withdrawal)
554
557
  ```
555
558
 
556
- Install `@solana/web3.js` (an optional peer) and give Hermes what it lacks
557
- before importing the SDK: `Buffer` (the `buffer` package), a full `URL`
558
- (`react-native-url-polyfill/auto`), and `crypto.getRandomValues` as described
559
- under [MoonPay crypto setup](#moonpay-crypto-setup). Point the connection at an
560
- RPC you control; Solana's public endpoints rate-limit.
559
+ `rpc` is your Kit `Rpc` and `signer` a Kit `TransactionSigner`. A web3.js host
560
+ uses `@funkit/solana-web3` instead:
561
+ `createSolanaAdapter({ address, connection, signTransaction })`. Give Hermes
562
+ what your Solana library needs before importing it; web3.js needs `Buffer`
563
+ (the `buffer` package), a full `URL` (`react-native-url-polyfill/auto`), and
564
+ `crypto.getRandomValues` as described under
565
+ [MoonPay crypto setup](#moonpay-crypto-setup). Point the RPC at an endpoint you
566
+ control; Solana's public endpoints rate-limit.
561
567
 
562
568
  ## Local development
563
569