MCPcopy Create free account
hub / github.com/dfinity/examples / sign_transaction

Function sign_transaction

rust/basic_bitcoin/src/p2wpkh.rs:74–124  ·  view source on GitHub ↗

Sign a P2WPKH bitcoin transaction. IMPORTANT: This method is for demonstration purposes only and it only supports signing transactions if: 1. All the inputs are referencing outpoints that are owned by `own_address`. 2. `own_address` is a P2WPKH address.

(
    ctx: &BitcoinContext,
    own_public_key: &PublicKey,
    own_address: &Address,
    mut transaction: Transaction,
    prevouts: &[TxOut],
    derivation_path: Vec<Vec<u8>>,
    signer: SignFun,

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

build_transactionFunction · 0.70

Calls 2

as_refMethod · 0.45
to_bytesMethod · 0.45

Tested by

no test coverage detected