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
An inline real-time media searching robot without any database.

MediaBuddy A Telegram Inline media searching robot without any database. About mediaBuddy is an inline media searching robot. If you have so many movi

Renjith Mangal 28 Oct 21, 2022
A simple worker for OpenClubhouse to sync data.

OpenClubhouse-Worker This is a simple worker for OpenClubhouse to sync CH channel data.

100 Dec 17, 2022
A client interface for Scrapinghub's API

Client interface for Scrapinghub API The scrapinghub is a Python library for communicating with the Scrapinghub API. Requirements Python 2.7 or above

Scrapinghub 184 Sep 28, 2022
A simple tool that allows you to change your default AWS CLI profile.

Select AWS Profile Select AWS Profile (slapr) is a simple tool that lets you select which AWS Profile you want to use and sets it as the default AWS p

Antoni Yanev 2 Nov 09, 2022
Intelligent Trading Bot: Automatically generating signals and trading based on machine learning and feature engineering

Intelligent Trading Bot: Automatically generating signals and trading based on machine learning and feature engineering

Alexandr Savinov 326 Jan 03, 2023
A Python wrapper for the DeepL API

deepl.py A Python wrapper for the DeepL API installing Install and update using pip: pip install deepl.py A simple example. # Sync Sample import deep

grarich 18 Dec 12, 2022
2b2t Priority queue discord bot announcer

2b2t Priority queue discord bot announcer Commands !prioq - Checks the priority queue length and sends it. !start - Starts a loop that sends the sta

Gumi 5 Jun 06, 2022
A Serverless Application Model stack that persists the $XRP price to the XRPL every minute as a TrustLine. There are no servers, it is effectively a "smart contract" in Python for the XRPL.

xrpl-price-persist-oracle-sam This is a XRPL Oracle that publishes external data into the XRPL. This Oracle was inspired by XRPL-Labs/XRPL-Persist-Pri

Joseph Chiocchi 11 Dec 17, 2022
Cryptocurrency Trading Bot - A trading bot to automate cryptocurrency trading strategies using Python, equipped with a basic GUI

Cryptocurrency Trading Bot - A trading bot to automate cryptocurrency trading strategies using Python, equipped with a basic GUI. Used REST and WebSocket API to connect to two of the most popular cry

Francis 8 Sep 15, 2022
Discord Panel is an AIO panel for Discord that aims to have all the needed tools related to user token interactions, as in nuking and also everything you could possibly need for raids

Discord Panel Discord Panel is an AIO panel for Discord that aims to have all the needed tools related to user token interactions, as in nuking and al

11 Mar 30, 2022
An open source raffle bot made to increase the chance of winning limited sneaker raffles by automating entries.

πŸš€ SyneziaRaffles An open source raffle bot made to increase the chance of winning limited sneaker raffles by automating entries. πŸ„β€β™‚οΈ Quick Start Pr

Alexis M. 29 Dec 22, 2022
MSE5050/7050 Materials Informatics course at the University of Utah

MaterialsInformatics MSE5050/7050 Materials Informatics course at the University of Utah This github repo contains coursework content such as class sl

41 Dec 30, 2022
A Telegram Repo For Devs To Controll The Bots Under Maintenance.This Bot Is For Developers, If Your Bot Is Down, Use This Repo To Give Your Dear Subscribers Some Support By Providing Them Response.

Maintenance Bot A Telegram Repo For Devs To Controll The Bots Under Maintenance About This Bot This Bot Is For Developers, If Your Bot Is Down, Use Th

VΙͺᴠᴇᴋ 47 Dec 29, 2022
π—–π π¦π©π πžπ₯ 𝝦π—₯πžπ—–π½Β°β„’οΈ πŸ‡±πŸ‡° Is An All In One Media Inline Bot Made For Inline Your Media Effectively With Some Advance Security Toolsβ™₯️

π—–π π¦π©π πžπ₯ 𝝦π—₯πžπ—–π½Β° ℒ️ πŸ‡±πŸ‡° π—™π—˜π π©π—¨π—₯π—˜π—¦ Auto Filter IMDB Admin Commands Broadcast Index IMDB Search Inline Search Random Pics Ids & User I

KΙͺκœ±α΄€Κ€α΄€ Pα΄‡κœ±α΄€Ι΄α΄ŠΙͺα΄›Κœ Pᴇʀᴇʀᴀ 〄 13 Jun 21, 2022
Huggingface inference with GPU Docker onΒ AWS

This repository contains code to containerize and deploy a GPU docker on AWS for summarization task. Find a detailed blogpost here Youtube Video Versi

Ramsri Goutham Golla 21 Dec 30, 2022
Script to automatically book a vaccine slot on Doctolib for today or tomorrow, following rules from the French Government.

DOCTOSHOTGUN This script lets you automatically book a vaccine slot on Doctolib for today or tomorrow, following rules from the French Government. Pyt

Romain Bignon 560 Dec 19, 2022
A component of BuzzUtilityBot that allows for inter-server communication

A component of BuzzUtilityBot that allows for inter-server communication! Separated due to privacy and ease of inspection concerns

OHaiiBuzzle 2 Oct 11, 2022
PYAW allows you to call assembly from python

PYAW allows you to call assembly from python

2 Dec 13, 2021
A modern Python client for controlling Wyze devices.

Python Wyze SDK A modern Python client for controlling Wyze devices. Whether you're building a custom app, or integrating into a third-party service l

Shaun Tarves 205 Jan 02, 2023
AWS Workmail Migration Tool

WMigrate A tool for migrating AWS Workmail Users and Groups cross region and cross accounts. It also creates user and group aliases and adds the users

NK 1 Oct 27, 2021