Interface that should be implemented by ABI serializable objects.

Hierarchy-Diagram

UML class diagram of Authority
Legend
icon for a class in the UML class diagram class
icon for a public method in the UML class diagram public method
underlined static property/method

Hierarchy (view full)

Properties

keys: KeyWeight[]
threshold: UInt32
waits: WaitWeight[]
abiFields: ABIField[]
abiName: string = '__struct'

Accessors

  • get keyThreshold(): number
  • Weight a key needs to sign for this authority.

    Returns number

  • get structFields(): ABIField[]
  • Returns ABIField[]

Methods

  • Return true if this struct equals the other.

    Note: This compares the ABI encoded bytes of both structs, subclasses should implement their own fast equality check when possible.

    Parameters

    • other: any

    Returns boolean

  • Check if given public key has permission in this authority,

    Parameters

    • publicKey: PublicKeyType

      The key to check.

    • includePartial: boolean = false

      Whether to consider auths where the key is included but can't be reached alone (e.g. multisig).

    Returns boolean

    Attention

    Does not take indirect permissions for the key via account weights into account.

  • Return the weight for given public key, or zero if it is not included in this authority.

    Parameters

    Returns number

  • Sorts the authority weights in place, should be called before including the authority in a updateauth action or it might be rejected.

    Returns void