Skip to main content
This example shows how the Portal Provider interacts with the blockchain.

Signing Messages

Personal Sign

The signMessage method uses the personal_sign RPC method which prepends the standard Ethereum message prefix before signing.
Ensure you have set the gateway URL correctly with Infura or Alchemy when you initialize the portal class.

Typed Data Signing (EIP-712)

For signing structured data according to the EIP-712 standard:

Raw Sign

For signing raw data without any prefix:
Raw sign does not add any prefix to the message. Use this for signing raw data or when working with chains that don’t use Ethereum’s message prefix.

Sending Transactions

Using sendTransaction

For full control over transaction parameters:

EIP-1559 Transactions

For EIP-1559 style transactions with priority fees:

Generic Provider Requests

For any JSON-RPC method, use the request method:

Estimating Gas

Solana Signing

For Solana message signing, use the Solana chain ID:
Related Documentation