Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
@iota/identity-stronghold-nodejs
Advanced tools
This is the beta version of the official Stronghold Account Storage plugin for Node.js with [IOTA Identity Wasm](https://github.com/iotaledger/identity.rs/tree/main/bindings/wasm).
Readme
This is the beta version of the official Stronghold Account Storage plugin for Node.js with IOTA Identity Wasm.
Latest Release: this version matches the main branch of this repository and is stable.
npm install @iota/identity-stronghold-nodejs
Development Release: this version matches the dev branch of this repository, may see frequent breaking changes and has the latest code changes.
npm install @iota/identity-stronghold-nodejs@dev
const { AccountBuilder, ExplorerUrl } = require('@iota/identity-wasm/node')
const { Stronghold } = require('@iota/identity-stronghold-nodejs')
async function main() {
// Stronghold settings for the Account storage.
// This will load an existing Stronghold or create a new one automatically.
const filepath = "./example-strong.hodl";
const password = "my-password";
const stronghold = await Stronghold.build(filepath, password);
// This generates a new keypair stored securely in the above Stronghold,
// constructs a new DID Document, and publishes it to the IOTA Mainnet.
let builder = new AccountBuilder({
storage: stronghold,
});
let account = await builder.createIdentity();
// Print the DID of the newly created identity.
const did = account.did();
console.log(did.toString());
// Print the local state of the DID Document.
const document = account.document();
console.log(JSON.stringify(document, null, 2));
// Print the Explorer URL for the DID.
console.log(`Explorer URL:`, ExplorerUrl.mainnet().resolverUrl(did));
}
main()
Alternatively, you can build the bindings if you have Rust installed. If not, refer to rustup.rs for the installation. Then install the necessary dependencies using:
npm install
To use the latest local changes from the Wasm bindings follow the build instructions from the IOTA Identity Wasm build section and then link the result with:
cd ../wasm
npm link
cd ../stronghold-nodejs
npm link @iota/identity-wasm
and then build the bindings
npm run build
If you linked the Wasm bindings, don't forget to unlink before packaging the module.
npm unlink --no-save @iota/identity-wasm
npm install
The minimum supported version for node is: v16.0.0
FAQs
This is the beta version of the official Stronghold Account Storage plugin for Node.js with [IOTA Identity Wasm](https://github.com/iotaledger/identity.rs/tree/main/bindings/wasm).
The npm package @iota/identity-stronghold-nodejs receives a total of 1 weekly downloads. As such, @iota/identity-stronghold-nodejs popularity was classified as not popular.
We found that @iota/identity-stronghold-nodejs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 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 Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.