-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenseed_cli.py
executable file
·56 lines (44 loc) · 1.58 KB
/
openseed_cli.py
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
50
51
52
53
54
55
#!/usr/bin/python
import sys
sys.path.append("..")
import mysql.connector
import openseed_account as Account
import hive_get as Get
import hive_submit as Submit
import leaderboard as LeaderBoard
import openseed_music as Music
import openseed_connections as Connections
import openseed_chat as Chat
import onetime as OneTime
import openseed_token as Tokens
import openseed_setup as Settings
settings = Settings.get_settings()
import json
if len(sys.argv) > 1:
if sys.argv[1] == "add":
if sys.argv[2] == "creator":
print("Creating new Creator account\n")
devName = input("Creator Name: ")
contactName = input("Main contact name: ")
contactEmail = input(contactName+"'s email address: ")
openseed = input("OpenSeed account token for the creator account: ")
result = Account.create_creator(devName,contactName,contactEmail,openseed)
print(result)
elif sys.argv[2] == "app":
print("Creating new App account\n")
devID = input("Developer Priv ID: ")
appName = input("Application Name: ")
result = Account.create_app(devID,appName)
print(result)
elif sys.argv[2] == "FT":
devID = input("Public Developer ID: ")
appID = input("Public Application ID(optional): ")
total = input("Total supply: ")
precision = input("Precision (defaults to two decimals): ")
Tokens.create_ft(devID,appID,"","",total,precision)
elif sys.argv[2] == "NFT":
print("Creating NFT ledger\n")
devID = input("Public Developer ID: ")
appID = input("Public Application ID(optional): ")
total = input("Total supply: ")
Tokens.create_nft(devID,appID,total,precision)