xbr._util

Functions

make_w3([gateway_config])

Create a Web3 instance configured and ready-to-use gateway to the blockchain.

pack_ethadr(→ Union[List[int], Dict[str, int]])

pack_uint128(value)

pack_uint256(value)

unpack_ethadr(→ Union[bytes, str])

unpack_uint128(data)

unpack_uint256(data)

Module Contents

make_w3(gateway_config=None)[source]

Create a Web3 instance configured and ready-to-use gateway to the blockchain.

Parameters:

gateway_config (dict) – Blockchain gateway configuration.

Returns:

Configured Web3 instance.

Return type:

web3.Web3

pack_ethadr(value: bytes | str, return_dict: bool = False) List[int] | Dict[str, int][source]
Parameters:
  • value

  • return_dict

Returns:

pack_uint128(value)[source]
pack_uint256(value)[source]
unpack_ethadr(packed_value: List[int] | Dict[str, int], return_str=False) bytes | str[source]
Parameters:
  • packed_value

  • return_str

Returns:

unpack_uint128(data)[source]
unpack_uint256(data)[source]