Use Seaborn to visualize interpret the byte layout of Solana account types

Overview

solana-account-vis

Use Seaborn to visually interpret the byte layout of Solana account types

Usage

from account_visualization import generate_account_visualization
from collections import OrderedDict

token_account = OrderedDict(
    mint=('Pubkey', 32),
    owner=('Pubkey', 32),
    amount=('u64', 8),
    delegate=('COption<Pubkey>', 36),
    state=('AccountState', 1),
    is_native=('COption<u64>', 12),
    delegated_amount=('u64', 8),
    close_authority=('COption<Pubkey>', 36),
)
mint = OrderedDict(
    mint_authority=('Pubkey', 32),
    supply=('u64', 8),
    decimals=('u8', 1),
    is_initialized=(bool, 1),
    freeze_authority=('COption<Pubkey>', 36),
)
token_metadata = OrderedDict(
    key=('Key', 1),
    update_authority=('Pubkey', 32),
    mint=('Pubkey', 32),
    name_size=('usize', 4),
    name=('String', 32),
    symbol_size=('usize', 4),
    symbol=('String', 10),
    uri_size=('usize', 4),
    uri=('String', 200),
    seller_fee_basis_points=('u16', 2),
    creators_size=('usize', 4),
    creator0_pubkey=('Pubkey', 32),
    creator0_verified=('bool', 1),
    creator0_share=('u8', 1),
    creator1_pubkey=('Pubkey', 32),
    creator1_verified=('bool', 1),
    creator1_share=('u9', 1),
    creator2_pubkey=('Pubkey', 32),
    creator2_verified=('bool', 1),
    creator2_share=('u8', 1),
    creator3_pubkey=('Pubkey', 32),
    creator3_verified=('bool', 1),
    creator3_share=('u8', 1),
    creator4_pubkey=('Pubkey', 32),
    creator4_verified=('bool', 1),
    creator4_share=('u8', 1),
    primary_sale_happened=('bool', 1),
    is_mutable=('bool', 1),
    edition_nonce=('Option<u8>', 5),
    padding=('bytes', 176)
)
generate_account_visualization(token_account, title="Token Account Layout")
generate_account_visualization(mint, title="Mint Layout")
generate_account_visualization(token_metadata, title="Token Metadata Layout")

Output

Owner
Jarry Xiao
data {engineer, scientist} | uc berkeley eecs class of 2018 | passionate about building systems to enable quantitative decision making
Jarry Xiao
A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py)

Articuno (discord-interactions) A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py) Get started If you wa

Blue 8 Dec 26, 2022
A Python Script to automate searching of available vaccination centers in the city and hence booking

Cowin Vaccine Availability Notifier Cowin Vaccine Availability Notifier takes your City or PIN code as an input and automatically notifies you via ema

Jayesh Padhiar 7 Sep 05, 2021
TM1py is a Python package that wraps the TM1 REST API in a simple to use library.

By wrapping the IBM Planning Analytics (TM1) REST API in a concise Python framework, TM1py facilitates Python developments for TM1. Interacting with T

Cubewise CODE 147 Dec 15, 2022
Discondelete, is a Discord self-bot to delete dm's or purge all messages from a guild.

Discondelete Discondelete, is a Discord self-bot to delete dm's or purge all messages from a guild. Report Bug · Request Feature Table of Contents Abo

core 4 Feb 28, 2022
WikiChecker - Repositorio oficial del complemento WikiChecker para NVDA.

WikiChecker Buscador rápido de artículos en Wikipedia. Introducción. El complemento WikiChecker para NVDA permite a los usuarios consultar de forma rá

2 Jan 10, 2022
Trading Strategies (~50%) developed by GreenT on QuantConnect platform over the autumn quarter

Trading Strategies ~50% of codes from the Applied Financial Technology Course. Contributors: Claire W. Derrick T. Frank L. Utkarsh T. Course Leads: Dy

Utkarsh 2 Feb 07, 2022
A multi purpose discord bot for python

Sypher The best multi purpose discord bot. Add Sypher right now Invite Me | Join

Johan Naizu 1 Dec 15, 2022
A simple chat api that can also work with ipb4 and chatbox+

SimpleChatApi API for chatting that can work on its own or work with Invision Community and Chatbox+. You are also welcome to create frontend for this

Anubhav K. 1 Feb 01, 2022
Python SDK for the Buycoins API.

This library provides easy access to the Buycoins API using the Python programming language. It provides all the feature of the API so that you don't need to interact with the API directly. This libr

Musa Rasheed 48 May 04, 2022
A template that help you getting started with Pycord.

A Pycord Template with some example! Getting Started: Clone this repository using git clone https://github.com/AungS8430/pycord-template.git If you ha

2 Feb 10, 2022
A Pythonic client for the official https://data.gov.gr API.

pydatagovgr An unofficial Pythonic client for the official data.gov.gr API. Aims to be an easy, intuitive and out-of-the-box way to: find data publish

Ilias Antonopoulos 40 Nov 10, 2022
Este programa tem como objetivo o cadastro dos usuários. Assim, caso a autenticação seja feita, permitir que o usuário entre em determinado sistema ou programa.

LoginPy Este programa tem como objetivo o cadastro dos usuários. Assim, caso a autenticação seja feita, permitir que o usuário entre em determinado si

Jonas Carvalho 4 Dec 23, 2021
AWSXenos will list all the trust relationships in all the IAM roles and S3 buckets

AWS External Account Scanner Xenos, is Greek for stranger. AWSXenos will list all the trust relationships in all the IAM roles, and S3 buckets, in an

AirWalk 57 Nov 07, 2022
A telegram bot that sends a meme a day, from reddit's top meme of the day

MemeBot A telegram bot that sends a meme a day, from reddit's top meme of the day You can use the bot either with an external scheduler (ex: pythonany

Michele Vitulli 1 Dec 13, 2021
An powerfull telegram group management anime themed bot.

ErzaScarlet Erza Scarlet is the female deuteragonist of the anime/manga series Fairy Tail. She is an S-class Mage from the Guild Fairy Tail. Like most

ꜱōʜᴇʀᴜ ᴋāɴ (AKA) ꜱᴏʜᴀɪʟ ᴋʜᴀɴ 2 May 19, 2022
Opencontactbook - Bulk-manage large numbers of vCard contacts with built-in geolocation

Open Contact Book Open Contact Book is a buiness-oriented, cross-platform, Pytho

Aurélien PIERRE 2 Aug 08, 2022
Scrape the Twitter Frontend API without authentication.

Twitter Scraper 🇰🇷 Read Korean Version Twitter's API is annoying to work with, and has lots of limitations — luckily their frontend (JavaScript) has

Buğra İşgüzar 3.4k Jan 08, 2023
cipher bot telegram

cipher-bot-telegram cipher bot telegram Telegram bot that encode/decode your messages To work correctly, you must install the latest version of python

anonim 1 Oct 10, 2021
Security Monkey monitors AWS, GCP, OpenStack, and GitHub orgs for assets and their changes over time.

NOTE: Security Monkey is in maintenance mode and will be end-of-life in 2020. For AWS users, please make use of AWS Config. For GCP users, please make

Netflix, Inc. 4.3k Jan 09, 2023
🤖 Chegg answers requested and sent by the Discord BOT to the targeted user.

Chegg BOT Description "I believe that open-source resources are a must for everyone around. Especially in the field of education. As Chegg c

Vusal Ismayilov 33 Aug 20, 2021