graphenecommon.aio.message module¶
-
class
graphenecommon.aio.message.Message(*args, **kwargs)¶ Bases:
graphenecommon.message.Message,graphenecommon.aio.message.MessageV1,graphenecommon.aio.message.MessageV2-
sign(*args, **kwargs)¶ Sign a message with an account’s memo key
Parameters: account (str) – (optional) the account that owns the bet (defaults to default_account)Raises: ValueError – If not account for signing is provided Returns: the signed message encapsulated in a known format
-
supported_formats= (<class 'graphenecommon.aio.message.MessageV1'>, <class 'graphenecommon.aio.message.MessageV2'>)¶
-
valid_exceptions= (<class 'graphenecommon.exceptions.AccountDoesNotExistsException'>, <class 'graphenecommon.exceptions.InvalidMessageSignature'>, <class 'graphenecommon.exceptions.WrongMemoKey'>, <class 'graphenecommon.exceptions.InvalidMemoKeyException'>)¶
-
verify(**kwargs)¶ Verify a message with an account’s memo key
Parameters: account (str) – (optional) the account that owns the bet (defaults to default_account)Returns: True if the message is verified successfully :raises InvalidMessageSignature if the signature is not ok
-
-
class
graphenecommon.aio.message.MessageV1(*args, **kwargs)¶ Bases:
graphenecommon.message.MessageV1Allow to sign and verify Messages that are sigend with a private key
-
sign(account=None, **kwargs)¶ Sign a message with an account’s memo key
Parameters: account (str) – (optional) the account that owns the bet (defaults to default_account)Raises: ValueError – If not account for signing is provided Returns: the signed message encapsulated in a known format
-
verify(**kwargs)¶ Verify a message with an account’s memo key
Parameters: account (str) – (optional) the account that owns the bet (defaults to default_account)Returns: True if the message is verified successfully :raises InvalidMessageSignature if the signature is not ok
-
-
class
graphenecommon.aio.message.MessageV2(*args, **kwargs)¶ Bases:
graphenecommon.message.MessageV2Allow to sign and verify Messages that are sigend with a private key
-
sign(account=None, **kwargs)¶ Sign a message with an account’s memo key
Parameters: account (str) – (optional) the account that owns the bet (defaults to default_account)Raises: ValueError – If not account for signing is provided Returns: the signed message encapsulated in a known format
-
verify(**kwargs)¶ Verify a message with an account’s memo key
Parameters: account (str) – (optional) the account that owns the bet (defaults to default_account)Returns: True if the message is verified successfully :raises InvalidMessageSignature if the signature is not ok
-