Skip to content

Instantly share code, notes, and snippets.

/* eslint-disable radix */
import BigNumber from 'bignumber.js';
import BIP32Factory, { BIP32Interface } from 'bip32';
import bs58check from 'bs58check';
import * as ecc from 'tiny-secp256k1';
import { Buffer } from 'buffer';
import crypto from 'crypto';

The Litecoin Developers are aware of a regression introduced in Litecoin Core v0.21.3. A certain number of users may see the error message "Prune mode is incompatible with -blockfilterindex." on startup.

The Temporary Fix

Locate the Litecoin Data Directory. By default this is located at:

macOS: ~/Library/Application Support/Litecoin
Linux: ~/.litecoin
Windows: %APPDATA%\Litecoin
// FORMATTED FOR LTCSUITE/LTCD
// readMWTX
func (msg *MsgTx) readMWTX(r io.Reader) ([]byte, bool, error) {
var tee = new(bytes.Buffer)
haveMWTX, err := binarySerializer.Uint8(r) //d.readByte()
if err != nil {
return nil, false, err
}
if haveMWTX == 0 {
// LOSHY
const TxFlagMarker = 0x00
type TxFlag = byte
const (
WitnessFlag TxFlag = 0x01
MwebFlag TxFlag = 0x08
)

NFT design & data structure

In OmniLite all NFTs belong to a Collection. Single NFT also belong to a collection. Each NFT is issued into a Collection, therefore you must first create a collection, then issue the NFT.

Each NFT has 3 data fields, as described below:

Data Type Length Mutability Description Reccomended Uses
Grant 255 chars immutable Data assigned during issuance ipfs link! unique attributes
Issuer 255 chars non-immutable Data assigned by NFT creator/issuer royalty address/percentage. any unique attributes
@losh11
losh11 / mackeys_for_window.ahk
Last active June 27, 2021 17:42
Remaps Windows keys to macOS style ISO-UK - (in progress)
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; Docs:
; https://autohotkey.com/docs/Hotkeys.htm
; https://autohotkey.com/docs/KeyList.htm
; Based on AutoHotKey script by @ascendbruce
; https://gist.github.com/ascendbruce/677c3169259c975259045f905cd889d6
@losh11
losh11 / bitcoin-wif-litecoin-wif.py
Created April 17, 2020 19:19
Convert Bitcoin WIF to Litecoin WIF format
'''
Bitcoin WIF to Litecoin WIF converter
=== INFO ===
Idk
=== USAGE (example) ===
% python3 litecoinwif.py
@losh11
losh11 / verify-litecoin-gpg-sigs.md
Last active June 29, 2021 15:00
Bash instructions to verify litecoin core gpg sigs with thrasher-au's key.

Verify Litecoin Core sigs

Get thrasher-au's GPG key (0xFE3348877809386C) from mit.edu keyserver

$ gpg --keyserver pgp.mit.edu --recv-keys FE3348877809386C

$ gpg --fingerprint FE3348877809386C
pub   rsa2048 2013-06-19 [SC]
      59CA F0E9 6F23 F537 4794  5FD4 FE33 4887 7809 386C
uid           [  full  ] Adrian Gallagher <thrasher@addictionsoftware.com>
@losh11
losh11 / loafwallet-missing-one-word.js
Created June 1, 2018 03:42
shitty js code which finds your paper-key if you forget 1 of 12 paper-key words. i guess it works
const axios = require('axios')
const bip32 = require('bip32')
const bip39 = require('bip39')
const bitcoin = require('bitcoinjs-lib')
const fs = require('fs')
const readline = require('readline')
const phraseFinder = (phrase, callback) => {
// take in phrase and split into array
// guessed word is ?