Skip to content

Instantly share code, notes, and snippets.

View pinheadmz's full-sized avatar
🕺

Matthew Zipkin pinheadmz

🕺
  • port 8333
View GitHub Profile
@pinheadmz
pinheadmz / hsd-create-sign-tx.md
Last active March 1, 2020 21:05
Create, sign and broadcast a raw TX using hsd RPC calls.

Get a wallet address, generate coins to it:

--> hsw-cli account get default
{
...
  "receiveAddress": "rs1qaykgcsp6zqjz7fqwlsxnh8hqwslw467md3vssl"
...
}
height: 0 in: 0 out: 2002210000 diff: 2002210000 grand total: 2002210000
height: 1 in: 0 out: 2000000000 diff: 2000000000 grand total: 4002210000
height: 2 in: 0 out: 2000000000 diff: 2000000000 grand total: 6002210000
height: 3 in: 0 out: 2000000000 diff: 2000000000 grand total: 8002210000
height: 4 in: 0 out: 2000000000 diff: 2000000000 grand total: 10002210000
height: 5 in: 0 out: 2000000000 diff: 2000000000 grand total: 12002210000
height: 6 in: 0 out: 2000000000 diff: 2000000000 grand total: 14002210000
height: 7 in: 0 out: 2000000000 diff: 2000000000 grand total: 16002210000
height: 8 in: 0 out: 2000000000 diff: 2000000000 grand total: 18002210000
height: 9 in: 0 out: 2000000000 diff: 2000000000 grand total: 20002210000

URGENT COVID-19 UPDATE:

If, IN MY OPINION, you are price-gouging on materials required for humans to mitigate the COVID-19 virus during this pandemic, I will ALWAYS resolve in favor of the buyer.

Pinheadmz's OpenBazaar Moderator Policies

OpenBazaar Peer ID: QmeSyTRaNZMD8ajcfbhC8eYibWgnSZtSGUp3Vn59bCnPWC

const coin1 = {
"version": 0,
"height": 10301,
"value": 93228200,
"address": "hs1qe2wy3vz45ke42429jmmnv85ce5kcst080qd598",
"covenant": {
"type": 0,
"action": "NONE",
"items": []
},
## PREHEAD
----------
nonce (4 bytes)
|
| timestamp (8 bytes)
| |
| | padding (20 bytes) prevBlock (32 bytes) treeRoot(32 bytes) commitHash(32 bytes)
⚀⚀⚀⚀ ⚀⚀⚀⚀⚀⚀⚀⚀ ⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀ ⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀ ⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀ ⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀⚀
ack(){
echo ACK `git rev-parse head`
echo \<details\>\<summary\>Show Signature\<\/summary\>
echo -e '\n```'
echo ACK `git rev-parse head` | gpg -s -q -a --clearsign
echo -e '```\n'
echo "pinheadmz's public key is [on keybase](https://keybase.io/pinheadmz/pgp_keys.asc?fingerprint=e61773cd6e01040e2f1bd78ce7e2984b6289c93a)"
echo \<\/details\>
}
14659 Map {
  'COINBASE' => Map { 'count' => 14660, 'value' => 29507996138125 },
  'FAUCET' => Map { 'count' => 1358, 'value' => 237238786158270 },
  'AIRDROP' => Map { 'count' => 4581, 'value' => 19454422312234 },
  'NONE' => Map { 'count' => 689810, 'value' => 12785527557117394 },
  'OPEN' => Map { 'count' => 62585, 'value' => 0 },
  'BID' => Map { 'count' => 155990, 'value' => 29178908574495 },
  'CLAIM' => Map { 'count' => 841, 'value' => 3959349211335 },
 'REVEAL' =&gt; Map { 'count' =&gt; 147462, 'value' =&gt; 18889235602905 },
Date, total blocks on that day, average since genesis
Mon Feb 03 2020, 341, 341
Tue Feb 04 2020, 190, 265
Wed Feb 05 2020, 208, 246
Thu Feb 06 2020, 188, 231
Fri Feb 07 2020, 196, 224
Sat Feb 08 2020, 146, 211
Sun Feb 09 2020, 155, 203
Mon Feb 10 2020, 143, 195
'use strict';
const {NodeClient} = require('hs-client');
const {Network} = require('hsd');
const network = Network.get('main');
const nodeOptions = {
network: network.type,
port: network.rpcPort
};
/*
* Packet sniffer plgin for bcoin
* USAGE:
* bcoin --log-console=false --plugins <path/to/packetsniffer.js>
*/
'use strict';
const EventEmitter = require('events');