Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@enplug/sdk-dashboard
Advanced tools
The Dashboard SDK is a JavaScript library which provides communication between the app hosted within the Dashboard's iframe with the hosting Dashboard. It allows to manage assets, themes, fetch various configurations and present standardized User Interface components.
:::note Development tips The app using Dashboard SDK has to be run inside of the Dashboard's iframe to function properly as the SDK serves as a transport channel of the messages only. All commands are actually executed by the hosting Dashboard. This means that running your app outside of the Dashboard will not work. To run your app inside of the Dashboard, you need to add it to the system. See Creating an App. :::
Include the Dashboard SDK script in your app, by adding the following code to the <head>
section of your app's HTML file:
<script type="text/javascript" src="https://apps.enplug.com/sdk/v1/dashboard.js"></script>
This will create a global enplug
/window.enplug
object which gives you the access to the methods provided by the Dashboard.
If you use TypeScript and would like to have the typings checked in your IDE you can load the following NPM package:
npm install @enplug/sdk-dashboard --save-dev
Then, add "@enplug/sdk-dashboard"
to the types
array in your TypeScript config file. Make sure that typeRoots
array has the "node_modules"
entry, so that the whole path is available to the compiler.
After the Dashboard SDK script gets loaded into your app, it will instantly create a global enplug
/window.enplug
object which gives you the access to the methods provided by the Dashboard.
See more: enplug
Use enplug.account
to manipulate assets, access account and configuration related commands.
enplug.account.getAssets()
} - fetch the asset listenplug.account.getAssetsByIds()
} - fetch provided assetsenplug.account.saveAsset()
} - creates/updates an asset, can display Deploy Dialog for editingenplug.account.deleteAsset()
} - removes an assetenplug.account.touchAsset()
} - marks asset as recently viewedenplug.account.getAccount()
} - fetch current account dataenplug.account.getUser()
} - fetch current user dataenplug.account.getThemes()
} - fetches list of themesenplug.account.getTheme()
} - fetches themeenplug.account.editTheme()
} - edits the themeenplug.account.deleteTheme()
} - deletes the themeSee more: enplug.account
Use enplug.dashboard
to use standardized User Interface components and actions.
enplug.dashboard.setHeaderTitle()
} - sets header titleenplug.dashboard.setHeaderButtons()
} - sets header buttonsenplug.dashboard.setDisplaySelectorCallback()
} - sets Display Group selector callbackenplug.dashboard.setDisplaySelectorVisibility()
} - sets Display Group selector visibilityenplug.dashboard.pageLoading()
} - sets the app's loader visibilityenplug.dashboard.loadingIndicator()
} - shows Loading indicatorenplug.dashboard.successIndicator()
} - shows Success indicatorenplug.dashboard.errorIndicator()
} - shows Error indicatorenplug.dashboard.previewAsset()
} - shows asset previewenplug.dashboard.upload()
} - shows upload dialogenplug.dashboard.openConfirm()
} - shows custom confirmation dialogenplug.dashboard.confirmUnsavedChanges()
} - shows unsaved changes dialogenplug.dashboard.setAppHasUnsavedChanges()
} - sets dashboard's navigation guardSee more: enplug.dashboard
FAQs
Enplug Dashboard SDK
The npm package @enplug/sdk-dashboard receives a total of 21 weekly downloads. As such, @enplug/sdk-dashboard popularity was classified as not popular.
We found that @enplug/sdk-dashboard demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 27 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.