ethereumjs-monorepo

@ethereumjs/evm


@ethereumjs/evm / MCLBLS

Class: MCLBLS

Defined in: precompiles/bls12_381/mcl.ts:214

Implementation of the EVMBLSInterface using the mcl-wasm WASM mcl wrapper library, see https://github.com/herumi/mcl-wasm.

This can be optionally used to replace the build-in Noble implementation (NobleBLS) with a more performant WASM variant. See EVM bls constructor option on how to use.

Implements

Constructors

Constructor

new MCLBLS(mcl): MCLBLS

Defined in: precompiles/bls12_381/mcl.ts:217

Parameters

mcl

any

Returns

MCLBLS

Methods

addG1()

addG1(input): Uint8Array

Defined in: precompiles/bls12_381/mcl.ts:227

Parameters

input

Uint8Array

Returns

Uint8Array

Implementation of

EVMBLSInterface.addG1


addG2()

addG2(input): Uint8Array

Defined in: precompiles/bls12_381/mcl.ts:241

Parameters

input

Uint8Array

Returns

Uint8Array

Implementation of

EVMBLSInterface.addG2


init()

init(): void

Defined in: precompiles/bls12_381/mcl.ts:221

Returns

void

Implementation of

EVMBLSInterface.init


mapFP2toG2()

mapFP2toG2(input): Uint8Array

Defined in: precompiles/bls12_381/mcl.ts:264

Parameters

input

Uint8Array

Returns

Uint8Array

Implementation of

EVMBLSInterface.mapFP2toG2


mapFPtoG1()

mapFPtoG1(input): Uint8Array

Defined in: precompiles/bls12_381/mcl.ts:255

Parameters

input

Uint8Array

Returns

Uint8Array

Implementation of

EVMBLSInterface.mapFPtoG1


msmG1()

msmG1(input): Uint8Array

Defined in: precompiles/bls12_381/mcl.ts:273

Parameters

input

Uint8Array

Returns

Uint8Array

Implementation of

EVMBLSInterface.msmG1


msmG2()

msmG2(input): Uint8Array

Defined in: precompiles/bls12_381/mcl.ts:299

Parameters

input

Uint8Array

Returns

Uint8Array

Implementation of

EVMBLSInterface.msmG2


pairingCheck()

pairingCheck(input): Uint8Array

Defined in: precompiles/bls12_381/mcl.ts:324

Parameters

input

Uint8Array

Returns

Uint8Array

Implementation of

EVMBLSInterface.pairingCheck