Sending RPC Requests
const dagProvider = window.stargazer.getProvider("constellation");
const ethProvider = window.stargazer.getProvider("ethereum");List active account
const dagAccounts = await dagProvider.request({ method: "dag_accounts" });
console.log(dagAccounts);
// ["DAG88C9WDSKH451sisyEP3hAkgCKn5DN72fuwjfX"]
const ethAccounts = await ethProvider.request({ method: "eth_accounts" });
console.log(eth_accounts);
// ["0x567d0382442c5178105fC03bd52b8Db6Afb4fE40"]Send an ETH contract call
Send an ETH read call
Send an ETH contract write call
Send ETH Transactions
Transfer ERC20 Tokens
Approve ERC20 token Spend
Send ETH
Last updated
Was this helpful?