-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
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
feat: call bitcoin canisters #569
Conversation
e2e-tests/tests/bitcoin_canister.rs
Outdated
disable_api_if_not_fully_synced = variant { enabled }; | ||
}, | ||
)"#; | ||
test_one_network(Network::Mainnet, mainnet_id, mainnet_init_args); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Why not simply call it test_network
?
e2e-tests/tests/bitcoin_canister.rs
Outdated
} | ||
|
||
fn test_one_network(network: Network, btc_id: Principal, init_args: &str) { | ||
// The Bitcoin Canisters can still function without connecting to a `bitcoind` node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// The Bitcoin Canisters can still function without connecting to a `bitcoind` node. | |
// The Bitcoin canisters can still function without connecting to a `bitcoind` node. |
ic-cdk/src/bitcoin_canister.rs
Outdated
@@ -8,3 +8,340 @@ | |||
//! [2]: https://github.com/dfinity/bitcoin-canister/blob/master/INTERFACE_SPECIFICATION.md | |||
|
|||
// TODO: Implementation of the Bitcoin Canister API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment still needed?
Description
The Bitcoin API has been migrated from management canister to calling the Bitcoin Canisters directly.
This PR implements the types and functions in
bitcoin_canister.rs
module.This module follows a similar approach in the
management_canister.rs
module. Please note:ic-btc-interface
crate because it contains some implementation specific details that harm the user experiences. E.g. theNetworkInRequest
type would make users confused.*_query
methods are not included because they cannot be called in replicated mode (inter-canister calls).*_config
methods are not included because they are for the maintainers of the Bitcoin CanistersHow Has This Been Tested?
Added:
Checklist: