index

fun index(publicKey: PublicKey): Int

Gets the index of the provided public key.

This function retrieves the index of a specified public key within the MultiKey. If the public key does not exist, it throws an error.

Return

The corresponding index of the public key, if it exists.

Parameters

publicKey

The public key to find the index for. Can be any type whose toString() representation matches one in the publicKeys list.

Throws

If the public key is not found in the MultiKey.