Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@entropyxyz/sdk
Advanced tools
[!WARNING]
This project is currently in alpha, and should be considered unstable.
The @entropyxyz/sdk
is a typescript library allowing developers to interact with the Entropy network and easily request signatures. This includes concise wrappers to execute tasks such as registering a set of programs for a resulting verifying key (entropy account) and requesting signatures from that verifying key.
NPM:
npm install @entropyxyz/sdk --save
Yarn:
yarn add @entropyxyz/sdk
The main interface to interact with Entropy. This class provides methods to register, check registration status, interact with programs, and sign transactions. Users should await the ready
promise to ensure the class is initialized before performing operations.
The example below walks you through registering an account, requesting signatures from the validating group, and then verifying those signatures. For a more in-depth walkthrough, see our end-to-end test.
import { Keyring } from '@entropyxyz/sdk/keys';
import { wasmGlobalsReady, Entropy } from '@entropyxyz/sdk';
async function basicExample() {
await wasmGlobalsReady();
const seed = '0x786ad0e2df456fe43dd1f91ebca22e235bc162e0bb8d53c633e8c85b2af68b7a';
const keyStore = { seed };
const keyring = new Keyring(keyStore);
const opts = {
endpoint: 'ws://127.0.0.1:9944',
keyring
};
const entropy = new Entropy(opts);
await entropy.ready;
// This is the default program registration and configuration.
const msgObject = {
msg: Buffer.from('Hello world: signature from entropy!').toString('hex')
};
const verifyingKey = await entropy.register();
const signatureData = await entropy.signWithAdaptersInOrder({
msg: msgObject,
order: ['deviceKeyProxy']
});
if (!await entropy.verify(signatureData)) throw new Error('can not verify signature');
const { signature } = signatureData;
// ------------------
// Here is where you
// could do stuff
// with the signature.
// ------------------
await entropy.close()
}
basicExample();
This tool is in early development. As such, a lot of things may not work as expected. Feel free to play around with the SDK and report any issues in the issues tab.
FAQs
JS SDK for entropy blockchain
The npm package @entropyxyz/sdk receives a total of 149 weekly downloads. As such, @entropyxyz/sdk popularity was classified as not popular.
We found that @entropyxyz/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.