The PSBT is displayed in the console after executing a scenario. It's a complete hexadecimal string that represents the unsigned Bitcoin transaction.
After PSBT generation, the process stops because the following steps are missing:
- Signing the PSBT with your private key
- Broadcasting the signed transaction to the Bitcoin network
# Simple scenario (OP_RETURN only)
npm run start execute single-op-return TEST_OPI 100
# Two outputs scenario
npm run start execute two-outputs TEST_OPI 42 1010
# External address scenario
npm run start execute external-address TEST_OPI 50 2000 --external-address bc1q...
# Three outputs scenario
npm run start execute three-outputs TEST_OPI 25 1500 --external-address bc1q...# Sign and broadcast (with your WIF key)
npm run start sign-and-broadcast "PSBT_HEX" -w YOUR_PRIVATE_WIF
# Test signing (without broadcast)
npm run start sign-and-broadcast "PSBT_HEX" -w YOUR_PRIVATE_WIF --dry-run# Basic demonstration
npm run demo
# Complete demonstration with analysis
npm run demo:completenpm run start execute two-outputs TEST_OPI 42 1010Result:
📊 Scenario Results:
Scenario: two-outputs
Outputs: 2
OP_RETURN Message: {"p":"brc-20","op":"test_opi","tick":"TEST_OPI","amt":"42"}
PSBT: 70736274ff01007b02000000000200000000000000003d6a3b7b2270223a226272632d3230222c226f70223a22746573745f6f7069222c227469636b223a22544553545f4f5049222c22616d74223a223432227df2030000000000002251205074d7844eb8a887f1ef5676fe4a2f8df77b5e2804153beae6e38af1bac245270000000000000000
✅ PSBT ready for signing and broadcasting
npm run start sign-and-broadcast "70736274ff01007b02000000000200000000000000003d6a3b7b2270223a226272632d3230222c226f70223a22746573745f6f7069222c227469636b223a22544553545f4f5049222c22616d74223a223432227df2030000000000002251205074d7844eb8a887f1ef5676fe4a2f8df77b5e2804153beae6e38af1bac245270000000000000000" -w YOUR_PRIVATE_WIFResult:
✔ Transaction broadcasted successfully!
📊 Transaction Details:
Transaction ID: abc123def456...
Explorer: https://blockstream.info/tx/abc123def456...
Le PSBT contient :
- Version : 2 (PSBT v2)
- Inputs : 0 (transaction without inputs for now)
- Outputs : 2
- Sortie 0 : OP_RETURN avec le message BRC-20
- Sortie 1 : P2TR vers l'adresse de test (1010 sats)
# Bitcoin RPC
BITCOIN_RPC_HOST=127.0.0.1
BITCOIN_RPC_PORT=8332
BITCOIN_RPC_USER=bitcoin
BITCOIN_RPC_PASSWORD=votre_mot_de_passe
# Adresse de test
ADDRESS_OPI_TEST=bc1p2p6d0pzwhz5g0u002em0uj303hmhkh3gqs2nh6hxuw90rwkzg5nsatsphn
# Private key (for signing)
WIF_PRIVATE_KEY=votre_wif_privee- Security : Never share your private WIF key
- Test : Use
--dry-runto test without broadcasting - Network : The project is configured for mainnet
- Fees : Fees are calculated automatically
# Check configuration
npm run start validate-config
# Test Bitcoin connection
npm run start test-connection
# Interactive mode
npm run start interactive
# List scenarios
npm run start list-scenarios- Configure your
.envfile with your real keys - Test with
--dry-runfirst - Sign and broadcast your transactions
- Monitor on Bitcoin explorer
The PSBT is there, you just need to sign and broadcast it! 🚀