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
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
Returns
Description | Type |
the plain object | object |
🦠toString
Get a string representation of this Machine
instance.
Signature
Returns
Description | Type |
the flattened JSON | string |
🦠toStruct
Get a struct representation of this Machine
instance.
Signature
Returns
Description | Type |
the struct | Array |
🦠clone
Clone this Machine
instance.
Signature
Returns
Description | Type |
the cloned instance | Machine |
🦠isValid
Is this Machine
instance valid?
Signature
Returns
Description | Type |
true if the instance is valid | boolean |