runes_estimateEtch

Use the runes_estimateEtch method to estimate the cost of a Rune etch order for your user, before executing it.

You can specify the characteristics of the Runes etch order you wish to estimate, by passing an EstimateEtchParams object to the method, with the below properties:


   import { Wallet } from "sats-connect";
     
    const response = await Wallet.request('runes_estimateEtch', {
      runeName: "UNCOMMONGOODS",
      premine: ,
      isMintable: ,
      destinationAddress: ,
      // add request params described above
    });

    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_estimateEtch method will not trigger any etch operation or prompt your user to sign any transaction. It will return an EstimateEtchResponse object, intended for you and your user to anticipate the etching costs and their breakdown:

See the runes_etch method if you wish to execute a Runes etch order after estimating its cost.

Last updated