Sign Transaction API
Introduction
The signTransaction method allows securely signing an Ethereum transaction within an authenticated session.
To sign a message a user / an account would need to have to have been register and authenticated by going through Register using API flow.
Once you have registered the user, you can choose one of the below 2 flows
Session-Based Authentication
Request Spec
Follow the Authenticating with API flow to obtain the session and then do the following HTTP request
Headers:
X-Encrypted-Session: Session information for maintaining state or continuity.
X-Encrypted-Key: Encrypted key for secure processing of the request.
X-Encrypted-User: User details encrypted using encryption key
Parameters:
params
: The transaction parameters as a TypedTransaction object.from
- The sender addressnonce
- The transaction noncemaxPriorityFeePerGas
- Max tip paid to minermaxFeePerGas
- Max total fee willing to payto
- Recipient addressgas
- Gas limitvalue
- Amount of ETH to sendchainId
- Network IDtype
- EIP-2718 transaction type
Returns:
An RLP encoded transaction signature that can be executed as a raw transaction
Request Example
Response Example
Direct Passkey Authentication
Request Spec
In order to use this approach, you must sign your User Input json using Passkey to obtain a signature.
Headers
X-Encrypted-Key: Encrypted key for secure processing of the request.
X-Encrypted-Webauthn-Signature: Webauthn signature encrypted using encryption key
X-Encrypted-User: User details encrypted using encryption key
Parameters:
params
: The transaction parameters as a TypedTransaction object.from
- The sender addressnonce
- The transaction noncemaxPriorityFeePerGas
- Max tip paid to minermaxFeePerGas
- Max total fee willing to payto
- Recipient addressgas
- Gas limitvalue
- Amount of ETH to sendchainId
- Network IDtype
- EIP-2718 transaction type
Returns:
An RLP encoded transaction signature that can be executed as a raw transaction
Request Example
Response Example
Last updated