🔲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:

GetOrderParamsDescription

orderId

a string representing the Bitcoin network to use for the mint runes transactions: 'Mainnet' or 'Testnet'

import { Wallet } from "sats-connect";

    const response = await Wallet.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:

GetOrderResponse Description

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_mint for a mint order

  • runes_etch for an etch order

state

  • new when the order has only just been created, and your user has not broadcast a funding transaction yet

  • pending when the order awaits the confirmation of your user's funding transaction before being processed

  • executing when the order is being processed and the required runes mint/etch transactions are being broadcast.

  • complete when the order has been processed and all runes mint/etch transactions have been confirmed.

  • failed when the order has failed. See the reason property for the nature of the order failure.

  • refunded when the funding transaction for a failed order has been refunded to your user's specified refund address

  • stale when the order status hasn't progressed from the new state for an extended period of time

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