
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@nash-io/ramp-widget-sdk
Advanced tools
[](https://www.npmjs.com/package/@nash-io/ramp-widget-sdk)
ramp-widget-sdk
A JavaScript library to allow third-parties to include a Nash fiat ramp widget in any webpage.
# npm
npm install @nash-io/ramp-widget-sdk
# yarn
yarn add @nash-io/ramp-widget-sdk
Your page must contain an HTML element with the following data attribute: data-nash-fiat-ramp-widget
:
<div data-nash-fiat-ramp-widget />
Once initializing the widget like below, an iframe
pointing to the widget deployment will be loaded within your HTML element:
// import the module
import NashRamp from "@nash-io/ramp-widget-sdk";
// initialize the widget
const nashWidget = new NashRamp();
nashWidget.init({
width: 496,
height: 576,
});
The pattern above can be reproduced in a simple React component:
import React, { useEffect } from "react";
import NashRamp from "@nash-io/ramp-widget-sdk";
const NashRampWidget = () => {
useEffect(() => {
const nash = new NashRamp();
nash.init({
width: 496,
height: 576,
});
}, []);
return <div data-nash-fiat-ramp-widget />;
};
export default NashRampWidget;
And then used anywhere:
export default () => <NashRampWidget />;
<!-- embed the script -->
<script
src="https://unpkg.com/@nash-io/ramp-widget-sdk@latest/dist/ramp-widget-sdk.umd.js"
async
></script>
<body>
<!-- initialize -->
<script>
function initializeNash() {
const nash = new NashRamp();
nash.init({
width: "496px",
height: "576px",
});
}
window.onload = function () {
initializeNash();
};
</script>
<!-- HTML target -->
<div data-nash-fiat-ramp-widget />
</body>
new NashRamp({ ...options })
Property | Description | Type | Required | Default |
---|---|---|---|---|
base | The symbol of the fiat currency to be used in the purchase. | string | No | n/a |
env | Points to the environment where the widget is deployed. | 'LOCAL' | 'PREVIEW' | 'PRODUCTION' | No | 'PRODUCTION' |
referrer | Your service name (used by Nash for tracking). | string | No | window.location.hostname |
target | The symbol of the crypto currency to be purchased. | string | No | n/a |
blockchain | The symbol of the network to be used. | 'BTC' | 'ETH' | 'NEO' | 'NEO3' | 'POLYGON' | 'AVAXC' | 'ARBITRUM' | No | n/a |
NashRamp.init({ ...options })
Property | Description | Type | Required |
---|---|---|---|
width | Widget width — use 100% for responsiveness | string | number | Yes |
height | Widget height — minimum 576px | string | number | Yes |
mode | Initializes the widget on Buy or Sell mode. | BUY |SELL | No |
baseAmount | Initializes the widget with a fixed base amount. | number | No |
targetAmount | Initializes the widget with a fixed target amount — will take precedence if used with baseAmount . | number | No |
FAQs
[](https://www.npmjs.com/package/@nash-io/ramp-widget-sdk)
The npm package @nash-io/ramp-widget-sdk receives a total of 123 weekly downloads. As such, @nash-io/ramp-widget-sdk popularity was classified as not popular.
We found that @nash-io/ramp-widget-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.