Skip to main content

Module auth

Module auth 

Source
Expand description

Zone RPC auth wire format, mirrored from tempoxyz/zones at a1c15e9f.

Source: https://github.com/tempoxyz/zones/tree/a1c15e9f002a5efd150f56c5076fb35519288396/crates/rpc/src/auth/token.rs

The signature is a Tempo transaction signature over the token digest. tempoxyz/tempo’s zone RPC accepts configurable account (0x05) signatures from #9045; see authenticate_token in https://github.com/tempoxyz/tempo/blob/c8b89f9b6d9f011a8a277ab431183b2b105c4af7/crates/zones/rpc/src/server.rs.

Re-exportsΒ§

use super::signer::ZoneSigner; πŸ”’
use alloy_primitives::B256; πŸ”’
use alloy_primitives::hex; πŸ”’
use alloy_primitives::hex; πŸ”’
use alloy_primitives::keccak256; πŸ”’
use eyre::Result; πŸ”’
use std::time::SystemTime; πŸ”’
use std::time::UNIX_EPOCH; πŸ”’

ConstantsΒ§

HEADER πŸ”’

FunctionsΒ§

sign_token πŸ”’
Sign a short-lived token as signer, see ZoneSigner::sign_token_digest.
token_fields πŸ”’