The LoadedStorage interface is a key-value map for pre-loaded contract storage data. Keys are storage slot identifiers and values are arrays of strings representing the stored data.
ITransactionParameters
Overview
The transaction parameter interfaces define the configuration options for building different transaction types in the OP_NET network. These interfaces extend a common base to provide type-safe parameters for funding transactions, contract interactions, and contract deployments. Each interface specifies required and optional fields for UTXOs, fees, calldata, challenge solutions, and advanced features like address rotation and ML-DSA public key linking.
The full source code is available on GitHub at ITransactionParameters.ts.
Import
import { ITransactionParameters } from '@btc-vision/transaction';Interfaces
interface LoadedStorage {
[key: string]: string[];
}| Name | Type | Required | Description |
|---|---|---|---|
| [key: string] | string[] | No |
interface ITransactionParameters extends ITweakedTransactionData {
readonly from?: string;
readonly to?: string;
readonly debugFees?: boolean;
readonly revealMLDSAPublicKey?: boolean;
readonly linkMLDSAPublicKeyToAddress?: boolean;
utxos: UTXO[];
nonWitnessUtxo?: Uint8Array;
estimatedFees?: bigint;
optionalInputs?: UTXO[];
optionalOutputs?: PsbtOutputExtended[];
chainId?: ChainId;
noSignatures?: boolean;
readonly note?: string | Uint8Array;
readonly anchor?: boolean;
readonly feeRate: number;
readonly priorityFee: bigint;
readonly gasSatFee: bigint;
readonly compiledTargetScript?: Uint8Array | string;
}The ITransactionParameters interface serves as the base configuration for all transaction types. It extends ITweakedTransactionData and includes additional fields.
| Name | Type | Required | Description |
|---|---|---|---|
| from | string | No | Sender address. |
| to | string | No | Recipient address. |
| debugFees | boolean | No | |
| revealMLDSAPublicKey | boolean | No | |
| linkMLDSAPublicKeyToAddress | boolean | No | |
| utxos | UTXO[] | Yes | Unspent outputs to fund the transaction. |
| nonWitnessUtxo | Uint8Array | No | |
| estimatedFees | bigint | No | |
| optionalInputs | UTXO[] | No | |
| optionalOutputs | PsbtOutputExtended[] | No | |
| chainId | ChainId | No | |
| noSignatures | boolean | No | |
| note | string | Uint8Array | No | |
| anchor | boolean | No | |
| feeRate | number | Yes | Fee rate in sat/vB. |
| priorityFee | bigint | Yes | OP_NET priority fee in satoshis. |
| gasSatFee | bigint | Yes | OP_NET gas fee in satoshis. |
| compiledTargetScript | Uint8Array | string | No | |
| addressRotation | AddressRotationConfigBase | No |