Giter Site home page Giter Site logo

tansuozhec / accountphoto Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zachalam/accountphoto

0.0 1.0 0.0 27.63 MB

Your universal EOS avatar.

Home Page: https://accountphoto.com

HTML 0.89% JavaScript 15.00% CSS 0.68% C++ 1.67% WebAssembly 81.76%

accountphoto's Introduction

AccountPhoto

AccountPhoto is a decentralized application or (dApp) for the EOS blockchain. It provides a way for users to globally link a photo to their account. Think Gravatar, but decentralized.

AccountPhoto Screenshot

React Integration

If you run your own EOS dApp, you can provide a more personalized experience by integrating AccountPhoto into your service. It only takes a few lines of code.

  1. Install
npm install accountphoto-react
  1. Add
import React, { Component } from 'react'
 
import AccountPhoto from 'accountphoto-react'
 
class Example extends Component {
  render () {
    return (
      // simply add `account` name as prop.
      <AccountPhoto account={'zachzachzach'} />
      // overwrite `style` by passing to component.
    )
  }
}

View on NPM: https://www.npmjs.com/package/accountphoto-react

Custom Integration

If you need to build your own integration, it's easy as well. Simply utilize your existing eos session.

ACCOUNT_NAME, the lower_bound param of getTableRows, needs the variable for the account name of the logged in user. Ie: 'zachzachzach'.

eos.getTableRows({
    json: true,
    code: "accountphoto",
    scope: "accountphoto",
    table: "photo",
    lower_bound: ACCOUNT_NAME
}).then((res) => {
      let photo = res.rows[0]
      // you can save and/or display the photo, by reading "photo_hash"
      // ie: https://ipfs.io/ipfs/${photo.photo_hash}
    });

accountphoto's People

Watchers

 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.