Class: Secp256r1PublicKey
A Secp256r1 public key
Extends
Constructors
Constructor
new Secp256r1PublicKey(value): Secp256r1PublicKey;
Create a new Secp256r1PublicKey object
Parameters
| Parameter | Type | Description |
|---|---|---|
value | PublicKeyInitData | secp256r1 public key as buffer or base-64 encoded string |
Returns
Secp256r1PublicKey
Overrides
Properties
| Property | Modifier | Type | Default value |
|---|---|---|---|
SIZE | static | number | SECP256R1_PUBLIC_KEY_SIZE |
Methods
toBase64()
toBase64(): string;
Return the base-64 representation of the public key
Returns
string
Inherited from
toString()
toString(): never;
Returns
never
Inherited from
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
verifyWithIntent()
verifyWithIntent(
bytes,
signature,
intent): Promise<boolean>;
Parameters
| Parameter | Type |
|---|---|
bytes | Uint8Array |
signature | string | Uint8Array |
intent | IntentScope |
Returns
Promise<boolean>
Inherited from
verifyPersonalMessage()
verifyPersonalMessage(message, signature): Promise<boolean>;
Verifies that the signature is valid for the provided PersonalMessage
Parameters
| Parameter | Type |
|---|---|
message | Uint8Array |
signature | string | 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
| Parameter | Type |
|---|---|
transaction | Uint8Array |
signature | string | Uint8Array |
Returns
Promise<boolean>
Inherited from
verifyAddress()
verifyAddress(address): boolean;
Verifies that the public key is associated with the provided address
Parameters
| Parameter | Type |
|---|---|
address | string |
Returns
boolean
Inherited from
toIotaBytes()
toIotaBytes(): Uint8Array;
Returns the bytes representation of the public key prefixed with the signature scheme flag
Returns
Uint8Array
Inherited from
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
toIotaAddress()
toIotaAddress(): string;
Return the IOTA address associated with this Ed25519 public key
Returns
string
Inherited from
equals()
equals(publicKey): boolean;
Checks if two Secp256r1 public keys are equal
Parameters
| Parameter | Type |
|---|---|
publicKey | Secp256r1PublicKey |
Returns
boolean
Overrides
toRawBytes()
toRawBytes(): Uint8Array;
Return the byte array representation of the Secp256r1 public key
Returns
Uint8Array
Overrides
flag()
flag(): number;
Return the IOTA address associated with this Secp256r1 public key
Returns
number
Overrides
verify()
verify(message, signature): Promise<boolean>;
Verifies that the signature is valid for the provided message
Parameters
| Parameter | Type |
|---|---|
message | Uint8Array |
signature | string | Uint8Array |
Returns
Promise<boolean>