Socket
Book a DemoInstallSign in
Socket

@spritz-finance/react-secure-elements

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spritz-finance/react-secure-elements

[![NPM](https://img.shields.io/npm/v/@spritz-finance/react-secure-elements.svg)](https://www.npmjs.com/package/@spritz-finance/react-secure-elements)

0.0.2
latest
npmnpm
Version published
Weekly downloads
2
Maintainers
0
Weekly downloads
 
Created
Source

@spritz-finance/react-secure-elements

NPM

Introduction

Official react components for Spritz Finance.

Install

npm install --save @spritz-finance/react-secure-elements

or

yarn add @spritz-finance/react-secure-elements

Usage

import React from 'react'
import { SpritzCard, Environment } from '@spritz-finance/react-secure-elements'

const App = () => {
    const [tokens, setTokens] = React.useState<{ apiKey: string; renderSecret: string}>(null)

    React.useEffect(() => {
        // Get the renderSecret for the SpritzCard from the api
        // Pass in the renderSecret along with the users api key
        setTokens({
            apiKey: 'ak_MzY5YWJ...',
            renderSecret: 'U2FsdGVkX18bLYGYL...'
        }
    })

    if (!tokens) return null

    return (
        <SpritzCard
            environment={Environment.Staging}
            apiKey={tokens.apiKey}
            renderSecret={tokens.renderSecret}
            onCopyText={(text) => console.log('onCopyText', text)}
            onDetailsLoaded={() => console.log('Card details loaded')}
        />
    )
}

export default App

FAQs

Package last updated on 08 Jul 2024

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.