🔲runes_rbfOrder

Therunes_rbfOrder method currently only supports Etch orders. Support for Mint orders will be added soon.

You can use the runes_rbfOrder method to speed up a Rune mint order or a Rune etch order, using the Replace-by-Fee (RBF) mechanism.

You can specify the order you wish to speed up, and the new fee rate to use for the mint/etch transactions, by passing a RbfOrderParams object to the method, with the below properties:

RbfOrderParams PropertyDescription

orderId

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

newFeeRate

a number representing the new increased fee rate to set for the Rune mint transaction(s) or etch transaction, in sats per vbytes

import { Wallet } from "sats-connect";

    const response = await Wallet.request('runes_rbfOrder', { 
      id: "ORDER_ID", 
      network?: "Mainnet",
      newFeeRate: 500 });

    if (response.status === 'success') {
      setFundTxId(response.result.fundRBFTransactionId);
    } else {
      console.error(response.error);
      alert('Error speeding up order. See console for details.');
    }
  };

The runes_rbfOrder method will:

  1. Prompt your user to sign a send Bitcoin transaction, to fund the Runes mint or etch order at the new increased fee rate. ℹī¸ Note that you can use the runes_estimateRbfOrder method to estimate the cost of a speeding up a Rune mint or etch order for your user.

  2. return a RBFOrderResponse object:

RunesMintResponse property Description

orderId

a string representing the ID of the Runes mint or etch order which Sats Connect will speed up with RBF

fundRBFTransactionId

a string representing the ID of the funding transaction required from your user for Sats Connect to speed up the order with RBF, i.e. process the Runes mint or etching transactions at the new increased fee rate

fundingAddress

a string representing the BTC address which will collect the BTC amount required to speed up the order, and sign the replacement mint/etch transactions broadcast at the higher fee rate.

  1. Monitor the confirmation of the funding transaction required from your user to the funding address dedicated to processing the order.

  2. Replace the stuck mint/etch transactions with new transactions broadcast at a higher fee rate, signing with the funding address.

Note that the RBF mechanism can only add inputs to an existing transaction if they are already confirmed. Your user's RBF funding transaction must be confirmed before the new etch/mint transactions can be broadcast. The new transactions with increased fee rates will always lag the RBF funding transaction by at least 1 block.

You can then track the status of a Rune mint or etch order using the runes_getOrder method.

Last updated