Secp256k1PublicKey
@iota/iota-sdk / keypairs/secp256k1 / Secp256k1PublicKey
Class: Secp256k1PublicKey
Defined in: sdk/typescript/src/keypairs/secp256k1/publickey.ts:19
A Secp256k1 public key
Extends
Constructors
Constructor
new Secp256k1PublicKey(
value):Secp256k1PublicKey
Defined in: sdk/typescript/src/keypairs/secp256k1/publickey.ts:27
Create a new Secp256k1PublicKey object
Parameters
value
PublicKeyInitData
secp256k1 public key as buffer or base-64 encoded string
Returns
Secp256k1PublicKey
Overrides
Properties
SIZE
staticSIZE:number=SECP256K1_PUBLIC_KEY_SIZE
Defined in: sdk/typescript/src/keypairs/secp256k1/publickey.ts:20
Methods
equals()
equals(
publicKey):boolean
Defined in: sdk/typescript/src/keypairs/secp256k1/publickey.ts:48
Checks if two Secp256k1 public keys are equal
Parameters
publicKey
Secp256k1PublicKey
Returns
boolean
Overrides
flag()
flag():
number
Defined in: sdk/typescript/src/keypairs/secp256k1/publickey.ts:62
Return the IOTA address associated with this Secp256k1 public key
Returns
number
Overrides
toBase64()
toBase64():
string
Defined in: sdk/typescript/src/cryptography/publickey.ts:49
Return the base-64 representation of the public key
Returns
string
Inherited from
toIotaAddress()
toIotaAddress():
string
Defined in: sdk/typescript/src/cryptography/publickey.ts:139
Return the IOTA address associated with this Ed25519 public key
Returns
string
Inherited from
toIotaBytes()
toIotaBytes():
Uint8Array
Defined in: sdk/typescript/src/cryptography/publickey.ts:109
Returns the bytes representation of the public key prefixed with the signature scheme flag
Returns
Uint8Array
Inherited from
toIotaBytesForAddress()
toIotaBytesForAddress():
Uint8Array
Defined in: sdk/typescript/src/cryptography/publickey.ts:123
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
toIotaPublicKey()
toIotaPublicKey():
string
Defined in: sdk/typescript/src/cryptography/publickey.ts:64
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
toRawBytes()
toRawBytes():
Uint8Array
Defined in: sdk/typescript/src/keypairs/secp256k1/publickey.ts:55
Return the byte array representation of the Secp256k1 public key
Returns
Uint8Array
Overrides
toString()
toString():
never
Defined in: sdk/typescript/src/cryptography/publickey.ts:53
Returns
never
Inherited from
verify()
verify(
message,signature):Promise<boolean>
Defined in: sdk/typescript/src/keypairs/secp256k1/publickey.ts:69
Verifies that the signature is valid for the provided message
Parameters
message
Uint8Array
signature
string | Uint8Array<ArrayBufferLike>
Returns
Promise<boolean>
Overrides
verifyAddress()
verifyAddress(
address):boolean
Defined in: sdk/typescript/src/cryptography/publickey.ts:101
Verifies that the public key is associated with the provided address
Parameters
address
string
Returns
boolean
Inherited from
verifyPersonalMessage()
verifyPersonalMessage(
message,signature):Promise<boolean>
Defined in: sdk/typescript/src/cryptography/publickey.ts:83
Verifies that the signature is valid for the provided PersonalMessage
Parameters
message
Uint8Array
signature
string | Uint8Array<ArrayBufferLike>
Returns
Promise<boolean>
Inherited from
PublicKey.verifyPersonalMessage
verifyTransaction()
verifyTransaction(
transaction,signature):Promise<boolean>
Defined in: sdk/typescript/src/cryptography/publickey.ts:94
Verifies that the signature is valid for the provided Transaction
Parameters
transaction
Uint8Array
signature
string | Uint8Array<ArrayBufferLike>
Returns
Promise<boolean>
Inherited from
verifyWithIntent()
verifyWithIntent(
bytes,signature,intent):Promise<boolean>
Defined in: sdk/typescript/src/cryptography/publickey.ts:69
Parameters
bytes
Uint8Array
signature
string | Uint8Array<ArrayBufferLike>
intent
Returns
Promise<boolean>