This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
const bitcoin = require('bitcoinjs-lib'); | |
var buffer = require('buffer'); | |
const bitcoinNetwork = bitcoin.networks.testnet; | |
var rootUrl = "https://api.blockcypher.com/v1/btc/test3"; | |
//create wallets | |
const TestNet = bitcoin.networks.testnet3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Web3 from 'Web3' | |
var Tx = require('ethereumjs-tx'); | |
const web3 = new Web3(`https://rinkeby.infura.io/v3/` + config.infura_api_key); | |
const createWallet = async () => { | |
try { | |
web3.eth.accounts.create((err, createdAcc) => { | |
if (err === null) | |
return {success: true, data: { | |
addr: createdAcc.address, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const config = require("../../config/config"); | |
import path from 'path' | |
import Web3 from 'Web3' | |
import fs from 'fs' | |
const web3 = new Web3(`https://rinkeby.infura.io/v3/` + config.infura_api_key); | |
const getWallet = async (walletId) => { | |
try { | |
var abiArray = JSON.parse(fs.readFileSync(path.resolve(__dirname, './tusdABI.json'), 'utf-8')); | |
var contractAddress = "0x0000000000085d4780B73119b644AE5ecd22b376"; |