import JSONRequest from '../jsonrequest.js'; import { HTTPClientResponse } from '../../client.js'; import { SuggestedParams } from '../../../types/transactions/base.js'; /** * SuggestedParamsFromAlgod contains the suggested parameters for a new transaction, as returned by * the algod REST API. * * This exists because the SuggestedParams interface is purposefully general (e.g. fee can be a * number or a bigint), and compared to that the algod API returns a narrower type. */ export interface SuggestedParamsFromAlgod extends SuggestedParams { flatFee: boolean; fee: bigint; minFee: bigint; firstValid: bigint; lastValid: bigint; genesisID: string; genesisHash: Uint8Array; /** * ConsensusVersion indicates the consensus protocol version as of the last round. */ consensusVersion: string; } /** * Returns the common needed parameters for a new transaction, in a format the transaction builder expects */ export default class SuggestedParamsRequest extends JSONRequest { path(): string; prepare(response: HTTPClientResponse): SuggestedParamsFromAlgod; }