Nimiq
Classes

Class: PartialSignature

@nimiq/core / PartialSignature

Defined in: @nimiq/core/types/wasm/web.d.ts:1562

A partial signature is a signature of one of the co-signers in a multisig. Combining all partial signatures yields the full signature (combining is done through summation).

Constructors

Constructor

new PartialSignature(bytes): PartialSignature

Defined in: @nimiq/core/types/wasm/web.d.ts:1602

Creates a new partial signature from a byte array.

Throws when the byte array is not exactly 32 bytes long.

Parameters

bytes

Uint8Array

Returns

PartialSignature

Properties

serializedSize

readonly serializedSize: number

Defined in: @nimiq/core/types/wasm/web.d.ts:1621


SIZE

readonly static SIZE: number

Defined in: @nimiq/core/types/wasm/web.d.ts:1622

Methods

__getClassname()

__getClassname(): string

Defined in: @nimiq/core/types/wasm/web.d.ts:1565

Returns

string


[dispose]()

[dispose](): void

Defined in: @nimiq/core/types/wasm/web.d.ts:1564

Returns

void


equals()

equals(other): boolean

Defined in: @nimiq/core/types/wasm/web.d.ts:1584

Returns if this partial signature is equal to the other partial signature.

Parameters

other

PartialSignature

Returns

boolean


free()

free(): void

Defined in: @nimiq/core/types/wasm/web.d.ts:1563

Returns

void


serialize()

serialize(): Uint8Array

Defined in: @nimiq/core/types/wasm/web.d.ts:1606

Serializes the partial signature to a byte array.

Returns

Uint8Array


toHex()

toHex(): string

Defined in: @nimiq/core/types/wasm/web.d.ts:1616

Formats the partial signature into a hex string.

Returns

string


toSignature()

toSignature(aggregated_commitment): Signature

Defined in: @nimiq/core/types/wasm/web.d.ts:1620

Converts a (aggregated) partial signature into a final signature using the aggregated commitment.

Parameters

aggregated_commitment

Commitment

Returns

Signature


create()

static create(own_private_key, own_public_key, own_commitment_pairs, other_public_keys, other_commitments, data): PartialSignature

Defined in: @nimiq/core/types/wasm/web.d.ts:1574

Creates a new partial signature for the MuSig2 scheme.

  • ownCommitmentPairs must be 2 pairs of random secret and commitments generated for this signing session.
  • otherCommitments must contain 2 commitments each for all other signers.

Returns the created partial signature.

Parameters

own_private_key

PrivateKey

own_public_key

PublicKey

own_commitment_pairs

(string | Uint8Array<ArrayBufferLike> | CommitmentPair)

other_public_keys

(string | Uint8Array<ArrayBufferLike> | PublicKey)

other_commitments

(string | Uint8Array<ArrayBufferLike> | Commitment)[]

data

Uint8Array

Returns

PartialSignature


deserialize()

static deserialize(bytes): PartialSignature

Defined in: @nimiq/core/types/wasm/web.d.ts:1580

Deserializes a partial signature from a byte array.

Throws when the byte array contains less than 32 bytes.

Parameters

bytes

Uint8Array

Returns

PartialSignature


fromAny()

static fromAny(sig): PartialSignature

Defined in: @nimiq/core/types/wasm/web.d.ts:1590

Parses a partial signature from a PartialSignature instance, a hex string representation, or a byte array.

Throws when a PartialSignature cannot be parsed from the argument.

Parameters

sig

string | Uint8Array<ArrayBufferLike> | PartialSignature

Returns

PartialSignature


fromHex()

static fromHex(hex): PartialSignature

Defined in: @nimiq/core/types/wasm/web.d.ts:1596

Parses a partial signature from its hex representation.

Throws when the string is not valid hex format or when it represents less than 32 bytes.

Parameters

hex

string

Returns

PartialSignature


sum()

static sum(partial_signatures): PartialSignature

Defined in: @nimiq/core/types/wasm/web.d.ts:1612

Sums an array of partial signatures into an aggregated partial signature.

Afterwards, use .toSignature(aggregatedCommitment) on the result to get the final signature.

Parameters

partial_signatures

(string | Uint8Array<ArrayBufferLike> | PartialSignature)

Returns

PartialSignature

Copyright © 2026