πŸ“¦Usage

Getting Started:

To integrate Certhis Wallet into your DAPP and provide users with login options, you must call the run function. This function requires parameters like the network ID, RPC URL, login window ID, custom class prefix, and an option to specify if the provider is expected or not. Here's an example:

await certhis_wallet.run({
  rpc_id: rpc_id,
  rpc: rpc_link,
});

Email-Based Login:

Certhis Wallet allows users to connect to their wallets through email. It generates a new wallet for the user if the email is not already linked to one. A code is sent to the user's email, which they can use to log in and interact with their wallet through the application.

Wallet Infos:

To display wallet information and export the private key of the wallet in a pop-up window for email-based connections using Certhis Wallet, you can use the walletInfos() function. Here's an example of how to use it:

certhis_wallet.walletInfos();

This function will show a pop-up window with wallet details, including the private key if applicable.

For users with empty wallets, Certhis Wallet detects this and prompts them to add funds. This can be done through a transfer or credit card. Users can receive guidance on adding funds to their wallets seamlessly.

await  certhis_wallet.addFundPopup(
functionGasFees,
address,
value,
chain_id,
transactionInformation = {
transactionInformation.title,
transactionInformation.description,
transactionInformation.image,
transactionInformation.nb_items,
transactionInformation.erc20_amount,
transactionInformation.smart_contract,
transactionInformation.erc20_contract,
transactionInformation.erc20_amount
},
force
);

Signature:

To create a signature using Certhis Wallet, you can request a signature using the provider.request method. Here's an example:

var sign = await provider.request({
  method: "personal_sign",
  params: [web3.utils.utf8ToHex("HELLO WORLD!"), current_address],
});

Certhis Wallet simplifies wallet integration in DAPPs, making it easier for users to access their wallets and interact with blockchain applications.

Last updated