1.8.2 • Published 25 days ago

@certhis/certhis-wallet v1.8.2

Weekly downloads
-
License
MIT
Repository
github
Last release
25 days ago

Certhis Wallet

Live Example : here

Certhis Wallet is a javascript package that makes it easy to integrate a wallet connection system by providing various login options, including email and using wallets like Metamask, Wallet Connect, and Coinbase Wallet in your DAPP and enables users to interact with their WEB3 wallets.

enter image description here

Installation

To install Certhis Wallet, open your terminal and run the following command:

$ npm i @certhis/certhis-wallet

Initialization

To use Certhis Wallet, you must first initialize it by importing the necessary libraries and calling the init function of certhis-wallet

const CerthisWallet = require("@certhis/certhis-wallet");
const certhis_wallet = CerthisWallet.init();
const Web3 = certhis_wallet.getWeb3();

Usage

To display the login window or to retrieve the provider if the user is logged in, you must call the run function of certhis-wallet by passing in the network ID, RPC URL, login window ID, custom class prefix, and an option to specify if the provider is expected or not.

await certhis_wallet.run({
  rpc_id: rpc_id,
  rpc: rpc_link,
  force_sign: false,
  notif: true, //notif user of new wallet


  //custom connexion (optional)
  active_custom: false, //active a custom connexion
  connect_btn: "#connect_btn", //custom_form_btn
  email_input: "#email_input", //custom_form_email
  error_message: "#error_message", //custom_form_error,
  success_function_email: async function (success) {
    //email valid
  },
  error_function_email: async function (error) {
    //email invalid
  },
  input_code: ".code_input", //5 code input,
  code_btn: ".valid_code", //valid_code,
  resend_code: ".resend_code", //resend_code,
  error_message_code: ".error_message_code", //error_message_code,
  success_function_code: async function (success) {
    //code valid
  },
  error_function_code: async function (error) {
    //code invalid
  },
});

Certhis Wallet allows user to connect to their wallet through email, which 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 and they can use it to log in and interact with their wallet through the application.

Wallet Infos

Additionally, there is a function that can be used to display the wallet information and export the private key of the wallet in a pop-up window for email-based connections:

certhis_wallet.walletInfos();

Disconnect

This function disconnect the current wallet

certhis_wallet.disconnect();

Popup Add Fund

There is also a function that detects if the user has any funds and prompts them to add funds to their wallet through a transfer or credit card

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

Signature

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

SendOnHash

await certhis_wallet
  .SendOnhash({ hash, chain_id })
  .on("transactionHash", function (hash) {})
  .on("receipt", async function (receipt) {});

Wallet by email

Also, there is an endpoint provided by Certhis Wallet:

https://wallet-api.certhis.io/wallet?email=email@exemple.com

This endpoint allows for generating or retrieving a wallet linked to an email.

In summary, Certhis Wallet is a javascript package that provides an easy-to-use interface for connecting to various types of wallets and includes a unique email-based login feature, as well as functions for displaying wallet information and adding funds.

1.8.2

25 days ago

1.8.1

25 days ago

1.8.0

26 days ago

1.7.9

26 days ago

1.7.6

3 months ago

1.7.5

3 months ago

1.7.4

3 months ago

1.7.3

3 months ago

1.7.2

4 months ago

1.7.1

4 months ago

1.7.0

5 months ago

1.6.9

5 months ago

1.6.4

7 months ago

1.6.3

7 months ago

1.6.2

8 months ago

1.6.1

8 months ago

1.6.0

8 months ago

1.5.9

8 months ago

1.5.8

8 months ago

1.5.7

8 months ago

1.5.6

9 months ago

1.5.5

9 months ago

1.6.8

6 months ago

1.6.7

6 months ago

1.6.6

6 months ago

1.6.5

6 months ago

1.4.6

11 months ago

1.4.5

11 months ago

1.4.4

11 months ago

1.5.2

11 months ago

1.4.3

11 months ago

1.5.1

11 months ago

1.4.2

11 months ago

1.5.0

11 months ago

1.4.1

11 months ago

1.3.2

11 months ago

1.3.1

11 months ago

1.4.9

11 months ago

1.4.8

11 months ago

1.4.7

11 months ago

1.3.0

1 year ago

1.2.8

1 year ago

1.2.9

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago