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

<table><thead><tr><th width="243">EstimateEtchParams </th><th>Description</th></tr></thead><tbody><tr><td><code>runeName</code></td><td>a string representing the <a href="https://docs.ordinals.com/runes.html#name">name of the Rune </a>to etch</td></tr><tr><td><code>divisibility</code> <br>(<span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span> optional)</td><td>a number representing the rune's <a href="https://docs.ordinals.com/runes.html#divisibility">divisibility</a>, i.e. how finely it may be divided into its atomic units. Divisibility is expressed as the number of digits permissible after the decimal point in an amount of runes. The default value is 0.</td></tr><tr><td><code>symbol</code> (<span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span> optional)</td><td>a string representing the rune's currency <a href="https://docs.ordinals.com/runes.html#symbol">symbol</a> as a single <a data-footnote-ref href="#user-content-fn-1">Unicode code point</a>. If a rune does not have a symbol, the generic currency sign <code>¤</code>, also called a scarab, should be used</td></tr><tr><td><code>premine</code> (<span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span> optional) </td><td>a string representing rune <a href="https://docs.ordinals.com/runes.html#premine">premine</a>: the amount of rune units which the etcher can optionally allocate to themselves.</td></tr><tr><td><code>isMintable</code> </td><td>a boolean indicating if the rune may have an open mint, allowing anyone to create and allocate units of that rune for themselves.</td></tr><tr><td><code>terms</code> (<span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span> optional) </td><td><p>an object describing the <a href="https://docs.ordinals.com/runes.html#terms">terms</a> governing minting if the rune is mintable, with the below properties:</p><ul><li><code>amount</code> a string representing the fixed amount of new units of the rune that each mint transaction creates</li><li><code>cap</code> a string representing the number of times a rune may be minted.</li><li><code>heightStart</code> the mint is open starting in the block with the given start height.<br><span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span>Optional</li><li><code>heightEnd</code> the rune may not be minted in or after the block with the given end height.<br><span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span>Optional</li><li><code>offsetStart</code> the mint is open starting in the block whose height is equal to the start offset plus the height of the block in which the rune was etched.<br><span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span>Optional</li><li><code>offsetEnd</code> the rune may not be minted in or after the block whose height is equal to the end offset plus the height of the block in which the rune was etched.<br><span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span>Optional</li></ul></td></tr><tr><td><code>inscriptionDetails</code> <br>(<span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span> optional) </td><td><p></p><p>You can optionally use the Rune etching transactions to inscribe some content for your user:<br>-  the inscription will be sent to the specified <code>destinationAddress</code>, along with  the etched Runes<br>- the etched Runes will be linked to the inscription<br><br>If  you wish to use that option, pass an <code>inscriptionDetails</code> object with the below properties to specify the content to inscribe:</p><ul><li><code>contentType</code> a string representing the content/mime type of the content being inscribed. Make sure you extract and pass the correct content type for the content you wish to inscribe</li><li><code>contentBase64</code> a string representing the content you wish to inscribe, encoded in Base64 format</li></ul></td></tr><tr><td><code>delegateInscriptionId</code> <br>(<span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span> optional) </td><td><p>If you wish to use the Rune etching transactions to create an inscription, you can optionally nominate a <a href="https://docs.ordinals.com/inscriptions/delegate.html">delegate</a> for your inscription, as an <strong>alternative</strong> to specifying its content with <code>inscriptionDetail</code> (see above)</p><p></p><p>You can <strong>instead</strong> choose to pass a <code>delegateInscriptionId</code> string representing the serialized binary inscription ID of the delegate.</p></td></tr><tr><td><code>turbo</code> <br>(<span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span> optional)</td><td>a boolean marking the rune etching as opting into future rune protocol changes if set to <code>true</code> <br>According to the <a href="https://docs.ordinals.com/runes/specification.html">Runes specifications</a>: <em>These protocol changes may increase light client validation costs, or just be highly degenerate</em> <br><span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span>the default value is <code>false</code> </td></tr><tr><td><code>destinationAddress</code></td><td>The Bitcoin address to which the minted runes should be allocated.<br><span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span>If minting Runes for your user, you can fetch their wallet addresses with the <a href="../../wallet-methods/wallet_getaccount">getAccounts</a> method. <br><span data-gb-custom-inline data-tag="emoji" data-code="26a0">⚠️</span> We recommend managing runes holdings on taproot/ordinal addresses.</td></tr><tr><td><code>feeRate</code></td><td>a number representing the desired fee rate to set for the Rune etch transactions, in sats per vbytes</td></tr><tr><td><code>appServiceFee</code> (<span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span> optional)</td><td>a number representing the sats value of the fee to charge your user for your service. </td></tr><tr><td><code>appServiceFeeAddress</code> (<span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span> optional)</td><td>a string representing the Bitcoin address which will receive the  <code>appServiceFee</code>, if a fee is specified</td></tr><tr><td><code>network</code> (<span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span> optional)</td><td>a string representing the Bitcoin network to use for the etch transactions: <code>'Mainnet'</code> or <code>'Testnet'</code></td></tr></tbody></table>

```typescript

   import { request } from "sats-connect";
     
    const response = await 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:

<table><thead><tr><th width="296">EstimateEtchResponse property </th><th>Description</th></tr></thead><tbody><tr><td><code>totalSize</code></td><td>a number representing the total size of the etch transactions, in vbytes </td></tr><tr><td><code>totalCost</code></td><td>a number representing the total cost of the etch transactions in sats</td></tr><tr><td><code>costBreakdown</code></td><td><p>An object representing the cost breakdown of the etch transactions, with the below properties:</p><ul><li><code>postage</code> a number representing the total size of the Rune UTXOs etched, in sats</li><li><code>networkFee</code> a number representing the total network fee for the etch transactions, in sats</li><li><code>serviceFee</code> a number representing the total Sats Connect fee for processing the etch order, in sats</li><li><code>appServiceFee</code> a number representing the optional service fee your app charges the user for the etch order</li></ul></td></tr></tbody></table>

See the [runes\_etch](https://docs.xverse.app/sats-connect/bitcoin-methods/etch-runes/runes_etch) method if you wish to execute a Runes etch order after estimating its cost.

[^1]:
