Skip to content

addRequestAddAssetIntention

addRequestAddAssetIntention(config, params, options?): Promise<TransactionIntention>

Creates an intention to request adding a new ERC20 asset backed by a Rune. This prepares an EVM transaction that calls requestAddAsset and includes the required Rune deposit for the mapping fee.

Import

ts
import { addRequestAddAssetIntention } from "@midl/executor";

Example

ts
const intention = await addRequestAddAssetIntention(config, {
  address: "0x0000000000000000000000000000000000000000",
  runeId: "840000:1",
  amount: 1000000n,
});

Parameters

NameTypeDescription
configConfigThe configuration object.
paramsAddRequestAddAssetIntentionParamsParameters for the request.
optionsAddRequestAddAssetIntentionOptions (optional)Optional signing configuration.

AddRequestAddAssetIntentionParams

NameTypeDescription
address0x${string}ERC20 contract address.
runeIdstringThe rune ID to associate with the asset.
amountbigintAmount of the rune to deposit.

AddRequestAddAssetIntentionOptions

NameTypeDescription
fromstring (optional)BTC address used to sign the intention.

Returns

Promise<TransactionIntention> — The created transaction intention.

Released under the MIT License