Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zachalam/accountphoto
Map a universal avatar against your EOS blockchain account (stored using the IPFS protocol).
https://github.com/zachalam/accountphoto
avatar eos ipfs
Last synced: about 1 month ago
JSON representation
Map a universal avatar against your EOS blockchain account (stored using the IPFS protocol).
- Host: GitHub
- URL: https://github.com/zachalam/accountphoto
- Owner: zachalam
- Created: 2018-10-03T04:02:32.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-17T18:55:28.000Z (about 6 years ago)
- Last Synced: 2024-11-14T14:47:32.231Z (about 1 month ago)
- Topics: avatar, eos, ipfs
- Language: WebAssembly
- Homepage:
- Size: 27 MB
- Stars: 14
- Watchers: 4
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://raw.githubusercontent.com/zachalam/AccountPhoto/master/frontend/public/ap-screen.png)
## 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
```2. Add
```
import React, { Component } from 'react'
import AccountPhoto from 'accountphoto-react'
class Example extends Component {
render () {
return (
// simply add `account` name as prop.
// overwrite `style` by passing to component.
)
}
}
```
View on NPM: [https://www.npmjs.com/package/accountphoto-react](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}
});
```