From 0b1133755dba57458edfa0677b06d24c6acae9df Mon Sep 17 00:00:00 2001 From: nacho <25931366+ignaciosantise@users.noreply.github.com> Date: Tue, 20 May 2025 15:58:16 -0300 Subject: [PATCH 1/2] chore: added onramp and swaps docs --- appkit/react-native/core/options.mdx | 15 ++++- appkit/react-native/transactions/onramp.mdx | 63 ++++++++++++++++++++ appkit/react-native/transactions/swaps.mdx | 66 +++++++++++++++++++++ docs.json | 7 +++ 4 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 appkit/react-native/transactions/onramp.mdx create mode 100644 appkit/react-native/transactions/swaps.mdx diff --git a/appkit/react-native/core/options.mdx b/appkit/react-native/core/options.mdx index 392d117de..b6a042ba2 100644 --- a/appkit/react-native/core/options.mdx +++ b/appkit/react-native/core/options.mdx @@ -171,7 +171,7 @@ Allows you to toggle (enable or disable) additional features provided by AppKit. ### swaps -Enable or disable the swap feature in your AppKit. [Swaps](/appkit/react/transactions/swaps) feature is enabled by default. +Enable or disable the swap feature in your AppKit. [Swaps](/appkit/react-native/transactions/swaps) feature is enabled by default. ```ts createAppKit({ @@ -182,6 +182,19 @@ createAppKit({ }); ``` +### onramp + +Enable or disable the On-Ramp feature in your AppKit. [On-Ramp](/appkit/react-native/transactions/onramp) feature is enabled by default. + +```ts +createAppKit({ + //... + features: { + onramp: true, + }, +}); +``` + ### email This boolean defines whether you want to enable email login. This feature is enabled by default. diff --git a/appkit/react-native/transactions/onramp.mdx b/appkit/react-native/transactions/onramp.mdx new file mode 100644 index 000000000..564c0c282 --- /dev/null +++ b/appkit/react-native/transactions/onramp.mdx @@ -0,0 +1,63 @@ +--- +title: On-Ramp +--- + +Enable users to purchase crypto with fiat directly within your React Native app using AppKit's On-Ramp feature. This integration allows users to securely access over 100 cryptocurrencies and purchase tokens to support in-app activity and transactions across multiple chains. + +## Configuration + +The On-Ramp feature is enabled by default in AppKit. Here's how to configure it in your app: + +```typescript +import { createAppKit } from '@reown/appkit...'; // Ensure this import path is correct for your project + +createAppKit({ + projectId: 'YOUR_PROJECT_ID', + // ... other config options + features: { + onramp: true, // Optional - true by default + } +}); +``` + +If you want to disable the On-Ramp feature, you can set `onramp: false` in the features configuration. + +## Usage + +### Opening the On-Ramp View + +You can programmatically open the On-Ramp view using the `useAppKit` hook: + +```typescript +import { useAppKit } from '@reown/appkit-...'; // Ensure this import path is correct for your project + +function OnRampButton() { + const { open } = useAppKit(); + + const handleOnRampPress = () => { + open({ view: 'OnRamp' }); + }; + + return ( +