CkBTCMinterCanister
Defined in: packages/ckbtc/src/minter.canister.ts:42
Extends
Section titled “Extends”Canister<CkBTCMinterService>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”
protectednew CkBTCMinterCanister(id,service,certifiedService):CkBTCMinterCanister
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”CkBTCMinterCanister
Inherited from
Section titled “Inherited from”Canister<CkBTCMinterService>.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”estimateWithdrawalFee()
Section titled “estimateWithdrawalFee()”estimateWithdrawalFee(
params):Promise<EstimateWithdrawalFee>
Defined in: packages/ckbtc/src/minter.canister.ts:239
Returns an estimation of the user’s fee (in Satoshi) for a retrieve_btc request based on the current status of the Bitcoin network and the fee related to the minter.
Parameters
Section titled “Parameters”params
Section titled “params”The parameters to estimate the fee.
Returns
Section titled “Returns”Promise<EstimateWithdrawalFee>
getBtcAddress()
Section titled “getBtcAddress()”getBtcAddress(
params):Promise<string>
Defined in: packages/ckbtc/src/minter.canister.ts:64
Returns a BTC address for a given account.
Note: an update call is required by the Minter canister.
Parameters
Section titled “Parameters”params
Section titled “params”The parameters for which a BTC address should be resolved.
Returns
Section titled “Returns”Promise<string>
The BTC address of the given account.
getKnownUtxos()
Section titled “getKnownUtxos()”getKnownUtxos(
params):Promise<Utxo[]>
Defined in: packages/ckbtc/src/minter.canister.ts:266
Returns UTXOs of the given account known by the minter.
Parameters
Section titled “Parameters”params
Section titled “params”The parameters for which the known utxos should be resolved.
Returns
Section titled “Returns”Promise<Utxo[]>
The known utxos (with no guarantee in the ordering).
getMinterInfo()
Section titled “getMinterInfo()”getMinterInfo(
params):Promise<MinterInfo>
Defined in: packages/ckbtc/src/minter.canister.ts:253
Returns internal minter parameters such as the minimal amount to retrieve BTC, minimal number of confirmations or KYT fee.
Parameters
Section titled “Parameters”params
Section titled “params”QueryParams
The parameters to get the minter info.
Returns
Section titled “Returns”Promise<MinterInfo>
getWithdrawalAccount()
Section titled “getWithdrawalAccount()”getWithdrawalAccount():
Promise<Account>
Defined in: packages/ckbtc/src/minter.canister.ts:106
Returns the account to which the caller should deposit ckBTC before withdrawing BTC using the [retrieveBtc] endpoint.
Returns
Section titled “Returns”Promise<Account>
The account to which ckBTC needs to be transferred. Provide corresponding information to map an Icrc1 account.
retrieveBtc()
Section titled “retrieveBtc()”retrieveBtc(
params):Promise<RetrieveBtcOk>
Defined in: packages/ckbtc/src/minter.canister.ts:125
Submits a request to convert ckBTC to BTC.
Note:
The BTC retrieval process is slow. Instead of synchronously waiting for a BTC transaction to settle, this method returns a request ([block_index]) that the caller can use to query the request status.
Preconditions:
The caller deposited the requested amount in ckBTC to the account that the [getWithdrawalAccount] endpoint returns.
Parameters
Section titled “Parameters”params
Section titled “params”The parameters are the bitcoin address and amount to convert.
Returns
Section titled “Returns”Promise<RetrieveBtcOk>
The result or the operation.
retrieveBtcStatus()
Section titled “retrieveBtcStatus()”retrieveBtcStatus(
transactionId):Promise<RetrieveBtcStatus>
Defined in: packages/ckbtc/src/minter.canister.ts:187
Returns the status of a specific BTC withdrawal based on the transaction ID of the corresponding burn transaction.
Parameters
Section titled “Parameters”transactionId
Section titled “transactionId”The ID of the corresponding burn transaction.
certified
Section titled “certified”boolean
transactionId
Section titled “transactionId”bigint
Returns
Section titled “Returns”Promise<RetrieveBtcStatus>
The status of the BTC retrieval request.
retrieveBtcStatusV2ByAccount()
Section titled “retrieveBtcStatusV2ByAccount()”retrieveBtcStatusV2ByAccount(
certified):Promise<RetrieveBtcStatusV2WithId[]>
Defined in: packages/ckbtc/src/minter.canister.ts:205
Returns the status of all BTC withdrawals for an account.
Parameters
Section titled “Parameters”certified
Section titled “certified”RetrieveBtcStatusV2ByAccountParams
query or update call
Returns
Section titled “Returns”Promise<RetrieveBtcStatusV2WithId[]>
The statuses of the BTC retrieval requests.
retrieveBtcWithApproval()
Section titled “retrieveBtcWithApproval()”retrieveBtcWithApproval(
__namedParameters):Promise<RetrieveBtcOk>
Defined in: packages/ckbtc/src/minter.canister.ts:155
Submits a request to convert ckBTC to BTC after making an ICRC-2 approval.
The BTC retrieval process is slow. Instead of synchronously waiting for a BTC transaction to settle, this method returns a request ([block_index]) that the caller can use to query the request status.
Preconditions
Section titled “Preconditions”The caller allowed the minter’s principal to spend its funds using [icrc2_approve] on the ckBTC ledger.
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”address
Section titled “address”string
amount
Section titled “amount”bigint
fromSubaccount?
Section titled “fromSubaccount?”Uint8Array<ArrayBufferLike>
Returns
Section titled “Returns”Promise<RetrieveBtcOk>
The result or the operation.
updateBalance()
Section titled “updateBalance()”updateBalance(
params):Promise<UpdateBalanceOk>
Defined in: packages/ckbtc/src/minter.canister.ts:83
Notify the minter about the bitcoin transfer.
Upon successful notification, new ckBTC should be available on the targeted address.
Parameters
Section titled “Parameters”params
Section titled “params”The parameters are the address to which bitcoin where transferred.
Returns
Section titled “Returns”Promise<UpdateBalanceOk>
The result of the balance update.
create()
Section titled “create()”
staticcreate(options):CkBTCMinterCanister
Defined in: packages/ckbtc/src/minter.canister.ts:43
Parameters
Section titled “Parameters”options
Section titled “options”CkBTCCanisterOptions<_SERVICE>
Returns
Section titled “Returns”CkBTCMinterCanister