import type { IBlock } from "../models/IBlock"; import { IUTXOInput } from "../models/inputs/IUTXOInput"; import type { IRent } from "../models/IRent"; import type { ITransactionEssence } from "../models/ITransactionEssence"; import type { OutputTypes } from "../models/outputs/outputTypes"; import type { ITransactionPayload } from "../models/payloads/ITransactionPayload"; /** * Helper methods for Transactions. */ export declare class TransactionHelper { /** * The confirmed milestone index length. */ static CONFIRMED_MILESTONE_INDEX_LENGTH: number; /** * The confirmed unix timestamp length. */ static CONFIRMED_UINIX_TIMESTAMP_LENGTH: number; /** * The output Id length. */ static OUTPUT_ID_LENGTH: number; /** * Calculate blockId from a block. * @param block The block. * @returns The blockId. */ static calculateBlockId(block: IBlock): string; /** * Returns the outputId from transation id and output index. * @param transactionId The id of the transaction. * @param outputIndex The index of the output. * @returns The output id. */ static outputIdFromTransactionData(transactionId: string, outputIndex: number): string; /** * Calculate the Transaction Essence hash. * @param essence The transaction essence. * @returns The transaction essence hash. */ static getTransactionEssenceHash(essence: ITransactionEssence): Uint8Array; /** * Calculate the Transaction hash. * @param transactionPayload The payload of the transaction. * @returns The transaction hash. */ static getTransactionPayloadHash(transactionPayload: ITransactionPayload): Uint8Array; /** * Calculate the UTXO input from an output Id. * @param outputId The id of the output. * @returns The UTXO Input. */ static inputFromOutputId(outputId: string): IUTXOInput; /** * Calculate the inputCommitment from the output objects that are used as inputs to fund the transaction. * @param inputs The output objects used as inputs for the transaction. * @returns The inputs commitment. */ static getInputsCommitment(inputs: OutputTypes[]): string; /** * Calculates the required storage deposit of an output. * @param output The output. * @param rentStructure Rent cost of objects which take node resources. * @returns The required storage deposit. */ static getStorageDeposit(output: OutputTypes, rentStructure: IRent): number; /** * Returns the nftId/aliasId from an outputId. * NftId/aliasId is Blake2b-256 hash of the outputId that created it. * @param outputId The id of the output. * @returns The resolved Nft id or Alias id. */ static resolveIdFromOutputId(outputId: string): string; /** * Constructs a tokenId from the aliasId, serial number and token scheme type. * @param aliasId The alias Id of the alias that controls the foundry. * @param serialNumber The serial number of the foundry. * @param tokenSchemeType The tokenSchemeType of the foundry. * @returns The tokenId. */ static constructTokenId(aliasId: string, serialNumber: number, tokenSchemeType: number): string; /** * Calculates the networkId value from the network name. * @param networkName The name of the network. * @returns The networkId. */ static networkIdFromNetworkName(networkName: string): string; }