Skip to main content

mineWorkAdmission

@totemsdk/txpow


@totemsdk/txpow / mineWorkAdmission

Function: mineWorkAdmission()

mineWorkAdmission(action, challenge, templateProvider, options?): Promise<MachineWorkAdmissionProof>

Mine a Machine Work Admission proof.

The admission target is derived from challenge.target — the challenge is the single authoritative source. The miner searches the nonce space of a real Minima block candidate (from the injected template provider) whose customHash commits to the action.

Parameters

action

MachineWorkAction

The application action.

challenge

WorkChallenge

The receiver-issued challenge (target is authoritative).

templateProvider

MinimaWorkTemplateProvider

Injected provider for the current Minima template.

options?

MineWorkAdmissionOptions

Mining options.

Returns

Promise<MachineWorkAdmissionProof>