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
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
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
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