Skip to main content

VerificationKeyUpgradeData

Represents the data required to upgrade a contract's verification key. It includes the contract's address, token ID, previous verification key hash, and the new verification key hash. This class also provides a hash() method to generate a unique identifier for the upgrade data.

Hierarchy

  • { address: PublicKey; newVerificationKeyHash: Field; previousVerificationKeyHash: Field; tokenId: Field }
    • VerificationKeyUpgradeData

Index

Constructors

externalconstructor

  • new VerificationKeyUpgradeData(value: { address: PublicKey; newVerificationKeyHash: Field; previousVerificationKeyHash: Field; tokenId: Field }): VerificationKeyUpgradeData
  • Parameters

    • externalvalue: { address: PublicKey; newVerificationKeyHash: Field; previousVerificationKeyHash: Field; tokenId: Field }
      • externaladdress: PublicKey = PublicKey

        The address of the contract to be upgraded.

      • externalnewVerificationKeyHash: Field = Field

        The hash of the new verification key.

      • externalpreviousVerificationKeyHash: Field = Field

        The hash of the previous verification key.

      • externaltokenId: Field = Field

        The token ID associated with the contract.

    Returns VerificationKeyUpgradeData

Properties

address

address: PublicKey = PublicKey

The address of the contract to be upgraded.

newVerificationKeyHash

newVerificationKeyHash: Field = Field

The hash of the new verification key.

previousVerificationKeyHash

previousVerificationKeyHash: Field = Field

The hash of the previous verification key.

tokenId

tokenId: Field = Field

The token ID associated with the contract.

Methods

hash

  • hash(): Field
  • Generates a unique hash for the upgrade data using the Poseidon hash function.


    Returns Field

    The hash representing the upgrade data.