rimosafe-plugin-wallet-adapter
v0.0.1
Published
RimoSafe plugin to use with Aptos Wallet Adapter
Downloads
253
Maintainers
Readme
Rimosafe plugin for Aptos Wallet Adapter
A Rimosafe wallet plugin to be used with the Aptos Wallet Adapter.
Support standard functions
connect
disconnect
connected
account
network
signAndSubmitTransaction
Usage
Install Dependencies
Next, install the @aptos-labs/wallet-adapter-react & rimosafe-plugin-wallet-adapter
pnpm i @aptos-labs/wallet-adapter-react
pnpm i rimosafe-plugin-wallet-adapter
using npm
npm i @aptos-labs/wallet-adapter-react
npm i rimosafe-plugin-wallet-adapter
Import dependencies
On the App.jsx file, Import the rimosafe wallets.
import { RimoWallet } from "rimosafe-plugin-wallet-adapter";
Import the AptosWalletAdapterProvider.
import { AptosWalletAdapterProvider } from "@aptos-labs/wallet-adapter-react";
Wrap your app with the Provider, pass it the relevant props.
const wallets = [new RimoWallet()];
<AptosWalletAdapterProvider
plugins={wallets}
autoConnect={true}
optInWallets={["Petra"]}
dappConfig={{ network: network.MAINNET }}
onError={(error) => {
console.log("error", error);
}}
>
<App />
</AptosWalletAdapterProvider>;