Skip to content

Instantly share code, notes, and snippets.

View sleepdefic1t's full-sized avatar

₴Ⱡ33₱ sleepdefic1t

View GitHub Profile

Cardano Shelley Addresses

Overview

graph TD
    subgraph OverviewGraph [Overview]
    Mnemonic[["fa:fa-list-ul mnemonic"]]
    RootKeyPair(["fa:fa-key Root KeyPair"])
    SpendKeyPair(["fa:fa-key Spending KeyPair"])
@sleepdefic1t
sleepdefic1t / shelley-addresses-test-vectors.yaml
Created January 22, 2021 22:52
Test vectors for Cardano Shelley addresses
---
# Key Derivation & Address Test Vectors for Cardano Shelley Addresses
# ===================================================================
#
# Shelley CDDL Specification (draft):
#
# https://github.com/input-output-hk/cardano-ledger-specs/blob/bf4b79f3e937ac3a584161101f2230d2406ff0ae/shelley/chain-and-ledger/executable-spec/cddl-files/shelley.cddl
#
# Shelley HD Wallets Specification:
# /project_dir/CMakeLists.txt

# ------------------------------------------------------------------------------
# Coverage 1:2
# ------------------------------------------------------------------------------

if (CMAKE_BUILD_TYPE STREQUAL "Coverage")
    add_definitions(-Wno-unused-command-line-argument)
endif() #CMAKE_BUILD_TYPE STREQUAL "Coverage"
@sleepdefic1t
sleepdefic1t / setup.md
Last active May 8, 2020 01:38
CodeChecker macOS Setup & Usage
# Download and install dependencies.
brew update
brew install doxygen gcc git
pip3 install virtualenv

# Install the latest clang see: https://formulae.brew.sh/formula/llvm
brew install llvm@7

# Fetch source code.

CodeCoverage: 100%
@sleepdefic1t
sleepdefic1t / base58.c
Created April 1, 2020 01:02
base58 w/address/pubkeyhash
/*******************************************************************************
* This file is part of the ARK Ledger App.
*
* Copyright (c) ARK Ecosystem <info@ark.io>
*
* The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
/**
* Check that a Strings is alphanumeric (0-9 | a-z | A-Z)
*
* Faster than regex
* - src: https://stackoverflow.com/a/25352300
*
* @param str
* @returns {boolean} true if alphanum., false if not alphanum. or length is 0
*/
export function isAlphaNumeric(str) {
@sleepdefic1t
sleepdefic1t / hex.h
Created March 8, 2020 08:15
Quick Bytes To Hex, No checking
/*******************************************************************************
* This file is part of the ARK Ledger App.
*
* Copyright (c) ARK Ecosystem <info@ark.io>
*
* The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
@sleepdefic1t
sleepdefic1t / token_printing.h
Last active March 4, 2020 22:52
Print Numbers and Token Amounts as Strings in C
#ifndef TOKEN_PRINTING_H
#define TOKEN_PRINTING_H
#include <stddef.h>
#include <stdint.h>
#include <string.h>
////////////////////////////////////////////////////////////////////////////////
static size_t adjustDecimals(const char *src, size_t srcSize,
#!/usr/bin/env bash
# Linker doesn't play nice with Vagrants directory mapping when building for the NanoX.
# credit to @patriksletmo for the tip.
# clean the current project
make clean
# clear the NanoX build destination
sudo rm -rf /home/ubuntu/ledger-app-ark