Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@notabene/javascript-sdk
Advanced tools
This library is the JavaScript SDK for loading the widget on a frontend.
There are two options for loading the Notabene SDK:
<script id="notabene" async src="https://unpkg.com/@notabene/javascript-sdk@latest/dist/es/index.js"></script>
Or installing the library:
yarn add @notabene/javascript-sdk
Create a new Notabene instance:
const notabene = new Notabene({
widget: 'https://beta-widget.notabene.id',
container: '#container',
authToken: '{CUSTOMER_TOKEN}'
onValidStateChange: (isValid) => {
// Use this value to determine if the transaction is ready to be created.
console.log('is transaction valid', isValid);
}
});
Then render the widget:
notabene.renderWidget();
To update the widget as users enter transaction details:
notabene.setTransaction({
transactionAsset: 'ETH',
beneficiaryAccountNumber: '0x8d12a197cb00d4747a1fe03395095ce2a5cc6819',
transactionAmount: '2000000000',
})
Once the widget determines the transaction is valid, it will call the onValidStateChange
callback, to access the transaction details:
const currentTransactionInfo = notabene.tx
Theme
Pass a theme
object when creating an instance
Here you can pass configuration which will customize the styles of the widget to meet your brand needs, all values are optional.
{
primaryColor: '#fff',
secondaryColor: '#fff',
fontFamily: Arial,
logo: {LOGO_URL},
}
To get a list of supported fonts, visit https://fonts.google.com/
Dictionary
Pass a dictionary
object mapping in text in the widget to your own language, for example:
To replace Loading...
with Cargando...
{
'Loading...': 'Cargando...',
}
Finally you pass the configuration to a Notabene instance:
const notabene = new Notabene({
widget: 'https://beta-widget.notabene.id',
container: '#container',
authToken: '{CUSTOMER_TOKEN}'
theme: {THEME},
dictionary: {DICTIONARY},
});
BSD 3-Clause © Notabene Inc.
FAQs
JavaScript SDK for Notabene
The npm package @notabene/javascript-sdk receives a total of 1,574 weekly downloads. As such, @notabene/javascript-sdk popularity was classified as popular.
We found that @notabene/javascript-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.