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
This Telegram bot allows you to create direct links with pre-filled text to WhatsApp Chats

WhatsApp API Bot Telegram bot to create direct links with pre-filled text for WhatsApp Chats You can check our bot here. The bot is based on the API p

RobotTrick • רובוטריק 17 Aug 20, 2022
A Python library to access Instagram's private API.

Instagram Private API A Python wrapper for the Instagram private API with no 3rd party dependencies. Supports both the app and web APIs. Overview I wr

2.6k Jan 05, 2023
Example-bot-discord - Example bot discord xD

example-python-bot-discord Clone this repository Grab a token on Discord's devel

Amitminer 1 Mar 14, 2022
Ivan Telegram Userbot with python

Riviani Ramadhan Ivan-Ubot Pada Dasarnya Ivan-Ubot adalah userbot Telegram modular yang berjalan di Python3 dengan database sqlalchemy. Berbasis Paper

1 Oct 29, 2021
SongBot2.0 With Python

SongBot2.0 Host 👨‍💻 Heroku 🚀 Manditary Vars BOT_TOKEN : Get It from @Botfather Special Feature Downloads Songs fastly and less errors as well as 0

Mr.Tanaji 5 Nov 19, 2021
It was increasingly cumbersome to eye-grep CF output in the AWS console.

cfplot Overview It was increasingly cumbersome to eye-grep CF output in the AWS console. I couldn't find another tool out there to provide individual

46 Dec 26, 2022
Red-mail - Advanced email sending library for Python

Red Mail Next generation email sender What is it? Red Mail is an advanced email

Mikael Koli 313 Jan 08, 2023
CryptoApp - Python code to pull wallet balances from a variety of different chains through nothing other than your public key.

CryptoApp - Python code to pull wallet balances from a variety of different chains through nothing other than your public key.

Zach Frank 4 Dec 13, 2022
This is a Telegram video compress bot repo. By Binary Tech💫

This is a Telegram Video Compress Bot. Prouduct By Binary Tech 💫 Features Compresse videos and generate screenshots too.You can set custom video name

silentz lk 2 Jan 06, 2022
Want to play What Would Rather on your Server? Invite the bot now!😏

What is this Bot? 👀 What You Would Rather? is a Guessing game where you guess one thing. Long Description short Take this example: You typed r!rather

丂ㄚ么乙ツ 2 Nov 17, 2021
Telegram Userbot to steram youtube live or Youtube vido in telegram vc by help of pytgcalls

TGVCVidioPlayerUB Telegram Userbot to steram youtube live or youtube vidio in telegram vc by help of pytgcalls Commands = Vidio Playing 🎧 stream :

Achu biju 3 Oct 28, 2022
radiant discord anti nuke src leaked lol.

radiant-anti-wizz-leaked radiant discord anti nuke src leaked lol, the whole anti sucks but idc. sucks to suck thats tuff bro LMAOOOOOO join my server

ok 15 Aug 06, 2022
Telegram Bot for saving and sharing personal and group notes

EZ Notes Bot (ezNotesBot) Telegram Bot for saving and sharing personal and group notes. Usage Personal notes: reply to any message in PM to save it as

Dash Eclipse 8 Nov 07, 2022
Wrapper around the Mega API

python-mega Overview Wrapper around the Mega API. Based on the work of Julien Marchand. Installation Install using pip, including any optional package

Juan Riaza 104 Nov 26, 2022
1 Feb 18, 2022
基于nonebot2开发的群管机器人qbot,支持上传并运行python代码以及一些基础管理功能

nonebot2-Eleina 基于nonebot2开发的群管机器人qbot,支持上传并运行python代码以及一些基础管理功能 Readme 环境:python3.7.3+,go-cqhttp 安装及配置:参见(https://v2.nonebot.dev/guide/installation.h

1 Dec 06, 2022
Get some python in google cloud functions

[NOTE]: This is a highly experimental (and proof of concept) library so do not expect all python packages to work flawlessly. Also, cloud functions ar

Martin Abelson Sahlen 200 Nov 24, 2022
DiscWrappy - A Python wrapper for the Discord bot API

DiscWrappy - A Python wrapper for the Discord bot API

Jeff Morris 4 Apr 25, 2022
A python script for hitting the kik API to enumerate people based on a username/userlist

kick3d Recon script for enumerating users off of the Kik API. This script has the ability to check single usernames or run through a userlist of usern

Sakura Samurai 19 Oct 04, 2021
A module to complement discord.py that has Music, Paginator and Levelling.

discord-super-utils A modern python module including many useful features that make discord bot programming extremely easy. Features Modern leveling m

Yash 106 Dec 19, 2022