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​
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​
Name | Type | Description |
---|---|---|
typedData | TypedData | JSON object to be signed |
accountAddress | string | account |
Returns​
Promise
<Signature
>
the signature of the JSON object
Defined in​
signTransaction​
â–¸ Abstract
signTransaction(transactions
, transactionsDetail
, abis?
): Promise
<Signature
>
Signs a transaction with the starknet private key and returns the signature
Parameters​
Name | Type |
---|---|
transactions | Call [] |
transactionsDetail | InvocationsSignerDetails |
abis? | Abi [] |
Returns​
Promise
<Signature
>
signature
Defined in​
signDeployAccountTransaction​
â–¸ Abstract
signDeployAccountTransaction(transaction
): Promise
<Signature
>
Signs a DEPLOY_ACCOUNT transaction with the starknet private key and returns the signature
Parameters​
Name | Type | Description |
---|---|---|
transaction | DeployAccountSignerDetails | contractAddress - 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​
signDeclareTransaction​
â–¸ Abstract
signDeclareTransaction(transaction
): Promise
<Signature
>
Signs a DECLARE transaction with the starknet private key and returns the signature
Parameters​
Name | Type | Description |
---|---|---|
transaction | DeclareSignerDetails | classHash - 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