AccountRole enum

Describes the purpose for which an account participates in a transaction.

Every account that participates in a transaction can be read from, but only ones that you mark as writable may be written to, and only ones that you indicate must sign the transaction will gain the privileges associated with signers at runtime.

The enum values use a bitflag scheme:

Role isSigner isWritable Value
readonly No No 0b00
writable No Yes 0b01
readonlySigner Yes No 0b10
writableSigner Yes Yes 0b11
Inheritance
Available extensions

Values

readonly → const AccountRole

A read-only, non-signer account.

const AccountRole(0)
writable → const AccountRole

A writable, non-signer account.

const AccountRole(1)
readonlySigner → const AccountRole

A read-only signer account.

const AccountRole(2)
writableSigner → const AccountRole

A writable signer account.

const AccountRole(3)

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value int
The bitflag value of this role.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<AccountRole>
A constant List of the values in this enum, in order of their declaration.