Class DeployHeader

Represents the header of a deploy in the blockchain. The header contains metadata such as the account initiating the deploy, the body hash, gas price, timestamp, TTL, and dependencies.

Hierarchy

  • DeployHeader

Constructors

  • Constructs a DeployHeader instance with the specified parameters.

    Parameters

    • chainName: string = ''

      The name of the blockchain chain.

    • dependencies: Hash[] = []

      A list of deploys that must be executed before this one.

    • gasPrice: number = 1

      The gas price for the deploy.

    • timestamp: Timestamp = ...

      The timestamp when the deploy is created.

    • ttl: Duration = ...

      The TTL for the deploy.

    • Optional account: PublicKey

      The public key of the account initiating the deploy (optional).

    • Optional bodyHash: Hash

      The hash of the body of the deploy (optional).

    Returns DeployHeader

Properties

account?: PublicKey

The public key of the account initiating the deploy. This key is used to verify the identity of the account making the deploy request.

bodyHash?: Hash

The hash of the body of the deploy, which is used to verify the contents of the deploy. The body contains the session logic and payment logic of the deploy.

chainName: string = ''

The name of the blockchain chain that the deploy is associated with. This helps prevent the deploy from being accidentally or maliciously included in a different chain.

dependencies: Hash[] = []

A list of other deploys that must be executed before this one. This ensures dependencies are executed in the correct order.

gasPrice: number = 1

The price of gas for executing the deploy. Gas is used to pay for the computational resources required to process the deploy.

timestamp: Timestamp = ...

The timestamp when the deploy was created. This timestamp is used to determine the deploy's position in time.

ttl: Duration = ...

The time-to-live (TTL) for the deploy, after which it will expire if not executed. The default TTL is 30 minutes.

Methods

  • Converts the deploy header to a byte array for transmission or storage.

    Returns

    A Uint8Array representing the deploy header in byte format.

    Returns Uint8Array

Generated using TypeDoc