Machine

Constructor

Signature

constructor (
    operator, 
    name, 
    states,
    initialStateId, 
    uri
)

Parameters

Name Description Type
operator address of approved operator contract string
name name of machine. begin with letter, no spaces, a-z, A-Z, 0-9, and _ string
states all of the valid States for this machine FismoTypes.State[]
initialStateId keccak256 hash of initial state name string
uri off-chain URI of metadata describing the machine string

Static Members

Methods

🦠 fromObject

Get a new Machine instance from an object representation.

Signature

Machine.fromObject(o)

Parameters

Name Description Type
o the plain object object

Returns

Description Type
the instance Machine

🦠 fromStruct

Get a new Machine instance from a struct representation.

Signature

Machine.fromStruct(struct)

Parameters

Name Description Type
struct the struct Array

Returns

Description Type
the instance Machine

Instance Members

Properties

  • operator
  • id
  • name
  • initialStateId
  • states
  • uri

Methods

🦠 toObject

Get a plain object representation of this Machine instance.

Signature

instance.toObject()

Returns

Description Type
the plain object object

🦠 toString

Get a string representation of this Machine instance.

Signature

instance.toString()

Returns

Description Type
the flattened JSON string

🦠 toStruct

Get a struct representation of this Machine instance.

Signature

instance.toStruct()

Returns

Description Type
the struct Array

🦠 clone

Clone this Machine instance.

Signature

instance.clone()

Returns

Description Type
the cloned instance Machine

🦠 isValid

Is this Machine instance valid?

Signature

instance.isValid()

Returns

Description Type
true if the instance is valid boolean