Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@toruslabs/torus-embed
Advanced tools
This module generates the javascript to be included in a dapp via a script tag It creates an iframe that loads the Torus page, and sets up communication streams between the iframe and the dapp javascript context.
Torus has been designed for gradual adoption from the start. You can use Torus as a web3 provider dynamically (on demand) or by default
Usage:
As a script tag
Include the script tag into the body of your index.html This would include torus by default into the page and will override if other web3 providers are present
As a package on npm
npm install @toruslabs/torus-embed
This approach would ensure that you can
Please refer to examples folder for details on usage using dynamic import
Torus uses window.sessionStorage to store user details So, if user reloads the page, all his data would be rehydrated and the user doesn't need to login
These cases are demonstrated in the samples provided in the examples folder
Ensure you have a Node.JS development environment setup
git clone https://github.com/torusresearch/torus-embed.git
cd torus-embed
npm install
npm run build
To run tests
npm run test:e2e:headful
npm run test:build-embed
Entrypoint: index.js
Torus Embed is MIT Licensed
FAQs
Embed script for Torus
The npm package @toruslabs/torus-embed receives a total of 5,904 weekly downloads. As such, @toruslabs/torus-embed popularity was classified as popular.
We found that @toruslabs/torus-embed demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.