Exemplo n.º 1
0
def CallMethod(method):
    response = requests.post(
        main.provider + "/twirp/coordinationChain.CoordinationChain/" + method,
        data=json.dumps(GeneralRequest()),
        headers=common.RequestHeaders,
        verify=common.RequestShouldVerify)  # Send request
    return common.GetRequestResponse(response)  # Return response
Exemplo n.º 2
0
def CallMethod(method, genesisPath):
    response = requests.post(main.provider +
                             "/twirp/chainConfig.ChainConfig/" + method,
                             data=json.dumps(GeneralRequest(genesisPath)),
                             headers=common.RequestHeaders,
                             verify=common.RequestShouldVerify)  # Send request
    return common.GetRequestResponse(response)  # Return response
Exemplo n.º 3
0
def CallMethod(method, address, privateKey):
    response = requests.post(
        main.provider + "/twirp/accounts.Accounts/" + method,
        data=json.dumps(GeneralRequest(address, privateKey)),
        headers=common.RequestHeaders,
        verify=common.RequestShouldVerify)  # Send request
    return common.GetRequestResponse(
        response)  # Return response # Return response
Exemplo n.º 4
0
def CallMethod(method, nonce, address, address2, amount, payload):
    response = requests.post(main.provider + "/twirp/transaction.Transaction/" + method, data = json.dumps(GeneralRequest(nonce, address, address2, amount, payload)),
        headers=common.RequestHeaders, verify=common.RequestShouldVerify) # Send request
    return common.GetRequestResponse(response) # Return response