Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Jin Eguchi wakiyamap

🏠
Working from home
View GitHub Profile
View electrum.po
msgid ""
msgstr ""
"Project-Id-Version: electrum\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-08 07:47+0000\n"
"PO-Revision-Date: 2017-08-08 03:48-0400\n"
"Last-Translator: rdymac <rdy@aol.es>\n"
"Language-Team: Japanese\n"
"Language: ja_JP\n"
"MIME-Version: 1.0\n"
@wakiyamap
wakiyamap / from base ltc
Last active Oct 5, 2017
digishield_pattern2
View from base ltc
def get_target_dgsld(self, height, chain=None):
# Litecoin: go back the full period unless it's the first retarget
if chain is None:
chain = {}
nTargetTimespan = 95040 #1.1 days 1.1*24*60*60
nTargetSpacing = 1.5 * 60 #1.5 minute
nTargetSpacingDigisheld = 1.5 * 60 #1.5 minute
@wakiyamap
wakiyamap / from base doge
Last active Oct 6, 2017
digishield_pattern1
View from base doge
def bits_to_target(self, bits):
MM = 256*256*256
a = bits%MM
if a < 0x8000:
a *= 256
target = (a) * pow(2, 8 * (bits//MM - 3))
return target
def target_to_bits(self, target):
MM = 256*256*256
View electrumx.conf
DB_DIRECTORY = /var/electrumx
USERNAME = electrumx
ELECTRUMX = /usr/local/bin/electrumx_server.py
#Bitcoin Node RPC Credentials
DAEMON_URL = http://user:pass@IPaddress:port/
#port is optional, defaults to COIN RPC default
#
#REQUIRED FOR PUBLIC VISIBILITY
@wakiyamap
wakiyamap / LTC,KGW,DigiShield_target_algo
Last active Dec 26, 2017
LTC,KGW,DigiShield_target_algo
View LTC,KGW,DigiShield_target_algo
def convbits(self,new_target):
c = ("%064x" % int(new_target))[2:]
while c[:2] == '00' and len(c) > 6:
c = c[2:]
bitsN, bitsBase = len(c) // 2, int('0x' + c[:6], 16)
if bitsBase >= 0x800000:
bitsN += 1
bitsBase >>= 8
new_bits = bitsN << 24 | bitsBase
return new_bits
View atomicswap dcr<-->mona(testnet)
A
$ dcrctl --testnet --rpcuser=0920 --rpcpass=password --wallet getnewaddress
TsfxqUymvKKP9eGPkwewk4puJEf5hGt4cfB
B
$ monacoin-cli getnewaddress
n1rEm8ZgDA5gLD8xLnPoxBDZHiM7QyFcoE
A
$ monaatomicswap --testnet --rpcuser=0920 --rpcpass=password initiate n1rEm8ZgDA5gLD8xLnPoxBDZHiM7QyFcoE 1.0
View atomicswap dcr<-->mona(mainnet)
A
$ dcrctl --rpcuser=0920 --rpcpass=password --wallet getnewaddress
DsU2AdqHHhKuXKxtZPxU8JCk14LW7a72jtV
B
$ monacoin-cli getnewaddress
MR3GuYLQraHMc7PApFVMCeKtXrnGPLnoEV
A
$ monaatomicswap --rpcuser=0920 --rpcpass=password initiate MR3GuYLQraHMc7PApFVMCeKtXrnGPLnoEV 0.1
View monacoin's genesis block
01000000 - version
0000000000000000000000000000000000000000000000000000000000000000 - prev block
a64bac07fe31877f31d03252953b3c32398933af7a724119bc4d6fa4a805e435 - merkle root
f083c252 - timestamp
f0ff0f1e - bits
66d61200 - nonce
01 - number of transactions
01000000 - version
01 - input
0000000000000000000000000000000000000000000000000000000000000000ffffffff - prev output
View monacoin's testnet genesis block
01000000 - version
0000000000000000000000000000000000000000000000000000000000000000 - prev block
a64bac07fe31877f31d03252953b3c32398933af7a724119bc4d6fa4a805e435 - merkle root
ec2dbf58 - timestamp
f0ff0f1e - bits
6c642000 - nonce
01 - number of transactions
01000000 - version
01 - input
0000000000000000000000000000000000000000000000000000000000000000ffffffff - prev output
View monacoin's 1 block
02000000 - version
b68b8c410d2ea4afd74fb56e370bfc1bedf929e1453896c9e79dd116011c9fff - prev block
b9c39c20b4baf3b84cd72349300833086d686db142c51b26a196cdabbe7a0610 - merkle root
d45ac352 - timestamp
f0ff0f1e - bits
0010bb75 - nonce
01 - number of transactions
01000000 - version
01 - input
0000000000000000000000000000000000000000000000000000000000000000ffffffff - prev output