Skip to main content

Signer

The Signer API allows you to sign transactions and messages, and also allows you to get the public key.

Creating an instance

new starknet.Signer(keyPair)

Methods

signer.getPubKey() => Promise < string >

Returns the public key of the signer.


signer.signTransaction(transactions, transactionsDetail [ , abi ]) => Promise < Signature >

Returns the signature of the transaction.

Signature
string[]

signer.signMessage(typedData, accountAddress) => Promise < Signature >

Returns the signature of the transaction.

Signature
string[]