Welcome to the Plan B hackathon! This section will get you up and running quickly with Bitcoin's Arkade virtual layer.
Before building with the SDK, let's experience Arkade firsthand with our ready-made PWA wallet:
Welcome to the Plan B hackathon! This section will get you up and running quickly with Bitcoin's Arkade virtual layer.
Before building with the SDK, let's experience Arkade firsthand with our ready-made PWA wallet:
import { fetchWithL402 } from "alby-tools"; | |
import { webln } from "alby-js-sdk"; | |
import 'websocket-polyfill'; | |
import * as crypto from 'crypto'; // or 'node:crypto' | |
globalThis.crypto = crypto; | |
const nwcURL = process.env.NWC_URL; | |
async function main() { | |
const nwc = new webln.NWC({ nostrWalletConnectUrl: nwcURL }); |
const ElectrumClient = require('@mempool/electrum-client'); | |
async function main() { | |
const client = new ElectrumClient(465, "blockstream.info", "ssl"); | |
await client.initElectrum({ client: 'electrum-client-js', version: '1.4' }, { | |
retryPeriod: 5000, | |
maxRetry: 10, | |
pingPeriod: 5000, |
import * as ecc from 'tiny-secp256k1'; | |
import { AssetHash, confidential, networks, address, Psbt, script } from 'liquidjs-lib'; | |
import { craftMultipleRecipientsPset, greedyCoinSelector, UnblindedOutput, AddressInterface } from 'ldk'; | |
async function main() { | |
// 0. First, let's get our coins available from marina | |
// NOTICE: This is not yet deployed version yet 👉 https://github.com/vulpemventures/marina/issues/342 | |
// Can be done now with LDK's `fetchAndUnblindUtxos` method | |
const coins = await window.marina.getCoins(); |
BloomRPC
https://github.com/bloomrpc/bloomrpc/releasestrade.proto
ie. wget https://raw.githubusercontent.com/tdex-network/tdex-protobuf/master/trade.proto
You need to know the provider endpoint first. A public list of providers can be found here
const base64url = require('base64url') | |
const decodeUriComponent = require('decode-uri-component') | |
const fs = require('fs') | |
const untildify = require('untildify') | |
/** | |
* decode a tls certificate from a base64 encoded url string. | |
* @param {String} certString base64url encoded string to decode | |
* @return {String} decoded certificate |
version: "3.7" | |
services: | |
# TDEX daemon connected to Blockstream.info explorer | |
tdexd: | |
container_name: "tdexd" | |
image: ghcr.io/tdex-network/tdexd:latest | |
restart: unless-stopped | |
environment: | |
- TDEX_LOG_LEVEL=5 # 5 for Debug. 4 for production |
/* MODIFIED BOOTSTRAP 4 – Custom BTCPay Server version. | |
* | |
* This file overrides the bootstrap variables with CSS custom properties | |
* that get defined in the root.scss file. Every variable we want to edit | |
* we need to set to a `--btcpay-` custom property and set it in the root. | |
*/ | |
*, | |
*::before, | |
*::after { |
const bip39 = require("bip39") | |
const bip32 = require("bip32") | |
const slip77 = require("slip77") | |
const liquid = require('liquidjs-lib') | |
const regtest = liquid.networks.regtest | |
try { | |
const mnemonic = bip39.generateMnemonic() | |
const seed = await bip39.mnemonicToSeed(mnemonic) |