npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@certhis/certhis-wallet

v1.9.0

Published

Certhis Wallet

Downloads

57

Readme

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

  auto_logout: false, //auto logout
  store_key: false, //store key in local storage and prevent the user to sign out with multiple session
  //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,
  google: "#google", //google connexion url
  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/[email protected]

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.