Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
RIDL is a multi-chain reputation and identity layer which promotes on-chain reputing of entities. This library is a simple wrapper around the RIDL API which is used to allow EOSIO contracts to not require users to have EOSIO accounts (public key pinning
RIDL is a multi-chain reputation and identity layer which promotes on-chain reputing of entities. This library is a simple wrapper around the RIDL API which is used to allow EOSIO contracts to not require users to have EOSIO accounts (public key pinning).
npm i -S ridl-js
yarn add ridl-js
const RidlJS = require('ridl-js');
// https://github.com/EOSIO/eosjs-ecc/
const signer = hash => ecc.signHash(hash, someKey);
const ridl = RidlJS(signer);
// Just copy `index.js` to your project and rename it.
<script src="./ridl.js"></script>
... same as above
Checks if a username is valid.
if(ridl.validName(username)){ ... }
Gets a list of the currently used chains for RIDL
const chains = await ridl.chains();
// ['chain_id1', 'chain_id2',]
Gets a list of the currently used hosts for a chain
const hosts = await ridl.hosts(chain);
// ['https://node.com']
This method is turned off on the API for now.
Suggest a node/host to be added for a chain. Specific requirements for this method will be posted here when it is live.
const options = {
logic_contract:'ridlridlridl',
token_contract:'ridlridltkns',
sender_account:'ridlridlsend',
creator_account:'ridlridluser',
};
const added = await ridl.addHost(chain_id, host, options);
Finds an identity by username.
You should be doing this to find the identity's id
and chain
before calling repute()
or changekey()
.
const identity = await ridl.findIdentity(username);
Finds a reputation by entity.
const entity = 'contract::eosio.token';
const identity = await ridl.findReputation(entity);
Finds a reputation by entity.
const result = await ridl.identify(username, publicKey);
if(result && result.success) ...
else console.error(result);
Finds a reputation by entity.
const result = await ridl.changekey(identity.id, new_public_key, identity.chain);
if(result && result.success) ...
else console.error(result);
Finds a reputation by entity.
const entity = 'contract::ridlridlridl';
const fragments = [{type:'testing', value:1}];
const tokens = '1.0000 RIDL';
const details = 'I think this contract is awesome!';
const result = await ridl.repute(identity.id, entity, fragments, tokens, identity.chain, details);
if(result && result.success) ...
else console.error(result);
changekey
and repute
.Both of these methods can also take a block_num
and sig
parameter (always the last two params).
These are used to sign a proofing hash which the smart contracts use to make sure no parameters were tampered with.
This library does it by default when a block_num
is null
, but you can do it yourself like so:
// For `changekey(..., block_num, sig)`
const sig = ecc.signHash(sha256(`${identity.id}:${entity}:${block_num}:${key}`), privateKey);
// For `repute(..., block_num, sig)`
const sig = ecc.signHash(sha256(`${identity.id}:${entity}:${block_num}:${fragments.map(x => `${x.type}${x.value}`).join('')}:${tokens}`), privateKey);
The block_num
must be within range of the current head_block_num
on chain within a 10 block radius.
FAQs
RIDL is a multi-chain reputation and identity layer which promotes on-chain reputing of entities. This library is a simple wrapper around the RIDL API which is used to allow EOSIO contracts to not require users to have EOSIO accounts (public key pinning
We found that ridl-js 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.