Skip to content

Notes of many concepts regarding chia cryptocurrency

Notifications You must be signed in to change notification settings

kimsk/chia-concepts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prerequisites

Chia

JupyterLab

pip install jupyterlab

Visualization

RPC & Sqlite Decorators

RPC
chia_root = Path('/Users/karlkim/.chia/simulator/dao')
chia_config = load_config(chia_root, "config.yaml")
self_hostname = chia_config["self_hostname"]
full_node_rpc_port = chia_config["full_node"]["rpc_port"]
wallet_rpc_port = chia_config["wallet"]["rpc_port"]

inject_full_node = with_full_node_rpc_client(self_hostname, full_node_rpc_port, chia_root, chia_config)
get_coin_record_by_name = inject_full_node(full_node_rpc.get_coin_record_by_name)
get_coin_records_by_parent_id = inject_full_node(full_node_rpc.get_coin_records_by_parent_id)
get_coin_records_by_puzzle_hash = inject_full_node(full_node_rpc.get_coin_records_by_puzzle_hash)
get_coin_spend = inject_full_node(full_node_rpc.get_coin_spend)
get_coins_in_block = inject_full_node(full_node_rpc.get_coins_in_block)
get_coin_records_by_hint = inject_full_node(full_node_rpc.get_coin_records_by_hint)
DB
wallet_db = '/Users/karlkim/.chia/testnet10/wallet/db/blockchain_wallet_v2_r1_testnet10_2483575623.sqlite'
@with_db_connection(wallet_db)
async def get_coin_names_by_wallet_id(conn, wallet_id):
    coins = []
    query = "SELECT coin_name FROM coin_record WHERE wallet_id=?"
    async with conn.execute(query, (wallet_id,)) as cursor:
        async for row in cursor:
            coins.append(row[0])
    return coins
await get_coin_names_by_wallet_id(1)

Misc

PowerShell, C#, and F# Cell supports

dotnet tool install Microsoft.dotnet-interactive -g
dotnet interactive jupyter install
pip install jupyterlab_sos

Notebooks

Chialisp

Misc

Basic

Intermediate

Advanced

  • [Chia Asset Tokens (CATs)]
  • [DataLayer]
  • NFT
  • [Offers]