Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/dfinity/bitcoin-developer-preview
/ functions
Functions
108 in github.com/dfinity/bitcoin-developer-preview
⨍
Functions
108
◇
Types & classes
22
↓ 100 callers
Method
build
(self)
canister/src/test_builder.rs:32
↓ 59 callers
Method
push
Push a new block into the store.
canister/src/blockforest.rs:68
↓ 26 callers
Function
genesis
(merkle_root: TxMerkleNode)
canister/src/test_builder.rs:53
↓ 16 callers
Method
with_transaction
(mut self, transaction: Transaction)
canister/src/test_builder.rs:27
↓ 15 callers
Method
with_output
(mut self, address: &Address, value: u64)
canister/src/test_builder.rs:98
↓ 10 callers
Method
insert_block
Insert a block into the blockchain.
canister/src/store.rs:110
↓ 7 callers
Function
from_proto
Converts a protobuf block into a `Block`.
canister/src/block.rs:51
↓ 6 callers
Method
contains
Returns true if a block exists in the tree, false otherwise.
canister/src/blockforest.rs:290
↓ 6 callers
Method
insert_tx
(&mut self, tx: &Transaction, height: Height)
canister/src/utxoset.rs:48
↓ 5 callers
Function
concat
(mut a: Vec<T>, b: Vec<T>)
canister/src/blockforest.rs:323
↓ 5 callers
Method
depth
(&self)
canister/src/blockforest.rs:275
↓ 4 callers
Method
extend
Extends the tree with the given block. Blocks can extend the tree in the following cases: The block is already present in the tree (no-op). The block
canister/src/blockforest.rs:213
↓ 4 callers
Method
main_chain_height
(&self)
canister/src/store.rs:137
↓ 3 callers
Function
btc_address
Returns the regtest P2PKH address derived from the private key.
examples/rust/src/main.rs:194
↓ 3 callers
Method
insert_outpoint
(&mut self, outpoint: OutPoint, output: TxOut, height: Height)
canister/src/utxoset.rs:111
↓ 3 callers
Method
root
(&self)
canister/src/blockforest.rs:231
↓ 2 callers
Method
anchor_hash
(&self)
canister/src/store.rs:168
↓ 2 callers
Method
blockchains
Returns all the blockchains in the tree.
canister/src/blockforest.rs:256
↓ 2 callers
Function
btc_address_str
()
examples/rust/src/main.rs:52
↓ 2 callers
Function
delay
()
canister/src/adapter-shim.rs:137
↓ 2 callers
Method
find_mut
Returns a `BlockTree` where the hash of the root block matches the provided `block_hash` if it exists, and `None` otherwise.
canister/src/blockforest.rs:241
↓ 2 callers
Method
get_balance
Returns the balance of a bitcoin address.
canister/src/store.rs:57
↓ 2 callers
Method
get_current_chain
Returns the best guess on what the "current" blockchain is. The most likely chain to be "current", we hypothesize, is the longest chain of blocks wit
canister/src/blockforest.rs:100
↓ 2 callers
Method
get_unstable_blocks
(&self)
canister/src/store.rs:144
↓ 2 callers
Method
get_utxos
Returns the set of UTXOs for a given bitcoin address. Transactions with confirmations < `min_confirmations` are not considered.
canister/src/store.rs:71
↓ 2 callers
Method
into_set
(self)
canister/src/utxoset.rs:53
↓ 2 callers
Function
solve
(header: &mut BlockHeader)
canister/src/test_builder.rs:160
↓ 2 callers
Method
to_proto
(&self)
canister/src/store.rs:148
↓ 1 callers
Function
build_transaction
Builds a transaction that sends the given `amount` of satoshis to the `destination` address.
examples/common/src/lib.rs:22
↓ 1 callers
Method
get_blocks
(&self)
canister/src/blockforest.rs:157
↓ 1 callers
Function
get_p2pkh_address
(private_key: &PrivateKey, network: Network)
examples/common/src/lib.rs:16
↓ 1 callers
Function
get_utxos
()
examples/rust/src/main.rs:58
↓ 1 callers
Function
header
(prev_header: &BlockHeader, merkle_root: TxMerkleNode)
canister/src/test_builder.rs:143
↓ 1 callers
Method
insert_unspent_txs
Iterates over transaction outputs and adds unspents.
canister/src/utxoset.rs:101
↓ 1 callers
Method
pop
Pop a block that is a successor to the `anchor` iff the block is stable.
canister/src/blockforest.rs:24
↓ 1 callers
Function
process_chain
(state: &mut State, num_blocks: u32)
canister/src/store.rs:187
↓ 1 callers
Method
remove_spent_txs
Iterates over transaction inputs and removes spent outputs.
canister/src/utxoset.rs:58
↓ 1 callers
Function
sign_transaction
Sign a bitcoin transaction given the private key and the source address of the funds. Constraints: All the inputs are referencing outpoints that are
examples/common/src/lib.rs:91
↓ 1 callers
Method
stable_height
(&self)
canister/src/store.rs:133
↓ 1 callers
Method
take_tree
(&mut self, root_block_hash: &BlockHash)
canister/src/blockforest.rs:148
↓ 1 callers
Function
to_proto
Converts a `Block` into a protobuf struct.
canister/src/block.rs:8
Function
balance
()
examples/rust/src/main.rs:92
Function
build_transaction
( utxos: Vec<Utxo>, source_address: String, destination_address: String, amount: u64, fees
examples/common/src/main.rs:46
Function
check_candid_interface_compatibility
()
canister/src/main.rs:158
Function
check_candid_interface_compatibility
()
examples/common/src/main.rs:108
Method
coinbase
()
canister/src/test_builder.rs:82
Function
coinbase_tx
()
canister/src/utxoset.rs:209
Function
detached_blocks
()
canister/src/blockforest.rs:390
Function
detached_blocks_2
()
canister/src/blockforest.rs:422
Function
empty
()
canister/src/blockforest.rs:334
Function
forks
()
canister/src/blockforest.rs:357
Method
from
(err: GetUtxosError)
types/src/lib.rs:55
Method
from
(network: Network)
canister/src/candid_types.rs:25
Method
from_proto
(utxos_proto: proto::UtxoSet)
canister/src/utxoset.rs:165
Method
from_proto
(proto_state: proto::State)
canister/src/store.rs:157
Method
from_proto
(block_forest_proto: proto::BlockForest)
canister/src/blockforest.rs:173
Method
genesis
()
canister/src/test_builder.rs:13
Function
get_balance
(request: GetBalanceRequest)
canister/src/main.rs:32
Function
get_balance_malformed_address
()
canister/src/main.rs:240
Function
get_balance_test
()
canister/src/main.rs:262
Function
get_current_chain_empty
()
canister/src/blockforest.rs:688
Function
get_current_chain_fork_at_first_block
()
canister/src/blockforest.rs:588
Function
get_current_chain_longer_fork
()
canister/src/blockforest.rs:563
Function
get_current_chain_multiple_forks
()
canister/src/blockforest.rs:621
Function
get_current_chain_multiple_forks_2
()
canister/src/blockforest.rs:660
Function
get_current_chain_single_blockchain
()
canister/src/blockforest.rs:519
Function
get_current_chain_two_contesting_trees
()
canister/src/blockforest.rs:541
Function
get_outgoing_transaction
()
canister/src/main.rs:122
Function
get_p2pkh_address
(private_key_wif: String, network: NetworkCandid)
examples/common/src/main.rs:32
Function
get_successors_request
()
canister/src/main.rs:98
Function
get_successors_response
(response_vec: Vec<u8>)
canister/src/main.rs:129
Function
get_utxos
(request: GetUtxosRequest)
canister/src/main.rs:44
Method
get_utxos
Returns the `UtxoSet` of a given bitcoin address.
canister/src/utxoset.rs:37
Function
get_utxos_does_not_include_other_addresses
()
canister/src/store.rs:494
Function
get_utxos_from_existing_utxo_set
()
canister/src/main.rs:191
Function
get_utxos_malformed_address
()
canister/src/main.rs:251
Function
get_utxos_min_confirmations
()
canister/src/main.rs:363
Function
get_utxos_min_confirmations_greater_than_chain_height
()
canister/src/store.rs:460
Function
has_outgoing_transaction
()
canister/src/main.rs:116
Function
init
(payload: InitPayload)
examples/rust/src/main.rs:42
Function
insert_in_order
()
canister/src/blockforest.rs:454
Function
insert_in_reverse_order
()
canister/src/blockforest.rs:471
Function
insert_predecessor
()
canister/src/blockforest.rs:440
Function
main
()
canister/build.rs:2
Function
main
()
canister/src/main.rs:147
Function
main
()
canister/src/adapter-shim.rs:16
Function
main
()
canister/src/sync_demo.rs:20
Function
main
()
examples/rust/src/main.rs:198
Function
main
()
examples/common/src/main.rs:101
Function
malformed_transaction
()
canister/src/main.rs:498
Method
new
(strict: bool, network: Network)
canister/src/utxoset.rs:27
Method
new
Create a new blockchain. The `delta` parameter specifies how many confirmations a block needs before it is considered stable. Stable blocks are assum
canister/src/store.rs:40
Method
new
(delta: u64)
canister/src/blockforest.rs:16
Function
process_100k_blocks
()
canister/src/store.rs:385
Function
send
(amount: u64, destination: String)
examples/rust/src/main.rs:127
Function
send_transaction
(request: SendTransactionRequest)
canister/src/main.rs:78
Function
sign_transaction
( private_key_wif: String, serialized_transaction: Vec<u8>, source_address: String, )
examples/common/src/main.rs:87
Function
single_chain
()
canister/src/blockforest.rs:342
Function
spending
()
canister/src/utxoset.rs:244
Function
to_from_proto
()
canister/src/store.rs:235
next →
1–100 of 108, ranked by callers