
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
uport-registry
Advanced tools
The uport registry is a contract which is used in the uport system to link attributes to identities. This repo contains the contract code as well as a library for interacting with the registry.
The registry has been deployed at the following locations:
0x41566e3a081f5032bdcad470adb797635ddfe1f0
0x5f8e9351dc2d238fb878b6ae43aa740d62fc9758
0x2cc31912b2b0f3075a87b3640923d45a26cef3ee
0xab5c8051b9a1df1aab0149f8b0630848b7ecabf6
$ npm i --save uport-registry
By installing this library you get access to a truffle-contract compatible json file. You can import this into your project to use the uport registry on any network it is deployed on, truffle-contract will automatically detect which network you are on. Use the following code to get the deployed instance of the registry:
const regsitryArtifact = require('uport-registry')
const Contract = require('truffle-contract')
const Registry = Contract(regsitryArtifact)
Registry.setProvider(web3prov)
let registry = Registry.deployed()
The contract has two functions set
and get
.
Setting a value can be done in the following way:
let key = 'myKey' // a string (bytes32) value used for namespacing
let subject = 0x123.. // an address, if you want to register something to
// your own identity you should use your own address.
let value = 'myValue' // a string (bytes32), the data you want to register.
// Could be an ipfs hash for example.
registry.set(key, subject, value)
Note that when you register something the account you send the transaction from gets set as the issuer
of the registered data.
To get data out of the registry you can do the following:
let key = 'myKey' // a string (bytes32) value used for namespacing
let issuer = 0x123... // an address, the account that registered the data
let subject = 0x123.. // an address, the account that the data is registered to
registry.get.call(key, issuer, subject).then((value) => {
// value is the registered data.
})
Note that if you are looking for self issued data issuer
and subject
will be the same address
Clone the repo and install yarn
on your system.
run yarn install
to install all node_modules.
After making changes to the contract use yarn compile-contract
to create the json artifact.
yarn test
Note: The tests currently timeout instead of throwing exceptions
To deploy the registry we used truffle, but our deploy script has a special option in order to specify the previous version of the registry. So to deploy a new version of the registry, do the following:
truffle migrate --network <name of eth network> --prevAddr <address of previous registry version>
FAQs
uPort Registry contracts and JS middleware
We found that uport-registry demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.