Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@consensys/on-ramp-sdk

Package Overview
Dependencies
Maintainers
16
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@consensys/on-ramp-sdk

## Getting started

latest
npmnpm
Version
2.1.11
Version published
Weekly downloads
59K
-2.43%
Maintainers
16
Weekly downloads
 
Created
Source

On-Ramp SDK

Getting started

  • Please make sure that there is either a deployed OnRamp API service or you are running it localy.
  • Install the SDK package from the archive.
  • Import the on ramp sdk with this line of code: import {OnRampSdk} from '@codefi/on-ramp-sdk'

On-Ramp SDK

To facilitate back-end interaction, a SDK can be used.

You can use it like this:

const sdk: IOnRampSdk = await OnRampSdk.getSDK(
  Environment.Staging,
  Context.Mobile,
  {
    verbose: true,
    maxInstanceCount: 1,
  },
)

Local Development with MetaMask Portfolio

To connect a local instance of the SDK to a local MetaMask Portfolio client, follow these steps:

1. Update SDK Configuration

  • Open the tsconfig.json file in the SDK project.
  • Modify the module and moduleResolution properties as follows:
    {
      "compilerOptions": {
        "module": "esnext",
        "moduleResolution": "node"
        // other configurations
      }
    }
    
  • In the SDK project directory, run the following command to create a symbolic link:

    yarn link
    
  • In the Portfolio project directory, link the SDK by running:

    yarn link @consensys/on-ramp-sdk
    
  • Remove the cache to ensure the changes take effect:

    rm -rf node_modules/.cache
    

3. Install Dependencies

  • In the Portfolio project directory, install the necessary packages:
    yarn install
    

4. Update Vite Configuration

  • Open the vite.config.js file in the Portfolio project.
  • Add the following configuration to exclude the SDK from dependency optimization:
    export default {
      // other configurations
      optimizeDeps: {
        exclude: ['@consensys/on-ramp-sdk'],
      },
    }
    

5. Rebuild After SDK Changes

Whenever you make changes to the SDK, remember to rebuild the project to reflect those changes in the Portfolio client:

yarn build

FAQs

Package last updated on 12 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts