Skip to main content

computeActionCommitment

@totemsdk/txpow


@totemsdk/txpow / computeActionCommitment

Function: computeActionCommitment()

computeActionCommitment(action, challenge): string

Compute the canonical action commitment.

commitment = SHA3-256( protocolDomain || protocolVersion || canonicalAction(action) || canonicalChallenge(challenge) )

Parameters​

action​

MachineWorkAction

The application action.

challenge​

WorkChallenge

The challenge the work is bound to.

Returns​

string