
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
@elabox/did-js-sdk
Advanced tools
npm run dev
(this enables hot reload when SDK files change)npm run build
without hot reload.Note: the tests/ folder contains its own package.json and node_modules, and depends on the "external library" @elastosfoundation/did-js-sdk.
npm link ..
(every time after calling npm install
or npm update
) from the tests/ folder. This command uses the local version of the DID SDK, that is just in the folder above tests.Start the simulated DID chain once:
npm run simchain
Several independant options:
Or:
npm run test:node
Or:
We are still optimizing tests migrated from the Java implementation. Running all tests on an up-to-date CPU can take several hours. The main source of this problem has been located in the BigNumber operations of the Elliptic library and the key operations of the hdkey-secp256r1 library. Since there shouldn't be huge impacts on the runtime code, the selected solution has been to develop an automated CI to automatically run tests remotely. Here are some metrics and graphics to show latency sources:
Profiling metrics showing 'mul' method latency
Latency from deriveChild hdkey-secp256r1
Call hierarchy:
Latency from jmulAdd of Elliptic
Call hierarchy:
A DIDAdapter is required to publish transactions to the DID chain. Different environments require different adapters such as:
Using the Elastos Essentials Connector that provides a DID Adapter over Wallet connect (to let the wallet app sign transactions):
Pseudo code:
let didAdapter = new EssentialsConnector.DIDAdapter();
DIDBackend.initialize(didAdapter);
// In the connectivity SDK
class EssentialsConnector.DIDAdapter {
createdIdTransaction(payload) {
let web3provider = new WalletConnectWeb3Provider();
ler web3 = new Web3(web3provider);
web3.methods.publishDID(payload);
}
}
DID SDK tests use a custom adapter with a hardcoded wallet to automate transactions signing and publishing:
class LocalDIDAdapter {
createdIdTransaction() {
let acc = {...privatekey-walletwithtestnetfundsinside...};
acc.sign();
publishUsingLocalWeb3Instance();
}
}
let didAdapter = new DIDSDK.Tests.LocalDIDAdapter();
DIDBackend.initialize(didAdapter);
```
#### Custom way:
class MyDIDAdapter extends DID.DefaultDIDAdapter { createdIdTransaction(payload) { // DO custom RPC call } }
let didAdapter = new MyDIDAdapter(); DIDBackend.initialize(didAdapter);
## How to publish to npmjs.com
### Publishing account (NPM)
- Be a member of organization: @elastosfoundation
### Useful commands
- `npm adduser` (once)
- `npm login` (once)
- Increase version number in package.json
- `npm publish --access=public`
FAQs
Elastos DID Typescript SDK
The npm package @elabox/did-js-sdk receives a total of 0 weekly downloads. As such, @elabox/did-js-sdk popularity was classified as not popular.
We found that @elabox/did-js-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.