Git Product home page Git Product logo

uport-identity's Introduction

uPort Identity Contracts

npm CircleCI solidity-coverage Join the chat at

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

Contract Deployments

Mainnet (id: 1)

Contract Address
IdentityManager (not deployed)
TxRelay (not deployed)
MetaIdentityManager (not deployed)

Rinkeby testnet (id: 4)

Contract Address
IdentityManager 0xabbcd5b340c80b5f1c0545c04c987b87310296ae
TxRelay 0x476debfb878d266d9e3182d7bb304301a8748aad
MetaIdentityManager 0x7c338672f483795eca47106dc395660d95041dbe

Kovan testnet (id: 42)

Contract Address
IdentityManager 0x71845bbfe5ddfdb919e780febfff5eda62a30fdc
TxRelay 0x899d47b36d94bc36050e9fdddb7d210a62c8656c
MetaIdentityManager 0xd36ea9fa1235763e25cfc6625a55cc2a3a3b7556

Ropsten testnet (id: 3)

Contract Address
IdentityManager (not deployed)
TxRelay (not deployed)
MetaIdentityManager (not deployed)

Using the contracts

To use the contract we provide truffle artifacts. Once you require the uport-identity module you will get an object containing a versioned index of the uport contracts. You can specify which version you want to user, or just use the latest one. Keep in mind that different versions will be deployed to different addresses.

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

// use specific version
const IdentityManagerArtifact = uportIdentity.IdentityManager.v1

// or use latest version
const version = uportIdentity.IdentityManager.latestVersion
const IdentityManagerArtifact = uportIdentity.IdentityManager[version]

You can use truffle-contract to utilize these artifacts.

let IdentityManager = Contract(IdentityManagerArtifact)
IdentityManager.setProvider(web3.currentProvider)
let identityManager = IdentityManager.deployed()

You can also use web3.

let networkId = 1 // Mainnet
let IdentityManager = web3.eth.contract(IdentityManagerArtifact)
let identityManager = IdentityManager.at(IdentityManagerArtifact.networks[networkId].address)

If you want to learn more about this structure, checkout the document about the artifact index.

Contract documentation

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.

Proxy

TxRelay

IdentityManager

MetaIdentityManager

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.

uport-identity's People

Contributors

christianlundkvist avatar naterush avatar oed avatar pelle avatar zachferland avatar zmitton avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.