We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bitcoin-mock-rpc is a neat rust library for creating a mock bitcoind-like interface that runs entirely in-process using an SQLite backend.
bitcoin-mock-rpc
This can allow testing a complete funding+spending flow directly within Minsc code. The most minimal API necessary to enable this is:
node::fund(scriptPubKey, amount) -> (txid, vout)
node::broadcast(tx) -> txid
node::generate() -> blockhash
node()
Qs
Example use:
$alice = tprv8ZgxMBicQKsPfJtqwiW9WhjJHPZtDo8aUbCkkcG8sjHbpZqjghF6ZJ1Tze9fUHrhYyXSNfw5VPbCKEkoFKaDRUzctbSxmxSWNfAGDonxcTG; $coin = node::fund(wpkh($alice/0), 1.5 BTC); $psbt = psbt [ "input": [ "prevout": $coin, "utxo": wpkh($alice/0):1.5 BTC, ], "output": bcrt1ql8nqx3q3v7napchr6ewy4tpyq5y08ywat84pen:1.499 BTC ]; $signed = psbt::sign($psbt, $alice); $tx = psbt::extract(psbt::finalize($signed)); $txid = node::broadcast($tx);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
bitcoin-mock-rpc
is a neat rust library for creating a mock bitcoind-like interface that runs entirely in-process using an SQLite backend.This can allow testing a complete funding+spending flow directly within Minsc code. The most minimal API necessary to enable this is:
node::fund(scriptPubKey, amount) -> (txid, vout)
node::broadcast(tx) -> txid
node::generate() -> blockhash
node()
constructor instead of using a singleton)Qs
Example use:
The text was updated successfully, but these errors were encountered: