Skip to content

Instantly share code, notes, and snippets.

View danielhumgon's full-sized avatar
🎯
Focusing on skill development and learning.

Daniel Gonzalez danielhumgon

🎯
Focusing on skill development and learning.
View GitHub Profile
@danielhumgon
danielhumgon / index.html
Created November 13, 2021 03:03
WSS Test Page
<!DOCTYPE html>
<!--
This HTML creates a web page that loads an IPFS node. You can interact with it by opening a browser console and interacting
with the 'node' variable.
-->
<html lang="en">
<head>
@danielhumgon
danielhumgon / hydrated-utxos.js
Created October 14, 2021 20:57
Get UTXOs hydrated with SLP token information for an address.
const axios = require('axios').default
const bchAddress = 'bitcoincash:qpnty9t0w93fez04h7yzevujpv8pun204qv6yfuahk'
const SERVER = process.env.SERVER
// Get hydrated UTXOs from an address
const hydrateSLP = async (address) => {
try {
if (!address || typeof address !== 'string') {
@danielhumgon
danielhumgon / bcash-calls.js
Created October 13, 2021 19:06
JS code example for querying the SLP balance of an address.
const axios = require('axios').default
const bchAddress = 'bitcoincash:qpnty9t0w93fez04h7yzevujpv8pun204qv6yfuahk'
const SERVER = process.env.SERVER
// Get SLP balance of an address
const slpBalances = async (address) => {
try {
if (!address || typeof address !== 'string') {