• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

zachalam/AccountPhoto: Map a universal avatar against your EOS blockchain accoun ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

zachalam/AccountPhoto

开源软件地址:

https://github.com/zachalam/AccountPhoto

开源编程语言:

WebAssembly 81.7%

开源软件介绍:

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}
    });



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap