EIP1193 - Provider (WIP)
This page will describe how to construct an EIP1193 provider using Tria SDK.
Initialization
A dApp can integrate the Tria SDK and construct the Tria provider to connect to any chain and perform transactions and contract calls.
Params
config
(optional) -authUrl
(optional) -dappDomain
(optional) - The hostname/domain of the dApp. eg.https://opensea.io
dappLogo
(optional) - The logo of the dApp to be displayed in the wallet. eg.https://your-dapp-logo.com
environment
(optional - string) - The runtime environment. "testnet", "mainnet-staging", "mainnet"aa
(optional) - This is an object with the Account Abstraction paramssupportAa
(boolean) - If the dApp wants to enable Account Abstraction smart walletspimlicoApiKey
(optional - string) - The dApp can pass their pimlico api keyisSponsored
(optional - boolean) - Indicate whether the dApp wants to support sponsored transactionssponsorshipPolicyId
(optional - string) -accountType
(optional - string) - The type of smart wallet to be created. Options - "Simple", "Kernel", "Safe", "Biconomy", "Etherspot"sponsorshipPolicyIds
(optional - string) -
This provider
can be used to perform any transactions or request for connected accounts, etc.
Methods
The request should be a standard JSON-RPC payload, which should at a minimum specify the method
and params
Get Accounts
This will return the connected account in an array.
Get Network and Chain ID
Any request that requires user's consent/approval will trigger a wallet open.
Send Transaction
This method will open the wallet with all the provided wallet information. Once the user signs the transaction, it will be broadcasted and responds with a transaction hash.
Sign Message
eth_sign
and personal_sign
opens up the wallet with the message.
eth_sign
personal_sign
Last updated