MCPcopy Create free account
hub / github.com/canopy-network/canopy / hex_to_base64

Function hex_to_base64

plugin/python/tutorial/rpc_test.py:53–55  ·  view source on GitHub ↗

Convert hex string to base64 (for protojson bytes encoding).

(hex_str: str)

Source from the content-addressed store, hash-verified

51
52
53def hex_to_base64(hex_str: str) -> str:
54 """Convert hex string to base64 (for protojson bytes encoding)."""
55 return base64.b64encode(bytes.fromhex(hex_str)).decode('utf-8')
56
57
58def hex_to_bytes(hex_str: str) -> bytes:

Callers 3

send_faucet_txFunction · 0.85
send_send_txFunction · 0.85
send_reward_txFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected