コード例 #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
コード例 #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
コード例 #3
0
ファイル: accounts.py プロジェクト: SummerCash/summercash.py
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
コード例 #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