This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { WalletClient } = require('hs-client'); | |
const { Network } = require('hsd'); | |
// Edit these: | |
const NETWORK = 'main'; | |
const API_KEY = 'apikey'; | |
const WALLET_NAME = 'walletname'; | |
/** @type {import('hsd/lib/protocol/network')} */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check if a tx is an atomic name swap (Bob atomic swap, Shakedex sale, FxWallet marketplace sale) | |
# Bob swap (HIP-4) hints: | |
# - in0.witness[0] ends with 84 | |
# - last output value = price | |
# - out0 = FINALIZE | |
# Shakedex (HIP-1) transfer hints: | |
# - in0.witness[0] ends with 84 | |
# - last output value = price |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('node:path'); | |
const bdb = require('bdb'); | |
const bio = require('bufio'); | |
const MasterKey = require('hsd/lib/wallet/masterkey'); | |
const layouts = require('hsd/lib/wallet/layout'); | |
const layout = layouts.wdb; | |
// SET THESE VALUES: | |
const FILTER_SECRETS = true; | |
const HSD_DATA_LOC = '/path/to/any/hsd_data'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on hsd/test/wallet-auction-test.js (hsd 686, #764) | |
// Opens 800 names and places 2 bids per name | |
// After running this, refresh Bob and try other bulk actions (reveal all, etc.) | |
const { WalletClient, NodeClient } = require('hs-client'); | |
const { Address, Network } = require('hsd'); | |
// Edit these: | |
const NETWORK = 'regtest'; | |
const API_KEY = 'apikey'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -a tlds=("aaa" "aarp" "abarth" "abb" "abbott" "abbvie" "abc" "able" "abogado" "abudhabi" "ac" "academy" "accenture" "accountant" "accountants" "aco" "actor" "ad" "adac" "ads" "adult" "ae" "aeg" "aero" "aetna" "af" "afl" "africa" "ag" "agakhan" "agency" "ai" "aig" "airbus" "airforce" "airtel" "akdn" "al" "alfaromeo" "alibaba" "alipay" "allfinanz" "allstate" "ally" "alsace" "alstom" "am" "amazon" "americanexpress" "americanfamily" "amex" "amfam" "amica" "amsterdam" "analytics" "android" "anquan" "anz" "ao" "aol" "apartments" "app" "apple" "aq" "aquarelle" "ar" "arab" "aramco" "archi" "army" "arpa" "art" "arte" "as" "asda" "asia" "associates" "at" "athleta" "attorney" "au" "auction" "audi" "audible" "audio" "auspost" "author" "auto" "autos" "avianca" "aw" "aws" "ax" "axa" "az" "azure" "ba" "baby" "baidu" "banamex" "bananarepublic" "band" "bank" "bar" "barcelona" "barclaycard" "barclays" "barefoot" "bargains" "baseball" "basketball" "bauhaus" "bayern" "bb" "bbc" "bbt" "bbva" "bcg" "bcn" "bd" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// USAGE: hsd --log-console=false --plugins=/path/to/this/file/renewal-count-plugin.js | |
'use strict'; | |
const fs = require('fs').promises; | |
const layout = require('hsd/lib/blockchain/layout'); | |
const { types } = require('hsd/lib/covenants/rules'); | |
const TXMeta = require('hsd/lib/primitives/txmeta'); | |
const plugin = exports; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// node list-transferring-names.js | |
const { NodeClient, WalletClient } = require('hs-client'); | |
const { Network } = require('hsd'); | |
// Edit these: | |
const NETWORK = 'main'; | |
const API_KEY = 'api-key-here'; | |
const WALLET_NAME = 'walletname'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// run: node api-key.js | |
const os = require('node:os'); | |
const path = require('node:path'); | |
const bdb = require('bdb'); | |
const BOB_DB_LOC = path.join(os.homedir(), '.config/Bob/db'); | |
const WALLET_API_KEY = 'walletApiKey'; | |
const NODE_API_KEY = 'nodeApiKey'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This script finds an address given an account extended public key | |
* Usage: edit these fields below and run it like `node find-address.js` | |
*/ | |
const assert = require('node:assert/strict'); | |
const HDPublicKey = require('hsd/lib/hd/public'); | |
const Address = require('hsd/lib/primitives/address'); | |
// ********** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage | |
# | |
# Install dependencies: | |
# $ pip install selenium beautifulsoup4 | |
# Run: | |
# $ python download-gtlds-applications.py | |
import json | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By |