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

@dexhunterio/swaps

Package Overview
Dependencies
Maintainers
3
Versions
161
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dexhunterio/swaps

### How to use library

  • 0.0.64
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

Dex Hunter - Swap Component

How to use library

  • Install package:
    npm i @dexhunterio/swaps
    
  • Import to your code:
    import Swap from '@dexhunterio/swaps'
    import '@dexhunterio/swaps/lib/assets/style.css'
    ...
    
  • Use Swap Component:
    function App() {
      return (
        <div>
          <Swap {...settings} />
        </div>
      );
    }
    

Available props:

PropRequired?TypeDefaultDescription
defaultTokenfalsestring-The default token to be selected.
widthfalsepx|%-The width of the component. Accepts values in pixels or percentage.
heightfalsepx|%-The height of the component. Accepts values in pixels or percentage.
themefalsedark | lightdarkThe theme of the component. Can be either 'dark' or 'light'.
orderTypesfalsearray['SWAP', 'LIMIT']An array of order types supported by the component. Defaults to 'SWAP' and 'LIMIT'.
supportedTokensfalsetokenId[]-An array of token IDs that are supported for searching.
partnerNametruestring-The name of the partner. This is a required field.
partnerCodetruestring-The code of the partner. This is a required field.
colorsfalseobject-Supported colors: mainText, subText, background, containers, buttonText, accent.
classNamefalsestring-Custom CSS class for the component.
stylefalseobject-Inline styles for the component.
onSwapSuccessfalse(data: any) => void-Callback function on successful swap.
onSwapErrorfalse(err: any) => void-Callback function on swap error.
selectedWalletfalseSelectedWallet-The wallet selected by the user. Accepts one of the specified wallet identifiers. Supported wallets: nami, eternl, flint, gerowallet, typhoncip30, nufi, lace, vespr, begin, and yoroi.
inputsfalsestring[]-Input fields for the component.
onWalletConnectfalse(data: any) => void-Callback function when a wallet is connected.

FAQs

Package last updated on 01 Dec 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