Skip to main content
Version: 5.19.5

Class: SignerInterface

Implemented by​

Constructors​

constructor​

• new SignerInterface()

Methods​

getPubKey​

â–¸ Abstract getPubKey(): Promise<string>

Method to get the public key of the signer

Returns​

Promise<string>

public key of signer as hex string with 0x prefix

Defined in​

src/signer/interface.ts:17


signMessage​

â–¸ Abstract signMessage(typedData, accountAddress): Promise<Signature>

Sign an JSON object for off-chain usage with the starknet private key and return the signature This adds a message prefix so it can't be interchanged with transactions

Throws

if the JSON object is not a valid JSON

Parameters​

NameTypeDescription
typedDataTypedDataJSON object to be signed
accountAddressstringaccount

Returns​

Promise<Signature>

the signature of the JSON object

Defined in​

src/signer/interface.ts:28


signTransaction​

â–¸ Abstract signTransaction(transactions, transactionsDetail, abis?): Promise<Signature>

Signs a transaction with the starknet private key and returns the signature

Parameters​

NameType
transactionsCall[]
transactionsDetailInvocationsSignerDetails
abis?Abi[]

Returns​

Promise<Signature>

signature

Defined in​

src/signer/interface.ts:41


signDeployAccountTransaction​

â–¸ Abstract signDeployAccountTransaction(transaction): Promise<Signature>

Signs a DEPLOY_ACCOUNT transaction with the starknet private key and returns the signature

Parameters​

NameTypeDescription
transactionDeployAccountSignerDetailscontractAddress - the computed address of the contract - constructorCalldata - calldata to be passed in deploy constructor - addressSalt - contract address salt - chainId - the chainId to declare contract on - maxFee - maxFee for the declare transaction - version - transaction version - nonce - Nonce of the declare transaction

Returns​

Promise<Signature>

signature

Defined in​

src/signer/interface.ts:60


signDeclareTransaction​

â–¸ Abstract signDeclareTransaction(transaction): Promise<Signature>

Signs a DECLARE transaction with the starknet private key and returns the signature

Parameters​

NameTypeDescription
transactionDeclareSignerDetailsclassHash - computed class hash. Will be replaced by ContractClass in future once class hash is present in CompiledContract - senderAddress - the address of the sender - chainId - the chainId to declare contract on - maxFee - maxFee for the declare transaction - version - transaction version - nonce - Nonce of the declare transaction

Returns​

Promise<Signature>

signature

Defined in​

src/signer/interface.ts:76