Skip to main content

Class: EvmSignature

moralis-monorepo / @moralisweb3/common-evm-utils / EvmSignature

Class: EvmSignature

@moralisweb3/common-evm-utils.EvmSignature

Represents of a signed EVM signature Can be created with a valid r,s,v signature or a hex string

Implements

  • MoralisDataObject

Table of contents

Methods

Constructors

Accessors

Methods

create

Static create(data): EvmSignature

Parameters

NameType
dataEvmSignatureish

Returns

EvmSignature


equals

Static equals(dataA, dataB): boolean

Parameters

NameType
dataAEvmSignatureish
dataBEvmSignatureish

Returns

boolean


parse

Static parse(data): Signature

Parameters

NameType
dataEvmSignatureInput

Returns

Signature


equals

equals(data): boolean

Checks the equality of the current transfer instance with another nft transfer

Example

transaction.equals(data)

Parameters

NameTypeDescription
dataEvmSignatureishthe transfer to compare with

Returns

boolean

true if the transfers are equal, false otherwise

Implementation of

MoralisDataObject.equals


format

format(): string

Deprecated

This method will be removed soon. To format the value, use one of the properties.

Returns

string

Implementation of

MoralisDataObject.format


toJSON

toJSON(): MoralisDataObjectValue

Returns

MoralisDataObjectValue

Implementation of

MoralisDataObject.toJSON

Constructors

constructor

new EvmSignature(data)

Parameters

NameType
dataEvmSignatureInput

Accessors

r

get r(): string

Returns

string


s

get s(): string

Returns

string


serialized

get serialized(): string

Returns

string


v

get v(): number

Returns

number