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
public function v4() | |
{ | |
return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', | |
// 32 bits for "time_low" | |
mt_rand(0, 0xffff), mt_rand(0, 0xffff), | |
// 16 bits for "time_mid" | |
mt_rand(0, 0xffff), |
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 pkcs11js = require("pkcs11js"); | |
/** | |
* 1 - Carregando a lib que dara suporte as operacoes com PKCS11 | |
*/ | |
const pkcs11 = new pkcs11js.PKCS11(); | |
pkcs11.load("/usr/local/lib/softhsm/libsofthsm2.so"); | |
pkcs11.C_Initialize(); | |
const moduleInfo = pkcs11.C_GetInfo(); | |
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
TP's TestNet Faucet: https://testnet-faucet.mempool.co/ | |
Bitcoin Testnet Sandbox Faucet: https://bitcoinfaucet.uo1.net/ | |
RBF (Replace By Fee) Testnet Faucet: https://tbtc.bitaps.com/ | |
Bitcoin Testnet3 Faucet: https://testnet.coinfaucet.eu/ | |
1ML Testnet Faucet: https://1ml.com/testnet/faucet | |
——- | |
from bitcoinlib.keys import HDKey |
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
from bitcoin.wallet import CBitcoinSecret, P2TRAddress | |
from bitcoin.core import b2x, CMutableTxIn, CMutableTxOut, CMutableTransaction | |
from bitcoin.taproot import TaprootSignatureHash, TaprootSignatureHashV1 | |
# Chave privada | |
private_key = CBitcoinSecret('cVrHYYy9y2cCqscexG38CFSjRqKkzKZrfsGBpsE6jTHuRPz9jYS6') | |
# Endereço Taproot | |
taproot_address = P2TRAddress('tb1qykkq90ss7xj92vgz79fcjv3kmhyv2n6smlt9qh') |
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
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException | |
from bitcoin.core import CMutableTransaction, CMutableTxIn, CMutableTxOut, COutPoint, CScript, x, lx | |
# Configurações de conexão RPC | |
rpc_user = '<seu usuário RPC>' | |
rpc_password = '<sua senha RPC>' | |
rpc_host = '<endereço do seu nó Bitcoin Core>' | |
rpc_port = '<porta do seu nó Bitcoin Core>' | |
# Configuração das informações da transação |
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
from bitcoin.wallet import CBitcoinSecret, P2WPKHScriptHashSegwitAddress | |
from bitcoin.core import CMutableTxIn, CMutableTxOut, CMutableTransaction, Hash160, CTxInWitness, Hash | |
from bitcoin.core.script import CScript, OP_0 | |
from ecdsa import SigningKey, SECP256k1 | |
# Definindo informações da transação | |
prev_txid = "..." # TXID da transação de entrada anterior | |
prev_vout = 0 # Índice da saída de transação de entrada anterior | |
destination_address = "tb1..." |
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
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException | |
# Configurações de conexão com o Bitcoin Core | |
rpc_user = 'seu_rpc_user' | |
rpc_password = 'seu_rpc_password' | |
rpc_host = 'localhost' | |
rpc_port = 8332 | |
# Conecte-se ao nó do Bitcoin Core | |
rpc_connection = AuthServiceProxy(f'http://{rpc_user}:{rpc_password}@{rpc_host}:{rpc_port}') |
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 bitcoin = require('bitcoinjs-lib'); | |
// Replace these values with your actual transaction details | |
const network = bitcoin.networks.testnet; | |
const senderAddress = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; | |
const senderPrivateKey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; | |
const recipientAddress = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; | |
const amount = 0.001; | |
const fee = 5000; // Fee in satoshis |
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
import os | |
import re | |
import sys | |
from pathlib import Path | |
from datetime import datetime | |
from docling.document_converter import DocumentConverter | |
from urllib.parse import urlparse, unquote | |
# ========================= |
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
import os | |
import re | |
import sys | |
from pathlib import Path | |
from datetime import datetime | |
from docling.document_converter import DocumentConverter | |
from urllib.parse import urlparse, unquote | |
# ========================= |
OlderNewer