def transfer_assets_with_sign(self, header, creator, created, privateB64, payload, nonce=""): """Transfer assets with edd25519 signed body. """ payload = json.dumps(payload) req_path = "assets/transfer" method = self.__config.do_post signature = build_signature_body( creator, created, nonce, privateB64, payload ) body = { "payload": payload, "signature": signature } req_params = self.__set_params( header, req_path, body=body ) return self.__config.do_request( req_params, method )
def withdraw_colored_token_with_sign(self, header, creator, created, privateB64, payload, nonce=""): """Withdraw colored token with ed25519 signed body. """ payload = json.dumps(payload) req_path = "tokens/withdraw" method = self.__config.do_post signature = build_signature_body( creator, created, nonce, privateB64, payload ) body = { "payload": payload, "signature": signature } req_params = self.__set_params( header, req_path, body=body ) return self.__config.do_request( req_params, method )
def issue_asset_with_sign(self, header, creator, created, privateB64, payload, nonce=""): """Issue asset with ed25519 signed body. """ payload = json.dumps(payload) req_path = "assets/issue" method = self.__client.do_post signature = build_signature_body(creator, created, nonce, privateB64, payload) body = {"payload": payload, "signature": signature} req_params = self.__set_params(header, req_path, body=body) return self.__client.do_request(req_params, method)
def issue_colored_token_with_sign(self, header, creator, created, privateB64, payload, nonce=""): """Issue colored token with sign. """ payload = json.dumps(payload) req_path = "tokens/issue" method = self.__client.do_post signature = build_signature_body(creator, created, nonce, privateB64, payload) body = {"payload": payload, "signature": signature} req_params = self.__set_params(header, req_path, body=body) return self.__client.do_request(req_params, method)
def update_with_sign(self, header, creator, created, privateB64, payload, nonce=""): """Update a POE with ed25519 signed body.""" payload = json.dumps(payload) req_path = "update" method = self.__config.do_put signature = build_signature_body(creator, created, nonce, privateB64, payload) body = {"payload": payload, "signature": signature} req_params = self.__set_params(header, req_path, body=body) return self.__config.do_request( req_params, method, )