Skip to content

Instantly share code, notes, and snippets.


Eddy WM eddywm

View GitHub Profile
eddywm /
Last active May 4, 2020


1. Install Binance-Chain Node CLI

sh <(wget -qO-

2. Add Wallet Phrase to the Node CLI

bnbcli keys add BEP2_WALLET --recover

eddywm / Wallet verification unit tests.kt
Created Sep 29, 2018
Unit tests that were used in the XWallet app
View Wallet verification unit tests.kt
import io.scintillamlabs.swallet.crypto.CryptoUtils
import io.scintillamlabs.swallet.crypto.CryptoUtils.SHA256Hex
import io.scintillamlabs.swallet.crypto.CryptoUtils.getPrivateKeyFromHex
import io.scintillamlabs.swallet.crypto.CryptoUtils.getPublicKeyFromHex
import io.scintillamlabs.swallet.utility.toHex
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotEquals
import org.junit.Test
import org.spongycastle.jce.provider.BouncyCastleProvider
View Install Qucs simulator on Ubuntu
1. sudo add-apt-repository ppa:fransschreuder1/qucs
2. sudo apt-get update
3. sudo apt-get install qucs
eddywm / Transaction Input data structure.kt
Last active Jan 16, 2018
Minimal Transaction Input data structure
View Transaction Input data structure.kt
data class TransactionInput (
var txid: String = ""
var vout: Int = 0
var amount: Long = 0,
var unlockingScript:LinkedList<String> = LinkedList()
eddywm / Transaction output data structure.kt
Last active Jan 17, 2018
Minimal Transaction output data structure
View Transaction output data structure.kt
data class TransactionOutput(
var amount: Long = 0,
var lockingScript: LinkedList<String> = LinkedList()
eddywm / Transaction data structure.kt
Created Jan 16, 2018
A minimal structure of a Transaction in a blockchain system
View Transaction data structure.kt
data class Transaction (
var hash: String = "",
var type: TYPE = TYPE.REGULAR,
var inputs: Array<TransactionInput> = emptyArray(),
var outputs: Array<TransactionOutput> = emptyArray()
View Block data structure.kt
/** Kotlin code example for a block structure */
data class Block (
var index: Int = 0,
var hash: String = "",
var previousHash: String = "0",
var timestamp: Long = 0,
var nonce: Int = 0,
var numTx: Int = 0,
var transactions: Array<Transaction> = emptyArray()