예제 #1
0
def user02():
    from park.park import Park
    park = Park(
        '108.61.209.209',
        4002,
        '578e820911f24e039733b45e4882b73e301f813a0d2c31330dafda84534ffa23',
        '1.1.1'
    )
    info = park.accounts().account(address='DLf7YJA68w5bSX781HjqszxkfkQzEGAB8m')
    #print(info)

    transaction = park.transactions().create('DHkEspm6H1XVwqajxDwQa99fYERMxw4w3R', '100000000', 'Open Door', 'fragile speed doctor grace idea give soda echo worry enhance raw rug')
예제 #2
0
    def broadcast_tx(self,
                     address,
                     amount,
                     secret,
                     secondsecret=None,
                     vendorfield=''):
        """broadcasts a transaction to the peerslist using ark-js library"""

        peer = random.choice(self.PEERS)
        park = Park(peer, 4001, constants.ARK_NETHASH, '1.1.1')

        return park.transactions().create(address, str(amount), vendorfield,
                                          secret, secondsecret)
예제 #3
0
def
park = Park(
    '108.61.209.209',
    4002,
    '578e820911f24e039733b45e4882b73e301f813a0d2c31330dafda84534ffa23',
    '1.1.1'
)
info = park.accounts().account(address='DLf7YJA68w5bSX781HjqszxkfkQzEGAB8m')
예제 #4
0
def get_network(d, n, ip="localhost"):

    return Park(
        ip,
        n[d['network']]['port'],
        n[d['network']]['nethash'],
        n[d['network']]['version']
    )
예제 #5
0
파일: tbw.py 프로젝트: ABootleg53/tbw
def get_network(data, ip="localhost"):
    networks = json.load(open('networks.json'))

    return Park(ip, networks[data['network']]['port'],
                networks[data['network']]['nethash'],
                networks[data['network']]['version'])
예제 #6
0
from park.park import Park

park = Park(
    '108.61.209.209', 4002,
    '578e820911f24e039733b45e4882b73e301f813a0d2c31330dafda84534ffa23',
    '1.1.1')

info = park.accounts().account(address='DHkEspm6H1XVwqajxDwQa99fYERMxw4w3R')
#print(info)

query = park.transactions().transactions(
    {'recipientId': 'DHkEspm6H1XVwqajxDwQa99fYERMxw4w3R'})
#print(query)

temp1 = []
for key, value in query.items():
    aValue = value
    temp1.append(aValue)

#print(temp1[1])
#print(len(temp1[1]))

transactid = []
senderList = []
timestamp = []
if (len(temp1[1]) > 0):
    for item in temp1[1]:
        #print(item['senderId'])
        transactid.append(item['id'])
        senderList.append(item['senderId'])
        timestamp.append(item['timestamp'])
예제 #7
0
from park.park import Park
park= Park('13.91.88.132',
	4100,
	'fcd6189151cfa5190f1c238f0928cd178341554a1b0d82de2ac8ddda957362c2',
	'1.1.1'
	)

with open('addresses.txt', 'r') as ins:
	array=[]
	for line in ins:
		array.append(line)
for i in array:
	transaction = park.transactions().create('i', '1', 'ML875z91DK4v97CP5BrE6TBejKwaNFAUVV', 'secret', 'second secret')
	#The secret will be entered upon running the program
#check transactions
transaction(self, ML875z91DK4v97CP5BrE6TBejKwaNFAUVV)
예제 #8
0
from park.park import Park

park = Park(
    '108.61.209.209', 4002,
    '578e820911f24e039733b45e4882b73e301f813a0d2c31330dafda84534ffa23',
    '1.1.1')
info = park.accounts().account(address='DHkEspm6H1XVwqajxDwQa99fYERMxw4w3R')
print(info)

#query = park.transactions().transaction('fb5ca7eb26ea13077351b8c16ecf459c0c670f6b8059860b890be84d0a30ed17')
query = park.transactions().transactions(
    {'senderId': 'DLf7YJA68w5bSX781HjqszxkfkQzEGAB8m'})
print(query)
query1 = park.transactions().transactions(
    {'senderId': 'DHkEspm6H1XVwqajxDwQa99fYERMxw4w3R'})
#print(query1)
#print(len(query['transactions']))

temp = []

for key, value in query.items():
    aValue = value
    temp.append(aValue)

print(temp)
print(len(temp))
#print(temp[1:][0][])

#temp1 = temp[1:][0][0]
#print(temp1['id'])