UpgradeDatabaseState

Class: UpgradeDatabaseState

Properties overview

  • nextUpgradeAuthority: PublicKeyOption = PublicKeyOption;
  • root: Field = Field;
  • storage: Storage = Storage;
  • validFrom: UInt32 = UInt32;
  • version: UInt32 = UInt32;
  • Overrides: Struct({
    / Root of the UpgradeAuthority database /
    root: Field,
    / Storage information (e.g., IPFS hash) /
    storage: Storage,
    / Optional public key of the next upgrade authority /
    nextUpgradeAuthority: PublicKeyOption,
    / Version of the UpgradeAuthorityDatabase /
    version: UInt32,
    / Slot when the UpgradeAuthority is valid from /
    validFrom: UInt32,
    }).empty

Methods overview

Defined in: packages/upgradable/src/validators.ts:136

Represents the state of the upgrade database.

Extends

  • {
    nextUpgradeAuthority: PublicKeyOption;
    root: Field;
    storage: Storage;
    validFrom: UInt32;
    version: UInt32;
    }

Constructors

new UpgradeDatabaseState()

new UpgradeDatabaseState(value: {
  nextUpgradeAuthority: PublicKeyOption;
  root: Field;
  storage: Storage;
  validFrom: UInt32;
  version: UInt32;
 }): UpgradeDatabaseState

Defined in: node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:103

Parameters

value
nextUpgradeAuthority

PublicKeyOption = PublicKeyOption

Optional public key of the next upgrade authority

root

Field = Field

Root of the UpgradeAuthority database

storage

Storage = Storage

Storage information (e.g., IPFS hash)

validFrom

UInt32 = UInt32

Slot when the UpgradeAuthority is valid from

version

UInt32 = UInt32

Version of the UpgradeAuthorityDatabase

Returns

UpgradeDatabaseState

Inherited from

Struct({
  / Root of the UpgradeAuthority database /
  root: Field,
  / Storage information (e.g., IPFS hash) /
  storage: Storage,
  / Optional public key of the next upgrade authority /
  nextUpgradeAuthority: PublicKeyOption,
  / Version of the UpgradeAuthorityDatabase /
  version: UInt32,
  / Slot when the UpgradeAuthority is valid from /
  validFrom: UInt32,
}).constructor

Properties

nextUpgradeAuthority

nextUpgradeAuthority: PublicKeyOption = PublicKeyOption;

Defined in: packages/upgradable/src/validators.ts:142

Optional public key of the next upgrade authority

Inherited from

Struct({
  / Root of the UpgradeAuthority database /
  root: Field,
  / Storage information (e.g., IPFS hash) /
  storage: Storage,
  / Optional public key of the next upgrade authority /
  nextUpgradeAuthority: PublicKeyOption,
  / Version of the UpgradeAuthorityDatabase /
  version: UInt32,
  / Slot when the UpgradeAuthority is valid from /
  validFrom: UInt32,
}).nextUpgradeAuthority

root

root: Field = Field;

Defined in: packages/upgradable/src/validators.ts:138

Root of the UpgradeAuthority database

Inherited from

Struct({
  / Root of the UpgradeAuthority database /
  root: Field,
  / Storage information (e.g., IPFS hash) /
  storage: Storage,
  / Optional public key of the next upgrade authority /
  nextUpgradeAuthority: PublicKeyOption,
  / Version of the UpgradeAuthorityDatabase /
  version: UInt32,
  / Slot when the UpgradeAuthority is valid from /
  validFrom: UInt32,
}).root

storage

storage: Storage = Storage;

Defined in: packages/upgradable/src/validators.ts:140

Storage information (e.g., IPFS hash)

Inherited from

Struct({
  / Root of the UpgradeAuthority database /
  root: Field,
  / Storage information (e.g., IPFS hash) /
  storage: Storage,
  / Optional public key of the next upgrade authority /
  nextUpgradeAuthority: PublicKeyOption,
  / Version of the UpgradeAuthorityDatabase /
  version: UInt32,
  / Slot when the UpgradeAuthority is valid from /
  validFrom: UInt32,
}).storage

validFrom

validFrom: UInt32 = UInt32;

Defined in: packages/upgradable/src/validators.ts:146

Slot when the UpgradeAuthority is valid from

Inherited from

Struct({
  / Root of the UpgradeAuthority database /
  root: Field,
  / Storage information (e.g., IPFS hash) /
  storage: Storage,
  / Optional public key of the next upgrade authority /
  nextUpgradeAuthority: PublicKeyOption,
  / Version of the UpgradeAuthorityDatabase /
  version: UInt32,
  / Slot when the UpgradeAuthority is valid from /
  validFrom: UInt32,
}).validFrom

version

version: UInt32 = UInt32;

Defined in: packages/upgradable/src/validators.ts:144

Version of the UpgradeAuthorityDatabase

Inherited from

Struct({
  / Root of the UpgradeAuthority database /
  root: Field,
  / Storage information (e.g., IPFS hash) /
  storage: Storage,
  / Optional public key of the next upgrade authority /
  nextUpgradeAuthority: PublicKeyOption,
  / Version of the UpgradeAuthorityDatabase /
  version: UInt32,
  / Slot when the UpgradeAuthority is valid from /
  validFrom: UInt32,
}).version

Methods

pack()

pack(): UpgradeDatabaseStatePacked

Defined in: packages/upgradable/src/validators.ts:179

Packs the UpgradeDatabaseState into a UpgradeDatabaseStatePacked.

Returns

UpgradeDatabaseStatePacked

A packed representation of the upgrade database state.


assertEquals()

static assertEquals(a: UpgradeDatabaseState, b: UpgradeDatabaseState): void

Defined in: packages/upgradable/src/validators.ts:153

Asserts that two UpgradeDatabaseState instances are equal.

Parameters

a

UpgradeDatabaseState

First UpgradeDatabaseState instance.

b

UpgradeDatabaseState

Second UpgradeDatabaseState instance.

Returns

void


empty()

static empty(): UpgradeDatabaseState

Defined in: packages/upgradable/src/validators.ts:165

Returns an empty UpgradeDatabaseState.

Returns

UpgradeDatabaseState

An empty UpgradeDatabaseState instance.

Overrides

Struct({
  / Root of the UpgradeAuthority database /
  root: Field,
  / Storage information (e.g., IPFS hash) /
  storage: Storage,
  / Optional public key of the next upgrade authority /
  nextUpgradeAuthority: PublicKeyOption,
  / Version of the UpgradeAuthorityDatabase /
  version: UInt32,
  / Slot when the UpgradeAuthority is valid from /
  validFrom: UInt32,
}).empty

unpack()

static unpack(packed: UpgradeDatabaseStatePacked): UpgradeDatabaseState

Defined in: packages/upgradable/src/validators.ts:200

Unpacks a UpgradeDatabaseStatePacked into a UpgradeDatabaseState.

Parameters

packed

UpgradeDatabaseStatePacked

The packed upgrade database state.

Returns

UpgradeDatabaseState

An unpacked UpgradeDatabaseState instance.