/** * Catapult REST Endpoints * OpenAPI Specification of catapult-rest * * The version of the OpenAPI document: 1.0.5 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { NetworkTypeEnum } from './NetworkTypeEnum'; /** * Block header data. Contains the height, timestamp, difficulty, VRF proof, * hashes linking to the previous block, transactions, receipts, and state, * plus `feeMultiplier` and optional `beneficiaryAddress` (reward recipient). * The harvester is identified by `signerPublicKey`. * * @export * @interface BlockDTO */ export interface BlockDTO { /** * Unsigned 32-bit integer. * Represented as integer since it fits in JSON number precision. * * @type {number} * @memberof BlockDTO */ size: number; /** * 64-byte Ed25519 signature (128 hex characters). Generated by the signer using their private key * over the serialized entity payload. Can be verified with the signer's public key (`signerPublicKey`). * Used for blocks, transactions, and cosignatures. * * @type {string} * @memberof BlockDTO */ signature: string; /** * 256-bit public key encoded as a hexadecimal string (64 hex characters). * @type {string} * @memberof BlockDTO */ signerPublicKey: string; /** * Entity version. Indicates the schema variant for serialization and validation. * @type {number} * @memberof BlockDTO */ version: number; /** * Network type (mainnet or testnet). Ensures the entity targets the correct network. * @type {NetworkTypeEnum} * @memberof BlockDTO */ network: NetworkTypeEnum; /** * Entity type identifier (e.g. transaction type code, block type). Determines the entity schema. * @type {number} * @memberof BlockDTO */ type: number; /** * Height of a block in the blockchain. Starts at 1 and increments by one per block. * Represented as a string to preserve precision, since the value is an unsigned 64-bit integer. * * @type {string} * @memberof BlockDTO */ height: string; /** * Network timestamp in **milliseconds** since the creation of the nemesis (first) block. * Used for block timestamps, transaction deadlines, and time synchronization. * * **Finding the nemesis block time:** The `epochAdjustment` field returned by the * [`/network/properties`] endpoint gives the nemesis block creation time in seconds since the * [UNIX epoch](https://en.wikipedia.org/wiki/Unix_time). For Symbol MAINNET this is * always `1615853185` (15 March 2021, 00:06:25 UTC). * * **Converting to real time:** Add this timestamp (ms) to `epochAdjustment × 1000` (ms), then use standard date functions. * Note: `epochAdjustment` may be returned as a string like `"1615853185s"`; use the numeric part. * * @type {string} * @memberof BlockDTO */ timestamp: string; /** * Block difficulty. Determines how hard it is to harvest a new block, based on previous blocks. * The initial difficulty is 100'000'000'000'000 (1e14) and remains at this level as long as blocks * are generated every `blockGenerationTargetTime` seconds (network property). * When block generation times deviate from the target, the difficulty is adjusted dynamically * in the range of 10'000'000'000'000 (1e13) to 100'000'000'000'000'000 (1e15) to maintain * the target block creation rate. See the * [Technical Reference](https://symbol.github.io/symbol-technicalref/main.pdf) section 8.1. * Represented as a string to preserve precision (unsigned 64-bit integer). * * @type {string} * @memberof BlockDTO */ difficulty: string; /** * 32-byte (64 hex characters) VRF proof gamma. Part of the block's * [generation hash proof](https://docs.symbol.dev/concepts/block.html#header) (VrfProof). * The gamma value is the first component of the VRF output; it is combined with * `proofScalar` and `proofVerificationHash` to form the complete verifiable proof. * * @type {string} * @memberof BlockDTO */ proofGamma: string; /** * 16-byte (32 hex characters) VRF proof verification hash. Part of the block's * [generation hash proof](https://docs.symbol.dev/concepts/block.html#header) (VrfProof), * together with `proofGamma` and `proofScalar`. * The harvester generates this proof using its VRF private key; the verification hash * allows anyone with the VRF public key to verify that the proof was correctly computed * without revealing the private key. * * @type {string} * @memberof BlockDTO */ proofVerificationHash: string; /** * 32-byte (64 hex characters) VRF proof scalar. Part of the block's * [generation hash proof](https://docs.symbol.dev/concepts/block.html#header) (VrfProof). * The scalar proves that the gamma value was correctly derived from the VRF input * without revealing the harvester's private key. * * @type {string} * @memberof BlockDTO */ proofScalar: string; /** * 256-bit hash encoded as a 64-character hexadecimal string. * @type {string} * @memberof BlockDTO */ previousBlockHash: string; /** * 256-bit hash encoded as a 64-character hexadecimal string. * @type {string} * @memberof BlockDTO */ transactionsHash: string; /** * 256-bit hash encoded as a 64-character hexadecimal string. * @type {string} * @memberof BlockDTO */ receiptsHash: string; /** * 256-bit hash encoded as a 64-character hexadecimal string. * @type {string} * @memberof BlockDTO */ stateHash: string; /** * Address encoded as a 48-character hexadecimal string (24 bytes). * The REST API returns addresses in this format. For Base32-encoded addresses (39 chars) see `Address`. * * @type {string} * @memberof BlockDTO */ beneficiaryAddress: string; /** * Fee multiplier applied to the size of a transaction to obtain its fee, in * [absolute units](https://docs.symbol.dev/concepts/mosaic.html#divisibility). * Set by the harvester when creating a block; stored in the block header. * * The effective fee for a transaction is: * * `effectiveFee = transaction.size × block.feeMultiplier` * * Node owners can configure the fee multiplier to any non-negative value (including zero). * For transaction senders, the median fee multiplier over recent blocks is available * via `/network/fees/transaction`; using `medianFeeMultiplier` or higher * improves chances of inclusion. See the [fees documentation](https://docs.symbol.dev/concepts/fees.html). * * @type {number} * @memberof BlockDTO */ feeMultiplier: number; } /** * Check if a given object implements the BlockDTO interface. */ export declare function instanceOfBlockDTO(value: Record): value is BlockDTO; export declare function BlockDTOFromJSON(json: any): BlockDTO; export declare function BlockDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): BlockDTO; export declare function BlockDTOToJSON(json: any): BlockDTO; export declare function BlockDTOToJSONTyped(value?: BlockDTO | null, ignoreDiscriminator?: boolean): any;