Skip to main content

Class: MultiSigPublicKey

A MultiSig public key

Extends

Constructors

Constructor

new MultiSigPublicKey(value): MultiSigPublicKey;

Create a new MultiSigPublicKey object

Parameters

ParameterTypeDescription
valuestring | Uint8Array | MultiSigPublicKeyStructMultiSig public key as buffer or base-64 encoded string

Returns

MultiSigPublicKey

Overrides

PublicKey.constructor

Methods

toBase64()

toBase64(): string;

Return the base-64 representation of the public key

Returns

string

Inherited from

PublicKey.toBase64


toString()

toString(): never;

Returns

never

Inherited from

PublicKey.toString


toIotaPublicKey()

toIotaPublicKey(): string;

Return the IOTA representation of the public key encoded in base-64. An IOTA public key is formed by the concatenation of the scheme flag with the raw bytes of the public key

Returns

string

Inherited from

PublicKey.toIotaPublicKey


verifyWithIntent()

verifyWithIntent(
bytes,
signature,
intent): Promise<boolean>;

Parameters

ParameterType
bytesUint8Array
signaturestring | Uint8Array
intentIntentScope

Returns

Promise<boolean>

Inherited from

PublicKey.verifyWithIntent


verifyPersonalMessage()

verifyPersonalMessage(message, signature): Promise<boolean>;

Verifies that the signature is valid for the provided PersonalMessage

Parameters

ParameterType
messageUint8Array
signaturestring | Uint8Array

Returns

Promise<boolean>

Inherited from

PublicKey.verifyPersonalMessage


verifyTransaction()

verifyTransaction(transaction, signature): Promise<boolean>;

Verifies that the signature is valid for the provided Transaction

Parameters

ParameterType
transactionUint8Array
signaturestring | Uint8Array

Returns

Promise<boolean>

Inherited from

PublicKey.verifyTransaction


verifyAddress()

verifyAddress(address): boolean;

Verifies that the public key is associated with the provided address

Parameters

ParameterType
addressstring

Returns

boolean

Inherited from

PublicKey.verifyAddress


toIotaBytes()

toIotaBytes(): Uint8Array;

Returns the bytes representation of the public key prefixed with the signature scheme flag

Returns

Uint8Array

Inherited from

PublicKey.toIotaBytes


toIotaBytesForAddress()

toIotaBytesForAddress(): Uint8Array;

Returns the bytes representation of the public key prefixed with the signature scheme flag. If the signature scheme is ED25519, no prefix is set.

Returns

Uint8Array

Inherited from

PublicKey.toIotaBytesForAddress


fromPublicKeys()

static fromPublicKeys(__namedParameters): MultiSigPublicKey;

A static method to create a new MultiSig publickey instance from a set of public keys and their associated weights pairs and threshold.

Parameters

ParameterType
__namedParameters{ threshold: number; publicKeys: object[]; }
__namedParameters.thresholdnumber
__namedParameters.publicKeysobject[]

Returns

MultiSigPublicKey


equals()

equals(publicKey): boolean;

Checks if two MultiSig public keys are equal

Parameters

ParameterType
publicKeyMultiSigPublicKey

Returns

boolean

Overrides

PublicKey.equals


toRawBytes()

toRawBytes(): Uint8Array;

Return the byte array representation of the MultiSig public key

Returns

Uint8Array

Overrides

PublicKey.toRawBytes


getPublicKeys()

getPublicKeys(): object[];

Returns

object[]


getThreshold()

getThreshold(): number;

Returns

number


getSigner()

getSigner(...signers): MultiSigSigner;

Parameters

ParameterType
...signers[Signer]

Returns

MultiSigSigner


toIotaAddress()

toIotaAddress(): string;

Return the IOTA address associated with this MultiSig public key

Returns

string

Overrides

PublicKey.toIotaAddress


flag()

flag(): number;

Return the IOTA address associated with this MultiSig public key

Returns

number

Overrides

PublicKey.flag


verify()

verify(message, multisigSignature): Promise<boolean>;

Verifies that the signature is valid for the provided message

Parameters

ParameterType
messageUint8Array
multisigSignaturestring

Returns

Promise<boolean>

Overrides

PublicKey.verify


combinePartialSignatures()

combinePartialSignatures(signatures): string;

Combines multiple partial signatures into a single multisig, ensuring that each public key signs only once and that all the public keys involved are known and valid, and then serializes multisig into the standard format

Parameters

ParameterType
signaturesstring[]

Returns

string