Skip to content

Latest commit

 

History

History
47 lines (37 loc) · 2.13 KB

readme-template.md

File metadata and controls

47 lines (37 loc) · 2.13 KB

uPort Identity Contracts

npm CircleCI Please read our Whitepaper for information on what uPort is, and what is currently possible as far as integration.

Using the contracts

To use the contract we provide truffle artifacts. You can use truffle-contract to utilize these.

const uportIdentity = require('uport-identity')
const Contract = require('truffle-contract')

let IdentityFactory = Contract(uportIdentity.IdentityFactory)
IdentityFactory.setProvider(web3.currentProvider)
let identityFactory = IdentityFactory.deployed()

You can also use web3.

let networkId = 1 // Mainnet
let IdentityFactory = web3.eth.contract(uportIdentity.IdentityFactory.abi)
let identityFactory = IdentityFactory.at(uportIdentity.IdentityFactory.networks[networkId].address)

Contracts

This repository contains the contracts currently in use by uPort. This is also where you find the addresses of these contracts currently deployed on Mainnet and relevant test networks. Below you can find descriptions of each of the contracts and the rationale behind the design decisions.

Main contract interactions

The most important interactions with the contracts are creation of identities and sending transactions. Here are visual representations of this being executed.

Creating an identity with the IdentityManager

identity creation

Transfer an identity to IdentityManager

register identity

Send a meta-tx

meta-tx

Contributing

Want to contribute to uport-contracts? Cool, please read our contribution guidelines to get an understanding of the process we use for making changes to this repo.