sh <(wget -qO- https://raw.githubusercontent.com/onggunhao/node-binary/master/install.sh)
bnbcli keys add BEP2_WALLET --recover
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 |
1. sudo add-apt-repository ppa:fransschreuder1/qucs | |
2. sudo apt-get update | |
3. sudo apt-get install qucs |
data class TransactionInput ( | |
var txid: String = "" | |
var vout: Int = 0 | |
var amount: Long = 0, | |
var unlockingScript:LinkedList<String> = LinkedList() | |
) |
data class TransactionOutput( | |
var amount: Long = 0, | |
var lockingScript: LinkedList<String> = LinkedList() | |
) |
data class Transaction ( | |
var hash: String = "", | |
var type: TYPE = TYPE.REGULAR, | |
var inputs: Array<TransactionInput> = emptyArray(), | |
var outputs: Array<TransactionOutput> = emptyArray() | |
) |
/** 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() | |
) |