Wednesday, February 8, 2023
HomeBitcoinbitcoin core - NameError at /register title 'privtopub' shouldn't be outlined

bitcoin core – NameError at /register title ‘privtopub’ shouldn’t be outlined


from django.shortcuts import render, redirect
from django.contrib.auth.fashions import Consumer, auth
from django.contrib import messages
from .fashions import Particulars
from bitcoin import *
import random
import bs4
import requests

def register(request):

element = Particulars()
bits = random.getrandbits(256)
bits_hex = hex(bits)
private_key = bits_hex[2:]
print(private_key)
# private_key = random_key()
public_key = privtopub(private_key)
deal with = pubtoaddr(public_key)
element.private_key = private_key
element.public_key = public_key
element.deal with = deal with

I’m Getting error on public_key = random_key()
and public_key = privtopub(private_key)…

I feel i hadnot set up all blockchain and bitcoin libraries correctly. Can anybody inform learn how to repair this error?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments