autobahn.xbr._eip712_base


Module Contents

Functions

_hash(→ bytes)

keccak256(abi.encode(

sign(→ bytes)

Sign the given data using the given Ethereum private key.

recover(→ bytes)

Recover the Ethereum address of the signer, given the data and signature.

is_address(→ bool)

Check if the value is a proper Ethereum address.

is_bytes16(→ bool)

Check if the value is a proper (binary) UUID.

is_bytes32(→ bool)

Check if the value is of type bytes and length 32.

is_signature(→ bool)

Check if the value is a proper Ethereum signature.

is_eth_privkey(→ bool)

Check if the value is a proper Ethereum private key (seed).

is_cs_pubkey(→ bool)

Check if the value is a proper WAMP-cryptosign public key.

is_block_number(→ bool)

Check if the value is a proper Ethereum block number.

is_chain_id(→ bool)

Check if the value is a proper Ethereum chain ID.

Attributes

_EIP712_SIG_LEN

autobahn.xbr._eip712_base._EIP712_SIG_LEN
autobahn.xbr._eip712_base._hash(data) bytes[source]
keccak256(abi.encode(

EIP712_MEMBER_REGISTER_TYPEHASH, obj.chainId, obj.verifyingContract, obj.member, obj.registered, keccak256(bytes(obj.eula)), keccak256(bytes(obj.profile))

));

Parameters

data

Returns

autobahn.xbr._eip712_base.sign(eth_privkey: bytes, data: Dict[str, Any]) bytes[source]

Sign the given data using the given Ethereum private key.

Parameters
  • eth_privkey – Signing key.

  • data – Data to sign.

Returns

Signature.

autobahn.xbr._eip712_base.recover(data: Dict[str, Any], signature: bytes) bytes[source]

Recover the Ethereum address of the signer, given the data and signature.

Parameters
  • data – Signed data.

  • signature – Signature.

Returns

Signing address.

autobahn.xbr._eip712_base.is_address(provided: Any) bool[source]

Check if the value is a proper Ethereum address.

Parameters

provided – The value to check.

Returns

True iff the value is of correct type.

autobahn.xbr._eip712_base.is_bytes16(provided: Any) bool[source]

Check if the value is a proper (binary) UUID.

Parameters

provided – The value to check.

Returns

True iff the value is of correct type.

autobahn.xbr._eip712_base.is_bytes32(provided: Any) bool[source]

Check if the value is of type bytes and length 32.

Parameters

provided – The value to check.

Returns

True iff the value is of correct type.

autobahn.xbr._eip712_base.is_signature(provided: Any) bool[source]

Check if the value is a proper Ethereum signature.

Parameters

provided – The value to check.

Returns

True iff the value is of correct type.

autobahn.xbr._eip712_base.is_eth_privkey(provided: Any) bool[source]

Check if the value is a proper Ethereum private key (seed).

Parameters

provided – The value to check.

Returns

True iff the value is of correct type.

autobahn.xbr._eip712_base.is_cs_pubkey(provided: Any) bool[source]

Check if the value is a proper WAMP-cryptosign public key.

Parameters

provided – The value to check.

Returns

True iff the value is of correct type.

autobahn.xbr._eip712_base.is_block_number(provided: Any) bool[source]

Check if the value is a proper Ethereum block number.

Parameters

provided – The value to check.

Returns

True iff the value is of correct type.

autobahn.xbr._eip712_base.is_chain_id(provided: Any) bool[source]

Check if the value is a proper Ethereum chain ID.

Parameters

provided – The value to check.

Returns

True iff the value is of correct type.