🔲runes_getOrder
You can use the runes_getOrder method to fetch the status of
You can specify the Rune mint or etch order whose status you wish to retrieve, by passing a GetOrderParams object to the method, with the below properties:
orderId
a string representing the id of your mint or etch order.
ℹ️ the runes_mint & runes_etch methods will return the order id in their response objects.
network
(ℹ️ optional)
a string representing the Bitcoin network to use for the mint runes transactions: 'Mainnet' or 'Testnet'
import { request } from "sats-connect";
const response = await request('runes_getOrder', {
id: "ORDER_ID",
network?: "Mainnet" });
if (response.status === 'success') {
setTotalCost(response.result.totalCost);
setTotalSize(response.result.totalSize);
} else {
console.error(response.error);
alert('Error Fetching Estimate. See console for details.');
}The runes_getOrder method will not trigger any operation or prompt your user to sign any transaction. It will return a GetOrderResponse object, intended for you and your user to track the status of the order:
orderId
a string representing the id of your mint or etch order.
orderType
a string representing the nature of the order. The possible values are:
runes_mintfor a mint orderrunes_etchfor an etch order
state
A string representing the current status of your order
ℹ️See runes_mint & runes_etch for details on the rune order workflows
The possible values are:
newwhen the order has only just been created, and your user has not broadcast a funding transaction yetpendingwhen the order awaits the confirmation of your user's funding transaction before being processedexecutingwhen the order is being processed and the required runes mint/etch transactions are being broadcast.completewhen the order has been processed and all runes mint/etch transactions have been confirmed.failedwhen the order has failed. See thereasonproperty for the nature of the order failure.refundedwhen the funding transaction for a failed order has been refunded to your user's specified refund addressstalewhen the order status hasn't progressed from thenewstate for an extended period of time
reason (ℹ️ optional)
If the order is in a failed state, a string representing the reason for the failure
createdAt
the creation date for the order (this is the date when the runes_mint or runes_etch method was first invoked)
fundingAddress
a string representing the BTC address which will collect the funds required to process the order, and sign the required mint/etch transactions to process the order.
Last updated