Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

caas_sdk_web

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

caas_sdk_web

Welcome to Caas React SDK 👋

  • 0.1.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-60%
Maintainers
1
Weekly downloads
 
Created
Source

Welcome to Caas React SDK 👋

Caas Web SDK lets you integrate crypto onRamp, offRamp, KYC module provided by mudrex. Let's get started!

🏠 Homepage

🏠 Homepage

Install

Simply go to the command line and run this command.

npm i caas_sdk_web

Add the folllowing scrip tag in you index.html file

<script  src="https://hv-camera-web-sg.s3-ap-southeast-1.amazonaws.com/hyperverge-web-sdk@6.1.2/src/sdk.min.js"></script>

Usage

React Native Design System uses a centralized theme to provide consistency across all the components.

Step 1. Implement Signature API in backend that will create a signature for SDK.

Step 2. Implement the Init Function which needs to be passed to SDK.

const  init  =  async () => {
	let  myHeaders  =  new  Headers();
	myHeaders.append("X-USER-ID", "04bc7ef7-6cdf-4b1a-a4cc-93ed058a9a7c");
	myHeaders.append("X-CLIENT-ID", "18e963ea-39fd-4a1b-b1e6-decbfe791d31");
	myHeaders.append("X-AUTH-TOKEN", "clientId");

	let  requestOptions  = {
		method: "GET",
		headers: myHeaders,
		redirect: "follow",
	};

	let  result  =  await  fetch("https://staging.mudrex.com/api/v1/user/create_client_user_secret", requestOptions)
	.then((response) =>  response.text())
	.then((result) => {
		return  result;
	})
	.catch((error) => {});

	let  res  =  JSON.parse(result);
	return {
		signature: res?.secret,
		timestamp: res?.timestamp,
		userId: res?.user_id,
		clientId: res?.client_id,
		hv_token: res?.hv_token,
	};
};

Step 3. Initialise the SDK

//your root component
import { Caas } from "caas_sdk_web";

function App() {
  return (
    <div className="App">
      <Caas
        init={init}
        onSuccess={() => {
          console.log("Success");
        }}
        sdkConfiguration={{ steps: ["kyc"], kycEnabled: true }}
        onKYCSuccessCallback={() => {}}
        offRampSuccessCallback={() => {}}
      />
    </div>
  );
}

FAQs

Package last updated on 07 Jun 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc