Minimal Anti Collusion Infrastructure (MACI) / Message
Class: Message
Defined in: message.ts:11
Notice
An encrypted command and signature.
Constructors
new Message()
new Message(
data
):Message
Defined in: message.ts:21
Create a new instance of a Message
Parameters
data
bigint
[]
the data of the message
Returns
Properties
data
data:
bigint
[]
Defined in: message.ts:12
DATA_LENGTH
static
DATA_LENGTH:number
=10
Defined in: message.ts:14
Methods
asCircuitInputs()
asCircuitInputs():
bigint
[]
Defined in: message.ts:44
Return the message as a circuit input
Returns
bigint
[]
the message as a circuit input
asContractParam()
asContractParam():
IMessageContractParams
Defined in: message.ts:36
Return the message as a contract param
Returns
the message as a contract param
copy()
copy():
Message
Defined in: message.ts:57
Create a copy of the message
Returns
a copy of the message
equals()
equals(
m
):boolean
Defined in: message.ts:64
Check if two messages are equal
Parameters
m
the message to compare with
Returns
boolean
the result of the comparison
hash()
hash(
encPubKey
):bigint
Defined in: message.ts:51
Hash the message data and a public key
Parameters
encPubKey
the public key that is used to encrypt this message
Returns
bigint
the hash of the message data and the public key
toJSON()
toJSON():
IMessageContractParams
Defined in: message.ts:75
Serialize to a JSON object
Returns
fromJSON()
static
fromJSON(json
):Message
Defined in: message.ts:84
Deserialize into a Message instance
Parameters
json
the json representation
Returns
the deserialized object as a Message instance