New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@notabene/javascript-sdk

Package Overview
Dependencies
Maintainers
2
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@notabene/javascript-sdk - npm Package Compare versions

Comparing version 1.22.0 to 1.23.0

2

package.json

@@ -11,3 +11,3 @@ {

"license": "MIT",
"version": "1.22.0",
"version": "1.23.0",
"main": "dist/index.js",

@@ -14,0 +14,0 @@ "packageManager": "yarn@3.2.2",

@@ -18,2 +18,10 @@ <div align="center">

- [Installation](#installation)
- [Usage](#usage)
- [Supported asset formats](#supported-asset-formats)
- [Re-rendering](#re-rendering)
- [Error handling](#error-handling)
- [Customization](#customization)
- [License](#license)
## Installation

@@ -80,3 +88,3 @@

###Supported asset formats
### Supported asset formats

@@ -117,2 +125,40 @@ - `USDC` the simple asset code passed as a `string`, in case different chain (polygon) -> `USDC-POLY`

---
### Error handling
If any error occurs, the `onError` function from the Notabene instance will be triggered. The `error` passed as argument contains a `data` property that has the following type `ErrorData`.
> ⚠️ **Note**: These errors are mainly used for debugging internal issues while implementing the widget. They are not meant to be shown directly to the end user.
```js
type ErrorData = {
title: string;
detail: string;
code: number;
type: string;
};
const notabene = new Notabene({
...,
onError: (err) => {
const errorData = err.data;
// Do something
},
});
```
**Notabene Internal Errors**
Type | Code | Title | Detail
-- | -- | -- | --
`BAD_REQUEST` | `400` | `Bad Request` | `NotabeneBadRequest: ...`
`TRANSACTION_INVALID` | `400` | `Transaction Invalid` | `NotabeneTransactionInvalid: ...`
`TOKEN_INVALID` | `401` | `Token Invalid` | `NotabeneTokenInvalid: ...`
`ASSET_NOT_SUPPORTED` | `404` | `Asset Not Supported` | `NotabeneAssetNotSupported: ...`
`SERVICE_UNAVAILABLE` | `500` | `Service Unavailable` | `NotabeneServiceUnavailable: ...`
`WALLET_CONNECTED_FAILED` | `500` | `Wallet Connection Failed` | `NotabeneWalletConnectionFailed: ...`
`WALLET_NOT_SUPPORTED` | `501` | `Wallet Not Supported` | `NotabeneWalletNotSupported: ...`
## Customization

@@ -119,0 +165,0 @@

Sorry, the diff of this file is not supported yet

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