Skip to content

Instantly share code, notes, and snippets.

View pinheadmz's full-sized avatar
🕺

Matthew Zipkin pinheadmz

🕺
  • port 8333
View GitHub Profile
'use strict';
const assert = require('bsert');
const bcoin = require('bcoin');
const plugin = bcoin.wallet.plugin;
const network = bcoin.Network.get('regtest');
const node = new bcoin.FullNode({
network: 'regtest',
memory: true
--- /Users/matthewzipkin/Desktop/work/hsd/node_modules/bstring/lib/bech32-browser.js Sat Oct 26 04:15:00 1985
+++ /Users/matthewzipkin/Desktop/work/hsd/lib/ui/bech32.js Tue Nov 19 18:35:47 2019
@@ -1,30 +1,24 @@
/*!
- * bech32.js - bech32 for bcoin
- * Copyright (c) 2017, Christopher Jeffrey (MIT License).
- * https://github.com/bcoin-org/bcoin
+ * hbech32.js - bech32 for hsd
+ * Copyright (c) 2019, Handshake Developers (MIT License).
+ * Copyright (c) 2017-2019, Christopher Jeffrey (MIT License).

Claiming Handshake Faucet Coins with Multisig

For a deep dive into the mechanics of the faucet, airdrop and claims, read this article.


Preface

@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
const coin1 = {
"version": 0,
"height": 10301,
"value": 93228200,
"address": "hs1qe2wy3vz45ke42429jmmnv85ce5kcst080qd598",
"covenant": {
"type": 0,
"action": "NONE",
"items": []
},
'use strict';
const {NodeClient} = require('hs-client');
const {Network} = require('hsd');
const network = Network.get('main');
const nodeOptions = {
network: network.type,
port: network.rpcPort
};
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 },
'use strict';
const {NodeClient, WalletClient} = require('hs-client');
const {Network} = require('hsd');
const network = Network.get('regtest');
const nodeOptions = {
network: network.type,
port: network.rpcPort
};