BitcoinCanister
Defined in: packages/ckbtc/src/bitcoin.canister.ts:17
Extends
Section titled “Extends”Canister<BitcoinService>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”
protectednew BitcoinCanister(id,service,certifiedService):BitcoinCanister
Defined in: packages/utils/dist/services/canister.d.ts:7
Parameters
Section titled “Parameters”Principal
service
Section titled “service”_SERVICE
certifiedService
Section titled “certifiedService”_SERVICE
Returns
Section titled “Returns”BitcoinCanister
Inherited from
Section titled “Inherited from”Canister<BitcoinService>.constructor
Properties
Section titled “Properties”caller()
Section titled “caller()”
protectedcaller: (__namedParameters) =>_SERVICE
Defined in: packages/utils/dist/services/canister.d.ts:9
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”QueryParams
Returns
Section titled “Returns”_SERVICE
Inherited from
Section titled “Inherited from”Canister.caller
certifiedService
Section titled “certifiedService”
protectedreadonlycertifiedService:_SERVICE
Defined in: packages/utils/dist/services/canister.d.ts:6
Inherited from
Section titled “Inherited from”Canister.certifiedService
service
Section titled “service”
protectedreadonlyservice:_SERVICE
Defined in: packages/utils/dist/services/canister.d.ts:5
Inherited from
Section titled “Inherited from”Canister.service
Accessors
Section titled “Accessors”canisterId
Section titled “canisterId”Get Signature
Section titled “Get Signature”get canisterId():
Principal
Defined in: packages/utils/dist/services/canister.d.ts:8
Returns
Section titled “Returns”Principal
Inherited from
Section titled “Inherited from”Canister.canisterId
Methods
Section titled “Methods”getBalanceQuery()
Section titled “getBalanceQuery()”getBalanceQuery(
params):Promise<bigint>
Defined in: packages/ckbtc/src/bitcoin.canister.ts:64
Given a get_balance_request, which must specify a Bitcoin address and a Bitcoin network (mainnet, testnet or regtest), the function returns the current balance of this address in Satoshi (10^8 Satoshi = 1 Bitcoin) in the specified Bitcoin network.
⚠️ Note that this method does not support certified calls because only canisters are allowed to get Bitcoin balance via update calls.
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”Promise<bigint>
The balance is returned in Satoshi (10^8 Satoshi = 1 Bitcoin).
https://internetcomputer.org/docs/current/references/ic-interface-spec#ic-bitcoin_get_balance
getUtxosQuery()
Section titled “getUtxosQuery()”getUtxosQuery(
params):Promise<get_utxos_response>
Defined in: packages/ckbtc/src/bitcoin.canister.ts:42
Given a get_utxos_request, which must specify a Bitcoin address and a Bitcoin network (mainnet, testnet or regtest), the function returns all unspent transaction outputs (UTXOs) associated with the provided address in the specified Bitcoin network based on the current view of the Bitcoin blockchain available to the Bitcoin component.
⚠️ Note that this method does not support certified calls because only canisters are allowed to get UTXOs via update calls.
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”Promise<get_utxos_response>
The UTXOs are returned sorted by block height in descending order.
https://internetcomputer.org/docs/current/references/ic-interface-spec#ic-bitcoin_get_utxos
create()
Section titled “create()”
staticcreate(options):BitcoinCanister
Defined in: packages/ckbtc/src/bitcoin.canister.ts:18
Parameters
Section titled “Parameters”options
Section titled “options”CkBTCCanisterOptions<_SERVICE>
Returns
Section titled “Returns”BitcoinCanister