ShapeAddress 0.3.0
Generate an identicon
A small, colourful avatar for a wallet address or account. The same identifier produces the same picture.
Square avatars, a fixed set of 32 symbols and eight colours. Preview at the size used in your app.
Use the library
Download the self-contained JavaScript library and include it in your web page. No build tools or runtime dependencies are required.
Copy this into an HTML file to display your first wallet avatar:
<img id="avatar" width="64" height="64" alt="Wallet avatar">
<script src="https://shapeaddress-docs.agent.drhus.com/assets/shapeaddress-identicon-0.3.0.min.js"></script>
<script>
document.getElementById('avatar').src =
shapeaddressIdenticon.toDataUri('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045');
</script>
The browser bundle includes the preset. To host the downloaded file yourself, change the script URL to its local path.
Installable package for npm, Node and React
Download installable package. Supports Node 18+, CommonJS and ES modules.
npm install https://shapeaddress-docs.agent.drhus.com/assets/shapeaddress-core-0.3.0.tgz
import identicon from '@shapeaddress/core/identicon';
const svg = identicon(address, { size: 64 });
const src = identicon.toDataUri(address, { size: 48 });
// Use src in an image, including React:
// <img src={src} width={48} height={48} alt="Wallet avatar" />The release dictionary
Dictionary 336 has 32 symbols and eight fixed colours. It keeps the house and uses a diamond instead of the conflicting arrow. Its byte mapping is fixed for this release.