Home

Awesome

MoveDID

move-did (1)

MoveDID is a DID protocol that is implemented Aptos.The vision of MoveDID is to be the foundation for the next generation of large-scale Web3 finance and Web3 society. MoveDID could be used for 3 types of subjects: human, organization, and bot. The implementation follows the did@w3c.

! Important Links:

Homepage:

https://movedid.build

Manager dApp:

https://manager.movedid.build

https://github.com/NonceGeek/scaffold-move

Docs:

https://docs.movedid.build

Twitter: https://twitter.com/Move_DID

Deck:

https://github.com/NonceGeek/MoveDID/blob/main/MoveDID-Deck-EN.pdf

Demo Video:

https://youtu.be/LOuQo1XjSxE

! Linked Repos:

scaffold-move:

https://github.com/NonceGeek/scaffold-move

homepage:

https://github.com/NonceGeek/MoveDID-Homepage

web3_move_ex sdk:

https://github.com/NonceGeek/web3_move_ex

Modules on Aptos(Beta Stage)

Mainnet:

0x61b96051f553d767d7e6dfcc04b04c28d793c8af3d07d3a43b4e2f8f4ca04c9f

Testnet for Dev:

0xc71124a51e0d63cfc6eb04e690c39a4ea36774ed4df77c00f7cbcbc9d0505b2c

🏆 Prizes

Dorahack Aptos Grant DAO Prize 2nd:

https://dorahacks.io/zh/aptos/2/top

Parts

Compilation & Deployment Guide

Aptos(TODO: Update)

Aptos CLI version >=1.0.0

see the latest guide in:

https://aptos.dev/cli-tools/aptos-cli-tool/use-aptos-cli

aptos node run-local-testnet --with-faucet
aptos init --profile local --rest-url http://localhost:8080 --faucet-url http://localhost:8081
export PROFILE=local

Tips -- reset local network

aptos node run-local-testnet --with-faucet --force-restart
aptos account fund-with-faucet --profile $PROFILE --account $PROFILE
aptos move compile --package-dir [path]/MoveDID/did-aptos --named-addresses my_addr=$PROFILE
aptos move publish --package-dir [path]/MoveDID/did-aptos --named-addresses my_addr=$PROFILE --profile $PROFILE
aptos move run --function-id 1f9aa0aa17a3c8b02546df9353cdbee47f14bcaf25f5524492a17a8ab8c906ee::addr_aggregator::create_addr_aggregator --profile $PROFILE
aptos move run --function-id 1f9aa0aa17a3c8b02546df9353cdbee47f14bcaf25f5524492a17a8ab8c906ee::addr_aggregator::create_endpoint_aggregator --profile $PROFILE
aptos move run --function-id 1f9aa0aa17a3c8b02546df9353cdbee47f14bcaf25f5524492a17a8ab8c906ee::addr_aggregator::add_addr --args u64:0 --args String:a5928A4b811b6F850e633Dfb9f9c4B50247565a9 --args String:Ethereum --args String:Test --profile

Test

Run Test in Contract:

aptos move test  --package-dir did-aptos  --named-addresses my_addr=0x123

Guide of New Module Addition

0x01: add new chain type module file, like addr_eth.move; add constant variable and implement update_addr fun.

example:

//eth addr type
const ADDR_TYPE_ETH: u64 = 0;

//eth addr length
const ETH_ADDR_LEGNTH: u64 = 40;

// err enum
const ERR_INVALID_ETH_ADDR: u64 = 2001;

public fun update_addr(addr_info: &mut AddrInfo, signature : &mut String) {
    ...
}

0x02: continue the second step, put the third step update_addr to the specify chain's update_*_addr fun.

example:

public entry fun update_eth_addr(acct: &signer,
      addr: String, signature : String) acquires AddrAggregator {
      ...
       while (i < length) {
         let addr_info = vector::borrow_mut<AddrInfo>(&mut addr_aggr.addr_infos, i);

         if (addr_info::equal_addr(addr_info, addr)) {
            addr_eth::update_addr(addr_info, &mut signature);
            break
         };
         i = i + 1;
      };
      ...
}  

Contributors

https://github.com/NonceGeek/MoveDID/graphs/contributors

Money History

TODO

Distributed Rules

TODO