npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

address-ownership-verification

v0.0.1

Published

Ethereum address ownership verification

Downloads

3

Readme

An ethereum address ownership verification smart contract

Think SMS cell phone number verification for ethereum addresses.

Possible use cases:

Exchanges could use this contract to verify their user's withdrawal addresses before sending them crypto currencies.

This could remove a possible user error from the withdrawal processes.

Requirements

Online demo

:TODO:

Local installation

git clone https://github.com/smoove/AddressOwnershipVerification.git
cd AddressOwnershipVerification
npm install
truffle compile
truffle migrate # make sure testrpc/geth/parity is running
npm run build
truffle serve

Then navigate to http://localhost:8080/ in your browser.

Usage

Definitions

address: An ethereum address

transactor: The party that wants to verify another parties ownership over address

transactee: The party that is asked to verify their ownership of address

deposit: A randomly generated number. It represents the amount of wei transactee has to send to verify ownership of address.

Suggested workflow

  1. Transactor receives an address from transactee, who claims to own said address.
  2. Transactor generates a random number, deposit. This can be anything greater than 0 up to uint32's max value (4294967295).
  3. Transactor calls request(address, deposit)
  4. Transactor tells transactee to send deposit amount of wei to this contract - Transactee could also listen for the RequestEvent event to get notified.
  5. Transactee sends deposit amount of wei to this contract from address
  6. Transactor listens for the TrustEvent event or gets informed by transactee that the deposit has been sent
  7. Transactor can now call verify(transactor, address) to know wether or not transactee has fullfilled the request

optional:

  • Transactor or transactee can call removeRequest(transactor, transactee) to cancel a pending request before it was verified. This triggers the RemoveRequestEvent event.
  • Transactor or transactee can call revoke(transactor, transactee) to revoke the verification and return deposit to transactee. This triggers the RevokeEvent event.

Events

RequestEvent

event RequestEvent(address indexed transactor, address indexed transactee, uint32 indexed deposit);

Triggered when a new request is created.

RemoveRequestEvent

event RemoveRequestEvent(address indexed transactor, address indexed transactee);

Triggered when a pending request is removed by either party before it was verified.

VerificationEvent

event VerificationEvent(address indexed transactor, address indexed transactee, uint32 indexed deposit);

Triggered when a pending request is successfully verified.

RevokeEvent

event RevokeEvent(address indexed transactor, address indexed transactee, uint32 indexed deposit);

Triggered when either party revokes an existing verification.

Running tests

truffle test