Skip to content

Instantly share code, notes, and snippets.

View dash-docs's full-sized avatar

dash-docs

View GitHub Profile
@dash-docs
dash-docs / bloom_filter_example.py
Created December 13, 2017 16:41
Dash Bloom Filter Tutorial - example script
#!/usr/bin/env python
from math import log
from bitarray import bitarray # from pypi.python.org/pypi/bitarray
import pyhash # from https://github.com/flier/pyfasthash
# Based on BIP-37
# https://github.com/QuantumExplorer/bips/blob/master/bip-0037.mediawiki
# Defined in bloom.h
# https://github.com/dashpay/dash/blob/master/src/bloom.h#L17-#L18
@dash-docs
dash-docs / regtest_transaction_simple_spending_example.sh
Last active December 12, 2017 13:58
Dash Transaction Tutorial - Simple Spending example script (Regtest network)
#!/bin/bash
# Set RPCUSER and RPCPWD to the username and password configure in dash.conf
RPCUSER="user"
RPCPWD="pass"
REGTEST_CMD="dash-cli -regtest -rpcuser=$RPCUSER -rpcpassword=$RPCPWD"
# SIMPLE SPENDING EXAMPLE
# -----------------------