glethers/hash/typed_data
Types
pub type ComplexField {
Primitive(primitives.Primitive)
Struct(TypedData)
}
Constructors
-
Primitive(primitives.Primitive)
-
Struct(TypedData)
pub type TypedDataDomain {
TypedDataDomain(
name: Option(String),
version: Option(String),
chain_id: Option(integer.Uint256),
verifying_contract: Option(Address),
salt: Option(bytes.Bytes32),
)
}
Constructors
-
TypedDataDomain( name: Option(String), version: Option(String), chain_id: Option(integer.Uint256), verifying_contract: Option(Address), salt: Option(bytes.Bytes32), )
pub type TypedDataValues =
List(#(String, ComplexField))
Functions
pub fn encode_data(
values: #(String, List(#(String, ComplexField))),
) -> BitArray
pub fn encode_type(
typed_data: #(String, List(#(String, ComplexField))),
) -> String
pub fn hash_domain(domain: TypedDataDomain) -> BitArray
pub fn hash_message(
domain: TypedDataDomain,
struct: a,
encoder: fn(a) -> #(String, List(#(String, ComplexField))),
) -> Hash
pub fn hash_struct(
data: #(String, List(#(String, ComplexField))),
) -> BitArray