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

Function sign_transaction

rust/basic_bitcoin/src/p2pkh.rs:76–128  ·  view source on GitHub ↗

Sign a P2PKH 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 P2PKH address.

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

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

build_transactionFunction · 0.70
send_from_p2wpkh_addressFunction · 0.50
send_from_p2pkh_addressFunction · 0.50

Calls 2

to_u32Method · 0.80
to_bytesMethod · 0.45

Tested by

no test coverage detected