Skip to content

Instantly share code, notes, and snippets.

View tegila's full-sized avatar

Edson Tégila tegila

View GitHub Profile
@tegila
tegila / nostr.noble.js
Last active September 5, 2024 15:06
Awesome work from @fiatjaf and @paulmillr resulting in total integration between #nostr and #bitcoin
const log = console.log;
import { hex } from '@scure/base';
import * as btc from '@scure/btc-signer';
import { secp256k1, schnorr as secp256k1_schnorr } from '@noble/curves/secp256k1';
import { bech32 } from '@scure/base';
const privKey = secp256k1.utils.randomPrivateKey();
//const privKey = hex.decode('');
log('privKey', hex.encode(privKey));