Skip to content

Instantly share code, notes, and snippets.

View himanshuchawla009's full-sized avatar
🎯
Focusing

himanshuchawla009

🎯
Focusing
  • web3auth
  • internet
View GitHub Profile
import { Web3AuthCore } from "@web3auth/core"
import Torus from "@toruslabs/torus.js";
import { subkey } from "@toruslabs/openlogin-subkey";
import NodeDetailManager, { ETHEREUM_NETWORK } from "@toruslabs/fetch-node-details";
// Web3Auth clientId
const clientId =
"BKjpD5DNAFDbX9Ty9RSBAXdQP8YDY1rldKqKCgbxxa8JZODZ8zxVRzlT74qRIHsor5aIwZ55dQVlcmrwJu37PI8"; // get from https://dashboard.web3auth.io
<html>
<head>
<title>Ethereum Web3Auth Getting Started</title>
<meta charset="UTF-8" />
</head>
<body>
<div">
<h1><a target="_blank" href="http://web3auth.io/">Web3Auth</a> ETH & JS Integration Example</h1>
<!-- Logged In -->
@himanshuchawla009
himanshuchawla009 / web3auth.js
Last active April 11, 2022 04:13
Domain whitelisting for web3auth.
<!DOCTYPE html>
<html>
<head>
<title>Web3Auth Getting Started</title>
<meta charset="UTF-8" />
</head>
<body
style="
display: flex;
pragma solidity 0.4.24;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
c = a + b;
require(c >= a);
}
function sub(uint a, uint b) internal pure returns (uint c) {
require(b <= a);
c = a - b;
{
"name": "byfn-network",
"x-type": "hlfv1",
"version": "1.0.0",
"channels": {
"mychannel": {
"orderers": [
"orderer.example.com"
],
"peers": {
cat << "EOF"
______ __ __ __ __ __ __ __ ___ _______. __ __
/ __ \ | | | | | | | | | | | | | | / \ / || | | |
| | | | | | | | | | | | | | | |__| | / ^ \ | (----`| |__| |
| | | | | | | | | | | | | | | __ | / /_\ \ \ \ | __ |
| `--' '--.| `--' | | | | `----.| `----.| | | | / _____ \ .----) | | | | |
\_____\_____\\______/ |__| |_______||_______||__| |__| /__/ \__\ |_______/ |__| |__|
pragma solidity 0.4.21;
contract Ownable {
address public owner;
address public creater;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
var StellarSdk = require('stellar-sdk');
var rp = require('request-promise');
var express = require('express');
var router = express.Router();
var server = new StellarSdk.Server('https://horizon-testnet.stellar.org');
StellarSdk.Network.useTestNetwork();
var transaction;
createAccount = (req,res)=>{
console.log("creating account");
console.log();
/* global describe it artifacts */
const KeyValueStorage = artifacts.require('KeyValueStorage')
const DelegateV1 = artifacts.require('DelegateV1')
const DelegateV2 = artifacts.require('DelegateV2')