bitcoin_get_balance
This section is a work in progress.
Examples:
import { Canister, ic, None, text, update } from 'azle/experimental';
import { managementCanister, Satoshi } from 'azle/canisters/management';
const BITCOIN_API_CYCLE_COST = 100_000_000n;
export default Canister({
getBalance: update([text], Satoshi, async (address) => {
return await ic.call(managementCanister.bitcoin_get_balance, {
args: [
{
address,
min_confirmations: None,
network: { Regtest: null }
}
],
cycles: BITCOIN_API_CYCLE_COST
});
})
});