-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitignore
49 lines (44 loc) · 1.52 KB
/
.gitignore
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# wallet_creation.py
import os
import ecdsa
from ecdsa import SigningKey, SECP256k1
from eth_account import Account
from solana.account import Account as SolanaAccount
# Function to create a Bitcoin wallet
def create_bitcoin_wallet():
sk = SigningKey.generate(curve=SECP256k1)
vk = sk.verifying_key
public_key = vk.to_string().hex()
private_key = sk.to_string().hex()
return public_key, private_key
# Function to create an Ethereum wallet
def create_ethereum_wallet():
acct = Account.create()
public_key = acct.address
private_key = acct.key.hex()
return public_key, private_key
# Function to create a Solana wallet
def create_solana_wallet():
acct = SolanaAccount()
public_key = acct.public_key()
private_key = acct.secret_key()
return public_key, private_key
# Test the wallet creation functions
def test_wallet_creation():
bitcoin_public_key, bitcoin_private_key = create_bitcoin_wallet()
ethereum_public_key, ethereum_private_key = create_ethereum_wallet()
solana_public_key, solana_private_key = create_solana_wallet()
print("Bitcoin Wallet:")
print("Public Key:", bitcoin_public_key)
print("Private Key:", bitcoin_private_key)
# print()
print("Ethereum Wallet:")
print("Public Key:", ethereum_public_key)
print("Private Key:", ethereum_private_key)
# print()
print("Solana Wallet:")
print("Public Key:", solana_public_key)
print("Private Key:", solana_private_key)
# print()
if __name__ == "__main__":
test_wallet_creation()