File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ from xrpl .clients import JsonRpcClient
2
+ from xrpl .wallet import generate_faucet_wallet
3
+
4
+ def create_test_wallet ():
5
+ """
6
+ Creates and funds a new test wallet on XRPL testnet
7
+ """
8
+ # Define the network client
9
+ client = JsonRpcClient ("https://s.altnet.rippletest.net:51234" )
10
+
11
+ # Create a test wallet with test XRP
12
+ test_wallet = generate_faucet_wallet (client )
13
+
14
+ # Print wallet details
15
+ print ("\n === XRPL Test Wallet Details ===" )
16
+ print (f"Public Key: { test_wallet .public_key } " )
17
+ print (f"Private Key: { test_wallet .private_key } " )
18
+ print (f"Classic Address: { test_wallet .classic_address } " )
19
+ print (f"Seed: { test_wallet .seed } " )
20
+ print ("==============================\n " )
21
+
22
+ return test_wallet
23
+
24
+ if __name__ == "__main__" :
25
+ print ("Creating and funding a test wallet..." )
26
+ test_wallet = create_test_wallet ()
27
+ print ("Done!" )
You can’t perform that action at this time.
0 commit comments